@templatical/editor 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiFeatureMenu-BOxQqkn9.js → AiFeatureMenu-BPOVM_Ou.js} +1 -1
- package/dist/{CloudEditor-BzCVDD6e.js → CloudEditor-wAkx8TH_.js} +4 -4
- package/dist/{CollaboratorBar-Cb-c1IkS.js → CollaboratorBar-DIr5ZUv9.js} +1 -1
- package/dist/{ModuleBrowserModal-BotDsZ0R.js → ModuleBrowserModal-VqGNisDp.js} +4 -4
- package/dist/{ModulePreviewCanvas-CDg4MnJP.js → ModulePreviewCanvas-DmzW6I_9.js} +1 -1
- package/dist/{ParagraphEditor-CfzIUFQ_.js → ParagraphEditor-BQTPI8j8.js} +1 -1
- package/dist/{SaveModuleDialog-DuzfCamG.js → SaveModuleDialog-DhgHOGgX.js} +2 -2
- package/dist/{SnapshotHistory-DiAPOSDM.js → SnapshotHistory-DJOsWv4i.js} +1 -1
- package/dist/{TestEmailModal-D5I5Mgtb.js → TestEmailModal-Dqj50aHe.js} +2 -2
- package/dist/{TitleEditor-CZUkhtDo.js → TitleEditor-PQYXfY6W.js} +1 -1
- package/dist/{TplModal-CVq2BAIW.js → TplModal-Dy6RXBV_.js} +1 -1
- package/dist/{blockTypeIcons-CJNuGjLX.js → blockTypeIcons-qnUeTls5.js} +1 -1
- package/dist/bundle-stats.json +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js → AiFeatureMenu-Cr6_Q9Zv.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js.map → AiFeatureMenu-Cr6_Q9Zv.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js → BlockIssueBadge-D0_mYpkl.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js.map → BlockIssueBadge-D0_mYpkl.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js → CloudEditor-BtAkuQB4.js} +7 -7
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js.map → CloudEditor-BtAkuQB4.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js → CollaboratorBar-C-P00I9l.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js.map → CollaboratorBar-C-P00I9l.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js → CountdownBlock-BEWsiqgw.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js.map → CountdownBlock-BEWsiqgw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js → CountdownToolbar-CdjFGEI7.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js.map → CountdownToolbar-CdjFGEI7.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js → IssuesPanel-DJOLYNAJ.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js.map → IssuesPanel-DJOLYNAJ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js → ModuleBrowserModal-hnbUUl8w.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js.map → ModuleBrowserModal-hnbUUl8w.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js → ModulePreviewCanvas-_DoUZGQh.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js.map → ModulePreviewCanvas-_DoUZGQh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js → NumberWithSuffix-ryhWFnCJ.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js.map → NumberWithSuffix-ryhWFnCJ.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js → ParagraphEditor-BtzinrI_.js} +5 -5
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js.map → ParagraphEditor-BtzinrI_.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js → RichTextEditorContent-CRlcjuMH.js} +2 -2
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js.map → RichTextEditorContent-CRlcjuMH.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js → SaveModuleDialog-D-g-nYuL.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js.map → SaveModuleDialog-D-g-nYuL.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js → TitleEditor-Bzsbpajt.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js.map → TitleEditor-Bzsbpajt.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js → blockTypeIcons-B_klsmQ1.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js.map → blockTypeIcons-B_klsmQ1.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js → extensions-DIHxPVrP.js} +2 -2
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js.map → extensions-DIHxPVrP.js.map} +1 -1
- package/dist/cdn/chunks/{features-CgTy87Ni.js → features-BsW4aFcn.js} +621 -618
- package/dist/cdn/chunks/features-BsW4aFcn.js.map +1 -0
- package/dist/cdn/chunks/{icons-DxJ--AJb.js → icons-BgPk6tUq.js} +2 -2
- package/dist/cdn/chunks/{icons-DxJ--AJb.js.map → icons-BgPk6tUq.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js → media-library-C1Ue4At9.js} +3 -3
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js.map → media-library-C1Ue4At9.js.map} +1 -1
- package/dist/cdn/chunks/quality-BDr54nMA.js +1878 -0
- package/dist/cdn/chunks/quality-BDr54nMA.js.map +1 -0
- package/dist/cdn/chunks/{renderer-DttVILgu.js → renderer-BdjvKDwC.js} +3 -3
- package/dist/cdn/chunks/{renderer-DttVILgu.js.map → renderer-BdjvKDwC.js.map} +1 -1
- package/dist/cdn/chunks/{src-a8fYhBi5.js → src-BI22RLP6.js} +4 -4
- package/dist/cdn/chunks/{src-a8fYhBi5.js.map → src-BI22RLP6.js.map} +1 -1
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js → styles-BkubbXy8.js} +8 -8
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js.map → styles-BkubbXy8.js.map} +1 -1
- package/dist/cdn/editor.js +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/{styles-Ci7RdimQ.js → styles-BEhOSxt5.js} +2 -2
- package/dist/templatical-editor.js +3 -3
- package/dist/{useEditorCore-DT3VrvZS.js → useEditorCore-DnCOsekL.js} +717 -714
- package/package.json +7 -7
- package/dist/cdn/chunks/features-CgTy87Ni.js.map +0 -1
- package/dist/cdn/chunks/quality-CHCEMG8e.js +0 -1846
- package/dist/cdn/chunks/quality-CHCEMG8e.js.map +0 -1
|
@@ -1361,11 +1361,14 @@ function J(e, t) {
|
|
|
1361
1361
|
//#endregion
|
|
1362
1362
|
//#region src/composables/useTemplateLint.ts
|
|
1363
1363
|
function sr(e) {
|
|
1364
|
-
|
|
1364
|
+
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1365
|
+
}
|
|
1366
|
+
function cr(e) {
|
|
1367
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = sr(e.options), s = null, c = !1;
|
|
1365
1368
|
o || l();
|
|
1366
1369
|
async function l() {
|
|
1367
1370
|
try {
|
|
1368
|
-
let t = await import("./quality-
|
|
1371
|
+
let t = await import("./quality-BDr54nMA.js").then((e) => e.t);
|
|
1369
1372
|
if (c) return;
|
|
1370
1373
|
a.value = {
|
|
1371
1374
|
lintAccessibility: t.lintAccessibility,
|
|
@@ -1426,12 +1429,12 @@ function Y(e) {
|
|
|
1426
1429
|
}
|
|
1427
1430
|
//#endregion
|
|
1428
1431
|
//#region src/utils/blockTypeLabels.ts
|
|
1429
|
-
function
|
|
1432
|
+
function lr(e, t) {
|
|
1430
1433
|
return t.blocks[e] ?? e;
|
|
1431
1434
|
}
|
|
1432
1435
|
//#endregion
|
|
1433
1436
|
//#region src/composables/useKeyboardReorder.ts
|
|
1434
|
-
function
|
|
1437
|
+
function ur(e, t) {
|
|
1435
1438
|
let n = C(null), r = C(""), i = null;
|
|
1436
1439
|
function a(t) {
|
|
1437
1440
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1458,7 +1461,7 @@ function lr(e, t) {
|
|
|
1458
1461
|
let r = a(n);
|
|
1459
1462
|
if (!r) return "";
|
|
1460
1463
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1461
|
-
return i ?
|
|
1464
|
+
return i ? lr(i.type, t.t) : "";
|
|
1462
1465
|
}
|
|
1463
1466
|
function s(t, n) {
|
|
1464
1467
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1527,13 +1530,13 @@ function lr(e, t) {
|
|
|
1527
1530
|
}
|
|
1528
1531
|
//#endregion
|
|
1529
1532
|
//#region src/composables/useUiTheme.ts
|
|
1530
|
-
function
|
|
1533
|
+
function dr(e) {
|
|
1531
1534
|
let t = vn("(prefers-color-scheme: dark)");
|
|
1532
1535
|
return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1533
1536
|
}
|
|
1534
1537
|
//#endregion
|
|
1535
1538
|
//#region src/composables/useThemeStyles.ts
|
|
1536
|
-
var
|
|
1539
|
+
var fr = {
|
|
1537
1540
|
bg: "--tpl-bg",
|
|
1538
1541
|
bgElevated: "--tpl-bg-elevated",
|
|
1539
1542
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1557,10 +1560,10 @@ var dr = {
|
|
|
1557
1560
|
dangerLight: "--tpl-danger-light",
|
|
1558
1561
|
canvasBg: "--tpl-canvas-bg"
|
|
1559
1562
|
};
|
|
1560
|
-
function
|
|
1563
|
+
function pr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1561
1564
|
return { themeStyles: k(() => {
|
|
1562
1565
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1563
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1566
|
+
if (a) for (let [e, t] of Object.entries(fr)) {
|
|
1564
1567
|
let n = a[e];
|
|
1565
1568
|
n && (r[t] = n);
|
|
1566
1569
|
}
|
|
@@ -1569,27 +1572,27 @@ function fr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1569
1572
|
}
|
|
1570
1573
|
//#endregion
|
|
1571
1574
|
//#region src/utils/logger.ts
|
|
1572
|
-
var
|
|
1573
|
-
function
|
|
1575
|
+
var mr = "[Templatical]";
|
|
1576
|
+
function hr() {
|
|
1574
1577
|
return typeof process < "u" && !0;
|
|
1575
1578
|
}
|
|
1576
|
-
var
|
|
1579
|
+
var gr = {
|
|
1577
1580
|
warn(...e) {
|
|
1578
|
-
console.warn(
|
|
1581
|
+
console.warn(mr, ...e);
|
|
1579
1582
|
},
|
|
1580
1583
|
error(...e) {
|
|
1581
|
-
console.error(
|
|
1584
|
+
console.error(mr, ...e);
|
|
1582
1585
|
},
|
|
1583
1586
|
debug(...e) {
|
|
1584
|
-
|
|
1587
|
+
hr() || console.debug(mr, ...e);
|
|
1585
1588
|
},
|
|
1586
1589
|
info(...e) {
|
|
1587
|
-
|
|
1590
|
+
hr() || console.info(mr, ...e);
|
|
1588
1591
|
}
|
|
1589
1592
|
};
|
|
1590
1593
|
//#endregion
|
|
1591
1594
|
//#region src/composables/useBlockRegistry.ts
|
|
1592
|
-
function
|
|
1595
|
+
function _r() {
|
|
1593
1596
|
let e = n(/* @__PURE__ */ new Map());
|
|
1594
1597
|
function t(t, n) {
|
|
1595
1598
|
e.value.set(t, n), oe(e);
|
|
@@ -1641,7 +1644,7 @@ function gr() {
|
|
|
1641
1644
|
strictFilters: !1
|
|
1642
1645
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1643
1646
|
} catch (t) {
|
|
1644
|
-
return
|
|
1647
|
+
return gr.error(`Failed to render custom block "${e.customType}":`, t), c(`Render error: ${e.customType}`);
|
|
1645
1648
|
}
|
|
1646
1649
|
}
|
|
1647
1650
|
function u(t) {
|
|
@@ -1660,7 +1663,7 @@ function gr() {
|
|
|
1660
1663
|
}
|
|
1661
1664
|
//#endregion
|
|
1662
1665
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1663
|
-
var
|
|
1666
|
+
var vr = [
|
|
1664
1667
|
{
|
|
1665
1668
|
type: "section",
|
|
1666
1669
|
label: "Section",
|
|
@@ -1727,8 +1730,8 @@ var _r = [
|
|
|
1727
1730
|
createBlock: it
|
|
1728
1731
|
}
|
|
1729
1732
|
];
|
|
1730
|
-
function
|
|
1731
|
-
for (let n of
|
|
1733
|
+
function yr(e, t) {
|
|
1734
|
+
for (let n of vr) {
|
|
1732
1735
|
let r = t[n.type];
|
|
1733
1736
|
r && e.registerBuiltIn(n.type, {
|
|
1734
1737
|
component: r,
|
|
@@ -1743,7 +1746,7 @@ function vr(e, t) {
|
|
|
1743
1746
|
}
|
|
1744
1747
|
//#endregion
|
|
1745
1748
|
//#region src/utils/keyboardShortcuts.ts
|
|
1746
|
-
function
|
|
1749
|
+
function br(e) {
|
|
1747
1750
|
for (let t of e.composedPath()) {
|
|
1748
1751
|
if (!(t instanceof HTMLElement)) continue;
|
|
1749
1752
|
if (t.isContentEditable) return !0;
|
|
@@ -1752,14 +1755,14 @@ function yr(e) {
|
|
|
1752
1755
|
}
|
|
1753
1756
|
return !1;
|
|
1754
1757
|
}
|
|
1755
|
-
function
|
|
1758
|
+
function xr(e, t) {
|
|
1756
1759
|
let n = e.metaKey || e.ctrlKey;
|
|
1757
1760
|
if (n && e.key.toLowerCase() === "s") {
|
|
1758
1761
|
e.preventDefault(), t.onSave?.();
|
|
1759
1762
|
return;
|
|
1760
1763
|
}
|
|
1761
1764
|
if (n && e.key.toLowerCase() === "z") {
|
|
1762
|
-
if (
|
|
1765
|
+
if (br(e)) return;
|
|
1763
1766
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1764
1767
|
return;
|
|
1765
1768
|
}
|
|
@@ -1767,11 +1770,11 @@ function br(e, t) {
|
|
|
1767
1770
|
t.selectBlock(null);
|
|
1768
1771
|
return;
|
|
1769
1772
|
}
|
|
1770
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1773
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !br(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1771
1774
|
}
|
|
1772
1775
|
//#endregion
|
|
1773
1776
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1774
|
-
var
|
|
1777
|
+
var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ B({
|
|
1775
1778
|
__name: "ButtonBlock",
|
|
1776
1779
|
props: {
|
|
1777
1780
|
block: {},
|
|
@@ -1792,17 +1795,17 @@ var xr = { class: "tpl:text-center" }, Sr = ["href"], Cr = /* @__PURE__ */ B({
|
|
|
1792
1795
|
};
|
|
1793
1796
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1794
1797
|
});
|
|
1795
|
-
return (t, r) => (f(), A("div",
|
|
1798
|
+
return (t, r) => (f(), A("div", Sr, [I("a", {
|
|
1796
1799
|
href: e.block.url || "#",
|
|
1797
1800
|
style: L(n.value),
|
|
1798
1801
|
class: "tpl:cursor-default",
|
|
1799
1802
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
1800
|
-
}, O(e.block.text), 13,
|
|
1803
|
+
}, O(e.block.text), 13, Cr)]));
|
|
1801
1804
|
}
|
|
1802
|
-
}),
|
|
1803
|
-
let t =
|
|
1805
|
+
}), Tr = (e) => e === "", Er = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Dr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Or = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), kr = (e) => {
|
|
1806
|
+
let t = Or(e);
|
|
1804
1807
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1805
|
-
},
|
|
1808
|
+
}, Ar = {
|
|
1806
1809
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1807
1810
|
width: 24,
|
|
1808
1811
|
height: 24,
|
|
@@ -1812,35 +1815,35 @@ var xr = { class: "tpl:text-center" }, Sr = ["href"], Cr = /* @__PURE__ */ B({
|
|
|
1812
1815
|
"stroke-width": 2,
|
|
1813
1816
|
"stroke-linecap": "round",
|
|
1814
1817
|
"stroke-linejoin": "round"
|
|
1815
|
-
},
|
|
1816
|
-
function
|
|
1817
|
-
return v(
|
|
1818
|
+
}, jr = Symbol("lucide-icons");
|
|
1819
|
+
function Mr() {
|
|
1820
|
+
return v(jr, {});
|
|
1818
1821
|
}
|
|
1819
1822
|
//#endregion
|
|
1820
1823
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.14.0_vue@3.5.33_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1821
|
-
var
|
|
1822
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1823
|
-
let e =
|
|
1824
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1824
|
+
var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1825
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Mr(), g = k(() => {
|
|
1826
|
+
let e = Tr(n) || Tr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Ar["stroke-width"];
|
|
1827
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Ar.width) : t;
|
|
1825
1828
|
});
|
|
1826
1829
|
return a("svg", {
|
|
1827
|
-
...
|
|
1830
|
+
...Ar,
|
|
1828
1831
|
...l,
|
|
1829
|
-
width: s ?? d ??
|
|
1830
|
-
height: s ?? d ??
|
|
1831
|
-
stroke: c ?? f ??
|
|
1832
|
+
width: s ?? d ?? Ar.width,
|
|
1833
|
+
height: s ?? d ?? Ar.height,
|
|
1834
|
+
stroke: c ?? f ?? Ar.stroke,
|
|
1832
1835
|
"stroke-width": g.value,
|
|
1833
|
-
class:
|
|
1836
|
+
class: Er("lucide", h, ...e ? [`lucide-${Dr(kr(e))}-icon`, `lucide-${Dr(e)}`] : ["lucide-icon"])
|
|
1834
1837
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1835
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1838
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Nr, {
|
|
1836
1839
|
...i,
|
|
1837
1840
|
...n,
|
|
1838
1841
|
iconNode: t,
|
|
1839
1842
|
name: e
|
|
1840
|
-
}, r),
|
|
1843
|
+
}, r), Pr = X("bookmark", [["path", {
|
|
1841
1844
|
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",
|
|
1842
1845
|
key: "oz39mx"
|
|
1843
|
-
}]]),
|
|
1846
|
+
}]]), Fr = X("box", [
|
|
1844
1847
|
["path", {
|
|
1845
1848
|
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",
|
|
1846
1849
|
key: "hh9hay"
|
|
@@ -1853,22 +1856,22 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1853
1856
|
d: "M12 22V12",
|
|
1854
1857
|
key: "d0xqtd"
|
|
1855
1858
|
}]
|
|
1856
|
-
]),
|
|
1859
|
+
]), Ir = X("check", [["path", {
|
|
1857
1860
|
d: "M20 6 9 17l-5-5",
|
|
1858
1861
|
key: "1gmf2c"
|
|
1859
|
-
}]]),
|
|
1862
|
+
}]]), Lr = X("chevron-down", [["path", {
|
|
1860
1863
|
d: "m6 9 6 6 6-6",
|
|
1861
1864
|
key: "qrunsl"
|
|
1862
|
-
}]]),
|
|
1865
|
+
}]]), Rr = X("chevron-left", [["path", {
|
|
1863
1866
|
d: "m15 18-6-6 6-6",
|
|
1864
1867
|
key: "1wnfg3"
|
|
1865
|
-
}]]),
|
|
1868
|
+
}]]), zr = X("chevron-right", [["path", {
|
|
1866
1869
|
d: "m9 18 6-6-6-6",
|
|
1867
1870
|
key: "mthhwq"
|
|
1868
|
-
}]]),
|
|
1871
|
+
}]]), Br = X("chevron-up", [["path", {
|
|
1869
1872
|
d: "m18 15-6-6-6 6",
|
|
1870
1873
|
key: "153udz"
|
|
1871
|
-
}]]),
|
|
1874
|
+
}]]), Vr = X("circle-alert", [
|
|
1872
1875
|
["circle", {
|
|
1873
1876
|
cx: "12",
|
|
1874
1877
|
cy: "12",
|
|
@@ -1889,7 +1892,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1889
1892
|
y2: "16",
|
|
1890
1893
|
key: "4dfq90"
|
|
1891
1894
|
}]
|
|
1892
|
-
]),
|
|
1895
|
+
]), Hr = X("circle-check", [["circle", {
|
|
1893
1896
|
cx: "12",
|
|
1894
1897
|
cy: "12",
|
|
1895
1898
|
r: "10",
|
|
@@ -1897,7 +1900,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1897
1900
|
}], ["path", {
|
|
1898
1901
|
d: "m9 12 2 2 4-4",
|
|
1899
1902
|
key: "dzmm74"
|
|
1900
|
-
}]]),
|
|
1903
|
+
}]]), Ur = X("clock", [["circle", {
|
|
1901
1904
|
cx: "12",
|
|
1902
1905
|
cy: "12",
|
|
1903
1906
|
r: "10",
|
|
@@ -1905,13 +1908,13 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1905
1908
|
}], ["path", {
|
|
1906
1909
|
d: "M12 6v6l4 2",
|
|
1907
1910
|
key: "mmk7yg"
|
|
1908
|
-
}]]),
|
|
1911
|
+
}]]), Wr = X("code", [["path", {
|
|
1909
1912
|
d: "m16 18 6-6-6-6",
|
|
1910
1913
|
key: "eg8j8"
|
|
1911
1914
|
}], ["path", {
|
|
1912
1915
|
d: "m8 6-6 6 6 6",
|
|
1913
1916
|
key: "ppft3o"
|
|
1914
|
-
}]]),
|
|
1917
|
+
}]]), Gr = X("copy", [["rect", {
|
|
1915
1918
|
width: "14",
|
|
1916
1919
|
height: "14",
|
|
1917
1920
|
x: "8",
|
|
@@ -1922,7 +1925,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1922
1925
|
}], ["path", {
|
|
1923
1926
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1924
1927
|
key: "zix9uf"
|
|
1925
|
-
}]]),
|
|
1928
|
+
}]]), Kr = X("eye-off", [
|
|
1926
1929
|
["path", {
|
|
1927
1930
|
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",
|
|
1928
1931
|
key: "ct8e1f"
|
|
@@ -1939,7 +1942,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1939
1942
|
d: "m2 2 20 20",
|
|
1940
1943
|
key: "1ooewy"
|
|
1941
1944
|
}]
|
|
1942
|
-
]),
|
|
1945
|
+
]), qr = X("eye", [["path", {
|
|
1943
1946
|
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",
|
|
1944
1947
|
key: "1nclc0"
|
|
1945
1948
|
}], ["circle", {
|
|
@@ -1947,7 +1950,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1947
1950
|
cy: "12",
|
|
1948
1951
|
r: "3",
|
|
1949
1952
|
key: "1v7zrd"
|
|
1950
|
-
}]]),
|
|
1953
|
+
}]]), Jr = X("file-image", [
|
|
1951
1954
|
["path", {
|
|
1952
1955
|
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",
|
|
1953
1956
|
key: "1oefj6"
|
|
@@ -1966,7 +1969,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1966
1969
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
1967
1970
|
key: "wt3hpn"
|
|
1968
1971
|
}]
|
|
1969
|
-
]),
|
|
1972
|
+
]), Yr = X("file-text", [
|
|
1970
1973
|
["path", {
|
|
1971
1974
|
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",
|
|
1972
1975
|
key: "1oefj6"
|
|
@@ -1987,10 +1990,10 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1987
1990
|
d: "M16 17H8",
|
|
1988
1991
|
key: "z1uh3a"
|
|
1989
1992
|
}]
|
|
1990
|
-
]),
|
|
1993
|
+
]), Xr = X("funnel", [["path", {
|
|
1991
1994
|
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",
|
|
1992
1995
|
key: "sc7q7i"
|
|
1993
|
-
}]]),
|
|
1996
|
+
}]]), Zr = X("grip-vertical", [
|
|
1994
1997
|
["circle", {
|
|
1995
1998
|
cx: "9",
|
|
1996
1999
|
cy: "12",
|
|
@@ -2027,7 +2030,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2027
2030
|
r: "1",
|
|
2028
2031
|
key: "f4zoj3"
|
|
2029
2032
|
}]
|
|
2030
|
-
]),
|
|
2033
|
+
]), Qr = X("image-up", [
|
|
2031
2034
|
["path", {
|
|
2032
2035
|
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",
|
|
2033
2036
|
key: "9csbqa"
|
|
@@ -2046,7 +2049,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2046
2049
|
r: "2",
|
|
2047
2050
|
key: "af1f0g"
|
|
2048
2051
|
}]
|
|
2049
|
-
]),
|
|
2052
|
+
]), $r = X("image", [
|
|
2050
2053
|
["rect", {
|
|
2051
2054
|
width: "18",
|
|
2052
2055
|
height: "18",
|
|
@@ -2066,7 +2069,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2066
2069
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2067
2070
|
key: "1xmnt7"
|
|
2068
2071
|
}]
|
|
2069
|
-
]),
|
|
2072
|
+
]), ei = X("info", [
|
|
2070
2073
|
["circle", {
|
|
2071
2074
|
cx: "12",
|
|
2072
2075
|
cy: "12",
|
|
@@ -2081,31 +2084,31 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2081
2084
|
d: "M12 8h.01",
|
|
2082
2085
|
key: "e9boi3"
|
|
2083
2086
|
}]
|
|
2084
|
-
]),
|
|
2087
|
+
]), ti = X("loader-circle", [["path", {
|
|
2085
2088
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2086
2089
|
key: "13zald"
|
|
2087
|
-
}]]),
|
|
2090
|
+
}]]), ni = X("message-circle", [["path", {
|
|
2088
2091
|
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",
|
|
2089
2092
|
key: "1sd12s"
|
|
2090
|
-
}]]),
|
|
2093
|
+
}]]), ri = X("navigation", [["polygon", {
|
|
2091
2094
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2092
2095
|
key: "1ltx0t"
|
|
2093
|
-
}]]),
|
|
2096
|
+
}]]), ii = X("pencil", [["path", {
|
|
2094
2097
|
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",
|
|
2095
2098
|
key: "1a8usu"
|
|
2096
2099
|
}], ["path", {
|
|
2097
2100
|
d: "m15 5 4 4",
|
|
2098
2101
|
key: "1mk7zo"
|
|
2099
|
-
}]]),
|
|
2102
|
+
}]]), ai = X("puzzle", [["path", {
|
|
2100
2103
|
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",
|
|
2101
2104
|
key: "w46dr5"
|
|
2102
|
-
}]]),
|
|
2105
|
+
}]]), oi = X("redo-2", [["path", {
|
|
2103
2106
|
d: "m15 14 5-5-5-5",
|
|
2104
2107
|
key: "12vg1m"
|
|
2105
2108
|
}], ["path", {
|
|
2106
2109
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2107
2110
|
key: "6uklza"
|
|
2108
|
-
}]]),
|
|
2111
|
+
}]]), si = X("refresh-cw", [
|
|
2109
2112
|
["path", {
|
|
2110
2113
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2111
2114
|
key: "v9h5vc"
|
|
@@ -2122,19 +2125,19 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2122
2125
|
d: "M8 16H3v5",
|
|
2123
2126
|
key: "1cv678"
|
|
2124
2127
|
}]
|
|
2125
|
-
]),
|
|
2128
|
+
]), ci = X("reply", [["path", {
|
|
2126
2129
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2127
2130
|
key: "5vmcpk"
|
|
2128
2131
|
}], ["path", {
|
|
2129
2132
|
d: "m9 17-5-5 5-5",
|
|
2130
2133
|
key: "nvlc11"
|
|
2131
|
-
}]]),
|
|
2134
|
+
}]]), li = X("send", [["path", {
|
|
2132
2135
|
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",
|
|
2133
2136
|
key: "1ffxy3"
|
|
2134
2137
|
}], ["path", {
|
|
2135
2138
|
d: "m21.854 2.147-10.94 10.939",
|
|
2136
2139
|
key: "12cjpa"
|
|
2137
|
-
}]]),
|
|
2140
|
+
}]]), ui = X("share-2", [
|
|
2138
2141
|
["circle", {
|
|
2139
2142
|
cx: "18",
|
|
2140
2143
|
cy: "5",
|
|
@@ -2167,13 +2170,13 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2167
2170
|
y2: "10.49",
|
|
2168
2171
|
key: "1n3mei"
|
|
2169
2172
|
}]
|
|
2170
|
-
]),
|
|
2173
|
+
]), di = X("shield-check", [["path", {
|
|
2171
2174
|
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",
|
|
2172
2175
|
key: "oel41y"
|
|
2173
2176
|
}], ["path", {
|
|
2174
2177
|
d: "m9 12 2 2 4-4",
|
|
2175
2178
|
key: "dzmm74"
|
|
2176
|
-
}]]),
|
|
2179
|
+
}]]), fi = X("shield-x", [
|
|
2177
2180
|
["path", {
|
|
2178
2181
|
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",
|
|
2179
2182
|
key: "oel41y"
|
|
@@ -2186,7 +2189,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2186
2189
|
d: "m9.5 9.5 5 5",
|
|
2187
2190
|
key: "18nt4w"
|
|
2188
2191
|
}]
|
|
2189
|
-
]),
|
|
2192
|
+
]), pi = X("sparkles", [
|
|
2190
2193
|
["path", {
|
|
2191
2194
|
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",
|
|
2192
2195
|
key: "1s2grr"
|
|
@@ -2205,7 +2208,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2205
2208
|
r: "2",
|
|
2206
2209
|
key: "6kqj1y"
|
|
2207
2210
|
}]
|
|
2208
|
-
]),
|
|
2211
|
+
]), mi = X("table", [
|
|
2209
2212
|
["path", {
|
|
2210
2213
|
d: "M12 3v18",
|
|
2211
2214
|
key: "108xh3"
|
|
@@ -2226,7 +2229,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2226
2229
|
d: "M3 15h18",
|
|
2227
2230
|
key: "5xshup"
|
|
2228
2231
|
}]
|
|
2229
|
-
]),
|
|
2232
|
+
]), hi = X("trash-2", [
|
|
2230
2233
|
["path", {
|
|
2231
2234
|
d: "M10 11v6",
|
|
2232
2235
|
key: "nco0om"
|
|
@@ -2247,7 +2250,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2247
2250
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2248
2251
|
key: "e791ji"
|
|
2249
2252
|
}]
|
|
2250
|
-
]),
|
|
2253
|
+
]), gi = X("triangle-alert", [
|
|
2251
2254
|
["path", {
|
|
2252
2255
|
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",
|
|
2253
2256
|
key: "wmoenq"
|
|
@@ -2260,13 +2263,13 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2260
2263
|
d: "M12 17h.01",
|
|
2261
2264
|
key: "p32p05"
|
|
2262
2265
|
}]
|
|
2263
|
-
]),
|
|
2266
|
+
]), _i = X("undo-2", [["path", {
|
|
2264
2267
|
d: "M9 14 4 9l5-5",
|
|
2265
2268
|
key: "102s5s"
|
|
2266
2269
|
}], ["path", {
|
|
2267
2270
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2268
2271
|
key: "f3b9sd"
|
|
2269
|
-
}]]),
|
|
2272
|
+
}]]), vi = X("upload", [
|
|
2270
2273
|
["path", {
|
|
2271
2274
|
d: "M12 3v12",
|
|
2272
2275
|
key: "1x0j5s"
|
|
@@ -2279,7 +2282,7 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2279
2282
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2280
2283
|
key: "ih7n3h"
|
|
2281
2284
|
}]
|
|
2282
|
-
]),
|
|
2285
|
+
]), yi = X("video", [["path", {
|
|
2283
2286
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2284
2287
|
key: "ftymec"
|
|
2285
2288
|
}], ["rect", {
|
|
@@ -2289,20 +2292,20 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2289
2292
|
height: "12",
|
|
2290
2293
|
rx: "2",
|
|
2291
2294
|
key: "158x01"
|
|
2292
|
-
}]]),
|
|
2295
|
+
}]]), bi = X("x", [["path", {
|
|
2293
2296
|
d: "M18 6 6 18",
|
|
2294
2297
|
key: "1bl5f8"
|
|
2295
2298
|
}], ["path", {
|
|
2296
2299
|
d: "m6 6 12 12",
|
|
2297
2300
|
key: "d8bk6v"
|
|
2298
|
-
}]]),
|
|
2301
|
+
}]]), xi = X("zap", [["path", {
|
|
2299
2302
|
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",
|
|
2300
2303
|
key: "1xq2db"
|
|
2301
|
-
}]]),
|
|
2304
|
+
}]]), Si = ["innerHTML"], Ci = [
|
|
2302
2305
|
"src",
|
|
2303
2306
|
"width",
|
|
2304
2307
|
"height"
|
|
2305
|
-
],
|
|
2308
|
+
], wi = /* @__PURE__ */ B({
|
|
2306
2309
|
__name: "CustomBlockIcon",
|
|
2307
2310
|
props: {
|
|
2308
2311
|
icon: {},
|
|
@@ -2318,40 +2321,40 @@ var Mr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2318
2321
|
height: `${n.value}px`
|
|
2319
2322
|
}),
|
|
2320
2323
|
innerHTML: e.icon
|
|
2321
|
-
}, null, 12,
|
|
2324
|
+
}, null, 12, Si)) : i.value ? (f(), A("img", {
|
|
2322
2325
|
key: 1,
|
|
2323
2326
|
src: e.icon,
|
|
2324
2327
|
width: n.value,
|
|
2325
2328
|
height: n.value,
|
|
2326
2329
|
class: "tpl:inline-block",
|
|
2327
2330
|
alt: ""
|
|
2328
|
-
}, null, 8,
|
|
2331
|
+
}, null, 8, Ci)) : (f(), P(M(Fr), {
|
|
2329
2332
|
key: 2,
|
|
2330
2333
|
size: n.value,
|
|
2331
2334
|
"stroke-width": 1.5
|
|
2332
2335
|
}, null, 8, ["size"]));
|
|
2333
2336
|
}
|
|
2334
|
-
}),
|
|
2337
|
+
}), Ti = (e, t) => {
|
|
2335
2338
|
let n = e.__vccOpts || e;
|
|
2336
2339
|
for (let [e, r] of t) n[e] = r;
|
|
2337
2340
|
return n;
|
|
2338
|
-
},
|
|
2339
|
-
function
|
|
2340
|
-
return f(), A("div",
|
|
2341
|
+
}, Ei = {}, Di = { class: "tpl-loading-track" };
|
|
2342
|
+
function Oi(e, t) {
|
|
2343
|
+
return f(), A("div", Di);
|
|
2341
2344
|
}
|
|
2342
|
-
var
|
|
2345
|
+
var ki = /* @__PURE__ */ Ti(Ei, [["render", Oi], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2343
2346
|
//#endregion
|
|
2344
2347
|
//#region src/composables/useEditorRoot.ts
|
|
2345
|
-
function
|
|
2348
|
+
function Ai() {
|
|
2346
2349
|
return v($n, document) ?? document;
|
|
2347
2350
|
}
|
|
2348
2351
|
//#endregion
|
|
2349
2352
|
//#region src/composables/useFocusTrap.ts
|
|
2350
|
-
var
|
|
2351
|
-
function
|
|
2352
|
-
let n =
|
|
2353
|
+
var ji = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2354
|
+
function Mi(e, t) {
|
|
2355
|
+
let n = Ai(), r = null, i = null, a = null;
|
|
2353
2356
|
function o() {
|
|
2354
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2357
|
+
return e.value ? Array.from(e.value.querySelectorAll(ji)).filter((e) => e.offsetParent !== null) : [];
|
|
2355
2358
|
}
|
|
2356
2359
|
function s(e) {
|
|
2357
2360
|
if (e.key !== "Tab") return;
|
|
@@ -2381,18 +2384,18 @@ function ji(e, t) {
|
|
|
2381
2384
|
}
|
|
2382
2385
|
//#endregion
|
|
2383
2386
|
//#region src/composables/useCloudI18n.ts
|
|
2384
|
-
function
|
|
2387
|
+
function Ni(e, t) {
|
|
2385
2388
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2386
2389
|
}
|
|
2387
|
-
function
|
|
2390
|
+
function Pi(e) {
|
|
2388
2391
|
let t = e ?? v(or, null);
|
|
2389
2392
|
return {
|
|
2390
2393
|
t: t ? u(t) ? t.value : t : null,
|
|
2391
|
-
format:
|
|
2394
|
+
format: Ni
|
|
2392
2395
|
};
|
|
2393
2396
|
}
|
|
2394
|
-
function
|
|
2395
|
-
let { t, format: n } =
|
|
2397
|
+
function Fi(e) {
|
|
2398
|
+
let { t, format: n } = Pi(e);
|
|
2396
2399
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2397
2400
|
return {
|
|
2398
2401
|
t,
|
|
@@ -2401,7 +2404,7 @@ function Pi(e) {
|
|
|
2401
2404
|
}
|
|
2402
2405
|
//#endregion
|
|
2403
2406
|
//#region src/composables/useMergeTag.ts
|
|
2404
|
-
function
|
|
2407
|
+
function Ii() {
|
|
2405
2408
|
let e = v(Un, []), t = v(Wn, lt.liquid), n = v(Gn, null), r = v(Kn, !0), i = C(!1);
|
|
2406
2409
|
function a(e) {
|
|
2407
2410
|
return mt(e, t);
|
|
@@ -2431,7 +2434,7 @@ function Fi() {
|
|
|
2431
2434
|
}
|
|
2432
2435
|
//#endregion
|
|
2433
2436
|
//#region src/composables/useEmoji.ts
|
|
2434
|
-
function
|
|
2437
|
+
function Li() {
|
|
2435
2438
|
let [e, t] = an(!1), r = n([]), i = !1;
|
|
2436
2439
|
l(() => {
|
|
2437
2440
|
i = !0;
|
|
@@ -2457,7 +2460,7 @@ function Ii() {
|
|
|
2457
2460
|
}
|
|
2458
2461
|
//#endregion
|
|
2459
2462
|
//#region src/composables/useDragDrop.ts
|
|
2460
|
-
function
|
|
2463
|
+
function Ri(e) {
|
|
2461
2464
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2462
2465
|
function o(e) {
|
|
2463
2466
|
r.value = !0, i.value = e;
|
|
@@ -2507,7 +2510,7 @@ function Li(e) {
|
|
|
2507
2510
|
}
|
|
2508
2511
|
//#endregion
|
|
2509
2512
|
//#region src/composables/useFonts.ts
|
|
2510
|
-
var
|
|
2513
|
+
var zi = [
|
|
2511
2514
|
{
|
|
2512
2515
|
value: "Arial",
|
|
2513
2516
|
label: "Arial"
|
|
@@ -2536,7 +2539,7 @@ var Ri = [
|
|
|
2536
2539
|
value: "Courier New",
|
|
2537
2540
|
label: "Courier New"
|
|
2538
2541
|
}
|
|
2539
|
-
],
|
|
2542
|
+
], Bi = {
|
|
2540
2543
|
arial: "Arial, sans-serif",
|
|
2541
2544
|
helvetica: "Helvetica, sans-serif",
|
|
2542
2545
|
georgia: "Georgia, serif",
|
|
@@ -2544,14 +2547,14 @@ var Ri = [
|
|
|
2544
2547
|
verdana: "Verdana, sans-serif",
|
|
2545
2548
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2546
2549
|
"courier new": "'Courier New', monospace"
|
|
2547
|
-
},
|
|
2548
|
-
function
|
|
2549
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = k(() => e?.defaultFallback ??
|
|
2550
|
+
}, Vi = "Arial, sans-serif";
|
|
2551
|
+
function Hi(e) {
|
|
2552
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = k(() => e?.defaultFallback ?? Vi);
|
|
2550
2553
|
function a(e) {
|
|
2551
2554
|
n.value = e;
|
|
2552
2555
|
}
|
|
2553
2556
|
let o = k(() => {
|
|
2554
|
-
let e = [...
|
|
2557
|
+
let e = [...zi];
|
|
2555
2558
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2556
2559
|
let r = t.value.map((e) => ({
|
|
2557
2560
|
value: e.name,
|
|
@@ -2564,23 +2567,23 @@ function Vi(e) {
|
|
|
2564
2567
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2565
2568
|
}
|
|
2566
2569
|
function u(e) {
|
|
2567
|
-
return
|
|
2570
|
+
return zi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2568
2571
|
}
|
|
2569
2572
|
function d() {
|
|
2570
2573
|
if (e?.defaultFont) {
|
|
2571
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2574
|
+
if (!n.value && !u(e.defaultFont)) return Vi;
|
|
2572
2575
|
if (c(e.defaultFont)) {
|
|
2573
2576
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2574
2577
|
if (t) return t.value;
|
|
2575
2578
|
}
|
|
2576
2579
|
}
|
|
2577
|
-
return
|
|
2580
|
+
return Vi;
|
|
2578
2581
|
}
|
|
2579
2582
|
let f = k(() => d());
|
|
2580
2583
|
function p(e) {
|
|
2581
2584
|
if (!e) return i.value;
|
|
2582
2585
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2583
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2586
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Bi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2584
2587
|
}
|
|
2585
2588
|
let m = [], h = !1;
|
|
2586
2589
|
async function g() {
|
|
@@ -2596,7 +2599,7 @@ function Vi(e) {
|
|
|
2596
2599
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2597
2600
|
});
|
|
2598
2601
|
} catch (t) {
|
|
2599
|
-
|
|
2602
|
+
gr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2600
2603
|
}
|
|
2601
2604
|
});
|
|
2602
2605
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2623,9 +2626,9 @@ function Vi(e) {
|
|
|
2623
2626
|
}
|
|
2624
2627
|
//#endregion
|
|
2625
2628
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2626
|
-
function
|
|
2629
|
+
function Ui(e) {
|
|
2627
2630
|
let t = C(!1), n = C(""), r = C(null);
|
|
2628
|
-
|
|
2631
|
+
Mi(r, t);
|
|
2629
2632
|
function i() {
|
|
2630
2633
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2631
2634
|
}
|
|
@@ -2676,8 +2679,8 @@ function Hi(e) {
|
|
|
2676
2679
|
}
|
|
2677
2680
|
//#endregion
|
|
2678
2681
|
//#region src/composables/useRichTextEditor.ts
|
|
2679
|
-
function
|
|
2680
|
-
let t = v(Nn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2682
|
+
function Wi(e) {
|
|
2683
|
+
let t = v(Nn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Ii(), l = v(Mn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = dt(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = Ui(p), { start: w, stop: T } = rn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), E = n(null), D = C(!0), O = C(null), ee = !1;
|
|
2681
2684
|
async function te() {
|
|
2682
2685
|
O.value = null, D.value = !0;
|
|
2683
2686
|
try {
|
|
@@ -2707,7 +2710,7 @@ function Ui(e) {
|
|
|
2707
2710
|
p.value = l, D.value = !1, w();
|
|
2708
2711
|
} catch (t) {
|
|
2709
2712
|
if (ee) return;
|
|
2710
|
-
|
|
2713
|
+
gr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
2711
2714
|
}
|
|
2712
2715
|
}
|
|
2713
2716
|
function k() {
|
|
@@ -2755,20 +2758,20 @@ function Ui(e) {
|
|
|
2755
2758
|
}
|
|
2756
2759
|
//#endregion
|
|
2757
2760
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2758
|
-
var
|
|
2761
|
+
var Gi = { class: "tpl:w-full" }, Ki = {
|
|
2759
2762
|
key: 0,
|
|
2760
2763
|
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)]"
|
|
2761
|
-
},
|
|
2764
|
+
}, qi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ji = {
|
|
2762
2765
|
key: 1,
|
|
2763
2766
|
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)]"
|
|
2764
|
-
},
|
|
2767
|
+
}, Yi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Xi = {
|
|
2765
2768
|
key: 2,
|
|
2766
2769
|
class: "tpl:relative"
|
|
2767
|
-
},
|
|
2770
|
+
}, Zi = ["innerHTML"], Qi = {
|
|
2768
2771
|
key: 0,
|
|
2769
2772
|
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]",
|
|
2770
2773
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2771
|
-
},
|
|
2774
|
+
}, $i = /* @__PURE__ */ B({
|
|
2772
2775
|
__name: "CustomBlock",
|
|
2773
2776
|
props: {
|
|
2774
2777
|
block: {},
|
|
@@ -2802,10 +2805,10 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2802
2805
|
g();
|
|
2803
2806
|
}), H(() => n.block.fieldValues, () => {
|
|
2804
2807
|
_();
|
|
2805
|
-
}, { deep: !0 }), (e, t) => (f(), A("div",
|
|
2808
|
+
}, { deep: !0 }), (e, t) => (f(), A("div", Gi, [u.value ? c.value ? (f(), A("div", Ji, [V(M(gi), {
|
|
2806
2809
|
size: 24,
|
|
2807
2810
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2808
|
-
}), I("span",
|
|
2811
|
+
}), I("span", Yi, O(M(a).customBlocks.renderError), 1)])) : (f(), A("div", Xi, [I("div", { innerHTML: s.value }, null, 8, Zi), M(h) && M(m) ? (f(), A("div", Qi, [M(d) ? (f(), P(ki, {
|
|
2809
2812
|
key: 1,
|
|
2810
2813
|
class: "tpl:w-48"
|
|
2811
2814
|
})) : (f(), A("button", {
|
|
@@ -2813,16 +2816,16 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2813
2816
|
type: "button",
|
|
2814
2817
|
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)]",
|
|
2815
2818
|
onClick: t[0] ||= N((...e) => M(p) && M(p)(...e), ["stop"])
|
|
2816
|
-
}, [l.value?.icon ? (f(), P(
|
|
2819
|
+
}, [l.value?.icon ? (f(), P(wi, {
|
|
2817
2820
|
key: 0,
|
|
2818
2821
|
icon: l.value.icon,
|
|
2819
2822
|
size: 16
|
|
2820
|
-
}, null, 8, ["icon"])) : j("", !0), z(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div",
|
|
2823
|
+
}, null, 8, ["icon"])) : j("", !0), z(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div", Ki, [V(M(ai), {
|
|
2821
2824
|
size: 24,
|
|
2822
2825
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2823
|
-
}), I("span",
|
|
2826
|
+
}), I("span", qi, O(M(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2824
2827
|
}
|
|
2825
|
-
}),
|
|
2828
|
+
}), ea = { class: "tpl:w-full" }, ta = /* @__PURE__ */ B({
|
|
2826
2829
|
__name: "DividerBlock",
|
|
2827
2830
|
props: {
|
|
2828
2831
|
block: {},
|
|
@@ -2834,18 +2837,18 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2834
2837
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2835
2838
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2836
2839
|
}));
|
|
2837
|
-
return (e, t) => (f(), A("div",
|
|
2840
|
+
return (e, t) => (f(), A("div", ea, [I("hr", {
|
|
2838
2841
|
class: "tpl:m-0 tpl:border-none",
|
|
2839
2842
|
style: L(n.value)
|
|
2840
2843
|
}, null, 4)]));
|
|
2841
2844
|
}
|
|
2842
|
-
}),
|
|
2845
|
+
}), na = { class: "tpl:w-full" }, ra = { 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)]" }, ia = {
|
|
2843
2846
|
key: 0,
|
|
2844
2847
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2845
|
-
},
|
|
2848
|
+
}, aa = {
|
|
2846
2849
|
key: 1,
|
|
2847
2850
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2848
|
-
},
|
|
2851
|
+
}, oa = /* @__PURE__ */ B({
|
|
2849
2852
|
__name: "HtmlBlock",
|
|
2850
2853
|
props: {
|
|
2851
2854
|
block: {},
|
|
@@ -2853,15 +2856,15 @@ var Wi = { class: "tpl:w-full" }, Gi = {
|
|
|
2853
2856
|
},
|
|
2854
2857
|
setup(e) {
|
|
2855
2858
|
let t = e, { t: n } = Y(), r = k(() => t.block.content.trim().length > 0);
|
|
2856
|
-
return (e, t) => (f(), A("div",
|
|
2859
|
+
return (e, t) => (f(), A("div", na, [I("div", ra, [V(M(Wr), {
|
|
2857
2860
|
size: 24,
|
|
2858
2861
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2859
|
-
}), r.value ? (f(), A("span",
|
|
2862
|
+
}), r.value ? (f(), A("span", ia, O(M(n).html.preview), 1)) : (f(), A("span", aa, O(M(n).html.empty), 1))])]));
|
|
2860
2863
|
}
|
|
2861
2864
|
});
|
|
2862
2865
|
//#endregion
|
|
2863
2866
|
//#region src/composables/useAliveFlag.ts
|
|
2864
|
-
function
|
|
2867
|
+
function sa() {
|
|
2865
2868
|
let e = { alive: !0 };
|
|
2866
2869
|
return ne(() => {
|
|
2867
2870
|
e.alive = !1;
|
|
@@ -2869,13 +2872,13 @@ function oa() {
|
|
|
2869
2872
|
}
|
|
2870
2873
|
//#endregion
|
|
2871
2874
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2872
|
-
var
|
|
2875
|
+
var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
2873
2876
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2874
2877
|
style: { opacity: "0.7" }
|
|
2875
|
-
},
|
|
2878
|
+
}, fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
2876
2879
|
key: 3,
|
|
2877
2880
|
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)]"
|
|
2878
|
-
},
|
|
2881
|
+
}, ga = ["aria-label"], _a = { key: 1 }, va = /* @__PURE__ */ B({
|
|
2879
2882
|
__name: "ImageBlock",
|
|
2880
2883
|
props: {
|
|
2881
2884
|
block: {},
|
|
@@ -2883,7 +2886,7 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
2883
2886
|
},
|
|
2884
2887
|
emits: ["update"],
|
|
2885
2888
|
setup(e, { emit: t }) {
|
|
2886
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
2889
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Ii(), o = v(qn, null), s = k(() => !!o), c = sa();
|
|
2887
2890
|
async function l() {
|
|
2888
2891
|
let e = await o?.({ accept: ["images"] });
|
|
2889
2892
|
if (c.alive && e) {
|
|
@@ -2913,22 +2916,22 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
2913
2916
|
src: e.block.placeholderUrl,
|
|
2914
2917
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2915
2918
|
style: L(d.value)
|
|
2916
|
-
}, null, 12,
|
|
2919
|
+
}, null, 12, la)], 8, ca)) : (f(), A("img", {
|
|
2917
2920
|
key: 1,
|
|
2918
2921
|
class: "tpl:border-0",
|
|
2919
2922
|
src: e.block.placeholderUrl,
|
|
2920
2923
|
alt: e.block.alt,
|
|
2921
2924
|
style: L(d.value)
|
|
2922
|
-
}, null, 12,
|
|
2925
|
+
}, null, 12, ua))], 64)) : e.block.src && p.value ? (f(), A("div", {
|
|
2923
2926
|
key: 1,
|
|
2924
2927
|
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)]",
|
|
2925
2928
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
2926
|
-
}, [V(M(
|
|
2929
|
+
}, [V(M($r), {
|
|
2927
2930
|
size: 32,
|
|
2928
2931
|
"stroke-width": 1.5,
|
|
2929
2932
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2930
2933
|
style: { opacity: "0.5" }
|
|
2931
|
-
}), I("span",
|
|
2934
|
+
}), I("span", da, O(e.block.src), 1)], 4)) : e.block.src ? (f(), A(R, { key: 2 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2932
2935
|
key: 0,
|
|
2933
2936
|
href: e.block.linkUrl,
|
|
2934
2937
|
target: "_blank",
|
|
@@ -2940,26 +2943,26 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
2940
2943
|
src: e.block.src,
|
|
2941
2944
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2942
2945
|
style: L(d.value)
|
|
2943
|
-
}, null, 12,
|
|
2946
|
+
}, null, 12, pa)], 8, fa)) : (f(), A("img", {
|
|
2944
2947
|
key: 1,
|
|
2945
2948
|
class: "tpl:border-0",
|
|
2946
2949
|
src: e.block.src,
|
|
2947
2950
|
alt: e.block.alt,
|
|
2948
2951
|
style: L(d.value)
|
|
2949
|
-
}, null, 12,
|
|
2952
|
+
}, null, 12, ma))], 64)) : (f(), A("div", ha, [s.value ? (f(), A("button", {
|
|
2950
2953
|
key: 0,
|
|
2951
2954
|
"aria-label": M(i).image.browseMedia,
|
|
2952
2955
|
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)]",
|
|
2953
2956
|
onClick: N(l, ["stop"])
|
|
2954
|
-
}, [V(M(
|
|
2957
|
+
}, [V(M($r), {
|
|
2955
2958
|
size: 14,
|
|
2956
2959
|
"stroke-width": 1.5
|
|
2957
|
-
}), z(" " + O(M(i).image.browseMedia), 1)], 8,
|
|
2960
|
+
}), z(" " + O(M(i).image.browseMedia), 1)], 8, ga)) : (f(), A("span", _a, O(M(i).image.clickToAdd), 1))]))], 4));
|
|
2958
2961
|
}
|
|
2959
|
-
}),
|
|
2962
|
+
}), ya = { class: "tpl:w-full" }, ba = ["href"], xa = {
|
|
2960
2963
|
key: 1,
|
|
2961
2964
|
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)]"
|
|
2962
|
-
},
|
|
2965
|
+
}, Sa = /* @__PURE__ */ B({
|
|
2963
2966
|
__name: "MenuBlock",
|
|
2964
2967
|
props: {
|
|
2965
2968
|
block: {},
|
|
@@ -2978,7 +2981,7 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
2978
2981
|
function a(e) {
|
|
2979
2982
|
return e || t.block.linkColor || t.block.color;
|
|
2980
2983
|
}
|
|
2981
|
-
return (t, o) => (f(), A("div",
|
|
2984
|
+
return (t, o) => (f(), A("div", ya, [i.value ? (f(), A("div", {
|
|
2982
2985
|
key: 0,
|
|
2983
2986
|
style: L(r.value)
|
|
2984
2987
|
}, [(f(!0), A(R, null, h(e.block.items, (t, n) => (f(), A(R, { key: t.id }, [I("a", {
|
|
@@ -2990,15 +2993,15 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
2990
2993
|
textDecoration: t.underline ? "underline" : "none"
|
|
2991
2994
|
}),
|
|
2992
2995
|
onClick: o[0] ||= N(() => {}, ["prevent"])
|
|
2993
|
-
}, O(t.text || "..."), 13,
|
|
2996
|
+
}, O(t.text || "..."), 13, ba), n < e.block.items.length - 1 ? (f(), A("span", {
|
|
2994
2997
|
key: 0,
|
|
2995
2998
|
style: L({
|
|
2996
2999
|
color: e.block.separatorColor,
|
|
2997
3000
|
padding: `0 ${e.block.spacing}px`
|
|
2998
3001
|
})
|
|
2999
|
-
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div",
|
|
3002
|
+
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", xa, [V(M(ri), { size: 16 }), I("span", null, O(M(n).menu.addLinks), 1)]))]));
|
|
3000
3003
|
}
|
|
3001
|
-
}),
|
|
3004
|
+
}), Ca = new Set([
|
|
3002
3005
|
"http",
|
|
3003
3006
|
"https",
|
|
3004
3007
|
"mailto",
|
|
@@ -3008,7 +3011,7 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
3008
3011
|
"sms",
|
|
3009
3012
|
"xmpp",
|
|
3010
3013
|
"cid"
|
|
3011
|
-
]),
|
|
3014
|
+
]), wa = new Set([
|
|
3012
3015
|
"SCRIPT",
|
|
3013
3016
|
"STYLE",
|
|
3014
3017
|
"IFRAME",
|
|
@@ -3018,7 +3021,7 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
3018
3021
|
"META",
|
|
3019
3022
|
"BASE",
|
|
3020
3023
|
"FORM"
|
|
3021
|
-
]),
|
|
3024
|
+
]), Ta = new Set([
|
|
3022
3025
|
"href",
|
|
3023
3026
|
"xlink:href",
|
|
3024
3027
|
"formaction",
|
|
@@ -3027,16 +3030,16 @@ var sa = ["href"], ca = ["src", "alt"], la = ["src", "alt"], ua = {
|
|
|
3027
3030
|
"background",
|
|
3028
3031
|
"poster"
|
|
3029
3032
|
]);
|
|
3030
|
-
function
|
|
3033
|
+
function Ea(e, t) {
|
|
3031
3034
|
let n = e.trim();
|
|
3032
3035
|
if (!n || n.startsWith("#")) return !0;
|
|
3033
3036
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3034
3037
|
if (!r) return !0;
|
|
3035
3038
|
let i = r[1].toLowerCase();
|
|
3036
|
-
return
|
|
3039
|
+
return Ca.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3037
3040
|
}
|
|
3038
|
-
function
|
|
3039
|
-
if (
|
|
3041
|
+
function Da(e) {
|
|
3042
|
+
if (wa.has(e.tagName)) {
|
|
3040
3043
|
e.remove();
|
|
3041
3044
|
return;
|
|
3042
3045
|
}
|
|
@@ -3048,29 +3051,29 @@ function Ea(e) {
|
|
|
3048
3051
|
e.removeAttribute(n);
|
|
3049
3052
|
continue;
|
|
3050
3053
|
}
|
|
3051
|
-
if (
|
|
3052
|
-
|
|
3054
|
+
if (Ta.has(t)) {
|
|
3055
|
+
Ea(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3053
3056
|
continue;
|
|
3054
3057
|
}
|
|
3055
3058
|
if (t === "src") {
|
|
3056
|
-
|
|
3059
|
+
Ea(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3057
3060
|
continue;
|
|
3058
3061
|
}
|
|
3059
3062
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3060
3063
|
}
|
|
3061
3064
|
let n = Array.from(e.children);
|
|
3062
|
-
for (let e of n)
|
|
3065
|
+
for (let e of n) Da(e);
|
|
3063
3066
|
}
|
|
3064
|
-
function
|
|
3067
|
+
function Oa(e) {
|
|
3065
3068
|
if (typeof DOMParser > "u") return e;
|
|
3066
3069
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3067
|
-
for (let e of n)
|
|
3070
|
+
for (let e of n) Da(e);
|
|
3068
3071
|
return t.innerHTML;
|
|
3069
3072
|
}
|
|
3070
3073
|
//#endregion
|
|
3071
3074
|
//#region src/composables/useEditableTextBlock.ts
|
|
3072
|
-
function
|
|
3073
|
-
let t = v(Un, []), { syntax: n } =
|
|
3075
|
+
function ka(e) {
|
|
3076
|
+
let t = v(Un, []), { syntax: n } = Ii(), r = k(() => Oa(bt(gt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Cn(a), c = k(() => ({
|
|
3074
3077
|
top: o.value - 8,
|
|
3075
3078
|
left: s.value
|
|
3076
3079
|
}));
|
|
@@ -3091,14 +3094,14 @@ function Oa(e) {
|
|
|
3091
3094
|
}
|
|
3092
3095
|
//#endregion
|
|
3093
3096
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3094
|
-
var
|
|
3097
|
+
var Aa = ["innerHTML"], ja = /* @__PURE__ */ B({
|
|
3095
3098
|
__name: "ParagraphBlock",
|
|
3096
3099
|
props: {
|
|
3097
3100
|
block: {},
|
|
3098
3101
|
viewport: {}
|
|
3099
3102
|
},
|
|
3100
3103
|
setup(e) {
|
|
3101
|
-
let t = e, n = E(() => import("./ParagraphEditor-
|
|
3104
|
+
let t = e, n = E(() => import("./ParagraphEditor-BtzinrI_.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content);
|
|
3102
3105
|
return (t, l) => (f(), A("div", {
|
|
3103
3106
|
ref_key: "blockRef",
|
|
3104
3107
|
ref: i,
|
|
@@ -3117,19 +3120,19 @@ var ka = ["innerHTML"], Aa = /* @__PURE__ */ B({
|
|
|
3117
3120
|
key: 1,
|
|
3118
3121
|
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",
|
|
3119
3122
|
innerHTML: M(o)
|
|
3120
|
-
}, null, 8,
|
|
3123
|
+
}, null, 8, Aa))], 544));
|
|
3121
3124
|
}
|
|
3122
3125
|
});
|
|
3123
3126
|
//#endregion
|
|
3124
3127
|
//#region src/utils/blockComponentResolver.ts
|
|
3125
|
-
function
|
|
3128
|
+
function Ma(e, t, n) {
|
|
3126
3129
|
if (t) {
|
|
3127
3130
|
let n = t.getComponent(e);
|
|
3128
3131
|
if (n) return n;
|
|
3129
3132
|
}
|
|
3130
3133
|
return n[e.type] ?? null;
|
|
3131
3134
|
}
|
|
3132
|
-
function
|
|
3135
|
+
function Na(e) {
|
|
3133
3136
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
3134
3137
|
return {
|
|
3135
3138
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -3139,20 +3142,20 @@ function Ma(e) {
|
|
|
3139
3142
|
}
|
|
3140
3143
|
//#endregion
|
|
3141
3144
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3142
|
-
var
|
|
3145
|
+
var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
3143
3146
|
"aria-label",
|
|
3144
3147
|
"aria-pressed",
|
|
3145
3148
|
"title"
|
|
3146
|
-
],
|
|
3149
|
+
], La = ["aria-label", "title"], Ra = ["aria-label", "title"], za = ["aria-label", "title"], Ba = {
|
|
3147
3150
|
key: 1,
|
|
3148
3151
|
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"
|
|
3149
|
-
},
|
|
3152
|
+
}, Va = { 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)]" }, Ha = {
|
|
3150
3153
|
key: 2,
|
|
3151
3154
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3152
|
-
},
|
|
3155
|
+
}, Ua = ["aria-label", "title"], Wa = {
|
|
3153
3156
|
key: 3,
|
|
3154
3157
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3155
|
-
},
|
|
3158
|
+
}, Ga = ["aria-label"], Ka = /* @__PURE__ */ Ti(/* @__PURE__ */ B({
|
|
3156
3159
|
__name: "BlockWrapper",
|
|
3157
3160
|
props: {
|
|
3158
3161
|
block: {},
|
|
@@ -3162,7 +3165,7 @@ var Na = ["data-block-id", "data-block-type"], Pa = ["aria-label"], Fa = [
|
|
|
3162
3165
|
},
|
|
3163
3166
|
emits: ["select"],
|
|
3164
3167
|
setup(e, { emit: t }) {
|
|
3165
|
-
let n = E(() => import("./BlockIssueBadge-
|
|
3168
|
+
let n = E(() => import("./BlockIssueBadge-D0_mYpkl.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(Zn, null), l = C(null), u = k(() => c?.liftedBlockId.value === r.block.id), d = k(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3166
3169
|
async function p() {
|
|
3167
3170
|
await m(), l.value?.focus();
|
|
3168
3171
|
}
|
|
@@ -3189,8 +3192,8 @@ var Na = ["data-block-id", "data-block-type"], Pa = ["aria-label"], Fa = [
|
|
|
3189
3192
|
desktop: a.viewport.desktop,
|
|
3190
3193
|
tablet: a.viewport.tablet,
|
|
3191
3194
|
mobile: a.viewport.mobile
|
|
3192
|
-
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(Fn, null), x = v(In, null), S = v(Xn, {}), w = k(() => !!S.savedModules), T = k(() => S.comments?.getBlockCount(r.block.id) ?? 0), D = k(() => ({ margin:
|
|
3193
|
-
let e =
|
|
3195
|
+
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(Fn, null), x = v(In, null), S = v(Xn, {}), w = k(() => !!S.savedModules), T = k(() => S.comments?.getBlockCount(r.block.id) ?? 0), D = k(() => ({ margin: Na(r.block).margin })), ee = k(() => {
|
|
3196
|
+
let e = Na(r.block);
|
|
3194
3197
|
return {
|
|
3195
3198
|
padding: e.padding,
|
|
3196
3199
|
backgroundColor: e.backgroundColor
|
|
@@ -3238,90 +3241,90 @@ var Na = ["data-block-id", "data-block-type"], Pa = ["aria-label"], Fa = [
|
|
|
3238
3241
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3239
3242
|
title: M(a).blockActions.drag,
|
|
3240
3243
|
onKeydown: h
|
|
3241
|
-
}, [V(M(
|
|
3244
|
+
}, [V(M(Zr), {
|
|
3242
3245
|
size: 14,
|
|
3243
3246
|
"stroke-width": 1.5
|
|
3244
|
-
})], 40,
|
|
3247
|
+
})], 40, Ia),
|
|
3245
3248
|
I("button", {
|
|
3246
3249
|
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",
|
|
3247
3250
|
"aria-label": M(a).blockActions.duplicate,
|
|
3248
3251
|
title: M(a).blockActions.duplicate,
|
|
3249
3252
|
onClick: N(P, ["stop"])
|
|
3250
|
-
}, [V(M(
|
|
3253
|
+
}, [V(M(Gr), {
|
|
3251
3254
|
size: 14,
|
|
3252
3255
|
"stroke-width": 1.5
|
|
3253
|
-
})], 8,
|
|
3256
|
+
})], 8, La),
|
|
3254
3257
|
w.value ? (f(), A("button", {
|
|
3255
3258
|
key: 0,
|
|
3256
3259
|
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",
|
|
3257
3260
|
"aria-label": M(a).blockActions.saveAsModule,
|
|
3258
3261
|
title: M(a).blockActions.saveAsModule,
|
|
3259
3262
|
onClick: N(re, ["stop"])
|
|
3260
|
-
}, [V(M(
|
|
3263
|
+
}, [V(M(Pr), {
|
|
3261
3264
|
size: 14,
|
|
3262
3265
|
"stroke-width": 1.5
|
|
3263
|
-
})], 8,
|
|
3266
|
+
})], 8, Ra)) : j("", !0),
|
|
3264
3267
|
I("button", {
|
|
3265
3268
|
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",
|
|
3266
3269
|
"aria-label": M(a).blockActions.delete,
|
|
3267
3270
|
title: M(a).blockActions.delete,
|
|
3268
3271
|
onClick: N(ne, ["stop"])
|
|
3269
|
-
}, [V(M(
|
|
3272
|
+
}, [V(M(hi), {
|
|
3270
3273
|
size: 14,
|
|
3271
3274
|
"stroke-width": 1.5
|
|
3272
|
-
})], 8,
|
|
3273
|
-
], 8,
|
|
3274
|
-
g.value ? (f(), A("div",
|
|
3275
|
+
})], 8, za)
|
|
3276
|
+
], 8, Fa)) : j("", !0),
|
|
3277
|
+
g.value ? (f(), A("div", Ba, [I("span", Va, [V(M(Kr), {
|
|
3275
3278
|
size: 12,
|
|
3276
3279
|
"stroke-width": 1.5
|
|
3277
3280
|
}), z(" " + O(M(s)(M(a).blockActions.hiddenOnViewport, { viewport: _.value })), 1)])])) : j("", !0),
|
|
3278
|
-
y.value && !g.value ? (f(), A("div",
|
|
3281
|
+
y.value && !g.value ? (f(), A("div", Ha, [I("button", {
|
|
3279
3282
|
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)]",
|
|
3280
3283
|
"aria-label": M(a).blockActions.conditionToggle,
|
|
3281
3284
|
title: e.block.displayCondition?.label,
|
|
3282
3285
|
onClick: N(F, ["stop"])
|
|
3283
|
-
}, [V(M(
|
|
3286
|
+
}, [V(M(Xr), {
|
|
3284
3287
|
size: 12,
|
|
3285
3288
|
"stroke-width": 2
|
|
3286
|
-
})], 8,
|
|
3287
|
-
T.value > 0 && !g.value ? (f(), A("div",
|
|
3289
|
+
})], 8, Ua)])) : j("", !0),
|
|
3290
|
+
T.value > 0 && !g.value ? (f(), A("div", Wa, [I("button", {
|
|
3288
3291
|
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)]",
|
|
3289
3292
|
"aria-label": M(s)(M(a).blockActions.comments, { count: String(T.value) }),
|
|
3290
3293
|
onClick: r[0] ||= N((t) => M(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3291
|
-
}, [V(M(
|
|
3294
|
+
}, [V(M(ni), {
|
|
3292
3295
|
size: 12,
|
|
3293
3296
|
"stroke-width": 2.5
|
|
3294
|
-
}), z(" " + O(T.value), 1)], 8,
|
|
3297
|
+
}), z(" " + O(T.value), 1)], 8, Ga)])) : j("", !0),
|
|
3295
3298
|
I("div", {
|
|
3296
3299
|
class: "tpl-block-content",
|
|
3297
3300
|
style: L(ee.value)
|
|
3298
3301
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3299
|
-
], 14,
|
|
3302
|
+
], 14, Pa));
|
|
3300
3303
|
}
|
|
3301
3304
|
}), [["__scopeId", "data-v-e77eb94e"]]);
|
|
3302
3305
|
//#endregion
|
|
3303
3306
|
//#region src/utils/unwrapParagraph.ts
|
|
3304
|
-
function
|
|
3307
|
+
function qa(e) {
|
|
3305
3308
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3306
3309
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3307
3310
|
}
|
|
3308
3311
|
//#endregion
|
|
3309
3312
|
//#region src/components/blocks/TitleBlock.vue
|
|
3310
|
-
var
|
|
3313
|
+
var Ja = /* @__PURE__ */ B({
|
|
3311
3314
|
__name: "TitleBlock",
|
|
3312
3315
|
props: {
|
|
3313
3316
|
block: {},
|
|
3314
3317
|
viewport: {}
|
|
3315
3318
|
},
|
|
3316
3319
|
setup(e) {
|
|
3317
|
-
let t = e, n = E(() => import("./TitleEditor-
|
|
3320
|
+
let t = e, n = E(() => import("./TitleEditor-Bzsbpajt.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content), l = k(() => {
|
|
3318
3321
|
let e = {
|
|
3319
3322
|
fontSize: `${pe[t.block.level]}px`,
|
|
3320
3323
|
color: t.block.color,
|
|
3321
3324
|
textAlign: t.block.textAlign
|
|
3322
3325
|
};
|
|
3323
3326
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3324
|
-
}), u = k(() => `h${t.block.level}`), p = k(() =>
|
|
3327
|
+
}), u = k(() => `h${t.block.level}`), p = k(() => qa(o.value));
|
|
3325
3328
|
return (t, o) => (f(), A("div", {
|
|
3326
3329
|
ref_key: "blockRef",
|
|
3327
3330
|
ref: i,
|
|
@@ -3344,11 +3347,11 @@ var qa = /* @__PURE__ */ B({
|
|
|
3344
3347
|
innerHTML: p.value
|
|
3345
3348
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3346
3349
|
}
|
|
3347
|
-
}),
|
|
3350
|
+
}), Ya = { class: "tpl:w-full" }, Xa = { class: "tpl:flex tpl:gap-0" }, Za = {
|
|
3348
3351
|
key: 0,
|
|
3349
3352
|
"data-testid": "section-drop-hint",
|
|
3350
3353
|
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)]"
|
|
3351
|
-
},
|
|
3354
|
+
}, Qa = /* @__PURE__ */ B({
|
|
3352
3355
|
__name: "SectionBlock",
|
|
3353
3356
|
props: {
|
|
3354
3357
|
block: {},
|
|
@@ -3356,12 +3359,12 @@ var qa = /* @__PURE__ */ B({
|
|
|
3356
3359
|
},
|
|
3357
3360
|
setup(e) {
|
|
3358
3361
|
let t = {
|
|
3359
|
-
title:
|
|
3360
|
-
paragraph:
|
|
3361
|
-
image:
|
|
3362
|
-
button:
|
|
3363
|
-
divider:
|
|
3364
|
-
custom:
|
|
3362
|
+
title: Ja,
|
|
3363
|
+
paragraph: ja,
|
|
3364
|
+
image: va,
|
|
3365
|
+
button: wr,
|
|
3366
|
+
divider: ta,
|
|
3367
|
+
custom: $i
|
|
3365
3368
|
}, n = e, { t: r } = Y(), i = J(Nn, "SectionBlock"), a = v(In, null), o = v(Vn, null), s = k(() => {
|
|
3366
3369
|
switch (n.block.columns) {
|
|
3367
3370
|
case "2": return ["50%", "50%"];
|
|
@@ -3388,7 +3391,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3388
3391
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3389
3392
|
}
|
|
3390
3393
|
function m(e) {
|
|
3391
|
-
return
|
|
3394
|
+
return Ma(e, o, t);
|
|
3392
3395
|
}
|
|
3393
3396
|
function g(e, t) {
|
|
3394
3397
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3396,7 +3399,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3396
3399
|
dataSourceFetched: t.dataSourceFetched
|
|
3397
3400
|
});
|
|
3398
3401
|
}
|
|
3399
|
-
return (t, n) => (f(), A("div",
|
|
3402
|
+
return (t, n) => (f(), A("div", Ya, [I("div", Xa, [(f(!0), A(R, null, h(l.value, (t, n) => (f(), A("div", {
|
|
3400
3403
|
key: n,
|
|
3401
3404
|
class: ae(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3402
3405
|
style: L({ width: s.value[n] })
|
|
@@ -3418,7 +3421,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3418
3421
|
class: "tpl:min-h-[60px]",
|
|
3419
3422
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3420
3423
|
}, {
|
|
3421
|
-
default: b(() => [(f(!0), A(R, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [V(
|
|
3424
|
+
default: b(() => [(f(!0), A(R, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [V(Ka, {
|
|
3422
3425
|
block: t,
|
|
3423
3426
|
"is-selected": M(i).state.selectedBlockId === t.id,
|
|
3424
3427
|
viewport: e.viewport,
|
|
@@ -3445,9 +3448,9 @@ var qa = /* @__PURE__ */ B({
|
|
|
3445
3448
|
"model-value",
|
|
3446
3449
|
"group",
|
|
3447
3450
|
"onUpdate:modelValue"
|
|
3448
|
-
]), u(n).length === 0 ? (f(), A("div",
|
|
3451
|
+
]), u(n).length === 0 ? (f(), A("div", Za, [I("span", null, O(M(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))])]));
|
|
3449
3452
|
}
|
|
3450
|
-
}),
|
|
3453
|
+
}), $a = {
|
|
3451
3454
|
facebook: {
|
|
3452
3455
|
name: "Facebook",
|
|
3453
3456
|
color: "#1877F2",
|
|
@@ -3528,11 +3531,11 @@ var qa = /* @__PURE__ */ B({
|
|
|
3528
3531
|
color: "#1769FF",
|
|
3529
3532
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3530
3533
|
}
|
|
3531
|
-
},
|
|
3534
|
+
}, eo = {
|
|
3532
3535
|
small: 24,
|
|
3533
3536
|
medium: 32,
|
|
3534
3537
|
large: 48
|
|
3535
|
-
},
|
|
3538
|
+
}, to = [
|
|
3536
3539
|
"facebook",
|
|
3537
3540
|
"twitter",
|
|
3538
3541
|
"instagram",
|
|
@@ -3549,11 +3552,11 @@ var qa = /* @__PURE__ */ B({
|
|
|
3549
3552
|
"github",
|
|
3550
3553
|
"dribbble",
|
|
3551
3554
|
"behance"
|
|
3552
|
-
],
|
|
3555
|
+
], no = [
|
|
3553
3556
|
"width",
|
|
3554
3557
|
"height",
|
|
3555
3558
|
"fill"
|
|
3556
|
-
],
|
|
3559
|
+
], ro = ["d"], io = /* @__PURE__ */ B({
|
|
3557
3560
|
__name: "SocialIconSvg",
|
|
3558
3561
|
props: {
|
|
3559
3562
|
platform: {},
|
|
@@ -3561,7 +3564,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3561
3564
|
iconSize: {}
|
|
3562
3565
|
},
|
|
3563
3566
|
setup(e) {
|
|
3564
|
-
let t = e, n = k(() =>
|
|
3567
|
+
let t = e, n = k(() => $a[t.platform]), r = k(() => eo[t.iconSize]), i = k(() => {
|
|
3565
3568
|
let e = {
|
|
3566
3569
|
display: "inline-flex",
|
|
3567
3570
|
alignItems: "center",
|
|
@@ -3605,12 +3608,12 @@ var qa = /* @__PURE__ */ B({
|
|
|
3605
3608
|
viewBox: "0 0 24 24",
|
|
3606
3609
|
fill: o.value,
|
|
3607
3610
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3608
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3611
|
+
}, [I("path", { d: n.value.path }, null, 8, ro)], 8, no))], 4));
|
|
3609
3612
|
}
|
|
3610
|
-
}),
|
|
3613
|
+
}), ao = { class: "tpl:w-full" }, oo = ["href"], so = {
|
|
3611
3614
|
key: 1,
|
|
3612
3615
|
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)]"
|
|
3613
|
-
},
|
|
3616
|
+
}, co = /* @__PURE__ */ B({
|
|
3614
3617
|
__name: "SocialIconsBlock",
|
|
3615
3618
|
props: {
|
|
3616
3619
|
block: {},
|
|
@@ -3623,7 +3626,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3623
3626
|
gap: `${t.block.spacing}px`,
|
|
3624
3627
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3625
3628
|
})), i = k(() => t.block.icons.length > 0);
|
|
3626
|
-
return (t, a) => (f(), A("div",
|
|
3629
|
+
return (t, a) => (f(), A("div", ao, [i.value ? (f(), A("div", {
|
|
3627
3630
|
key: 0,
|
|
3628
3631
|
style: L(r.value)
|
|
3629
3632
|
}, [(f(!0), A(R, null, h(e.block.icons, (t) => (f(), A("a", {
|
|
@@ -3631,7 +3634,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3631
3634
|
href: t.url || "#",
|
|
3632
3635
|
class: "tpl:cursor-default",
|
|
3633
3636
|
onClick: a[0] ||= N(() => {}, ["prevent"])
|
|
3634
|
-
}, [V(
|
|
3637
|
+
}, [V(io, {
|
|
3635
3638
|
platform: t.platform,
|
|
3636
3639
|
"icon-style": e.block.iconStyle,
|
|
3637
3640
|
"icon-size": e.block.iconSize
|
|
@@ -3639,16 +3642,16 @@ var qa = /* @__PURE__ */ B({
|
|
|
3639
3642
|
"platform",
|
|
3640
3643
|
"icon-style",
|
|
3641
3644
|
"icon-size"
|
|
3642
|
-
])], 8,
|
|
3645
|
+
])], 8, oo))), 128))], 4)) : (f(), A("div", so, [V(M(ui), { size: 16 }), I("span", null, O(M(n).social.addIcons), 1)]))]));
|
|
3643
3646
|
}
|
|
3644
|
-
}),
|
|
3647
|
+
}), lo = { class: "tpl:w-full" }, uo = {
|
|
3645
3648
|
key: 0,
|
|
3646
3649
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3647
3650
|
style: {
|
|
3648
3651
|
"background-color": "var(--tpl-bg-hover)",
|
|
3649
3652
|
color: "var(--tpl-text-dim)"
|
|
3650
3653
|
}
|
|
3651
|
-
},
|
|
3654
|
+
}, fo = /* @__PURE__ */ B({
|
|
3652
3655
|
__name: "SpacerBlock",
|
|
3653
3656
|
props: {
|
|
3654
3657
|
block: {},
|
|
@@ -3660,23 +3663,23 @@ var qa = /* @__PURE__ */ B({
|
|
|
3660
3663
|
minHeight: `${t.block.height}px`,
|
|
3661
3664
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3662
3665
|
}));
|
|
3663
|
-
return (t, i) => (f(), A("div",
|
|
3666
|
+
return (t, i) => (f(), A("div", lo, [I("div", {
|
|
3664
3667
|
style: L(r.value),
|
|
3665
3668
|
class: ae(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(n).state.previewMode }])
|
|
3666
|
-
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span",
|
|
3669
|
+
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span", uo, O(e.block.height) + "px ", 1))], 6)]));
|
|
3667
3670
|
}
|
|
3668
|
-
}),
|
|
3671
|
+
}), po = { class: "tpl:w-full" }, mo = { key: 0 }, ho = [
|
|
3669
3672
|
"aria-label",
|
|
3670
3673
|
"data-placeholder",
|
|
3671
3674
|
"onBlur"
|
|
3672
|
-
],
|
|
3675
|
+
], go = [
|
|
3673
3676
|
"aria-label",
|
|
3674
3677
|
"data-placeholder",
|
|
3675
3678
|
"onBlur"
|
|
3676
|
-
],
|
|
3679
|
+
], _o = {
|
|
3677
3680
|
key: 1,
|
|
3678
3681
|
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)]"
|
|
3679
|
-
},
|
|
3682
|
+
}, vo = /* @__PURE__ */ Ti(/* @__PURE__ */ B({
|
|
3680
3683
|
__name: "TableBlock",
|
|
3681
3684
|
props: {
|
|
3682
3685
|
block: {},
|
|
@@ -3719,11 +3722,11 @@ var qa = /* @__PURE__ */ B({
|
|
|
3719
3722
|
} : n);
|
|
3720
3723
|
i.updateBlock(n.block.id, { rows: o });
|
|
3721
3724
|
}
|
|
3722
|
-
return (e, n) => (f(), A("div",
|
|
3725
|
+
return (e, n) => (f(), A("div", po, [a.value ? (f(), A("table", {
|
|
3723
3726
|
key: 0,
|
|
3724
3727
|
style: L(o.value),
|
|
3725
3728
|
class: "tpl-table-editable"
|
|
3726
|
-
}, [u.value ? (f(), A("thead",
|
|
3729
|
+
}, [u.value ? (f(), A("thead", mo, [I("tr", null, [(f(!0), A(R, null, h(u.value.cells, (e) => c((f(), A("th", {
|
|
3727
3730
|
key: e.id,
|
|
3728
3731
|
style: L(l.value),
|
|
3729
3732
|
"aria-label": M(r).table.cellPlaceholder,
|
|
@@ -3732,7 +3735,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3732
3735
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3733
3736
|
onKeydown: n[0] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3734
3737
|
onClick: N(p, ["stop"])
|
|
3735
|
-
}, null, 44,
|
|
3738
|
+
}, null, 44, ho)), [[t, e.content]])), 128))])])) : j("", !0), I("tbody", null, [(f(!0), A(R, null, h(d.value, (e) => (f(), A("tr", { key: e.id }, [(f(!0), A(R, null, h(e.cells, (i) => c((f(), A("td", {
|
|
3736
3739
|
key: i.id,
|
|
3737
3740
|
style: L(s.value),
|
|
3738
3741
|
"aria-label": M(r).table.cellPlaceholder,
|
|
@@ -3741,9 +3744,9 @@ var qa = /* @__PURE__ */ B({
|
|
|
3741
3744
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3742
3745
|
onKeydown: n[1] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3743
3746
|
onClick: N(p, ["stop"])
|
|
3744
|
-
}, null, 44,
|
|
3747
|
+
}, null, 44, go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", _o, [V(M(mi), { size: 16 }), I("span", null, O(M(r).table.empty), 1)]))]));
|
|
3745
3748
|
}
|
|
3746
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3749
|
+
}), [["__scopeId", "data-v-4f49860b"]]), yo = /* @__PURE__ */ B({
|
|
3747
3750
|
__name: "VideoPlayButton",
|
|
3748
3751
|
props: { hoverEffect: {
|
|
3749
3752
|
type: Boolean,
|
|
@@ -3761,7 +3764,7 @@ var qa = /* @__PURE__ */ B({
|
|
|
3761
3764
|
});
|
|
3762
3765
|
//#endregion
|
|
3763
3766
|
//#region src/utils/videoThumbnail.ts
|
|
3764
|
-
function
|
|
3767
|
+
function bo(e) {
|
|
3765
3768
|
if (!e) return {
|
|
3766
3769
|
platform: "unknown",
|
|
3767
3770
|
videoId: null,
|
|
@@ -3793,25 +3796,25 @@ function yo(e) {
|
|
|
3793
3796
|
thumbnailUrl: null
|
|
3794
3797
|
};
|
|
3795
3798
|
}
|
|
3796
|
-
function
|
|
3797
|
-
return t ||
|
|
3799
|
+
function xo(e, t) {
|
|
3800
|
+
return t || bo(e).thumbnailUrl;
|
|
3798
3801
|
}
|
|
3799
3802
|
//#endregion
|
|
3800
3803
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3801
|
-
var
|
|
3804
|
+
var So = ["src", "alt"], Co = {
|
|
3802
3805
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3803
3806
|
style: { opacity: "0.7" }
|
|
3804
|
-
},
|
|
3807
|
+
}, wo = ["href"], To = ["src", "alt"], Eo = ["src", "alt"], Do = {
|
|
3805
3808
|
key: 3,
|
|
3806
3809
|
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)]"
|
|
3807
|
-
},
|
|
3810
|
+
}, Oo = /* @__PURE__ */ B({
|
|
3808
3811
|
__name: "VideoBlock",
|
|
3809
3812
|
props: {
|
|
3810
3813
|
block: {},
|
|
3811
3814
|
viewport: {}
|
|
3812
3815
|
},
|
|
3813
3816
|
setup(e) {
|
|
3814
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3817
|
+
let t = e, { t: n } = Y(), { syntax: r } = Ii(), i = k(() => _t(t.block.url, r) || _t(t.block.thumbnailUrl, r)), a = k(() => i.value ? null : xo(t.block.url, t.block.thumbnailUrl)), o = k(() => ({ textAlign: t.block.align })), s = k(() => ({
|
|
3815
3818
|
maxWidth: "100%",
|
|
3816
3819
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3817
3820
|
display: "block",
|
|
@@ -3829,16 +3832,16 @@ var xo = ["src", "alt"], So = {
|
|
|
3829
3832
|
class: "tpl:w-full tpl:border-0",
|
|
3830
3833
|
src: e.block.placeholderUrl,
|
|
3831
3834
|
alt: e.block.alt
|
|
3832
|
-
}, null, 8,
|
|
3835
|
+
}, null, 8, So), V(yo)], 4)) : i.value ? (f(), A("div", {
|
|
3833
3836
|
key: 1,
|
|
3834
3837
|
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)]",
|
|
3835
3838
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3836
|
-
}, [V(M(
|
|
3839
|
+
}, [V(M(yi), {
|
|
3837
3840
|
size: 36,
|
|
3838
3841
|
"stroke-width": 1.5,
|
|
3839
3842
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3840
3843
|
style: { opacity: "0.5" }
|
|
3841
|
-
}), I("span",
|
|
3844
|
+
}), I("span", Co, O(c.value), 1)], 4)) : a.value ? (f(), A(R, { key: 2 }, [e.block.url ? (f(), A("a", {
|
|
3842
3845
|
key: 0,
|
|
3843
3846
|
href: e.block.url,
|
|
3844
3847
|
target: "_blank",
|
|
@@ -3850,7 +3853,7 @@ var xo = ["src", "alt"], So = {
|
|
|
3850
3853
|
class: "tpl:w-full tpl:border-0",
|
|
3851
3854
|
src: a.value,
|
|
3852
3855
|
alt: e.block.alt
|
|
3853
|
-
}, null, 8,
|
|
3856
|
+
}, null, 8, To), V(yo, { "hover-effect": "" })], 12, wo)) : (f(), A("div", {
|
|
3854
3857
|
key: 1,
|
|
3855
3858
|
class: "tpl:relative tpl:inline-block",
|
|
3856
3859
|
style: L(s.value)
|
|
@@ -3858,31 +3861,31 @@ var xo = ["src", "alt"], So = {
|
|
|
3858
3861
|
class: "tpl:w-full tpl:border-0",
|
|
3859
3862
|
src: a.value,
|
|
3860
3863
|
alt: e.block.alt
|
|
3861
|
-
}, null, 8,
|
|
3864
|
+
}, null, 8, Eo), V(yo)], 4))], 64)) : (f(), A("div", Do, [V(M(yi), {
|
|
3862
3865
|
size: 40,
|
|
3863
3866
|
"stroke-width": 1.5,
|
|
3864
3867
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3865
3868
|
}), I("span", null, O(M(n).video.addVideo), 1)]))], 4));
|
|
3866
3869
|
}
|
|
3867
|
-
}),
|
|
3868
|
-
section:
|
|
3869
|
-
title:
|
|
3870
|
-
paragraph:
|
|
3871
|
-
image:
|
|
3872
|
-
button:
|
|
3873
|
-
divider:
|
|
3874
|
-
video:
|
|
3875
|
-
social:
|
|
3876
|
-
menu:
|
|
3877
|
-
table:
|
|
3878
|
-
spacer:
|
|
3879
|
-
html:
|
|
3880
|
-
countdown: E(() => import("./CountdownBlock-
|
|
3870
|
+
}), ko = {
|
|
3871
|
+
section: Qa,
|
|
3872
|
+
title: Ja,
|
|
3873
|
+
paragraph: ja,
|
|
3874
|
+
image: va,
|
|
3875
|
+
button: wr,
|
|
3876
|
+
divider: ta,
|
|
3877
|
+
video: Oo,
|
|
3878
|
+
social: co,
|
|
3879
|
+
menu: Sa,
|
|
3880
|
+
table: vo,
|
|
3881
|
+
spacer: fo,
|
|
3882
|
+
html: oa,
|
|
3883
|
+
countdown: E(() => import("./CountdownBlock-BEWsiqgw.js").then((e) => e.n))
|
|
3881
3884
|
};
|
|
3882
|
-
function
|
|
3885
|
+
function Ao(e) {
|
|
3883
3886
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
3884
3887
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3885
|
-
let { resolvedTheme: c } =
|
|
3888
|
+
let { resolvedTheme: c } = dr(k(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = pr({
|
|
3886
3889
|
themeOverrides: u,
|
|
3887
3890
|
resolvedTheme: c,
|
|
3888
3891
|
extraStyles: e.themeExtraStyles
|
|
@@ -3907,13 +3910,13 @@ function ko(e) {
|
|
|
3907
3910
|
g && (_ = H(f.isNavigating, (e) => {
|
|
3908
3911
|
e ? g.pause() : g.resume();
|
|
3909
3912
|
}));
|
|
3910
|
-
let v =
|
|
3913
|
+
let v = ur(t, {
|
|
3911
3914
|
t: a,
|
|
3912
3915
|
format: o
|
|
3913
|
-
}), y =
|
|
3914
|
-
if (
|
|
3916
|
+
}), y = _r();
|
|
3917
|
+
if (yr(y, ko), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, $i);
|
|
3915
3918
|
function b(e) {
|
|
3916
|
-
for (let t of e) y.registerCustom(t,
|
|
3919
|
+
for (let t of e) y.registerCustom(t, $i);
|
|
3917
3920
|
}
|
|
3918
3921
|
let x = jn();
|
|
3919
3922
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -3924,7 +3927,7 @@ function ko(e) {
|
|
|
3924
3927
|
}, { capture: !0 });
|
|
3925
3928
|
}
|
|
3926
3929
|
function S(r) {
|
|
3927
|
-
x.isActive() &&
|
|
3930
|
+
x.isActive() && xr(r, {
|
|
3928
3931
|
history: f,
|
|
3929
3932
|
selectBlock: (e) => t.selectBlock(e),
|
|
3930
3933
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3938,7 +3941,7 @@ function ko(e) {
|
|
|
3938
3941
|
p($n, e.editorRoot ?? document), p(er, w), p(Mn, r), p(Nn, t), p(Pn, f), p(Fn, m), p(In, h), p(Ln, i), p(Rn, d), p(zn, c), p(Bn, n.blockDefaults), p(Vn, y), p(Hn, n.customBlocks ?? []);
|
|
3939
3942
|
let T = ft(n.mergeTags?.syntax);
|
|
3940
3943
|
p(Un, n.mergeTags?.tags ?? []), p(Wn, T), p(Gn, n.mergeTags?.onRequest ?? null), p(Kn, n.mergeTags?.autocomplete !== !1), p(qn, n.onRequestMedia ?? null), p(Jn, n.displayConditions?.conditions ?? []), p(Yn, n.displayConditions?.allowCustom ?? !1), p(Xn, e.capabilities ?? {}), p(Zn, v);
|
|
3941
|
-
let E = n.lint
|
|
3944
|
+
let E = sr(n.lint) ? null : cr({
|
|
3942
3945
|
content: t.content,
|
|
3943
3946
|
options: n.lint ?? {},
|
|
3944
3947
|
updateBlock: t.updateBlock,
|
|
@@ -3969,7 +3972,7 @@ function ko(e) {
|
|
|
3969
3972
|
}
|
|
3970
3973
|
//#endregion
|
|
3971
3974
|
//#region ../core/src/cloud/auth.ts
|
|
3972
|
-
var
|
|
3975
|
+
var jo = class e {
|
|
3973
3976
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
3974
3977
|
accessToken = null;
|
|
3975
3978
|
expiresAt = null;
|
|
@@ -4070,8 +4073,8 @@ var Ao = class e {
|
|
|
4070
4073
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4071
4074
|
}
|
|
4072
4075
|
};
|
|
4073
|
-
function
|
|
4074
|
-
return e.mode === "direct" ? new
|
|
4076
|
+
function Mo(e, t) {
|
|
4077
|
+
return e.mode === "direct" ? new jo({
|
|
4075
4078
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4076
4079
|
baseUrl: e.baseUrl,
|
|
4077
4080
|
requestOptions: {
|
|
@@ -4085,7 +4088,7 @@ function jo(e, t) {
|
|
|
4085
4088
|
}
|
|
4086
4089
|
},
|
|
4087
4090
|
onError: t
|
|
4088
|
-
}) : new
|
|
4091
|
+
}) : new jo({
|
|
4089
4092
|
url: e.url,
|
|
4090
4093
|
baseUrl: e.baseUrl,
|
|
4091
4094
|
requestOptions: e.requestOptions,
|
|
@@ -4097,16 +4100,16 @@ function jo(e, t) {
|
|
|
4097
4100
|
function Z(e, t) {
|
|
4098
4101
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4099
4102
|
}
|
|
4100
|
-
var
|
|
4103
|
+
var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{template}`, Po = `${Q}/ai`, Fo = `${No}/media`, Io = `${Fo}/folders`, Lo = `${No}/saved-modules`, $ = {
|
|
4101
4104
|
health: "/api/v1/health",
|
|
4102
|
-
"projects.config": `${
|
|
4103
|
-
"broadcasting.auth": `${
|
|
4104
|
-
"templates.store": `${
|
|
4105
|
+
"projects.config": `${No}/config`,
|
|
4106
|
+
"broadcasting.auth": `${No}/broadcasting/auth`,
|
|
4107
|
+
"templates.store": `${No}/templates`,
|
|
4105
4108
|
"templates.show": `${Q}`,
|
|
4106
4109
|
"templates.update": `${Q}`,
|
|
4107
4110
|
"templates.destroy": `${Q}`,
|
|
4108
4111
|
"templates.export": `${Q}/export`,
|
|
4109
|
-
"templates.importFromBeefree": `${
|
|
4112
|
+
"templates.importFromBeefree": `${No}/templates/import/from-beefree`,
|
|
4110
4113
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4111
4114
|
"snapshots.index": `${Q}/snapshots`,
|
|
4112
4115
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4117,31 +4120,31 @@ var Mo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Mo}/templates/{te
|
|
|
4117
4120
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4118
4121
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4119
4122
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4120
|
-
"ai.generate": `${
|
|
4121
|
-
"ai.conversationMessages": `${
|
|
4122
|
-
"ai.suggestions": `${
|
|
4123
|
-
"ai.rewriteText": `${
|
|
4124
|
-
"ai.score": `${
|
|
4125
|
-
"ai.fixFinding": `${
|
|
4126
|
-
"ai.generateFromDesign": `${
|
|
4127
|
-
"media.upload": `${
|
|
4128
|
-
"media.browse": `${
|
|
4129
|
-
"media.delete": `${
|
|
4130
|
-
"media.move": `${
|
|
4131
|
-
"media.update": `${
|
|
4132
|
-
"media.replace": `${
|
|
4133
|
-
"media.checkUsage": `${
|
|
4134
|
-
"media.frequentlyUsed": `${
|
|
4135
|
-
"media.importFromUrl": `${
|
|
4136
|
-
"folders.index": `${
|
|
4137
|
-
"folders.store": `${
|
|
4138
|
-
"folders.update": `${
|
|
4139
|
-
"folders.destroy": `${
|
|
4140
|
-
"savedModules.index": `${
|
|
4141
|
-
"savedModules.store": `${
|
|
4142
|
-
"savedModules.update": `${
|
|
4143
|
-
"savedModules.destroy": `${
|
|
4144
|
-
},
|
|
4123
|
+
"ai.generate": `${Po}/generate`,
|
|
4124
|
+
"ai.conversationMessages": `${Po}/conversation-messages`,
|
|
4125
|
+
"ai.suggestions": `${Po}/suggestions`,
|
|
4126
|
+
"ai.rewriteText": `${Po}/rewrite-text`,
|
|
4127
|
+
"ai.score": `${Po}/score`,
|
|
4128
|
+
"ai.fixFinding": `${Po}/fix-finding`,
|
|
4129
|
+
"ai.generateFromDesign": `${Po}/generate-from-design`,
|
|
4130
|
+
"media.upload": `${Fo}/upload`,
|
|
4131
|
+
"media.browse": `${Fo}/browse`,
|
|
4132
|
+
"media.delete": `${Fo}/delete`,
|
|
4133
|
+
"media.move": `${Fo}/move`,
|
|
4134
|
+
"media.update": `${Fo}/{media}`,
|
|
4135
|
+
"media.replace": `${Fo}/{media}/replace`,
|
|
4136
|
+
"media.checkUsage": `${Fo}/check-usage`,
|
|
4137
|
+
"media.frequentlyUsed": `${Fo}/frequently-used`,
|
|
4138
|
+
"media.importFromUrl": `${Fo}/import-from-url`,
|
|
4139
|
+
"folders.index": `${Io}`,
|
|
4140
|
+
"folders.store": `${Io}`,
|
|
4141
|
+
"folders.update": `${Io}/{mediaFolder}`,
|
|
4142
|
+
"folders.destroy": `${Io}/{mediaFolder}`,
|
|
4143
|
+
"savedModules.index": `${Lo}`,
|
|
4144
|
+
"savedModules.store": `${Lo}`,
|
|
4145
|
+
"savedModules.update": `${Lo}/{savedModule}`,
|
|
4146
|
+
"savedModules.destroy": `${Lo}/{savedModule}`
|
|
4147
|
+
}, Ro = class {
|
|
4145
4148
|
constructor(e) {
|
|
4146
4149
|
this.authManager = e;
|
|
4147
4150
|
}
|
|
@@ -4326,14 +4329,14 @@ var Mo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Mo}/templates/{te
|
|
|
4326
4329
|
};
|
|
4327
4330
|
//#endregion
|
|
4328
4331
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4329
|
-
function
|
|
4332
|
+
function zo(e) {
|
|
4330
4333
|
return {
|
|
4331
4334
|
host: e.host,
|
|
4332
4335
|
port: e.port,
|
|
4333
4336
|
appKey: e.app_key
|
|
4334
4337
|
};
|
|
4335
4338
|
}
|
|
4336
|
-
var
|
|
4339
|
+
var Bo = class {
|
|
4337
4340
|
pusher = null;
|
|
4338
4341
|
authManager;
|
|
4339
4342
|
config;
|
|
@@ -4400,7 +4403,7 @@ var zo = class {
|
|
|
4400
4403
|
};
|
|
4401
4404
|
//#endregion
|
|
4402
4405
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4403
|
-
function
|
|
4406
|
+
function Vo(e, t) {
|
|
4404
4407
|
let { operation: n, data: r } = t;
|
|
4405
4408
|
switch (n) {
|
|
4406
4409
|
case "add_block":
|
|
@@ -4428,8 +4431,8 @@ function Bo(e, t) {
|
|
|
4428
4431
|
}
|
|
4429
4432
|
//#endregion
|
|
4430
4433
|
//#region ../core/src/cloud/editor.ts
|
|
4431
|
-
function
|
|
4432
|
-
let t = new
|
|
4434
|
+
function Ho(e) {
|
|
4435
|
+
let t = new Ro(e.authManager), n = S({
|
|
4433
4436
|
template: null,
|
|
4434
4437
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4435
4438
|
selectedBlockId: null,
|
|
@@ -4625,11 +4628,11 @@ function Vo(e) {
|
|
|
4625
4628
|
}
|
|
4626
4629
|
//#endregion
|
|
4627
4630
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4628
|
-
var
|
|
4629
|
-
function
|
|
4630
|
-
return `msg_${Date.now()}_${++
|
|
4631
|
+
var Uo = 0;
|
|
4632
|
+
function Wo() {
|
|
4633
|
+
return `msg_${Date.now()}_${++Uo}`;
|
|
4631
4634
|
}
|
|
4632
|
-
function
|
|
4635
|
+
function Go(e) {
|
|
4633
4636
|
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);
|
|
4634
4637
|
function _(e, t) {
|
|
4635
4638
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4723,14 +4726,14 @@ function Wo(e) {
|
|
|
4723
4726
|
let v = n();
|
|
4724
4727
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4725
4728
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4726
|
-
let y =
|
|
4729
|
+
let y = Wo();
|
|
4727
4730
|
a.value = [...a.value, {
|
|
4728
4731
|
id: y,
|
|
4729
4732
|
role: "user",
|
|
4730
4733
|
content: e,
|
|
4731
4734
|
timestamp: Date.now()
|
|
4732
4735
|
}];
|
|
4733
|
-
let b =
|
|
4736
|
+
let b = Wo();
|
|
4734
4737
|
a.value = [...a.value, {
|
|
4735
4738
|
id: b,
|
|
4736
4739
|
role: "assistant",
|
|
@@ -4821,7 +4824,7 @@ function Wo(e) {
|
|
|
4821
4824
|
}
|
|
4822
4825
|
//#endregion
|
|
4823
4826
|
//#region ../core/src/cloud/ai-config.ts
|
|
4824
|
-
function
|
|
4827
|
+
function Ko(e) {
|
|
4825
4828
|
function t(t) {
|
|
4826
4829
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4827
4830
|
}
|
|
@@ -4832,7 +4835,7 @@ function Go(e) {
|
|
|
4832
4835
|
}
|
|
4833
4836
|
//#endregion
|
|
4834
4837
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4835
|
-
function
|
|
4838
|
+
function qo(e) {
|
|
4836
4839
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
4837
4840
|
async function l(e, o) {
|
|
4838
4841
|
let s = n();
|
|
@@ -4977,7 +4980,7 @@ function Ko(e) {
|
|
|
4977
4980
|
}
|
|
4978
4981
|
//#endregion
|
|
4979
4982
|
//#region ../core/src/cloud/design-reference.ts
|
|
4980
|
-
function
|
|
4983
|
+
function Jo(e) {
|
|
4981
4984
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
4982
4985
|
async function s(e) {
|
|
4983
4986
|
let s = n();
|
|
@@ -5040,8 +5043,8 @@ function qo(e) {
|
|
|
5040
5043
|
}
|
|
5041
5044
|
//#endregion
|
|
5042
5045
|
//#region ../core/src/cloud/comments.ts
|
|
5043
|
-
function
|
|
5044
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5046
|
+
function Yo(e) {
|
|
5047
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new Ro(t), c = C([]), l = C(!1), u = C(!1), d = k(() => (o?.() ?? !1) && t.userConfig !== null), f = k(() => {
|
|
5045
5048
|
let e = 0;
|
|
5046
5049
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5047
5050
|
return e;
|
|
@@ -5240,17 +5243,17 @@ function Jo(e) {
|
|
|
5240
5243
|
}
|
|
5241
5244
|
//#endregion
|
|
5242
5245
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5243
|
-
function
|
|
5246
|
+
function Xo(e) {
|
|
5244
5247
|
let { comments: t, channel: n } = e;
|
|
5245
5248
|
H(n, (e, n) => {
|
|
5246
5249
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5247
|
-
|
|
5250
|
+
Zo(t, e);
|
|
5248
5251
|
});
|
|
5249
5252
|
}), l(() => {
|
|
5250
5253
|
n.value?.unbind("comment-broadcast");
|
|
5251
5254
|
});
|
|
5252
5255
|
}
|
|
5253
|
-
function
|
|
5256
|
+
function Zo(e, t) {
|
|
5254
5257
|
switch (t.action) {
|
|
5255
5258
|
case "comment_created":
|
|
5256
5259
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5269,7 +5272,7 @@ function Xo(e, t) {
|
|
|
5269
5272
|
}
|
|
5270
5273
|
//#endregion
|
|
5271
5274
|
//#region ../core/src/cloud/collaboration.ts
|
|
5272
|
-
var
|
|
5275
|
+
var Qo = [
|
|
5273
5276
|
"pusher:member_added",
|
|
5274
5277
|
"pusher:member_removed",
|
|
5275
5278
|
"client-block_locked",
|
|
@@ -5277,10 +5280,10 @@ var Zo = [
|
|
|
5277
5280
|
"client-operation",
|
|
5278
5281
|
"mcp-operation"
|
|
5279
5282
|
];
|
|
5280
|
-
function
|
|
5281
|
-
for (let t of
|
|
5283
|
+
function $o(e) {
|
|
5284
|
+
for (let t of Qo) e.unbind(t);
|
|
5282
5285
|
}
|
|
5283
|
-
var
|
|
5286
|
+
var es = [
|
|
5284
5287
|
"#3b82f6",
|
|
5285
5288
|
"#ef4444",
|
|
5286
5289
|
"#10b981",
|
|
@@ -5292,10 +5295,10 @@ var $o = [
|
|
|
5292
5295
|
"#6366f1",
|
|
5293
5296
|
"#14b8a6"
|
|
5294
5297
|
];
|
|
5295
|
-
function
|
|
5298
|
+
function ts(e) {
|
|
5296
5299
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = k(() => t.userConfig?.id ?? "");
|
|
5297
5300
|
function u() {
|
|
5298
|
-
let e =
|
|
5301
|
+
let e = es[o % es.length];
|
|
5299
5302
|
return o++, e;
|
|
5300
5303
|
}
|
|
5301
5304
|
function d(e) {
|
|
@@ -5337,7 +5340,7 @@ function es(e) {
|
|
|
5337
5340
|
function h(e) {
|
|
5338
5341
|
s = !0;
|
|
5339
5342
|
try {
|
|
5340
|
-
|
|
5343
|
+
Vo(n, e);
|
|
5341
5344
|
} finally {
|
|
5342
5345
|
s = !1;
|
|
5343
5346
|
}
|
|
@@ -5357,7 +5360,7 @@ function es(e) {
|
|
|
5357
5360
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5358
5361
|
s || (t && v(t), e && _(e));
|
|
5359
5362
|
}), H(r, (t, n) => {
|
|
5360
|
-
if (n &&
|
|
5363
|
+
if (n && $o(n), !t) {
|
|
5361
5364
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5362
5365
|
return;
|
|
5363
5366
|
}
|
|
@@ -5389,7 +5392,7 @@ function es(e) {
|
|
|
5389
5392
|
h(e);
|
|
5390
5393
|
});
|
|
5391
5394
|
}), l(() => {
|
|
5392
|
-
r.value &&
|
|
5395
|
+
r.value && $o(r.value);
|
|
5393
5396
|
}), {
|
|
5394
5397
|
collaborators: i,
|
|
5395
5398
|
lockedBlocks: a,
|
|
@@ -5399,7 +5402,7 @@ function es(e) {
|
|
|
5399
5402
|
}
|
|
5400
5403
|
//#endregion
|
|
5401
5404
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5402
|
-
function
|
|
5405
|
+
function ns(e, t) {
|
|
5403
5406
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5404
5407
|
e.addBlock = (e, r, i) => {
|
|
5405
5408
|
n(e, r, i), t._broadcastOperation({
|
|
@@ -5453,11 +5456,11 @@ function ts(e, t) {
|
|
|
5453
5456
|
}
|
|
5454
5457
|
//#endregion
|
|
5455
5458
|
//#region ../core/src/cloud/web-socket.ts
|
|
5456
|
-
function
|
|
5459
|
+
function rs(e) {
|
|
5457
5460
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5458
5461
|
async function s(e, s) {
|
|
5459
5462
|
if (a) return;
|
|
5460
|
-
a = new
|
|
5463
|
+
a = new Bo({
|
|
5461
5464
|
authManager: t,
|
|
5462
5465
|
config: s,
|
|
5463
5466
|
onError: n
|
|
@@ -5485,8 +5488,8 @@ function ns(e) {
|
|
|
5485
5488
|
}
|
|
5486
5489
|
//#endregion
|
|
5487
5490
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5488
|
-
function
|
|
5489
|
-
let t = new
|
|
5491
|
+
function is(e) {
|
|
5492
|
+
let t = new Ro(e.authManager), n = C([]), r = C(!1);
|
|
5490
5493
|
async function i(i) {
|
|
5491
5494
|
r.value = !0;
|
|
5492
5495
|
try {
|
|
@@ -5534,8 +5537,8 @@ function rs(e) {
|
|
|
5534
5537
|
}
|
|
5535
5538
|
//#endregion
|
|
5536
5539
|
//#region ../core/src/cloud/snapshots.ts
|
|
5537
|
-
function
|
|
5538
|
-
let t = new
|
|
5540
|
+
function as(e) {
|
|
5541
|
+
let t = new Ro(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5539
5542
|
async function a() {
|
|
5540
5543
|
r.value = !0;
|
|
5541
5544
|
try {
|
|
@@ -5567,8 +5570,8 @@ function is(e) {
|
|
|
5567
5570
|
}
|
|
5568
5571
|
//#endregion
|
|
5569
5572
|
//#region ../core/src/cloud/test-email.ts
|
|
5570
|
-
function
|
|
5571
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5573
|
+
function os(e) {
|
|
5574
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Ro(t), l = C(!1), u = C(null), d = C(null);
|
|
5572
5575
|
o && H(o, (e) => {
|
|
5573
5576
|
e && (d.value = t.testEmailConfig);
|
|
5574
5577
|
}, { immediate: !0 });
|
|
@@ -5604,8 +5607,8 @@ function as(e) {
|
|
|
5604
5607
|
}
|
|
5605
5608
|
//#endregion
|
|
5606
5609
|
//#region ../core/src/cloud/export.ts
|
|
5607
|
-
function
|
|
5608
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5610
|
+
function ss(e) {
|
|
5611
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new Ro(t);
|
|
5609
5612
|
function a() {
|
|
5610
5613
|
let e = n?.();
|
|
5611
5614
|
return {
|
|
@@ -5631,8 +5634,8 @@ function os(e) {
|
|
|
5631
5634
|
}
|
|
5632
5635
|
//#endregion
|
|
5633
5636
|
//#region ../core/src/cloud/plan-config.ts
|
|
5634
|
-
function
|
|
5635
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5637
|
+
function cs(e) {
|
|
5638
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new Ro(t), o = k(() => r.value?.features ?? null);
|
|
5636
5639
|
function s(e) {
|
|
5637
5640
|
return r.value?.features[e] ?? !1;
|
|
5638
5641
|
}
|
|
@@ -5658,11 +5661,11 @@ function ss(e) {
|
|
|
5658
5661
|
}
|
|
5659
5662
|
//#endregion
|
|
5660
5663
|
//#region ../core/src/cloud/health-check.ts
|
|
5661
|
-
var
|
|
5662
|
-
function
|
|
5664
|
+
var ls = 5e3;
|
|
5665
|
+
function us(e) {
|
|
5663
5666
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5664
5667
|
}
|
|
5665
|
-
async function
|
|
5668
|
+
async function ds(e, t) {
|
|
5666
5669
|
let n = performance.now();
|
|
5667
5670
|
try {
|
|
5668
5671
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5714,7 +5717,7 @@ async function us(e, t) {
|
|
|
5714
5717
|
};
|
|
5715
5718
|
}
|
|
5716
5719
|
}
|
|
5717
|
-
async function
|
|
5720
|
+
async function fs(e) {
|
|
5718
5721
|
if (!e?.host || !e?.app_key) return {
|
|
5719
5722
|
ok: !1,
|
|
5720
5723
|
error: "WebSocket configuration not available"
|
|
@@ -5730,7 +5733,7 @@ async function ds(e) {
|
|
|
5730
5733
|
ok: !1,
|
|
5731
5734
|
error: "WebSocket connection timed out"
|
|
5732
5735
|
});
|
|
5733
|
-
},
|
|
5736
|
+
}, ls);
|
|
5734
5737
|
try {
|
|
5735
5738
|
n = new WebSocket(t);
|
|
5736
5739
|
} catch (t) {
|
|
@@ -5750,8 +5753,8 @@ async function ds(e) {
|
|
|
5750
5753
|
};
|
|
5751
5754
|
});
|
|
5752
5755
|
}
|
|
5753
|
-
async function
|
|
5754
|
-
let t = await us(
|
|
5756
|
+
async function ps(e = {}) {
|
|
5757
|
+
let t = await ds(us(e), e.authManager), n = await fs(t.wsConfig);
|
|
5755
5758
|
return {
|
|
5756
5759
|
api: t.api,
|
|
5757
5760
|
websocket: n,
|
|
@@ -5761,29 +5764,29 @@ async function fs(e = {}) {
|
|
|
5761
5764
|
}
|
|
5762
5765
|
//#endregion
|
|
5763
5766
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5764
|
-
function
|
|
5767
|
+
function ms(e) {
|
|
5765
5768
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5766
5769
|
H(n, (e, n) => {
|
|
5767
5770
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5768
|
-
|
|
5771
|
+
Vo(t, e), r?.(e);
|
|
5769
5772
|
});
|
|
5770
5773
|
});
|
|
5771
5774
|
}
|
|
5772
5775
|
//#endregion
|
|
5773
5776
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5774
|
-
var
|
|
5777
|
+
var hs = {
|
|
5775
5778
|
key: 0,
|
|
5776
5779
|
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)]"
|
|
5777
|
-
},
|
|
5780
|
+
}, gs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, _s = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, vs = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ys = ["title"], bs = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, xs = {
|
|
5778
5781
|
key: 0,
|
|
5779
5782
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5780
|
-
},
|
|
5783
|
+
}, Ss = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Cs = {
|
|
5781
5784
|
key: 1,
|
|
5782
5785
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5783
|
-
},
|
|
5786
|
+
}, ws = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ts = {
|
|
5784
5787
|
key: 2,
|
|
5785
5788
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5786
|
-
},
|
|
5789
|
+
}, Es = {
|
|
5787
5790
|
key: 0,
|
|
5788
5791
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5789
5792
|
style: {
|
|
@@ -5792,10 +5795,10 @@ var ms = {
|
|
|
5792
5795
|
"max-width": "85%",
|
|
5793
5796
|
"box-shadow": "var(--tpl-shadow)"
|
|
5794
5797
|
}
|
|
5795
|
-
},
|
|
5798
|
+
}, Ds = {
|
|
5796
5799
|
key: 1,
|
|
5797
5800
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5798
|
-
},
|
|
5801
|
+
}, Os = {
|
|
5799
5802
|
key: 1,
|
|
5800
5803
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5801
5804
|
style: {
|
|
@@ -5804,21 +5807,21 @@ var ms = {
|
|
|
5804
5807
|
color: "var(--tpl-text)",
|
|
5805
5808
|
"box-shadow": "var(--tpl-shadow)"
|
|
5806
5809
|
}
|
|
5807
|
-
},
|
|
5810
|
+
}, ks = {
|
|
5808
5811
|
key: 0,
|
|
5809
5812
|
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",
|
|
5810
5813
|
style: {
|
|
5811
5814
|
"background-color": "var(--tpl-danger-light)",
|
|
5812
5815
|
color: "var(--tpl-danger)"
|
|
5813
5816
|
}
|
|
5814
|
-
},
|
|
5817
|
+
}, As = {
|
|
5815
5818
|
key: 1,
|
|
5816
5819
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5817
5820
|
style: {
|
|
5818
5821
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5819
5822
|
"backdrop-filter": "blur(2px)"
|
|
5820
5823
|
}
|
|
5821
|
-
},
|
|
5824
|
+
}, js = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ms = ["onClick"], Ns = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ps = { 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)]" }, Fs = ["placeholder", "disabled"], Is = ["disabled"], Ls = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rs = /* @__PURE__ */ B({
|
|
5822
5825
|
__name: "AiChatSidebar",
|
|
5823
5826
|
props: {
|
|
5824
5827
|
visible: { type: Boolean },
|
|
@@ -5826,7 +5829,7 @@ var ms = {
|
|
|
5826
5829
|
},
|
|
5827
5830
|
emits: ["close"],
|
|
5828
5831
|
setup(e, { emit: t }) {
|
|
5829
|
-
let n = e, r = t, i = J(or, "AiChatSidebar"), a = J(Nn, "AiChatSidebar"), o = J(tr, "AiChatSidebar"), s = v(Un, []), l =
|
|
5832
|
+
let n = e, r = t, i = J(or, "AiChatSidebar"), a = J(Nn, "AiChatSidebar"), o = J(tr, "AiChatSidebar"), s = v(Un, []), l = sa(), u = Go({
|
|
5830
5833
|
authManager: o,
|
|
5831
5834
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5832
5835
|
onApply: n.onApply,
|
|
@@ -5873,42 +5876,42 @@ var ms = {
|
|
|
5873
5876
|
"leave-from-class": "tpl:translate-x-0",
|
|
5874
5877
|
"leave-to-class": "tpl:translate-x-full"
|
|
5875
5878
|
}, {
|
|
5876
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
5877
|
-
I("div",
|
|
5879
|
+
default: b(() => [e.visible ? (f(), A("div", hs, [
|
|
5880
|
+
I("div", gs, [I("div", _s, [V(M(pi), {
|
|
5878
5881
|
size: 13,
|
|
5879
5882
|
"stroke-width": 2
|
|
5880
|
-
}), I("span", null, O(M(i).aiChat.title), 1)]), I("div",
|
|
5883
|
+
}), I("span", null, O(M(i).aiChat.title), 1)]), I("div", vs, [(M(u).messages.value?.length ?? 0) > 0 ? (f(), A("button", {
|
|
5881
5884
|
key: 0,
|
|
5882
5885
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5883
5886
|
title: M(i).aiChat.clear,
|
|
5884
5887
|
onClick: n[0] ||= (e) => M(u).clearChat()
|
|
5885
|
-
}, [V(M(
|
|
5888
|
+
}, [V(M(hi), {
|
|
5886
5889
|
size: 14,
|
|
5887
5890
|
"stroke-width": 2
|
|
5888
|
-
})], 8,
|
|
5891
|
+
})], 8, ys)) : j("", !0), I("button", {
|
|
5889
5892
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5890
5893
|
onClick: n[1] ||= (e) => r("close")
|
|
5891
|
-
}, [V(M(
|
|
5894
|
+
}, [V(M(bi), {
|
|
5892
5895
|
size: 14,
|
|
5893
5896
|
"stroke-width": 2
|
|
5894
5897
|
})])])]),
|
|
5895
|
-
I("div",
|
|
5898
|
+
I("div", bs, [
|
|
5896
5899
|
I("div", {
|
|
5897
5900
|
ref_key: "messagesContainer",
|
|
5898
5901
|
ref: p,
|
|
5899
5902
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5900
|
-
}, [M(u).isLoadingHistory.value ? (f(), A("div",
|
|
5903
|
+
}, [M(u).isLoadingHistory.value ? (f(), A("div", xs, [V(M(ti), {
|
|
5901
5904
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5902
5905
|
size: 24,
|
|
5903
5906
|
"stroke-width": 2
|
|
5904
|
-
}), I("p",
|
|
5907
|
+
}), I("p", Ss, O(M(i).aiChat.loadingHistory), 1)])) : (M(u).messages.value?.length ?? 0) === 0 ? (f(), A("div", Cs, [V(M(pi), {
|
|
5905
5908
|
size: 32,
|
|
5906
5909
|
"stroke-width": 1.5,
|
|
5907
5910
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5908
|
-
}), I("p",
|
|
5911
|
+
}), I("p", ws, O(M(i).aiChat.placeholder), 1)])) : (f(), A("div", Ts, [(f(!0), A(R, null, h(M(u).messages.value, (e, t) => (f(), A("div", {
|
|
5909
5912
|
key: e.id,
|
|
5910
5913
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5911
|
-
}, [e.role === "user" ? (f(), A("div",
|
|
5914
|
+
}, [e.role === "user" ? (f(), A("div", Es, O(e.content), 1)) : (f(), A("div", Ds, [!E(e.content) && M(u).isGenerating.value && t === (M(u).messages.value?.length ?? 0) - 1 ? (f(), P(ki, { key: 0 })) : (f(), A("div", Os, O(E(e.content) || M(i).aiChat.applied), 1)), e.id === M(u).lastApplyMessageId.value && !M(u).isGenerating.value ? (f(), A("button", {
|
|
5912
5915
|
key: 2,
|
|
5913
5916
|
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",
|
|
5914
5917
|
style: {
|
|
@@ -5917,19 +5920,19 @@ var ms = {
|
|
|
5917
5920
|
"background-color": "transparent"
|
|
5918
5921
|
},
|
|
5919
5922
|
onClick: n[2] ||= (e) => M(u).toggleLastRevert()
|
|
5920
|
-
}, [M(u).isLastChangeReverted.value ? (f(), A(R, { key: 0 }, [V(M(
|
|
5923
|
+
}, [M(u).isLastChangeReverted.value ? (f(), A(R, { key: 0 }, [V(M(oi), {
|
|
5921
5924
|
size: 12,
|
|
5922
5925
|
"stroke-width": 2
|
|
5923
|
-
}), z(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(R, { key: 1 }, [V(M(
|
|
5926
|
+
}), z(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(R, { key: 1 }, [V(M(_i), {
|
|
5924
5927
|
size: 12,
|
|
5925
5928
|
"stroke-width": 2
|
|
5926
5929
|
}), z(" " + O(M(i).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
|
|
5927
|
-
M(u).error.value ? (f(), A("div",
|
|
5930
|
+
M(u).error.value ? (f(), A("div", ks, [V(M(Vr), {
|
|
5928
5931
|
size: 14,
|
|
5929
5932
|
"stroke-width": 2,
|
|
5930
5933
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5931
5934
|
}), I("span", null, O(M(u).error.value === "ai_apply_failed" ? M(i).aiChat.applyFailed : M(i).aiChat.error), 1)])) : j("", !0),
|
|
5932
|
-
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div",
|
|
5935
|
+
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", As, [I("div", js, [(f(!0), A(R, null, h(M(u).suggestions.value ?? [], (e, t) => (f(), A("button", {
|
|
5933
5936
|
key: t,
|
|
5934
5937
|
class: ae(["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", (M(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"]),
|
|
5935
5938
|
style: {
|
|
@@ -5939,104 +5942,104 @@ var ms = {
|
|
|
5939
5942
|
"box-shadow": "var(--tpl-shadow)"
|
|
5940
5943
|
},
|
|
5941
5944
|
onClick: (t) => D(e)
|
|
5942
|
-
}, O(e), 11,
|
|
5945
|
+
}, O(e), 11, Ms))), 128))])])) : j("", !0)
|
|
5943
5946
|
]),
|
|
5944
|
-
I("div",
|
|
5947
|
+
I("div", Ns, [I("div", Ps, [c(I("textarea", {
|
|
5945
5948
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
5946
5949
|
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)]",
|
|
5947
5950
|
placeholder: M(i).aiChat.inputPlaceholder,
|
|
5948
5951
|
disabled: M(u).isGenerating.value,
|
|
5949
5952
|
rows: "3",
|
|
5950
5953
|
onKeydown: ee
|
|
5951
|
-
}, null, 40,
|
|
5954
|
+
}, null, 40, Fs), [[ie, d.value]]), I("button", {
|
|
5952
5955
|
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)]",
|
|
5953
5956
|
disabled: !d.value.trim() || M(u).isGenerating.value,
|
|
5954
5957
|
onClick: T
|
|
5955
|
-
}, [V(M(
|
|
5958
|
+
}, [V(M(li), {
|
|
5956
5959
|
size: 16,
|
|
5957
5960
|
"stroke-width": 2
|
|
5958
|
-
})], 8,
|
|
5961
|
+
})], 8, Is)]), I("p", Ls, O(M(i).aiMenu.disclaimer), 1)])
|
|
5959
5962
|
])) : j("", !0)]),
|
|
5960
5963
|
_: 1
|
|
5961
5964
|
}));
|
|
5962
5965
|
}
|
|
5963
|
-
}),
|
|
5964
|
-
function
|
|
5966
|
+
}), zs = /* @__PURE__ */ e({ default: () => Bs }), Bs = /* @__PURE__ */ Ti(Rs, [["__scopeId", "data-v-a55e4bff"]]), Vs = 6e4, Hs = 36e5, Us = 864e5;
|
|
5967
|
+
function Ws(e, t, n, r) {
|
|
5965
5968
|
let i = new Date(e).getTime();
|
|
5966
5969
|
if (Number.isNaN(i)) return null;
|
|
5967
5970
|
let a = Date.now() - i;
|
|
5968
|
-
if (a < -
|
|
5969
|
-
let o = Math.floor(a /
|
|
5971
|
+
if (a < -Vs) return null;
|
|
5972
|
+
let o = Math.floor(a / Vs), s = Math.floor(a / Hs), c = Math.floor(a / Us);
|
|
5970
5973
|
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));
|
|
5971
5974
|
}
|
|
5972
5975
|
//#endregion
|
|
5973
5976
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5974
|
-
var
|
|
5977
|
+
var Gs = {
|
|
5975
5978
|
key: 0,
|
|
5976
5979
|
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)]"
|
|
5977
|
-
},
|
|
5980
|
+
}, Ks = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, qs = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Js = {
|
|
5978
5981
|
key: 0,
|
|
5979
5982
|
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)]"
|
|
5980
|
-
},
|
|
5983
|
+
}, Ys = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Xs = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Zs = {
|
|
5981
5984
|
key: 0,
|
|
5982
5985
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
5983
|
-
},
|
|
5986
|
+
}, Qs = {
|
|
5984
5987
|
key: 1,
|
|
5985
5988
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
5986
|
-
},
|
|
5989
|
+
}, $s = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ec = {
|
|
5987
5990
|
key: 2,
|
|
5988
5991
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
5989
|
-
},
|
|
5992
|
+
}, tc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, nc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, rc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, ic = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ac = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, oc = {
|
|
5990
5993
|
key: 0,
|
|
5991
5994
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
5992
|
-
},
|
|
5995
|
+
}, sc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, cc = ["title", "onClick"], lc = ["title", "onClick"], uc = ["title", "onClick"], dc = {
|
|
5993
5996
|
key: 0,
|
|
5994
5997
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
5995
|
-
},
|
|
5998
|
+
}, fc = {
|
|
5996
5999
|
key: 0,
|
|
5997
6000
|
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)]"
|
|
5998
|
-
},
|
|
6001
|
+
}, pc = ["onClick"], mc = {
|
|
5999
6002
|
key: 2,
|
|
6000
6003
|
class: "tpl:mt-2"
|
|
6001
|
-
},
|
|
6004
|
+
}, hc = ["onKeydown"], gc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, _c = ["disabled", "onClick"], vc = {
|
|
6002
6005
|
key: 3,
|
|
6003
6006
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6004
|
-
},
|
|
6007
|
+
}, yc = {
|
|
6005
6008
|
key: 4,
|
|
6006
6009
|
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)]"
|
|
6007
|
-
},
|
|
6010
|
+
}, bc = { class: "tpl:flex-1" }, xc = ["onClick"], Sc = {
|
|
6008
6011
|
key: 5,
|
|
6009
6012
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6010
|
-
},
|
|
6013
|
+
}, Cc = ["title", "onClick"], wc = ["onClick"], Tc = {
|
|
6011
6014
|
key: 0,
|
|
6012
6015
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6013
|
-
},
|
|
6016
|
+
}, Ec = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Dc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Oc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, kc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ac = {
|
|
6014
6017
|
key: 0,
|
|
6015
6018
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6016
|
-
},
|
|
6019
|
+
}, jc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Mc = ["title", "onClick"], Nc = ["title", "onClick"], Pc = {
|
|
6017
6020
|
key: 0,
|
|
6018
6021
|
class: "tpl:mt-1.5"
|
|
6019
|
-
},
|
|
6022
|
+
}, Fc = ["onKeydown"], Ic = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Lc = ["disabled", "onClick"], Rc = {
|
|
6020
6023
|
key: 1,
|
|
6021
6024
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6022
|
-
},
|
|
6025
|
+
}, zc = {
|
|
6023
6026
|
key: 2,
|
|
6024
6027
|
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)]"
|
|
6025
|
-
},
|
|
6028
|
+
}, Bc = { class: "tpl:flex-1" }, Vc = ["onClick"], Hc = {
|
|
6026
6029
|
key: 0,
|
|
6027
6030
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6028
|
-
},
|
|
6031
|
+
}, Uc = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Wc = ["placeholder", "onKeydown"], Gc = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Kc = ["disabled", "onClick"], qc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Jc = {
|
|
6029
6032
|
key: 0,
|
|
6030
6033
|
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)]"
|
|
6031
|
-
},
|
|
6034
|
+
}, Yc = {
|
|
6032
6035
|
key: 1,
|
|
6033
6036
|
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)]"
|
|
6034
|
-
},
|
|
6037
|
+
}, Xc = ["placeholder", "disabled"], Zc = ["disabled"], Qc = /* @__PURE__ */ B({
|
|
6035
6038
|
__name: "CommentsSidebar",
|
|
6036
6039
|
props: { visible: { type: Boolean } },
|
|
6037
6040
|
emits: ["close", "filterBlock"],
|
|
6038
6041
|
setup(e, { expose: t, emit: n }) {
|
|
6039
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6042
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Fi(), s = J(Nn, "CommentsSidebar"), l = J(tr, "CommentsSidebar"), u = J(rr, "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), T = C(null), E = k(() => l.userConfig?.id ?? null), D = k(() => {
|
|
6040
6043
|
let e = /* @__PURE__ */ new Set();
|
|
6041
6044
|
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);
|
|
6042
6045
|
return e;
|
|
@@ -6104,7 +6107,7 @@ var Ws = {
|
|
|
6104
6107
|
return e.author_identifier === E.value;
|
|
6105
6108
|
}
|
|
6106
6109
|
function ve(e) {
|
|
6107
|
-
return
|
|
6110
|
+
return Ws(e, o.snapshotHistory) ?? e;
|
|
6108
6111
|
}
|
|
6109
6112
|
function ye(e) {
|
|
6110
6113
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6131,22 +6134,22 @@ var Ws = {
|
|
|
6131
6134
|
"leave-from-class": "tpl:translate-x-0",
|
|
6132
6135
|
"leave-to-class": "tpl:translate-x-full"
|
|
6133
6136
|
}, {
|
|
6134
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6135
|
-
I("div",
|
|
6136
|
-
V(M(
|
|
6137
|
+
default: b(() => [e.visible ? (f(), A("div", Gs, [
|
|
6138
|
+
I("div", Ks, [I("div", qs, [
|
|
6139
|
+
V(M(ni), {
|
|
6137
6140
|
size: 13,
|
|
6138
6141
|
"stroke-width": 2
|
|
6139
6142
|
}),
|
|
6140
6143
|
I("span", null, O(M(o).comments.title), 1),
|
|
6141
|
-
M(u).unresolvedCount.value > 0 ? (f(), A("span",
|
|
6144
|
+
M(u).unresolvedCount.value > 0 ? (f(), A("span", Js, O(M(u).unresolvedCount.value), 1)) : j("", !0)
|
|
6142
6145
|
]), I("button", {
|
|
6143
6146
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6144
6147
|
onClick: n[0] ||= (e) => i("close")
|
|
6145
|
-
}, [V(M(
|
|
6148
|
+
}, [V(M(bi), {
|
|
6146
6149
|
size: 14,
|
|
6147
6150
|
"stroke-width": 2
|
|
6148
6151
|
})])]),
|
|
6149
|
-
I("div",
|
|
6152
|
+
I("div", Ys, [
|
|
6150
6153
|
I("button", {
|
|
6151
6154
|
class: ae(["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" : ""]),
|
|
6152
6155
|
onClick: n[1] ||= (e) => N("unresolved")
|
|
@@ -6161,156 +6164,156 @@ var Ws = {
|
|
|
6161
6164
|
onClick: n[3] ||= (e) => N("block", M(s).state.selectedBlockId ?? void 0)
|
|
6162
6165
|
}, O(M(o).comments.filterBlock), 3)) : j("", !0)
|
|
6163
6166
|
]),
|
|
6164
|
-
I("div",
|
|
6167
|
+
I("div", Xs, [M(u).isLoading.value ? (f(), A("div", Zs, [V(M(ti), {
|
|
6165
6168
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6166
6169
|
size: 24,
|
|
6167
6170
|
"stroke-width": 2
|
|
6168
|
-
})])) : ne.value.length === 0 ? (f(), A("div",
|
|
6171
|
+
})])) : ne.value.length === 0 ? (f(), A("div", Qs, [V(M(ni), {
|
|
6169
6172
|
size: 32,
|
|
6170
6173
|
"stroke-width": 1.5,
|
|
6171
6174
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6172
|
-
}), I("p",
|
|
6175
|
+
}), I("p", $s, O(d.value === "all" ? M(o).comments.noCommentsHint : M(o).comments.noComments), 1)])) : (f(), A("div", ec, [(f(!0), A(R, null, h(ne.value, (e) => (f(), A("div", {
|
|
6173
6176
|
key: e.id,
|
|
6174
6177
|
class: "tpl-comment-thread"
|
|
6175
6178
|
}, [
|
|
6176
|
-
I("div",
|
|
6177
|
-
I("div",
|
|
6178
|
-
I("span",
|
|
6179
|
-
I("span",
|
|
6180
|
-
e.updated_at === e.created_at ? j("", !0) : (f(), A("span",
|
|
6181
|
-
]), I("div",
|
|
6179
|
+
I("div", tc, [
|
|
6180
|
+
I("div", nc, [I("div", rc, [
|
|
6181
|
+
I("span", ic, O(_e(e) ? M(o).comments.ownedByYou : e.author_name), 1),
|
|
6182
|
+
I("span", ac, O(ve(e.created_at)), 1),
|
|
6183
|
+
e.updated_at === e.created_at ? j("", !0) : (f(), A("span", oc, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6184
|
+
]), I("div", sc, [
|
|
6182
6185
|
I("button", {
|
|
6183
6186
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6184
6187
|
title: e.resolved_at ? M(o).comments.unresolve : M(o).comments.resolve,
|
|
6185
6188
|
onClick: (t) => ge(e.id)
|
|
6186
|
-
}, [V(M(
|
|
6189
|
+
}, [V(M(Hr), {
|
|
6187
6190
|
size: 13,
|
|
6188
6191
|
"stroke-width": 2,
|
|
6189
6192
|
class: "tpl-resolve-icon",
|
|
6190
6193
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6191
|
-
}, null, 8, ["style"])], 8,
|
|
6194
|
+
}, null, 8, ["style"])], 8, cc),
|
|
6192
6195
|
_e(e) ? (f(), A("button", {
|
|
6193
6196
|
key: 0,
|
|
6194
6197
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6195
6198
|
title: M(o).comments.edit,
|
|
6196
6199
|
onClick: (t) => le(e)
|
|
6197
|
-
}, [V(M(
|
|
6200
|
+
}, [V(M(ii), {
|
|
6198
6201
|
size: 12,
|
|
6199
6202
|
"stroke-width": 2
|
|
6200
|
-
})], 8,
|
|
6203
|
+
})], 8, lc)) : j("", !0),
|
|
6201
6204
|
_e(e) ? (f(), A("button", {
|
|
6202
6205
|
key: 1,
|
|
6203
6206
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6204
6207
|
title: M(o).comments.delete,
|
|
6205
6208
|
onClick: (t) => ue(e.id)
|
|
6206
|
-
}, [V(M(
|
|
6209
|
+
}, [V(M(hi), {
|
|
6207
6210
|
size: 12,
|
|
6208
6211
|
"stroke-width": 2
|
|
6209
|
-
})], 8,
|
|
6212
|
+
})], 8, uc)) : j("", !0)
|
|
6210
6213
|
])]),
|
|
6211
6214
|
V(re, { name: "tpl-resolve" }, {
|
|
6212
|
-
default: b(() => [e.resolved_at ? (f(), A("div",
|
|
6215
|
+
default: b(() => [e.resolved_at ? (f(), A("div", dc, [V(M(Ir), {
|
|
6213
6216
|
size: 10,
|
|
6214
6217
|
"stroke-width": 2.5
|
|
6215
6218
|
}), I("span", null, O(M(a)(M(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
|
|
6216
6219
|
_: 2
|
|
6217
6220
|
}, 1024),
|
|
6218
|
-
e.block_id && ee(e.block_id) ? (f(), A("span",
|
|
6221
|
+
e.block_id && ee(e.block_id) ? (f(), A("span", fc, O(M(o).comments.missingBlock), 1)) : e.block_id ? (f(), A("button", {
|
|
6219
6222
|
key: 1,
|
|
6220
6223
|
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)]",
|
|
6221
6224
|
onClick: (t) => M(s).selectBlock(e.block_id ?? "")
|
|
6222
|
-
}, " Block ", 8,
|
|
6223
|
-
y.value === e.id ? (f(), A("div",
|
|
6225
|
+
}, " Block ", 8, pc)) : j("", !0),
|
|
6226
|
+
y.value === e.id ? (f(), A("div", mc, [c(I("textarea", {
|
|
6224
6227
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6225
6228
|
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)]",
|
|
6226
6229
|
rows: "3",
|
|
6227
6230
|
onKeydown: (t) => xe(t, e.id)
|
|
6228
|
-
}, null, 40,
|
|
6231
|
+
}, null, 40, hc), [[ie, x.value]]), I("div", gc, [I("button", {
|
|
6229
6232
|
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)]",
|
|
6230
6233
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6231
6234
|
onClick: (t) => me(e.id)
|
|
6232
|
-
}, O(M(o).comments.save), 9,
|
|
6235
|
+
}, O(M(o).comments.save), 9, _c), I("button", {
|
|
6233
6236
|
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)]",
|
|
6234
6237
|
onClick: n[5] ||= (e) => B()
|
|
6235
|
-
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p",
|
|
6236
|
-
w.value === e.id ? (f(), A("div",
|
|
6237
|
-
I("span",
|
|
6238
|
+
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", vc, O(e.body), 1)),
|
|
6239
|
+
w.value === e.id ? (f(), A("div", yc, [
|
|
6240
|
+
I("span", bc, O(M(o).comments.deleteConfirm), 1),
|
|
6238
6241
|
I("button", {
|
|
6239
6242
|
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)]",
|
|
6240
6243
|
onClick: (t) => he(e.id)
|
|
6241
|
-
}, O(M(o).comments.delete), 9,
|
|
6244
|
+
}, O(M(o).comments.delete), 9, xc),
|
|
6242
6245
|
I("button", {
|
|
6243
6246
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6244
6247
|
onClick: n[6] ||= (e) => de()
|
|
6245
6248
|
}, O(M(o).comments.cancel), 1)
|
|
6246
6249
|
])) : j("", !0),
|
|
6247
|
-
y.value !== e.id && w.value !== e.id ? (f(), A("div",
|
|
6250
|
+
y.value !== e.id && w.value !== e.id ? (f(), A("div", Sc, [I("button", {
|
|
6248
6251
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6249
6252
|
title: M(o).comments.reply,
|
|
6250
6253
|
onClick: (t) => se(e.id)
|
|
6251
|
-
}, [V(M(
|
|
6254
|
+
}, [V(M(ci), {
|
|
6252
6255
|
size: 13,
|
|
6253
6256
|
"stroke-width": 2,
|
|
6254
6257
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6255
|
-
})], 8,
|
|
6258
|
+
})], 8, Cc), (e.replies?.length ?? 0) > 0 ? (f(), A("button", {
|
|
6256
6259
|
key: 0,
|
|
6257
6260
|
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)]",
|
|
6258
6261
|
onClick: (t) => oe(e.id)
|
|
6259
|
-
}, [S.value.has(e.id) ? (f(), P(M(
|
|
6262
|
+
}, [S.value.has(e.id) ? (f(), P(M(Br), {
|
|
6260
6263
|
key: 0,
|
|
6261
6264
|
size: 11,
|
|
6262
6265
|
"stroke-width": 2
|
|
6263
|
-
})) : (f(), P(M(
|
|
6266
|
+
})) : (f(), P(M(Lr), {
|
|
6264
6267
|
key: 1,
|
|
6265
6268
|
size: 11,
|
|
6266
6269
|
"stroke-width": 2
|
|
6267
|
-
})), z(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6270
|
+
})), z(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, wc)) : j("", !0)])) : j("", !0)
|
|
6268
6271
|
]),
|
|
6269
6272
|
V(re, { name: "tpl-replies" }, {
|
|
6270
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div",
|
|
6273
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Tc, [(f(!0), A(R, null, h(e.replies, (t, r) => (f(), A("div", {
|
|
6271
6274
|
key: t.id,
|
|
6272
6275
|
class: ae(["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" : ""])
|
|
6273
6276
|
}, [
|
|
6274
|
-
I("div",
|
|
6275
|
-
I("span",
|
|
6276
|
-
I("span",
|
|
6277
|
-
t.updated_at === t.created_at ? j("", !0) : (f(), A("span",
|
|
6278
|
-
]), I("div",
|
|
6277
|
+
I("div", Ec, [I("div", Dc, [
|
|
6278
|
+
I("span", Oc, O(_e(t) ? M(o).comments.ownedByYou : t.author_name), 1),
|
|
6279
|
+
I("span", kc, O(ve(t.created_at)), 1),
|
|
6280
|
+
t.updated_at === t.created_at ? j("", !0) : (f(), A("span", Ac, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6281
|
+
]), I("div", jc, [_e(t) ? (f(), A("button", {
|
|
6279
6282
|
key: 0,
|
|
6280
6283
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6281
6284
|
title: M(o).comments.edit,
|
|
6282
6285
|
onClick: (e) => le(t)
|
|
6283
|
-
}, [V(M(
|
|
6286
|
+
}, [V(M(ii), {
|
|
6284
6287
|
size: 11,
|
|
6285
6288
|
"stroke-width": 2
|
|
6286
|
-
})], 8,
|
|
6289
|
+
})], 8, Mc)) : j("", !0), _e(t) ? (f(), A("button", {
|
|
6287
6290
|
key: 1,
|
|
6288
6291
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6289
6292
|
title: M(o).comments.delete,
|
|
6290
6293
|
onClick: (e) => ue(t.id)
|
|
6291
|
-
}, [V(M(
|
|
6294
|
+
}, [V(M(hi), {
|
|
6292
6295
|
size: 11,
|
|
6293
6296
|
"stroke-width": 2
|
|
6294
|
-
})], 8,
|
|
6295
|
-
y.value === t.id ? (f(), A("div",
|
|
6297
|
+
})], 8, Nc)) : j("", !0)])]),
|
|
6298
|
+
y.value === t.id ? (f(), A("div", Pc, [c(I("textarea", {
|
|
6296
6299
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6297
6300
|
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)]",
|
|
6298
6301
|
rows: "2",
|
|
6299
6302
|
onKeydown: (e) => xe(e, t.id)
|
|
6300
|
-
}, null, 40,
|
|
6303
|
+
}, null, 40, Fc), [[ie, x.value]]), I("div", Ic, [I("button", {
|
|
6301
6304
|
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)]",
|
|
6302
6305
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6303
6306
|
onClick: (e) => me(t.id)
|
|
6304
|
-
}, O(M(o).comments.save), 9,
|
|
6307
|
+
}, O(M(o).comments.save), 9, Lc), I("button", {
|
|
6305
6308
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6306
6309
|
onClick: n[8] ||= (e) => B()
|
|
6307
|
-
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p",
|
|
6308
|
-
w.value === t.id ? (f(), A("div",
|
|
6309
|
-
I("span",
|
|
6310
|
+
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", Rc, O(t.body), 1)),
|
|
6311
|
+
w.value === t.id ? (f(), A("div", zc, [
|
|
6312
|
+
I("span", Bc, O(M(o).comments.deleteConfirm), 1),
|
|
6310
6313
|
I("button", {
|
|
6311
6314
|
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)]",
|
|
6312
6315
|
onClick: (e) => he(t.id)
|
|
6313
|
-
}, O(M(o).comments.delete), 9,
|
|
6316
|
+
}, O(M(o).comments.delete), 9, Vc),
|
|
6314
6317
|
I("button", {
|
|
6315
6318
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6316
6319
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6320,30 +6323,30 @@ var Ws = {
|
|
|
6320
6323
|
_: 2
|
|
6321
6324
|
}, 1024),
|
|
6322
6325
|
V(re, { name: "tpl-replies" }, {
|
|
6323
|
-
default: b(() => [_.value === e.id ? (f(), A("div",
|
|
6326
|
+
default: b(() => [_.value === e.id ? (f(), A("div", Hc, [I("div", Uc, [c(I("textarea", {
|
|
6324
6327
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6325
6328
|
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)]",
|
|
6326
6329
|
placeholder: M(o).comments.replyPlaceholder,
|
|
6327
6330
|
rows: "2",
|
|
6328
6331
|
onKeydown: (t) => be(t, e.id)
|
|
6329
|
-
}, null, 40,
|
|
6332
|
+
}, null, 40, Wc), [[ie, v.value]]), I("div", Gc, [I("button", {
|
|
6330
6333
|
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)]",
|
|
6331
6334
|
disabled: !v.value.trim() || M(u).isSubmitting.value,
|
|
6332
6335
|
onClick: (t) => pe(e.id)
|
|
6333
|
-
}, [V(M(
|
|
6336
|
+
}, [V(M(li), {
|
|
6334
6337
|
size: 14,
|
|
6335
6338
|
"stroke-width": 2
|
|
6336
|
-
})], 8,
|
|
6339
|
+
})], 8, Kc), I("button", {
|
|
6337
6340
|
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)]",
|
|
6338
6341
|
onClick: n[11] ||= (e) => ce()
|
|
6339
|
-
}, [V(M(
|
|
6342
|
+
}, [V(M(bi), {
|
|
6340
6343
|
size: 14,
|
|
6341
6344
|
"stroke-width": 2
|
|
6342
6345
|
})])])])])) : j("", !0)]),
|
|
6343
6346
|
_: 2
|
|
6344
6347
|
}, 1024)
|
|
6345
6348
|
]))), 128))]))]),
|
|
6346
|
-
I("div",
|
|
6349
|
+
I("div", qc, [te.value ? (f(), A("div", Jc, O(M(o).comments.saveTemplateFirst), 1)) : (f(), A("div", Yc, [c(I("textarea", {
|
|
6347
6350
|
ref_key: "newCommentInput",
|
|
6348
6351
|
ref: T,
|
|
6349
6352
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6352,46 +6355,46 @@ var Ws = {
|
|
|
6352
6355
|
disabled: M(u).isSubmitting.value,
|
|
6353
6356
|
rows: "2",
|
|
6354
6357
|
onKeydown: ye
|
|
6355
|
-
}, null, 40,
|
|
6358
|
+
}, null, 40, Xc), [[ie, g.value]]), I("button", {
|
|
6356
6359
|
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)]",
|
|
6357
6360
|
disabled: !g.value.trim() || M(u).isSubmitting.value,
|
|
6358
6361
|
onClick: fe
|
|
6359
|
-
}, [M(u).isSubmitting.value ? (f(), P(M(
|
|
6362
|
+
}, [M(u).isSubmitting.value ? (f(), P(M(ti), {
|
|
6360
6363
|
key: 0,
|
|
6361
6364
|
class: "tpl-spinner",
|
|
6362
6365
|
size: 16,
|
|
6363
6366
|
"stroke-width": 2
|
|
6364
|
-
})) : (f(), P(M(
|
|
6367
|
+
})) : (f(), P(M(li), {
|
|
6365
6368
|
key: 1,
|
|
6366
6369
|
size: 16,
|
|
6367
6370
|
"stroke-width": 2
|
|
6368
|
-
}))], 8,
|
|
6371
|
+
}))], 8, Zc)]))])
|
|
6369
6372
|
])) : j("", !0)]),
|
|
6370
6373
|
_: 1
|
|
6371
6374
|
}));
|
|
6372
6375
|
}
|
|
6373
|
-
}),
|
|
6376
|
+
}), $c = /* @__PURE__ */ e({ default: () => el }), el = /* @__PURE__ */ Ti(Qc, [["__scopeId", "data-v-d204f573"]]), tl = {
|
|
6374
6377
|
key: 0,
|
|
6375
6378
|
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)]"
|
|
6376
|
-
},
|
|
6379
|
+
}, nl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, rl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, il = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, al = {
|
|
6377
6380
|
key: 0,
|
|
6378
6381
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6379
|
-
},
|
|
6382
|
+
}, ol = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, sl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cl = {
|
|
6380
6383
|
key: 1,
|
|
6381
6384
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6382
|
-
},
|
|
6385
|
+
}, ll = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, ul = {
|
|
6383
6386
|
key: 0,
|
|
6384
6387
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6385
|
-
},
|
|
6388
|
+
}, dl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, fl = ["src", "alt"], pl = {
|
|
6386
6389
|
key: 1,
|
|
6387
6390
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6388
|
-
},
|
|
6391
|
+
}, ml = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, hl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, gl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, _l = ["accept"], vl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, yl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, bl = ["placeholder"], xl = {
|
|
6389
6392
|
key: 0,
|
|
6390
6393
|
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)]"
|
|
6391
|
-
},
|
|
6394
|
+
}, Sl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Cl = { class: "tpl:flex tpl:gap-2" }, wl = {
|
|
6392
6395
|
key: 1,
|
|
6393
6396
|
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)]"
|
|
6394
|
-
},
|
|
6397
|
+
}, Tl = ["disabled"], El = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Dl = /* @__PURE__ */ B({
|
|
6395
6398
|
__name: "DesignReferenceSidebar",
|
|
6396
6399
|
props: {
|
|
6397
6400
|
visible: { type: Boolean },
|
|
@@ -6399,7 +6402,7 @@ var Ws = {
|
|
|
6399
6402
|
},
|
|
6400
6403
|
emits: ["close", "apply"],
|
|
6401
6404
|
setup(e, { emit: t }) {
|
|
6402
|
-
let n = e, r = t, { t: i } =
|
|
6405
|
+
let n = e, r = t, { t: i } = Fi(), a = J(Nn, "DesignReferenceSidebar"), o = Jo({
|
|
6403
6406
|
authManager: J(tr, "DesignReferenceSidebar"),
|
|
6404
6407
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6405
6408
|
onApply: (e) => r("apply", e)
|
|
@@ -6471,17 +6474,17 @@ var Ws = {
|
|
|
6471
6474
|
"leave-from-class": "tpl:translate-x-0",
|
|
6472
6475
|
"leave-to-class": "tpl:translate-x-full"
|
|
6473
6476
|
}, {
|
|
6474
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6477
|
+
default: b(() => [e.visible ? (f(), A("div", tl, [I("div", nl, [I("div", rl, [V(M(Qr), {
|
|
6475
6478
|
size: 13,
|
|
6476
6479
|
"stroke-width": 2
|
|
6477
6480
|
}), I("span", null, O(M(i).designReference.title), 1)]), I("button", {
|
|
6478
6481
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6479
6482
|
onClick: n[0] ||= (e) => r("close")
|
|
6480
|
-
}, [V(M(
|
|
6483
|
+
}, [V(M(bi), {
|
|
6481
6484
|
size: 14,
|
|
6482
6485
|
"stroke-width": 2
|
|
6483
|
-
})])]), I("div",
|
|
6484
|
-
I("div",
|
|
6486
|
+
})])]), I("div", il, [M(o).isGenerating.value ? (f(), A("div", al, [I("div", ol, [V(ki), I("p", sl, O(M(i).designReference.generating), 1)])])) : (f(), A("div", cl, [
|
|
6487
|
+
I("div", ll, [I("button", {
|
|
6485
6488
|
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",
|
|
6486
6489
|
style: L({
|
|
6487
6490
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6489,7 +6492,7 @@ var Ws = {
|
|
|
6489
6492
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6490
6493
|
}),
|
|
6491
6494
|
onClick: n[1] ||= (e) => _("image")
|
|
6492
|
-
}, [V(M(
|
|
6495
|
+
}, [V(M(Jr), {
|
|
6493
6496
|
size: 12,
|
|
6494
6497
|
"stroke-width": 2
|
|
6495
6498
|
}), z(" " + O(M(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
@@ -6500,23 +6503,23 @@ var Ws = {
|
|
|
6500
6503
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6501
6504
|
}),
|
|
6502
6505
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6503
|
-
}, [V(M(
|
|
6506
|
+
}, [V(M(Yr), {
|
|
6504
6507
|
size: 12,
|
|
6505
6508
|
"stroke-width": 2
|
|
6506
6509
|
}), z(" " + O(M(i).designReference.uploadPdf), 1)], 4)]),
|
|
6507
|
-
I("div", null, [u.value ? (f(), A("div",
|
|
6510
|
+
I("div", null, [u.value ? (f(), A("div", ul, [I("div", dl, [p.value ? (f(), A("img", {
|
|
6508
6511
|
key: 0,
|
|
6509
6512
|
src: p.value,
|
|
6510
6513
|
alt: u.value.name,
|
|
6511
6514
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6512
|
-
}, null, 8,
|
|
6515
|
+
}, null, 8, fl)) : (f(), A("div", pl, [V(M(Yr), {
|
|
6513
6516
|
size: 32,
|
|
6514
6517
|
"stroke-width": 1.5,
|
|
6515
6518
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6516
|
-
}), I("span",
|
|
6519
|
+
}), I("span", ml, O(u.value.name), 1)])), I("button", {
|
|
6517
6520
|
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)]",
|
|
6518
6521
|
onClick: x
|
|
6519
|
-
}, [V(M(
|
|
6522
|
+
}, [V(M(bi), {
|
|
6520
6523
|
size: 12,
|
|
6521
6524
|
"stroke-width": 2
|
|
6522
6525
|
})])])])) : (f(), A("div", {
|
|
@@ -6531,13 +6534,13 @@ var Ws = {
|
|
|
6531
6534
|
onDragleave: w,
|
|
6532
6535
|
onDrop: T
|
|
6533
6536
|
}, [
|
|
6534
|
-
V(M(
|
|
6537
|
+
V(M(vi), {
|
|
6535
6538
|
size: 24,
|
|
6536
6539
|
"stroke-width": 1.5,
|
|
6537
6540
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6538
6541
|
}),
|
|
6539
|
-
I("span",
|
|
6540
|
-
I("span",
|
|
6542
|
+
I("span", hl, O(M(i).designReference.dropHint), 1),
|
|
6543
|
+
I("span", gl, O(l.value === "image" ? M(i).designReference.acceptedImages : M(i).designReference.acceptedPdf), 1)
|
|
6541
6544
|
], 36)), I("input", {
|
|
6542
6545
|
ref_key: "fileInput",
|
|
6543
6546
|
ref: s,
|
|
@@ -6545,14 +6548,14 @@ var Ws = {
|
|
|
6545
6548
|
class: "tpl:hidden",
|
|
6546
6549
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6547
6550
|
onChange: v
|
|
6548
|
-
}, null, 40,
|
|
6549
|
-
I("div",
|
|
6551
|
+
}, null, 40, _l)]),
|
|
6552
|
+
I("div", vl, [I("label", yl, O(M(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6550
6553
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6551
6554
|
class: ae(["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"]]),
|
|
6552
6555
|
placeholder: M(i).designReference.promptPlaceholder,
|
|
6553
6556
|
rows: "3"
|
|
6554
|
-
}, null, 8,
|
|
6555
|
-
m.value ? (f(), A("div",
|
|
6557
|
+
}, null, 8, bl), [[ie, d.value]])]),
|
|
6558
|
+
m.value ? (f(), A("div", xl, [I("p", Sl, O(M(i).designReference.replaceWarning), 1), I("div", Cl, [I("button", {
|
|
6556
6559
|
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)]",
|
|
6557
6560
|
style: { "background-color": "transparent" },
|
|
6558
6561
|
onClick: D
|
|
@@ -6560,7 +6563,7 @@ var Ws = {
|
|
|
6560
6563
|
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)]",
|
|
6561
6564
|
onClick: E
|
|
6562
6565
|
}, O(M(i).designReference.replaceConfirm), 1)])])) : j("", !0),
|
|
6563
|
-
M(o).error.value ? (f(), A("div",
|
|
6566
|
+
M(o).error.value ? (f(), A("div", wl, [V(M(Vr), {
|
|
6564
6567
|
size: 14,
|
|
6565
6568
|
"stroke-width": 2,
|
|
6566
6569
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6570,31 +6573,31 @@ var Ws = {
|
|
|
6570
6573
|
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)]",
|
|
6571
6574
|
disabled: !g.value,
|
|
6572
6575
|
onClick: E
|
|
6573
|
-
}, [V(M(
|
|
6576
|
+
}, [V(M(Qr), {
|
|
6574
6577
|
size: 16,
|
|
6575
6578
|
"stroke-width": 2
|
|
6576
|
-
}), z(" " + O(M(i).designReference.generate), 1)], 8,
|
|
6577
|
-
I("p",
|
|
6579
|
+
}), z(" " + O(M(i).designReference.generate), 1)], 8, Tl)),
|
|
6580
|
+
I("p", El, O(M(i).aiMenu.disclaimer), 1)
|
|
6578
6581
|
]))])])) : j("", !0)]),
|
|
6579
6582
|
_: 1
|
|
6580
6583
|
}));
|
|
6581
6584
|
}
|
|
6582
|
-
}),
|
|
6585
|
+
}), Ol = /* @__PURE__ */ e({ default: () => kl }), kl = /* @__PURE__ */ Ti(Dl, [["__scopeId", "data-v-bdbf8d0d"]]);
|
|
6583
6586
|
//#endregion
|
|
6584
6587
|
//#region src/composables/usePopoverRoot.ts
|
|
6585
|
-
function
|
|
6588
|
+
function Al() {
|
|
6586
6589
|
return v(er, C(null));
|
|
6587
6590
|
}
|
|
6588
6591
|
//#endregion
|
|
6589
6592
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6590
|
-
var
|
|
6593
|
+
var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
6591
6594
|
__name: "TplModal",
|
|
6592
6595
|
props: { visible: { type: Boolean } },
|
|
6593
6596
|
emits: ["close", "keydown"],
|
|
6594
6597
|
setup(e, { emit: t }) {
|
|
6595
6598
|
let n = e, r = t, i = C(null);
|
|
6596
|
-
|
|
6597
|
-
let a = v(zn), s =
|
|
6599
|
+
Mi(i, k(() => n.visible));
|
|
6600
|
+
let a = v(zn), s = Al();
|
|
6598
6601
|
function c(e) {
|
|
6599
6602
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
6600
6603
|
}
|
|
@@ -6623,30 +6626,30 @@ var Al = ["data-tpl-theme"], jl = /* @__PURE__ */ B({
|
|
|
6623
6626
|
}, [I("div", {
|
|
6624
6627
|
ref_key: "dialogRef",
|
|
6625
6628
|
ref: i
|
|
6626
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
6629
|
+
}, [o(t.$slots, "default")], 512)], 40, jl)) : j("", !0)]),
|
|
6627
6630
|
_: 3
|
|
6628
6631
|
})], 8, ["to"])) : j("", !0);
|
|
6629
6632
|
}
|
|
6630
|
-
}),
|
|
6633
|
+
}), Nl = ["disabled", "title"], Pl = ["title"], Fl = {
|
|
6631
6634
|
key: 0,
|
|
6632
6635
|
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)]",
|
|
6633
6636
|
style: {
|
|
6634
6637
|
"backdrop-filter": "blur(8px)",
|
|
6635
6638
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6636
6639
|
}
|
|
6637
|
-
},
|
|
6640
|
+
}, Il = { 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)]" }, Ll = {
|
|
6638
6641
|
key: 0,
|
|
6639
6642
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6640
|
-
},
|
|
6643
|
+
}, Rl = {
|
|
6641
6644
|
key: 1,
|
|
6642
6645
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6643
|
-
},
|
|
6646
|
+
}, zl = {
|
|
6644
6647
|
key: 2,
|
|
6645
6648
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6646
|
-
},
|
|
6649
|
+
}, Bl = ["disabled", "onClick"], Vl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Hl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ul = {
|
|
6647
6650
|
key: 0,
|
|
6648
6651
|
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)]"
|
|
6649
|
-
},
|
|
6652
|
+
}, Wl = ["disabled", "title"], Gl = /* @__PURE__ */ B({
|
|
6650
6653
|
__name: "SnapshotHistory",
|
|
6651
6654
|
props: {
|
|
6652
6655
|
snapshots: {},
|
|
@@ -6655,7 +6658,7 @@ var Al = ["data-tpl-theme"], jl = /* @__PURE__ */ B({
|
|
|
6655
6658
|
},
|
|
6656
6659
|
emits: ["load", "navigate"],
|
|
6657
6660
|
setup(e, { emit: t }) {
|
|
6658
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6661
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Fi(), o = C(!1), s = C(null), c = C(-1);
|
|
6659
6662
|
H(() => n.snapshots.length, () => {
|
|
6660
6663
|
c.value = -1;
|
|
6661
6664
|
});
|
|
@@ -6674,7 +6677,7 @@ var Al = ["data-tpl-theme"], jl = /* @__PURE__ */ B({
|
|
|
6674
6677
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6675
6678
|
}
|
|
6676
6679
|
function _(e) {
|
|
6677
|
-
let t =
|
|
6680
|
+
let t = Ws(e, a.snapshotHistory, i, 7);
|
|
6678
6681
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6679
6682
|
month: "short",
|
|
6680
6683
|
day: "numeric",
|
|
@@ -6694,34 +6697,34 @@ var Al = ["data-tpl-theme"], jl = /* @__PURE__ */ B({
|
|
|
6694
6697
|
disabled: !u.value,
|
|
6695
6698
|
title: M(a).snapshotHistory.olderSnapshot,
|
|
6696
6699
|
onClick: N(p, ["stop"])
|
|
6697
|
-
}, [V(M(
|
|
6700
|
+
}, [V(M(Rr), {
|
|
6698
6701
|
size: 14,
|
|
6699
6702
|
"stroke-width": 2
|
|
6700
|
-
})], 8,
|
|
6703
|
+
})], 8, Nl),
|
|
6701
6704
|
I("button", {
|
|
6702
6705
|
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)]",
|
|
6703
6706
|
title: M(a).snapshotHistory.tooltip,
|
|
6704
6707
|
onClick: N(m, ["stop"])
|
|
6705
|
-
}, [V(M(
|
|
6708
|
+
}, [V(M(Ur), {
|
|
6706
6709
|
size: 16,
|
|
6707
6710
|
"stroke-width": 1.5
|
|
6708
|
-
}), V(M(
|
|
6711
|
+
}), V(M(Lr), {
|
|
6709
6712
|
class: ae(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6710
6713
|
size: 10,
|
|
6711
6714
|
"stroke-width": 2
|
|
6712
|
-
}, null, 8, ["class"])], 8,
|
|
6715
|
+
}, null, 8, ["class"])], 8, Pl),
|
|
6713
6716
|
V(re, { name: "tpl-dropdown" }, {
|
|
6714
|
-
default: b(() => [o.value ? (f(), A("div",
|
|
6717
|
+
default: b(() => [o.value ? (f(), A("div", Fl, [I("div", Il, O(M(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), A("div", Ll, [V(M(ti), {
|
|
6715
6718
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6716
6719
|
size: 20,
|
|
6717
6720
|
"stroke-width": 2
|
|
6718
|
-
})])) : e.snapshots.length === 0 ? (f(), A("div",
|
|
6721
|
+
})])) : e.snapshots.length === 0 ? (f(), A("div", Rl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", zl, [(f(!0), A(R, null, h(e.snapshots, (t) => (f(), A("button", {
|
|
6719
6722
|
key: t.id,
|
|
6720
6723
|
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)]",
|
|
6721
6724
|
style: { "background-color": "transparent" },
|
|
6722
6725
|
disabled: e.isRestoring,
|
|
6723
6726
|
onClick: (e) => g(t.id)
|
|
6724
|
-
}, [I("div",
|
|
6727
|
+
}, [I("div", Vl, [I("div", Hl, [I("span", null, O(_(t.created_at)), 1), t.is_autosave ? (f(), A("span", Ul, O(M(a).snapshotHistory.auto), 1)) : j("", !0)])])], 8, Bl))), 128))]))])) : j("", !0)]),
|
|
6725
6728
|
_: 1
|
|
6726
6729
|
}),
|
|
6727
6730
|
I("button", {
|
|
@@ -6729,74 +6732,74 @@ var Al = ["data-tpl-theme"], jl = /* @__PURE__ */ B({
|
|
|
6729
6732
|
disabled: !l.value,
|
|
6730
6733
|
title: M(a).snapshotHistory.newerSnapshot,
|
|
6731
6734
|
onClick: N(d, ["stop"])
|
|
6732
|
-
}, [V(M(
|
|
6735
|
+
}, [V(M(zr), {
|
|
6733
6736
|
size: 14,
|
|
6734
6737
|
"stroke-width": 2
|
|
6735
|
-
})], 8,
|
|
6738
|
+
})], 8, Wl)
|
|
6736
6739
|
], 512));
|
|
6737
6740
|
}
|
|
6738
|
-
}),
|
|
6741
|
+
}), Kl = /* @__PURE__ */ e({ default: () => ql }), ql = Gl;
|
|
6739
6742
|
//#endregion
|
|
6740
6743
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6741
|
-
function
|
|
6744
|
+
function Jl(e) {
|
|
6742
6745
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6743
6746
|
}
|
|
6744
|
-
function
|
|
6747
|
+
function Yl(e) {
|
|
6745
6748
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6746
6749
|
}
|
|
6747
|
-
function
|
|
6750
|
+
function Xl(e) {
|
|
6748
6751
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6749
6752
|
}
|
|
6750
|
-
function
|
|
6753
|
+
function Zl(e) {
|
|
6751
6754
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6752
6755
|
}
|
|
6753
6756
|
//#endregion
|
|
6754
6757
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6755
|
-
var
|
|
6758
|
+
var Ql = {
|
|
6756
6759
|
key: 0,
|
|
6757
6760
|
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)]"
|
|
6758
|
-
},
|
|
6761
|
+
}, $l = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, eu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, tu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, nu = ["title"], ru = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, iu = {
|
|
6759
6762
|
key: 0,
|
|
6760
6763
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6761
|
-
},
|
|
6764
|
+
}, au = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ou = {
|
|
6762
6765
|
key: 1,
|
|
6763
6766
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6764
|
-
},
|
|
6767
|
+
}, su = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cu = {
|
|
6765
6768
|
key: 2,
|
|
6766
6769
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6767
|
-
},
|
|
6770
|
+
}, lu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, uu = {
|
|
6768
6771
|
key: 0,
|
|
6769
6772
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6770
|
-
},
|
|
6773
|
+
}, du = {
|
|
6771
6774
|
key: 0,
|
|
6772
6775
|
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)]"
|
|
6773
|
-
},
|
|
6776
|
+
}, fu = ["onClick"], pu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, mu = {
|
|
6774
6777
|
key: 0,
|
|
6775
6778
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6776
|
-
},
|
|
6779
|
+
}, hu = {
|
|
6777
6780
|
key: 0,
|
|
6778
6781
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6779
|
-
},
|
|
6782
|
+
}, gu = {
|
|
6780
6783
|
key: 0,
|
|
6781
6784
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6782
|
-
},
|
|
6785
|
+
}, _u = { class: "tpl:flex tpl:items-start tpl:gap-2" }, vu = { class: "tpl:flex-1 tpl:min-w-0" }, yu = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, bu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, xu = {
|
|
6783
6786
|
key: 0,
|
|
6784
6787
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6785
|
-
},
|
|
6788
|
+
}, Su = {
|
|
6786
6789
|
key: 1,
|
|
6787
6790
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6788
|
-
},
|
|
6791
|
+
}, Cu = ["disabled", "onClick"], wu = {
|
|
6789
6792
|
key: 0,
|
|
6790
6793
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6791
|
-
},
|
|
6794
|
+
}, Tu = {
|
|
6792
6795
|
key: 3,
|
|
6793
6796
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6794
|
-
},
|
|
6797
|
+
}, Eu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Du = { 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)]" }, Ou = /* @__PURE__ */ B({
|
|
6795
6798
|
__name: "TemplateScoringPanel",
|
|
6796
6799
|
props: { visible: { type: Boolean } },
|
|
6797
6800
|
emits: ["close"],
|
|
6798
6801
|
setup(e, { emit: t }) {
|
|
6799
|
-
let n = e, r = t, { t: i } =
|
|
6802
|
+
let n = e, r = t, { t: i } = Fi(), a = J(Nn, "TemplateScoringPanel"), o = J(ar, "TemplateScoringPanel"), s = v(Un, []), c = C({
|
|
6800
6803
|
spam: !0,
|
|
6801
6804
|
readability: !0,
|
|
6802
6805
|
accessibility: !0,
|
|
@@ -6811,10 +6814,10 @@ var Zl = {
|
|
|
6811
6814
|
"accessibility",
|
|
6812
6815
|
"bestPractices"
|
|
6813
6816
|
], p = {
|
|
6814
|
-
spam:
|
|
6815
|
-
readability:
|
|
6816
|
-
accessibility:
|
|
6817
|
-
bestPractices:
|
|
6817
|
+
spam: fi,
|
|
6818
|
+
readability: qr,
|
|
6819
|
+
accessibility: pi,
|
|
6820
|
+
bestPractices: xi
|
|
6818
6821
|
};
|
|
6819
6822
|
function m() {
|
|
6820
6823
|
o.score(a.content.value, s);
|
|
@@ -6842,50 +6845,50 @@ var Zl = {
|
|
|
6842
6845
|
"leave-from-class": "tpl:translate-x-0",
|
|
6843
6846
|
"leave-to-class": "tpl:translate-x-full"
|
|
6844
6847
|
}, {
|
|
6845
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6848
|
+
default: b(() => [e.visible ? (f(), A("div", Ql, [I("div", $l, [I("div", eu, [V(M(di), {
|
|
6846
6849
|
size: 13,
|
|
6847
6850
|
"stroke-width": 2
|
|
6848
|
-
}), I("span", null, O(M(i).scoring.title), 1)]), I("div",
|
|
6851
|
+
}), I("span", null, O(M(i).scoring.title), 1)]), I("div", tu, [M(o).scoringResult.value && !M(o).isScoring.value ? (f(), A("button", {
|
|
6849
6852
|
key: 0,
|
|
6850
6853
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6851
6854
|
title: M(i).scoring.rescore,
|
|
6852
6855
|
onClick: n[0] ||= (e) => m()
|
|
6853
|
-
}, [V(M(
|
|
6856
|
+
}, [V(M(si), {
|
|
6854
6857
|
size: 14,
|
|
6855
6858
|
"stroke-width": 2
|
|
6856
|
-
})], 8,
|
|
6859
|
+
})], 8, nu)) : j("", !0), I("button", {
|
|
6857
6860
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6858
6861
|
onClick: n[1] ||= (e) => r("close")
|
|
6859
|
-
}, [V(M(
|
|
6862
|
+
}, [V(M(bi), {
|
|
6860
6863
|
size: 14,
|
|
6861
6864
|
"stroke-width": 2
|
|
6862
|
-
})])])]), I("div",
|
|
6863
|
-
V(M(
|
|
6865
|
+
})])])]), I("div", ru, [M(o).isScoring.value ? (f(), A("div", iu, [I("p", au, O(M(i).scoring.scoring), 1), V(ki, { class: "tpl:w-3/4" })])) : M(o).error.value && !M(o).scoringResult.value ? (f(), A("div", ou, [
|
|
6866
|
+
V(M(Vr), {
|
|
6864
6867
|
size: 32,
|
|
6865
6868
|
"stroke-width": 1.5,
|
|
6866
6869
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6867
6870
|
}),
|
|
6868
|
-
I("p",
|
|
6871
|
+
I("p", su, O(M(i).scoring.error), 1),
|
|
6869
6872
|
I("button", {
|
|
6870
6873
|
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)]",
|
|
6871
6874
|
onClick: n[2] ||= (e) => m()
|
|
6872
|
-
}, [V(M(
|
|
6875
|
+
}, [V(M(si), {
|
|
6873
6876
|
size: 12,
|
|
6874
6877
|
"stroke-width": 2
|
|
6875
6878
|
}), z(" " + O(M(i).scoring.rescore), 1)])
|
|
6876
|
-
])) : M(o).scoringResult.value ? (f(), A("div",
|
|
6879
|
+
])) : M(o).scoringResult.value ? (f(), A("div", cu, [
|
|
6877
6880
|
I("div", {
|
|
6878
6881
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6879
|
-
style: L({ backgroundColor: M(
|
|
6882
|
+
style: L({ backgroundColor: M(Yl)(M(o).scoringResult.value.score) })
|
|
6880
6883
|
}, [
|
|
6881
6884
|
I("span", {
|
|
6882
6885
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6883
|
-
style: L({ color: M(
|
|
6886
|
+
style: L({ color: M(Jl)(M(o).scoringResult.value.score) })
|
|
6884
6887
|
}, O(M(o).scoringResult.value.score), 5),
|
|
6885
|
-
I("span",
|
|
6886
|
-
_() > 0 ? (f(), A("span",
|
|
6888
|
+
I("span", lu, O(M(i).scoring.overallScore), 1),
|
|
6889
|
+
_() > 0 ? (f(), A("span", uu, O(_()) + " " + O(M(i).scoring.findings), 1)) : j("", !0)
|
|
6887
6890
|
], 4),
|
|
6888
|
-
M(o).fixError.value ? (f(), A("div",
|
|
6891
|
+
M(o).fixError.value ? (f(), A("div", du, [V(M(Vr), {
|
|
6889
6892
|
size: 14,
|
|
6890
6893
|
"stroke-width": 2,
|
|
6891
6894
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6900,74 +6903,74 @@ var Zl = {
|
|
|
6900
6903
|
(f(), P(d(p[e]), {
|
|
6901
6904
|
size: 14,
|
|
6902
6905
|
"stroke-width": 2,
|
|
6903
|
-
style: L({ color: M(
|
|
6906
|
+
style: L({ color: M(Jl)(M(o).scoringResult.value.categories[e].score) })
|
|
6904
6907
|
}, null, 8, ["style"])),
|
|
6905
|
-
I("span",
|
|
6908
|
+
I("span", pu, O(M(i).scoring.categories[e]), 1),
|
|
6906
6909
|
I("span", {
|
|
6907
6910
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6908
6911
|
style: L({
|
|
6909
|
-
color: M(
|
|
6910
|
-
backgroundColor: M(
|
|
6912
|
+
color: M(Jl)(M(o).scoringResult.value.categories[e].score),
|
|
6913
|
+
backgroundColor: M(Yl)(M(o).scoringResult.value.categories[e].score)
|
|
6911
6914
|
})
|
|
6912
6915
|
}, O(M(o).scoringResult.value.categories[e].score), 5),
|
|
6913
|
-
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span",
|
|
6914
|
-
V(M(
|
|
6916
|
+
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span", mu, O(M(o).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
|
|
6917
|
+
V(M(Lr), {
|
|
6915
6918
|
size: 12,
|
|
6916
6919
|
"stroke-width": 2,
|
|
6917
6920
|
class: ae(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6918
6921
|
}, null, 8, ["class"])
|
|
6919
|
-
], 8,
|
|
6922
|
+
], 8, fu), c.value[e] ? (f(), A("div", hu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", gu, O(M(i).scoring.noFindings), 1)) : j("", !0), (f(!0), A(R, null, h(M(o).scoringResult.value.categories[e].findings, (e) => (f(), A("div", {
|
|
6920
6923
|
key: e.id,
|
|
6921
6924
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6922
|
-
}, [I("div",
|
|
6925
|
+
}, [I("div", _u, [(f(), P(d(M(e.severity === "high" ? Vr : e.severity === "medium" ? gi : ei)), {
|
|
6923
6926
|
size: 13,
|
|
6924
6927
|
"stroke-width": 2,
|
|
6925
6928
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6926
|
-
style: L({ color: M(
|
|
6927
|
-
}, null, 8, ["style"])), I("div",
|
|
6928
|
-
I("div",
|
|
6929
|
+
style: L({ color: M(Xl)(e.severity) })
|
|
6930
|
+
}, null, 8, ["style"])), I("div", vu, [
|
|
6931
|
+
I("div", yu, [I("span", {
|
|
6929
6932
|
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",
|
|
6930
6933
|
style: L({
|
|
6931
|
-
color: M(
|
|
6932
|
-
backgroundColor: M(
|
|
6934
|
+
color: M(Xl)(e.severity),
|
|
6935
|
+
backgroundColor: M(Zl)(e.severity)
|
|
6933
6936
|
})
|
|
6934
|
-
}, O(M(i).scoring.severity[e.severity]), 5), I("span",
|
|
6935
|
-
e.suggestion ? (f(), A("p",
|
|
6936
|
-
e.blockId ? (f(), A("div",
|
|
6937
|
+
}, O(M(i).scoring.severity[e.severity]), 5), I("span", bu, O(e.message), 1)]),
|
|
6938
|
+
e.suggestion ? (f(), A("p", xu, O(e.suggestion), 1)) : j("", !0),
|
|
6939
|
+
e.blockId ? (f(), A("div", Su, [I("button", {
|
|
6937
6940
|
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)]",
|
|
6938
6941
|
style: { "background-color": "transparent" },
|
|
6939
6942
|
disabled: M(o).fixingFindingId.value !== null,
|
|
6940
6943
|
onClick: (t) => g(e)
|
|
6941
|
-
}, [M(o).fixingFindingId.value === e.id ? (f(), P(M(
|
|
6944
|
+
}, [M(o).fixingFindingId.value === e.id ? (f(), P(M(ti), {
|
|
6942
6945
|
key: 0,
|
|
6943
6946
|
class: "tpl-spinner",
|
|
6944
6947
|
size: 11,
|
|
6945
6948
|
"stroke-width": 2
|
|
6946
|
-
})) : (f(), P(M(
|
|
6949
|
+
})) : (f(), P(M(pi), {
|
|
6947
6950
|
key: 1,
|
|
6948
6951
|
size: 11,
|
|
6949
6952
|
"stroke-width": 2
|
|
6950
|
-
})), z(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8,
|
|
6953
|
+
})), z(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8, Cu), M(o).fixError.value ? (f(), A("p", wu, O(M(o).fixError.value), 1)) : j("", !0)])) : j("", !0)
|
|
6951
6954
|
])])]))), 128))])) : j("", !0)])), 64))
|
|
6952
|
-
])) : (f(), A("div",
|
|
6955
|
+
])) : (f(), A("div", Tu, [V(M(di), {
|
|
6953
6956
|
size: 32,
|
|
6954
6957
|
"stroke-width": 1.5,
|
|
6955
6958
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6956
|
-
}), I("p",
|
|
6959
|
+
}), I("p", Eu, O(M(i).scoring.emptyState), 1)])), I("p", Du, O(M(i).aiMenu.disclaimer), 1)])])) : j("", !0)]),
|
|
6957
6960
|
_: 1
|
|
6958
6961
|
}));
|
|
6959
6962
|
}
|
|
6960
|
-
}),
|
|
6963
|
+
}), ku = /* @__PURE__ */ e({ default: () => Au }), Au = /* @__PURE__ */ Ti(Ou, [["__scopeId", "data-v-3a059e8d"]]), ju = ["aria-busy"], Mu = {
|
|
6961
6964
|
id: "tpl-test-email-title",
|
|
6962
6965
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
6963
|
-
},
|
|
6966
|
+
}, Nu = { class: "tpl:mb-3" }, Pu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Fu = ["value"], Iu = ["disabled"], Lu = ["value"], Ru = {
|
|
6964
6967
|
key: 0,
|
|
6965
6968
|
role: "alert",
|
|
6966
6969
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
6967
|
-
},
|
|
6970
|
+
}, zu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Bu = ["disabled"], Vu = ["disabled"], Hu = {
|
|
6968
6971
|
key: 0,
|
|
6969
6972
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6970
|
-
},
|
|
6973
|
+
}, Uu = { key: 1 }, Wu = /* @__PURE__ */ B({
|
|
6971
6974
|
__name: "TestEmailModal",
|
|
6972
6975
|
props: {
|
|
6973
6976
|
visible: { type: Boolean },
|
|
@@ -6977,7 +6980,7 @@ var Zl = {
|
|
|
6977
6980
|
},
|
|
6978
6981
|
emits: ["send", "close"],
|
|
6979
6982
|
setup(e, { emit: t }) {
|
|
6980
|
-
let n = e, r = t, { t: i } =
|
|
6983
|
+
let n = e, r = t, { t: i } = Fi(), a = C("");
|
|
6981
6984
|
H(() => n.visible, (e) => {
|
|
6982
6985
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
6983
6986
|
});
|
|
@@ -6990,7 +6993,7 @@ var Zl = {
|
|
|
6990
6993
|
function l(e) {
|
|
6991
6994
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
6992
6995
|
}
|
|
6993
|
-
return (t, n) => (f(), P(
|
|
6996
|
+
return (t, n) => (f(), P(Ml, {
|
|
6994
6997
|
visible: e.visible,
|
|
6995
6998
|
onClose: s,
|
|
6996
6999
|
onKeydown: l
|
|
@@ -7006,14 +7009,14 @@ var Zl = {
|
|
|
7006
7009
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7007
7010
|
}
|
|
7008
7011
|
}, [
|
|
7009
|
-
I("h3",
|
|
7010
|
-
I("div",
|
|
7012
|
+
I("h3", Mu, O(M(i).testEmail.title), 1),
|
|
7013
|
+
I("div", Nu, [I("label", Pu, O(M(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), A("input", {
|
|
7011
7014
|
key: 0,
|
|
7012
7015
|
type: "text",
|
|
7013
7016
|
value: a.value,
|
|
7014
7017
|
disabled: "",
|
|
7015
7018
|
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)]"
|
|
7016
|
-
}, null, 8,
|
|
7019
|
+
}, null, 8, Fu)) : c((f(), A("select", {
|
|
7017
7020
|
key: 1,
|
|
7018
7021
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7019
7022
|
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)]",
|
|
@@ -7021,29 +7024,29 @@ var Zl = {
|
|
|
7021
7024
|
}, [(f(!0), A(R, null, h(e.allowedEmails, (e) => (f(), A("option", {
|
|
7022
7025
|
key: e,
|
|
7023
7026
|
value: e
|
|
7024
|
-
}, O(e), 9,
|
|
7025
|
-
e.error ? (f(), A("p",
|
|
7026
|
-
I("div",
|
|
7027
|
+
}, O(e), 9, Lu))), 128))], 8, Iu)), [[w, a.value]])]),
|
|
7028
|
+
e.error ? (f(), A("p", Ru, O(e.error), 1)) : j("", !0),
|
|
7029
|
+
I("div", zu, [I("button", {
|
|
7027
7030
|
type: "button",
|
|
7028
7031
|
class: ae(["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 }]),
|
|
7029
7032
|
disabled: e.isSending,
|
|
7030
7033
|
onClick: s
|
|
7031
|
-
}, O(M(i).testEmail.cancel), 11,
|
|
7034
|
+
}, O(M(i).testEmail.cancel), 11, Bu), I("button", {
|
|
7032
7035
|
type: "button",
|
|
7033
7036
|
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)]",
|
|
7034
7037
|
disabled: !a.value || e.isSending,
|
|
7035
7038
|
onClick: o
|
|
7036
|
-
}, [e.isSending ? (f(), A("span",
|
|
7039
|
+
}, [e.isSending ? (f(), A("span", Hu, [V(M(ti), {
|
|
7037
7040
|
class: "tpl:animate-spin",
|
|
7038
7041
|
size: 12,
|
|
7039
7042
|
"stroke-width": 2
|
|
7040
|
-
}), z(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span",
|
|
7041
|
-
], 8,
|
|
7043
|
+
}), z(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span", Uu, O(M(i).testEmail.send), 1))], 8, Vu)])
|
|
7044
|
+
], 8, ju)]),
|
|
7042
7045
|
_: 1
|
|
7043
7046
|
}, 8, ["visible"]));
|
|
7044
7047
|
}
|
|
7045
|
-
}),
|
|
7048
|
+
}), Gu = /* @__PURE__ */ e({ default: () => Ku }), Ku = Wu;
|
|
7046
7049
|
//#endregion
|
|
7047
|
-
export {
|
|
7050
|
+
export { Ii as $, Qn as $t, Ao as A, me as An, Ir as At, Na as B, Vn as Bt, Ho as C, ve as Cn, Kr as Ct, Z as D, _e as Dn, Vr as Dt, $ as E, Ce as En, Ur as Et, $a as F, be as Fn, Y as Ft, sa as G, Hn as Gt, ja as H, or as Ht, to as I, pe as In, nr as It, $i as J, Ln as Jt, oa as K, Jn as Kt, Qa as L, de as Ln, Yn as Lt, vo as M, Se as Mn, wr as Mt, fo as N, Te as Nn, gr as Nt, jo as O, we as On, zr as Ot, co as P, he as Pn, lr as Pt, Li as Q, ar as Qt, Ja as R, fe as Rn, tr as Rt, Ko as S, W as Sn, qr as St, Ro as T, ye as Tn, Wr as Tt, Sa as U, rr as Ut, Ma as V, Xn as Vt, va as W, In as Wt, Hi as X, qn as Xt, Wi as Y, Wn as Yt, Ri as Z, ir as Zt, ns as _, ht as _n, ni as _t, Al as a, xn as an, bi as at, Yo as b, st as bn, $r as bt, zs as c, wn as cn, hi as ct, cs as d, rn as dn, di as dt, Rn as en, Pi as et, ss as f, Mt as fn, ui as ft, rs as g, yt as gn, ri as gt, is as h, _t as hn, ii as ht, Ml as i, bn as in, wi as it, Oo as j, xe as jn, X as jt, Mo as k, ge as kn, Lr as kt, ms as l, $t as ln, mi as lt, as as m, lt as mn, si as mt, ku as n, J as nn, Mi as nt, Ol as o, q as on, vi as ot, os as p, Ct as pn, li as pt, ta as q, Nn as qt, Kl as r, fn as rn, Ti as rt, $c as s, Dn as sn, gi as st, Gu as t, zn as tn, Fi as tt, ps as u, nn as un, pi as ut, ts as v, vt as vn, ti as vt, zo as w, Ee as wn, Gr as wt, qo as x, ot as xn, Qr as xt, Xo as y, ct as yn, ei as yt, Ka as z, ue as zn, Bn as zt };
|
|
7048
7051
|
|
|
7049
|
-
//# sourceMappingURL=features-
|
|
7052
|
+
//# sourceMappingURL=features-BsW4aFcn.js.map
|