@templatical/editor 0.16.5 → 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-B1oEJebq.js → AiFeatureMenu-zwSmx9ZW.js} +3 -3
- package/dist/{BlockIssueBadge-BLytBabN.js → BlockIssueBadge-BQ1yB1me.js} +2 -2
- package/dist/{CloudEditor-D6KNL6VU.js → CloudEditor-5ahgKRX8.js} +11 -10
- package/dist/{CollaboratorBar-C_EhXQ5R.js → CollaboratorBar-6PtX-1AS.js} +2 -2
- package/dist/{ColorPicker-CppJgX_T.js → ColorPicker-DfzDyNKe.js} +4 -4
- package/dist/{CommentsSidebar-C_XLBbo3.js → CommentsSidebar-Cl93TN96.js} +3 -3
- package/dist/{CountdownBlock-173fiO5Z.js → CountdownBlock-DbXfzwae.js} +1 -1
- package/dist/{CountdownToolbar-D5GaA_lt.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/{ModuleBrowserModal-CXy8Bbv9.js → ModuleBrowserModal-B5IH3-1I.js} +7 -7
- package/dist/{ModulePreviewCanvas-CJC9kyZN.js → ModulePreviewCanvas-CYOLWoZ9.js} +2 -2
- package/dist/{NumberWithSuffix-DNi-v4l1.js → NumberWithSuffix-9FG7mNnn.js} +1 -1
- package/dist/{ParagraphEditor-nk5Vvr7M.js → ParagraphEditor-duWYA6Vv.js} +8 -8
- package/dist/{RichTextEditorContent-DBaCrvH0.js → RichTextEditorContent-DCzmVeyb.js} +5 -5
- package/dist/{SaveModuleDialog-CYu5PhBz.js → SaveModuleDialog-BPUly5h3.js} +6 -6
- package/dist/{SnapshotHistory-B38ImqMO.js → SnapshotHistory-CmwU3nlN.js} +4 -4
- package/dist/{TemplateScoringPanel-ZhObHWeb.js → TemplateScoringPanel-CMrfa9Rd.js} +3 -3
- package/dist/{TestEmailModal-DbstIzEf.js → TestEmailModal-zfomMz9i.js} +3 -3
- package/dist/{TitleEditor-CmfkOHJT.js → TitleEditor-v0gtezZE.js} +7 -7
- package/dist/{TplModal-BXnx3sLr.js → TplModal-eGFG7k-y.js} +3 -3
- package/dist/{blockTypeIcons-BVIEw0XJ.js → blockTypeIcons-Dd0w4T0I.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DI1ViqMa.js → ca-CSl--oWR.js} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js → AiFeatureMenu-CtXsam7G.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CuIg4yrB.js.map → AiFeatureMenu-CtXsam7G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js → BlockIssueBadge-DR7cpDfQ.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-BHEl_Hs7.js.map → BlockIssueBadge-DR7cpDfQ.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-1Ms0w691.js → CloudEditor-YC5y3AwC.js} +10 -9
- package/dist/cdn/chunks/CloudEditor-YC5y3AwC.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js → CollaboratorBar-BOD2j8Kl.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0a5P64z.js.map → CollaboratorBar-BOD2j8Kl.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js → ColorPicker-CPMWLHpa.js} +2 -2
- package/dist/cdn/chunks/{ColorPicker-bsMmT-_B.js.map → ColorPicker-CPMWLHpa.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js → CountdownBlock-BmGqb7Zi.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-8053oz4k.js.map → CountdownBlock-BmGqb7Zi.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js → CountdownToolbar-BBwsdGbV.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DQ_zrorh.js.map → CountdownToolbar-BBwsdGbV.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js → IssuesPanel-G0z-j3JS.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-CwQ376nf.js.map → IssuesPanel-G0z-j3JS.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js → ModuleBrowserModal-DiLTY0ec.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-DUegB2Jk.js.map → ModuleBrowserModal-DiLTY0ec.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js → ModulePreviewCanvas-CdV5mEQ6.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-f4h8r9Lh.js.map → ModulePreviewCanvas-CdV5mEQ6.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js → NumberWithSuffix-lqQlf0Uk.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-Bu_nHJuD.js.map → NumberWithSuffix-lqQlf0Uk.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js → ParagraphEditor-BYoZfURd.js} +6 -6
- package/dist/cdn/chunks/{ParagraphEditor-IpZsg8qo.js.map → ParagraphEditor-BYoZfURd.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js → RichTextEditorContent-BnPRnXxy.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DDnqZ9cB.js.map → RichTextEditorContent-BnPRnXxy.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js → SaveModuleDialog-C9hUeWyG.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-CVA5HPCi.js.map → SaveModuleDialog-C9hUeWyG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js → TitleEditor-wFvnU3Jr.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-DU8wm0Rh.js.map → TitleEditor-wFvnU3Jr.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.js → blockTypeIcons-DNMvDz5B.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-Dm5Oosjp.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/{de-q9lTCMre.js → cdn/chunks/de-ZaffrKDP.js} +3 -1
- 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-BGUoo2a5.js → extensions-DxcxIlwT.js} +2 -2
- package/dist/cdn/chunks/{extensions-BGUoo2a5.js.map → extensions-DxcxIlwT.js.map} +1 -1
- package/dist/cdn/chunks/{features-BSpDuFFR.js → features-B3qgDBHf.js} +702 -671
- package/dist/cdn/chunks/features-B3qgDBHf.js.map +1 -0
- package/dist/cdn/chunks/{icons-k3XVoRvc.js → icons-kiMqh99T.js} +2 -2
- package/dist/cdn/chunks/{icons-k3XVoRvc.js.map → icons-kiMqh99T.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-iDq3otm6.js → media-library-C5ogiZ4f.js} +3 -3
- package/dist/cdn/chunks/{media-library-iDq3otm6.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-Bb7vN32U.js → quality-BftAn_AJ.js} +2 -2
- package/dist/cdn/chunks/{quality-Bb7vN32U.js.map → quality-BftAn_AJ.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-cOvtk8HM.js → renderer-Cdlo4MVX.js} +3 -3
- package/dist/cdn/chunks/{renderer-cOvtk8HM.js.map → renderer-Cdlo4MVX.js.map} +1 -1
- package/dist/cdn/chunks/{src-Ddp969zE.js → src-GBA8oUL2.js} +4 -4
- package/dist/cdn/chunks/{src-Ddp969zE.js.map → src-GBA8oUL2.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CW_gRVVR.js → styles-B6rdq9JB.js} +9 -9
- package/dist/cdn/chunks/{styles-CW_gRVVR.js.map → styles-B6rdq9JB.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +13 -12
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{cdn/chunks/de-q9lTCMre.js → de-ZaffrKDP.js} +1 -3
- package/dist/{en-CR4LItrX.js → en-CHuXeJDt.js} +1 -1
- package/dist/{es-CEt-lrGd.js → es-CaC8VQjO.js} +1 -1
- package/dist/{extensions-Cjd-VAII.js → extensions-B4lu0KkE.js} +2 -2
- package/dist/index.d.ts +44 -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-DJfTblY7.js → styles-mBSbDYeX.js} +25 -25
- package/dist/templatical-editor.js +11 -10
- package/dist/{useCloudI18n-WbfVWq5k.js → useCloudI18n-CIKI0hCd.js} +1 -1
- package/dist/{useEditorCore-DnOG2a_b.js → useEditorCore-CaaHPKjm.js} +703 -672
- package/dist/{useI18n-eR1yVW0v.js → useI18n-0EU_JVe7.js} +1 -1
- package/dist/{useMergeTag-C3GfSktg.js → useMergeTag-C7v6MVah.js} +2 -2
- package/dist/{usePopoverPosition-B3Byo68F.js → usePopoverPosition-BDqqnMeo.js} +1 -1
- package/package.json +7 -7
- package/dist/cdn/chunks/CloudEditor-1Ms0w691.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-BSpDuFFR.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +0 -1
- package/dist/keys-BbDgCU6K.js +0 -10
|
@@ -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,24 +3438,24 @@ 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
|
});
|
|
3419
3450
|
//#endregion
|
|
3420
3451
|
//#region src/composables/usePopoverRoot.ts
|
|
3421
|
-
function
|
|
3422
|
-
return v(
|
|
3452
|
+
function io() {
|
|
3453
|
+
return v(mr, C(null));
|
|
3423
3454
|
}
|
|
3424
3455
|
//#endregion
|
|
3425
3456
|
//#region src/composables/usePopoverPosition.ts
|
|
3426
|
-
function
|
|
3427
|
-
let e =
|
|
3457
|
+
function ao() {
|
|
3458
|
+
let e = io();
|
|
3428
3459
|
function t(t) {
|
|
3429
3460
|
let n = e.value?.getBoundingClientRect();
|
|
3430
3461
|
return n ? {
|
|
@@ -3439,7 +3470,7 @@ function no() {
|
|
|
3439
3470
|
}
|
|
3440
3471
|
//#endregion
|
|
3441
3472
|
//#region src/utils/sanitizeRichTextHtml.ts
|
|
3442
|
-
var
|
|
3473
|
+
var oo = /* @__PURE__ */ new Set([
|
|
3443
3474
|
"http",
|
|
3444
3475
|
"https",
|
|
3445
3476
|
"mailto",
|
|
@@ -3449,7 +3480,7 @@ var ro = /* @__PURE__ */ new Set([
|
|
|
3449
3480
|
"sms",
|
|
3450
3481
|
"xmpp",
|
|
3451
3482
|
"cid"
|
|
3452
|
-
]),
|
|
3483
|
+
]), so = /* @__PURE__ */ new Set([
|
|
3453
3484
|
"SCRIPT",
|
|
3454
3485
|
"STYLE",
|
|
3455
3486
|
"IFRAME",
|
|
@@ -3459,7 +3490,7 @@ var ro = /* @__PURE__ */ new Set([
|
|
|
3459
3490
|
"META",
|
|
3460
3491
|
"BASE",
|
|
3461
3492
|
"FORM"
|
|
3462
|
-
]),
|
|
3493
|
+
]), co = /* @__PURE__ */ new Set([
|
|
3463
3494
|
"href",
|
|
3464
3495
|
"xlink:href",
|
|
3465
3496
|
"formaction",
|
|
@@ -3468,16 +3499,16 @@ var ro = /* @__PURE__ */ new Set([
|
|
|
3468
3499
|
"background",
|
|
3469
3500
|
"poster"
|
|
3470
3501
|
]);
|
|
3471
|
-
function
|
|
3502
|
+
function lo(e, t) {
|
|
3472
3503
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3473
3504
|
if (!n || n.startsWith("#")) return !0;
|
|
3474
3505
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3475
3506
|
if (!r) return !0;
|
|
3476
3507
|
let i = r[1].toLowerCase();
|
|
3477
|
-
return
|
|
3508
|
+
return oo.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3478
3509
|
}
|
|
3479
|
-
function
|
|
3480
|
-
if (
|
|
3510
|
+
function uo(e) {
|
|
3511
|
+
if (so.has(e.tagName)) {
|
|
3481
3512
|
e.remove();
|
|
3482
3513
|
return;
|
|
3483
3514
|
}
|
|
@@ -3489,29 +3520,29 @@ function so(e) {
|
|
|
3489
3520
|
e.removeAttribute(n);
|
|
3490
3521
|
continue;
|
|
3491
3522
|
}
|
|
3492
|
-
if (
|
|
3493
|
-
|
|
3523
|
+
if (co.has(t)) {
|
|
3524
|
+
lo(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3494
3525
|
continue;
|
|
3495
3526
|
}
|
|
3496
3527
|
if (t === "src") {
|
|
3497
|
-
|
|
3528
|
+
lo(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3498
3529
|
continue;
|
|
3499
3530
|
}
|
|
3500
3531
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3501
3532
|
}
|
|
3502
3533
|
let n = Array.from(e.children);
|
|
3503
|
-
for (let e of n)
|
|
3534
|
+
for (let e of n) uo(e);
|
|
3504
3535
|
}
|
|
3505
|
-
function
|
|
3536
|
+
function fo(e) {
|
|
3506
3537
|
if (typeof DOMParser > "u") return e;
|
|
3507
3538
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3508
|
-
for (let e of n)
|
|
3539
|
+
for (let e of n) uo(e);
|
|
3509
3540
|
return t.innerHTML;
|
|
3510
3541
|
}
|
|
3511
3542
|
//#endregion
|
|
3512
3543
|
//#region src/composables/useEditableTextBlock.ts
|
|
3513
|
-
function
|
|
3514
|
-
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({
|
|
3515
3546
|
top: o.value - 8,
|
|
3516
3547
|
left: s.value
|
|
3517
3548
|
}));
|
|
@@ -3532,14 +3563,14 @@ function lo(e) {
|
|
|
3532
3563
|
}
|
|
3533
3564
|
//#endregion
|
|
3534
3565
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3535
|
-
var
|
|
3566
|
+
var mo = ["innerHTML"], ho = /* @__PURE__ */ B({
|
|
3536
3567
|
__name: "ParagraphBlock",
|
|
3537
3568
|
props: {
|
|
3538
3569
|
block: {},
|
|
3539
3570
|
viewport: {}
|
|
3540
3571
|
},
|
|
3541
3572
|
setup(e) {
|
|
3542
|
-
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);
|
|
3543
3574
|
return (t, l) => (f(), k("div", {
|
|
3544
3575
|
ref_key: "blockRef",
|
|
3545
3576
|
ref: i,
|
|
@@ -3558,46 +3589,46 @@ var uo = ["innerHTML"], fo = /* @__PURE__ */ B({
|
|
|
3558
3589
|
key: 1,
|
|
3559
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",
|
|
3560
3591
|
innerHTML: j(o)
|
|
3561
|
-
}, null, 8,
|
|
3592
|
+
}, null, 8, mo))], 544));
|
|
3562
3593
|
}
|
|
3563
3594
|
});
|
|
3564
3595
|
//#endregion
|
|
3565
3596
|
//#region src/utils/blockComponentResolver.ts
|
|
3566
|
-
function
|
|
3597
|
+
function go(e, t, n) {
|
|
3567
3598
|
if (t) {
|
|
3568
3599
|
let n = t.getComponent(e);
|
|
3569
3600
|
if (n) return n;
|
|
3570
3601
|
}
|
|
3571
3602
|
return n[e.type] ?? null;
|
|
3572
3603
|
}
|
|
3573
|
-
function
|
|
3604
|
+
function _o(e) {
|
|
3574
3605
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
3575
3606
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3576
3607
|
backgroundColor: n || "transparent"
|
|
3577
3608
|
};
|
|
3578
3609
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
3579
3610
|
}
|
|
3580
|
-
function
|
|
3611
|
+
function vo(e) {
|
|
3581
3612
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
3582
3613
|
let t = e.wrapper, n = {};
|
|
3583
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;
|
|
3584
3615
|
}
|
|
3585
3616
|
//#endregion
|
|
3586
3617
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3587
|
-
var
|
|
3618
|
+
var yo = ["data-block-id", "data-block-type"], bo = ["aria-label"], xo = [
|
|
3588
3619
|
"aria-label",
|
|
3589
3620
|
"aria-pressed",
|
|
3590
3621
|
"title"
|
|
3591
|
-
],
|
|
3622
|
+
], So = ["aria-label", "title"], Co = ["aria-label", "title"], wo = ["aria-label", "title"], To = {
|
|
3592
3623
|
key: 1,
|
|
3593
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"
|
|
3594
|
-
},
|
|
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 = {
|
|
3595
3626
|
key: 2,
|
|
3596
3627
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3597
|
-
},
|
|
3628
|
+
}, Oo = ["aria-label", "title"], ko = {
|
|
3598
3629
|
key: 3,
|
|
3599
3630
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3600
|
-
},
|
|
3631
|
+
}, Ao = ["aria-label"], jo = /*#__PURE__*/ qi(/* @__PURE__ */ B({
|
|
3601
3632
|
__name: "BlockWrapper",
|
|
3602
3633
|
props: {
|
|
3603
3634
|
block: {},
|
|
@@ -3607,7 +3638,7 @@ var go = ["data-block-id", "data-block-type"], _o = ["aria-label"], vo = [
|
|
|
3607
3638
|
},
|
|
3608
3639
|
emits: ["select"],
|
|
3609
3640
|
setup(e, { emit: t }) {
|
|
3610
|
-
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);
|
|
3611
3642
|
async function p() {
|
|
3612
3643
|
await m(), l.value?.focus();
|
|
3613
3644
|
}
|
|
@@ -3633,13 +3664,13 @@ var go = ["data-block-id", "data-block-type"], _o = ["aria-label"], vo = [
|
|
|
3633
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 ? {
|
|
3634
3665
|
desktop: a.viewport.desktop,
|
|
3635
3666
|
mobile: a.viewport.mobile
|
|
3636
|
-
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(
|
|
3637
|
-
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 = {
|
|
3638
3669
|
padding: e.padding,
|
|
3639
3670
|
backgroundColor: e.backgroundColor
|
|
3640
3671
|
};
|
|
3641
3672
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
3642
|
-
}), ne = O(() =>
|
|
3673
|
+
}), ne = O(() => vo(r.block));
|
|
3643
3674
|
function re(e) {
|
|
3644
3675
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), i("select"));
|
|
3645
3676
|
}
|
|
@@ -3682,60 +3713,60 @@ var go = ["data-block-id", "data-block-type"], _o = ["aria-label"], vo = [
|
|
|
3682
3713
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3683
3714
|
title: j(a).blockActions.drag,
|
|
3684
3715
|
onKeydown: h
|
|
3685
|
-
}, [V(j(
|
|
3716
|
+
}, [V(j(yi), {
|
|
3686
3717
|
size: 14,
|
|
3687
3718
|
"stroke-width": 1.5
|
|
3688
|
-
})], 40,
|
|
3719
|
+
})], 40, xo),
|
|
3689
3720
|
I("button", {
|
|
3690
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",
|
|
3691
3722
|
"aria-label": j(a).blockActions.duplicate,
|
|
3692
3723
|
title: j(a).blockActions.duplicate,
|
|
3693
3724
|
onClick: M(ie, ["stop"])
|
|
3694
|
-
}, [V(j(
|
|
3725
|
+
}, [V(j(pi), {
|
|
3695
3726
|
size: 14,
|
|
3696
3727
|
"stroke-width": 1.5
|
|
3697
|
-
})], 8,
|
|
3728
|
+
})], 8, So),
|
|
3698
3729
|
ee.value ? (f(), k("button", {
|
|
3699
3730
|
key: 0,
|
|
3700
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",
|
|
3701
3732
|
"aria-label": j(a).blockActions.saveAsModule,
|
|
3702
3733
|
title: j(a).blockActions.saveAsModule,
|
|
3703
3734
|
onClick: M(P, ["stop"])
|
|
3704
|
-
}, [V(j(
|
|
3735
|
+
}, [V(j(ni), {
|
|
3705
3736
|
size: 14,
|
|
3706
3737
|
"stroke-width": 1.5
|
|
3707
|
-
})], 8,
|
|
3738
|
+
})], 8, Co)) : A("", !0),
|
|
3708
3739
|
I("button", {
|
|
3709
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",
|
|
3710
3741
|
"aria-label": j(a).blockActions.delete,
|
|
3711
3742
|
title: j(a).blockActions.delete,
|
|
3712
3743
|
onClick: M(N, ["stop"])
|
|
3713
|
-
}, [V(j(
|
|
3744
|
+
}, [V(j(Li), {
|
|
3714
3745
|
size: 14,
|
|
3715
3746
|
"stroke-width": 1.5
|
|
3716
|
-
})], 8,
|
|
3717
|
-
], 8,
|
|
3718
|
-
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), {
|
|
3719
3750
|
size: 12,
|
|
3720
3751
|
"stroke-width": 1.5
|
|
3721
3752
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3722
|
-
b.value && !g.value ? (f(), k("div",
|
|
3753
|
+
b.value && !g.value ? (f(), k("div", Do, [I("button", {
|
|
3723
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)]",
|
|
3724
3755
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3725
3756
|
title: e.block.displayCondition?.label,
|
|
3726
3757
|
onClick: M(ae, ["stop"])
|
|
3727
|
-
}, [V(j(
|
|
3758
|
+
}, [V(j(vi), {
|
|
3728
3759
|
size: 12,
|
|
3729
3760
|
"stroke-width": 2
|
|
3730
|
-
})], 8,
|
|
3731
|
-
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", {
|
|
3732
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)]",
|
|
3733
3764
|
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3734
3765
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3735
|
-
}, [V(j(
|
|
3766
|
+
}, [V(j(wi), {
|
|
3736
3767
|
size: 12,
|
|
3737
3768
|
"stroke-width": 2.5
|
|
3738
|
-
}), z(" " + D(E.value), 1)], 8,
|
|
3769
|
+
}), z(" " + D(E.value), 1)], 8, Ao)])) : A("", !0),
|
|
3739
3770
|
ne.value ? (f(), k("div", {
|
|
3740
3771
|
key: 4,
|
|
3741
3772
|
class: "tpl-section-wrapper",
|
|
@@ -3748,31 +3779,31 @@ var go = ["data-block-id", "data-block-type"], _o = ["aria-label"], vo = [
|
|
|
3748
3779
|
class: "tpl-block-content",
|
|
3749
3780
|
style: L(te.value)
|
|
3750
3781
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4))
|
|
3751
|
-
], 10,
|
|
3782
|
+
], 10, yo));
|
|
3752
3783
|
}
|
|
3753
3784
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
3754
3785
|
//#endregion
|
|
3755
3786
|
//#region src/utils/unwrapParagraph.ts
|
|
3756
|
-
function
|
|
3787
|
+
function Mo(e) {
|
|
3757
3788
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3758
3789
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3759
3790
|
}
|
|
3760
3791
|
//#endregion
|
|
3761
3792
|
//#region src/components/blocks/TitleBlock.vue
|
|
3762
|
-
var
|
|
3793
|
+
var No = /* @__PURE__ */ B({
|
|
3763
3794
|
__name: "TitleBlock",
|
|
3764
3795
|
props: {
|
|
3765
3796
|
block: {},
|
|
3766
3797
|
viewport: {}
|
|
3767
3798
|
},
|
|
3768
3799
|
setup(e) {
|
|
3769
|
-
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(() => {
|
|
3770
3801
|
let e = {
|
|
3771
3802
|
fontSize: `${pe[t.block.level]}px`,
|
|
3772
3803
|
textAlign: t.block.textAlign
|
|
3773
3804
|
};
|
|
3774
3805
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3775
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3806
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => Mo(o.value));
|
|
3776
3807
|
return (t, o) => (f(), k("div", {
|
|
3777
3808
|
ref_key: "blockRef",
|
|
3778
3809
|
ref: i,
|
|
@@ -3798,16 +3829,16 @@ var Ao = /* @__PURE__ */ B({
|
|
|
3798
3829
|
});
|
|
3799
3830
|
//#endregion
|
|
3800
3831
|
//#region src/utils/sectionColumnDrop.ts
|
|
3801
|
-
function
|
|
3832
|
+
function Po(e) {
|
|
3802
3833
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
3803
3834
|
}
|
|
3804
3835
|
//#endregion
|
|
3805
3836
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3806
|
-
var
|
|
3837
|
+
var Fo = { class: "tpl:w-full" }, Io = {
|
|
3807
3838
|
key: 0,
|
|
3808
3839
|
"data-testid": "section-drop-hint",
|
|
3809
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)]"
|
|
3810
|
-
},
|
|
3841
|
+
}, Lo = /* @__PURE__ */ B({
|
|
3811
3842
|
__name: "SectionBlock",
|
|
3812
3843
|
props: {
|
|
3813
3844
|
block: {},
|
|
@@ -3815,12 +3846,12 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3815
3846
|
},
|
|
3816
3847
|
setup(e) {
|
|
3817
3848
|
let t = {
|
|
3818
|
-
title:
|
|
3819
|
-
paragraph:
|
|
3820
|
-
image:
|
|
3821
|
-
button:
|
|
3822
|
-
divider:
|
|
3823
|
-
custom:
|
|
3849
|
+
title: No,
|
|
3850
|
+
paragraph: ho,
|
|
3851
|
+
image: $a,
|
|
3852
|
+
button: Kr,
|
|
3853
|
+
divider: Ma,
|
|
3854
|
+
custom: Aa
|
|
3824
3855
|
}, n = e, { t: r } = Y(), i = J(zn, "SectionBlock"), a = v(Hn, null), o = v(qn, null), s = O(() => {
|
|
3825
3856
|
switch (n.block.columns) {
|
|
3826
3857
|
case "2": return ["50%", "50%"];
|
|
@@ -3847,7 +3878,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3847
3878
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3848
3879
|
}
|
|
3849
3880
|
function g(e) {
|
|
3850
|
-
return
|
|
3881
|
+
return go(e, o, t);
|
|
3851
3882
|
}
|
|
3852
3883
|
function _(e, t) {
|
|
3853
3884
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3855,7 +3886,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3855
3886
|
dataSourceFetched: t.dataSourceFetched
|
|
3856
3887
|
});
|
|
3857
3888
|
}
|
|
3858
|
-
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", {
|
|
3859
3890
|
key: n,
|
|
3860
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)]" : ""]),
|
|
3861
3892
|
style: L({ width: u.value ? "100%" : s.value[n] })
|
|
@@ -3864,7 +3895,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3864
3895
|
group: {
|
|
3865
3896
|
name: "blocks",
|
|
3866
3897
|
pull: !0,
|
|
3867
|
-
put: (e, t, n) => j(
|
|
3898
|
+
put: (e, t, n) => j(Po)(n)
|
|
3868
3899
|
},
|
|
3869
3900
|
animation: 150,
|
|
3870
3901
|
"ghost-class": "tpl-ghost",
|
|
@@ -3877,7 +3908,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3877
3908
|
class: "tpl:min-h-[60px]",
|
|
3878
3909
|
"onUpdate:modelValue": (e) => m(n, e)
|
|
3879
3910
|
}, {
|
|
3880
|
-
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, {
|
|
3881
3912
|
block: t,
|
|
3882
3913
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3883
3914
|
viewport: e.viewport,
|
|
@@ -3908,13 +3939,13 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3908
3939
|
"model-value",
|
|
3909
3940
|
"group",
|
|
3910
3941
|
"onUpdate:modelValue"
|
|
3911
|
-
]), 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)]));
|
|
3912
3943
|
}
|
|
3913
|
-
}),
|
|
3944
|
+
}), Ro = me, zo = {
|
|
3914
3945
|
small: 24,
|
|
3915
3946
|
medium: 32,
|
|
3916
3947
|
large: 48
|
|
3917
|
-
},
|
|
3948
|
+
}, Bo = [
|
|
3918
3949
|
"facebook",
|
|
3919
3950
|
"twitter",
|
|
3920
3951
|
"instagram",
|
|
@@ -3932,11 +3963,11 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3932
3963
|
"github",
|
|
3933
3964
|
"dribbble",
|
|
3934
3965
|
"behance"
|
|
3935
|
-
],
|
|
3966
|
+
], Vo = [
|
|
3936
3967
|
"width",
|
|
3937
3968
|
"height",
|
|
3938
3969
|
"fill"
|
|
3939
|
-
],
|
|
3970
|
+
], Ho = ["d"], Uo = /* @__PURE__ */ B({
|
|
3940
3971
|
__name: "SocialIconSvg",
|
|
3941
3972
|
props: {
|
|
3942
3973
|
platform: {},
|
|
@@ -3944,7 +3975,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3944
3975
|
iconSize: {}
|
|
3945
3976
|
},
|
|
3946
3977
|
setup(e) {
|
|
3947
|
-
let t = e, n = O(() =>
|
|
3978
|
+
let t = e, n = O(() => Ro[t.platform]), r = O(() => zo[t.iconSize]), i = O(() => {
|
|
3948
3979
|
let e = {
|
|
3949
3980
|
display: "inline-flex",
|
|
3950
3981
|
alignItems: "center",
|
|
@@ -3988,12 +4019,12 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
3988
4019
|
viewBox: "0 0 24 24",
|
|
3989
4020
|
fill: o.value,
|
|
3990
4021
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3991
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
4022
|
+
}, [I("path", { d: n.value.path }, null, 8, Ho)], 8, Vo))], 4));
|
|
3992
4023
|
}
|
|
3993
|
-
}),
|
|
4024
|
+
}), Wo = { class: "tpl:w-full" }, Go = ["href"], Ko = {
|
|
3994
4025
|
key: 1,
|
|
3995
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)]"
|
|
3996
|
-
},
|
|
4027
|
+
}, qo = /* @__PURE__ */ B({
|
|
3997
4028
|
__name: "SocialIconsBlock",
|
|
3998
4029
|
props: {
|
|
3999
4030
|
block: {},
|
|
@@ -4006,7 +4037,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4006
4037
|
gap: `${t.block.spacing}px`,
|
|
4007
4038
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4008
4039
|
})), i = O(() => t.block.icons.length > 0);
|
|
4009
|
-
return (t, a) => (f(), k("div",
|
|
4040
|
+
return (t, a) => (f(), k("div", Wo, [i.value ? (f(), k("div", {
|
|
4010
4041
|
key: 0,
|
|
4011
4042
|
style: L(r.value)
|
|
4012
4043
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -4014,7 +4045,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4014
4045
|
href: t.url || "#",
|
|
4015
4046
|
class: "tpl:cursor-default",
|
|
4016
4047
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
4017
|
-
}, [V(
|
|
4048
|
+
}, [V(Uo, {
|
|
4018
4049
|
platform: t.platform,
|
|
4019
4050
|
"icon-style": e.block.iconStyle,
|
|
4020
4051
|
"icon-size": e.block.iconSize
|
|
@@ -4022,16 +4053,16 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4022
4053
|
"platform",
|
|
4023
4054
|
"icon-style",
|
|
4024
4055
|
"icon-size"
|
|
4025
|
-
])], 8,
|
|
4056
|
+
])], 8, Go))), 128))], 4)) : (f(), k("div", Ko, [V(j(Mi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
4026
4057
|
}
|
|
4027
|
-
}),
|
|
4058
|
+
}), Jo = { class: "tpl:w-full" }, Yo = {
|
|
4028
4059
|
key: 0,
|
|
4029
4060
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4030
4061
|
style: {
|
|
4031
4062
|
"background-color": "var(--tpl-bg-hover)",
|
|
4032
4063
|
color: "var(--tpl-text-dim)"
|
|
4033
4064
|
}
|
|
4034
|
-
},
|
|
4065
|
+
}, Xo = /* @__PURE__ */ B({
|
|
4035
4066
|
__name: "SpacerBlock",
|
|
4036
4067
|
props: {
|
|
4037
4068
|
block: {},
|
|
@@ -4043,23 +4074,23 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4043
4074
|
minHeight: `${t.block.height}px`,
|
|
4044
4075
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4045
4076
|
}));
|
|
4046
|
-
return (t, i) => (f(), k("div",
|
|
4077
|
+
return (t, i) => (f(), k("div", Jo, [I("div", {
|
|
4047
4078
|
style: L(r.value),
|
|
4048
4079
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
4049
|
-
}, [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)]));
|
|
4050
4081
|
}
|
|
4051
|
-
}),
|
|
4082
|
+
}), Zo = { class: "tpl:w-full" }, Qo = { key: 0 }, $o = [
|
|
4052
4083
|
"aria-label",
|
|
4053
4084
|
"data-placeholder",
|
|
4054
4085
|
"onBlur"
|
|
4055
|
-
],
|
|
4086
|
+
], es = [
|
|
4056
4087
|
"aria-label",
|
|
4057
4088
|
"data-placeholder",
|
|
4058
4089
|
"onBlur"
|
|
4059
|
-
],
|
|
4090
|
+
], ts = {
|
|
4060
4091
|
key: 1,
|
|
4061
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)]"
|
|
4062
|
-
},
|
|
4093
|
+
}, ns = /*#__PURE__*/ qi(/* @__PURE__ */ B({
|
|
4063
4094
|
__name: "TableBlock",
|
|
4064
4095
|
props: {
|
|
4065
4096
|
block: {},
|
|
@@ -4104,11 +4135,11 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4104
4135
|
} : n);
|
|
4105
4136
|
i.updateBlock(n.block.id, { rows: o });
|
|
4106
4137
|
}
|
|
4107
|
-
return (e, n) => (f(), k("div",
|
|
4138
|
+
return (e, n) => (f(), k("div", Zo, [a.value ? (f(), k("table", {
|
|
4108
4139
|
key: 0,
|
|
4109
4140
|
style: L(o.value),
|
|
4110
4141
|
class: "tpl-table-editable"
|
|
4111
|
-
}, [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", {
|
|
4112
4143
|
key: e.id,
|
|
4113
4144
|
style: L(l.value),
|
|
4114
4145
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4117,7 +4148,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4117
4148
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
4118
4149
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4119
4150
|
onClick: M(p, ["stop"])
|
|
4120
|
-
}, 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", {
|
|
4121
4152
|
key: i.id,
|
|
4122
4153
|
style: L(s.value),
|
|
4123
4154
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4126,9 +4157,9 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4126
4157
|
onBlur: (t) => m(e.id, i.id, t),
|
|
4127
4158
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4128
4159
|
onClick: M(p, ["stop"])
|
|
4129
|
-
}, 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)]))]));
|
|
4130
4161
|
}
|
|
4131
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4162
|
+
}), [["__scopeId", "data-v-963ac422"]]), rs = /* @__PURE__ */ B({
|
|
4132
4163
|
__name: "VideoPlayButton",
|
|
4133
4164
|
props: { hoverEffect: {
|
|
4134
4165
|
type: Boolean,
|
|
@@ -4146,7 +4177,7 @@ var Mo = { class: "tpl:w-full" }, No = {
|
|
|
4146
4177
|
});
|
|
4147
4178
|
//#endregion
|
|
4148
4179
|
//#region src/utils/videoThumbnail.ts
|
|
4149
|
-
function
|
|
4180
|
+
function is(e) {
|
|
4150
4181
|
if (!e) return {
|
|
4151
4182
|
platform: "unknown",
|
|
4152
4183
|
videoId: null,
|
|
@@ -4178,25 +4209,25 @@ function ts(e) {
|
|
|
4178
4209
|
thumbnailUrl: null
|
|
4179
4210
|
};
|
|
4180
4211
|
}
|
|
4181
|
-
function
|
|
4182
|
-
return t ||
|
|
4212
|
+
function as(e, t) {
|
|
4213
|
+
return t || is(e).thumbnailUrl;
|
|
4183
4214
|
}
|
|
4184
4215
|
//#endregion
|
|
4185
4216
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4186
|
-
var
|
|
4217
|
+
var os = ["src", "alt"], ss = {
|
|
4187
4218
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4188
4219
|
style: { opacity: "0.7" }
|
|
4189
|
-
},
|
|
4220
|
+
}, cs = ["href"], ls = ["src", "alt"], us = ["src", "alt"], ds = {
|
|
4190
4221
|
key: 3,
|
|
4191
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)]"
|
|
4192
|
-
},
|
|
4223
|
+
}, fs = /* @__PURE__ */ B({
|
|
4193
4224
|
__name: "VideoBlock",
|
|
4194
4225
|
props: {
|
|
4195
4226
|
block: {},
|
|
4196
4227
|
viewport: {}
|
|
4197
4228
|
},
|
|
4198
4229
|
setup(e) {
|
|
4199
|
-
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(() => {
|
|
4200
4231
|
let e = t.block.align;
|
|
4201
4232
|
return {
|
|
4202
4233
|
maxWidth: "100%",
|
|
@@ -4217,16 +4248,16 @@ var rs = ["src", "alt"], is = {
|
|
|
4217
4248
|
class: "tpl:w-full tpl:border-0",
|
|
4218
4249
|
src: e.block.placeholderUrl,
|
|
4219
4250
|
alt: e.block.alt
|
|
4220
|
-
}, null, 8,
|
|
4251
|
+
}, null, 8, os), V(rs)], 4)) : i.value ? (f(), k("div", {
|
|
4221
4252
|
key: 1,
|
|
4222
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)]",
|
|
4223
4254
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
4224
|
-
}, [V(j(
|
|
4255
|
+
}, [V(j(Vi), {
|
|
4225
4256
|
size: 36,
|
|
4226
4257
|
"stroke-width": 1.5,
|
|
4227
4258
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4228
4259
|
style: { opacity: "0.5" }
|
|
4229
|
-
}), 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", {
|
|
4230
4261
|
key: 0,
|
|
4231
4262
|
href: e.block.url,
|
|
4232
4263
|
target: "_blank",
|
|
@@ -4238,7 +4269,7 @@ var rs = ["src", "alt"], is = {
|
|
|
4238
4269
|
class: "tpl:w-full tpl:border-0",
|
|
4239
4270
|
src: a.value,
|
|
4240
4271
|
alt: e.block.alt
|
|
4241
|
-
}, null, 8,
|
|
4272
|
+
}, null, 8, ls), V(rs, { "hover-effect": "" })], 12, cs)) : (f(), k("div", {
|
|
4242
4273
|
key: 1,
|
|
4243
4274
|
class: "tpl:relative tpl:inline-block",
|
|
4244
4275
|
style: L(s.value)
|
|
@@ -4246,31 +4277,31 @@ var rs = ["src", "alt"], is = {
|
|
|
4246
4277
|
class: "tpl:w-full tpl:border-0",
|
|
4247
4278
|
src: a.value,
|
|
4248
4279
|
alt: e.block.alt
|
|
4249
|
-
}, null, 8,
|
|
4280
|
+
}, null, 8, us), V(rs)], 4))], 64)) : (f(), k("div", ds, [V(j(Vi), {
|
|
4250
4281
|
size: 40,
|
|
4251
4282
|
"stroke-width": 1.5,
|
|
4252
4283
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4253
4284
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
4254
4285
|
}
|
|
4255
|
-
}),
|
|
4256
|
-
section:
|
|
4257
|
-
title:
|
|
4258
|
-
paragraph:
|
|
4259
|
-
image:
|
|
4260
|
-
button:
|
|
4261
|
-
divider:
|
|
4262
|
-
video:
|
|
4263
|
-
social:
|
|
4264
|
-
menu:
|
|
4265
|
-
table:
|
|
4266
|
-
spacer:
|
|
4267
|
-
html:
|
|
4268
|
-
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))
|
|
4269
4300
|
};
|
|
4270
|
-
function
|
|
4301
|
+
function ms(e) {
|
|
4271
4302
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4272
4303
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4273
|
-
let { resolvedTheme: c } =
|
|
4304
|
+
let { resolvedTheme: c } = Dr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = kr({
|
|
4274
4305
|
themeOverrides: u,
|
|
4275
4306
|
resolvedTheme: c,
|
|
4276
4307
|
extraStyles: e.themeExtraStyles
|
|
@@ -4295,13 +4326,13 @@ function ds(e) {
|
|
|
4295
4326
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4296
4327
|
e ? g.pause() : g.resume();
|
|
4297
4328
|
}));
|
|
4298
|
-
let v =
|
|
4329
|
+
let v = Er(t, {
|
|
4299
4330
|
t: a,
|
|
4300
4331
|
format: o
|
|
4301
|
-
}), y =
|
|
4302
|
-
if (
|
|
4332
|
+
}), y = Nr();
|
|
4333
|
+
if (Rr(y, ps), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Aa);
|
|
4303
4334
|
function b(e) {
|
|
4304
|
-
for (let t of e) y.registerCustom(t,
|
|
4335
|
+
for (let t of e) y.registerCustom(t, Aa);
|
|
4305
4336
|
}
|
|
4306
4337
|
let x = Ln();
|
|
4307
4338
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4312,7 +4343,7 @@ function ds(e) {
|
|
|
4312
4343
|
}, { capture: !0 });
|
|
4313
4344
|
}
|
|
4314
4345
|
function S(r) {
|
|
4315
|
-
x.isActive() &&
|
|
4346
|
+
x.isActive() && Vr(r, {
|
|
4316
4347
|
history: f,
|
|
4317
4348
|
selectBlock: (e) => t.selectBlock(e),
|
|
4318
4349
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4323,17 +4354,17 @@ function ds(e) {
|
|
|
4323
4354
|
}
|
|
4324
4355
|
q(document, "keydown", S);
|
|
4325
4356
|
let w = C(null);
|
|
4326
|
-
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));
|
|
4327
4358
|
let ee = gt(n.mergeTags?.syntax);
|
|
4328
|
-
p(
|
|
4329
|
-
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({
|
|
4330
4361
|
content: t.content,
|
|
4331
4362
|
options: n.lint ?? {},
|
|
4332
4363
|
updateBlock: t.updateBlock,
|
|
4333
4364
|
updateSettings: t.updateSettings,
|
|
4334
4365
|
removeBlock: t.removeBlock
|
|
4335
4366
|
});
|
|
4336
|
-
p(
|
|
4367
|
+
p(fr, T);
|
|
4337
4368
|
function E() {
|
|
4338
4369
|
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4339
4370
|
}
|
|
@@ -4357,14 +4388,14 @@ function ds(e) {
|
|
|
4357
4388
|
}
|
|
4358
4389
|
//#endregion
|
|
4359
4390
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4360
|
-
var
|
|
4391
|
+
var hs = ["data-tpl-theme"], gs = /* @__PURE__ */ B({
|
|
4361
4392
|
__name: "TplModal",
|
|
4362
4393
|
props: { visible: { type: Boolean } },
|
|
4363
4394
|
emits: ["close", "keydown"],
|
|
4364
4395
|
setup(e, { emit: t }) {
|
|
4365
4396
|
let n = e, r = t, i = C(null);
|
|
4366
|
-
|
|
4367
|
-
let a = v(Gn), s =
|
|
4397
|
+
ea(i, O(() => n.visible));
|
|
4398
|
+
let a = v(Gn), s = io();
|
|
4368
4399
|
function c(e) {
|
|
4369
4400
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4370
4401
|
}
|
|
@@ -4393,11 +4424,11 @@ var fs = ["data-tpl-theme"], ps = /* @__PURE__ */ B({
|
|
|
4393
4424
|
}, [I("div", {
|
|
4394
4425
|
ref_key: "dialogRef",
|
|
4395
4426
|
ref: i
|
|
4396
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4427
|
+
}, [o(t.$slots, "default")], 512)], 40, hs)) : A("", !0)]),
|
|
4397
4428
|
_: 3
|
|
4398
4429
|
})], 8, ["to"])) : A("", !0);
|
|
4399
4430
|
}
|
|
4400
|
-
}),
|
|
4431
|
+
}), _s = class e {
|
|
4401
4432
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4402
4433
|
accessToken = null;
|
|
4403
4434
|
expiresAt = null;
|
|
@@ -4498,8 +4529,8 @@ var fs = ["data-tpl-theme"], ps = /* @__PURE__ */ B({
|
|
|
4498
4529
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4499
4530
|
}
|
|
4500
4531
|
};
|
|
4501
|
-
function
|
|
4502
|
-
return e.mode === "direct" ? new
|
|
4532
|
+
function vs(e, t) {
|
|
4533
|
+
return e.mode === "direct" ? new _s({
|
|
4503
4534
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4504
4535
|
baseUrl: e.baseUrl,
|
|
4505
4536
|
requestOptions: {
|
|
@@ -4513,7 +4544,7 @@ function hs(e, t) {
|
|
|
4513
4544
|
}
|
|
4514
4545
|
},
|
|
4515
4546
|
onError: t
|
|
4516
|
-
}) : new
|
|
4547
|
+
}) : new _s({
|
|
4517
4548
|
url: e.url,
|
|
4518
4549
|
baseUrl: e.baseUrl,
|
|
4519
4550
|
requestOptions: e.requestOptions,
|
|
@@ -4525,16 +4556,16 @@ function hs(e, t) {
|
|
|
4525
4556
|
function Z(e, t) {
|
|
4526
4557
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4527
4558
|
}
|
|
4528
|
-
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`, $ = {
|
|
4529
4560
|
health: "/api/v1/health",
|
|
4530
|
-
"projects.config": `${
|
|
4531
|
-
"broadcasting.auth": `${
|
|
4532
|
-
"templates.store": `${
|
|
4561
|
+
"projects.config": `${ys}/config`,
|
|
4562
|
+
"broadcasting.auth": `${ys}/broadcasting/auth`,
|
|
4563
|
+
"templates.store": `${ys}/templates`,
|
|
4533
4564
|
"templates.show": `${Q}`,
|
|
4534
4565
|
"templates.update": `${Q}`,
|
|
4535
4566
|
"templates.destroy": `${Q}`,
|
|
4536
4567
|
"templates.export": `${Q}/export`,
|
|
4537
|
-
"templates.importFromBeefree": `${
|
|
4568
|
+
"templates.importFromBeefree": `${ys}/templates/import/from-beefree`,
|
|
4538
4569
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4539
4570
|
"snapshots.index": `${Q}/snapshots`,
|
|
4540
4571
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4545,31 +4576,31 @@ var gs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${gs}/templates/{te
|
|
|
4545
4576
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4546
4577
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4547
4578
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4548
|
-
"ai.generate": `${
|
|
4549
|
-
"ai.conversationMessages": `${
|
|
4550
|
-
"ai.suggestions": `${
|
|
4551
|
-
"ai.rewriteText": `${
|
|
4552
|
-
"ai.score": `${
|
|
4553
|
-
"ai.fixFinding": `${
|
|
4554
|
-
"ai.generateFromDesign": `${
|
|
4555
|
-
"media.upload": `${
|
|
4556
|
-
"media.browse": `${
|
|
4557
|
-
"media.delete": `${
|
|
4558
|
-
"media.move": `${
|
|
4559
|
-
"media.update": `${
|
|
4560
|
-
"media.replace": `${
|
|
4561
|
-
"media.checkUsage": `${
|
|
4562
|
-
"media.frequentlyUsed": `${
|
|
4563
|
-
"media.importFromUrl": `${
|
|
4564
|
-
"folders.index": `${
|
|
4565
|
-
"folders.store": `${
|
|
4566
|
-
"folders.update": `${
|
|
4567
|
-
"folders.destroy": `${
|
|
4568
|
-
"savedModules.index": `${
|
|
4569
|
-
"savedModules.store": `${
|
|
4570
|
-
"savedModules.update": `${
|
|
4571
|
-
"savedModules.destroy": `${
|
|
4572
|
-
},
|
|
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 {
|
|
4573
4604
|
authManager;
|
|
4574
4605
|
constructor(e) {
|
|
4575
4606
|
this.authManager = e;
|
|
@@ -4755,14 +4786,14 @@ var gs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${gs}/templates/{te
|
|
|
4755
4786
|
};
|
|
4756
4787
|
//#endregion
|
|
4757
4788
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4758
|
-
function
|
|
4789
|
+
function Ts(e) {
|
|
4759
4790
|
return {
|
|
4760
4791
|
host: e.host,
|
|
4761
4792
|
port: e.port,
|
|
4762
4793
|
appKey: e.app_key
|
|
4763
4794
|
};
|
|
4764
4795
|
}
|
|
4765
|
-
var
|
|
4796
|
+
var Es = class {
|
|
4766
4797
|
pusher = null;
|
|
4767
4798
|
authManager;
|
|
4768
4799
|
config;
|
|
@@ -4829,7 +4860,7 @@ var Cs = class {
|
|
|
4829
4860
|
};
|
|
4830
4861
|
//#endregion
|
|
4831
4862
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4832
|
-
function
|
|
4863
|
+
function Ds(e, t) {
|
|
4833
4864
|
let { operation: n, data: r } = t;
|
|
4834
4865
|
switch (n) {
|
|
4835
4866
|
case "add_block":
|
|
@@ -4857,11 +4888,11 @@ function ws(e, t) {
|
|
|
4857
4888
|
}
|
|
4858
4889
|
//#endregion
|
|
4859
4890
|
//#region ../core/src/cloud/editor.ts
|
|
4860
|
-
function
|
|
4891
|
+
function Os(e) {
|
|
4861
4892
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4862
4893
|
}
|
|
4863
|
-
function
|
|
4864
|
-
let t = new
|
|
4894
|
+
function ks(e) {
|
|
4895
|
+
let t = new ws(e.authManager), n = S({
|
|
4865
4896
|
template: null,
|
|
4866
4897
|
content: We(e.defaultFontFamily, e.templateDefaults),
|
|
4867
4898
|
selectedBlockId: null,
|
|
@@ -4967,7 +4998,7 @@ function Es(e) {
|
|
|
4967
4998
|
let l;
|
|
4968
4999
|
if (r) {
|
|
4969
5000
|
let e = o(n.content.blocks, r);
|
|
4970
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
5001
|
+
if (!e || e.type !== "section" || i < 0 || i >= Os(e.columns)) return;
|
|
4971
5002
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4972
5003
|
} else l = n.content.blocks;
|
|
4973
5004
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -5059,11 +5090,11 @@ function Es(e) {
|
|
|
5059
5090
|
}
|
|
5060
5091
|
//#endregion
|
|
5061
5092
|
//#region ../core/src/cloud/ai-chat.ts
|
|
5062
|
-
var
|
|
5063
|
-
function
|
|
5064
|
-
return `msg_${Date.now()}_${++
|
|
5093
|
+
var As = 0;
|
|
5094
|
+
function js() {
|
|
5095
|
+
return `msg_${Date.now()}_${++As}`;
|
|
5065
5096
|
}
|
|
5066
|
-
function
|
|
5097
|
+
function Ms(e) {
|
|
5067
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);
|
|
5068
5099
|
function _(e, t) {
|
|
5069
5100
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -5157,14 +5188,14 @@ function ks(e) {
|
|
|
5157
5188
|
let v = n();
|
|
5158
5189
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
5159
5190
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
5160
|
-
let y =
|
|
5191
|
+
let y = js();
|
|
5161
5192
|
a.value = [...a.value, {
|
|
5162
5193
|
id: y,
|
|
5163
5194
|
role: "user",
|
|
5164
5195
|
content: e,
|
|
5165
5196
|
timestamp: Date.now()
|
|
5166
5197
|
}];
|
|
5167
|
-
let b =
|
|
5198
|
+
let b = js();
|
|
5168
5199
|
a.value = [...a.value, {
|
|
5169
5200
|
id: b,
|
|
5170
5201
|
role: "assistant",
|
|
@@ -5255,7 +5286,7 @@ function ks(e) {
|
|
|
5255
5286
|
}
|
|
5256
5287
|
//#endregion
|
|
5257
5288
|
//#region ../core/src/cloud/ai-config.ts
|
|
5258
|
-
function
|
|
5289
|
+
function Ns(e) {
|
|
5259
5290
|
function t(t) {
|
|
5260
5291
|
return e !== !1 && e?.[t] !== !1;
|
|
5261
5292
|
}
|
|
@@ -5266,7 +5297,7 @@ function As(e) {
|
|
|
5266
5297
|
}
|
|
5267
5298
|
//#endregion
|
|
5268
5299
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5269
|
-
function
|
|
5300
|
+
function Ps(e) {
|
|
5270
5301
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5271
5302
|
async function l(e, o) {
|
|
5272
5303
|
let s = n();
|
|
@@ -5411,7 +5442,7 @@ function js(e) {
|
|
|
5411
5442
|
}
|
|
5412
5443
|
//#endregion
|
|
5413
5444
|
//#region ../core/src/cloud/design-reference.ts
|
|
5414
|
-
function
|
|
5445
|
+
function Fs(e) {
|
|
5415
5446
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5416
5447
|
async function s(e) {
|
|
5417
5448
|
let s = n();
|
|
@@ -5474,8 +5505,8 @@ function Ms(e) {
|
|
|
5474
5505
|
}
|
|
5475
5506
|
//#endregion
|
|
5476
5507
|
//#region ../core/src/cloud/comments.ts
|
|
5477
|
-
function
|
|
5478
|
-
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(() => {
|
|
5479
5510
|
let e = 0;
|
|
5480
5511
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5481
5512
|
return e;
|
|
@@ -5674,17 +5705,17 @@ function Ns(e) {
|
|
|
5674
5705
|
}
|
|
5675
5706
|
//#endregion
|
|
5676
5707
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5677
|
-
function
|
|
5708
|
+
function Ls(e) {
|
|
5678
5709
|
let { comments: t, channel: n } = e;
|
|
5679
5710
|
H(n, (e, n) => {
|
|
5680
5711
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5681
|
-
|
|
5712
|
+
Rs(t, e);
|
|
5682
5713
|
});
|
|
5683
5714
|
}), l(() => {
|
|
5684
5715
|
n.value?.unbind("comment-broadcast");
|
|
5685
5716
|
});
|
|
5686
5717
|
}
|
|
5687
|
-
function
|
|
5718
|
+
function Rs(e, t) {
|
|
5688
5719
|
switch (t.action) {
|
|
5689
5720
|
case "comment_created":
|
|
5690
5721
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5703,7 +5734,7 @@ function Fs(e, t) {
|
|
|
5703
5734
|
}
|
|
5704
5735
|
//#endregion
|
|
5705
5736
|
//#region ../core/src/cloud/collaboration.ts
|
|
5706
|
-
var
|
|
5737
|
+
var zs = [
|
|
5707
5738
|
"pusher:member_added",
|
|
5708
5739
|
"pusher:member_removed",
|
|
5709
5740
|
"client-block_locked",
|
|
@@ -5711,10 +5742,10 @@ var Is = [
|
|
|
5711
5742
|
"client-operation",
|
|
5712
5743
|
"mcp-operation"
|
|
5713
5744
|
];
|
|
5714
|
-
function
|
|
5715
|
-
for (let t of
|
|
5745
|
+
function Bs(e) {
|
|
5746
|
+
for (let t of zs) e.unbind(t);
|
|
5716
5747
|
}
|
|
5717
|
-
var
|
|
5748
|
+
var Vs = [
|
|
5718
5749
|
"#3b82f6",
|
|
5719
5750
|
"#ef4444",
|
|
5720
5751
|
"#10b981",
|
|
@@ -5726,10 +5757,10 @@ var Rs = [
|
|
|
5726
5757
|
"#6366f1",
|
|
5727
5758
|
"#14b8a6"
|
|
5728
5759
|
];
|
|
5729
|
-
function
|
|
5760
|
+
function Hs(e) {
|
|
5730
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 ?? "");
|
|
5731
5762
|
function u() {
|
|
5732
|
-
let e =
|
|
5763
|
+
let e = Vs[o % Vs.length];
|
|
5733
5764
|
return o++, e;
|
|
5734
5765
|
}
|
|
5735
5766
|
function d(e) {
|
|
@@ -5771,7 +5802,7 @@ function zs(e) {
|
|
|
5771
5802
|
function h(e) {
|
|
5772
5803
|
s = !0;
|
|
5773
5804
|
try {
|
|
5774
|
-
|
|
5805
|
+
Ds(n, e);
|
|
5775
5806
|
} finally {
|
|
5776
5807
|
s = !1;
|
|
5777
5808
|
}
|
|
@@ -5791,7 +5822,7 @@ function zs(e) {
|
|
|
5791
5822
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5792
5823
|
s || (t && v(t), e && _(e));
|
|
5793
5824
|
}), H(r, (t, n) => {
|
|
5794
|
-
if (n &&
|
|
5825
|
+
if (n && Bs(n), !t) {
|
|
5795
5826
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5796
5827
|
return;
|
|
5797
5828
|
}
|
|
@@ -5823,7 +5854,7 @@ function zs(e) {
|
|
|
5823
5854
|
h(e);
|
|
5824
5855
|
});
|
|
5825
5856
|
}), l(() => {
|
|
5826
|
-
r.value &&
|
|
5857
|
+
r.value && Bs(r.value);
|
|
5827
5858
|
}), {
|
|
5828
5859
|
collaborators: i,
|
|
5829
5860
|
lockedBlocks: a,
|
|
@@ -5833,7 +5864,7 @@ function zs(e) {
|
|
|
5833
5864
|
}
|
|
5834
5865
|
//#endregion
|
|
5835
5866
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5836
|
-
function
|
|
5867
|
+
function Us(e, t) {
|
|
5837
5868
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5838
5869
|
e.addBlock = (e, r, i, a) => {
|
|
5839
5870
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5888,11 +5919,11 @@ function Bs(e, t) {
|
|
|
5888
5919
|
}
|
|
5889
5920
|
//#endregion
|
|
5890
5921
|
//#region ../core/src/cloud/web-socket.ts
|
|
5891
|
-
function
|
|
5922
|
+
function Ws(e) {
|
|
5892
5923
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5893
5924
|
async function s(e, s) {
|
|
5894
5925
|
if (a) return;
|
|
5895
|
-
a = new
|
|
5926
|
+
a = new Es({
|
|
5896
5927
|
authManager: t,
|
|
5897
5928
|
config: s,
|
|
5898
5929
|
onError: n
|
|
@@ -5920,8 +5951,8 @@ function Vs(e) {
|
|
|
5920
5951
|
}
|
|
5921
5952
|
//#endregion
|
|
5922
5953
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5923
|
-
function
|
|
5924
|
-
let t = new
|
|
5954
|
+
function Gs(e) {
|
|
5955
|
+
let t = new ws(e.authManager), n = C([]), r = C(!1);
|
|
5925
5956
|
async function i(i) {
|
|
5926
5957
|
r.value = !0;
|
|
5927
5958
|
try {
|
|
@@ -5969,8 +6000,8 @@ function Hs(e) {
|
|
|
5969
6000
|
}
|
|
5970
6001
|
//#endregion
|
|
5971
6002
|
//#region ../core/src/cloud/snapshots.ts
|
|
5972
|
-
function
|
|
5973
|
-
let t = new
|
|
6003
|
+
function Ks(e) {
|
|
6004
|
+
let t = new ws(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5974
6005
|
async function a() {
|
|
5975
6006
|
r.value = !0;
|
|
5976
6007
|
try {
|
|
@@ -6002,8 +6033,8 @@ function Us(e) {
|
|
|
6002
6033
|
}
|
|
6003
6034
|
//#endregion
|
|
6004
6035
|
//#region ../core/src/cloud/test-email.ts
|
|
6005
|
-
function
|
|
6006
|
-
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);
|
|
6007
6038
|
o && H(o, (e) => {
|
|
6008
6039
|
e && (d.value = t.testEmailConfig);
|
|
6009
6040
|
}, { immediate: !0 });
|
|
@@ -6039,8 +6070,8 @@ function Ws(e) {
|
|
|
6039
6070
|
}
|
|
6040
6071
|
//#endregion
|
|
6041
6072
|
//#region ../core/src/cloud/export.ts
|
|
6042
|
-
function
|
|
6043
|
-
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);
|
|
6044
6075
|
function a() {
|
|
6045
6076
|
let e = n?.();
|
|
6046
6077
|
return {
|
|
@@ -6066,8 +6097,8 @@ function Gs(e) {
|
|
|
6066
6097
|
}
|
|
6067
6098
|
//#endregion
|
|
6068
6099
|
//#region ../core/src/cloud/plan-config.ts
|
|
6069
|
-
function
|
|
6070
|
-
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);
|
|
6071
6102
|
function s(e) {
|
|
6072
6103
|
return r.value?.features[e] ?? !1;
|
|
6073
6104
|
}
|
|
@@ -6093,11 +6124,11 @@ function Ks(e) {
|
|
|
6093
6124
|
}
|
|
6094
6125
|
//#endregion
|
|
6095
6126
|
//#region ../core/src/cloud/health-check.ts
|
|
6096
|
-
var
|
|
6097
|
-
function
|
|
6127
|
+
var Xs = 5e3;
|
|
6128
|
+
function Zs(e) {
|
|
6098
6129
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
6099
6130
|
}
|
|
6100
|
-
async function
|
|
6131
|
+
async function Qs(e, t) {
|
|
6101
6132
|
let n = performance.now();
|
|
6102
6133
|
try {
|
|
6103
6134
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -6149,7 +6180,7 @@ async function Ys(e, t) {
|
|
|
6149
6180
|
};
|
|
6150
6181
|
}
|
|
6151
6182
|
}
|
|
6152
|
-
async function
|
|
6183
|
+
async function $s(e) {
|
|
6153
6184
|
if (!e?.host || !e?.app_key) return {
|
|
6154
6185
|
ok: !1,
|
|
6155
6186
|
error: "WebSocket configuration not available"
|
|
@@ -6165,7 +6196,7 @@ async function Xs(e) {
|
|
|
6165
6196
|
ok: !1,
|
|
6166
6197
|
error: "WebSocket connection timed out"
|
|
6167
6198
|
});
|
|
6168
|
-
},
|
|
6199
|
+
}, Xs);
|
|
6169
6200
|
try {
|
|
6170
6201
|
n = new WebSocket(t);
|
|
6171
6202
|
} catch (t) {
|
|
@@ -6185,8 +6216,8 @@ async function Xs(e) {
|
|
|
6185
6216
|
};
|
|
6186
6217
|
});
|
|
6187
6218
|
}
|
|
6188
|
-
async function
|
|
6189
|
-
let t = await
|
|
6219
|
+
async function ec(e = {}) {
|
|
6220
|
+
let t = await Qs(Zs(e), e.authManager), n = await $s(t.wsConfig);
|
|
6190
6221
|
return {
|
|
6191
6222
|
api: t.api,
|
|
6192
6223
|
websocket: n,
|
|
@@ -6196,29 +6227,29 @@ async function Zs(e = {}) {
|
|
|
6196
6227
|
}
|
|
6197
6228
|
//#endregion
|
|
6198
6229
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
6199
|
-
function
|
|
6230
|
+
function tc(e) {
|
|
6200
6231
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
6201
6232
|
H(n, (e, n) => {
|
|
6202
6233
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
6203
|
-
|
|
6234
|
+
Ds(t, e), r?.(e);
|
|
6204
6235
|
});
|
|
6205
6236
|
});
|
|
6206
6237
|
}
|
|
6207
6238
|
//#endregion
|
|
6208
6239
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6209
|
-
var
|
|
6240
|
+
var nc = {
|
|
6210
6241
|
key: 0,
|
|
6211
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)]"
|
|
6212
|
-
},
|
|
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 = {
|
|
6213
6244
|
key: 0,
|
|
6214
6245
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6215
|
-
},
|
|
6246
|
+
}, lc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, uc = {
|
|
6216
6247
|
key: 1,
|
|
6217
6248
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6218
|
-
},
|
|
6249
|
+
}, dc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fc = {
|
|
6219
6250
|
key: 2,
|
|
6220
6251
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6221
|
-
},
|
|
6252
|
+
}, pc = {
|
|
6222
6253
|
key: 0,
|
|
6223
6254
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
6224
6255
|
style: {
|
|
@@ -6227,10 +6258,10 @@ var $s = {
|
|
|
6227
6258
|
"max-width": "85%",
|
|
6228
6259
|
"box-shadow": "var(--tpl-shadow)"
|
|
6229
6260
|
}
|
|
6230
|
-
},
|
|
6261
|
+
}, mc = {
|
|
6231
6262
|
key: 1,
|
|
6232
6263
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6233
|
-
},
|
|
6264
|
+
}, hc = {
|
|
6234
6265
|
key: 1,
|
|
6235
6266
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
6236
6267
|
style: {
|
|
@@ -6239,21 +6270,21 @@ var $s = {
|
|
|
6239
6270
|
color: "var(--tpl-text)",
|
|
6240
6271
|
"box-shadow": "var(--tpl-shadow)"
|
|
6241
6272
|
}
|
|
6242
|
-
},
|
|
6273
|
+
}, gc = {
|
|
6243
6274
|
key: 0,
|
|
6244
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",
|
|
6245
6276
|
style: {
|
|
6246
6277
|
"background-color": "var(--tpl-danger-light)",
|
|
6247
6278
|
color: "var(--tpl-danger)"
|
|
6248
6279
|
}
|
|
6249
|
-
},
|
|
6280
|
+
}, _c = {
|
|
6250
6281
|
key: 1,
|
|
6251
6282
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
6252
6283
|
style: {
|
|
6253
6284
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6254
6285
|
"backdrop-filter": "blur(2px)"
|
|
6255
6286
|
}
|
|
6256
|
-
},
|
|
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({
|
|
6257
6288
|
__name: "AiChatSidebar",
|
|
6258
6289
|
props: {
|
|
6259
6290
|
visible: { type: Boolean },
|
|
@@ -6261,7 +6292,7 @@ var $s = {
|
|
|
6261
6292
|
},
|
|
6262
6293
|
emits: ["close"],
|
|
6263
6294
|
setup(e, { emit: t }) {
|
|
6264
|
-
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({
|
|
6265
6296
|
authManager: o,
|
|
6266
6297
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6267
6298
|
onApply: n.onApply,
|
|
@@ -6308,42 +6339,42 @@ var $s = {
|
|
|
6308
6339
|
"leave-from-class": "tpl:translate-x-0",
|
|
6309
6340
|
"leave-to-class": "tpl:translate-x-full"
|
|
6310
6341
|
}, {
|
|
6311
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6312
|
-
I("div",
|
|
6342
|
+
default: b(() => [e.visible ? (f(), k("div", nc, [
|
|
6343
|
+
I("div", rc, [I("div", ic, [V(j(Fi), {
|
|
6313
6344
|
size: 13,
|
|
6314
6345
|
"stroke-width": 2
|
|
6315
|
-
}), 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", {
|
|
6316
6347
|
key: 0,
|
|
6317
6348
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6318
6349
|
title: j(i).aiChat.clear,
|
|
6319
6350
|
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6320
|
-
}, [V(j(
|
|
6351
|
+
}, [V(j(Li), {
|
|
6321
6352
|
size: 14,
|
|
6322
6353
|
"stroke-width": 2
|
|
6323
|
-
})], 8,
|
|
6354
|
+
})], 8, oc)) : A("", !0), I("button", {
|
|
6324
6355
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6325
6356
|
onClick: n[1] ||= (e) => r("close")
|
|
6326
|
-
}, [V(j(
|
|
6357
|
+
}, [V(j(Hi), {
|
|
6327
6358
|
size: 14,
|
|
6328
6359
|
"stroke-width": 2
|
|
6329
6360
|
})])])]),
|
|
6330
|
-
I("div",
|
|
6361
|
+
I("div", sc, [
|
|
6331
6362
|
I("div", {
|
|
6332
6363
|
ref_key: "messagesContainer",
|
|
6333
6364
|
ref: p,
|
|
6334
6365
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6335
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6366
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", cc, [V(j(Ci), {
|
|
6336
6367
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6337
6368
|
size: 24,
|
|
6338
6369
|
"stroke-width": 2
|
|
6339
|
-
}), 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), {
|
|
6340
6371
|
size: 32,
|
|
6341
6372
|
"stroke-width": 1.5,
|
|
6342
6373
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6343
|
-
}), 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", {
|
|
6344
6375
|
key: e.id,
|
|
6345
6376
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6346
|
-
}, [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", {
|
|
6347
6378
|
key: 2,
|
|
6348
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",
|
|
6349
6380
|
style: {
|
|
@@ -6352,19 +6383,19 @@ var $s = {
|
|
|
6352
6383
|
"background-color": "transparent"
|
|
6353
6384
|
},
|
|
6354
6385
|
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6355
|
-
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(
|
|
6386
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(Oi), {
|
|
6356
6387
|
size: 12,
|
|
6357
6388
|
"stroke-width": 2
|
|
6358
|
-
}), 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), {
|
|
6359
6390
|
size: 12,
|
|
6360
6391
|
"stroke-width": 2
|
|
6361
6392
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6362
|
-
j(u).error.value ? (f(), k("div",
|
|
6393
|
+
j(u).error.value ? (f(), k("div", gc, [V(j(li), {
|
|
6363
6394
|
size: 14,
|
|
6364
6395
|
"stroke-width": 2,
|
|
6365
6396
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6366
6397
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6367
|
-
(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", {
|
|
6368
6399
|
key: t,
|
|
6369
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"]),
|
|
6370
6401
|
style: {
|
|
@@ -6374,104 +6405,104 @@ var $s = {
|
|
|
6374
6405
|
"box-shadow": "var(--tpl-shadow)"
|
|
6375
6406
|
},
|
|
6376
6407
|
onClick: (t) => E(e)
|
|
6377
|
-
}, D(e), 11,
|
|
6408
|
+
}, D(e), 11, yc))), 128))])])) : A("", !0)
|
|
6378
6409
|
]),
|
|
6379
|
-
I("div",
|
|
6410
|
+
I("div", bc, [I("div", xc, [c(I("textarea", {
|
|
6380
6411
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6381
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)]",
|
|
6382
6413
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6383
6414
|
disabled: j(u).isGenerating.value,
|
|
6384
6415
|
rows: "3",
|
|
6385
6416
|
onKeydown: te
|
|
6386
|
-
}, null, 40,
|
|
6417
|
+
}, null, 40, Sc), [[ae, d.value]]), I("button", {
|
|
6387
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)]",
|
|
6388
6419
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6389
6420
|
onClick: ee
|
|
6390
|
-
}, [V(j(
|
|
6421
|
+
}, [V(j(ji), {
|
|
6391
6422
|
size: 16,
|
|
6392
6423
|
"stroke-width": 2
|
|
6393
|
-
})], 8,
|
|
6424
|
+
})], 8, Cc)]), I("p", wc, D(j(i).aiMenu.disclaimer), 1)])
|
|
6394
6425
|
])) : A("", !0)]),
|
|
6395
6426
|
_: 1
|
|
6396
6427
|
}));
|
|
6397
6428
|
}
|
|
6398
|
-
}),
|
|
6399
|
-
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) {
|
|
6400
6431
|
let i = new Date(e).getTime();
|
|
6401
6432
|
if (Number.isNaN(i)) return null;
|
|
6402
6433
|
let a = Date.now() - i;
|
|
6403
6434
|
if (a < -6e4) return null;
|
|
6404
|
-
let o = Math.floor(a /
|
|
6435
|
+
let o = Math.floor(a / Oc), s = Math.floor(a / kc), c = Math.floor(a / Ac);
|
|
6405
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));
|
|
6406
6437
|
}
|
|
6407
6438
|
//#endregion
|
|
6408
6439
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6409
|
-
var
|
|
6440
|
+
var Mc = {
|
|
6410
6441
|
key: 0,
|
|
6411
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)]"
|
|
6412
|
-
},
|
|
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 = {
|
|
6413
6444
|
key: 0,
|
|
6414
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)]"
|
|
6415
|
-
},
|
|
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 = {
|
|
6416
6447
|
key: 0,
|
|
6417
6448
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6418
|
-
},
|
|
6449
|
+
}, zc = {
|
|
6419
6450
|
key: 1,
|
|
6420
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"
|
|
6421
|
-
},
|
|
6452
|
+
}, Bc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vc = {
|
|
6422
6453
|
key: 2,
|
|
6423
6454
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6424
|
-
},
|
|
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 = {
|
|
6425
6456
|
key: 0,
|
|
6426
6457
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6427
|
-
},
|
|
6458
|
+
}, Jc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Yc = ["title", "onClick"], Xc = ["title", "onClick"], Zc = ["title", "onClick"], Qc = {
|
|
6428
6459
|
key: 0,
|
|
6429
6460
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6430
|
-
},
|
|
6461
|
+
}, $c = {
|
|
6431
6462
|
key: 0,
|
|
6432
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)]"
|
|
6433
|
-
},
|
|
6464
|
+
}, el = ["onClick"], tl = {
|
|
6434
6465
|
key: 2,
|
|
6435
6466
|
class: "tpl:mt-2"
|
|
6436
|
-
},
|
|
6467
|
+
}, nl = ["onKeydown"], rl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, il = ["disabled", "onClick"], al = {
|
|
6437
6468
|
key: 3,
|
|
6438
6469
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6439
|
-
},
|
|
6470
|
+
}, ol = {
|
|
6440
6471
|
key: 4,
|
|
6441
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)]"
|
|
6442
|
-
},
|
|
6473
|
+
}, sl = { class: "tpl:flex-1" }, cl = ["onClick"], ll = {
|
|
6443
6474
|
key: 5,
|
|
6444
6475
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6445
|
-
},
|
|
6476
|
+
}, ul = ["title", "onClick"], dl = ["onClick"], fl = {
|
|
6446
6477
|
key: 0,
|
|
6447
6478
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6448
|
-
},
|
|
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 = {
|
|
6449
6480
|
key: 0,
|
|
6450
6481
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6451
|
-
},
|
|
6482
|
+
}, vl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, yl = ["title", "onClick"], bl = ["title", "onClick"], xl = {
|
|
6452
6483
|
key: 0,
|
|
6453
6484
|
class: "tpl:mt-1.5"
|
|
6454
|
-
},
|
|
6485
|
+
}, Sl = ["onKeydown"], Cl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, wl = ["disabled", "onClick"], Tl = {
|
|
6455
6486
|
key: 1,
|
|
6456
6487
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6457
|
-
},
|
|
6488
|
+
}, El = {
|
|
6458
6489
|
key: 2,
|
|
6459
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)]"
|
|
6460
|
-
},
|
|
6491
|
+
}, Dl = { class: "tpl:flex-1" }, Ol = ["onClick"], kl = {
|
|
6461
6492
|
key: 0,
|
|
6462
6493
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6463
|
-
},
|
|
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 = {
|
|
6464
6495
|
key: 0,
|
|
6465
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)]"
|
|
6466
|
-
},
|
|
6497
|
+
}, Il = {
|
|
6467
6498
|
key: 1,
|
|
6468
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)]"
|
|
6469
|
-
},
|
|
6500
|
+
}, Ll = ["placeholder", "disabled"], Rl = ["disabled"], zl = /*@__PURE__*/ B({
|
|
6470
6501
|
__name: "CommentsSidebar",
|
|
6471
6502
|
props: { visible: { type: Boolean } },
|
|
6472
6503
|
emits: ["close", "filterBlock"],
|
|
6473
6504
|
setup(e, { expose: t, emit: n }) {
|
|
6474
|
-
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(() => {
|
|
6475
6506
|
let e = /* @__PURE__ */ new Set();
|
|
6476
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);
|
|
6477
6508
|
return e;
|
|
@@ -6539,7 +6570,7 @@ var kc = {
|
|
|
6539
6570
|
return e.author_identifier === T.value;
|
|
6540
6571
|
}
|
|
6541
6572
|
function ve(e) {
|
|
6542
|
-
return
|
|
6573
|
+
return jc(e, o.snapshotHistory) ?? e;
|
|
6543
6574
|
}
|
|
6544
6575
|
function ye(e) {
|
|
6545
6576
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6566,22 +6597,22 @@ var kc = {
|
|
|
6566
6597
|
"leave-from-class": "tpl:translate-x-0",
|
|
6567
6598
|
"leave-to-class": "tpl:translate-x-full"
|
|
6568
6599
|
}, {
|
|
6569
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6570
|
-
I("div",
|
|
6571
|
-
V(j(
|
|
6600
|
+
default: b(() => [e.visible ? (f(), k("div", Mc, [
|
|
6601
|
+
I("div", Nc, [I("div", Pc, [
|
|
6602
|
+
V(j(wi), {
|
|
6572
6603
|
size: 13,
|
|
6573
6604
|
"stroke-width": 2
|
|
6574
6605
|
}),
|
|
6575
6606
|
I("span", null, D(j(o).comments.title), 1),
|
|
6576
|
-
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)
|
|
6577
6608
|
]), I("button", {
|
|
6578
6609
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6579
6610
|
onClick: n[0] ||= (e) => i("close")
|
|
6580
|
-
}, [V(j(
|
|
6611
|
+
}, [V(j(Hi), {
|
|
6581
6612
|
size: 14,
|
|
6582
6613
|
"stroke-width": 2
|
|
6583
6614
|
})])]),
|
|
6584
|
-
I("div",
|
|
6615
|
+
I("div", Ic, [
|
|
6585
6616
|
I("button", {
|
|
6586
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" : ""]),
|
|
6587
6618
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6596,156 +6627,156 @@ var kc = {
|
|
|
6596
6627
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6597
6628
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6598
6629
|
]),
|
|
6599
|
-
I("div",
|
|
6630
|
+
I("div", Lc, [j(u).isLoading.value ? (f(), k("div", Rc, [V(j(Ci), {
|
|
6600
6631
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6601
6632
|
size: 24,
|
|
6602
6633
|
"stroke-width": 2
|
|
6603
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6634
|
+
})])) : re.value.length === 0 ? (f(), k("div", zc, [V(j(wi), {
|
|
6604
6635
|
size: 32,
|
|
6605
6636
|
"stroke-width": 1.5,
|
|
6606
6637
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6607
|
-
}), 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", {
|
|
6608
6639
|
key: e.id,
|
|
6609
6640
|
class: "tpl-comment-thread"
|
|
6610
6641
|
}, [
|
|
6611
|
-
I("div",
|
|
6612
|
-
I("div",
|
|
6613
|
-
I("span",
|
|
6614
|
-
I("span",
|
|
6615
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6616
|
-
]), 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, [
|
|
6617
6648
|
I("button", {
|
|
6618
6649
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6619
6650
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6620
6651
|
onClick: (t) => ge(e.id)
|
|
6621
|
-
}, [V(j(
|
|
6652
|
+
}, [V(j(ui), {
|
|
6622
6653
|
size: 13,
|
|
6623
6654
|
"stroke-width": 2,
|
|
6624
6655
|
class: "tpl-resolve-icon",
|
|
6625
6656
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6626
|
-
}, null, 8, ["style"])], 8,
|
|
6657
|
+
}, null, 8, ["style"])], 8, Yc),
|
|
6627
6658
|
_e(e) ? (f(), k("button", {
|
|
6628
6659
|
key: 0,
|
|
6629
6660
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6630
6661
|
title: j(o).comments.edit,
|
|
6631
6662
|
onClick: (t) => le(e)
|
|
6632
|
-
}, [V(j(
|
|
6663
|
+
}, [V(j(Ei), {
|
|
6633
6664
|
size: 12,
|
|
6634
6665
|
"stroke-width": 2
|
|
6635
|
-
})], 8,
|
|
6666
|
+
})], 8, Xc)) : A("", !0),
|
|
6636
6667
|
_e(e) ? (f(), k("button", {
|
|
6637
6668
|
key: 1,
|
|
6638
6669
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6639
6670
|
title: j(o).comments.delete,
|
|
6640
6671
|
onClick: (t) => ue(e.id)
|
|
6641
|
-
}, [V(j(
|
|
6672
|
+
}, [V(j(Li), {
|
|
6642
6673
|
size: 12,
|
|
6643
6674
|
"stroke-width": 2
|
|
6644
|
-
})], 8,
|
|
6675
|
+
})], 8, Zc)) : A("", !0)
|
|
6645
6676
|
])]),
|
|
6646
6677
|
V(ie, { name: "tpl-resolve" }, {
|
|
6647
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6678
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Qc, [V(j(ii), {
|
|
6648
6679
|
size: 10,
|
|
6649
6680
|
"stroke-width": 2.5
|
|
6650
6681
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6651
6682
|
_: 2
|
|
6652
6683
|
}, 1024),
|
|
6653
|
-
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", {
|
|
6654
6685
|
key: 1,
|
|
6655
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)]",
|
|
6656
6687
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6657
|
-
}, " Block ", 8,
|
|
6658
|
-
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", {
|
|
6659
6690
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6660
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)]",
|
|
6661
6692
|
rows: "3",
|
|
6662
6693
|
onKeydown: (t) => xe(t, e.id)
|
|
6663
|
-
}, null, 40,
|
|
6694
|
+
}, null, 40, nl), [[ae, x.value]]), I("div", rl, [I("button", {
|
|
6664
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)]",
|
|
6665
6696
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6666
6697
|
onClick: (t) => me(e.id)
|
|
6667
|
-
}, D(j(o).comments.save), 9,
|
|
6698
|
+
}, D(j(o).comments.save), 9, il), I("button", {
|
|
6668
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)]",
|
|
6669
6700
|
onClick: n[5] ||= (e) => B()
|
|
6670
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6671
|
-
w.value === e.id ? (f(), k("div",
|
|
6672
|
-
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),
|
|
6673
6704
|
I("button", {
|
|
6674
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)]",
|
|
6675
6706
|
onClick: (t) => he(e.id)
|
|
6676
|
-
}, D(j(o).comments.delete), 9,
|
|
6707
|
+
}, D(j(o).comments.delete), 9, cl),
|
|
6677
6708
|
I("button", {
|
|
6678
6709
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6679
6710
|
onClick: n[6] ||= (e) => de()
|
|
6680
6711
|
}, D(j(o).comments.cancel), 1)
|
|
6681
6712
|
])) : A("", !0),
|
|
6682
|
-
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", {
|
|
6683
6714
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6684
6715
|
title: j(o).comments.reply,
|
|
6685
6716
|
onClick: (t) => se(e.id)
|
|
6686
|
-
}, [V(j(
|
|
6717
|
+
}, [V(j(Ai), {
|
|
6687
6718
|
size: 13,
|
|
6688
6719
|
"stroke-width": 2,
|
|
6689
6720
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6690
|
-
})], 8,
|
|
6721
|
+
})], 8, ul), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6691
6722
|
key: 0,
|
|
6692
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)]",
|
|
6693
6724
|
onClick: (t) => oe(e.id)
|
|
6694
|
-
}, [S.value.has(e.id) ? (f(), N(j(
|
|
6725
|
+
}, [S.value.has(e.id) ? (f(), N(j(ci), {
|
|
6695
6726
|
key: 0,
|
|
6696
6727
|
size: 11,
|
|
6697
6728
|
"stroke-width": 2
|
|
6698
|
-
})) : (f(), N(j(
|
|
6729
|
+
})) : (f(), N(j(ai), {
|
|
6699
6730
|
key: 1,
|
|
6700
6731
|
size: 11,
|
|
6701
6732
|
"stroke-width": 2
|
|
6702
|
-
})), 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)
|
|
6703
6734
|
]),
|
|
6704
6735
|
V(ie, { name: "tpl-replies" }, {
|
|
6705
|
-
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", {
|
|
6706
6737
|
key: t.id,
|
|
6707
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" : ""])
|
|
6708
6739
|
}, [
|
|
6709
|
-
I("div",
|
|
6710
|
-
I("span",
|
|
6711
|
-
I("span",
|
|
6712
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6713
|
-
]), 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", {
|
|
6714
6745
|
key: 0,
|
|
6715
6746
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6716
6747
|
title: j(o).comments.edit,
|
|
6717
6748
|
onClick: (e) => le(t)
|
|
6718
|
-
}, [V(j(
|
|
6749
|
+
}, [V(j(Ei), {
|
|
6719
6750
|
size: 11,
|
|
6720
6751
|
"stroke-width": 2
|
|
6721
|
-
})], 8,
|
|
6752
|
+
})], 8, yl)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6722
6753
|
key: 1,
|
|
6723
6754
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6724
6755
|
title: j(o).comments.delete,
|
|
6725
6756
|
onClick: (e) => ue(t.id)
|
|
6726
|
-
}, [V(j(
|
|
6757
|
+
}, [V(j(Li), {
|
|
6727
6758
|
size: 11,
|
|
6728
6759
|
"stroke-width": 2
|
|
6729
|
-
})], 8,
|
|
6730
|
-
y.value === t.id ? (f(), k("div",
|
|
6760
|
+
})], 8, bl)) : A("", !0)])]),
|
|
6761
|
+
y.value === t.id ? (f(), k("div", xl, [c(I("textarea", {
|
|
6731
6762
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6732
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)]",
|
|
6733
6764
|
rows: "2",
|
|
6734
6765
|
onKeydown: (e) => xe(e, t.id)
|
|
6735
|
-
}, null, 40,
|
|
6766
|
+
}, null, 40, Sl), [[ae, x.value]]), I("div", Cl, [I("button", {
|
|
6736
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)]",
|
|
6737
6768
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6738
6769
|
onClick: (e) => me(t.id)
|
|
6739
|
-
}, D(j(o).comments.save), 9,
|
|
6770
|
+
}, D(j(o).comments.save), 9, wl), I("button", {
|
|
6740
6771
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6741
6772
|
onClick: n[8] ||= (e) => B()
|
|
6742
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6743
|
-
w.value === t.id ? (f(), k("div",
|
|
6744
|
-
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),
|
|
6745
6776
|
I("button", {
|
|
6746
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)]",
|
|
6747
6778
|
onClick: (e) => he(t.id)
|
|
6748
|
-
}, D(j(o).comments.delete), 9,
|
|
6779
|
+
}, D(j(o).comments.delete), 9, Ol),
|
|
6749
6780
|
I("button", {
|
|
6750
6781
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6751
6782
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6755,30 +6786,30 @@ var kc = {
|
|
|
6755
6786
|
_: 2
|
|
6756
6787
|
}, 1024),
|
|
6757
6788
|
V(ie, { name: "tpl-replies" }, {
|
|
6758
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6789
|
+
default: b(() => [_.value === e.id ? (f(), k("div", kl, [I("div", Al, [c(I("textarea", {
|
|
6759
6790
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6760
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)]",
|
|
6761
6792
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6762
6793
|
rows: "2",
|
|
6763
6794
|
onKeydown: (t) => be(t, e.id)
|
|
6764
|
-
}, null, 40,
|
|
6795
|
+
}, null, 40, jl), [[ae, v.value]]), I("div", Ml, [I("button", {
|
|
6765
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)]",
|
|
6766
6797
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6767
6798
|
onClick: (t) => pe(e.id)
|
|
6768
|
-
}, [V(j(
|
|
6799
|
+
}, [V(j(ji), {
|
|
6769
6800
|
size: 14,
|
|
6770
6801
|
"stroke-width": 2
|
|
6771
|
-
})], 8,
|
|
6802
|
+
})], 8, Nl), I("button", {
|
|
6772
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)]",
|
|
6773
6804
|
onClick: n[11] ||= (e) => ce()
|
|
6774
|
-
}, [V(j(
|
|
6805
|
+
}, [V(j(Hi), {
|
|
6775
6806
|
size: 14,
|
|
6776
6807
|
"stroke-width": 2
|
|
6777
6808
|
})])])])])) : A("", !0)]),
|
|
6778
6809
|
_: 2
|
|
6779
6810
|
}, 1024)
|
|
6780
6811
|
]))), 128))]))]),
|
|
6781
|
-
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", {
|
|
6782
6813
|
ref_key: "newCommentInput",
|
|
6783
6814
|
ref: ee,
|
|
6784
6815
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6787,46 +6818,46 @@ var kc = {
|
|
|
6787
6818
|
disabled: j(u).isSubmitting.value,
|
|
6788
6819
|
rows: "2",
|
|
6789
6820
|
onKeydown: ye
|
|
6790
|
-
}, null, 40,
|
|
6821
|
+
}, null, 40, Ll), [[ae, g.value]]), I("button", {
|
|
6791
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)]",
|
|
6792
6823
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6793
6824
|
onClick: fe
|
|
6794
|
-
}, [j(u).isSubmitting.value ? (f(), N(j(
|
|
6825
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(Ci), {
|
|
6795
6826
|
key: 0,
|
|
6796
6827
|
class: "tpl-spinner",
|
|
6797
6828
|
size: 16,
|
|
6798
6829
|
"stroke-width": 2
|
|
6799
|
-
})) : (f(), N(j(
|
|
6830
|
+
})) : (f(), N(j(ji), {
|
|
6800
6831
|
key: 1,
|
|
6801
6832
|
size: 16,
|
|
6802
6833
|
"stroke-width": 2
|
|
6803
|
-
}))], 8,
|
|
6834
|
+
}))], 8, Rl)]))])
|
|
6804
6835
|
])) : A("", !0)]),
|
|
6805
6836
|
_: 1
|
|
6806
6837
|
}));
|
|
6807
6838
|
}
|
|
6808
|
-
}),
|
|
6839
|
+
}), Bl = /* @__PURE__ */ e({ default: () => Vl }), Vl = /*#__PURE__*/ qi(zl, [["__scopeId", "data-v-d204f573"]]), Hl = {
|
|
6809
6840
|
key: 0,
|
|
6810
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)]"
|
|
6811
|
-
},
|
|
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 = {
|
|
6812
6843
|
key: 0,
|
|
6813
6844
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6814
|
-
},
|
|
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 = {
|
|
6815
6846
|
key: 1,
|
|
6816
6847
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6817
|
-
},
|
|
6848
|
+
}, Xl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Zl = {
|
|
6818
6849
|
key: 0,
|
|
6819
6850
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6820
|
-
},
|
|
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 = {
|
|
6821
6852
|
key: 1,
|
|
6822
6853
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6823
|
-
},
|
|
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 = {
|
|
6824
6855
|
key: 0,
|
|
6825
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)]"
|
|
6826
|
-
},
|
|
6857
|
+
}, lu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, uu = { class: "tpl:flex tpl:gap-2" }, du = {
|
|
6827
6858
|
key: 1,
|
|
6828
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)]"
|
|
6829
|
-
},
|
|
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({
|
|
6830
6861
|
__name: "DesignReferenceSidebar",
|
|
6831
6862
|
props: {
|
|
6832
6863
|
visible: { type: Boolean },
|
|
@@ -6834,8 +6865,8 @@ var kc = {
|
|
|
6834
6865
|
},
|
|
6835
6866
|
emits: ["close", "apply"],
|
|
6836
6867
|
setup(e, { emit: t }) {
|
|
6837
|
-
let n = e, r = t, { t: i } =
|
|
6838
|
-
authManager: J(
|
|
6868
|
+
let n = e, r = t, { t: i } = ra(), a = J(zn, "DesignReferenceSidebar"), o = Fs({
|
|
6869
|
+
authManager: J(hr, "DesignReferenceSidebar"),
|
|
6839
6870
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6840
6871
|
onApply: (e) => r("apply", e)
|
|
6841
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);
|
|
@@ -6906,17 +6937,17 @@ var kc = {
|
|
|
6906
6937
|
"leave-from-class": "tpl:translate-x-0",
|
|
6907
6938
|
"leave-to-class": "tpl:translate-x-full"
|
|
6908
6939
|
}, {
|
|
6909
|
-
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), {
|
|
6910
6941
|
size: 13,
|
|
6911
6942
|
"stroke-width": 2
|
|
6912
6943
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6913
6944
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6914
6945
|
onClick: n[0] ||= (e) => r("close")
|
|
6915
|
-
}, [V(j(
|
|
6946
|
+
}, [V(j(Hi), {
|
|
6916
6947
|
size: 14,
|
|
6917
6948
|
"stroke-width": 2
|
|
6918
|
-
})])]), I("div",
|
|
6919
|
-
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", {
|
|
6920
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",
|
|
6921
6952
|
style: L({
|
|
6922
6953
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6924,7 +6955,7 @@ var kc = {
|
|
|
6924
6955
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6925
6956
|
}),
|
|
6926
6957
|
onClick: n[1] ||= (e) => _("image")
|
|
6927
|
-
}, [V(j(
|
|
6958
|
+
}, [V(j(gi), {
|
|
6928
6959
|
size: 12,
|
|
6929
6960
|
"stroke-width": 2
|
|
6930
6961
|
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
@@ -6935,23 +6966,23 @@ var kc = {
|
|
|
6935
6966
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6936
6967
|
}),
|
|
6937
6968
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6938
|
-
}, [V(j(
|
|
6969
|
+
}, [V(j(_i), {
|
|
6939
6970
|
size: 12,
|
|
6940
6971
|
"stroke-width": 2
|
|
6941
6972
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6942
|
-
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", {
|
|
6943
6974
|
key: 0,
|
|
6944
6975
|
src: p.value,
|
|
6945
6976
|
alt: u.value.name,
|
|
6946
6977
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6947
|
-
}, null, 8,
|
|
6978
|
+
}, null, 8, $l)) : (f(), k("div", eu, [V(j(_i), {
|
|
6948
6979
|
size: 32,
|
|
6949
6980
|
"stroke-width": 1.5,
|
|
6950
6981
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6951
|
-
}), I("span",
|
|
6982
|
+
}), I("span", tu, D(u.value.name), 1)])), I("button", {
|
|
6952
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)]",
|
|
6953
6984
|
onClick: x
|
|
6954
|
-
}, [V(j(
|
|
6985
|
+
}, [V(j(Hi), {
|
|
6955
6986
|
size: 12,
|
|
6956
6987
|
"stroke-width": 2
|
|
6957
6988
|
})])])])) : (f(), k("div", {
|
|
@@ -6966,13 +6997,13 @@ var kc = {
|
|
|
6966
6997
|
onDragleave: w,
|
|
6967
6998
|
onDrop: ee
|
|
6968
6999
|
}, [
|
|
6969
|
-
V(j(
|
|
7000
|
+
V(j(Bi), {
|
|
6970
7001
|
size: 24,
|
|
6971
7002
|
"stroke-width": 1.5,
|
|
6972
7003
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6973
7004
|
}),
|
|
6974
|
-
I("span",
|
|
6975
|
-
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)
|
|
6976
7007
|
], 36)), I("input", {
|
|
6977
7008
|
ref_key: "fileInput",
|
|
6978
7009
|
ref: s,
|
|
@@ -6980,14 +7011,14 @@ var kc = {
|
|
|
6980
7011
|
class: "tpl:hidden",
|
|
6981
7012
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6982
7013
|
onChange: v
|
|
6983
|
-
}, null, 40,
|
|
6984
|
-
I("div",
|
|
7014
|
+
}, null, 40, iu)]),
|
|
7015
|
+
I("div", au, [I("label", ou, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6985
7016
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6986
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"]]),
|
|
6987
7018
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6988
7019
|
rows: "3"
|
|
6989
|
-
}, null, 8,
|
|
6990
|
-
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", {
|
|
6991
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)]",
|
|
6992
7023
|
style: { "background-color": "transparent" },
|
|
6993
7024
|
onClick: E
|
|
@@ -6995,7 +7026,7 @@ var kc = {
|
|
|
6995
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)]",
|
|
6996
7027
|
onClick: T
|
|
6997
7028
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6998
|
-
j(o).error.value ? (f(), k("div",
|
|
7029
|
+
j(o).error.value ? (f(), k("div", du, [V(j(li), {
|
|
6999
7030
|
size: 14,
|
|
7000
7031
|
"stroke-width": 2,
|
|
7001
7032
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7005,35 +7036,35 @@ var kc = {
|
|
|
7005
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)]",
|
|
7006
7037
|
disabled: !g.value,
|
|
7007
7038
|
onClick: T
|
|
7008
|
-
}, [V(j(
|
|
7039
|
+
}, [V(j(bi), {
|
|
7009
7040
|
size: 16,
|
|
7010
7041
|
"stroke-width": 2
|
|
7011
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
7012
|
-
I("p",
|
|
7042
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, fu)),
|
|
7043
|
+
I("p", pu, D(j(i).aiMenu.disclaimer), 1)
|
|
7013
7044
|
]))])])) : A("", !0)]),
|
|
7014
7045
|
_: 1
|
|
7015
7046
|
}));
|
|
7016
7047
|
}
|
|
7017
|
-
}),
|
|
7048
|
+
}), hu = /* @__PURE__ */ e({ default: () => gu }), gu = /*#__PURE__*/ qi(mu, [["__scopeId", "data-v-bdbf8d0d"]]), _u = ["disabled", "title"], vu = ["title"], yu = {
|
|
7018
7049
|
key: 0,
|
|
7019
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)]",
|
|
7020
7051
|
style: {
|
|
7021
7052
|
"backdrop-filter": "blur(8px)",
|
|
7022
7053
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
7023
7054
|
}
|
|
7024
|
-
},
|
|
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 = {
|
|
7025
7056
|
key: 0,
|
|
7026
7057
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
7027
|
-
},
|
|
7058
|
+
}, Su = {
|
|
7028
7059
|
key: 1,
|
|
7029
7060
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
7030
|
-
},
|
|
7061
|
+
}, Cu = {
|
|
7031
7062
|
key: 2,
|
|
7032
7063
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
7033
|
-
},
|
|
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 = {
|
|
7034
7065
|
key: 0,
|
|
7035
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)]"
|
|
7036
|
-
},
|
|
7067
|
+
}, Ou = ["disabled", "title"], ku = /*@__PURE__*/ B({
|
|
7037
7068
|
__name: "SnapshotHistory",
|
|
7038
7069
|
props: {
|
|
7039
7070
|
snapshots: {},
|
|
@@ -7042,7 +7073,7 @@ var kc = {
|
|
|
7042
7073
|
},
|
|
7043
7074
|
emits: ["load", "navigate"],
|
|
7044
7075
|
setup(e, { emit: t }) {
|
|
7045
|
-
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);
|
|
7046
7077
|
H(() => n.snapshots.length, () => {
|
|
7047
7078
|
c.value = -1;
|
|
7048
7079
|
});
|
|
@@ -7061,7 +7092,7 @@ var kc = {
|
|
|
7061
7092
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
7062
7093
|
}
|
|
7063
7094
|
function _(e) {
|
|
7064
|
-
let t =
|
|
7095
|
+
let t = jc(e, a.snapshotHistory, i, 7);
|
|
7065
7096
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
7066
7097
|
month: "short",
|
|
7067
7098
|
day: "numeric",
|
|
@@ -7081,34 +7112,34 @@ var kc = {
|
|
|
7081
7112
|
disabled: !u.value,
|
|
7082
7113
|
title: j(a).snapshotHistory.olderSnapshot,
|
|
7083
7114
|
onClick: M(p, ["stop"])
|
|
7084
|
-
}, [V(j(
|
|
7115
|
+
}, [V(j(oi), {
|
|
7085
7116
|
size: 14,
|
|
7086
7117
|
"stroke-width": 2
|
|
7087
|
-
})], 8,
|
|
7118
|
+
})], 8, _u),
|
|
7088
7119
|
I("button", {
|
|
7089
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)]",
|
|
7090
7121
|
title: j(a).snapshotHistory.tooltip,
|
|
7091
7122
|
onClick: M(m, ["stop"])
|
|
7092
|
-
}, [V(j(
|
|
7123
|
+
}, [V(j(di), {
|
|
7093
7124
|
size: 16,
|
|
7094
7125
|
"stroke-width": 1.5
|
|
7095
|
-
}), V(j(
|
|
7126
|
+
}), V(j(ai), {
|
|
7096
7127
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
7097
7128
|
size: 10,
|
|
7098
7129
|
"stroke-width": 2
|
|
7099
|
-
}, null, 8, ["class"])], 8,
|
|
7130
|
+
}, null, 8, ["class"])], 8, vu),
|
|
7100
7131
|
V(ie, { name: "tpl-dropdown" }, {
|
|
7101
|
-
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), {
|
|
7102
7133
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
7103
7134
|
size: 20,
|
|
7104
7135
|
"stroke-width": 2
|
|
7105
|
-
})])) : 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", {
|
|
7106
7137
|
key: t.id,
|
|
7107
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)]",
|
|
7108
7139
|
style: { "background-color": "transparent" },
|
|
7109
7140
|
disabled: e.isRestoring,
|
|
7110
7141
|
onClick: (e) => g(t.id)
|
|
7111
|
-
}, [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)]),
|
|
7112
7143
|
_: 1
|
|
7113
7144
|
}),
|
|
7114
7145
|
I("button", {
|
|
@@ -7116,74 +7147,74 @@ var kc = {
|
|
|
7116
7147
|
disabled: !l.value,
|
|
7117
7148
|
title: j(a).snapshotHistory.newerSnapshot,
|
|
7118
7149
|
onClick: M(d, ["stop"])
|
|
7119
|
-
}, [V(j(
|
|
7150
|
+
}, [V(j(si), {
|
|
7120
7151
|
size: 14,
|
|
7121
7152
|
"stroke-width": 2
|
|
7122
|
-
})], 8,
|
|
7153
|
+
})], 8, Ou)
|
|
7123
7154
|
], 512));
|
|
7124
7155
|
}
|
|
7125
|
-
}),
|
|
7156
|
+
}), Au = /* @__PURE__ */ e({ default: () => ju }), ju = ku;
|
|
7126
7157
|
//#endregion
|
|
7127
7158
|
//#region src/cloud/utils/scoringStyles.ts
|
|
7128
|
-
function
|
|
7159
|
+
function Mu(e) {
|
|
7129
7160
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
7130
7161
|
}
|
|
7131
|
-
function
|
|
7162
|
+
function Nu(e) {
|
|
7132
7163
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
7133
7164
|
}
|
|
7134
|
-
function
|
|
7165
|
+
function Pu(e) {
|
|
7135
7166
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
7136
7167
|
}
|
|
7137
|
-
function
|
|
7168
|
+
function Fu(e) {
|
|
7138
7169
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
7139
7170
|
}
|
|
7140
7171
|
//#endregion
|
|
7141
7172
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7142
|
-
var
|
|
7173
|
+
var Iu = {
|
|
7143
7174
|
key: 0,
|
|
7144
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)]"
|
|
7145
|
-
},
|
|
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 = {
|
|
7146
7177
|
key: 0,
|
|
7147
7178
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7148
|
-
},
|
|
7179
|
+
}, Uu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wu = {
|
|
7149
7180
|
key: 1,
|
|
7150
7181
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7151
|
-
},
|
|
7182
|
+
}, Gu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ku = {
|
|
7152
7183
|
key: 2,
|
|
7153
7184
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
7154
|
-
},
|
|
7185
|
+
}, qu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Ju = {
|
|
7155
7186
|
key: 0,
|
|
7156
7187
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7157
|
-
},
|
|
7188
|
+
}, Yu = {
|
|
7158
7189
|
key: 0,
|
|
7159
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)]"
|
|
7160
|
-
},
|
|
7191
|
+
}, Xu = ["onClick"], Zu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Qu = {
|
|
7161
7192
|
key: 0,
|
|
7162
7193
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
7163
|
-
},
|
|
7194
|
+
}, $u = {
|
|
7164
7195
|
key: 0,
|
|
7165
7196
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
7166
|
-
},
|
|
7197
|
+
}, ed = {
|
|
7167
7198
|
key: 0,
|
|
7168
7199
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7169
|
-
},
|
|
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 = {
|
|
7170
7201
|
key: 0,
|
|
7171
7202
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
7172
|
-
},
|
|
7203
|
+
}, od = {
|
|
7173
7204
|
key: 1,
|
|
7174
7205
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
7175
|
-
},
|
|
7206
|
+
}, sd = ["disabled", "onClick"], cd = {
|
|
7176
7207
|
key: 0,
|
|
7177
7208
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
7178
|
-
},
|
|
7209
|
+
}, ld = {
|
|
7179
7210
|
key: 3,
|
|
7180
7211
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7181
|
-
},
|
|
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({
|
|
7182
7213
|
__name: "TemplateScoringPanel",
|
|
7183
7214
|
props: { visible: { type: Boolean } },
|
|
7184
7215
|
emits: ["close"],
|
|
7185
7216
|
setup(e, { emit: t }) {
|
|
7186
|
-
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({
|
|
7187
7218
|
spam: !0,
|
|
7188
7219
|
readability: !0,
|
|
7189
7220
|
accessibility: !0,
|
|
@@ -7198,10 +7229,10 @@ var Nu = {
|
|
|
7198
7229
|
"accessibility",
|
|
7199
7230
|
"bestPractices"
|
|
7200
7231
|
], p = {
|
|
7201
|
-
spam:
|
|
7202
|
-
readability:
|
|
7203
|
-
accessibility:
|
|
7204
|
-
bestPractices:
|
|
7232
|
+
spam: Pi,
|
|
7233
|
+
readability: hi,
|
|
7234
|
+
accessibility: Fi,
|
|
7235
|
+
bestPractices: Ui
|
|
7205
7236
|
};
|
|
7206
7237
|
function m() {
|
|
7207
7238
|
o.score(a.content.value, s);
|
|
@@ -7229,50 +7260,50 @@ var Nu = {
|
|
|
7229
7260
|
"leave-from-class": "tpl:translate-x-0",
|
|
7230
7261
|
"leave-to-class": "tpl:translate-x-full"
|
|
7231
7262
|
}, {
|
|
7232
|
-
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), {
|
|
7233
7264
|
size: 13,
|
|
7234
7265
|
"stroke-width": 2
|
|
7235
|
-
}), 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", {
|
|
7236
7267
|
key: 0,
|
|
7237
7268
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7238
7269
|
title: j(i).scoring.rescore,
|
|
7239
7270
|
onClick: n[0] ||= (e) => m()
|
|
7240
|
-
}, [V(j(
|
|
7271
|
+
}, [V(j(ki), {
|
|
7241
7272
|
size: 14,
|
|
7242
7273
|
"stroke-width": 2
|
|
7243
|
-
})], 8,
|
|
7274
|
+
})], 8, Bu)) : A("", !0), I("button", {
|
|
7244
7275
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7245
7276
|
onClick: n[1] ||= (e) => r("close")
|
|
7246
|
-
}, [V(j(
|
|
7277
|
+
}, [V(j(Hi), {
|
|
7247
7278
|
size: 14,
|
|
7248
7279
|
"stroke-width": 2
|
|
7249
|
-
})])])]), I("div",
|
|
7250
|
-
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), {
|
|
7251
7282
|
size: 32,
|
|
7252
7283
|
"stroke-width": 1.5,
|
|
7253
7284
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7254
7285
|
}),
|
|
7255
|
-
I("p",
|
|
7286
|
+
I("p", Gu, D(j(i).scoring.error), 1),
|
|
7256
7287
|
I("button", {
|
|
7257
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)]",
|
|
7258
7289
|
onClick: n[2] ||= (e) => m()
|
|
7259
|
-
}, [V(j(
|
|
7290
|
+
}, [V(j(ki), {
|
|
7260
7291
|
size: 12,
|
|
7261
7292
|
"stroke-width": 2
|
|
7262
7293
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7263
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
7294
|
+
])) : j(o).scoringResult.value ? (f(), k("div", Ku, [
|
|
7264
7295
|
I("div", {
|
|
7265
7296
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7266
|
-
style: L({ backgroundColor: j(
|
|
7297
|
+
style: L({ backgroundColor: j(Nu)(j(o).scoringResult.value.score) })
|
|
7267
7298
|
}, [
|
|
7268
7299
|
I("span", {
|
|
7269
7300
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7270
|
-
style: L({ color: j(
|
|
7301
|
+
style: L({ color: j(Mu)(j(o).scoringResult.value.score) })
|
|
7271
7302
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7272
|
-
I("span",
|
|
7273
|
-
_() > 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)
|
|
7274
7305
|
], 4),
|
|
7275
|
-
j(o).fixError.value ? (f(), k("div",
|
|
7306
|
+
j(o).fixError.value ? (f(), k("div", Yu, [V(j(li), {
|
|
7276
7307
|
size: 14,
|
|
7277
7308
|
"stroke-width": 2,
|
|
7278
7309
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7287,74 +7318,74 @@ var Nu = {
|
|
|
7287
7318
|
(f(), N(d(p[e]), {
|
|
7288
7319
|
size: 14,
|
|
7289
7320
|
"stroke-width": 2,
|
|
7290
|
-
style: L({ color: j(
|
|
7321
|
+
style: L({ color: j(Mu)(j(o).scoringResult.value.categories[e].score) })
|
|
7291
7322
|
}, null, 8, ["style"])),
|
|
7292
|
-
I("span",
|
|
7323
|
+
I("span", Zu, D(j(i).scoring.categories[e]), 1),
|
|
7293
7324
|
I("span", {
|
|
7294
7325
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7295
7326
|
style: L({
|
|
7296
|
-
color: j(
|
|
7297
|
-
backgroundColor: j(
|
|
7327
|
+
color: j(Mu)(j(o).scoringResult.value.categories[e].score),
|
|
7328
|
+
backgroundColor: j(Nu)(j(o).scoringResult.value.categories[e].score)
|
|
7298
7329
|
})
|
|
7299
7330
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7300
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7301
|
-
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), {
|
|
7302
7333
|
size: 12,
|
|
7303
7334
|
"stroke-width": 2,
|
|
7304
7335
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7305
7336
|
}, null, 8, ["class"])
|
|
7306
|
-
], 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", {
|
|
7307
7338
|
key: e.id,
|
|
7308
7339
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7309
|
-
}, [I("div",
|
|
7340
|
+
}, [I("div", td, [(f(), N(d(j(e.severity === "high" ? li : e.severity === "medium" ? Ri : Si)), {
|
|
7310
7341
|
size: 13,
|
|
7311
7342
|
"stroke-width": 2,
|
|
7312
7343
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7313
|
-
style: L({ color: j(
|
|
7314
|
-
}, null, 8, ["style"])), I("div",
|
|
7315
|
-
I("div",
|
|
7344
|
+
style: L({ color: j(Pu)(e.severity) })
|
|
7345
|
+
}, null, 8, ["style"])), I("div", nd, [
|
|
7346
|
+
I("div", rd, [I("span", {
|
|
7316
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",
|
|
7317
7348
|
style: L({
|
|
7318
|
-
color: j(
|
|
7319
|
-
backgroundColor: j(
|
|
7349
|
+
color: j(Pu)(e.severity),
|
|
7350
|
+
backgroundColor: j(Fu)(e.severity)
|
|
7320
7351
|
})
|
|
7321
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7322
|
-
e.suggestion ? (f(), k("p",
|
|
7323
|
-
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", {
|
|
7324
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)]",
|
|
7325
7356
|
style: { "background-color": "transparent" },
|
|
7326
7357
|
disabled: j(o).fixingFindingId.value !== null,
|
|
7327
7358
|
onClick: (t) => g(e)
|
|
7328
|
-
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(
|
|
7359
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Ci), {
|
|
7329
7360
|
key: 0,
|
|
7330
7361
|
class: "tpl-spinner",
|
|
7331
7362
|
size: 11,
|
|
7332
7363
|
"stroke-width": 2
|
|
7333
|
-
})) : (f(), N(j(
|
|
7364
|
+
})) : (f(), N(j(Fi), {
|
|
7334
7365
|
key: 1,
|
|
7335
7366
|
size: 11,
|
|
7336
7367
|
"stroke-width": 2
|
|
7337
|
-
})), 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)
|
|
7338
7369
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7339
|
-
])) : (f(), k("div",
|
|
7370
|
+
])) : (f(), k("div", ld, [V(j(Ni), {
|
|
7340
7371
|
size: 32,
|
|
7341
7372
|
"stroke-width": 1.5,
|
|
7342
7373
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7343
|
-
}), I("p",
|
|
7374
|
+
}), I("p", ud, D(j(i).scoring.emptyState), 1)])), I("p", dd, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7344
7375
|
_: 1
|
|
7345
7376
|
}));
|
|
7346
7377
|
}
|
|
7347
|
-
}),
|
|
7378
|
+
}), pd = /* @__PURE__ */ e({ default: () => md }), md = /*#__PURE__*/ qi(fd, [["__scopeId", "data-v-c23c73d4"]]), hd = ["aria-busy"], gd = {
|
|
7348
7379
|
id: "tpl-test-email-title",
|
|
7349
7380
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7350
|
-
},
|
|
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 = {
|
|
7351
7382
|
key: 0,
|
|
7352
7383
|
role: "alert",
|
|
7353
7384
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7354
|
-
},
|
|
7385
|
+
}, Cd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, wd = ["disabled"], Td = ["disabled"], Ed = {
|
|
7355
7386
|
key: 0,
|
|
7356
7387
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7357
|
-
},
|
|
7388
|
+
}, Dd = { key: 1 }, Od = /*@__PURE__*/ B({
|
|
7358
7389
|
__name: "TestEmailModal",
|
|
7359
7390
|
props: {
|
|
7360
7391
|
visible: { type: Boolean },
|
|
@@ -7364,7 +7395,7 @@ var Nu = {
|
|
|
7364
7395
|
},
|
|
7365
7396
|
emits: ["send", "close"],
|
|
7366
7397
|
setup(e, { emit: t }) {
|
|
7367
|
-
let n = e, r = t, { t: i } =
|
|
7398
|
+
let n = e, r = t, { t: i } = ra(), a = C("");
|
|
7368
7399
|
H(() => n.visible, (e) => {
|
|
7369
7400
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7370
7401
|
});
|
|
@@ -7377,7 +7408,7 @@ var Nu = {
|
|
|
7377
7408
|
function l(e) {
|
|
7378
7409
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7379
7410
|
}
|
|
7380
|
-
return (t, n) => (f(), N(
|
|
7411
|
+
return (t, n) => (f(), N(gs, {
|
|
7381
7412
|
visible: e.visible,
|
|
7382
7413
|
onClose: s,
|
|
7383
7414
|
onKeydown: l
|
|
@@ -7393,14 +7424,14 @@ var Nu = {
|
|
|
7393
7424
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7394
7425
|
}
|
|
7395
7426
|
}, [
|
|
7396
|
-
I("h3",
|
|
7397
|
-
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", {
|
|
7398
7429
|
key: 0,
|
|
7399
7430
|
type: "text",
|
|
7400
7431
|
value: a.value,
|
|
7401
7432
|
disabled: "",
|
|
7402
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)]"
|
|
7403
|
-
}, null, 8,
|
|
7434
|
+
}, null, 8, yd)) : c((f(), k("select", {
|
|
7404
7435
|
key: 1,
|
|
7405
7436
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7406
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)]",
|
|
@@ -7408,29 +7439,29 @@ var Nu = {
|
|
|
7408
7439
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7409
7440
|
key: e,
|
|
7410
7441
|
value: e
|
|
7411
|
-
}, D(e), 9,
|
|
7412
|
-
e.error ? (f(), k("p",
|
|
7413
|
-
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", {
|
|
7414
7445
|
type: "button",
|
|
7415
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 }]),
|
|
7416
7447
|
disabled: e.isSending,
|
|
7417
7448
|
onClick: s
|
|
7418
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7449
|
+
}, D(j(i).testEmail.cancel), 11, wd), I("button", {
|
|
7419
7450
|
type: "button",
|
|
7420
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)]",
|
|
7421
7452
|
disabled: !a.value || e.isSending,
|
|
7422
7453
|
onClick: o
|
|
7423
|
-
}, [e.isSending ? (f(), k("span",
|
|
7454
|
+
}, [e.isSending ? (f(), k("span", Ed, [V(j(Ci), {
|
|
7424
7455
|
class: "tpl:animate-spin",
|
|
7425
7456
|
size: 12,
|
|
7426
7457
|
"stroke-width": 2
|
|
7427
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7428
|
-
], 8,
|
|
7458
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", Dd, D(j(i).testEmail.send), 1))], 8, Td)])
|
|
7459
|
+
], 8, hd)]),
|
|
7429
7460
|
_: 1
|
|
7430
7461
|
}, 8, ["visible"]));
|
|
7431
7462
|
}
|
|
7432
|
-
}),
|
|
7463
|
+
}), kd = /* @__PURE__ */ e({ default: () => Ad }), Ad = Od;
|
|
7433
7464
|
//#endregion
|
|
7434
|
-
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 };
|
|
7435
7466
|
|
|
7436
|
-
//# sourceMappingURL=features-
|
|
7467
|
+
//# sourceMappingURL=features-B3qgDBHf.js.map
|