@templatical/editor 0.16.4 → 0.17.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-CYAbVB2G.js → AiChatSidebar-LxCHMdcj.js} +1 -1
- package/dist/{AiFeatureMenu-BPCkrHAS.js → AiFeatureMenu-zwSmx9ZW.js} +3 -3
- package/dist/{BlockIssueBadge-BLytBabN.js → BlockIssueBadge-BQ1yB1me.js} +2 -2
- package/dist/{CloudEditor-v8ARYaFW.js → CloudEditor-5ahgKRX8.js} +11 -10
- package/dist/{CollaboratorBar-BQzKZ2zo.js → CollaboratorBar-6PtX-1AS.js} +2 -2
- package/dist/{ColorPicker-Cab6U2sH.js → ColorPicker-DfzDyNKe.js} +57 -58
- package/dist/{CommentsSidebar-C_XLBbo3.js → CommentsSidebar-Cl93TN96.js} +3 -3
- package/dist/{CountdownBlock-173fiO5Z.js → CountdownBlock-DbXfzwae.js} +1 -1
- package/dist/{CountdownToolbar-q3umZ7TZ.js → CountdownToolbar-BqaMWRyB.js} +3 -3
- package/dist/{DesignReferenceSidebar-Bh9uAZ4B.js → DesignReferenceSidebar-jVrdS8wW.js} +2 -2
- package/dist/{IssuesPanel-DltSuU6H.js → IssuesPanel-Bq3yXg6M.js} +2 -2
- package/dist/{MergeTagSuggestion-DrT3LiZ4.js → MergeTagSuggestion-jIpT_jmz.js} +7 -5
- package/dist/{ModuleBrowserModal-CzzChPmN.js → ModuleBrowserModal-B5IH3-1I.js} +7 -7
- package/dist/{ModulePreviewCanvas-C0Q2n3FL.js → ModulePreviewCanvas-CYOLWoZ9.js} +2 -2
- package/dist/{NumberWithSuffix-Bhm2ByHs.js → NumberWithSuffix-9FG7mNnn.js} +1 -1
- package/dist/{ParagraphEditor-BhsBi8p8.js → ParagraphEditor-duWYA6Vv.js} +38 -39
- package/dist/{RichTextEditorContent-ef0fdj6e.js → RichTextEditorContent-DCzmVeyb.js} +13 -13
- package/dist/{SaveModuleDialog-BNN3dcxD.js → SaveModuleDialog-BPUly5h3.js} +6 -6
- package/dist/{SnapshotHistory-tWvgMCe6.js → SnapshotHistory-CmwU3nlN.js} +4 -4
- package/dist/{TemplateScoringPanel-ZhObHWeb.js → TemplateScoringPanel-CMrfa9Rd.js} +3 -3
- package/dist/{TestEmailModal-EdwEcsrD.js → TestEmailModal-zfomMz9i.js} +3 -3
- package/dist/{TitleEditor-DdvRepBq.js → TitleEditor-v0gtezZE.js} +18 -18
- package/dist/{TplModal-Niu4Y96-.js → TplModal-eGFG7k-y.js} +4 -4
- package/dist/{blockTypeIcons-DHcYPMB8.js → blockTypeIcons-Dd0w4T0I.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js → AiFeatureMenu-CtXsam7G.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js.map → AiFeatureMenu-CtXsam7G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js → BlockIssueBadge-DR7cpDfQ.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js.map → BlockIssueBadge-DR7cpDfQ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js → CloudEditor-YC5y3AwC.js} +131 -130
- package/dist/cdn/chunks/CloudEditor-YC5y3AwC.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js → CollaboratorBar-BOD2j8Kl.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js.map → CollaboratorBar-BOD2j8Kl.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DLEoT419.js → ColorPicker-CPMWLHpa.js} +144 -144
- package/dist/cdn/chunks/ColorPicker-CPMWLHpa.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js → CountdownBlock-BmGqb7Zi.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js.map → CountdownBlock-BmGqb7Zi.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js → CountdownToolbar-BBwsdGbV.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js.map → CountdownToolbar-BBwsdGbV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js → IssuesPanel-G0z-j3JS.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js.map → IssuesPanel-G0z-j3JS.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-jesxS7An.js → MergeTagSuggestion-rpZ6Ol-i.js} +8 -6
- package/dist/cdn/chunks/MergeTagSuggestion-rpZ6Ol-i.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js → ModuleBrowserModal-DiLTY0ec.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js.map → ModuleBrowserModal-DiLTY0ec.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js → ModulePreviewCanvas-CdV5mEQ6.js} +32 -32
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js.map → ModulePreviewCanvas-CdV5mEQ6.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js → NumberWithSuffix-lqQlf0Uk.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js.map → NumberWithSuffix-lqQlf0Uk.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D7znI_X1.js → ParagraphEditor-BYoZfURd.js} +75 -75
- package/dist/cdn/chunks/ParagraphEditor-BYoZfURd.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js → RichTextEditorContent-BnPRnXxy.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js.map → RichTextEditorContent-BnPRnXxy.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js → SaveModuleDialog-C9hUeWyG.js} +20 -20
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js.map → SaveModuleDialog-C9hUeWyG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CKjZ6Cgp.js → TitleEditor-wFvnU3Jr.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-wFvnU3Jr.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js → blockTypeIcons-DNMvDz5B.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js.map → blockTypeIcons-DNMvDz5B.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +2 -2
- package/dist/cdn/chunks/ca-CSl--oWR.js.map +1 -0
- package/dist/cdn/chunks/{de-q9lTCMre.js → de-ZaffrKDP.js} +2 -2
- package/dist/cdn/chunks/de-ZaffrKDP.js.map +1 -0
- package/dist/cdn/chunks/{en-CR4LItrX.js → en-CHuXeJDt.js} +2 -2
- package/dist/cdn/chunks/en-CHuXeJDt.js.map +1 -0
- package/dist/cdn/chunks/{es-CEt-lrGd.js → es-CaC8VQjO.js} +2 -2
- package/dist/cdn/chunks/es-CaC8VQjO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-OZTN_skA.js → extensions-DxcxIlwT.js} +29 -29
- package/dist/cdn/chunks/{extensions-OZTN_skA.js.map → extensions-DxcxIlwT.js.map} +1 -1
- package/dist/cdn/chunks/{features-Bo7H8WNI.js → features-B3qgDBHf.js} +727 -677
- package/dist/cdn/chunks/features-B3qgDBHf.js.map +1 -0
- package/dist/cdn/chunks/{icons-BrNSrnyT.js → icons-kiMqh99T.js} +2 -2
- package/dist/cdn/chunks/{icons-BrNSrnyT.js.map → icons-kiMqh99T.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js → media-library-C5ogiZ4f.js} +451 -451
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js.map → media-library-C5ogiZ4f.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +2 -2
- package/dist/cdn/chunks/pt-BR-C74zfEWH.js.map +1 -0
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js → quality-BftAn_AJ.js} +512 -512
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js.map → quality-BftAn_AJ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js → renderer-Cdlo4MVX.js} +16 -16
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js.map → renderer-Cdlo4MVX.js.map} +1 -1
- package/dist/cdn/chunks/{src-BH8PABpF.js → src-GBA8oUL2.js} +6 -6
- package/dist/cdn/chunks/{src-BH8PABpF.js.map → src-GBA8oUL2.js.map} +1 -1
- package/dist/cdn/chunks/{styles-nqo5BynI.js → styles-B6rdq9JB.js} +219 -219
- package/dist/cdn/chunks/styles-B6rdq9JB.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +53 -52
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{de-q9lTCMre.js → de-ZaffrKDP.js} +1 -1
- package/dist/{en-CR4LItrX.js → en-CHuXeJDt.js} +1 -1
- package/dist/{es-CEt-lrGd.js → es-CaC8VQjO.js} +1 -1
- package/dist/{extensions-B2poxDIo.js → extensions-B4lu0KkE.js} +3 -3
- package/dist/index.d.ts +56 -0
- package/dist/keys-WVNarXg8.js +10 -0
- package/dist/{pt-BR-DvBHY0AA.js → pt-BR-C74zfEWH.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DN4J7w-C.js → styles-mBSbDYeX.js} +98 -98
- package/dist/templatical-editor.js +11 -10
- package/dist/{useCloudI18n-WbfVWq5k.js → useCloudI18n-CIKI0hCd.js} +1 -1
- package/dist/{useEditorCore-DBq2689h.js → useEditorCore-CaaHPKjm.js} +715 -684
- package/dist/{useI18n-eR1yVW0v.js → useI18n-0EU_JVe7.js} +1 -1
- package/dist/{useMergeTag-C3GfSktg.js → useMergeTag-C7v6MVah.js} +2 -2
- package/dist/usePopoverPosition-BDqqnMeo.js +281 -0
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-BrZLF_m1.js.map +0 -1
- package/dist/cdn/chunks/ColorPicker-DLEoT419.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-jesxS7An.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-D7znI_X1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CKjZ6Cgp.js.map +0 -1
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +0 -1
- package/dist/cdn/chunks/de-q9lTCMre.js.map +0 -1
- package/dist/cdn/chunks/en-CR4LItrX.js.map +0 -1
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +0 -1
- package/dist/cdn/chunks/features-Bo7H8WNI.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +0 -1
- package/dist/cdn/chunks/styles-nqo5BynI.js.map +0 -1
- package/dist/color-DhoxCSMv.js +0 -259
- package/dist/keys-BbDgCU6K.js +0 -10
- package/dist/usePopoverRoot-C1j0D7cc.js +0 -8
|
@@ -1487,7 +1487,7 @@ function Ln() {
|
|
|
1487
1487
|
}
|
|
1488
1488
|
//#endregion
|
|
1489
1489
|
//#region src/keys.ts
|
|
1490
|
-
var Rn = Symbol("translations"), zn = Symbol("editor"), Bn = Symbol("history"), Vn = Symbol("blockActions"), Hn = Symbol("conditionPreview"), Un = Symbol("fontsManager"), Wn = Symbol("themeStyles"), Gn = Symbol("tplUiTheme"), Kn = Symbol("blockDefaults"), qn = Symbol("blockRegistry"), Jn = Symbol("customBlockDefinitions"), Yn = Symbol("paletteBlocks"), Xn = Symbol("
|
|
1490
|
+
var Rn = Symbol("translations"), zn = Symbol("editor"), Bn = Symbol("history"), Vn = Symbol("blockActions"), Hn = Symbol("conditionPreview"), Un = Symbol("fontsManager"), Wn = Symbol("themeStyles"), Gn = Symbol("tplUiTheme"), Kn = Symbol("blockDefaults"), qn = Symbol("blockRegistry"), Jn = Symbol("customBlockDefinitions"), Yn = Symbol("paletteBlocks"), Xn = Symbol("htmlBlockPreview"), Zn = Symbol("customBlockStylesheets"), Qn = Symbol("mergeTags"), $n = Symbol("mergeTagSyntax"), er = Symbol("onRequestMergeTag"), tr = Symbol("mergeTagAutocomplete"), nr = Symbol("mergeTagPicker"), rr = Symbol("logicTags"), ir = Symbol("logicPairs"), ar = Symbol("logicPicker"), or = Symbol("onRequestLogic"), sr = Symbol("onRequestMedia"), cr = Symbol("displayConditions"), lr = Symbol("allowCustomConditions"), ur = Symbol("capabilities"), dr = Symbol("keyboardReorder"), fr = Symbol("templateLint"), pr = Symbol("editorRoot"), mr = Symbol("popoverRoot"), hr = Symbol("authManager"), gr = Symbol("aiConfig"), _r = Symbol("comments"), vr = Symbol("savedModulesHeadless"), yr = Symbol("scoring"), br = Symbol("cloudTranslations");
|
|
1491
1491
|
function J(e, t) {
|
|
1492
1492
|
let n = v(e, null);
|
|
1493
1493
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1495,7 +1495,7 @@ function J(e, t) {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
//#endregion
|
|
1497
1497
|
//#region src/composables/useMergeTagPicker.ts
|
|
1498
|
-
function
|
|
1498
|
+
function xr() {
|
|
1499
1499
|
let e = C(!1), t = C([]), n = null;
|
|
1500
1500
|
function r(r) {
|
|
1501
1501
|
if (n) {
|
|
@@ -1525,7 +1525,7 @@ function br() {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
//#endregion
|
|
1527
1527
|
//#region src/composables/useLogicTagPicker.ts
|
|
1528
|
-
function
|
|
1528
|
+
function Sr() {
|
|
1529
1529
|
let e = C(!1), t = C([]), n = C([]), r = null;
|
|
1530
1530
|
function i(i, a) {
|
|
1531
1531
|
if (r) {
|
|
@@ -1556,15 +1556,15 @@ function xr() {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
//#endregion
|
|
1558
1558
|
//#region src/composables/useTemplateLint.ts
|
|
1559
|
-
function
|
|
1559
|
+
function Cr(e) {
|
|
1560
1560
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1562
|
+
function wr(e) {
|
|
1563
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = Cr(e.options), s = null, c = !1;
|
|
1564
1564
|
o || l();
|
|
1565
1565
|
async function l() {
|
|
1566
1566
|
try {
|
|
1567
|
-
let t = await import("./quality-
|
|
1567
|
+
let t = await import("./quality-BftAn_AJ.js").then((e) => e.t);
|
|
1568
1568
|
if (c) return;
|
|
1569
1569
|
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = fn(e.content, u, {
|
|
1570
1570
|
debounce: e.debounce ?? 500,
|
|
@@ -1615,12 +1615,12 @@ function Y(e) {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
//#endregion
|
|
1617
1617
|
//#region src/utils/blockTypeLabels.ts
|
|
1618
|
-
function
|
|
1618
|
+
function Tr(e, t) {
|
|
1619
1619
|
return t.blocks[e] ?? e;
|
|
1620
1620
|
}
|
|
1621
1621
|
//#endregion
|
|
1622
1622
|
//#region src/composables/useKeyboardReorder.ts
|
|
1623
|
-
function
|
|
1623
|
+
function Er(e, t) {
|
|
1624
1624
|
let n = C(null), r = C(""), i = null;
|
|
1625
1625
|
function a(t) {
|
|
1626
1626
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1647,7 +1647,7 @@ function Tr(e, t) {
|
|
|
1647
1647
|
let r = a(n);
|
|
1648
1648
|
if (!r) return "";
|
|
1649
1649
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1650
|
-
return i ?
|
|
1650
|
+
return i ? Tr(i.type, t.t) : "";
|
|
1651
1651
|
}
|
|
1652
1652
|
function s(t, n) {
|
|
1653
1653
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1716,13 +1716,13 @@ function Tr(e, t) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
//#endregion
|
|
1718
1718
|
//#region src/composables/useUiTheme.ts
|
|
1719
|
-
function
|
|
1719
|
+
function Dr(e) {
|
|
1720
1720
|
let t = wn("(prefers-color-scheme: dark)");
|
|
1721
1721
|
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1722
1722
|
}
|
|
1723
1723
|
//#endregion
|
|
1724
1724
|
//#region src/composables/useThemeStyles.ts
|
|
1725
|
-
var
|
|
1725
|
+
var Or = {
|
|
1726
1726
|
bg: "--tpl-bg",
|
|
1727
1727
|
bgElevated: "--tpl-bg-elevated",
|
|
1728
1728
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1746,10 +1746,10 @@ var Dr = {
|
|
|
1746
1746
|
dangerLight: "--tpl-danger-light",
|
|
1747
1747
|
canvasBg: "--tpl-canvas-bg"
|
|
1748
1748
|
};
|
|
1749
|
-
function
|
|
1749
|
+
function kr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1750
1750
|
return { themeStyles: O(() => {
|
|
1751
1751
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1752
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1752
|
+
if (a) for (let [e, t] of Object.entries(Or)) {
|
|
1753
1753
|
let n = a[e];
|
|
1754
1754
|
n && (r[t] = n);
|
|
1755
1755
|
}
|
|
@@ -1758,27 +1758,27 @@ function Or({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
//#endregion
|
|
1760
1760
|
//#region src/utils/logger.ts
|
|
1761
|
-
var
|
|
1762
|
-
function
|
|
1761
|
+
var Ar = "[Templatical]";
|
|
1762
|
+
function jr() {
|
|
1763
1763
|
return typeof process < "u" && !0;
|
|
1764
1764
|
}
|
|
1765
|
-
var
|
|
1765
|
+
var Mr = {
|
|
1766
1766
|
warn(...e) {
|
|
1767
|
-
console.warn(
|
|
1767
|
+
console.warn(Ar, ...e);
|
|
1768
1768
|
},
|
|
1769
1769
|
error(...e) {
|
|
1770
|
-
console.error(
|
|
1770
|
+
console.error(Ar, ...e);
|
|
1771
1771
|
},
|
|
1772
1772
|
debug(...e) {
|
|
1773
|
-
|
|
1773
|
+
jr() || console.debug(Ar, ...e);
|
|
1774
1774
|
},
|
|
1775
1775
|
info(...e) {
|
|
1776
|
-
|
|
1776
|
+
jr() || console.info(Ar, ...e);
|
|
1777
1777
|
}
|
|
1778
1778
|
};
|
|
1779
1779
|
//#endregion
|
|
1780
1780
|
//#region src/composables/useBlockRegistry.ts
|
|
1781
|
-
function
|
|
1781
|
+
function Nr() {
|
|
1782
1782
|
let e = n(/* @__PURE__ */ new Map());
|
|
1783
1783
|
function t(t, n) {
|
|
1784
1784
|
e.value.set(t, n), oe(e);
|
|
@@ -1818,7 +1818,7 @@ function Mr() {
|
|
|
1818
1818
|
strictFilters: !1
|
|
1819
1819
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1820
1820
|
} catch (t) {
|
|
1821
|
-
return
|
|
1821
|
+
return Mr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
1822
1822
|
}
|
|
1823
1823
|
}
|
|
1824
1824
|
function l(t) {
|
|
@@ -1836,9 +1836,9 @@ function Mr() {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
//#endregion
|
|
1838
1838
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1839
|
-
function
|
|
1839
|
+
function Pr(e, t) {
|
|
1840
1840
|
return O(() => {
|
|
1841
|
-
let n =
|
|
1841
|
+
let n = Fr(e.value.blocks);
|
|
1842
1842
|
if (n.size === 0) return [];
|
|
1843
1843
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1844
1844
|
for (let e of n) {
|
|
@@ -1850,11 +1850,11 @@ function Nr(e, t) {
|
|
|
1850
1850
|
return i;
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Fr(e) {
|
|
1854
1854
|
let t = /* @__PURE__ */ new Set();
|
|
1855
|
-
return
|
|
1855
|
+
return Ir(e, t), t;
|
|
1856
1856
|
}
|
|
1857
|
-
function
|
|
1857
|
+
function Ir(e, t) {
|
|
1858
1858
|
for (let n of e) {
|
|
1859
1859
|
if (De(n)) {
|
|
1860
1860
|
t.add(n.customType);
|
|
@@ -1863,13 +1863,13 @@ function Fr(e, t) {
|
|
|
1863
1863
|
if (n.type === "section") {
|
|
1864
1864
|
let e = n.children;
|
|
1865
1865
|
if (!e) continue;
|
|
1866
|
-
for (let n of e)
|
|
1866
|
+
for (let n of e) Ir(n, t);
|
|
1867
1867
|
}
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
//#endregion
|
|
1871
1871
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1872
|
-
var
|
|
1872
|
+
var Lr = [
|
|
1873
1873
|
{
|
|
1874
1874
|
type: "section",
|
|
1875
1875
|
createBlock: Ze
|
|
@@ -1923,8 +1923,8 @@ var Ir = [
|
|
|
1923
1923
|
createBlock: at
|
|
1924
1924
|
}
|
|
1925
1925
|
];
|
|
1926
|
-
function
|
|
1927
|
-
for (let n of
|
|
1926
|
+
function Rr(e, t) {
|
|
1927
|
+
for (let n of Lr) {
|
|
1928
1928
|
let r = t[n.type];
|
|
1929
1929
|
r && e.registerBuiltIn(n.type, {
|
|
1930
1930
|
component: r,
|
|
@@ -1933,8 +1933,13 @@ function Lr(e, t) {
|
|
|
1933
1933
|
}
|
|
1934
1934
|
}
|
|
1935
1935
|
//#endregion
|
|
1936
|
+
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1937
|
+
function zr(e) {
|
|
1938
|
+
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1939
|
+
}
|
|
1940
|
+
//#endregion
|
|
1936
1941
|
//#region src/utils/keyboardShortcuts.ts
|
|
1937
|
-
function
|
|
1942
|
+
function Br(e) {
|
|
1938
1943
|
for (let t of e.composedPath()) {
|
|
1939
1944
|
if (!(t instanceof HTMLElement)) continue;
|
|
1940
1945
|
if (t.isContentEditable) return !0;
|
|
@@ -1943,14 +1948,14 @@ function Rr(e) {
|
|
|
1943
1948
|
}
|
|
1944
1949
|
return !1;
|
|
1945
1950
|
}
|
|
1946
|
-
function
|
|
1951
|
+
function Vr(e, t) {
|
|
1947
1952
|
let n = e.metaKey || e.ctrlKey;
|
|
1948
1953
|
if (n && e.key.toLowerCase() === "s") {
|
|
1949
1954
|
e.preventDefault(), t.onSave?.();
|
|
1950
1955
|
return;
|
|
1951
1956
|
}
|
|
1952
1957
|
if (n && e.key.toLowerCase() === "z") {
|
|
1953
|
-
if (
|
|
1958
|
+
if (Br(e)) return;
|
|
1954
1959
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1955
1960
|
return;
|
|
1956
1961
|
}
|
|
@@ -1958,11 +1963,11 @@ function zr(e, t) {
|
|
|
1958
1963
|
t.selectBlock(null);
|
|
1959
1964
|
return;
|
|
1960
1965
|
}
|
|
1961
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1966
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Br(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1962
1967
|
}
|
|
1963
1968
|
//#endregion
|
|
1964
1969
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1965
|
-
function
|
|
1970
|
+
function Hr(e, t, n) {
|
|
1966
1971
|
if (!e) return [];
|
|
1967
1972
|
let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
|
|
1968
1973
|
for (; (o = r.exec(e)) !== null;) {
|
|
@@ -1989,20 +1994,20 @@ function Br(e, t, n) {
|
|
|
1989
1994
|
}
|
|
1990
1995
|
//#endregion
|
|
1991
1996
|
//#region src/components/MergeTagPreviewText.vue
|
|
1992
|
-
var
|
|
1997
|
+
var Ur = B({
|
|
1993
1998
|
name: "MergeTagPreviewText",
|
|
1994
1999
|
props: { text: {
|
|
1995
2000
|
type: String,
|
|
1996
2001
|
required: !0
|
|
1997
2002
|
} },
|
|
1998
2003
|
setup(e) {
|
|
1999
|
-
let t = v(
|
|
2004
|
+
let t = v(Qn, []), n = v($n, dt.liquid), r = O(() => Hr(e.text, t, n));
|
|
2000
2005
|
return () => r.value.map((e, t) => e.type === "tag" ? a("span", {
|
|
2001
2006
|
key: t,
|
|
2002
2007
|
class: "tpl-merge-tag-label"
|
|
2003
2008
|
}, e.value) : e.value);
|
|
2004
2009
|
}
|
|
2005
|
-
}),
|
|
2010
|
+
}), Wr = { class: "tpl:text-center" }, Gr = ["href"], Kr = /* @__PURE__ */ B({
|
|
2006
2011
|
__name: "ButtonBlock",
|
|
2007
2012
|
props: {
|
|
2008
2013
|
block: {},
|
|
@@ -2023,17 +2028,17 @@ var Vr = B({
|
|
|
2023
2028
|
};
|
|
2024
2029
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
2025
2030
|
});
|
|
2026
|
-
return (t, r) => (f(), k("div",
|
|
2031
|
+
return (t, r) => (f(), k("div", Wr, [I("a", {
|
|
2027
2032
|
href: e.block.url || "#",
|
|
2028
2033
|
style: L(n.value),
|
|
2029
2034
|
class: "tpl:cursor-default",
|
|
2030
2035
|
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
2031
|
-
}, [V(
|
|
2036
|
+
}, [V(Ur, { text: e.block.text }, null, 8, ["text"])], 12, Gr)]));
|
|
2032
2037
|
}
|
|
2033
|
-
}),
|
|
2034
|
-
let t =
|
|
2038
|
+
}), qr = (e) => e === "", Jr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Yr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Zr = (e) => {
|
|
2039
|
+
let t = Xr(e);
|
|
2035
2040
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2036
|
-
},
|
|
2041
|
+
}, Qr = {
|
|
2037
2042
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2038
2043
|
width: 24,
|
|
2039
2044
|
height: 24,
|
|
@@ -2043,35 +2048,35 @@ var Vr = B({
|
|
|
2043
2048
|
"stroke-width": 2,
|
|
2044
2049
|
"stroke-linecap": "round",
|
|
2045
2050
|
"stroke-linejoin": "round"
|
|
2046
|
-
},
|
|
2047
|
-
function
|
|
2048
|
-
return v(
|
|
2051
|
+
}, $r = /* @__PURE__ */ Symbol("lucide-icons");
|
|
2052
|
+
function ei() {
|
|
2053
|
+
return v($r, {});
|
|
2049
2054
|
}
|
|
2050
2055
|
//#endregion
|
|
2051
2056
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.25.0_vue@3.5.40_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
2052
|
-
var
|
|
2053
|
-
let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } =
|
|
2054
|
-
let e =
|
|
2055
|
-
return e ? Number(t) * 24 / Number(c ?? f ??
|
|
2057
|
+
var ti = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: o, "stroke-width": s, size: c, color: l, ...u }, { slots: d }) => {
|
|
2058
|
+
let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } = ei(), _ = O(() => {
|
|
2059
|
+
let e = qr(r) || qr(i) || r === !0 || i === !0 || h === !0, t = o || s || m || Qr["stroke-width"];
|
|
2060
|
+
return e ? Number(t) * 24 / Number(c ?? f ?? Qr.width) : t;
|
|
2056
2061
|
});
|
|
2057
2062
|
return a("svg", {
|
|
2058
|
-
...
|
|
2063
|
+
...Qr,
|
|
2059
2064
|
...u,
|
|
2060
|
-
width: c ?? f ??
|
|
2061
|
-
height: c ?? f ??
|
|
2062
|
-
stroke: l ?? p ??
|
|
2065
|
+
width: c ?? f ?? Qr.width,
|
|
2066
|
+
height: c ?? f ?? Qr.height,
|
|
2067
|
+
stroke: l ?? p ?? Qr.stroke,
|
|
2063
2068
|
"stroke-width": _.value,
|
|
2064
|
-
class:
|
|
2069
|
+
class: Jr("lucide", g, ...e ? [`lucide-${Yr(Zr(e))}-icon`, `lucide-${Yr(e)}`] : ["lucide-icon"])
|
|
2065
2070
|
}, [...(t ?? n ?? []).map((e) => a(...e)), ...d.default ? [d.default()] : []]);
|
|
2066
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
2071
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(ti, {
|
|
2067
2072
|
...i,
|
|
2068
2073
|
...n,
|
|
2069
2074
|
iconNode: t,
|
|
2070
2075
|
name: e
|
|
2071
|
-
}, r.default ? { default: r.default } : void 0),
|
|
2076
|
+
}, r.default ? { default: r.default } : void 0), ni = X("bookmark", [["path", {
|
|
2072
2077
|
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",
|
|
2073
2078
|
key: "oz39mx"
|
|
2074
|
-
}]]),
|
|
2079
|
+
}]]), ri = X("box", [
|
|
2075
2080
|
["path", {
|
|
2076
2081
|
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",
|
|
2077
2082
|
key: "hh9hay"
|
|
@@ -2084,22 +2089,22 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2084
2089
|
d: "M12 22V12",
|
|
2085
2090
|
key: "d0xqtd"
|
|
2086
2091
|
}]
|
|
2087
|
-
]),
|
|
2092
|
+
]), ii = X("check", [["path", {
|
|
2088
2093
|
d: "M20 6 9 17l-5-5",
|
|
2089
2094
|
key: "1gmf2c"
|
|
2090
|
-
}]]),
|
|
2095
|
+
}]]), ai = X("chevron-down", [["path", {
|
|
2091
2096
|
d: "m6 9 6 6 6-6",
|
|
2092
2097
|
key: "qrunsl"
|
|
2093
|
-
}]]),
|
|
2098
|
+
}]]), oi = X("chevron-left", [["path", {
|
|
2094
2099
|
d: "m15 18-6-6 6-6",
|
|
2095
2100
|
key: "1wnfg3"
|
|
2096
|
-
}]]),
|
|
2101
|
+
}]]), si = X("chevron-right", [["path", {
|
|
2097
2102
|
d: "m9 18 6-6-6-6",
|
|
2098
2103
|
key: "mthhwq"
|
|
2099
|
-
}]]),
|
|
2104
|
+
}]]), ci = X("chevron-up", [["path", {
|
|
2100
2105
|
d: "m18 15-6-6-6 6",
|
|
2101
2106
|
key: "153udz"
|
|
2102
|
-
}]]),
|
|
2107
|
+
}]]), li = X("circle-alert", [
|
|
2103
2108
|
["circle", {
|
|
2104
2109
|
cx: "12",
|
|
2105
2110
|
cy: "12",
|
|
@@ -2120,7 +2125,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2120
2125
|
y2: "16",
|
|
2121
2126
|
key: "4dfq90"
|
|
2122
2127
|
}]
|
|
2123
|
-
]),
|
|
2128
|
+
]), ui = X("circle-check", [["circle", {
|
|
2124
2129
|
cx: "12",
|
|
2125
2130
|
cy: "12",
|
|
2126
2131
|
r: "10",
|
|
@@ -2128,7 +2133,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2128
2133
|
}], ["path", {
|
|
2129
2134
|
d: "m9 12 2 2 4-4",
|
|
2130
2135
|
key: "dzmm74"
|
|
2131
|
-
}]]),
|
|
2136
|
+
}]]), di = X("clock", [["circle", {
|
|
2132
2137
|
cx: "12",
|
|
2133
2138
|
cy: "12",
|
|
2134
2139
|
r: "10",
|
|
@@ -2136,13 +2141,13 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2136
2141
|
}], ["path", {
|
|
2137
2142
|
d: "M12 6v6l4 2",
|
|
2138
2143
|
key: "mmk7yg"
|
|
2139
|
-
}]]),
|
|
2144
|
+
}]]), fi = X("code", [["path", {
|
|
2140
2145
|
d: "m16 18 6-6-6-6",
|
|
2141
2146
|
key: "eg8j8"
|
|
2142
2147
|
}], ["path", {
|
|
2143
2148
|
d: "m8 6-6 6 6 6",
|
|
2144
2149
|
key: "ppft3o"
|
|
2145
|
-
}]]),
|
|
2150
|
+
}]]), pi = X("copy", [["rect", {
|
|
2146
2151
|
width: "14",
|
|
2147
2152
|
height: "14",
|
|
2148
2153
|
x: "8",
|
|
@@ -2153,7 +2158,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2153
2158
|
}], ["path", {
|
|
2154
2159
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
2155
2160
|
key: "zix9uf"
|
|
2156
|
-
}]]),
|
|
2161
|
+
}]]), mi = X("eye-off", [
|
|
2157
2162
|
["path", {
|
|
2158
2163
|
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",
|
|
2159
2164
|
key: "ct8e1f"
|
|
@@ -2170,7 +2175,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2170
2175
|
d: "m2 2 20 20",
|
|
2171
2176
|
key: "1ooewy"
|
|
2172
2177
|
}]
|
|
2173
|
-
]),
|
|
2178
|
+
]), hi = X("eye", [["path", {
|
|
2174
2179
|
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",
|
|
2175
2180
|
key: "1nclc0"
|
|
2176
2181
|
}], ["circle", {
|
|
@@ -2178,7 +2183,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2178
2183
|
cy: "12",
|
|
2179
2184
|
r: "3",
|
|
2180
2185
|
key: "1v7zrd"
|
|
2181
|
-
}]]),
|
|
2186
|
+
}]]), gi = X("file-image", [
|
|
2182
2187
|
["path", {
|
|
2183
2188
|
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",
|
|
2184
2189
|
key: "1oefj6"
|
|
@@ -2197,7 +2202,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2197
2202
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
2198
2203
|
key: "wt3hpn"
|
|
2199
2204
|
}]
|
|
2200
|
-
]),
|
|
2205
|
+
]), _i = X("file-text", [
|
|
2201
2206
|
["path", {
|
|
2202
2207
|
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",
|
|
2203
2208
|
key: "1oefj6"
|
|
@@ -2218,10 +2223,10 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2218
2223
|
d: "M16 17H8",
|
|
2219
2224
|
key: "z1uh3a"
|
|
2220
2225
|
}]
|
|
2221
|
-
]),
|
|
2226
|
+
]), vi = X("funnel", [["path", {
|
|
2222
2227
|
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",
|
|
2223
2228
|
key: "sc7q7i"
|
|
2224
|
-
}]]),
|
|
2229
|
+
}]]), yi = X("grip-vertical", [
|
|
2225
2230
|
["circle", {
|
|
2226
2231
|
cx: "9",
|
|
2227
2232
|
cy: "12",
|
|
@@ -2258,7 +2263,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2258
2263
|
r: "1",
|
|
2259
2264
|
key: "f4zoj3"
|
|
2260
2265
|
}]
|
|
2261
|
-
]),
|
|
2266
|
+
]), bi = X("image-up", [
|
|
2262
2267
|
["path", {
|
|
2263
2268
|
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",
|
|
2264
2269
|
key: "9csbqa"
|
|
@@ -2277,7 +2282,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2277
2282
|
r: "2",
|
|
2278
2283
|
key: "af1f0g"
|
|
2279
2284
|
}]
|
|
2280
|
-
]),
|
|
2285
|
+
]), xi = X("image", [
|
|
2281
2286
|
["rect", {
|
|
2282
2287
|
width: "18",
|
|
2283
2288
|
height: "18",
|
|
@@ -2297,7 +2302,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2297
2302
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2298
2303
|
key: "1xmnt7"
|
|
2299
2304
|
}]
|
|
2300
|
-
]),
|
|
2305
|
+
]), Si = X("info", [
|
|
2301
2306
|
["circle", {
|
|
2302
2307
|
cx: "12",
|
|
2303
2308
|
cy: "12",
|
|
@@ -2312,31 +2317,31 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2312
2317
|
d: "M12 8h.01",
|
|
2313
2318
|
key: "e9boi3"
|
|
2314
2319
|
}]
|
|
2315
|
-
]),
|
|
2320
|
+
]), Ci = X("loader-circle", [["path", {
|
|
2316
2321
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2317
2322
|
key: "13zald"
|
|
2318
|
-
}]]),
|
|
2323
|
+
}]]), wi = X("message-circle", [["path", {
|
|
2319
2324
|
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",
|
|
2320
2325
|
key: "1sd12s"
|
|
2321
|
-
}]]),
|
|
2326
|
+
}]]), Ti = X("navigation", [["polygon", {
|
|
2322
2327
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2323
2328
|
key: "1ltx0t"
|
|
2324
|
-
}]]),
|
|
2329
|
+
}]]), Ei = X("pencil", [["path", {
|
|
2325
2330
|
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",
|
|
2326
2331
|
key: "1a8usu"
|
|
2327
2332
|
}], ["path", {
|
|
2328
2333
|
d: "m15 5 4 4",
|
|
2329
2334
|
key: "1mk7zo"
|
|
2330
|
-
}]]),
|
|
2335
|
+
}]]), Di = X("puzzle", [["path", {
|
|
2331
2336
|
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",
|
|
2332
2337
|
key: "w46dr5"
|
|
2333
|
-
}]]),
|
|
2338
|
+
}]]), Oi = X("redo-2", [["path", {
|
|
2334
2339
|
d: "m15 14 5-5-5-5",
|
|
2335
2340
|
key: "12vg1m"
|
|
2336
2341
|
}], ["path", {
|
|
2337
2342
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2338
2343
|
key: "6uklza"
|
|
2339
|
-
}]]),
|
|
2344
|
+
}]]), ki = X("refresh-cw", [
|
|
2340
2345
|
["path", {
|
|
2341
2346
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2342
2347
|
key: "v9h5vc"
|
|
@@ -2353,19 +2358,19 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2353
2358
|
d: "M8 16H3v5",
|
|
2354
2359
|
key: "1cv678"
|
|
2355
2360
|
}]
|
|
2356
|
-
]),
|
|
2361
|
+
]), Ai = X("reply", [["path", {
|
|
2357
2362
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2358
2363
|
key: "5vmcpk"
|
|
2359
2364
|
}], ["path", {
|
|
2360
2365
|
d: "m9 17-5-5 5-5",
|
|
2361
2366
|
key: "nvlc11"
|
|
2362
|
-
}]]),
|
|
2367
|
+
}]]), ji = X("send", [["path", {
|
|
2363
2368
|
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",
|
|
2364
2369
|
key: "1ffxy3"
|
|
2365
2370
|
}], ["path", {
|
|
2366
2371
|
d: "m21.854 2.147-10.94 10.939",
|
|
2367
2372
|
key: "12cjpa"
|
|
2368
|
-
}]]),
|
|
2373
|
+
}]]), Mi = X("share-2", [
|
|
2369
2374
|
["circle", {
|
|
2370
2375
|
cx: "18",
|
|
2371
2376
|
cy: "5",
|
|
@@ -2398,13 +2403,13 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2398
2403
|
y2: "10.49",
|
|
2399
2404
|
key: "1n3mei"
|
|
2400
2405
|
}]
|
|
2401
|
-
]),
|
|
2406
|
+
]), Ni = X("shield-check", [["path", {
|
|
2402
2407
|
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",
|
|
2403
2408
|
key: "oel41y"
|
|
2404
2409
|
}], ["path", {
|
|
2405
2410
|
d: "m9 12 2 2 4-4",
|
|
2406
2411
|
key: "dzmm74"
|
|
2407
|
-
}]]),
|
|
2412
|
+
}]]), Pi = X("shield-x", [
|
|
2408
2413
|
["path", {
|
|
2409
2414
|
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",
|
|
2410
2415
|
key: "oel41y"
|
|
@@ -2417,7 +2422,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2417
2422
|
d: "m9.5 9.5 5 5",
|
|
2418
2423
|
key: "18nt4w"
|
|
2419
2424
|
}]
|
|
2420
|
-
]),
|
|
2425
|
+
]), Fi = X("sparkles", [
|
|
2421
2426
|
["path", {
|
|
2422
2427
|
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",
|
|
2423
2428
|
key: "1s2grr"
|
|
@@ -2436,7 +2441,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2436
2441
|
r: "2",
|
|
2437
2442
|
key: "6kqj1y"
|
|
2438
2443
|
}]
|
|
2439
|
-
]),
|
|
2444
|
+
]), Ii = X("table", [
|
|
2440
2445
|
["path", {
|
|
2441
2446
|
d: "M12 3v18",
|
|
2442
2447
|
key: "108xh3"
|
|
@@ -2457,7 +2462,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2457
2462
|
d: "M3 15h18",
|
|
2458
2463
|
key: "5xshup"
|
|
2459
2464
|
}]
|
|
2460
|
-
]),
|
|
2465
|
+
]), Li = X("trash-2", [
|
|
2461
2466
|
["path", {
|
|
2462
2467
|
d: "M10 11v6",
|
|
2463
2468
|
key: "nco0om"
|
|
@@ -2478,7 +2483,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2478
2483
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2479
2484
|
key: "e791ji"
|
|
2480
2485
|
}]
|
|
2481
|
-
]),
|
|
2486
|
+
]), Ri = X("triangle-alert", [
|
|
2482
2487
|
["path", {
|
|
2483
2488
|
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",
|
|
2484
2489
|
key: "wmoenq"
|
|
@@ -2491,13 +2496,13 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2491
2496
|
d: "M12 17h.01",
|
|
2492
2497
|
key: "p32p05"
|
|
2493
2498
|
}]
|
|
2494
|
-
]),
|
|
2499
|
+
]), zi = X("undo-2", [["path", {
|
|
2495
2500
|
d: "M9 14 4 9l5-5",
|
|
2496
2501
|
key: "102s5s"
|
|
2497
2502
|
}], ["path", {
|
|
2498
2503
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2499
2504
|
key: "f3b9sd"
|
|
2500
|
-
}]]),
|
|
2505
|
+
}]]), Bi = X("upload", [
|
|
2501
2506
|
["path", {
|
|
2502
2507
|
d: "M12 3v12",
|
|
2503
2508
|
key: "1x0j5s"
|
|
@@ -2510,7 +2515,7 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2510
2515
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2511
2516
|
key: "ih7n3h"
|
|
2512
2517
|
}]
|
|
2513
|
-
]),
|
|
2518
|
+
]), Vi = X("video", [["path", {
|
|
2514
2519
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2515
2520
|
key: "ftymec"
|
|
2516
2521
|
}], ["rect", {
|
|
@@ -2520,20 +2525,20 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2520
2525
|
height: "12",
|
|
2521
2526
|
rx: "2",
|
|
2522
2527
|
key: "158x01"
|
|
2523
|
-
}]]),
|
|
2528
|
+
}]]), Hi = X("x", [["path", {
|
|
2524
2529
|
d: "M18 6 6 18",
|
|
2525
2530
|
key: "1bl5f8"
|
|
2526
2531
|
}], ["path", {
|
|
2527
2532
|
d: "m6 6 12 12",
|
|
2528
2533
|
key: "d8bk6v"
|
|
2529
|
-
}]]),
|
|
2534
|
+
}]]), Ui = X("zap", [["path", {
|
|
2530
2535
|
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",
|
|
2531
2536
|
key: "1xq2db"
|
|
2532
|
-
}]]),
|
|
2537
|
+
}]]), Wi = ["innerHTML"], Gi = [
|
|
2533
2538
|
"src",
|
|
2534
2539
|
"width",
|
|
2535
2540
|
"height"
|
|
2536
|
-
],
|
|
2541
|
+
], Ki = /* @__PURE__ */ B({
|
|
2537
2542
|
__name: "CustomBlockIcon",
|
|
2538
2543
|
props: {
|
|
2539
2544
|
icon: {},
|
|
@@ -2549,40 +2554,40 @@ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absol
|
|
|
2549
2554
|
height: `${n.value}px`
|
|
2550
2555
|
}),
|
|
2551
2556
|
innerHTML: e.icon
|
|
2552
|
-
}, null, 12,
|
|
2557
|
+
}, null, 12, Wi)) : i.value ? (f(), k("img", {
|
|
2553
2558
|
key: 1,
|
|
2554
2559
|
src: e.icon,
|
|
2555
2560
|
width: n.value,
|
|
2556
2561
|
height: n.value,
|
|
2557
2562
|
class: "tpl:inline-block",
|
|
2558
2563
|
alt: ""
|
|
2559
|
-
}, null, 8,
|
|
2564
|
+
}, null, 8, Gi)) : (f(), N(j(ri), {
|
|
2560
2565
|
key: 2,
|
|
2561
2566
|
size: n.value,
|
|
2562
2567
|
"stroke-width": 1.5
|
|
2563
2568
|
}, null, 8, ["size"]));
|
|
2564
2569
|
}
|
|
2565
|
-
}),
|
|
2570
|
+
}), qi = (e, t) => {
|
|
2566
2571
|
let n = e.__vccOpts || e;
|
|
2567
2572
|
for (let [e, r] of t) n[e] = r;
|
|
2568
2573
|
return n;
|
|
2569
|
-
},
|
|
2570
|
-
function
|
|
2571
|
-
return f(), k("div",
|
|
2574
|
+
}, Ji = {}, Yi = { class: "tpl-loading-track" };
|
|
2575
|
+
function Xi(e, t) {
|
|
2576
|
+
return f(), k("div", Yi);
|
|
2572
2577
|
}
|
|
2573
|
-
var
|
|
2578
|
+
var Zi = /*#__PURE__*/ qi(Ji, [["render", Xi], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2574
2579
|
//#endregion
|
|
2575
2580
|
//#region src/composables/useEditorRoot.ts
|
|
2576
|
-
function
|
|
2577
|
-
return v(
|
|
2581
|
+
function Qi() {
|
|
2582
|
+
return v(pr, document) ?? document;
|
|
2578
2583
|
}
|
|
2579
2584
|
//#endregion
|
|
2580
2585
|
//#region src/composables/useFocusTrap.ts
|
|
2581
|
-
var
|
|
2582
|
-
function
|
|
2583
|
-
let n =
|
|
2586
|
+
var $i = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2587
|
+
function ea(e, t) {
|
|
2588
|
+
let n = Qi(), r = null, i = null, a = null;
|
|
2584
2589
|
function o() {
|
|
2585
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2590
|
+
return e.value ? Array.from(e.value.querySelectorAll($i)).filter((e) => e.offsetParent !== null) : [];
|
|
2586
2591
|
}
|
|
2587
2592
|
function s(e) {
|
|
2588
2593
|
if (e.key !== "Tab") return;
|
|
@@ -2612,18 +2617,18 @@ function Qi(e, t) {
|
|
|
2612
2617
|
}
|
|
2613
2618
|
//#endregion
|
|
2614
2619
|
//#region src/composables/useCloudI18n.ts
|
|
2615
|
-
function
|
|
2620
|
+
function ta(e, t) {
|
|
2616
2621
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2617
2622
|
}
|
|
2618
|
-
function
|
|
2619
|
-
let t = e ?? v(
|
|
2623
|
+
function na(e) {
|
|
2624
|
+
let t = e ?? v(br, null);
|
|
2620
2625
|
return {
|
|
2621
2626
|
t: t ? u(t) ? t.value : t : null,
|
|
2622
|
-
format:
|
|
2627
|
+
format: ta
|
|
2623
2628
|
};
|
|
2624
2629
|
}
|
|
2625
|
-
function
|
|
2626
|
-
let { t, format: n } =
|
|
2630
|
+
function ra(e) {
|
|
2631
|
+
let { t, format: n } = na(e);
|
|
2627
2632
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2628
2633
|
return {
|
|
2629
2634
|
t,
|
|
@@ -2632,8 +2637,8 @@ function ta(e) {
|
|
|
2632
2637
|
}
|
|
2633
2638
|
//#endregion
|
|
2634
2639
|
//#region src/composables/useMergeTag.ts
|
|
2635
|
-
function
|
|
2636
|
-
let e = v(
|
|
2640
|
+
function ia() {
|
|
2641
|
+
let e = v(Qn, []), t = v($n, dt.liquid), n = v(er, null), r = v(tr, !0), i = v(nr, null), a = C(!1);
|
|
2637
2642
|
function o(e) {
|
|
2638
2643
|
return vt(e, t);
|
|
2639
2644
|
}
|
|
@@ -2672,7 +2677,7 @@ function na() {
|
|
|
2672
2677
|
}
|
|
2673
2678
|
//#endregion
|
|
2674
2679
|
//#region src/composables/useEmoji.ts
|
|
2675
|
-
function
|
|
2680
|
+
function aa() {
|
|
2676
2681
|
let [e, t] = dn(!1), r = n([]), i = !1;
|
|
2677
2682
|
l(() => {
|
|
2678
2683
|
i = !0;
|
|
@@ -2698,7 +2703,7 @@ function ra() {
|
|
|
2698
2703
|
}
|
|
2699
2704
|
//#endregion
|
|
2700
2705
|
//#region src/composables/useDragDrop.ts
|
|
2701
|
-
function
|
|
2706
|
+
function oa(e) {
|
|
2702
2707
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2703
2708
|
function o(e) {
|
|
2704
2709
|
r.value = !0, i.value = e;
|
|
@@ -2748,7 +2753,7 @@ function ia(e) {
|
|
|
2748
2753
|
}
|
|
2749
2754
|
//#endregion
|
|
2750
2755
|
//#region src/composables/useFonts.ts
|
|
2751
|
-
var
|
|
2756
|
+
var sa = [
|
|
2752
2757
|
{
|
|
2753
2758
|
value: "Arial",
|
|
2754
2759
|
label: "Arial"
|
|
@@ -2777,7 +2782,7 @@ var aa = [
|
|
|
2777
2782
|
value: "Courier New",
|
|
2778
2783
|
label: "Courier New"
|
|
2779
2784
|
}
|
|
2780
|
-
],
|
|
2785
|
+
], ca = {
|
|
2781
2786
|
arial: "Arial, sans-serif",
|
|
2782
2787
|
helvetica: "Helvetica, sans-serif",
|
|
2783
2788
|
georgia: "Georgia, serif",
|
|
@@ -2785,14 +2790,14 @@ var aa = [
|
|
|
2785
2790
|
verdana: "Verdana, sans-serif",
|
|
2786
2791
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2787
2792
|
"courier new": "'Courier New', monospace"
|
|
2788
|
-
},
|
|
2789
|
-
function
|
|
2790
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ??
|
|
2793
|
+
}, la = "Arial, sans-serif";
|
|
2794
|
+
function ua(e) {
|
|
2795
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? la);
|
|
2791
2796
|
function a(e) {
|
|
2792
2797
|
n.value = e;
|
|
2793
2798
|
}
|
|
2794
2799
|
let o = O(() => {
|
|
2795
|
-
let e = [...
|
|
2800
|
+
let e = [...sa];
|
|
2796
2801
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2797
2802
|
let r = t.value.map((e) => ({
|
|
2798
2803
|
value: e.name,
|
|
@@ -2805,23 +2810,23 @@ function ca(e) {
|
|
|
2805
2810
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2806
2811
|
}
|
|
2807
2812
|
function u(e) {
|
|
2808
|
-
return
|
|
2813
|
+
return sa.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2809
2814
|
}
|
|
2810
2815
|
function d() {
|
|
2811
2816
|
if (e?.defaultFont) {
|
|
2812
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2817
|
+
if (!n.value && !u(e.defaultFont)) return la;
|
|
2813
2818
|
if (c(e.defaultFont)) {
|
|
2814
2819
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2815
2820
|
if (t) return t.value;
|
|
2816
2821
|
}
|
|
2817
2822
|
}
|
|
2818
|
-
return
|
|
2823
|
+
return la;
|
|
2819
2824
|
}
|
|
2820
2825
|
let f = O(() => d());
|
|
2821
2826
|
function p(e) {
|
|
2822
2827
|
if (!e) return i.value;
|
|
2823
2828
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2824
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2829
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : ca[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2825
2830
|
}
|
|
2826
2831
|
let m = [], h = !1;
|
|
2827
2832
|
async function g() {
|
|
@@ -2837,7 +2842,7 @@ function ca(e) {
|
|
|
2837
2842
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2838
2843
|
});
|
|
2839
2844
|
} catch (t) {
|
|
2840
|
-
|
|
2845
|
+
Mr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2841
2846
|
}
|
|
2842
2847
|
});
|
|
2843
2848
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2864,8 +2869,8 @@ function ca(e) {
|
|
|
2864
2869
|
}
|
|
2865
2870
|
//#endregion
|
|
2866
2871
|
//#region src/composables/useLogicTag.ts
|
|
2867
|
-
function
|
|
2868
|
-
let e = v(
|
|
2872
|
+
function da() {
|
|
2873
|
+
let e = v(rr, []), t = v(ir, []), n = v($n, dt.liquid), r = v(or, null), i = v(ar, null), a = C(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
2869
2874
|
async function c() {
|
|
2870
2875
|
if (r) {
|
|
2871
2876
|
a.value = !0;
|
|
@@ -2896,7 +2901,7 @@ function la() {
|
|
|
2896
2901
|
}
|
|
2897
2902
|
//#endregion
|
|
2898
2903
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2899
|
-
function
|
|
2904
|
+
function fa(e, t, n) {
|
|
2900
2905
|
return St(e, n) ? {
|
|
2901
2906
|
type: "logicMergeTagNode",
|
|
2902
2907
|
attrs: {
|
|
@@ -2913,15 +2918,15 @@ function ua(e, t, n) {
|
|
|
2913
2918
|
}
|
|
2914
2919
|
//#endregion
|
|
2915
2920
|
//#region src/utils/insertLogicTag.ts
|
|
2916
|
-
function
|
|
2921
|
+
function pa(e) {
|
|
2917
2922
|
return "before" in e && "after" in e;
|
|
2918
2923
|
}
|
|
2919
|
-
function
|
|
2920
|
-
if (!
|
|
2921
|
-
e.chain().focus().insertContent(
|
|
2924
|
+
function ma(e, t, n) {
|
|
2925
|
+
if (!pa(t)) {
|
|
2926
|
+
e.chain().focus().insertContent(fa(t.value, t.label, n)).run();
|
|
2922
2927
|
return;
|
|
2923
2928
|
}
|
|
2924
|
-
let r =
|
|
2929
|
+
let r = fa(t.before, t.label, n), i = fa(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2925
2930
|
if (a !== o) {
|
|
2926
2931
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2927
2932
|
return;
|
|
@@ -2930,7 +2935,7 @@ function fa(e, t, n) {
|
|
|
2930
2935
|
}
|
|
2931
2936
|
//#endregion
|
|
2932
2937
|
//#region src/utils/color.ts
|
|
2933
|
-
function
|
|
2938
|
+
function ha(e) {
|
|
2934
2939
|
let t = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/i.exec(e.trim());
|
|
2935
2940
|
if (!t) return e;
|
|
2936
2941
|
let n = (e) => Number(e).toString(16).padStart(2, "0");
|
|
@@ -2938,20 +2943,20 @@ function pa(e) {
|
|
|
2938
2943
|
}
|
|
2939
2944
|
//#endregion
|
|
2940
2945
|
//#region src/utils/linkColorExtension.ts
|
|
2941
|
-
function
|
|
2946
|
+
function ga(e) {
|
|
2942
2947
|
if (!e) return null;
|
|
2943
2948
|
let t = e.trim();
|
|
2944
2949
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
2945
2950
|
}
|
|
2946
|
-
function
|
|
2951
|
+
function _a(e) {
|
|
2947
2952
|
return e.extend({ addAttributes() {
|
|
2948
2953
|
return {
|
|
2949
2954
|
...this.parent?.(),
|
|
2950
2955
|
color: {
|
|
2951
2956
|
default: null,
|
|
2952
|
-
parseHTML: (e) =>
|
|
2957
|
+
parseHTML: (e) => ga(ha(e.style.color)),
|
|
2953
2958
|
renderHTML: (e) => {
|
|
2954
|
-
let t =
|
|
2959
|
+
let t = ga(e.color);
|
|
2955
2960
|
return t ? { style: `color: ${t}` } : {};
|
|
2956
2961
|
}
|
|
2957
2962
|
}
|
|
@@ -2960,9 +2965,9 @@ function ha(e) {
|
|
|
2960
2965
|
}
|
|
2961
2966
|
//#endregion
|
|
2962
2967
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2963
|
-
function
|
|
2968
|
+
function va(e) {
|
|
2964
2969
|
let t = C(!1), n = C(""), r = C(""), i = C(null);
|
|
2965
|
-
|
|
2970
|
+
ea(i, t);
|
|
2966
2971
|
function a() {
|
|
2967
2972
|
let i = e.value?.getAttributes("link") ?? {};
|
|
2968
2973
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -2971,7 +2976,7 @@ function ga(e) {
|
|
|
2971
2976
|
if (n.value) {
|
|
2972
2977
|
let t = c(n.value);
|
|
2973
2978
|
if (t !== null) {
|
|
2974
|
-
let n =
|
|
2979
|
+
let n = ga(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2975
2980
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
2976
2981
|
}
|
|
2977
2982
|
}
|
|
@@ -3018,8 +3023,8 @@ function ga(e) {
|
|
|
3018
3023
|
}
|
|
3019
3024
|
//#endregion
|
|
3020
3025
|
//#region src/composables/useRichTextEditor.ts
|
|
3021
|
-
function
|
|
3022
|
-
let t = v(zn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
3026
|
+
function ya(e) {
|
|
3027
|
+
let t = v(zn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = ia(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = da(), p = v(Rn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = mt(s), g = n(null), { showLinkDialog: _, linkUrl: y, linkColor: b, linkDialogRef: x, openLinkDialog: S, insertLink: w, removeLink: ee, closeLinkDialog: T, handleLinkKeydown: E } = va(g), { start: D, stop: te } = un(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), ne = n(null), O = C(!0), k = C(null), A = !1;
|
|
3023
3028
|
async function j() {
|
|
3024
3029
|
k.value = null, O.value = !0;
|
|
3025
3030
|
try {
|
|
@@ -3049,7 +3054,7 @@ function _a(e) {
|
|
|
3049
3054
|
g.value = l, O.value = !1, D();
|
|
3050
3055
|
} catch (t) {
|
|
3051
3056
|
if (A) return;
|
|
3052
|
-
|
|
3057
|
+
Mr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), k.value = t instanceof Error ? t.message : "Failed to load editor", O.value = !1;
|
|
3053
3058
|
}
|
|
3054
3059
|
}
|
|
3055
3060
|
function M() {
|
|
@@ -3079,7 +3084,7 @@ function _a(e) {
|
|
|
3079
3084
|
}
|
|
3080
3085
|
async function ae() {
|
|
3081
3086
|
let e = await f();
|
|
3082
|
-
A || (e && g.value ?
|
|
3087
|
+
A || (e && g.value ? ma(g.value, e, s) : g.value?.commands.focus());
|
|
3083
3088
|
}
|
|
3084
3089
|
return {
|
|
3085
3090
|
editor: g,
|
|
@@ -3108,9 +3113,9 @@ function _a(e) {
|
|
|
3108
3113
|
}
|
|
3109
3114
|
//#endregion
|
|
3110
3115
|
//#region src/composables/useSmallScreenNotice.ts
|
|
3111
|
-
var
|
|
3112
|
-
function
|
|
3113
|
-
let t = wn(
|
|
3116
|
+
var ba = "(max-width: 767px)";
|
|
3117
|
+
function xa(e) {
|
|
3118
|
+
let t = wn(ba);
|
|
3114
3119
|
return {
|
|
3115
3120
|
isSmallScreen: t,
|
|
3116
3121
|
showNotice: O(() => (P(e) ?? !0) && t.value)
|
|
@@ -3118,20 +3123,20 @@ function ya(e) {
|
|
|
3118
3123
|
}
|
|
3119
3124
|
//#endregion
|
|
3120
3125
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3121
|
-
var
|
|
3126
|
+
var Sa = { class: "tpl:w-full" }, Ca = {
|
|
3122
3127
|
key: 0,
|
|
3123
3128
|
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)]"
|
|
3124
|
-
},
|
|
3129
|
+
}, wa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ta = {
|
|
3125
3130
|
key: 1,
|
|
3126
3131
|
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)]"
|
|
3127
|
-
},
|
|
3132
|
+
}, Ea = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Da = {
|
|
3128
3133
|
key: 2,
|
|
3129
3134
|
class: "tpl:relative"
|
|
3130
|
-
},
|
|
3135
|
+
}, Oa = ["innerHTML"], ka = {
|
|
3131
3136
|
key: 0,
|
|
3132
3137
|
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]",
|
|
3133
3138
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
3134
|
-
},
|
|
3139
|
+
}, Aa = /* @__PURE__ */ B({
|
|
3135
3140
|
__name: "CustomBlock",
|
|
3136
3141
|
props: {
|
|
3137
3142
|
block: {},
|
|
@@ -3165,10 +3170,10 @@ var ba = { class: "tpl:w-full" }, xa = {
|
|
|
3165
3170
|
g();
|
|
3166
3171
|
}), H(() => n.block.fieldValues, () => {
|
|
3167
3172
|
_();
|
|
3168
|
-
}, { deep: !0 }), (e, t) => (f(), k("div",
|
|
3173
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", Sa, [u.value ? c.value ? (f(), k("div", Ta, [V(j(Ri), {
|
|
3169
3174
|
size: 24,
|
|
3170
3175
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
3171
|
-
}), I("span",
|
|
3176
|
+
}), I("span", Ea, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Da, [I("div", { innerHTML: s.value }, null, 8, Oa), j(h) && j(m) ? (f(), k("div", ka, [j(d) ? (f(), N(Zi, {
|
|
3172
3177
|
key: 1,
|
|
3173
3178
|
class: "tpl:w-48"
|
|
3174
3179
|
})) : (f(), k("button", {
|
|
@@ -3176,16 +3181,16 @@ var ba = { class: "tpl:w-full" }, xa = {
|
|
|
3176
3181
|
type: "button",
|
|
3177
3182
|
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)]",
|
|
3178
3183
|
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
3179
|
-
}, [l.value?.icon ? (f(), N(
|
|
3184
|
+
}, [l.value?.icon ? (f(), N(Ki, {
|
|
3180
3185
|
key: 0,
|
|
3181
3186
|
icon: l.value.icon,
|
|
3182
3187
|
size: 16
|
|
3183
|
-
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div",
|
|
3188
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", Ca, [V(j(Di), {
|
|
3184
3189
|
size: 24,
|
|
3185
3190
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
3186
|
-
}), I("span",
|
|
3191
|
+
}), I("span", wa, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
3187
3192
|
}
|
|
3188
|
-
}),
|
|
3193
|
+
}), ja = { class: "tpl:w-full" }, Ma = /* @__PURE__ */ B({
|
|
3189
3194
|
__name: "DividerBlock",
|
|
3190
3195
|
props: {
|
|
3191
3196
|
block: {},
|
|
@@ -3197,34 +3202,60 @@ var ba = { class: "tpl:w-full" }, xa = {
|
|
|
3197
3202
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3198
3203
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
3199
3204
|
}));
|
|
3200
|
-
return (e, t) => (f(), k("div",
|
|
3205
|
+
return (e, t) => (f(), k("div", ja, [I("hr", {
|
|
3201
3206
|
class: "tpl:m-0 tpl:border-none",
|
|
3202
3207
|
style: L(n.value)
|
|
3203
3208
|
}, null, 4)]));
|
|
3204
3209
|
}
|
|
3205
|
-
}),
|
|
3210
|
+
}), Na = { class: "tpl:w-full" }, Pa = ["srcdoc", "title"], Fa = {
|
|
3211
|
+
key: 1,
|
|
3212
|
+
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)]"
|
|
3213
|
+
}, Ia = {
|
|
3206
3214
|
key: 0,
|
|
3207
3215
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
3208
|
-
},
|
|
3216
|
+
}, La = {
|
|
3209
3217
|
key: 1,
|
|
3210
3218
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
3211
|
-
},
|
|
3219
|
+
}, Ra = /* @__PURE__ */ B({
|
|
3212
3220
|
__name: "HtmlBlock",
|
|
3213
3221
|
props: {
|
|
3214
3222
|
block: {},
|
|
3215
3223
|
viewport: {}
|
|
3216
3224
|
},
|
|
3217
3225
|
setup(e) {
|
|
3218
|
-
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
3219
|
-
|
|
3226
|
+
let t = e, { t: n } = Y(), r = v(Xn, !1), i = O(() => t.block.content.trim().length > 0), a = O(() => r && i.value), o = C(null), s = C(60), c = null;
|
|
3227
|
+
function l() {
|
|
3228
|
+
let e = o.value?.contentDocument;
|
|
3229
|
+
e && (s.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
3230
|
+
}
|
|
3231
|
+
function u() {
|
|
3232
|
+
c?.disconnect(), c = null, l();
|
|
3233
|
+
let e = o.value?.contentDocument?.documentElement;
|
|
3234
|
+
e && typeof ResizeObserver < "u" && (c = new ResizeObserver(() => l()), c.observe(e));
|
|
3235
|
+
}
|
|
3236
|
+
return H(a, (e) => {
|
|
3237
|
+
e || (c?.disconnect(), c = null);
|
|
3238
|
+
}), re(() => {
|
|
3239
|
+
c?.disconnect(), c = null;
|
|
3240
|
+
}), (t, r) => (f(), k("div", Na, [a.value ? (f(), k("iframe", {
|
|
3241
|
+
key: 0,
|
|
3242
|
+
ref_key: "iframeRef",
|
|
3243
|
+
ref: o,
|
|
3244
|
+
srcdoc: e.block.content,
|
|
3245
|
+
sandbox: "allow-same-origin",
|
|
3246
|
+
title: j(n).html.preview,
|
|
3247
|
+
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3248
|
+
style: L({ height: `${s.value}px` }),
|
|
3249
|
+
onLoad: u
|
|
3250
|
+
}, null, 44, Pa)) : (f(), k("div", Fa, [V(j(fi), {
|
|
3220
3251
|
size: 24,
|
|
3221
3252
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
3222
|
-
}),
|
|
3253
|
+
}), i.value ? (f(), k("span", Ia, D(j(n).html.preview), 1)) : (f(), k("span", La, D(j(n).html.empty), 1))]))]));
|
|
3223
3254
|
}
|
|
3224
3255
|
});
|
|
3225
3256
|
//#endregion
|
|
3226
3257
|
//#region src/composables/useAliveFlag.ts
|
|
3227
|
-
function
|
|
3258
|
+
function za() {
|
|
3228
3259
|
let e = { alive: !0 };
|
|
3229
3260
|
return re(() => {
|
|
3230
3261
|
e.alive = !1;
|
|
@@ -3232,13 +3263,13 @@ function Ia() {
|
|
|
3232
3263
|
}
|
|
3233
3264
|
//#endregion
|
|
3234
3265
|
//#region src/composables/useImageDrop.ts
|
|
3235
|
-
var
|
|
3236
|
-
function
|
|
3266
|
+
var Ba = "image/";
|
|
3267
|
+
function Va(e) {
|
|
3237
3268
|
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = Dn(t, {
|
|
3238
3269
|
preventDefaultForUnhandled: !0,
|
|
3239
3270
|
onDrop: (e) => {
|
|
3240
3271
|
if (!i()) return;
|
|
3241
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
3272
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Ba));
|
|
3242
3273
|
t.length > 0 && n([t[0]]);
|
|
3243
3274
|
}
|
|
3244
3275
|
});
|
|
@@ -3246,17 +3277,17 @@ function Ra(e) {
|
|
|
3246
3277
|
}
|
|
3247
3278
|
//#endregion
|
|
3248
3279
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3249
|
-
var
|
|
3280
|
+
var Ha = {
|
|
3250
3281
|
key: 0,
|
|
3251
3282
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
3252
3283
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
3253
|
-
},
|
|
3284
|
+
}, Ua = ["href"], Wa = ["src", "alt"], Ga = ["src", "alt"], Ka = {
|
|
3254
3285
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3255
3286
|
style: { opacity: "0.7" }
|
|
3256
|
-
},
|
|
3287
|
+
}, qa = ["href"], Ja = ["src", "alt"], Ya = ["src", "alt"], Xa = {
|
|
3257
3288
|
key: 4,
|
|
3258
3289
|
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)]"
|
|
3259
|
-
},
|
|
3290
|
+
}, Za = ["aria-label"], Qa = { key: 1 }, $a = /* @__PURE__ */ B({
|
|
3260
3291
|
__name: "ImageBlock",
|
|
3261
3292
|
props: {
|
|
3262
3293
|
block: {},
|
|
@@ -3264,7 +3295,7 @@ var za = {
|
|
|
3264
3295
|
},
|
|
3265
3296
|
emits: ["update"],
|
|
3266
3297
|
setup(e, { emit: t }) {
|
|
3267
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
3298
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = ia(), o = v(sr, null), s = O(() => !!o), c = za();
|
|
3268
3299
|
async function l() {
|
|
3269
3300
|
let e = await o?.({ accept: ["images"] });
|
|
3270
3301
|
if (c.alive && e) {
|
|
@@ -3291,7 +3322,7 @@ var za = {
|
|
|
3291
3322
|
}
|
|
3292
3323
|
}
|
|
3293
3324
|
}
|
|
3294
|
-
let { isOver: h } =
|
|
3325
|
+
let { isOver: h } = Va({
|
|
3295
3326
|
target: u,
|
|
3296
3327
|
enabled: p,
|
|
3297
3328
|
onFiles: m
|
|
@@ -3311,11 +3342,11 @@ var za = {
|
|
|
3311
3342
|
"data-testid": "image-drop-zone",
|
|
3312
3343
|
class: "tpl:relative tpl:w-full",
|
|
3313
3344
|
style: L(g.value)
|
|
3314
|
-
}, [p.value && (j(h) || d.value) ? (f(), k("div",
|
|
3345
|
+
}, [p.value && (j(h) || d.value) ? (f(), k("div", Ha, [d.value ? (f(), k(R, { key: 0 }, [V(j(Ci), {
|
|
3315
3346
|
class: "tpl-spinner",
|
|
3316
3347
|
size: 20,
|
|
3317
3348
|
"stroke-width": 2
|
|
3318
|
-
}), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(
|
|
3349
|
+
}), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Bi), {
|
|
3319
3350
|
size: 20,
|
|
3320
3351
|
"stroke-width": 1.5
|
|
3321
3352
|
}), z(" " + D(j(i).image.dropToUpload), 1)], 64))])) : A("", !0), e.block.src && y.value && e.block.placeholderUrl ? (f(), k(R, { key: 1 }, [e.block.linkUrl ? (f(), k("a", {
|
|
@@ -3330,22 +3361,22 @@ var za = {
|
|
|
3330
3361
|
src: e.block.placeholderUrl,
|
|
3331
3362
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3332
3363
|
style: L(_.value)
|
|
3333
|
-
}, null, 12,
|
|
3364
|
+
}, null, 12, Wa)], 8, Ua)) : (f(), k("img", {
|
|
3334
3365
|
key: 1,
|
|
3335
3366
|
class: "tpl:border-0",
|
|
3336
3367
|
src: e.block.placeholderUrl,
|
|
3337
3368
|
alt: e.block.alt,
|
|
3338
3369
|
style: L(_.value)
|
|
3339
|
-
}, null, 12,
|
|
3370
|
+
}, null, 12, Ga))], 64)) : e.block.src && y.value ? (f(), k("div", {
|
|
3340
3371
|
key: 2,
|
|
3341
3372
|
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)]",
|
|
3342
3373
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
3343
|
-
}, [V(j(
|
|
3374
|
+
}, [V(j(xi), {
|
|
3344
3375
|
size: 32,
|
|
3345
3376
|
"stroke-width": 1.5,
|
|
3346
3377
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3347
3378
|
style: { opacity: "0.5" }
|
|
3348
|
-
}), I("span",
|
|
3379
|
+
}), I("span", Ka, [V(Ur, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3349
3380
|
key: 0,
|
|
3350
3381
|
href: e.block.linkUrl,
|
|
3351
3382
|
target: "_blank",
|
|
@@ -3357,26 +3388,26 @@ var za = {
|
|
|
3357
3388
|
src: e.block.src,
|
|
3358
3389
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3359
3390
|
style: L(_.value)
|
|
3360
|
-
}, null, 12,
|
|
3391
|
+
}, null, 12, Ja)], 8, qa)) : (f(), k("img", {
|
|
3361
3392
|
key: 1,
|
|
3362
3393
|
class: "tpl:border-0",
|
|
3363
3394
|
src: e.block.src,
|
|
3364
3395
|
alt: e.block.alt,
|
|
3365
3396
|
style: L(_.value)
|
|
3366
|
-
}, null, 12,
|
|
3397
|
+
}, null, 12, Ya))], 64)) : (f(), k("div", Xa, [s.value ? (f(), k("button", {
|
|
3367
3398
|
key: 0,
|
|
3368
3399
|
"aria-label": j(i).image.browseMedia,
|
|
3369
3400
|
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)]",
|
|
3370
3401
|
onClick: M(l, ["stop"])
|
|
3371
|
-
}, [V(j(
|
|
3402
|
+
}, [V(j(xi), {
|
|
3372
3403
|
size: 14,
|
|
3373
3404
|
"stroke-width": 1.5
|
|
3374
|
-
}), z(" " + D(j(i).image.browseMedia), 1)], 8,
|
|
3405
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, Za)) : (f(), k("span", Qa, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3375
3406
|
}
|
|
3376
|
-
}),
|
|
3407
|
+
}), eo = { class: "tpl:w-full" }, to = ["href"], no = {
|
|
3377
3408
|
key: 1,
|
|
3378
3409
|
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)]"
|
|
3379
|
-
},
|
|
3410
|
+
}, ro = /* @__PURE__ */ B({
|
|
3380
3411
|
__name: "MenuBlock",
|
|
3381
3412
|
props: {
|
|
3382
3413
|
block: {},
|
|
@@ -3395,7 +3426,7 @@ var za = {
|
|
|
3395
3426
|
function a(e) {
|
|
3396
3427
|
return e || t.block.linkColor || t.block.color;
|
|
3397
3428
|
}
|
|
3398
|
-
return (t, o) => (f(), k("div",
|
|
3429
|
+
return (t, o) => (f(), k("div", eo, [i.value ? (f(), k("div", {
|
|
3399
3430
|
key: 0,
|
|
3400
3431
|
style: L(r.value)
|
|
3401
3432
|
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
@@ -3407,15 +3438,39 @@ var za = {
|
|
|
3407
3438
|
textDecoration: t.underline ? "underline" : "none"
|
|
3408
3439
|
}),
|
|
3409
3440
|
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3410
|
-
}, [V(
|
|
3441
|
+
}, [V(Ur, { text: t.text || "..." }, null, 8, ["text"])], 12, to), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3411
3442
|
key: 0,
|
|
3412
3443
|
style: L({
|
|
3413
3444
|
color: e.block.separatorColor,
|
|
3414
3445
|
padding: `0 ${e.block.spacing}px`
|
|
3415
3446
|
})
|
|
3416
|
-
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div",
|
|
3447
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", no, [V(j(Ti), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3417
3448
|
}
|
|
3418
|
-
})
|
|
3449
|
+
});
|
|
3450
|
+
//#endregion
|
|
3451
|
+
//#region src/composables/usePopoverRoot.ts
|
|
3452
|
+
function io() {
|
|
3453
|
+
return v(mr, C(null));
|
|
3454
|
+
}
|
|
3455
|
+
//#endregion
|
|
3456
|
+
//#region src/composables/usePopoverPosition.ts
|
|
3457
|
+
function ao() {
|
|
3458
|
+
let e = io();
|
|
3459
|
+
function t(t) {
|
|
3460
|
+
let n = e.value?.getBoundingClientRect();
|
|
3461
|
+
return n ? {
|
|
3462
|
+
top: t.top - n.top,
|
|
3463
|
+
left: t.left - n.left
|
|
3464
|
+
} : {
|
|
3465
|
+
top: t.top,
|
|
3466
|
+
left: t.left
|
|
3467
|
+
};
|
|
3468
|
+
}
|
|
3469
|
+
return { toLocal: t };
|
|
3470
|
+
}
|
|
3471
|
+
//#endregion
|
|
3472
|
+
//#region src/utils/sanitizeRichTextHtml.ts
|
|
3473
|
+
var oo = /* @__PURE__ */ new Set([
|
|
3419
3474
|
"http",
|
|
3420
3475
|
"https",
|
|
3421
3476
|
"mailto",
|
|
@@ -3425,7 +3480,7 @@ var za = {
|
|
|
3425
3480
|
"sms",
|
|
3426
3481
|
"xmpp",
|
|
3427
3482
|
"cid"
|
|
3428
|
-
]),
|
|
3483
|
+
]), so = /* @__PURE__ */ new Set([
|
|
3429
3484
|
"SCRIPT",
|
|
3430
3485
|
"STYLE",
|
|
3431
3486
|
"IFRAME",
|
|
@@ -3435,7 +3490,7 @@ var za = {
|
|
|
3435
3490
|
"META",
|
|
3436
3491
|
"BASE",
|
|
3437
3492
|
"FORM"
|
|
3438
|
-
]),
|
|
3493
|
+
]), co = /* @__PURE__ */ new Set([
|
|
3439
3494
|
"href",
|
|
3440
3495
|
"xlink:href",
|
|
3441
3496
|
"formaction",
|
|
@@ -3444,16 +3499,16 @@ var za = {
|
|
|
3444
3499
|
"background",
|
|
3445
3500
|
"poster"
|
|
3446
3501
|
]);
|
|
3447
|
-
function
|
|
3502
|
+
function lo(e, t) {
|
|
3448
3503
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3449
3504
|
if (!n || n.startsWith("#")) return !0;
|
|
3450
3505
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3451
3506
|
if (!r) return !0;
|
|
3452
3507
|
let i = r[1].toLowerCase();
|
|
3453
|
-
return
|
|
3508
|
+
return oo.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3454
3509
|
}
|
|
3455
|
-
function
|
|
3456
|
-
if (
|
|
3510
|
+
function uo(e) {
|
|
3511
|
+
if (so.has(e.tagName)) {
|
|
3457
3512
|
e.remove();
|
|
3458
3513
|
return;
|
|
3459
3514
|
}
|
|
@@ -3465,57 +3520,57 @@ function ao(e) {
|
|
|
3465
3520
|
e.removeAttribute(n);
|
|
3466
3521
|
continue;
|
|
3467
3522
|
}
|
|
3468
|
-
if (
|
|
3469
|
-
|
|
3523
|
+
if (co.has(t)) {
|
|
3524
|
+
lo(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3470
3525
|
continue;
|
|
3471
3526
|
}
|
|
3472
3527
|
if (t === "src") {
|
|
3473
|
-
|
|
3528
|
+
lo(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3474
3529
|
continue;
|
|
3475
3530
|
}
|
|
3476
3531
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3477
3532
|
}
|
|
3478
3533
|
let n = Array.from(e.children);
|
|
3479
|
-
for (let e of n)
|
|
3534
|
+
for (let e of n) uo(e);
|
|
3480
3535
|
}
|
|
3481
|
-
function
|
|
3536
|
+
function fo(e) {
|
|
3482
3537
|
if (typeof DOMParser > "u") return e;
|
|
3483
3538
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3484
|
-
for (let e of n)
|
|
3539
|
+
for (let e of n) uo(e);
|
|
3485
3540
|
return t.innerHTML;
|
|
3486
3541
|
}
|
|
3487
3542
|
//#endregion
|
|
3488
3543
|
//#region src/composables/useEditableTextBlock.ts
|
|
3489
|
-
function
|
|
3490
|
-
let t = v(
|
|
3544
|
+
function po(e) {
|
|
3545
|
+
let t = v(Qn, []), { syntax: n } = ia(), r = O(() => fo(wt(bt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = kn(a), { toLocal: c } = ao(), l = O(() => c({
|
|
3491
3546
|
top: o.value - 8,
|
|
3492
3547
|
left: s.value
|
|
3493
3548
|
}));
|
|
3494
|
-
function
|
|
3549
|
+
function u() {
|
|
3495
3550
|
i.value = !0;
|
|
3496
3551
|
}
|
|
3497
|
-
function
|
|
3552
|
+
function d() {
|
|
3498
3553
|
i.value = !1;
|
|
3499
3554
|
}
|
|
3500
3555
|
return {
|
|
3501
3556
|
isEditing: i,
|
|
3502
3557
|
blockRef: a,
|
|
3503
|
-
toolbarPosition:
|
|
3558
|
+
toolbarPosition: l,
|
|
3504
3559
|
resolvedContent: r,
|
|
3505
|
-
handleDoubleClick:
|
|
3506
|
-
handleEditorDone:
|
|
3560
|
+
handleDoubleClick: u,
|
|
3561
|
+
handleEditorDone: d
|
|
3507
3562
|
};
|
|
3508
3563
|
}
|
|
3509
3564
|
//#endregion
|
|
3510
3565
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3511
|
-
var
|
|
3566
|
+
var mo = ["innerHTML"], ho = /* @__PURE__ */ B({
|
|
3512
3567
|
__name: "ParagraphBlock",
|
|
3513
3568
|
props: {
|
|
3514
3569
|
block: {},
|
|
3515
3570
|
viewport: {}
|
|
3516
3571
|
},
|
|
3517
3572
|
setup(e) {
|
|
3518
|
-
let t = e, n = T(() => import("./ParagraphEditor-
|
|
3573
|
+
let t = e, n = T(() => import("./ParagraphEditor-BYoZfURd.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = po(() => t.block.content);
|
|
3519
3574
|
return (t, l) => (f(), k("div", {
|
|
3520
3575
|
ref_key: "blockRef",
|
|
3521
3576
|
ref: i,
|
|
@@ -3534,46 +3589,46 @@ var co = ["innerHTML"], lo = /* @__PURE__ */ B({
|
|
|
3534
3589
|
key: 1,
|
|
3535
3590
|
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",
|
|
3536
3591
|
innerHTML: j(o)
|
|
3537
|
-
}, null, 8,
|
|
3592
|
+
}, null, 8, mo))], 544));
|
|
3538
3593
|
}
|
|
3539
3594
|
});
|
|
3540
3595
|
//#endregion
|
|
3541
3596
|
//#region src/utils/blockComponentResolver.ts
|
|
3542
|
-
function
|
|
3597
|
+
function go(e, t, n) {
|
|
3543
3598
|
if (t) {
|
|
3544
3599
|
let n = t.getComponent(e);
|
|
3545
3600
|
if (n) return n;
|
|
3546
3601
|
}
|
|
3547
3602
|
return n[e.type] ?? null;
|
|
3548
3603
|
}
|
|
3549
|
-
function
|
|
3604
|
+
function _o(e) {
|
|
3550
3605
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
3551
3606
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3552
3607
|
backgroundColor: n || "transparent"
|
|
3553
3608
|
};
|
|
3554
3609
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
3555
3610
|
}
|
|
3556
|
-
function
|
|
3611
|
+
function vo(e) {
|
|
3557
3612
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
3558
3613
|
let t = e.wrapper, n = {};
|
|
3559
3614
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
3560
3615
|
}
|
|
3561
3616
|
//#endregion
|
|
3562
3617
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3563
|
-
var
|
|
3618
|
+
var yo = ["data-block-id", "data-block-type"], bo = ["aria-label"], xo = [
|
|
3564
3619
|
"aria-label",
|
|
3565
3620
|
"aria-pressed",
|
|
3566
3621
|
"title"
|
|
3567
|
-
],
|
|
3622
|
+
], So = ["aria-label", "title"], Co = ["aria-label", "title"], wo = ["aria-label", "title"], To = {
|
|
3568
3623
|
key: 1,
|
|
3569
3624
|
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"
|
|
3570
|
-
},
|
|
3625
|
+
}, Eo = { 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)]" }, Do = {
|
|
3571
3626
|
key: 2,
|
|
3572
3627
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3573
|
-
},
|
|
3628
|
+
}, Oo = ["aria-label", "title"], ko = {
|
|
3574
3629
|
key: 3,
|
|
3575
3630
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3576
|
-
},
|
|
3631
|
+
}, Ao = ["aria-label"], jo = /*#__PURE__*/ qi(/* @__PURE__ */ B({
|
|
3577
3632
|
__name: "BlockWrapper",
|
|
3578
3633
|
props: {
|
|
3579
3634
|
block: {},
|
|
@@ -3583,7 +3638,7 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3583
3638
|
},
|
|
3584
3639
|
emits: ["select"],
|
|
3585
3640
|
setup(e, { emit: t }) {
|
|
3586
|
-
let n = T(() => import("./BlockIssueBadge-
|
|
3641
|
+
let n = T(() => import("./BlockIssueBadge-DR7cpDfQ.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(dr, 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);
|
|
3587
3642
|
async function p() {
|
|
3588
3643
|
await m(), l.value?.focus();
|
|
3589
3644
|
}
|
|
@@ -3609,13 +3664,13 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3609
3664
|
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 ? {
|
|
3610
3665
|
desktop: a.viewport.desktop,
|
|
3611
3666
|
mobile: a.viewport.mobile
|
|
3612
|
-
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(
|
|
3613
|
-
let e =
|
|
3667
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(ur, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3668
|
+
let e = _o(r.block), t = {
|
|
3614
3669
|
padding: e.padding,
|
|
3615
3670
|
backgroundColor: e.backgroundColor
|
|
3616
3671
|
};
|
|
3617
3672
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
3618
|
-
}), ne = O(() =>
|
|
3673
|
+
}), ne = O(() => vo(r.block));
|
|
3619
3674
|
function re(e) {
|
|
3620
3675
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), i("select"));
|
|
3621
3676
|
}
|
|
@@ -3658,60 +3713,60 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3658
3713
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3659
3714
|
title: j(a).blockActions.drag,
|
|
3660
3715
|
onKeydown: h
|
|
3661
|
-
}, [V(j(
|
|
3716
|
+
}, [V(j(yi), {
|
|
3662
3717
|
size: 14,
|
|
3663
3718
|
"stroke-width": 1.5
|
|
3664
|
-
})], 40,
|
|
3719
|
+
})], 40, xo),
|
|
3665
3720
|
I("button", {
|
|
3666
3721
|
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",
|
|
3667
3722
|
"aria-label": j(a).blockActions.duplicate,
|
|
3668
3723
|
title: j(a).blockActions.duplicate,
|
|
3669
3724
|
onClick: M(ie, ["stop"])
|
|
3670
|
-
}, [V(j(
|
|
3725
|
+
}, [V(j(pi), {
|
|
3671
3726
|
size: 14,
|
|
3672
3727
|
"stroke-width": 1.5
|
|
3673
|
-
})], 8,
|
|
3728
|
+
})], 8, So),
|
|
3674
3729
|
ee.value ? (f(), k("button", {
|
|
3675
3730
|
key: 0,
|
|
3676
3731
|
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",
|
|
3677
3732
|
"aria-label": j(a).blockActions.saveAsModule,
|
|
3678
3733
|
title: j(a).blockActions.saveAsModule,
|
|
3679
3734
|
onClick: M(P, ["stop"])
|
|
3680
|
-
}, [V(j(
|
|
3735
|
+
}, [V(j(ni), {
|
|
3681
3736
|
size: 14,
|
|
3682
3737
|
"stroke-width": 1.5
|
|
3683
|
-
})], 8,
|
|
3738
|
+
})], 8, Co)) : A("", !0),
|
|
3684
3739
|
I("button", {
|
|
3685
3740
|
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",
|
|
3686
3741
|
"aria-label": j(a).blockActions.delete,
|
|
3687
3742
|
title: j(a).blockActions.delete,
|
|
3688
3743
|
onClick: M(N, ["stop"])
|
|
3689
|
-
}, [V(j(
|
|
3744
|
+
}, [V(j(Li), {
|
|
3690
3745
|
size: 14,
|
|
3691
3746
|
"stroke-width": 1.5
|
|
3692
|
-
})], 8,
|
|
3693
|
-
], 8,
|
|
3694
|
-
g.value ? (f(), k("div",
|
|
3747
|
+
})], 8, wo)
|
|
3748
|
+
], 8, bo)) : A("", !0),
|
|
3749
|
+
g.value ? (f(), k("div", To, [I("span", Eo, [V(j(mi), {
|
|
3695
3750
|
size: 12,
|
|
3696
3751
|
"stroke-width": 1.5
|
|
3697
3752
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3698
|
-
b.value && !g.value ? (f(), k("div",
|
|
3753
|
+
b.value && !g.value ? (f(), k("div", Do, [I("button", {
|
|
3699
3754
|
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)]",
|
|
3700
3755
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3701
3756
|
title: e.block.displayCondition?.label,
|
|
3702
3757
|
onClick: M(ae, ["stop"])
|
|
3703
|
-
}, [V(j(
|
|
3758
|
+
}, [V(j(vi), {
|
|
3704
3759
|
size: 12,
|
|
3705
3760
|
"stroke-width": 2
|
|
3706
|
-
})], 8,
|
|
3707
|
-
E.value > 0 && !g.value ? (f(), k("div",
|
|
3761
|
+
})], 8, Oo)])) : A("", !0),
|
|
3762
|
+
E.value > 0 && !g.value ? (f(), k("div", ko, [I("button", {
|
|
3708
3763
|
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)]",
|
|
3709
3764
|
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3710
3765
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3711
|
-
}, [V(j(
|
|
3766
|
+
}, [V(j(wi), {
|
|
3712
3767
|
size: 12,
|
|
3713
3768
|
"stroke-width": 2.5
|
|
3714
|
-
}), z(" " + D(E.value), 1)], 8,
|
|
3769
|
+
}), z(" " + D(E.value), 1)], 8, Ao)])) : A("", !0),
|
|
3715
3770
|
ne.value ? (f(), k("div", {
|
|
3716
3771
|
key: 4,
|
|
3717
3772
|
class: "tpl-section-wrapper",
|
|
@@ -3724,31 +3779,31 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3724
3779
|
class: "tpl-block-content",
|
|
3725
3780
|
style: L(te.value)
|
|
3726
3781
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4))
|
|
3727
|
-
], 10,
|
|
3782
|
+
], 10, yo));
|
|
3728
3783
|
}
|
|
3729
3784
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
3730
3785
|
//#endregion
|
|
3731
3786
|
//#region src/utils/unwrapParagraph.ts
|
|
3732
|
-
function
|
|
3787
|
+
function Mo(e) {
|
|
3733
3788
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3734
3789
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3735
3790
|
}
|
|
3736
3791
|
//#endregion
|
|
3737
3792
|
//#region src/components/blocks/TitleBlock.vue
|
|
3738
|
-
var
|
|
3793
|
+
var No = /* @__PURE__ */ B({
|
|
3739
3794
|
__name: "TitleBlock",
|
|
3740
3795
|
props: {
|
|
3741
3796
|
block: {},
|
|
3742
3797
|
viewport: {}
|
|
3743
3798
|
},
|
|
3744
3799
|
setup(e) {
|
|
3745
|
-
let t = e, n = T(() => import("./TitleEditor-
|
|
3800
|
+
let t = e, n = T(() => import("./TitleEditor-wFvnU3Jr.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = po(() => t.block.content), l = O(() => {
|
|
3746
3801
|
let e = {
|
|
3747
3802
|
fontSize: `${pe[t.block.level]}px`,
|
|
3748
3803
|
textAlign: t.block.textAlign
|
|
3749
3804
|
};
|
|
3750
3805
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3751
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3806
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => Mo(o.value));
|
|
3752
3807
|
return (t, o) => (f(), k("div", {
|
|
3753
3808
|
ref_key: "blockRef",
|
|
3754
3809
|
ref: i,
|
|
@@ -3774,16 +3829,16 @@ var Oo = /* @__PURE__ */ B({
|
|
|
3774
3829
|
});
|
|
3775
3830
|
//#endregion
|
|
3776
3831
|
//#region src/utils/sectionColumnDrop.ts
|
|
3777
|
-
function
|
|
3832
|
+
function Po(e) {
|
|
3778
3833
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
3779
3834
|
}
|
|
3780
3835
|
//#endregion
|
|
3781
3836
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3782
|
-
var
|
|
3837
|
+
var Fo = { class: "tpl:w-full" }, Io = {
|
|
3783
3838
|
key: 0,
|
|
3784
3839
|
"data-testid": "section-drop-hint",
|
|
3785
3840
|
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)]"
|
|
3786
|
-
},
|
|
3841
|
+
}, Lo = /* @__PURE__ */ B({
|
|
3787
3842
|
__name: "SectionBlock",
|
|
3788
3843
|
props: {
|
|
3789
3844
|
block: {},
|
|
@@ -3791,12 +3846,12 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3791
3846
|
},
|
|
3792
3847
|
setup(e) {
|
|
3793
3848
|
let t = {
|
|
3794
|
-
title:
|
|
3795
|
-
paragraph:
|
|
3796
|
-
image:
|
|
3797
|
-
button:
|
|
3798
|
-
divider:
|
|
3799
|
-
custom:
|
|
3849
|
+
title: No,
|
|
3850
|
+
paragraph: ho,
|
|
3851
|
+
image: $a,
|
|
3852
|
+
button: Kr,
|
|
3853
|
+
divider: Ma,
|
|
3854
|
+
custom: Aa
|
|
3800
3855
|
}, n = e, { t: r } = Y(), i = J(zn, "SectionBlock"), a = v(Hn, null), o = v(qn, null), s = O(() => {
|
|
3801
3856
|
switch (n.block.columns) {
|
|
3802
3857
|
case "2": return ["50%", "50%"];
|
|
@@ -3823,7 +3878,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3823
3878
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3824
3879
|
}
|
|
3825
3880
|
function g(e) {
|
|
3826
|
-
return
|
|
3881
|
+
return go(e, o, t);
|
|
3827
3882
|
}
|
|
3828
3883
|
function _(e, t) {
|
|
3829
3884
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3831,7 +3886,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3831
3886
|
dataSourceFetched: t.dataSourceFetched
|
|
3832
3887
|
});
|
|
3833
3888
|
}
|
|
3834
|
-
return (t, n) => (f(), k("div",
|
|
3889
|
+
return (t, n) => (f(), k("div", Fo, [I("div", { class: F(["tpl:flex tpl:gap-0", { "tpl:flex-col": u.value }]) }, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3835
3890
|
key: n,
|
|
3836
3891
|
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3837
3892
|
style: L({ width: u.value ? "100%" : s.value[n] })
|
|
@@ -3840,7 +3895,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3840
3895
|
group: {
|
|
3841
3896
|
name: "blocks",
|
|
3842
3897
|
pull: !0,
|
|
3843
|
-
put: (e, t, n) => j(
|
|
3898
|
+
put: (e, t, n) => j(Po)(n)
|
|
3844
3899
|
},
|
|
3845
3900
|
animation: 150,
|
|
3846
3901
|
"ghost-class": "tpl-ghost",
|
|
@@ -3853,7 +3908,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3853
3908
|
class: "tpl:min-h-[60px]",
|
|
3854
3909
|
"onUpdate:modelValue": (e) => m(n, e)
|
|
3855
3910
|
}, {
|
|
3856
|
-
default: b(() => [(f(!0), k(R, null, h(p(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3911
|
+
default: b(() => [(f(!0), k(R, null, h(p(n), (t) => c((f(), k("div", { key: t.id }, [V(jo, {
|
|
3857
3912
|
block: t,
|
|
3858
3913
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3859
3914
|
viewport: e.viewport,
|
|
@@ -3884,13 +3939,13 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3884
3939
|
"model-value",
|
|
3885
3940
|
"group",
|
|
3886
3941
|
"onUpdate:modelValue"
|
|
3887
|
-
]), p(n).length === 0 ? (f(), k("div",
|
|
3942
|
+
]), p(n).length === 0 ? (f(), k("div", Io, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))], 2)]));
|
|
3888
3943
|
}
|
|
3889
|
-
}),
|
|
3944
|
+
}), Ro = me, zo = {
|
|
3890
3945
|
small: 24,
|
|
3891
3946
|
medium: 32,
|
|
3892
3947
|
large: 48
|
|
3893
|
-
},
|
|
3948
|
+
}, Bo = [
|
|
3894
3949
|
"facebook",
|
|
3895
3950
|
"twitter",
|
|
3896
3951
|
"instagram",
|
|
@@ -3908,11 +3963,11 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3908
3963
|
"github",
|
|
3909
3964
|
"dribbble",
|
|
3910
3965
|
"behance"
|
|
3911
|
-
],
|
|
3966
|
+
], Vo = [
|
|
3912
3967
|
"width",
|
|
3913
3968
|
"height",
|
|
3914
3969
|
"fill"
|
|
3915
|
-
],
|
|
3970
|
+
], Ho = ["d"], Uo = /* @__PURE__ */ B({
|
|
3916
3971
|
__name: "SocialIconSvg",
|
|
3917
3972
|
props: {
|
|
3918
3973
|
platform: {},
|
|
@@ -3920,7 +3975,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3920
3975
|
iconSize: {}
|
|
3921
3976
|
},
|
|
3922
3977
|
setup(e) {
|
|
3923
|
-
let t = e, n = O(() =>
|
|
3978
|
+
let t = e, n = O(() => Ro[t.platform]), r = O(() => zo[t.iconSize]), i = O(() => {
|
|
3924
3979
|
let e = {
|
|
3925
3980
|
display: "inline-flex",
|
|
3926
3981
|
alignItems: "center",
|
|
@@ -3964,12 +4019,12 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3964
4019
|
viewBox: "0 0 24 24",
|
|
3965
4020
|
fill: o.value,
|
|
3966
4021
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3967
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
4022
|
+
}, [I("path", { d: n.value.path }, null, 8, Ho)], 8, Vo))], 4));
|
|
3968
4023
|
}
|
|
3969
|
-
}),
|
|
4024
|
+
}), Wo = { class: "tpl:w-full" }, Go = ["href"], Ko = {
|
|
3970
4025
|
key: 1,
|
|
3971
4026
|
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)]"
|
|
3972
|
-
},
|
|
4027
|
+
}, qo = /* @__PURE__ */ B({
|
|
3973
4028
|
__name: "SocialIconsBlock",
|
|
3974
4029
|
props: {
|
|
3975
4030
|
block: {},
|
|
@@ -3982,7 +4037,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3982
4037
|
gap: `${t.block.spacing}px`,
|
|
3983
4038
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3984
4039
|
})), i = O(() => t.block.icons.length > 0);
|
|
3985
|
-
return (t, a) => (f(), k("div",
|
|
4040
|
+
return (t, a) => (f(), k("div", Wo, [i.value ? (f(), k("div", {
|
|
3986
4041
|
key: 0,
|
|
3987
4042
|
style: L(r.value)
|
|
3988
4043
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -3990,7 +4045,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3990
4045
|
href: t.url || "#",
|
|
3991
4046
|
class: "tpl:cursor-default",
|
|
3992
4047
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3993
|
-
}, [V(
|
|
4048
|
+
}, [V(Uo, {
|
|
3994
4049
|
platform: t.platform,
|
|
3995
4050
|
"icon-style": e.block.iconStyle,
|
|
3996
4051
|
"icon-size": e.block.iconSize
|
|
@@ -3998,16 +4053,16 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3998
4053
|
"platform",
|
|
3999
4054
|
"icon-style",
|
|
4000
4055
|
"icon-size"
|
|
4001
|
-
])], 8,
|
|
4056
|
+
])], 8, Go))), 128))], 4)) : (f(), k("div", Ko, [V(j(Mi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
4002
4057
|
}
|
|
4003
|
-
}),
|
|
4058
|
+
}), Jo = { class: "tpl:w-full" }, Yo = {
|
|
4004
4059
|
key: 0,
|
|
4005
4060
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4006
4061
|
style: {
|
|
4007
4062
|
"background-color": "var(--tpl-bg-hover)",
|
|
4008
4063
|
color: "var(--tpl-text-dim)"
|
|
4009
4064
|
}
|
|
4010
|
-
},
|
|
4065
|
+
}, Xo = /* @__PURE__ */ B({
|
|
4011
4066
|
__name: "SpacerBlock",
|
|
4012
4067
|
props: {
|
|
4013
4068
|
block: {},
|
|
@@ -4019,23 +4074,23 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4019
4074
|
minHeight: `${t.block.height}px`,
|
|
4020
4075
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4021
4076
|
}));
|
|
4022
|
-
return (t, i) => (f(), k("div",
|
|
4077
|
+
return (t, i) => (f(), k("div", Jo, [I("div", {
|
|
4023
4078
|
style: L(r.value),
|
|
4024
4079
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
4025
|
-
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span",
|
|
4080
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Yo, D(e.block.height) + "px ", 1))], 6)]));
|
|
4026
4081
|
}
|
|
4027
|
-
}),
|
|
4082
|
+
}), Zo = { class: "tpl:w-full" }, Qo = { key: 0 }, $o = [
|
|
4028
4083
|
"aria-label",
|
|
4029
4084
|
"data-placeholder",
|
|
4030
4085
|
"onBlur"
|
|
4031
|
-
],
|
|
4086
|
+
], es = [
|
|
4032
4087
|
"aria-label",
|
|
4033
4088
|
"data-placeholder",
|
|
4034
4089
|
"onBlur"
|
|
4035
|
-
],
|
|
4090
|
+
], ts = {
|
|
4036
4091
|
key: 1,
|
|
4037
4092
|
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)]"
|
|
4038
|
-
},
|
|
4093
|
+
}, ns = /*#__PURE__*/ qi(/* @__PURE__ */ B({
|
|
4039
4094
|
__name: "TableBlock",
|
|
4040
4095
|
props: {
|
|
4041
4096
|
block: {},
|
|
@@ -4080,11 +4135,11 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4080
4135
|
} : n);
|
|
4081
4136
|
i.updateBlock(n.block.id, { rows: o });
|
|
4082
4137
|
}
|
|
4083
|
-
return (e, n) => (f(), k("div",
|
|
4138
|
+
return (e, n) => (f(), k("div", Zo, [a.value ? (f(), k("table", {
|
|
4084
4139
|
key: 0,
|
|
4085
4140
|
style: L(o.value),
|
|
4086
4141
|
class: "tpl-table-editable"
|
|
4087
|
-
}, [u.value ? (f(), k("thead",
|
|
4142
|
+
}, [u.value ? (f(), k("thead", Qo, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
4088
4143
|
key: e.id,
|
|
4089
4144
|
style: L(l.value),
|
|
4090
4145
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4093,7 +4148,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4093
4148
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
4094
4149
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4095
4150
|
onClick: M(p, ["stop"])
|
|
4096
|
-
}, null, 44,
|
|
4151
|
+
}, null, 44, $o)), [[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", {
|
|
4097
4152
|
key: i.id,
|
|
4098
4153
|
style: L(s.value),
|
|
4099
4154
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4102,9 +4157,9 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4102
4157
|
onBlur: (t) => m(e.id, i.id, t),
|
|
4103
4158
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4104
4159
|
onClick: M(p, ["stop"])
|
|
4105
|
-
}, null, 44,
|
|
4160
|
+
}, null, 44, es)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", ts, [V(j(Ii), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
4106
4161
|
}
|
|
4107
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4162
|
+
}), [["__scopeId", "data-v-963ac422"]]), rs = /* @__PURE__ */ B({
|
|
4108
4163
|
__name: "VideoPlayButton",
|
|
4109
4164
|
props: { hoverEffect: {
|
|
4110
4165
|
type: Boolean,
|
|
@@ -4122,7 +4177,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4122
4177
|
});
|
|
4123
4178
|
//#endregion
|
|
4124
4179
|
//#region src/utils/videoThumbnail.ts
|
|
4125
|
-
function
|
|
4180
|
+
function is(e) {
|
|
4126
4181
|
if (!e) return {
|
|
4127
4182
|
platform: "unknown",
|
|
4128
4183
|
videoId: null,
|
|
@@ -4154,25 +4209,25 @@ function $o(e) {
|
|
|
4154
4209
|
thumbnailUrl: null
|
|
4155
4210
|
};
|
|
4156
4211
|
}
|
|
4157
|
-
function
|
|
4158
|
-
return t ||
|
|
4212
|
+
function as(e, t) {
|
|
4213
|
+
return t || is(e).thumbnailUrl;
|
|
4159
4214
|
}
|
|
4160
4215
|
//#endregion
|
|
4161
4216
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4162
|
-
var
|
|
4217
|
+
var os = ["src", "alt"], ss = {
|
|
4163
4218
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4164
4219
|
style: { opacity: "0.7" }
|
|
4165
|
-
},
|
|
4220
|
+
}, cs = ["href"], ls = ["src", "alt"], us = ["src", "alt"], ds = {
|
|
4166
4221
|
key: 3,
|
|
4167
4222
|
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)]"
|
|
4168
|
-
},
|
|
4223
|
+
}, fs = /* @__PURE__ */ B({
|
|
4169
4224
|
__name: "VideoBlock",
|
|
4170
4225
|
props: {
|
|
4171
4226
|
block: {},
|
|
4172
4227
|
viewport: {}
|
|
4173
4228
|
},
|
|
4174
4229
|
setup(e) {
|
|
4175
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
4230
|
+
let t = e, { t: n } = Y(), { syntax: r } = ia(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : as(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
4176
4231
|
let e = t.block.align;
|
|
4177
4232
|
return {
|
|
4178
4233
|
maxWidth: "100%",
|
|
@@ -4193,16 +4248,16 @@ var ts = ["src", "alt"], ns = {
|
|
|
4193
4248
|
class: "tpl:w-full tpl:border-0",
|
|
4194
4249
|
src: e.block.placeholderUrl,
|
|
4195
4250
|
alt: e.block.alt
|
|
4196
|
-
}, null, 8,
|
|
4251
|
+
}, null, 8, os), V(rs)], 4)) : i.value ? (f(), k("div", {
|
|
4197
4252
|
key: 1,
|
|
4198
4253
|
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)]",
|
|
4199
4254
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
4200
|
-
}, [V(j(
|
|
4255
|
+
}, [V(j(Vi), {
|
|
4201
4256
|
size: 36,
|
|
4202
4257
|
"stroke-width": 1.5,
|
|
4203
4258
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4204
4259
|
style: { opacity: "0.5" }
|
|
4205
|
-
}), I("span",
|
|
4260
|
+
}), I("span", ss, [V(Ur, { text: c.value }, null, 8, ["text"])])], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
4206
4261
|
key: 0,
|
|
4207
4262
|
href: e.block.url,
|
|
4208
4263
|
target: "_blank",
|
|
@@ -4214,7 +4269,7 @@ var ts = ["src", "alt"], ns = {
|
|
|
4214
4269
|
class: "tpl:w-full tpl:border-0",
|
|
4215
4270
|
src: a.value,
|
|
4216
4271
|
alt: e.block.alt
|
|
4217
|
-
}, null, 8,
|
|
4272
|
+
}, null, 8, ls), V(rs, { "hover-effect": "" })], 12, cs)) : (f(), k("div", {
|
|
4218
4273
|
key: 1,
|
|
4219
4274
|
class: "tpl:relative tpl:inline-block",
|
|
4220
4275
|
style: L(s.value)
|
|
@@ -4222,31 +4277,31 @@ var ts = ["src", "alt"], ns = {
|
|
|
4222
4277
|
class: "tpl:w-full tpl:border-0",
|
|
4223
4278
|
src: a.value,
|
|
4224
4279
|
alt: e.block.alt
|
|
4225
|
-
}, null, 8,
|
|
4280
|
+
}, null, 8, us), V(rs)], 4))], 64)) : (f(), k("div", ds, [V(j(Vi), {
|
|
4226
4281
|
size: 40,
|
|
4227
4282
|
"stroke-width": 1.5,
|
|
4228
4283
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4229
4284
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
4230
4285
|
}
|
|
4231
|
-
}),
|
|
4232
|
-
section:
|
|
4233
|
-
title:
|
|
4234
|
-
paragraph:
|
|
4235
|
-
image:
|
|
4236
|
-
button:
|
|
4237
|
-
divider:
|
|
4238
|
-
video:
|
|
4239
|
-
social:
|
|
4240
|
-
menu:
|
|
4241
|
-
table:
|
|
4242
|
-
spacer:
|
|
4243
|
-
html:
|
|
4244
|
-
countdown: T(() => import("./CountdownBlock-
|
|
4286
|
+
}), ps = {
|
|
4287
|
+
section: Lo,
|
|
4288
|
+
title: No,
|
|
4289
|
+
paragraph: ho,
|
|
4290
|
+
image: $a,
|
|
4291
|
+
button: Kr,
|
|
4292
|
+
divider: Ma,
|
|
4293
|
+
video: fs,
|
|
4294
|
+
social: qo,
|
|
4295
|
+
menu: ro,
|
|
4296
|
+
table: ns,
|
|
4297
|
+
spacer: Xo,
|
|
4298
|
+
html: Ra,
|
|
4299
|
+
countdown: T(() => import("./CountdownBlock-BmGqb7Zi.js").then((e) => e.n))
|
|
4245
4300
|
};
|
|
4246
|
-
function
|
|
4301
|
+
function ms(e) {
|
|
4247
4302
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4248
4303
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4249
|
-
let { resolvedTheme: c } =
|
|
4304
|
+
let { resolvedTheme: c } = Dr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = kr({
|
|
4250
4305
|
themeOverrides: u,
|
|
4251
4306
|
resolvedTheme: c,
|
|
4252
4307
|
extraStyles: e.themeExtraStyles
|
|
@@ -4271,13 +4326,13 @@ function ls(e) {
|
|
|
4271
4326
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4272
4327
|
e ? g.pause() : g.resume();
|
|
4273
4328
|
}));
|
|
4274
|
-
let v =
|
|
4329
|
+
let v = Er(t, {
|
|
4275
4330
|
t: a,
|
|
4276
4331
|
format: o
|
|
4277
|
-
}), y =
|
|
4278
|
-
if (
|
|
4332
|
+
}), y = Nr();
|
|
4333
|
+
if (Rr(y, ps), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Aa);
|
|
4279
4334
|
function b(e) {
|
|
4280
|
-
for (let t of e) y.registerCustom(t,
|
|
4335
|
+
for (let t of e) y.registerCustom(t, Aa);
|
|
4281
4336
|
}
|
|
4282
4337
|
let x = Ln();
|
|
4283
4338
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4288,7 +4343,7 @@ function ls(e) {
|
|
|
4288
4343
|
}, { capture: !0 });
|
|
4289
4344
|
}
|
|
4290
4345
|
function S(r) {
|
|
4291
|
-
x.isActive() &&
|
|
4346
|
+
x.isActive() && Vr(r, {
|
|
4292
4347
|
history: f,
|
|
4293
4348
|
selectBlock: (e) => t.selectBlock(e),
|
|
4294
4349
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4299,17 +4354,17 @@ function ls(e) {
|
|
|
4299
4354
|
}
|
|
4300
4355
|
q(document, "keydown", S);
|
|
4301
4356
|
let w = C(null);
|
|
4302
|
-
p(
|
|
4357
|
+
p(pr, e.editorRoot ?? document), p(mr, w), p(Rn, r), p(zn, t), p(Bn, f), p(Vn, m), p(Hn, h), p(Un, i), p(Wn, d), p(Gn, c), p(Kn, n.blockDefaults), p(qn, y), p(Jn, n.customBlocks ?? []), p(Yn, n.paletteBlocks), p(Xn, zr(n.htmlBlockPreview)), p(Zn, Pr(t.content, y));
|
|
4303
4358
|
let ee = gt(n.mergeTags?.syntax);
|
|
4304
|
-
p(
|
|
4305
|
-
let T =
|
|
4359
|
+
p(Qn, n.mergeTags?.tags ?? []), p($n, ee), p(er, n.mergeTags?.onRequest ?? null), p(tr, n.mergeTags?.autocomplete !== !1), p(nr, xr()), p(rr, n.logicTags?.tags ?? []), p(ir, n.logicTags?.pairs ?? []), p(or, n.logicTags?.onRequest ?? null), p(ar, Sr()), p(sr, n.onRequestMedia ?? null), p(cr, n.displayConditions?.conditions ?? []), p(lr, n.displayConditions?.allowCustom ?? !1), p(ur, e.capabilities ?? {}), p(dr, v);
|
|
4360
|
+
let T = Cr(n.lint) ? null : wr({
|
|
4306
4361
|
content: t.content,
|
|
4307
4362
|
options: n.lint ?? {},
|
|
4308
4363
|
updateBlock: t.updateBlock,
|
|
4309
4364
|
updateSettings: t.updateSettings,
|
|
4310
4365
|
removeBlock: t.removeBlock
|
|
4311
4366
|
});
|
|
4312
|
-
p(
|
|
4367
|
+
p(fr, T);
|
|
4313
4368
|
function E() {
|
|
4314
4369
|
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4315
4370
|
}
|
|
@@ -4332,20 +4387,15 @@ function ls(e) {
|
|
|
4332
4387
|
};
|
|
4333
4388
|
}
|
|
4334
4389
|
//#endregion
|
|
4335
|
-
//#region src/composables/usePopoverRoot.ts
|
|
4336
|
-
function us() {
|
|
4337
|
-
return v(pr, C(null));
|
|
4338
|
-
}
|
|
4339
|
-
//#endregion
|
|
4340
4390
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4341
|
-
var
|
|
4391
|
+
var hs = ["data-tpl-theme"], gs = /* @__PURE__ */ B({
|
|
4342
4392
|
__name: "TplModal",
|
|
4343
4393
|
props: { visible: { type: Boolean } },
|
|
4344
4394
|
emits: ["close", "keydown"],
|
|
4345
4395
|
setup(e, { emit: t }) {
|
|
4346
4396
|
let n = e, r = t, i = C(null);
|
|
4347
|
-
|
|
4348
|
-
let a = v(Gn), s =
|
|
4397
|
+
ea(i, O(() => n.visible));
|
|
4398
|
+
let a = v(Gn), s = io();
|
|
4349
4399
|
function c(e) {
|
|
4350
4400
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4351
4401
|
}
|
|
@@ -4374,11 +4424,11 @@ var ds = ["data-tpl-theme"], fs = /* @__PURE__ */ B({
|
|
|
4374
4424
|
}, [I("div", {
|
|
4375
4425
|
ref_key: "dialogRef",
|
|
4376
4426
|
ref: i
|
|
4377
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4427
|
+
}, [o(t.$slots, "default")], 512)], 40, hs)) : A("", !0)]),
|
|
4378
4428
|
_: 3
|
|
4379
4429
|
})], 8, ["to"])) : A("", !0);
|
|
4380
4430
|
}
|
|
4381
|
-
}),
|
|
4431
|
+
}), _s = class e {
|
|
4382
4432
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4383
4433
|
accessToken = null;
|
|
4384
4434
|
expiresAt = null;
|
|
@@ -4479,8 +4529,8 @@ var ds = ["data-tpl-theme"], fs = /* @__PURE__ */ B({
|
|
|
4479
4529
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4480
4530
|
}
|
|
4481
4531
|
};
|
|
4482
|
-
function
|
|
4483
|
-
return e.mode === "direct" ? new
|
|
4532
|
+
function vs(e, t) {
|
|
4533
|
+
return e.mode === "direct" ? new _s({
|
|
4484
4534
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4485
4535
|
baseUrl: e.baseUrl,
|
|
4486
4536
|
requestOptions: {
|
|
@@ -4494,7 +4544,7 @@ function ms(e, t) {
|
|
|
4494
4544
|
}
|
|
4495
4545
|
},
|
|
4496
4546
|
onError: t
|
|
4497
|
-
}) : new
|
|
4547
|
+
}) : new _s({
|
|
4498
4548
|
url: e.url,
|
|
4499
4549
|
baseUrl: e.baseUrl,
|
|
4500
4550
|
requestOptions: e.requestOptions,
|
|
@@ -4506,16 +4556,16 @@ function ms(e, t) {
|
|
|
4506
4556
|
function Z(e, t) {
|
|
4507
4557
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4508
4558
|
}
|
|
4509
|
-
var
|
|
4559
|
+
var ys = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${ys}/templates/{template}`, bs = `${Q}/ai`, xs = `${ys}/media`, Ss = `${xs}/folders`, Cs = `${ys}/saved-modules`, $ = {
|
|
4510
4560
|
health: "/api/v1/health",
|
|
4511
|
-
"projects.config": `${
|
|
4512
|
-
"broadcasting.auth": `${
|
|
4513
|
-
"templates.store": `${
|
|
4561
|
+
"projects.config": `${ys}/config`,
|
|
4562
|
+
"broadcasting.auth": `${ys}/broadcasting/auth`,
|
|
4563
|
+
"templates.store": `${ys}/templates`,
|
|
4514
4564
|
"templates.show": `${Q}`,
|
|
4515
4565
|
"templates.update": `${Q}`,
|
|
4516
4566
|
"templates.destroy": `${Q}`,
|
|
4517
4567
|
"templates.export": `${Q}/export`,
|
|
4518
|
-
"templates.importFromBeefree": `${
|
|
4568
|
+
"templates.importFromBeefree": `${ys}/templates/import/from-beefree`,
|
|
4519
4569
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4520
4570
|
"snapshots.index": `${Q}/snapshots`,
|
|
4521
4571
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4526,31 +4576,31 @@ var hs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${hs}/templates/{te
|
|
|
4526
4576
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4527
4577
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4528
4578
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4529
|
-
"ai.generate": `${
|
|
4530
|
-
"ai.conversationMessages": `${
|
|
4531
|
-
"ai.suggestions": `${
|
|
4532
|
-
"ai.rewriteText": `${
|
|
4533
|
-
"ai.score": `${
|
|
4534
|
-
"ai.fixFinding": `${
|
|
4535
|
-
"ai.generateFromDesign": `${
|
|
4536
|
-
"media.upload": `${
|
|
4537
|
-
"media.browse": `${
|
|
4538
|
-
"media.delete": `${
|
|
4539
|
-
"media.move": `${
|
|
4540
|
-
"media.update": `${
|
|
4541
|
-
"media.replace": `${
|
|
4542
|
-
"media.checkUsage": `${
|
|
4543
|
-
"media.frequentlyUsed": `${
|
|
4544
|
-
"media.importFromUrl": `${
|
|
4545
|
-
"folders.index": `${
|
|
4546
|
-
"folders.store": `${
|
|
4547
|
-
"folders.update": `${
|
|
4548
|
-
"folders.destroy": `${
|
|
4549
|
-
"savedModules.index": `${
|
|
4550
|
-
"savedModules.store": `${
|
|
4551
|
-
"savedModules.update": `${
|
|
4552
|
-
"savedModules.destroy": `${
|
|
4553
|
-
},
|
|
4579
|
+
"ai.generate": `${bs}/generate`,
|
|
4580
|
+
"ai.conversationMessages": `${bs}/conversation-messages`,
|
|
4581
|
+
"ai.suggestions": `${bs}/suggestions`,
|
|
4582
|
+
"ai.rewriteText": `${bs}/rewrite-text`,
|
|
4583
|
+
"ai.score": `${bs}/score`,
|
|
4584
|
+
"ai.fixFinding": `${bs}/fix-finding`,
|
|
4585
|
+
"ai.generateFromDesign": `${bs}/generate-from-design`,
|
|
4586
|
+
"media.upload": `${xs}/upload`,
|
|
4587
|
+
"media.browse": `${xs}/browse`,
|
|
4588
|
+
"media.delete": `${xs}/delete`,
|
|
4589
|
+
"media.move": `${xs}/move`,
|
|
4590
|
+
"media.update": `${xs}/{media}`,
|
|
4591
|
+
"media.replace": `${xs}/{media}/replace`,
|
|
4592
|
+
"media.checkUsage": `${xs}/check-usage`,
|
|
4593
|
+
"media.frequentlyUsed": `${xs}/frequently-used`,
|
|
4594
|
+
"media.importFromUrl": `${xs}/import-from-url`,
|
|
4595
|
+
"folders.index": `${Ss}`,
|
|
4596
|
+
"folders.store": `${Ss}`,
|
|
4597
|
+
"folders.update": `${Ss}/{mediaFolder}`,
|
|
4598
|
+
"folders.destroy": `${Ss}/{mediaFolder}`,
|
|
4599
|
+
"savedModules.index": `${Cs}`,
|
|
4600
|
+
"savedModules.store": `${Cs}`,
|
|
4601
|
+
"savedModules.update": `${Cs}/{savedModule}`,
|
|
4602
|
+
"savedModules.destroy": `${Cs}/{savedModule}`
|
|
4603
|
+
}, ws = class {
|
|
4554
4604
|
authManager;
|
|
4555
4605
|
constructor(e) {
|
|
4556
4606
|
this.authManager = e;
|
|
@@ -4736,14 +4786,14 @@ var hs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${hs}/templates/{te
|
|
|
4736
4786
|
};
|
|
4737
4787
|
//#endregion
|
|
4738
4788
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4739
|
-
function
|
|
4789
|
+
function Ts(e) {
|
|
4740
4790
|
return {
|
|
4741
4791
|
host: e.host,
|
|
4742
4792
|
port: e.port,
|
|
4743
4793
|
appKey: e.app_key
|
|
4744
4794
|
};
|
|
4745
4795
|
}
|
|
4746
|
-
var
|
|
4796
|
+
var Es = class {
|
|
4747
4797
|
pusher = null;
|
|
4748
4798
|
authManager;
|
|
4749
4799
|
config;
|
|
@@ -4810,7 +4860,7 @@ var Ss = class {
|
|
|
4810
4860
|
};
|
|
4811
4861
|
//#endregion
|
|
4812
4862
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4813
|
-
function
|
|
4863
|
+
function Ds(e, t) {
|
|
4814
4864
|
let { operation: n, data: r } = t;
|
|
4815
4865
|
switch (n) {
|
|
4816
4866
|
case "add_block":
|
|
@@ -4838,11 +4888,11 @@ function Cs(e, t) {
|
|
|
4838
4888
|
}
|
|
4839
4889
|
//#endregion
|
|
4840
4890
|
//#region ../core/src/cloud/editor.ts
|
|
4841
|
-
function
|
|
4891
|
+
function Os(e) {
|
|
4842
4892
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4843
4893
|
}
|
|
4844
|
-
function
|
|
4845
|
-
let t = new
|
|
4894
|
+
function ks(e) {
|
|
4895
|
+
let t = new ws(e.authManager), n = S({
|
|
4846
4896
|
template: null,
|
|
4847
4897
|
content: We(e.defaultFontFamily, e.templateDefaults),
|
|
4848
4898
|
selectedBlockId: null,
|
|
@@ -4948,7 +4998,7 @@ function Ts(e) {
|
|
|
4948
4998
|
let l;
|
|
4949
4999
|
if (r) {
|
|
4950
5000
|
let e = o(n.content.blocks, r);
|
|
4951
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
5001
|
+
if (!e || e.type !== "section" || i < 0 || i >= Os(e.columns)) return;
|
|
4952
5002
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4953
5003
|
} else l = n.content.blocks;
|
|
4954
5004
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -5040,11 +5090,11 @@ function Ts(e) {
|
|
|
5040
5090
|
}
|
|
5041
5091
|
//#endregion
|
|
5042
5092
|
//#region ../core/src/cloud/ai-chat.ts
|
|
5043
|
-
var
|
|
5044
|
-
function
|
|
5045
|
-
return `msg_${Date.now()}_${++
|
|
5093
|
+
var As = 0;
|
|
5094
|
+
function js() {
|
|
5095
|
+
return `msg_${Date.now()}_${++As}`;
|
|
5046
5096
|
}
|
|
5047
|
-
function
|
|
5097
|
+
function Ms(e) {
|
|
5048
5098
|
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);
|
|
5049
5099
|
function _(e, t) {
|
|
5050
5100
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -5138,14 +5188,14 @@ function Os(e) {
|
|
|
5138
5188
|
let v = n();
|
|
5139
5189
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
5140
5190
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
5141
|
-
let y =
|
|
5191
|
+
let y = js();
|
|
5142
5192
|
a.value = [...a.value, {
|
|
5143
5193
|
id: y,
|
|
5144
5194
|
role: "user",
|
|
5145
5195
|
content: e,
|
|
5146
5196
|
timestamp: Date.now()
|
|
5147
5197
|
}];
|
|
5148
|
-
let b =
|
|
5198
|
+
let b = js();
|
|
5149
5199
|
a.value = [...a.value, {
|
|
5150
5200
|
id: b,
|
|
5151
5201
|
role: "assistant",
|
|
@@ -5236,7 +5286,7 @@ function Os(e) {
|
|
|
5236
5286
|
}
|
|
5237
5287
|
//#endregion
|
|
5238
5288
|
//#region ../core/src/cloud/ai-config.ts
|
|
5239
|
-
function
|
|
5289
|
+
function Ns(e) {
|
|
5240
5290
|
function t(t) {
|
|
5241
5291
|
return e !== !1 && e?.[t] !== !1;
|
|
5242
5292
|
}
|
|
@@ -5247,7 +5297,7 @@ function ks(e) {
|
|
|
5247
5297
|
}
|
|
5248
5298
|
//#endregion
|
|
5249
5299
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5250
|
-
function
|
|
5300
|
+
function Ps(e) {
|
|
5251
5301
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5252
5302
|
async function l(e, o) {
|
|
5253
5303
|
let s = n();
|
|
@@ -5392,7 +5442,7 @@ function As(e) {
|
|
|
5392
5442
|
}
|
|
5393
5443
|
//#endregion
|
|
5394
5444
|
//#region ../core/src/cloud/design-reference.ts
|
|
5395
|
-
function
|
|
5445
|
+
function Fs(e) {
|
|
5396
5446
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5397
5447
|
async function s(e) {
|
|
5398
5448
|
let s = n();
|
|
@@ -5455,8 +5505,8 @@ function js(e) {
|
|
|
5455
5505
|
}
|
|
5456
5506
|
//#endregion
|
|
5457
5507
|
//#region ../core/src/cloud/comments.ts
|
|
5458
|
-
function
|
|
5459
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5508
|
+
function Is(e) {
|
|
5509
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new ws(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5460
5510
|
let e = 0;
|
|
5461
5511
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5462
5512
|
return e;
|
|
@@ -5655,17 +5705,17 @@ function Ms(e) {
|
|
|
5655
5705
|
}
|
|
5656
5706
|
//#endregion
|
|
5657
5707
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5658
|
-
function
|
|
5708
|
+
function Ls(e) {
|
|
5659
5709
|
let { comments: t, channel: n } = e;
|
|
5660
5710
|
H(n, (e, n) => {
|
|
5661
5711
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5662
|
-
|
|
5712
|
+
Rs(t, e);
|
|
5663
5713
|
});
|
|
5664
5714
|
}), l(() => {
|
|
5665
5715
|
n.value?.unbind("comment-broadcast");
|
|
5666
5716
|
});
|
|
5667
5717
|
}
|
|
5668
|
-
function
|
|
5718
|
+
function Rs(e, t) {
|
|
5669
5719
|
switch (t.action) {
|
|
5670
5720
|
case "comment_created":
|
|
5671
5721
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5684,7 +5734,7 @@ function Ps(e, t) {
|
|
|
5684
5734
|
}
|
|
5685
5735
|
//#endregion
|
|
5686
5736
|
//#region ../core/src/cloud/collaboration.ts
|
|
5687
|
-
var
|
|
5737
|
+
var zs = [
|
|
5688
5738
|
"pusher:member_added",
|
|
5689
5739
|
"pusher:member_removed",
|
|
5690
5740
|
"client-block_locked",
|
|
@@ -5692,10 +5742,10 @@ var Fs = [
|
|
|
5692
5742
|
"client-operation",
|
|
5693
5743
|
"mcp-operation"
|
|
5694
5744
|
];
|
|
5695
|
-
function
|
|
5696
|
-
for (let t of
|
|
5745
|
+
function Bs(e) {
|
|
5746
|
+
for (let t of zs) e.unbind(t);
|
|
5697
5747
|
}
|
|
5698
|
-
var
|
|
5748
|
+
var Vs = [
|
|
5699
5749
|
"#3b82f6",
|
|
5700
5750
|
"#ef4444",
|
|
5701
5751
|
"#10b981",
|
|
@@ -5707,10 +5757,10 @@ var Ls = [
|
|
|
5707
5757
|
"#6366f1",
|
|
5708
5758
|
"#14b8a6"
|
|
5709
5759
|
];
|
|
5710
|
-
function
|
|
5760
|
+
function Hs(e) {
|
|
5711
5761
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5712
5762
|
function u() {
|
|
5713
|
-
let e =
|
|
5763
|
+
let e = Vs[o % Vs.length];
|
|
5714
5764
|
return o++, e;
|
|
5715
5765
|
}
|
|
5716
5766
|
function d(e) {
|
|
@@ -5752,7 +5802,7 @@ function Rs(e) {
|
|
|
5752
5802
|
function h(e) {
|
|
5753
5803
|
s = !0;
|
|
5754
5804
|
try {
|
|
5755
|
-
|
|
5805
|
+
Ds(n, e);
|
|
5756
5806
|
} finally {
|
|
5757
5807
|
s = !1;
|
|
5758
5808
|
}
|
|
@@ -5772,7 +5822,7 @@ function Rs(e) {
|
|
|
5772
5822
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5773
5823
|
s || (t && v(t), e && _(e));
|
|
5774
5824
|
}), H(r, (t, n) => {
|
|
5775
|
-
if (n &&
|
|
5825
|
+
if (n && Bs(n), !t) {
|
|
5776
5826
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5777
5827
|
return;
|
|
5778
5828
|
}
|
|
@@ -5804,7 +5854,7 @@ function Rs(e) {
|
|
|
5804
5854
|
h(e);
|
|
5805
5855
|
});
|
|
5806
5856
|
}), l(() => {
|
|
5807
|
-
r.value &&
|
|
5857
|
+
r.value && Bs(r.value);
|
|
5808
5858
|
}), {
|
|
5809
5859
|
collaborators: i,
|
|
5810
5860
|
lockedBlocks: a,
|
|
@@ -5814,7 +5864,7 @@ function Rs(e) {
|
|
|
5814
5864
|
}
|
|
5815
5865
|
//#endregion
|
|
5816
5866
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5817
|
-
function
|
|
5867
|
+
function Us(e, t) {
|
|
5818
5868
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5819
5869
|
e.addBlock = (e, r, i, a) => {
|
|
5820
5870
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5869,11 +5919,11 @@ function zs(e, t) {
|
|
|
5869
5919
|
}
|
|
5870
5920
|
//#endregion
|
|
5871
5921
|
//#region ../core/src/cloud/web-socket.ts
|
|
5872
|
-
function
|
|
5922
|
+
function Ws(e) {
|
|
5873
5923
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5874
5924
|
async function s(e, s) {
|
|
5875
5925
|
if (a) return;
|
|
5876
|
-
a = new
|
|
5926
|
+
a = new Es({
|
|
5877
5927
|
authManager: t,
|
|
5878
5928
|
config: s,
|
|
5879
5929
|
onError: n
|
|
@@ -5901,8 +5951,8 @@ function Bs(e) {
|
|
|
5901
5951
|
}
|
|
5902
5952
|
//#endregion
|
|
5903
5953
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5904
|
-
function
|
|
5905
|
-
let t = new
|
|
5954
|
+
function Gs(e) {
|
|
5955
|
+
let t = new ws(e.authManager), n = C([]), r = C(!1);
|
|
5906
5956
|
async function i(i) {
|
|
5907
5957
|
r.value = !0;
|
|
5908
5958
|
try {
|
|
@@ -5950,8 +6000,8 @@ function Vs(e) {
|
|
|
5950
6000
|
}
|
|
5951
6001
|
//#endregion
|
|
5952
6002
|
//#region ../core/src/cloud/snapshots.ts
|
|
5953
|
-
function
|
|
5954
|
-
let t = new
|
|
6003
|
+
function Ks(e) {
|
|
6004
|
+
let t = new ws(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5955
6005
|
async function a() {
|
|
5956
6006
|
r.value = !0;
|
|
5957
6007
|
try {
|
|
@@ -5983,8 +6033,8 @@ function Hs(e) {
|
|
|
5983
6033
|
}
|
|
5984
6034
|
//#endregion
|
|
5985
6035
|
//#region ../core/src/cloud/test-email.ts
|
|
5986
|
-
function
|
|
5987
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
6036
|
+
function qs(e) {
|
|
6037
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new ws(t), l = C(!1), u = C(null), d = C(null);
|
|
5988
6038
|
o && H(o, (e) => {
|
|
5989
6039
|
e && (d.value = t.testEmailConfig);
|
|
5990
6040
|
}, { immediate: !0 });
|
|
@@ -6020,8 +6070,8 @@ function Us(e) {
|
|
|
6020
6070
|
}
|
|
6021
6071
|
//#endregion
|
|
6022
6072
|
//#region ../core/src/cloud/export.ts
|
|
6023
|
-
function
|
|
6024
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
6073
|
+
function Js(e) {
|
|
6074
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new ws(t);
|
|
6025
6075
|
function a() {
|
|
6026
6076
|
let e = n?.();
|
|
6027
6077
|
return {
|
|
@@ -6047,8 +6097,8 @@ function Ws(e) {
|
|
|
6047
6097
|
}
|
|
6048
6098
|
//#endregion
|
|
6049
6099
|
//#region ../core/src/cloud/plan-config.ts
|
|
6050
|
-
function
|
|
6051
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
6100
|
+
function Ys(e) {
|
|
6101
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new ws(t), o = O(() => r.value?.features ?? null);
|
|
6052
6102
|
function s(e) {
|
|
6053
6103
|
return r.value?.features[e] ?? !1;
|
|
6054
6104
|
}
|
|
@@ -6074,11 +6124,11 @@ function Gs(e) {
|
|
|
6074
6124
|
}
|
|
6075
6125
|
//#endregion
|
|
6076
6126
|
//#region ../core/src/cloud/health-check.ts
|
|
6077
|
-
var
|
|
6078
|
-
function
|
|
6127
|
+
var Xs = 5e3;
|
|
6128
|
+
function Zs(e) {
|
|
6079
6129
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
6080
6130
|
}
|
|
6081
|
-
async function
|
|
6131
|
+
async function Qs(e, t) {
|
|
6082
6132
|
let n = performance.now();
|
|
6083
6133
|
try {
|
|
6084
6134
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -6130,7 +6180,7 @@ async function Js(e, t) {
|
|
|
6130
6180
|
};
|
|
6131
6181
|
}
|
|
6132
6182
|
}
|
|
6133
|
-
async function
|
|
6183
|
+
async function $s(e) {
|
|
6134
6184
|
if (!e?.host || !e?.app_key) return {
|
|
6135
6185
|
ok: !1,
|
|
6136
6186
|
error: "WebSocket configuration not available"
|
|
@@ -6146,7 +6196,7 @@ async function Ys(e) {
|
|
|
6146
6196
|
ok: !1,
|
|
6147
6197
|
error: "WebSocket connection timed out"
|
|
6148
6198
|
});
|
|
6149
|
-
},
|
|
6199
|
+
}, Xs);
|
|
6150
6200
|
try {
|
|
6151
6201
|
n = new WebSocket(t);
|
|
6152
6202
|
} catch (t) {
|
|
@@ -6166,8 +6216,8 @@ async function Ys(e) {
|
|
|
6166
6216
|
};
|
|
6167
6217
|
});
|
|
6168
6218
|
}
|
|
6169
|
-
async function
|
|
6170
|
-
let t = await
|
|
6219
|
+
async function ec(e = {}) {
|
|
6220
|
+
let t = await Qs(Zs(e), e.authManager), n = await $s(t.wsConfig);
|
|
6171
6221
|
return {
|
|
6172
6222
|
api: t.api,
|
|
6173
6223
|
websocket: n,
|
|
@@ -6177,29 +6227,29 @@ async function Xs(e = {}) {
|
|
|
6177
6227
|
}
|
|
6178
6228
|
//#endregion
|
|
6179
6229
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
6180
|
-
function
|
|
6230
|
+
function tc(e) {
|
|
6181
6231
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
6182
6232
|
H(n, (e, n) => {
|
|
6183
6233
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
6184
|
-
|
|
6234
|
+
Ds(t, e), r?.(e);
|
|
6185
6235
|
});
|
|
6186
6236
|
});
|
|
6187
6237
|
}
|
|
6188
6238
|
//#endregion
|
|
6189
6239
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6190
|
-
var
|
|
6240
|
+
var nc = {
|
|
6191
6241
|
key: 0,
|
|
6192
6242
|
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)]"
|
|
6193
|
-
},
|
|
6243
|
+
}, rc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ic = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, ac = { class: "tpl:flex tpl:items-center tpl:gap-1" }, oc = ["title"], sc = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, cc = {
|
|
6194
6244
|
key: 0,
|
|
6195
6245
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6196
|
-
},
|
|
6246
|
+
}, lc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, uc = {
|
|
6197
6247
|
key: 1,
|
|
6198
6248
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6199
|
-
},
|
|
6249
|
+
}, dc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fc = {
|
|
6200
6250
|
key: 2,
|
|
6201
6251
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6202
|
-
},
|
|
6252
|
+
}, pc = {
|
|
6203
6253
|
key: 0,
|
|
6204
6254
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
6205
6255
|
style: {
|
|
@@ -6208,10 +6258,10 @@ var Qs = {
|
|
|
6208
6258
|
"max-width": "85%",
|
|
6209
6259
|
"box-shadow": "var(--tpl-shadow)"
|
|
6210
6260
|
}
|
|
6211
|
-
},
|
|
6261
|
+
}, mc = {
|
|
6212
6262
|
key: 1,
|
|
6213
6263
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6214
|
-
},
|
|
6264
|
+
}, hc = {
|
|
6215
6265
|
key: 1,
|
|
6216
6266
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
6217
6267
|
style: {
|
|
@@ -6220,21 +6270,21 @@ var Qs = {
|
|
|
6220
6270
|
color: "var(--tpl-text)",
|
|
6221
6271
|
"box-shadow": "var(--tpl-shadow)"
|
|
6222
6272
|
}
|
|
6223
|
-
},
|
|
6273
|
+
}, gc = {
|
|
6224
6274
|
key: 0,
|
|
6225
6275
|
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",
|
|
6226
6276
|
style: {
|
|
6227
6277
|
"background-color": "var(--tpl-danger-light)",
|
|
6228
6278
|
color: "var(--tpl-danger)"
|
|
6229
6279
|
}
|
|
6230
|
-
},
|
|
6280
|
+
}, _c = {
|
|
6231
6281
|
key: 1,
|
|
6232
6282
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
6233
6283
|
style: {
|
|
6234
6284
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6235
6285
|
"backdrop-filter": "blur(2px)"
|
|
6236
6286
|
}
|
|
6237
|
-
},
|
|
6287
|
+
}, vc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, yc = ["onClick"], bc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, xc = { 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)]" }, Sc = ["placeholder", "disabled"], Cc = ["disabled"], wc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Tc = /*@__PURE__*/ B({
|
|
6238
6288
|
__name: "AiChatSidebar",
|
|
6239
6289
|
props: {
|
|
6240
6290
|
visible: { type: Boolean },
|
|
@@ -6242,7 +6292,7 @@ var Qs = {
|
|
|
6242
6292
|
},
|
|
6243
6293
|
emits: ["close"],
|
|
6244
6294
|
setup(e, { emit: t }) {
|
|
6245
|
-
let n = e, r = t, i = J(
|
|
6295
|
+
let n = e, r = t, i = J(br, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(hr, "AiChatSidebar"), s = v(Qn, []), l = za(), u = Ms({
|
|
6246
6296
|
authManager: o,
|
|
6247
6297
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6248
6298
|
onApply: n.onApply,
|
|
@@ -6289,42 +6339,42 @@ var Qs = {
|
|
|
6289
6339
|
"leave-from-class": "tpl:translate-x-0",
|
|
6290
6340
|
"leave-to-class": "tpl:translate-x-full"
|
|
6291
6341
|
}, {
|
|
6292
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6293
|
-
I("div",
|
|
6342
|
+
default: b(() => [e.visible ? (f(), k("div", nc, [
|
|
6343
|
+
I("div", rc, [I("div", ic, [V(j(Fi), {
|
|
6294
6344
|
size: 13,
|
|
6295
6345
|
"stroke-width": 2
|
|
6296
|
-
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div",
|
|
6346
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", ac, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6297
6347
|
key: 0,
|
|
6298
6348
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6299
6349
|
title: j(i).aiChat.clear,
|
|
6300
6350
|
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6301
|
-
}, [V(j(
|
|
6351
|
+
}, [V(j(Li), {
|
|
6302
6352
|
size: 14,
|
|
6303
6353
|
"stroke-width": 2
|
|
6304
|
-
})], 8,
|
|
6354
|
+
})], 8, oc)) : A("", !0), I("button", {
|
|
6305
6355
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6306
6356
|
onClick: n[1] ||= (e) => r("close")
|
|
6307
|
-
}, [V(j(
|
|
6357
|
+
}, [V(j(Hi), {
|
|
6308
6358
|
size: 14,
|
|
6309
6359
|
"stroke-width": 2
|
|
6310
6360
|
})])])]),
|
|
6311
|
-
I("div",
|
|
6361
|
+
I("div", sc, [
|
|
6312
6362
|
I("div", {
|
|
6313
6363
|
ref_key: "messagesContainer",
|
|
6314
6364
|
ref: p,
|
|
6315
6365
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6316
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6366
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", cc, [V(j(Ci), {
|
|
6317
6367
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6318
6368
|
size: 24,
|
|
6319
6369
|
"stroke-width": 2
|
|
6320
|
-
}), I("p",
|
|
6370
|
+
}), I("p", lc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", uc, [V(j(Fi), {
|
|
6321
6371
|
size: 32,
|
|
6322
6372
|
"stroke-width": 1.5,
|
|
6323
6373
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6324
|
-
}), I("p",
|
|
6374
|
+
}), I("p", dc, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", fc, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6325
6375
|
key: e.id,
|
|
6326
6376
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6327
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
6377
|
+
}, [e.role === "user" ? (f(), k("div", pc, D(e.content), 1)) : (f(), k("div", mc, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Zi, { key: 0 })) : (f(), k("div", hc, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6328
6378
|
key: 2,
|
|
6329
6379
|
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",
|
|
6330
6380
|
style: {
|
|
@@ -6333,19 +6383,19 @@ var Qs = {
|
|
|
6333
6383
|
"background-color": "transparent"
|
|
6334
6384
|
},
|
|
6335
6385
|
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6336
|
-
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(
|
|
6386
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(Oi), {
|
|
6337
6387
|
size: 12,
|
|
6338
6388
|
"stroke-width": 2
|
|
6339
|
-
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(
|
|
6389
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(zi), {
|
|
6340
6390
|
size: 12,
|
|
6341
6391
|
"stroke-width": 2
|
|
6342
6392
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6343
|
-
j(u).error.value ? (f(), k("div",
|
|
6393
|
+
j(u).error.value ? (f(), k("div", gc, [V(j(li), {
|
|
6344
6394
|
size: 14,
|
|
6345
6395
|
"stroke-width": 2,
|
|
6346
6396
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6347
6397
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6348
|
-
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div",
|
|
6398
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", _c, [I("div", vc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6349
6399
|
key: t,
|
|
6350
6400
|
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"]),
|
|
6351
6401
|
style: {
|
|
@@ -6355,104 +6405,104 @@ var Qs = {
|
|
|
6355
6405
|
"box-shadow": "var(--tpl-shadow)"
|
|
6356
6406
|
},
|
|
6357
6407
|
onClick: (t) => E(e)
|
|
6358
|
-
}, D(e), 11,
|
|
6408
|
+
}, D(e), 11, yc))), 128))])])) : A("", !0)
|
|
6359
6409
|
]),
|
|
6360
|
-
I("div",
|
|
6410
|
+
I("div", bc, [I("div", xc, [c(I("textarea", {
|
|
6361
6411
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6362
6412
|
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)]",
|
|
6363
6413
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6364
6414
|
disabled: j(u).isGenerating.value,
|
|
6365
6415
|
rows: "3",
|
|
6366
6416
|
onKeydown: te
|
|
6367
|
-
}, null, 40,
|
|
6417
|
+
}, null, 40, Sc), [[ae, d.value]]), I("button", {
|
|
6368
6418
|
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)]",
|
|
6369
6419
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6370
6420
|
onClick: ee
|
|
6371
|
-
}, [V(j(
|
|
6421
|
+
}, [V(j(ji), {
|
|
6372
6422
|
size: 16,
|
|
6373
6423
|
"stroke-width": 2
|
|
6374
|
-
})], 8,
|
|
6424
|
+
})], 8, Cc)]), I("p", wc, D(j(i).aiMenu.disclaimer), 1)])
|
|
6375
6425
|
])) : A("", !0)]),
|
|
6376
6426
|
_: 1
|
|
6377
6427
|
}));
|
|
6378
6428
|
}
|
|
6379
|
-
}),
|
|
6380
|
-
function
|
|
6429
|
+
}), Ec = /* @__PURE__ */ e({ default: () => Dc }), Dc = /*#__PURE__*/ qi(Tc, [["__scopeId", "data-v-a55e4bff"]]), Oc = 6e4, kc = 36e5, Ac = 864e5;
|
|
6430
|
+
function jc(e, t, n, r) {
|
|
6381
6431
|
let i = new Date(e).getTime();
|
|
6382
6432
|
if (Number.isNaN(i)) return null;
|
|
6383
6433
|
let a = Date.now() - i;
|
|
6384
6434
|
if (a < -6e4) return null;
|
|
6385
|
-
let o = Math.floor(a /
|
|
6435
|
+
let o = Math.floor(a / Oc), s = Math.floor(a / kc), c = Math.floor(a / Ac);
|
|
6386
6436
|
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));
|
|
6387
6437
|
}
|
|
6388
6438
|
//#endregion
|
|
6389
6439
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6390
|
-
var
|
|
6440
|
+
var Mc = {
|
|
6391
6441
|
key: 0,
|
|
6392
6442
|
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)]"
|
|
6393
|
-
},
|
|
6443
|
+
}, Nc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Pc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Fc = {
|
|
6394
6444
|
key: 0,
|
|
6395
6445
|
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)]"
|
|
6396
|
-
},
|
|
6446
|
+
}, Ic = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Lc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Rc = {
|
|
6397
6447
|
key: 0,
|
|
6398
6448
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6399
|
-
},
|
|
6449
|
+
}, zc = {
|
|
6400
6450
|
key: 1,
|
|
6401
6451
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6402
|
-
},
|
|
6452
|
+
}, Bc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vc = {
|
|
6403
6453
|
key: 2,
|
|
6404
6454
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6405
|
-
},
|
|
6455
|
+
}, Hc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Uc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Wc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Gc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Kc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, qc = {
|
|
6406
6456
|
key: 0,
|
|
6407
6457
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6408
|
-
},
|
|
6458
|
+
}, Jc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Yc = ["title", "onClick"], Xc = ["title", "onClick"], Zc = ["title", "onClick"], Qc = {
|
|
6409
6459
|
key: 0,
|
|
6410
6460
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6411
|
-
},
|
|
6461
|
+
}, $c = {
|
|
6412
6462
|
key: 0,
|
|
6413
6463
|
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)]"
|
|
6414
|
-
},
|
|
6464
|
+
}, el = ["onClick"], tl = {
|
|
6415
6465
|
key: 2,
|
|
6416
6466
|
class: "tpl:mt-2"
|
|
6417
|
-
},
|
|
6467
|
+
}, nl = ["onKeydown"], rl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, il = ["disabled", "onClick"], al = {
|
|
6418
6468
|
key: 3,
|
|
6419
6469
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6420
|
-
},
|
|
6470
|
+
}, ol = {
|
|
6421
6471
|
key: 4,
|
|
6422
6472
|
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)]"
|
|
6423
|
-
},
|
|
6473
|
+
}, sl = { class: "tpl:flex-1" }, cl = ["onClick"], ll = {
|
|
6424
6474
|
key: 5,
|
|
6425
6475
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6426
|
-
},
|
|
6476
|
+
}, ul = ["title", "onClick"], dl = ["onClick"], fl = {
|
|
6427
6477
|
key: 0,
|
|
6428
6478
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6429
|
-
},
|
|
6479
|
+
}, pl = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, ml = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, hl = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, gl = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, _l = {
|
|
6430
6480
|
key: 0,
|
|
6431
6481
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6432
|
-
},
|
|
6482
|
+
}, vl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, yl = ["title", "onClick"], bl = ["title", "onClick"], xl = {
|
|
6433
6483
|
key: 0,
|
|
6434
6484
|
class: "tpl:mt-1.5"
|
|
6435
|
-
},
|
|
6485
|
+
}, Sl = ["onKeydown"], Cl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, wl = ["disabled", "onClick"], Tl = {
|
|
6436
6486
|
key: 1,
|
|
6437
6487
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6438
|
-
},
|
|
6488
|
+
}, El = {
|
|
6439
6489
|
key: 2,
|
|
6440
6490
|
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)]"
|
|
6441
|
-
},
|
|
6491
|
+
}, Dl = { class: "tpl:flex-1" }, Ol = ["onClick"], kl = {
|
|
6442
6492
|
key: 0,
|
|
6443
6493
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6444
|
-
},
|
|
6494
|
+
}, Al = { class: "tpl:flex tpl:items-end tpl:gap-2" }, jl = ["placeholder", "onKeydown"], Ml = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Nl = ["disabled", "onClick"], Pl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fl = {
|
|
6445
6495
|
key: 0,
|
|
6446
6496
|
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)]"
|
|
6447
|
-
},
|
|
6497
|
+
}, Il = {
|
|
6448
6498
|
key: 1,
|
|
6449
6499
|
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)]"
|
|
6450
|
-
},
|
|
6500
|
+
}, Ll = ["placeholder", "disabled"], Rl = ["disabled"], zl = /*@__PURE__*/ B({
|
|
6451
6501
|
__name: "CommentsSidebar",
|
|
6452
6502
|
props: { visible: { type: Boolean } },
|
|
6453
6503
|
emits: ["close", "filterBlock"],
|
|
6454
6504
|
setup(e, { expose: t, emit: n }) {
|
|
6455
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6505
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = ra(), s = J(zn, "CommentsSidebar"), l = J(hr, "CommentsSidebar"), u = J(_r, "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(() => {
|
|
6456
6506
|
let e = /* @__PURE__ */ new Set();
|
|
6457
6507
|
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);
|
|
6458
6508
|
return e;
|
|
@@ -6520,7 +6570,7 @@ var Oc = {
|
|
|
6520
6570
|
return e.author_identifier === T.value;
|
|
6521
6571
|
}
|
|
6522
6572
|
function ve(e) {
|
|
6523
|
-
return
|
|
6573
|
+
return jc(e, o.snapshotHistory) ?? e;
|
|
6524
6574
|
}
|
|
6525
6575
|
function ye(e) {
|
|
6526
6576
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6547,22 +6597,22 @@ var Oc = {
|
|
|
6547
6597
|
"leave-from-class": "tpl:translate-x-0",
|
|
6548
6598
|
"leave-to-class": "tpl:translate-x-full"
|
|
6549
6599
|
}, {
|
|
6550
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6551
|
-
I("div",
|
|
6552
|
-
V(j(
|
|
6600
|
+
default: b(() => [e.visible ? (f(), k("div", Mc, [
|
|
6601
|
+
I("div", Nc, [I("div", Pc, [
|
|
6602
|
+
V(j(wi), {
|
|
6553
6603
|
size: 13,
|
|
6554
6604
|
"stroke-width": 2
|
|
6555
6605
|
}),
|
|
6556
6606
|
I("span", null, D(j(o).comments.title), 1),
|
|
6557
|
-
j(u).unresolvedCount.value > 0 ? (f(), k("span",
|
|
6607
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", Fc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6558
6608
|
]), I("button", {
|
|
6559
6609
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6560
6610
|
onClick: n[0] ||= (e) => i("close")
|
|
6561
|
-
}, [V(j(
|
|
6611
|
+
}, [V(j(Hi), {
|
|
6562
6612
|
size: 14,
|
|
6563
6613
|
"stroke-width": 2
|
|
6564
6614
|
})])]),
|
|
6565
|
-
I("div",
|
|
6615
|
+
I("div", Ic, [
|
|
6566
6616
|
I("button", {
|
|
6567
6617
|
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" : ""]),
|
|
6568
6618
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6577,156 +6627,156 @@ var Oc = {
|
|
|
6577
6627
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6578
6628
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6579
6629
|
]),
|
|
6580
|
-
I("div",
|
|
6630
|
+
I("div", Lc, [j(u).isLoading.value ? (f(), k("div", Rc, [V(j(Ci), {
|
|
6581
6631
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6582
6632
|
size: 24,
|
|
6583
6633
|
"stroke-width": 2
|
|
6584
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6634
|
+
})])) : re.value.length === 0 ? (f(), k("div", zc, [V(j(wi), {
|
|
6585
6635
|
size: 32,
|
|
6586
6636
|
"stroke-width": 1.5,
|
|
6587
6637
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6588
|
-
}), I("p",
|
|
6638
|
+
}), I("p", Bc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", Vc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6589
6639
|
key: e.id,
|
|
6590
6640
|
class: "tpl-comment-thread"
|
|
6591
6641
|
}, [
|
|
6592
|
-
I("div",
|
|
6593
|
-
I("div",
|
|
6594
|
-
I("span",
|
|
6595
|
-
I("span",
|
|
6596
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6597
|
-
]), I("div",
|
|
6642
|
+
I("div", Hc, [
|
|
6643
|
+
I("div", Uc, [I("div", Wc, [
|
|
6644
|
+
I("span", Gc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6645
|
+
I("span", Kc, D(ve(e.created_at)), 1),
|
|
6646
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", qc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6647
|
+
]), I("div", Jc, [
|
|
6598
6648
|
I("button", {
|
|
6599
6649
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6600
6650
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6601
6651
|
onClick: (t) => ge(e.id)
|
|
6602
|
-
}, [V(j(
|
|
6652
|
+
}, [V(j(ui), {
|
|
6603
6653
|
size: 13,
|
|
6604
6654
|
"stroke-width": 2,
|
|
6605
6655
|
class: "tpl-resolve-icon",
|
|
6606
6656
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6607
|
-
}, null, 8, ["style"])], 8,
|
|
6657
|
+
}, null, 8, ["style"])], 8, Yc),
|
|
6608
6658
|
_e(e) ? (f(), k("button", {
|
|
6609
6659
|
key: 0,
|
|
6610
6660
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6611
6661
|
title: j(o).comments.edit,
|
|
6612
6662
|
onClick: (t) => le(e)
|
|
6613
|
-
}, [V(j(
|
|
6663
|
+
}, [V(j(Ei), {
|
|
6614
6664
|
size: 12,
|
|
6615
6665
|
"stroke-width": 2
|
|
6616
|
-
})], 8,
|
|
6666
|
+
})], 8, Xc)) : A("", !0),
|
|
6617
6667
|
_e(e) ? (f(), k("button", {
|
|
6618
6668
|
key: 1,
|
|
6619
6669
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6620
6670
|
title: j(o).comments.delete,
|
|
6621
6671
|
onClick: (t) => ue(e.id)
|
|
6622
|
-
}, [V(j(
|
|
6672
|
+
}, [V(j(Li), {
|
|
6623
6673
|
size: 12,
|
|
6624
6674
|
"stroke-width": 2
|
|
6625
|
-
})], 8,
|
|
6675
|
+
})], 8, Zc)) : A("", !0)
|
|
6626
6676
|
])]),
|
|
6627
6677
|
V(ie, { name: "tpl-resolve" }, {
|
|
6628
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6678
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Qc, [V(j(ii), {
|
|
6629
6679
|
size: 10,
|
|
6630
6680
|
"stroke-width": 2.5
|
|
6631
6681
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6632
6682
|
_: 2
|
|
6633
6683
|
}, 1024),
|
|
6634
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6684
|
+
e.block_id && te(e.block_id) ? (f(), k("span", $c, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6635
6685
|
key: 1,
|
|
6636
6686
|
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)]",
|
|
6637
6687
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6638
|
-
}, " Block ", 8,
|
|
6639
|
-
y.value === e.id ? (f(), k("div",
|
|
6688
|
+
}, " Block ", 8, el)) : A("", !0),
|
|
6689
|
+
y.value === e.id ? (f(), k("div", tl, [c(I("textarea", {
|
|
6640
6690
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6641
6691
|
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)]",
|
|
6642
6692
|
rows: "3",
|
|
6643
6693
|
onKeydown: (t) => xe(t, e.id)
|
|
6644
|
-
}, null, 40,
|
|
6694
|
+
}, null, 40, nl), [[ae, x.value]]), I("div", rl, [I("button", {
|
|
6645
6695
|
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)]",
|
|
6646
6696
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6647
6697
|
onClick: (t) => me(e.id)
|
|
6648
|
-
}, D(j(o).comments.save), 9,
|
|
6698
|
+
}, D(j(o).comments.save), 9, il), I("button", {
|
|
6649
6699
|
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)]",
|
|
6650
6700
|
onClick: n[5] ||= (e) => B()
|
|
6651
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6652
|
-
w.value === e.id ? (f(), k("div",
|
|
6653
|
-
I("span",
|
|
6701
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", al, D(e.body), 1)),
|
|
6702
|
+
w.value === e.id ? (f(), k("div", ol, [
|
|
6703
|
+
I("span", sl, D(j(o).comments.deleteConfirm), 1),
|
|
6654
6704
|
I("button", {
|
|
6655
6705
|
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)]",
|
|
6656
6706
|
onClick: (t) => he(e.id)
|
|
6657
|
-
}, D(j(o).comments.delete), 9,
|
|
6707
|
+
}, D(j(o).comments.delete), 9, cl),
|
|
6658
6708
|
I("button", {
|
|
6659
6709
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6660
6710
|
onClick: n[6] ||= (e) => de()
|
|
6661
6711
|
}, D(j(o).comments.cancel), 1)
|
|
6662
6712
|
])) : A("", !0),
|
|
6663
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6713
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", ll, [I("button", {
|
|
6664
6714
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6665
6715
|
title: j(o).comments.reply,
|
|
6666
6716
|
onClick: (t) => se(e.id)
|
|
6667
|
-
}, [V(j(
|
|
6717
|
+
}, [V(j(Ai), {
|
|
6668
6718
|
size: 13,
|
|
6669
6719
|
"stroke-width": 2,
|
|
6670
6720
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6671
|
-
})], 8,
|
|
6721
|
+
})], 8, ul), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6672
6722
|
key: 0,
|
|
6673
6723
|
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)]",
|
|
6674
6724
|
onClick: (t) => oe(e.id)
|
|
6675
|
-
}, [S.value.has(e.id) ? (f(), N(j(
|
|
6725
|
+
}, [S.value.has(e.id) ? (f(), N(j(ci), {
|
|
6676
6726
|
key: 0,
|
|
6677
6727
|
size: 11,
|
|
6678
6728
|
"stroke-width": 2
|
|
6679
|
-
})) : (f(), N(j(
|
|
6729
|
+
})) : (f(), N(j(ai), {
|
|
6680
6730
|
key: 1,
|
|
6681
6731
|
size: 11,
|
|
6682
6732
|
"stroke-width": 2
|
|
6683
|
-
})), 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,
|
|
6733
|
+
})), 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, dl)) : A("", !0)])) : A("", !0)
|
|
6684
6734
|
]),
|
|
6685
6735
|
V(ie, { name: "tpl-replies" }, {
|
|
6686
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6736
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", fl, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6687
6737
|
key: t.id,
|
|
6688
6738
|
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" : ""])
|
|
6689
6739
|
}, [
|
|
6690
|
-
I("div",
|
|
6691
|
-
I("span",
|
|
6692
|
-
I("span",
|
|
6693
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6694
|
-
]), I("div",
|
|
6740
|
+
I("div", pl, [I("div", ml, [
|
|
6741
|
+
I("span", hl, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6742
|
+
I("span", gl, D(ve(t.created_at)), 1),
|
|
6743
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", _l, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6744
|
+
]), I("div", vl, [_e(t) ? (f(), k("button", {
|
|
6695
6745
|
key: 0,
|
|
6696
6746
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6697
6747
|
title: j(o).comments.edit,
|
|
6698
6748
|
onClick: (e) => le(t)
|
|
6699
|
-
}, [V(j(
|
|
6749
|
+
}, [V(j(Ei), {
|
|
6700
6750
|
size: 11,
|
|
6701
6751
|
"stroke-width": 2
|
|
6702
|
-
})], 8,
|
|
6752
|
+
})], 8, yl)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6703
6753
|
key: 1,
|
|
6704
6754
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6705
6755
|
title: j(o).comments.delete,
|
|
6706
6756
|
onClick: (e) => ue(t.id)
|
|
6707
|
-
}, [V(j(
|
|
6757
|
+
}, [V(j(Li), {
|
|
6708
6758
|
size: 11,
|
|
6709
6759
|
"stroke-width": 2
|
|
6710
|
-
})], 8,
|
|
6711
|
-
y.value === t.id ? (f(), k("div",
|
|
6760
|
+
})], 8, bl)) : A("", !0)])]),
|
|
6761
|
+
y.value === t.id ? (f(), k("div", xl, [c(I("textarea", {
|
|
6712
6762
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6713
6763
|
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)]",
|
|
6714
6764
|
rows: "2",
|
|
6715
6765
|
onKeydown: (e) => xe(e, t.id)
|
|
6716
|
-
}, null, 40,
|
|
6766
|
+
}, null, 40, Sl), [[ae, x.value]]), I("div", Cl, [I("button", {
|
|
6717
6767
|
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)]",
|
|
6718
6768
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6719
6769
|
onClick: (e) => me(t.id)
|
|
6720
|
-
}, D(j(o).comments.save), 9,
|
|
6770
|
+
}, D(j(o).comments.save), 9, wl), I("button", {
|
|
6721
6771
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6722
6772
|
onClick: n[8] ||= (e) => B()
|
|
6723
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6724
|
-
w.value === t.id ? (f(), k("div",
|
|
6725
|
-
I("span",
|
|
6773
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Tl, D(t.body), 1)),
|
|
6774
|
+
w.value === t.id ? (f(), k("div", El, [
|
|
6775
|
+
I("span", Dl, D(j(o).comments.deleteConfirm), 1),
|
|
6726
6776
|
I("button", {
|
|
6727
6777
|
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)]",
|
|
6728
6778
|
onClick: (e) => he(t.id)
|
|
6729
|
-
}, D(j(o).comments.delete), 9,
|
|
6779
|
+
}, D(j(o).comments.delete), 9, Ol),
|
|
6730
6780
|
I("button", {
|
|
6731
6781
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6732
6782
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6736,30 +6786,30 @@ var Oc = {
|
|
|
6736
6786
|
_: 2
|
|
6737
6787
|
}, 1024),
|
|
6738
6788
|
V(ie, { name: "tpl-replies" }, {
|
|
6739
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6789
|
+
default: b(() => [_.value === e.id ? (f(), k("div", kl, [I("div", Al, [c(I("textarea", {
|
|
6740
6790
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6741
6791
|
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)]",
|
|
6742
6792
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6743
6793
|
rows: "2",
|
|
6744
6794
|
onKeydown: (t) => be(t, e.id)
|
|
6745
|
-
}, null, 40,
|
|
6795
|
+
}, null, 40, jl), [[ae, v.value]]), I("div", Ml, [I("button", {
|
|
6746
6796
|
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)]",
|
|
6747
6797
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6748
6798
|
onClick: (t) => pe(e.id)
|
|
6749
|
-
}, [V(j(
|
|
6799
|
+
}, [V(j(ji), {
|
|
6750
6800
|
size: 14,
|
|
6751
6801
|
"stroke-width": 2
|
|
6752
|
-
})], 8,
|
|
6802
|
+
})], 8, Nl), I("button", {
|
|
6753
6803
|
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)]",
|
|
6754
6804
|
onClick: n[11] ||= (e) => ce()
|
|
6755
|
-
}, [V(j(
|
|
6805
|
+
}, [V(j(Hi), {
|
|
6756
6806
|
size: 14,
|
|
6757
6807
|
"stroke-width": 2
|
|
6758
6808
|
})])])])])) : A("", !0)]),
|
|
6759
6809
|
_: 2
|
|
6760
6810
|
}, 1024)
|
|
6761
6811
|
]))), 128))]))]),
|
|
6762
|
-
I("div",
|
|
6812
|
+
I("div", Pl, [ne.value ? (f(), k("div", Fl, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Il, [c(I("textarea", {
|
|
6763
6813
|
ref_key: "newCommentInput",
|
|
6764
6814
|
ref: ee,
|
|
6765
6815
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6768,46 +6818,46 @@ var Oc = {
|
|
|
6768
6818
|
disabled: j(u).isSubmitting.value,
|
|
6769
6819
|
rows: "2",
|
|
6770
6820
|
onKeydown: ye
|
|
6771
|
-
}, null, 40,
|
|
6821
|
+
}, null, 40, Ll), [[ae, g.value]]), I("button", {
|
|
6772
6822
|
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)]",
|
|
6773
6823
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6774
6824
|
onClick: fe
|
|
6775
|
-
}, [j(u).isSubmitting.value ? (f(), N(j(
|
|
6825
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(Ci), {
|
|
6776
6826
|
key: 0,
|
|
6777
6827
|
class: "tpl-spinner",
|
|
6778
6828
|
size: 16,
|
|
6779
6829
|
"stroke-width": 2
|
|
6780
|
-
})) : (f(), N(j(
|
|
6830
|
+
})) : (f(), N(j(ji), {
|
|
6781
6831
|
key: 1,
|
|
6782
6832
|
size: 16,
|
|
6783
6833
|
"stroke-width": 2
|
|
6784
|
-
}))], 8,
|
|
6834
|
+
}))], 8, Rl)]))])
|
|
6785
6835
|
])) : A("", !0)]),
|
|
6786
6836
|
_: 1
|
|
6787
6837
|
}));
|
|
6788
6838
|
}
|
|
6789
|
-
}),
|
|
6839
|
+
}), Bl = /* @__PURE__ */ e({ default: () => Vl }), Vl = /*#__PURE__*/ qi(zl, [["__scopeId", "data-v-d204f573"]]), Hl = {
|
|
6790
6840
|
key: 0,
|
|
6791
6841
|
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)]"
|
|
6792
|
-
},
|
|
6842
|
+
}, Ul = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Wl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Gl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Kl = {
|
|
6793
6843
|
key: 0,
|
|
6794
6844
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6795
|
-
},
|
|
6845
|
+
}, ql = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Jl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yl = {
|
|
6796
6846
|
key: 1,
|
|
6797
6847
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6798
|
-
},
|
|
6848
|
+
}, Xl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Zl = {
|
|
6799
6849
|
key: 0,
|
|
6800
6850
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6801
|
-
},
|
|
6851
|
+
}, Ql = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, $l = ["src", "alt"], eu = {
|
|
6802
6852
|
key: 1,
|
|
6803
6853
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6804
|
-
},
|
|
6854
|
+
}, tu = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, nu = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ru = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, iu = ["accept"], au = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ou = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, su = ["placeholder"], cu = {
|
|
6805
6855
|
key: 0,
|
|
6806
6856
|
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)]"
|
|
6807
|
-
},
|
|
6857
|
+
}, lu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, uu = { class: "tpl:flex tpl:gap-2" }, du = {
|
|
6808
6858
|
key: 1,
|
|
6809
6859
|
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)]"
|
|
6810
|
-
},
|
|
6860
|
+
}, fu = ["disabled"], pu = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, mu = /*@__PURE__*/ B({
|
|
6811
6861
|
__name: "DesignReferenceSidebar",
|
|
6812
6862
|
props: {
|
|
6813
6863
|
visible: { type: Boolean },
|
|
@@ -6815,8 +6865,8 @@ var Oc = {
|
|
|
6815
6865
|
},
|
|
6816
6866
|
emits: ["close", "apply"],
|
|
6817
6867
|
setup(e, { emit: t }) {
|
|
6818
|
-
let n = e, r = t, { t: i } =
|
|
6819
|
-
authManager: J(
|
|
6868
|
+
let n = e, r = t, { t: i } = ra(), a = J(zn, "DesignReferenceSidebar"), o = Fs({
|
|
6869
|
+
authManager: J(hr, "DesignReferenceSidebar"),
|
|
6820
6870
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6821
6871
|
onApply: (e) => r("apply", e)
|
|
6822
6872
|
}), 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 && u.value !== null);
|
|
@@ -6887,17 +6937,17 @@ var Oc = {
|
|
|
6887
6937
|
"leave-from-class": "tpl:translate-x-0",
|
|
6888
6938
|
"leave-to-class": "tpl:translate-x-full"
|
|
6889
6939
|
}, {
|
|
6890
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6940
|
+
default: b(() => [e.visible ? (f(), k("div", Hl, [I("div", Ul, [I("div", Wl, [V(j(bi), {
|
|
6891
6941
|
size: 13,
|
|
6892
6942
|
"stroke-width": 2
|
|
6893
6943
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6894
6944
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6895
6945
|
onClick: n[0] ||= (e) => r("close")
|
|
6896
|
-
}, [V(j(
|
|
6946
|
+
}, [V(j(Hi), {
|
|
6897
6947
|
size: 14,
|
|
6898
6948
|
"stroke-width": 2
|
|
6899
|
-
})])]), I("div",
|
|
6900
|
-
I("div",
|
|
6949
|
+
})])]), I("div", Gl, [j(o).isGenerating.value ? (f(), k("div", Kl, [I("div", ql, [V(Zi), I("p", Jl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Yl, [
|
|
6950
|
+
I("div", Xl, [I("button", {
|
|
6901
6951
|
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",
|
|
6902
6952
|
style: L({
|
|
6903
6953
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6905,7 +6955,7 @@ var Oc = {
|
|
|
6905
6955
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6906
6956
|
}),
|
|
6907
6957
|
onClick: n[1] ||= (e) => _("image")
|
|
6908
|
-
}, [V(j(
|
|
6958
|
+
}, [V(j(gi), {
|
|
6909
6959
|
size: 12,
|
|
6910
6960
|
"stroke-width": 2
|
|
6911
6961
|
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
@@ -6916,23 +6966,23 @@ var Oc = {
|
|
|
6916
6966
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6917
6967
|
}),
|
|
6918
6968
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6919
|
-
}, [V(j(
|
|
6969
|
+
}, [V(j(_i), {
|
|
6920
6970
|
size: 12,
|
|
6921
6971
|
"stroke-width": 2
|
|
6922
6972
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6923
|
-
I("div", null, [u.value ? (f(), k("div",
|
|
6973
|
+
I("div", null, [u.value ? (f(), k("div", Zl, [I("div", Ql, [p.value ? (f(), k("img", {
|
|
6924
6974
|
key: 0,
|
|
6925
6975
|
src: p.value,
|
|
6926
6976
|
alt: u.value.name,
|
|
6927
6977
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6928
|
-
}, null, 8,
|
|
6978
|
+
}, null, 8, $l)) : (f(), k("div", eu, [V(j(_i), {
|
|
6929
6979
|
size: 32,
|
|
6930
6980
|
"stroke-width": 1.5,
|
|
6931
6981
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6932
|
-
}), I("span",
|
|
6982
|
+
}), I("span", tu, D(u.value.name), 1)])), I("button", {
|
|
6933
6983
|
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)]",
|
|
6934
6984
|
onClick: x
|
|
6935
|
-
}, [V(j(
|
|
6985
|
+
}, [V(j(Hi), {
|
|
6936
6986
|
size: 12,
|
|
6937
6987
|
"stroke-width": 2
|
|
6938
6988
|
})])])])) : (f(), k("div", {
|
|
@@ -6947,13 +6997,13 @@ var Oc = {
|
|
|
6947
6997
|
onDragleave: w,
|
|
6948
6998
|
onDrop: ee
|
|
6949
6999
|
}, [
|
|
6950
|
-
V(j(
|
|
7000
|
+
V(j(Bi), {
|
|
6951
7001
|
size: 24,
|
|
6952
7002
|
"stroke-width": 1.5,
|
|
6953
7003
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6954
7004
|
}),
|
|
6955
|
-
I("span",
|
|
6956
|
-
I("span",
|
|
7005
|
+
I("span", nu, D(j(i).designReference.dropHint), 1),
|
|
7006
|
+
I("span", ru, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6957
7007
|
], 36)), I("input", {
|
|
6958
7008
|
ref_key: "fileInput",
|
|
6959
7009
|
ref: s,
|
|
@@ -6961,14 +7011,14 @@ var Oc = {
|
|
|
6961
7011
|
class: "tpl:hidden",
|
|
6962
7012
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6963
7013
|
onChange: v
|
|
6964
|
-
}, null, 40,
|
|
6965
|
-
I("div",
|
|
7014
|
+
}, null, 40, iu)]),
|
|
7015
|
+
I("div", au, [I("label", ou, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6966
7016
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6967
7017
|
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"]]),
|
|
6968
7018
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6969
7019
|
rows: "3"
|
|
6970
|
-
}, null, 8,
|
|
6971
|
-
m.value ? (f(), k("div",
|
|
7020
|
+
}, null, 8, su), [[ae, d.value]])]),
|
|
7021
|
+
m.value ? (f(), k("div", cu, [I("p", lu, D(j(i).designReference.replaceWarning), 1), I("div", uu, [I("button", {
|
|
6972
7022
|
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)]",
|
|
6973
7023
|
style: { "background-color": "transparent" },
|
|
6974
7024
|
onClick: E
|
|
@@ -6976,7 +7026,7 @@ var Oc = {
|
|
|
6976
7026
|
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)]",
|
|
6977
7027
|
onClick: T
|
|
6978
7028
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6979
|
-
j(o).error.value ? (f(), k("div",
|
|
7029
|
+
j(o).error.value ? (f(), k("div", du, [V(j(li), {
|
|
6980
7030
|
size: 14,
|
|
6981
7031
|
"stroke-width": 2,
|
|
6982
7032
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6986,35 +7036,35 @@ var Oc = {
|
|
|
6986
7036
|
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)]",
|
|
6987
7037
|
disabled: !g.value,
|
|
6988
7038
|
onClick: T
|
|
6989
|
-
}, [V(j(
|
|
7039
|
+
}, [V(j(bi), {
|
|
6990
7040
|
size: 16,
|
|
6991
7041
|
"stroke-width": 2
|
|
6992
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
6993
|
-
I("p",
|
|
7042
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, fu)),
|
|
7043
|
+
I("p", pu, D(j(i).aiMenu.disclaimer), 1)
|
|
6994
7044
|
]))])])) : A("", !0)]),
|
|
6995
7045
|
_: 1
|
|
6996
7046
|
}));
|
|
6997
7047
|
}
|
|
6998
|
-
}),
|
|
7048
|
+
}), hu = /* @__PURE__ */ e({ default: () => gu }), gu = /*#__PURE__*/ qi(mu, [["__scopeId", "data-v-bdbf8d0d"]]), _u = ["disabled", "title"], vu = ["title"], yu = {
|
|
6999
7049
|
key: 0,
|
|
7000
7050
|
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)]",
|
|
7001
7051
|
style: {
|
|
7002
7052
|
"backdrop-filter": "blur(8px)",
|
|
7003
7053
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
7004
7054
|
}
|
|
7005
|
-
},
|
|
7055
|
+
}, bu = { 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)]" }, xu = {
|
|
7006
7056
|
key: 0,
|
|
7007
7057
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
7008
|
-
},
|
|
7058
|
+
}, Su = {
|
|
7009
7059
|
key: 1,
|
|
7010
7060
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
7011
|
-
},
|
|
7061
|
+
}, Cu = {
|
|
7012
7062
|
key: 2,
|
|
7013
7063
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
7014
|
-
},
|
|
7064
|
+
}, wu = ["disabled", "onClick"], Tu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Eu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Du = {
|
|
7015
7065
|
key: 0,
|
|
7016
7066
|
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)]"
|
|
7017
|
-
},
|
|
7067
|
+
}, Ou = ["disabled", "title"], ku = /*@__PURE__*/ B({
|
|
7018
7068
|
__name: "SnapshotHistory",
|
|
7019
7069
|
props: {
|
|
7020
7070
|
snapshots: {},
|
|
@@ -7023,7 +7073,7 @@ var Oc = {
|
|
|
7023
7073
|
},
|
|
7024
7074
|
emits: ["load", "navigate"],
|
|
7025
7075
|
setup(e, { emit: t }) {
|
|
7026
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
7076
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = ra(), o = C(!1), s = C(null), c = C(-1);
|
|
7027
7077
|
H(() => n.snapshots.length, () => {
|
|
7028
7078
|
c.value = -1;
|
|
7029
7079
|
});
|
|
@@ -7042,7 +7092,7 @@ var Oc = {
|
|
|
7042
7092
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
7043
7093
|
}
|
|
7044
7094
|
function _(e) {
|
|
7045
|
-
let t =
|
|
7095
|
+
let t = jc(e, a.snapshotHistory, i, 7);
|
|
7046
7096
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
7047
7097
|
month: "short",
|
|
7048
7098
|
day: "numeric",
|
|
@@ -7062,34 +7112,34 @@ var Oc = {
|
|
|
7062
7112
|
disabled: !u.value,
|
|
7063
7113
|
title: j(a).snapshotHistory.olderSnapshot,
|
|
7064
7114
|
onClick: M(p, ["stop"])
|
|
7065
|
-
}, [V(j(
|
|
7115
|
+
}, [V(j(oi), {
|
|
7066
7116
|
size: 14,
|
|
7067
7117
|
"stroke-width": 2
|
|
7068
|
-
})], 8,
|
|
7118
|
+
})], 8, _u),
|
|
7069
7119
|
I("button", {
|
|
7070
7120
|
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)]",
|
|
7071
7121
|
title: j(a).snapshotHistory.tooltip,
|
|
7072
7122
|
onClick: M(m, ["stop"])
|
|
7073
|
-
}, [V(j(
|
|
7123
|
+
}, [V(j(di), {
|
|
7074
7124
|
size: 16,
|
|
7075
7125
|
"stroke-width": 1.5
|
|
7076
|
-
}), V(j(
|
|
7126
|
+
}), V(j(ai), {
|
|
7077
7127
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
7078
7128
|
size: 10,
|
|
7079
7129
|
"stroke-width": 2
|
|
7080
|
-
}, null, 8, ["class"])], 8,
|
|
7130
|
+
}, null, 8, ["class"])], 8, vu),
|
|
7081
7131
|
V(ie, { name: "tpl-dropdown" }, {
|
|
7082
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
7132
|
+
default: b(() => [o.value ? (f(), k("div", yu, [I("div", bu, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", xu, [V(j(Ci), {
|
|
7083
7133
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
7084
7134
|
size: 20,
|
|
7085
7135
|
"stroke-width": 2
|
|
7086
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
7136
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", Su, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Cu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
7087
7137
|
key: t.id,
|
|
7088
7138
|
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)]",
|
|
7089
7139
|
style: { "background-color": "transparent" },
|
|
7090
7140
|
disabled: e.isRestoring,
|
|
7091
7141
|
onClick: (e) => g(t.id)
|
|
7092
|
-
}, [I("div",
|
|
7142
|
+
}, [I("div", Tu, [I("div", Eu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", Du, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, wu))), 128))]))])) : A("", !0)]),
|
|
7093
7143
|
_: 1
|
|
7094
7144
|
}),
|
|
7095
7145
|
I("button", {
|
|
@@ -7097,74 +7147,74 @@ var Oc = {
|
|
|
7097
7147
|
disabled: !l.value,
|
|
7098
7148
|
title: j(a).snapshotHistory.newerSnapshot,
|
|
7099
7149
|
onClick: M(d, ["stop"])
|
|
7100
|
-
}, [V(j(
|
|
7150
|
+
}, [V(j(si), {
|
|
7101
7151
|
size: 14,
|
|
7102
7152
|
"stroke-width": 2
|
|
7103
|
-
})], 8,
|
|
7153
|
+
})], 8, Ou)
|
|
7104
7154
|
], 512));
|
|
7105
7155
|
}
|
|
7106
|
-
}),
|
|
7156
|
+
}), Au = /* @__PURE__ */ e({ default: () => ju }), ju = ku;
|
|
7107
7157
|
//#endregion
|
|
7108
7158
|
//#region src/cloud/utils/scoringStyles.ts
|
|
7109
|
-
function
|
|
7159
|
+
function Mu(e) {
|
|
7110
7160
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
7111
7161
|
}
|
|
7112
|
-
function
|
|
7162
|
+
function Nu(e) {
|
|
7113
7163
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
7114
7164
|
}
|
|
7115
|
-
function
|
|
7165
|
+
function Pu(e) {
|
|
7116
7166
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
7117
7167
|
}
|
|
7118
|
-
function
|
|
7168
|
+
function Fu(e) {
|
|
7119
7169
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
7120
7170
|
}
|
|
7121
7171
|
//#endregion
|
|
7122
7172
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7123
|
-
var
|
|
7173
|
+
var Iu = {
|
|
7124
7174
|
key: 0,
|
|
7125
7175
|
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)]"
|
|
7126
|
-
},
|
|
7176
|
+
}, Lu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ru = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, zu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Bu = ["title"], Vu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Hu = {
|
|
7127
7177
|
key: 0,
|
|
7128
7178
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7129
|
-
},
|
|
7179
|
+
}, Uu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wu = {
|
|
7130
7180
|
key: 1,
|
|
7131
7181
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7132
|
-
},
|
|
7182
|
+
}, Gu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ku = {
|
|
7133
7183
|
key: 2,
|
|
7134
7184
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
7135
|
-
},
|
|
7185
|
+
}, qu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Ju = {
|
|
7136
7186
|
key: 0,
|
|
7137
7187
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7138
|
-
},
|
|
7188
|
+
}, Yu = {
|
|
7139
7189
|
key: 0,
|
|
7140
7190
|
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)]"
|
|
7141
|
-
},
|
|
7191
|
+
}, Xu = ["onClick"], Zu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Qu = {
|
|
7142
7192
|
key: 0,
|
|
7143
7193
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
7144
|
-
},
|
|
7194
|
+
}, $u = {
|
|
7145
7195
|
key: 0,
|
|
7146
7196
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
7147
|
-
},
|
|
7197
|
+
}, ed = {
|
|
7148
7198
|
key: 0,
|
|
7149
7199
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7150
|
-
},
|
|
7200
|
+
}, td = { class: "tpl:flex tpl:items-start tpl:gap-2" }, nd = { class: "tpl:flex-1 tpl:min-w-0" }, rd = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, id = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ad = {
|
|
7151
7201
|
key: 0,
|
|
7152
7202
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
7153
|
-
},
|
|
7203
|
+
}, od = {
|
|
7154
7204
|
key: 1,
|
|
7155
7205
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
7156
|
-
},
|
|
7206
|
+
}, sd = ["disabled", "onClick"], cd = {
|
|
7157
7207
|
key: 0,
|
|
7158
7208
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
7159
|
-
},
|
|
7209
|
+
}, ld = {
|
|
7160
7210
|
key: 3,
|
|
7161
7211
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7162
|
-
},
|
|
7212
|
+
}, ud = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, dd = { 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)]" }, fd = /*@__PURE__*/ B({
|
|
7163
7213
|
__name: "TemplateScoringPanel",
|
|
7164
7214
|
props: { visible: { type: Boolean } },
|
|
7165
7215
|
emits: ["close"],
|
|
7166
7216
|
setup(e, { emit: t }) {
|
|
7167
|
-
let n = e, r = t, { t: i } =
|
|
7217
|
+
let n = e, r = t, { t: i } = ra(), a = J(zn, "TemplateScoringPanel"), o = J(yr, "TemplateScoringPanel"), s = v(Qn, []), c = C({
|
|
7168
7218
|
spam: !0,
|
|
7169
7219
|
readability: !0,
|
|
7170
7220
|
accessibility: !0,
|
|
@@ -7179,10 +7229,10 @@ var Mu = {
|
|
|
7179
7229
|
"accessibility",
|
|
7180
7230
|
"bestPractices"
|
|
7181
7231
|
], p = {
|
|
7182
|
-
spam:
|
|
7183
|
-
readability:
|
|
7184
|
-
accessibility:
|
|
7185
|
-
bestPractices:
|
|
7232
|
+
spam: Pi,
|
|
7233
|
+
readability: hi,
|
|
7234
|
+
accessibility: Fi,
|
|
7235
|
+
bestPractices: Ui
|
|
7186
7236
|
};
|
|
7187
7237
|
function m() {
|
|
7188
7238
|
o.score(a.content.value, s);
|
|
@@ -7210,50 +7260,50 @@ var Mu = {
|
|
|
7210
7260
|
"leave-from-class": "tpl:translate-x-0",
|
|
7211
7261
|
"leave-to-class": "tpl:translate-x-full"
|
|
7212
7262
|
}, {
|
|
7213
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
7263
|
+
default: b(() => [e.visible ? (f(), k("div", Iu, [I("div", Lu, [I("div", Ru, [V(j(Ni), {
|
|
7214
7264
|
size: 13,
|
|
7215
7265
|
"stroke-width": 2
|
|
7216
|
-
}), I("span", null, D(j(i).scoring.title), 1)]), I("div",
|
|
7266
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", zu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
7217
7267
|
key: 0,
|
|
7218
7268
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7219
7269
|
title: j(i).scoring.rescore,
|
|
7220
7270
|
onClick: n[0] ||= (e) => m()
|
|
7221
|
-
}, [V(j(
|
|
7271
|
+
}, [V(j(ki), {
|
|
7222
7272
|
size: 14,
|
|
7223
7273
|
"stroke-width": 2
|
|
7224
|
-
})], 8,
|
|
7274
|
+
})], 8, Bu)) : A("", !0), I("button", {
|
|
7225
7275
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7226
7276
|
onClick: n[1] ||= (e) => r("close")
|
|
7227
|
-
}, [V(j(
|
|
7277
|
+
}, [V(j(Hi), {
|
|
7228
7278
|
size: 14,
|
|
7229
7279
|
"stroke-width": 2
|
|
7230
|
-
})])])]), I("div",
|
|
7231
|
-
V(j(
|
|
7280
|
+
})])])]), I("div", Vu, [j(o).isScoring.value ? (f(), k("div", Hu, [I("p", Uu, D(j(i).scoring.scoring), 1), V(Zi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", Wu, [
|
|
7281
|
+
V(j(li), {
|
|
7232
7282
|
size: 32,
|
|
7233
7283
|
"stroke-width": 1.5,
|
|
7234
7284
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7235
7285
|
}),
|
|
7236
|
-
I("p",
|
|
7286
|
+
I("p", Gu, D(j(i).scoring.error), 1),
|
|
7237
7287
|
I("button", {
|
|
7238
7288
|
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)]",
|
|
7239
7289
|
onClick: n[2] ||= (e) => m()
|
|
7240
|
-
}, [V(j(
|
|
7290
|
+
}, [V(j(ki), {
|
|
7241
7291
|
size: 12,
|
|
7242
7292
|
"stroke-width": 2
|
|
7243
7293
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7244
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
7294
|
+
])) : j(o).scoringResult.value ? (f(), k("div", Ku, [
|
|
7245
7295
|
I("div", {
|
|
7246
7296
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7247
|
-
style: L({ backgroundColor: j(
|
|
7297
|
+
style: L({ backgroundColor: j(Nu)(j(o).scoringResult.value.score) })
|
|
7248
7298
|
}, [
|
|
7249
7299
|
I("span", {
|
|
7250
7300
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7251
|
-
style: L({ color: j(
|
|
7301
|
+
style: L({ color: j(Mu)(j(o).scoringResult.value.score) })
|
|
7252
7302
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7253
|
-
I("span",
|
|
7254
|
-
_() > 0 ? (f(), k("span",
|
|
7303
|
+
I("span", qu, D(j(i).scoring.overallScore), 1),
|
|
7304
|
+
_() > 0 ? (f(), k("span", Ju, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
7255
7305
|
], 4),
|
|
7256
|
-
j(o).fixError.value ? (f(), k("div",
|
|
7306
|
+
j(o).fixError.value ? (f(), k("div", Yu, [V(j(li), {
|
|
7257
7307
|
size: 14,
|
|
7258
7308
|
"stroke-width": 2,
|
|
7259
7309
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7268,74 +7318,74 @@ var Mu = {
|
|
|
7268
7318
|
(f(), N(d(p[e]), {
|
|
7269
7319
|
size: 14,
|
|
7270
7320
|
"stroke-width": 2,
|
|
7271
|
-
style: L({ color: j(
|
|
7321
|
+
style: L({ color: j(Mu)(j(o).scoringResult.value.categories[e].score) })
|
|
7272
7322
|
}, null, 8, ["style"])),
|
|
7273
|
-
I("span",
|
|
7323
|
+
I("span", Zu, D(j(i).scoring.categories[e]), 1),
|
|
7274
7324
|
I("span", {
|
|
7275
7325
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7276
7326
|
style: L({
|
|
7277
|
-
color: j(
|
|
7278
|
-
backgroundColor: j(
|
|
7327
|
+
color: j(Mu)(j(o).scoringResult.value.categories[e].score),
|
|
7328
|
+
backgroundColor: j(Nu)(j(o).scoringResult.value.categories[e].score)
|
|
7279
7329
|
})
|
|
7280
7330
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7281
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7282
|
-
V(j(
|
|
7331
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Qu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7332
|
+
V(j(ai), {
|
|
7283
7333
|
size: 12,
|
|
7284
7334
|
"stroke-width": 2,
|
|
7285
7335
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7286
7336
|
}, null, 8, ["class"])
|
|
7287
|
-
], 8,
|
|
7337
|
+
], 8, Xu), c.value[e] ? (f(), k("div", $u, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", ed, 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", {
|
|
7288
7338
|
key: e.id,
|
|
7289
7339
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7290
|
-
}, [I("div",
|
|
7340
|
+
}, [I("div", td, [(f(), N(d(j(e.severity === "high" ? li : e.severity === "medium" ? Ri : Si)), {
|
|
7291
7341
|
size: 13,
|
|
7292
7342
|
"stroke-width": 2,
|
|
7293
7343
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7294
|
-
style: L({ color: j(
|
|
7295
|
-
}, null, 8, ["style"])), I("div",
|
|
7296
|
-
I("div",
|
|
7344
|
+
style: L({ color: j(Pu)(e.severity) })
|
|
7345
|
+
}, null, 8, ["style"])), I("div", nd, [
|
|
7346
|
+
I("div", rd, [I("span", {
|
|
7297
7347
|
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",
|
|
7298
7348
|
style: L({
|
|
7299
|
-
color: j(
|
|
7300
|
-
backgroundColor: j(
|
|
7349
|
+
color: j(Pu)(e.severity),
|
|
7350
|
+
backgroundColor: j(Fu)(e.severity)
|
|
7301
7351
|
})
|
|
7302
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7303
|
-
e.suggestion ? (f(), k("p",
|
|
7304
|
-
e.blockId ? (f(), k("div",
|
|
7352
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", id, D(e.message), 1)]),
|
|
7353
|
+
e.suggestion ? (f(), k("p", ad, D(e.suggestion), 1)) : A("", !0),
|
|
7354
|
+
e.blockId ? (f(), k("div", od, [I("button", {
|
|
7305
7355
|
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)]",
|
|
7306
7356
|
style: { "background-color": "transparent" },
|
|
7307
7357
|
disabled: j(o).fixingFindingId.value !== null,
|
|
7308
7358
|
onClick: (t) => g(e)
|
|
7309
|
-
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(
|
|
7359
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Ci), {
|
|
7310
7360
|
key: 0,
|
|
7311
7361
|
class: "tpl-spinner",
|
|
7312
7362
|
size: 11,
|
|
7313
7363
|
"stroke-width": 2
|
|
7314
|
-
})) : (f(), N(j(
|
|
7364
|
+
})) : (f(), N(j(Fi), {
|
|
7315
7365
|
key: 1,
|
|
7316
7366
|
size: 11,
|
|
7317
7367
|
"stroke-width": 2
|
|
7318
|
-
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8,
|
|
7368
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, sd), j(o).fixError.value ? (f(), k("p", cd, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7319
7369
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7320
|
-
])) : (f(), k("div",
|
|
7370
|
+
])) : (f(), k("div", ld, [V(j(Ni), {
|
|
7321
7371
|
size: 32,
|
|
7322
7372
|
"stroke-width": 1.5,
|
|
7323
7373
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7324
|
-
}), I("p",
|
|
7374
|
+
}), I("p", ud, D(j(i).scoring.emptyState), 1)])), I("p", dd, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7325
7375
|
_: 1
|
|
7326
7376
|
}));
|
|
7327
7377
|
}
|
|
7328
|
-
}),
|
|
7378
|
+
}), pd = /* @__PURE__ */ e({ default: () => md }), md = /*#__PURE__*/ qi(fd, [["__scopeId", "data-v-c23c73d4"]]), hd = ["aria-busy"], gd = {
|
|
7329
7379
|
id: "tpl-test-email-title",
|
|
7330
7380
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7331
|
-
},
|
|
7381
|
+
}, _d = { class: "tpl:mb-3" }, vd = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, yd = ["value"], bd = ["disabled"], xd = ["value"], Sd = {
|
|
7332
7382
|
key: 0,
|
|
7333
7383
|
role: "alert",
|
|
7334
7384
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7335
|
-
},
|
|
7385
|
+
}, Cd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, wd = ["disabled"], Td = ["disabled"], Ed = {
|
|
7336
7386
|
key: 0,
|
|
7337
7387
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7338
|
-
},
|
|
7388
|
+
}, Dd = { key: 1 }, Od = /*@__PURE__*/ B({
|
|
7339
7389
|
__name: "TestEmailModal",
|
|
7340
7390
|
props: {
|
|
7341
7391
|
visible: { type: Boolean },
|
|
@@ -7345,7 +7395,7 @@ var Mu = {
|
|
|
7345
7395
|
},
|
|
7346
7396
|
emits: ["send", "close"],
|
|
7347
7397
|
setup(e, { emit: t }) {
|
|
7348
|
-
let n = e, r = t, { t: i } =
|
|
7398
|
+
let n = e, r = t, { t: i } = ra(), a = C("");
|
|
7349
7399
|
H(() => n.visible, (e) => {
|
|
7350
7400
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7351
7401
|
});
|
|
@@ -7358,7 +7408,7 @@ var Mu = {
|
|
|
7358
7408
|
function l(e) {
|
|
7359
7409
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7360
7410
|
}
|
|
7361
|
-
return (t, n) => (f(), N(
|
|
7411
|
+
return (t, n) => (f(), N(gs, {
|
|
7362
7412
|
visible: e.visible,
|
|
7363
7413
|
onClose: s,
|
|
7364
7414
|
onKeydown: l
|
|
@@ -7374,14 +7424,14 @@ var Mu = {
|
|
|
7374
7424
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7375
7425
|
}
|
|
7376
7426
|
}, [
|
|
7377
|
-
I("h3",
|
|
7378
|
-
I("div",
|
|
7427
|
+
I("h3", gd, D(j(i).testEmail.title), 1),
|
|
7428
|
+
I("div", _d, [I("label", vd, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7379
7429
|
key: 0,
|
|
7380
7430
|
type: "text",
|
|
7381
7431
|
value: a.value,
|
|
7382
7432
|
disabled: "",
|
|
7383
7433
|
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)]"
|
|
7384
|
-
}, null, 8,
|
|
7434
|
+
}, null, 8, yd)) : c((f(), k("select", {
|
|
7385
7435
|
key: 1,
|
|
7386
7436
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7387
7437
|
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)]",
|
|
@@ -7389,29 +7439,29 @@ var Mu = {
|
|
|
7389
7439
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7390
7440
|
key: e,
|
|
7391
7441
|
value: e
|
|
7392
|
-
}, D(e), 9,
|
|
7393
|
-
e.error ? (f(), k("p",
|
|
7394
|
-
I("div",
|
|
7442
|
+
}, D(e), 9, xd))), 128))], 8, bd)), [[w, a.value]])]),
|
|
7443
|
+
e.error ? (f(), k("p", Sd, D(e.error), 1)) : A("", !0),
|
|
7444
|
+
I("div", Cd, [I("button", {
|
|
7395
7445
|
type: "button",
|
|
7396
7446
|
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 }]),
|
|
7397
7447
|
disabled: e.isSending,
|
|
7398
7448
|
onClick: s
|
|
7399
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7449
|
+
}, D(j(i).testEmail.cancel), 11, wd), I("button", {
|
|
7400
7450
|
type: "button",
|
|
7401
7451
|
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)]",
|
|
7402
7452
|
disabled: !a.value || e.isSending,
|
|
7403
7453
|
onClick: o
|
|
7404
|
-
}, [e.isSending ? (f(), k("span",
|
|
7454
|
+
}, [e.isSending ? (f(), k("span", Ed, [V(j(Ci), {
|
|
7405
7455
|
class: "tpl:animate-spin",
|
|
7406
7456
|
size: 12,
|
|
7407
7457
|
"stroke-width": 2
|
|
7408
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7409
|
-
], 8,
|
|
7458
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Dd, D(j(i).testEmail.send), 1))], 8, Td)])
|
|
7459
|
+
], 8, hd)]),
|
|
7410
7460
|
_: 1
|
|
7411
7461
|
}, 8, ["visible"]));
|
|
7412
7462
|
}
|
|
7413
|
-
}),
|
|
7463
|
+
}), kd = /* @__PURE__ */ e({ default: () => Ad }), Ad = Od;
|
|
7414
7464
|
//#endregion
|
|
7415
|
-
export {
|
|
7465
|
+
export { ha as $, fe as $n, zn as $t, fs as A, mt as An, fi as At, ho as B, be as Bn, Y as Bt, ws as C, Lt as Cn, Ci as Ct, vs as D, Ct as Dn, hi as Dt, _s as E, xt as En, bi as Et, Lo as F, st as Fn, ii as Ft, Va as G, he as Gn, qn as Gt, io as H, ve as Hn, lr as Ht, No as I, W as In, X as It, Ma as J, Ee as Jn, _r as Jt, za as K, Se as Kn, ur as Kt, jo as L, We as Ln, Kr as Lt, Xo as M, ut as Mn, li as Mt, qo as N, lt as Nn, si as Nt, gs as O, yt as On, mi as Ot, Bo as P, ct as Pn, ai as Pt, _a as Q, de as Qn, cr as Qt, _o as R, ye as Rn, Mr as Rt, Ts as S, un as Sn, wi as St, Z as T, dt as Tn, xi as Tt, ro as U, Te as Un, hr as Ut, ao as V, we as Vn, gr as Vt, $a as W, _e as Wn, Kn as Wt, xa as X, xe as Xn, Jn as Xt, Aa as Y, ge as Yn, Hn as Yt, ya as Z, pe as Zn, Zn as Zt, Ls as _, Nn as _n, Mi as _t, Bl as a, Yn as an, na as at, Ns as b, an as bn, Ei as bt, ec as c, fr as cn, qi as ct, qs as d, Gn as dn, Bi as dt, Un as en, ue as er, da as et, Ks as f, J as fn, Ri as ft, Hs as g, q as gn, Ni as gt, Us as h, Dn as hn, Fi as ht, hu as i, sr as in, ia as it, ns as j, St as jn, di as jt, ms as k, ht as kn, pi as kt, Ys as l, Wn as ln, Ki as lt, Ws as m, En as mn, Ii as mt, pd as n, nr as nn, oa as nt, Ec as o, vr as on, ra as ot, Gs as p, vn as pn, Li as pt, Ra as q, Ce as qn, br as qt, Au as r, $n as rn, aa as rt, tc as s, yr as sn, ea as st, kd as t, ar as tn, ua as tt, Js as u, Rn as un, Hi as ut, Is as v, An as vn, ji as vt, $ as w, Ot as wn, Si as wt, ks as x, ln as xn, Ti as xt, Ps as y, on as yn, ki as yt, go as z, De as zn, Tr as zt };
|
|
7416
7466
|
|
|
7417
|
-
//# sourceMappingURL=features-
|
|
7467
|
+
//# sourceMappingURL=features-B3qgDBHf.js.map
|