@templatical/editor 0.16.4 → 0.16.5
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-BPCkrHAS.js → AiFeatureMenu-B1oEJebq.js} +1 -1
- package/dist/{CloudEditor-v8ARYaFW.js → CloudEditor-D6KNL6VU.js} +6 -6
- package/dist/{CollaboratorBar-BQzKZ2zo.js → CollaboratorBar-C_EhXQ5R.js} +1 -1
- package/dist/{ColorPicker-Cab6U2sH.js → ColorPicker-CppJgX_T.js} +57 -58
- package/dist/{CountdownToolbar-q3umZ7TZ.js → CountdownToolbar-D5GaA_lt.js} +2 -2
- package/dist/{MergeTagSuggestion-DrT3LiZ4.js → MergeTagSuggestion-jIpT_jmz.js} +7 -5
- package/dist/{ModuleBrowserModal-CzzChPmN.js → ModuleBrowserModal-CXy8Bbv9.js} +4 -4
- package/dist/{ModulePreviewCanvas-C0Q2n3FL.js → ModulePreviewCanvas-CJC9kyZN.js} +1 -1
- package/dist/{NumberWithSuffix-Bhm2ByHs.js → NumberWithSuffix-DNi-v4l1.js} +1 -1
- package/dist/{ParagraphEditor-BhsBi8p8.js → ParagraphEditor-nk5Vvr7M.js} +38 -39
- package/dist/{RichTextEditorContent-ef0fdj6e.js → RichTextEditorContent-DBaCrvH0.js} +13 -13
- package/dist/{SaveModuleDialog-BNN3dcxD.js → SaveModuleDialog-CYu5PhBz.js} +2 -2
- package/dist/{SnapshotHistory-tWvgMCe6.js → SnapshotHistory-B38ImqMO.js} +2 -2
- package/dist/{TestEmailModal-EdwEcsrD.js → TestEmailModal-DbstIzEf.js} +2 -2
- package/dist/{TitleEditor-DdvRepBq.js → TitleEditor-CmfkOHJT.js} +18 -18
- package/dist/{TplModal-Niu4Y96-.js → TplModal-BXnx3sLr.js} +4 -4
- package/dist/{blockTypeIcons-DHcYPMB8.js → blockTypeIcons-BVIEw0XJ.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js → AiFeatureMenu-CuIg4yrB.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-AoUwsqor.js.map → AiFeatureMenu-CuIg4yrB.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js → BlockIssueBadge-BHEl_Hs7.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-DZU3CfEN.js.map → BlockIssueBadge-BHEl_Hs7.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js → CloudEditor-1Ms0w691.js} +130 -130
- package/dist/cdn/chunks/{CloudEditor-BrZLF_m1.js.map → CloudEditor-1Ms0w691.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js → CollaboratorBar-C0a5P64z.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BAC56ez6.js.map → CollaboratorBar-C0a5P64z.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-DLEoT419.js → ColorPicker-bsMmT-_B.js} +144 -144
- package/dist/cdn/chunks/ColorPicker-bsMmT-_B.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js → CountdownBlock-8053oz4k.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-BOF9aTXF.js.map → CountdownBlock-8053oz4k.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js → CountdownToolbar-DQ_zrorh.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-C9bQ5k4E.js.map → CountdownToolbar-DQ_zrorh.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js → IssuesPanel-CwQ376nf.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-CHwYahKK.js.map → IssuesPanel-CwQ376nf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-jesxS7An.js → MergeTagSuggestion-rpZ6Ol-i.js} +8 -6
- package/dist/cdn/chunks/MergeTagSuggestion-rpZ6Ol-i.js.map +1 -0
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js → ModuleBrowserModal-DUegB2Jk.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-iSXXpAUk.js.map → ModuleBrowserModal-DUegB2Jk.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js → ModulePreviewCanvas-f4h8r9Lh.js} +32 -32
- package/dist/cdn/chunks/{ModulePreviewCanvas-DIy0MZj2.js.map → ModulePreviewCanvas-f4h8r9Lh.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js → NumberWithSuffix-Bu_nHJuD.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-vPdOG2lO.js.map → NumberWithSuffix-Bu_nHJuD.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-D7znI_X1.js → ParagraphEditor-IpZsg8qo.js} +75 -75
- package/dist/cdn/chunks/ParagraphEditor-IpZsg8qo.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js → RichTextEditorContent-DDnqZ9cB.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-DVwGHbO6.js.map → RichTextEditorContent-DDnqZ9cB.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js → SaveModuleDialog-CVA5HPCi.js} +20 -20
- package/dist/cdn/chunks/{SaveModuleDialog-D2_qPtE9.js.map → SaveModuleDialog-CVA5HPCi.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CKjZ6Cgp.js → TitleEditor-DU8wm0Rh.js} +9 -9
- package/dist/cdn/chunks/TitleEditor-DU8wm0Rh.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js → blockTypeIcons-Dm5Oosjp.js} +7 -7
- package/dist/cdn/chunks/{blockTypeIcons-BKecgdgr.js.map → blockTypeIcons-Dm5Oosjp.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-OZTN_skA.js → extensions-BGUoo2a5.js} +29 -29
- package/dist/cdn/chunks/{extensions-OZTN_skA.js.map → extensions-BGUoo2a5.js.map} +1 -1
- package/dist/cdn/chunks/{features-Bo7H8WNI.js → features-BSpDuFFR.js} +423 -404
- package/dist/cdn/chunks/features-BSpDuFFR.js.map +1 -0
- package/dist/cdn/chunks/{icons-BrNSrnyT.js → icons-k3XVoRvc.js} +2 -2
- package/dist/cdn/chunks/{icons-BrNSrnyT.js.map → icons-k3XVoRvc.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js → media-library-iDq3otm6.js} +451 -451
- package/dist/cdn/chunks/{media-library-Cec5DMR3.js.map → media-library-iDq3otm6.js.map} +1 -1
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js → quality-Bb7vN32U.js} +512 -512
- package/dist/cdn/chunks/{quality-Dd2iYgRf.js.map → quality-Bb7vN32U.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js → renderer-cOvtk8HM.js} +16 -16
- package/dist/cdn/chunks/{renderer-Br-qXdnQ.js.map → renderer-cOvtk8HM.js.map} +1 -1
- package/dist/cdn/chunks/{src-BH8PABpF.js → src-Ddp969zE.js} +6 -6
- package/dist/cdn/chunks/{src-BH8PABpF.js.map → src-Ddp969zE.js.map} +1 -1
- package/dist/cdn/chunks/{styles-nqo5BynI.js → styles-CW_gRVVR.js} +219 -219
- package/dist/cdn/chunks/styles-CW_gRVVR.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +46 -46
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{extensions-B2poxDIo.js → extensions-Cjd-VAII.js} +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/{styles-DN4J7w-C.js → styles-DJfTblY7.js} +97 -97
- package/dist/templatical-editor.js +4 -4
- package/dist/{useEditorCore-DBq2689h.js → useEditorCore-DnOG2a_b.js} +681 -681
- package/dist/usePopoverPosition-B3Byo68F.js +281 -0
- package/package.json +7 -7
- package/dist/cdn/chunks/ColorPicker-DLEoT419.js.map +0 -1
- package/dist/cdn/chunks/MergeTagSuggestion-jesxS7An.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-D7znI_X1.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-CKjZ6Cgp.js.map +0 -1
- package/dist/cdn/chunks/features-Bo7H8WNI.js.map +0 -1
- package/dist/cdn/chunks/styles-nqo5BynI.js.map +0 -1
- package/dist/color-DhoxCSMv.js +0 -259
- package/dist/usePopoverRoot-C1j0D7cc.js +0 -8
|
@@ -1564,7 +1564,7 @@ function Cr(e) {
|
|
|
1564
1564
|
o || l();
|
|
1565
1565
|
async function l() {
|
|
1566
1566
|
try {
|
|
1567
|
-
let t = await import("./quality-
|
|
1567
|
+
let t = await import("./quality-Bb7vN32U.js").then((e) => e.t);
|
|
1568
1568
|
if (c) return;
|
|
1569
1569
|
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = fn(e.content, u, {
|
|
1570
1570
|
debounce: e.debounce ?? 500,
|
|
@@ -3415,7 +3415,31 @@ var za = {
|
|
|
3415
3415
|
})
|
|
3416
3416
|
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", $a, [V(j(Ci), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3417
3417
|
}
|
|
3418
|
-
})
|
|
3418
|
+
});
|
|
3419
|
+
//#endregion
|
|
3420
|
+
//#region src/composables/usePopoverRoot.ts
|
|
3421
|
+
function to() {
|
|
3422
|
+
return v(pr, C(null));
|
|
3423
|
+
}
|
|
3424
|
+
//#endregion
|
|
3425
|
+
//#region src/composables/usePopoverPosition.ts
|
|
3426
|
+
function no() {
|
|
3427
|
+
let e = to();
|
|
3428
|
+
function t(t) {
|
|
3429
|
+
let n = e.value?.getBoundingClientRect();
|
|
3430
|
+
return n ? {
|
|
3431
|
+
top: t.top - n.top,
|
|
3432
|
+
left: t.left - n.left
|
|
3433
|
+
} : {
|
|
3434
|
+
top: t.top,
|
|
3435
|
+
left: t.left
|
|
3436
|
+
};
|
|
3437
|
+
}
|
|
3438
|
+
return { toLocal: t };
|
|
3439
|
+
}
|
|
3440
|
+
//#endregion
|
|
3441
|
+
//#region src/utils/sanitizeRichTextHtml.ts
|
|
3442
|
+
var ro = /* @__PURE__ */ new Set([
|
|
3419
3443
|
"http",
|
|
3420
3444
|
"https",
|
|
3421
3445
|
"mailto",
|
|
@@ -3425,7 +3449,7 @@ var za = {
|
|
|
3425
3449
|
"sms",
|
|
3426
3450
|
"xmpp",
|
|
3427
3451
|
"cid"
|
|
3428
|
-
]),
|
|
3452
|
+
]), io = /* @__PURE__ */ new Set([
|
|
3429
3453
|
"SCRIPT",
|
|
3430
3454
|
"STYLE",
|
|
3431
3455
|
"IFRAME",
|
|
@@ -3435,7 +3459,7 @@ var za = {
|
|
|
3435
3459
|
"META",
|
|
3436
3460
|
"BASE",
|
|
3437
3461
|
"FORM"
|
|
3438
|
-
]),
|
|
3462
|
+
]), ao = /* @__PURE__ */ new Set([
|
|
3439
3463
|
"href",
|
|
3440
3464
|
"xlink:href",
|
|
3441
3465
|
"formaction",
|
|
@@ -3444,16 +3468,16 @@ var za = {
|
|
|
3444
3468
|
"background",
|
|
3445
3469
|
"poster"
|
|
3446
3470
|
]);
|
|
3447
|
-
function
|
|
3471
|
+
function oo(e, t) {
|
|
3448
3472
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3449
3473
|
if (!n || n.startsWith("#")) return !0;
|
|
3450
3474
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3451
3475
|
if (!r) return !0;
|
|
3452
3476
|
let i = r[1].toLowerCase();
|
|
3453
|
-
return
|
|
3477
|
+
return ro.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3454
3478
|
}
|
|
3455
|
-
function
|
|
3456
|
-
if (
|
|
3479
|
+
function so(e) {
|
|
3480
|
+
if (io.has(e.tagName)) {
|
|
3457
3481
|
e.remove();
|
|
3458
3482
|
return;
|
|
3459
3483
|
}
|
|
@@ -3465,57 +3489,57 @@ function ao(e) {
|
|
|
3465
3489
|
e.removeAttribute(n);
|
|
3466
3490
|
continue;
|
|
3467
3491
|
}
|
|
3468
|
-
if (
|
|
3469
|
-
|
|
3492
|
+
if (ao.has(t)) {
|
|
3493
|
+
oo(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3470
3494
|
continue;
|
|
3471
3495
|
}
|
|
3472
3496
|
if (t === "src") {
|
|
3473
|
-
|
|
3497
|
+
oo(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3474
3498
|
continue;
|
|
3475
3499
|
}
|
|
3476
3500
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3477
3501
|
}
|
|
3478
3502
|
let n = Array.from(e.children);
|
|
3479
|
-
for (let e of n)
|
|
3503
|
+
for (let e of n) so(e);
|
|
3480
3504
|
}
|
|
3481
|
-
function
|
|
3505
|
+
function co(e) {
|
|
3482
3506
|
if (typeof DOMParser > "u") return e;
|
|
3483
3507
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3484
|
-
for (let e of n)
|
|
3508
|
+
for (let e of n) so(e);
|
|
3485
3509
|
return t.innerHTML;
|
|
3486
3510
|
}
|
|
3487
3511
|
//#endregion
|
|
3488
3512
|
//#region src/composables/useEditableTextBlock.ts
|
|
3489
|
-
function
|
|
3490
|
-
let t = v(Zn, []), { syntax: n } = na(), r = O(() =>
|
|
3513
|
+
function lo(e) {
|
|
3514
|
+
let t = v(Zn, []), { syntax: n } = na(), r = O(() => co(wt(bt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = kn(a), { toLocal: c } = no(), l = O(() => c({
|
|
3491
3515
|
top: o.value - 8,
|
|
3492
3516
|
left: s.value
|
|
3493
3517
|
}));
|
|
3494
|
-
function
|
|
3518
|
+
function u() {
|
|
3495
3519
|
i.value = !0;
|
|
3496
3520
|
}
|
|
3497
|
-
function
|
|
3521
|
+
function d() {
|
|
3498
3522
|
i.value = !1;
|
|
3499
3523
|
}
|
|
3500
3524
|
return {
|
|
3501
3525
|
isEditing: i,
|
|
3502
3526
|
blockRef: a,
|
|
3503
|
-
toolbarPosition:
|
|
3527
|
+
toolbarPosition: l,
|
|
3504
3528
|
resolvedContent: r,
|
|
3505
|
-
handleDoubleClick:
|
|
3506
|
-
handleEditorDone:
|
|
3529
|
+
handleDoubleClick: u,
|
|
3530
|
+
handleEditorDone: d
|
|
3507
3531
|
};
|
|
3508
3532
|
}
|
|
3509
3533
|
//#endregion
|
|
3510
3534
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3511
|
-
var
|
|
3535
|
+
var uo = ["innerHTML"], fo = /* @__PURE__ */ B({
|
|
3512
3536
|
__name: "ParagraphBlock",
|
|
3513
3537
|
props: {
|
|
3514
3538
|
block: {},
|
|
3515
3539
|
viewport: {}
|
|
3516
3540
|
},
|
|
3517
3541
|
setup(e) {
|
|
3518
|
-
let t = e, n = T(() => import("./ParagraphEditor-
|
|
3542
|
+
let t = e, n = T(() => import("./ParagraphEditor-IpZsg8qo.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = lo(() => t.block.content);
|
|
3519
3543
|
return (t, l) => (f(), k("div", {
|
|
3520
3544
|
ref_key: "blockRef",
|
|
3521
3545
|
ref: i,
|
|
@@ -3534,46 +3558,46 @@ var co = ["innerHTML"], lo = /* @__PURE__ */ B({
|
|
|
3534
3558
|
key: 1,
|
|
3535
3559
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
3536
3560
|
innerHTML: j(o)
|
|
3537
|
-
}, null, 8,
|
|
3561
|
+
}, null, 8, uo))], 544));
|
|
3538
3562
|
}
|
|
3539
3563
|
});
|
|
3540
3564
|
//#endregion
|
|
3541
3565
|
//#region src/utils/blockComponentResolver.ts
|
|
3542
|
-
function
|
|
3566
|
+
function po(e, t, n) {
|
|
3543
3567
|
if (t) {
|
|
3544
3568
|
let n = t.getComponent(e);
|
|
3545
3569
|
if (n) return n;
|
|
3546
3570
|
}
|
|
3547
3571
|
return n[e.type] ?? null;
|
|
3548
3572
|
}
|
|
3549
|
-
function
|
|
3573
|
+
function mo(e) {
|
|
3550
3574
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
3551
3575
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
3552
3576
|
backgroundColor: n || "transparent"
|
|
3553
3577
|
};
|
|
3554
3578
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
3555
3579
|
}
|
|
3556
|
-
function
|
|
3580
|
+
function ho(e) {
|
|
3557
3581
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
3558
3582
|
let t = e.wrapper, n = {};
|
|
3559
3583
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
3560
3584
|
}
|
|
3561
3585
|
//#endregion
|
|
3562
3586
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3563
|
-
var
|
|
3587
|
+
var go = ["data-block-id", "data-block-type"], _o = ["aria-label"], vo = [
|
|
3564
3588
|
"aria-label",
|
|
3565
3589
|
"aria-pressed",
|
|
3566
3590
|
"title"
|
|
3567
|
-
],
|
|
3591
|
+
], yo = ["aria-label", "title"], bo = ["aria-label", "title"], xo = ["aria-label", "title"], So = {
|
|
3568
3592
|
key: 1,
|
|
3569
3593
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
3570
|
-
},
|
|
3594
|
+
}, Co = { 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)]" }, wo = {
|
|
3571
3595
|
key: 2,
|
|
3572
3596
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3573
|
-
},
|
|
3597
|
+
}, To = ["aria-label", "title"], Eo = {
|
|
3574
3598
|
key: 3,
|
|
3575
3599
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3576
|
-
},
|
|
3600
|
+
}, Do = ["aria-label"], Oo = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
|
|
3577
3601
|
__name: "BlockWrapper",
|
|
3578
3602
|
props: {
|
|
3579
3603
|
block: {},
|
|
@@ -3583,7 +3607,7 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3583
3607
|
},
|
|
3584
3608
|
emits: ["select"],
|
|
3585
3609
|
setup(e, { emit: t }) {
|
|
3586
|
-
let n = T(() => import("./BlockIssueBadge-
|
|
3610
|
+
let n = T(() => import("./BlockIssueBadge-BHEl_Hs7.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(ur, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3587
3611
|
async function p() {
|
|
3588
3612
|
await m(), l.value?.focus();
|
|
3589
3613
|
}
|
|
@@ -3610,12 +3634,12 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3610
3634
|
desktop: a.viewport.desktop,
|
|
3611
3635
|
mobile: a.viewport.mobile
|
|
3612
3636
|
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(lr, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3613
|
-
let e =
|
|
3637
|
+
let e = mo(r.block), t = {
|
|
3614
3638
|
padding: e.padding,
|
|
3615
3639
|
backgroundColor: e.backgroundColor
|
|
3616
3640
|
};
|
|
3617
3641
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
3618
|
-
}), ne = O(() =>
|
|
3642
|
+
}), ne = O(() => ho(r.block));
|
|
3619
3643
|
function re(e) {
|
|
3620
3644
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), i("select"));
|
|
3621
3645
|
}
|
|
@@ -3661,7 +3685,7 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3661
3685
|
}, [V(j(_i), {
|
|
3662
3686
|
size: 14,
|
|
3663
3687
|
"stroke-width": 1.5
|
|
3664
|
-
})], 40,
|
|
3688
|
+
})], 40, vo),
|
|
3665
3689
|
I("button", {
|
|
3666
3690
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3667
3691
|
"aria-label": j(a).blockActions.duplicate,
|
|
@@ -3670,7 +3694,7 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3670
3694
|
}, [V(j(di), {
|
|
3671
3695
|
size: 14,
|
|
3672
3696
|
"stroke-width": 1.5
|
|
3673
|
-
})], 8,
|
|
3697
|
+
})], 8, yo),
|
|
3674
3698
|
ee.value ? (f(), k("button", {
|
|
3675
3699
|
key: 0,
|
|
3676
3700
|
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",
|
|
@@ -3680,7 +3704,7 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3680
3704
|
}, [V(j(ei), {
|
|
3681
3705
|
size: 14,
|
|
3682
3706
|
"stroke-width": 1.5
|
|
3683
|
-
})], 8,
|
|
3707
|
+
})], 8, bo)) : A("", !0),
|
|
3684
3708
|
I("button", {
|
|
3685
3709
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3686
3710
|
"aria-label": j(a).blockActions.delete,
|
|
@@ -3689,13 +3713,13 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3689
3713
|
}, [V(j(Fi), {
|
|
3690
3714
|
size: 14,
|
|
3691
3715
|
"stroke-width": 1.5
|
|
3692
|
-
})], 8,
|
|
3693
|
-
], 8,
|
|
3694
|
-
g.value ? (f(), k("div",
|
|
3716
|
+
})], 8, xo)
|
|
3717
|
+
], 8, _o)) : A("", !0),
|
|
3718
|
+
g.value ? (f(), k("div", So, [I("span", Co, [V(j(fi), {
|
|
3695
3719
|
size: 12,
|
|
3696
3720
|
"stroke-width": 1.5
|
|
3697
3721
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3698
|
-
b.value && !g.value ? (f(), k("div",
|
|
3722
|
+
b.value && !g.value ? (f(), k("div", wo, [I("button", {
|
|
3699
3723
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
3700
3724
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3701
3725
|
title: e.block.displayCondition?.label,
|
|
@@ -3703,15 +3727,15 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3703
3727
|
}, [V(j(gi), {
|
|
3704
3728
|
size: 12,
|
|
3705
3729
|
"stroke-width": 2
|
|
3706
|
-
})], 8,
|
|
3707
|
-
E.value > 0 && !g.value ? (f(), k("div",
|
|
3730
|
+
})], 8, To)])) : A("", !0),
|
|
3731
|
+
E.value > 0 && !g.value ? (f(), k("div", Eo, [I("button", {
|
|
3708
3732
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3709
3733
|
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3710
3734
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3711
3735
|
}, [V(j(Si), {
|
|
3712
3736
|
size: 12,
|
|
3713
3737
|
"stroke-width": 2.5
|
|
3714
|
-
}), z(" " + D(E.value), 1)], 8,
|
|
3738
|
+
}), z(" " + D(E.value), 1)], 8, Do)])) : A("", !0),
|
|
3715
3739
|
ne.value ? (f(), k("div", {
|
|
3716
3740
|
key: 4,
|
|
3717
3741
|
class: "tpl-section-wrapper",
|
|
@@ -3724,31 +3748,31 @@ var mo = ["data-block-id", "data-block-type"], ho = ["aria-label"], go = [
|
|
|
3724
3748
|
class: "tpl-block-content",
|
|
3725
3749
|
style: L(te.value)
|
|
3726
3750
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4))
|
|
3727
|
-
], 10,
|
|
3751
|
+
], 10, go));
|
|
3728
3752
|
}
|
|
3729
3753
|
}), [["__scopeId", "data-v-7d9e7893"]]);
|
|
3730
3754
|
//#endregion
|
|
3731
3755
|
//#region src/utils/unwrapParagraph.ts
|
|
3732
|
-
function
|
|
3756
|
+
function ko(e) {
|
|
3733
3757
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3734
3758
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3735
3759
|
}
|
|
3736
3760
|
//#endregion
|
|
3737
3761
|
//#region src/components/blocks/TitleBlock.vue
|
|
3738
|
-
var
|
|
3762
|
+
var Ao = /* @__PURE__ */ B({
|
|
3739
3763
|
__name: "TitleBlock",
|
|
3740
3764
|
props: {
|
|
3741
3765
|
block: {},
|
|
3742
3766
|
viewport: {}
|
|
3743
3767
|
},
|
|
3744
3768
|
setup(e) {
|
|
3745
|
-
let t = e, n = T(() => import("./TitleEditor-
|
|
3769
|
+
let t = e, n = T(() => import("./TitleEditor-DU8wm0Rh.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = lo(() => t.block.content), l = O(() => {
|
|
3746
3770
|
let e = {
|
|
3747
3771
|
fontSize: `${pe[t.block.level]}px`,
|
|
3748
3772
|
textAlign: t.block.textAlign
|
|
3749
3773
|
};
|
|
3750
3774
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3751
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3775
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => ko(o.value));
|
|
3752
3776
|
return (t, o) => (f(), k("div", {
|
|
3753
3777
|
ref_key: "blockRef",
|
|
3754
3778
|
ref: i,
|
|
@@ -3774,16 +3798,16 @@ var Oo = /* @__PURE__ */ B({
|
|
|
3774
3798
|
});
|
|
3775
3799
|
//#endregion
|
|
3776
3800
|
//#region src/utils/sectionColumnDrop.ts
|
|
3777
|
-
function
|
|
3801
|
+
function jo(e) {
|
|
3778
3802
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
3779
3803
|
}
|
|
3780
3804
|
//#endregion
|
|
3781
3805
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3782
|
-
var
|
|
3806
|
+
var Mo = { class: "tpl:w-full" }, No = {
|
|
3783
3807
|
key: 0,
|
|
3784
3808
|
"data-testid": "section-drop-hint",
|
|
3785
3809
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
3786
|
-
},
|
|
3810
|
+
}, Po = /* @__PURE__ */ B({
|
|
3787
3811
|
__name: "SectionBlock",
|
|
3788
3812
|
props: {
|
|
3789
3813
|
block: {},
|
|
@@ -3791,8 +3815,8 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3791
3815
|
},
|
|
3792
3816
|
setup(e) {
|
|
3793
3817
|
let t = {
|
|
3794
|
-
title:
|
|
3795
|
-
paragraph:
|
|
3818
|
+
title: Ao,
|
|
3819
|
+
paragraph: fo,
|
|
3796
3820
|
image: Xa,
|
|
3797
3821
|
button: Wr,
|
|
3798
3822
|
divider: Aa,
|
|
@@ -3823,7 +3847,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3823
3847
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3824
3848
|
}
|
|
3825
3849
|
function g(e) {
|
|
3826
|
-
return
|
|
3850
|
+
return po(e, o, t);
|
|
3827
3851
|
}
|
|
3828
3852
|
function _(e, t) {
|
|
3829
3853
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3831,7 +3855,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3831
3855
|
dataSourceFetched: t.dataSourceFetched
|
|
3832
3856
|
});
|
|
3833
3857
|
}
|
|
3834
|
-
return (t, n) => (f(), k("div",
|
|
3858
|
+
return (t, n) => (f(), k("div", Mo, [I("div", { class: F(["tpl:flex tpl:gap-0", { "tpl:flex-col": u.value }]) }, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3835
3859
|
key: n,
|
|
3836
3860
|
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", p(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3837
3861
|
style: L({ width: u.value ? "100%" : s.value[n] })
|
|
@@ -3840,7 +3864,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3840
3864
|
group: {
|
|
3841
3865
|
name: "blocks",
|
|
3842
3866
|
pull: !0,
|
|
3843
|
-
put: (e, t, n) => j(
|
|
3867
|
+
put: (e, t, n) => j(jo)(n)
|
|
3844
3868
|
},
|
|
3845
3869
|
animation: 150,
|
|
3846
3870
|
"ghost-class": "tpl-ghost",
|
|
@@ -3853,7 +3877,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3853
3877
|
class: "tpl:min-h-[60px]",
|
|
3854
3878
|
"onUpdate:modelValue": (e) => m(n, e)
|
|
3855
3879
|
}, {
|
|
3856
|
-
default: b(() => [(f(!0), k(R, null, h(p(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3880
|
+
default: b(() => [(f(!0), k(R, null, h(p(n), (t) => c((f(), k("div", { key: t.id }, [V(Oo, {
|
|
3857
3881
|
block: t,
|
|
3858
3882
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3859
3883
|
viewport: e.viewport,
|
|
@@ -3884,13 +3908,13 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3884
3908
|
"model-value",
|
|
3885
3909
|
"group",
|
|
3886
3910
|
"onUpdate:modelValue"
|
|
3887
|
-
]), p(n).length === 0 ? (f(), k("div",
|
|
3911
|
+
]), p(n).length === 0 ? (f(), k("div", No, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))], 2)]));
|
|
3888
3912
|
}
|
|
3889
|
-
}),
|
|
3913
|
+
}), Fo = me, Io = {
|
|
3890
3914
|
small: 24,
|
|
3891
3915
|
medium: 32,
|
|
3892
3916
|
large: 48
|
|
3893
|
-
},
|
|
3917
|
+
}, Lo = [
|
|
3894
3918
|
"facebook",
|
|
3895
3919
|
"twitter",
|
|
3896
3920
|
"instagram",
|
|
@@ -3908,11 +3932,11 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3908
3932
|
"github",
|
|
3909
3933
|
"dribbble",
|
|
3910
3934
|
"behance"
|
|
3911
|
-
],
|
|
3935
|
+
], Ro = [
|
|
3912
3936
|
"width",
|
|
3913
3937
|
"height",
|
|
3914
3938
|
"fill"
|
|
3915
|
-
],
|
|
3939
|
+
], zo = ["d"], Bo = /* @__PURE__ */ B({
|
|
3916
3940
|
__name: "SocialIconSvg",
|
|
3917
3941
|
props: {
|
|
3918
3942
|
platform: {},
|
|
@@ -3920,7 +3944,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3920
3944
|
iconSize: {}
|
|
3921
3945
|
},
|
|
3922
3946
|
setup(e) {
|
|
3923
|
-
let t = e, n = O(() =>
|
|
3947
|
+
let t = e, n = O(() => Fo[t.platform]), r = O(() => Io[t.iconSize]), i = O(() => {
|
|
3924
3948
|
let e = {
|
|
3925
3949
|
display: "inline-flex",
|
|
3926
3950
|
alignItems: "center",
|
|
@@ -3964,12 +3988,12 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3964
3988
|
viewBox: "0 0 24 24",
|
|
3965
3989
|
fill: o.value,
|
|
3966
3990
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3967
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3991
|
+
}, [I("path", { d: n.value.path }, null, 8, zo)], 8, Ro))], 4));
|
|
3968
3992
|
}
|
|
3969
|
-
}),
|
|
3993
|
+
}), Vo = { class: "tpl:w-full" }, Ho = ["href"], Uo = {
|
|
3970
3994
|
key: 1,
|
|
3971
3995
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3972
|
-
},
|
|
3996
|
+
}, Wo = /* @__PURE__ */ B({
|
|
3973
3997
|
__name: "SocialIconsBlock",
|
|
3974
3998
|
props: {
|
|
3975
3999
|
block: {},
|
|
@@ -3982,7 +4006,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3982
4006
|
gap: `${t.block.spacing}px`,
|
|
3983
4007
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3984
4008
|
})), i = O(() => t.block.icons.length > 0);
|
|
3985
|
-
return (t, a) => (f(), k("div",
|
|
4009
|
+
return (t, a) => (f(), k("div", Vo, [i.value ? (f(), k("div", {
|
|
3986
4010
|
key: 0,
|
|
3987
4011
|
style: L(r.value)
|
|
3988
4012
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -3990,7 +4014,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3990
4014
|
href: t.url || "#",
|
|
3991
4015
|
class: "tpl:cursor-default",
|
|
3992
4016
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3993
|
-
}, [V(
|
|
4017
|
+
}, [V(Bo, {
|
|
3994
4018
|
platform: t.platform,
|
|
3995
4019
|
"icon-style": e.block.iconStyle,
|
|
3996
4020
|
"icon-size": e.block.iconSize
|
|
@@ -3998,16 +4022,16 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
3998
4022
|
"platform",
|
|
3999
4023
|
"icon-style",
|
|
4000
4024
|
"icon-size"
|
|
4001
|
-
])], 8,
|
|
4025
|
+
])], 8, Ho))), 128))], 4)) : (f(), k("div", Uo, [V(j(Ai), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
4002
4026
|
}
|
|
4003
|
-
}),
|
|
4027
|
+
}), Go = { class: "tpl:w-full" }, Ko = {
|
|
4004
4028
|
key: 0,
|
|
4005
4029
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4006
4030
|
style: {
|
|
4007
4031
|
"background-color": "var(--tpl-bg-hover)",
|
|
4008
4032
|
color: "var(--tpl-text-dim)"
|
|
4009
4033
|
}
|
|
4010
|
-
},
|
|
4034
|
+
}, qo = /* @__PURE__ */ B({
|
|
4011
4035
|
__name: "SpacerBlock",
|
|
4012
4036
|
props: {
|
|
4013
4037
|
block: {},
|
|
@@ -4019,23 +4043,23 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4019
4043
|
minHeight: `${t.block.height}px`,
|
|
4020
4044
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4021
4045
|
}));
|
|
4022
|
-
return (t, i) => (f(), k("div",
|
|
4046
|
+
return (t, i) => (f(), k("div", Go, [I("div", {
|
|
4023
4047
|
style: L(r.value),
|
|
4024
4048
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
4025
|
-
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span",
|
|
4049
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Ko, D(e.block.height) + "px ", 1))], 6)]));
|
|
4026
4050
|
}
|
|
4027
|
-
}),
|
|
4051
|
+
}), Jo = { class: "tpl:w-full" }, Yo = { key: 0 }, Xo = [
|
|
4028
4052
|
"aria-label",
|
|
4029
4053
|
"data-placeholder",
|
|
4030
4054
|
"onBlur"
|
|
4031
|
-
],
|
|
4055
|
+
], Zo = [
|
|
4032
4056
|
"aria-label",
|
|
4033
4057
|
"data-placeholder",
|
|
4034
4058
|
"onBlur"
|
|
4035
|
-
],
|
|
4059
|
+
], Qo = {
|
|
4036
4060
|
key: 1,
|
|
4037
4061
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4038
|
-
},
|
|
4062
|
+
}, $o = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
|
|
4039
4063
|
__name: "TableBlock",
|
|
4040
4064
|
props: {
|
|
4041
4065
|
block: {},
|
|
@@ -4080,11 +4104,11 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4080
4104
|
} : n);
|
|
4081
4105
|
i.updateBlock(n.block.id, { rows: o });
|
|
4082
4106
|
}
|
|
4083
|
-
return (e, n) => (f(), k("div",
|
|
4107
|
+
return (e, n) => (f(), k("div", Jo, [a.value ? (f(), k("table", {
|
|
4084
4108
|
key: 0,
|
|
4085
4109
|
style: L(o.value),
|
|
4086
4110
|
class: "tpl-table-editable"
|
|
4087
|
-
}, [u.value ? (f(), k("thead",
|
|
4111
|
+
}, [u.value ? (f(), k("thead", Yo, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
4088
4112
|
key: e.id,
|
|
4089
4113
|
style: L(l.value),
|
|
4090
4114
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4093,7 +4117,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4093
4117
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
4094
4118
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4095
4119
|
onClick: M(p, ["stop"])
|
|
4096
|
-
}, null, 44,
|
|
4120
|
+
}, null, 44, Xo)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
|
|
4097
4121
|
key: i.id,
|
|
4098
4122
|
style: L(s.value),
|
|
4099
4123
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -4102,9 +4126,9 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4102
4126
|
onBlur: (t) => m(e.id, i.id, t),
|
|
4103
4127
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4104
4128
|
onClick: M(p, ["stop"])
|
|
4105
|
-
}, null, 44,
|
|
4129
|
+
}, null, 44, Zo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", Qo, [V(j(Pi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
4106
4130
|
}
|
|
4107
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4131
|
+
}), [["__scopeId", "data-v-963ac422"]]), es = /* @__PURE__ */ B({
|
|
4108
4132
|
__name: "VideoPlayButton",
|
|
4109
4133
|
props: { hoverEffect: {
|
|
4110
4134
|
type: Boolean,
|
|
@@ -4122,7 +4146,7 @@ var Ao = { class: "tpl:w-full" }, jo = {
|
|
|
4122
4146
|
});
|
|
4123
4147
|
//#endregion
|
|
4124
4148
|
//#region src/utils/videoThumbnail.ts
|
|
4125
|
-
function
|
|
4149
|
+
function ts(e) {
|
|
4126
4150
|
if (!e) return {
|
|
4127
4151
|
platform: "unknown",
|
|
4128
4152
|
videoId: null,
|
|
@@ -4154,25 +4178,25 @@ function $o(e) {
|
|
|
4154
4178
|
thumbnailUrl: null
|
|
4155
4179
|
};
|
|
4156
4180
|
}
|
|
4157
|
-
function
|
|
4158
|
-
return t ||
|
|
4181
|
+
function ns(e, t) {
|
|
4182
|
+
return t || ts(e).thumbnailUrl;
|
|
4159
4183
|
}
|
|
4160
4184
|
//#endregion
|
|
4161
4185
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4162
|
-
var
|
|
4186
|
+
var rs = ["src", "alt"], is = {
|
|
4163
4187
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4164
4188
|
style: { opacity: "0.7" }
|
|
4165
|
-
},
|
|
4189
|
+
}, as = ["href"], os = ["src", "alt"], ss = ["src", "alt"], cs = {
|
|
4166
4190
|
key: 3,
|
|
4167
4191
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
4168
|
-
},
|
|
4192
|
+
}, ls = /* @__PURE__ */ B({
|
|
4169
4193
|
__name: "VideoBlock",
|
|
4170
4194
|
props: {
|
|
4171
4195
|
block: {},
|
|
4172
4196
|
viewport: {}
|
|
4173
4197
|
},
|
|
4174
4198
|
setup(e) {
|
|
4175
|
-
let t = e, { t: n } = Y(), { syntax: r } = na(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null :
|
|
4199
|
+
let t = e, { t: n } = Y(), { syntax: r } = na(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : ns(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
4176
4200
|
let e = t.block.align;
|
|
4177
4201
|
return {
|
|
4178
4202
|
maxWidth: "100%",
|
|
@@ -4193,7 +4217,7 @@ var ts = ["src", "alt"], ns = {
|
|
|
4193
4217
|
class: "tpl:w-full tpl:border-0",
|
|
4194
4218
|
src: e.block.placeholderUrl,
|
|
4195
4219
|
alt: e.block.alt
|
|
4196
|
-
}, null, 8,
|
|
4220
|
+
}, null, 8, rs), V(es)], 4)) : i.value ? (f(), k("div", {
|
|
4197
4221
|
key: 1,
|
|
4198
4222
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4199
4223
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
@@ -4202,7 +4226,7 @@ var ts = ["src", "alt"], ns = {
|
|
|
4202
4226
|
"stroke-width": 1.5,
|
|
4203
4227
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4204
4228
|
style: { opacity: "0.5" }
|
|
4205
|
-
}), I("span",
|
|
4229
|
+
}), I("span", is, [V(Vr, { text: c.value }, null, 8, ["text"])])], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
4206
4230
|
key: 0,
|
|
4207
4231
|
href: e.block.url,
|
|
4208
4232
|
target: "_blank",
|
|
@@ -4214,7 +4238,7 @@ var ts = ["src", "alt"], ns = {
|
|
|
4214
4238
|
class: "tpl:w-full tpl:border-0",
|
|
4215
4239
|
src: a.value,
|
|
4216
4240
|
alt: e.block.alt
|
|
4217
|
-
}, null, 8,
|
|
4241
|
+
}, null, 8, os), V(es, { "hover-effect": "" })], 12, as)) : (f(), k("div", {
|
|
4218
4242
|
key: 1,
|
|
4219
4243
|
class: "tpl:relative tpl:inline-block",
|
|
4220
4244
|
style: L(s.value)
|
|
@@ -4222,28 +4246,28 @@ var ts = ["src", "alt"], ns = {
|
|
|
4222
4246
|
class: "tpl:w-full tpl:border-0",
|
|
4223
4247
|
src: a.value,
|
|
4224
4248
|
alt: e.block.alt
|
|
4225
|
-
}, null, 8,
|
|
4249
|
+
}, null, 8, ss), V(es)], 4))], 64)) : (f(), k("div", cs, [V(j(zi), {
|
|
4226
4250
|
size: 40,
|
|
4227
4251
|
"stroke-width": 1.5,
|
|
4228
4252
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4229
4253
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
4230
4254
|
}
|
|
4231
|
-
}),
|
|
4232
|
-
section:
|
|
4233
|
-
title:
|
|
4234
|
-
paragraph:
|
|
4255
|
+
}), us = {
|
|
4256
|
+
section: Po,
|
|
4257
|
+
title: Ao,
|
|
4258
|
+
paragraph: fo,
|
|
4235
4259
|
image: Xa,
|
|
4236
4260
|
button: Wr,
|
|
4237
4261
|
divider: Aa,
|
|
4238
|
-
video:
|
|
4239
|
-
social:
|
|
4262
|
+
video: ls,
|
|
4263
|
+
social: Wo,
|
|
4240
4264
|
menu: eo,
|
|
4241
|
-
table:
|
|
4242
|
-
spacer:
|
|
4265
|
+
table: $o,
|
|
4266
|
+
spacer: qo,
|
|
4243
4267
|
html: Fa,
|
|
4244
|
-
countdown: T(() => import("./CountdownBlock-
|
|
4268
|
+
countdown: T(() => import("./CountdownBlock-8053oz4k.js").then((e) => e.n))
|
|
4245
4269
|
};
|
|
4246
|
-
function
|
|
4270
|
+
function ds(e) {
|
|
4247
4271
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4248
4272
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4249
4273
|
let { resolvedTheme: c } = Er(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = Or({
|
|
@@ -4275,7 +4299,7 @@ function ls(e) {
|
|
|
4275
4299
|
t: a,
|
|
4276
4300
|
format: o
|
|
4277
4301
|
}), y = Mr();
|
|
4278
|
-
if (Lr(y,
|
|
4302
|
+
if (Lr(y, us), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Oa);
|
|
4279
4303
|
function b(e) {
|
|
4280
4304
|
for (let t of e) y.registerCustom(t, Oa);
|
|
4281
4305
|
}
|
|
@@ -4332,20 +4356,15 @@ function ls(e) {
|
|
|
4332
4356
|
};
|
|
4333
4357
|
}
|
|
4334
4358
|
//#endregion
|
|
4335
|
-
//#region src/composables/usePopoverRoot.ts
|
|
4336
|
-
function us() {
|
|
4337
|
-
return v(pr, C(null));
|
|
4338
|
-
}
|
|
4339
|
-
//#endregion
|
|
4340
4359
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4341
|
-
var
|
|
4360
|
+
var fs = ["data-tpl-theme"], ps = /* @__PURE__ */ B({
|
|
4342
4361
|
__name: "TplModal",
|
|
4343
4362
|
props: { visible: { type: Boolean } },
|
|
4344
4363
|
emits: ["close", "keydown"],
|
|
4345
4364
|
setup(e, { emit: t }) {
|
|
4346
4365
|
let n = e, r = t, i = C(null);
|
|
4347
4366
|
Qi(i, O(() => n.visible));
|
|
4348
|
-
let a = v(Gn), s =
|
|
4367
|
+
let a = v(Gn), s = to();
|
|
4349
4368
|
function c(e) {
|
|
4350
4369
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4351
4370
|
}
|
|
@@ -4374,11 +4393,11 @@ var ds = ["data-tpl-theme"], fs = /* @__PURE__ */ B({
|
|
|
4374
4393
|
}, [I("div", {
|
|
4375
4394
|
ref_key: "dialogRef",
|
|
4376
4395
|
ref: i
|
|
4377
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4396
|
+
}, [o(t.$slots, "default")], 512)], 40, fs)) : A("", !0)]),
|
|
4378
4397
|
_: 3
|
|
4379
4398
|
})], 8, ["to"])) : A("", !0);
|
|
4380
4399
|
}
|
|
4381
|
-
}),
|
|
4400
|
+
}), ms = class e {
|
|
4382
4401
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4383
4402
|
accessToken = null;
|
|
4384
4403
|
expiresAt = null;
|
|
@@ -4479,8 +4498,8 @@ var ds = ["data-tpl-theme"], fs = /* @__PURE__ */ B({
|
|
|
4479
4498
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4480
4499
|
}
|
|
4481
4500
|
};
|
|
4482
|
-
function
|
|
4483
|
-
return e.mode === "direct" ? new
|
|
4501
|
+
function hs(e, t) {
|
|
4502
|
+
return e.mode === "direct" ? new ms({
|
|
4484
4503
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4485
4504
|
baseUrl: e.baseUrl,
|
|
4486
4505
|
requestOptions: {
|
|
@@ -4494,7 +4513,7 @@ function ms(e, t) {
|
|
|
4494
4513
|
}
|
|
4495
4514
|
},
|
|
4496
4515
|
onError: t
|
|
4497
|
-
}) : new
|
|
4516
|
+
}) : new ms({
|
|
4498
4517
|
url: e.url,
|
|
4499
4518
|
baseUrl: e.baseUrl,
|
|
4500
4519
|
requestOptions: e.requestOptions,
|
|
@@ -4506,16 +4525,16 @@ function ms(e, t) {
|
|
|
4506
4525
|
function Z(e, t) {
|
|
4507
4526
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4508
4527
|
}
|
|
4509
|
-
var
|
|
4528
|
+
var gs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${gs}/templates/{template}`, _s = `${Q}/ai`, vs = `${gs}/media`, ys = `${vs}/folders`, bs = `${gs}/saved-modules`, $ = {
|
|
4510
4529
|
health: "/api/v1/health",
|
|
4511
|
-
"projects.config": `${
|
|
4512
|
-
"broadcasting.auth": `${
|
|
4513
|
-
"templates.store": `${
|
|
4530
|
+
"projects.config": `${gs}/config`,
|
|
4531
|
+
"broadcasting.auth": `${gs}/broadcasting/auth`,
|
|
4532
|
+
"templates.store": `${gs}/templates`,
|
|
4514
4533
|
"templates.show": `${Q}`,
|
|
4515
4534
|
"templates.update": `${Q}`,
|
|
4516
4535
|
"templates.destroy": `${Q}`,
|
|
4517
4536
|
"templates.export": `${Q}/export`,
|
|
4518
|
-
"templates.importFromBeefree": `${
|
|
4537
|
+
"templates.importFromBeefree": `${gs}/templates/import/from-beefree`,
|
|
4519
4538
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4520
4539
|
"snapshots.index": `${Q}/snapshots`,
|
|
4521
4540
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4526,31 +4545,31 @@ var hs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${hs}/templates/{te
|
|
|
4526
4545
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4527
4546
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4528
4547
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4529
|
-
"ai.generate": `${
|
|
4530
|
-
"ai.conversationMessages": `${
|
|
4531
|
-
"ai.suggestions": `${
|
|
4532
|
-
"ai.rewriteText": `${
|
|
4533
|
-
"ai.score": `${
|
|
4534
|
-
"ai.fixFinding": `${
|
|
4535
|
-
"ai.generateFromDesign": `${
|
|
4536
|
-
"media.upload": `${
|
|
4537
|
-
"media.browse": `${
|
|
4538
|
-
"media.delete": `${
|
|
4539
|
-
"media.move": `${
|
|
4540
|
-
"media.update": `${
|
|
4541
|
-
"media.replace": `${
|
|
4542
|
-
"media.checkUsage": `${
|
|
4543
|
-
"media.frequentlyUsed": `${
|
|
4544
|
-
"media.importFromUrl": `${
|
|
4545
|
-
"folders.index": `${
|
|
4546
|
-
"folders.store": `${
|
|
4547
|
-
"folders.update": `${
|
|
4548
|
-
"folders.destroy": `${
|
|
4549
|
-
"savedModules.index": `${
|
|
4550
|
-
"savedModules.store": `${
|
|
4551
|
-
"savedModules.update": `${
|
|
4552
|
-
"savedModules.destroy": `${
|
|
4553
|
-
},
|
|
4548
|
+
"ai.generate": `${_s}/generate`,
|
|
4549
|
+
"ai.conversationMessages": `${_s}/conversation-messages`,
|
|
4550
|
+
"ai.suggestions": `${_s}/suggestions`,
|
|
4551
|
+
"ai.rewriteText": `${_s}/rewrite-text`,
|
|
4552
|
+
"ai.score": `${_s}/score`,
|
|
4553
|
+
"ai.fixFinding": `${_s}/fix-finding`,
|
|
4554
|
+
"ai.generateFromDesign": `${_s}/generate-from-design`,
|
|
4555
|
+
"media.upload": `${vs}/upload`,
|
|
4556
|
+
"media.browse": `${vs}/browse`,
|
|
4557
|
+
"media.delete": `${vs}/delete`,
|
|
4558
|
+
"media.move": `${vs}/move`,
|
|
4559
|
+
"media.update": `${vs}/{media}`,
|
|
4560
|
+
"media.replace": `${vs}/{media}/replace`,
|
|
4561
|
+
"media.checkUsage": `${vs}/check-usage`,
|
|
4562
|
+
"media.frequentlyUsed": `${vs}/frequently-used`,
|
|
4563
|
+
"media.importFromUrl": `${vs}/import-from-url`,
|
|
4564
|
+
"folders.index": `${ys}`,
|
|
4565
|
+
"folders.store": `${ys}`,
|
|
4566
|
+
"folders.update": `${ys}/{mediaFolder}`,
|
|
4567
|
+
"folders.destroy": `${ys}/{mediaFolder}`,
|
|
4568
|
+
"savedModules.index": `${bs}`,
|
|
4569
|
+
"savedModules.store": `${bs}`,
|
|
4570
|
+
"savedModules.update": `${bs}/{savedModule}`,
|
|
4571
|
+
"savedModules.destroy": `${bs}/{savedModule}`
|
|
4572
|
+
}, xs = class {
|
|
4554
4573
|
authManager;
|
|
4555
4574
|
constructor(e) {
|
|
4556
4575
|
this.authManager = e;
|
|
@@ -4736,14 +4755,14 @@ var hs = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${hs}/templates/{te
|
|
|
4736
4755
|
};
|
|
4737
4756
|
//#endregion
|
|
4738
4757
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4739
|
-
function
|
|
4758
|
+
function Ss(e) {
|
|
4740
4759
|
return {
|
|
4741
4760
|
host: e.host,
|
|
4742
4761
|
port: e.port,
|
|
4743
4762
|
appKey: e.app_key
|
|
4744
4763
|
};
|
|
4745
4764
|
}
|
|
4746
|
-
var
|
|
4765
|
+
var Cs = class {
|
|
4747
4766
|
pusher = null;
|
|
4748
4767
|
authManager;
|
|
4749
4768
|
config;
|
|
@@ -4810,7 +4829,7 @@ var Ss = class {
|
|
|
4810
4829
|
};
|
|
4811
4830
|
//#endregion
|
|
4812
4831
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4813
|
-
function
|
|
4832
|
+
function ws(e, t) {
|
|
4814
4833
|
let { operation: n, data: r } = t;
|
|
4815
4834
|
switch (n) {
|
|
4816
4835
|
case "add_block":
|
|
@@ -4838,11 +4857,11 @@ function Cs(e, t) {
|
|
|
4838
4857
|
}
|
|
4839
4858
|
//#endregion
|
|
4840
4859
|
//#region ../core/src/cloud/editor.ts
|
|
4841
|
-
function
|
|
4860
|
+
function Ts(e) {
|
|
4842
4861
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4843
4862
|
}
|
|
4844
|
-
function
|
|
4845
|
-
let t = new
|
|
4863
|
+
function Es(e) {
|
|
4864
|
+
let t = new xs(e.authManager), n = S({
|
|
4846
4865
|
template: null,
|
|
4847
4866
|
content: We(e.defaultFontFamily, e.templateDefaults),
|
|
4848
4867
|
selectedBlockId: null,
|
|
@@ -4948,7 +4967,7 @@ function Ts(e) {
|
|
|
4948
4967
|
let l;
|
|
4949
4968
|
if (r) {
|
|
4950
4969
|
let e = o(n.content.blocks, r);
|
|
4951
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
4970
|
+
if (!e || e.type !== "section" || i < 0 || i >= Ts(e.columns)) return;
|
|
4952
4971
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4953
4972
|
} else l = n.content.blocks;
|
|
4954
4973
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -5040,11 +5059,11 @@ function Ts(e) {
|
|
|
5040
5059
|
}
|
|
5041
5060
|
//#endregion
|
|
5042
5061
|
//#region ../core/src/cloud/ai-chat.ts
|
|
5043
|
-
var
|
|
5044
|
-
function
|
|
5045
|
-
return `msg_${Date.now()}_${++
|
|
5062
|
+
var Ds = 0;
|
|
5063
|
+
function Os() {
|
|
5064
|
+
return `msg_${Date.now()}_${++Ds}`;
|
|
5046
5065
|
}
|
|
5047
|
-
function
|
|
5066
|
+
function ks(e) {
|
|
5048
5067
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
|
|
5049
5068
|
function _(e, t) {
|
|
5050
5069
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -5138,14 +5157,14 @@ function Os(e) {
|
|
|
5138
5157
|
let v = n();
|
|
5139
5158
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
5140
5159
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
5141
|
-
let y =
|
|
5160
|
+
let y = Os();
|
|
5142
5161
|
a.value = [...a.value, {
|
|
5143
5162
|
id: y,
|
|
5144
5163
|
role: "user",
|
|
5145
5164
|
content: e,
|
|
5146
5165
|
timestamp: Date.now()
|
|
5147
5166
|
}];
|
|
5148
|
-
let b =
|
|
5167
|
+
let b = Os();
|
|
5149
5168
|
a.value = [...a.value, {
|
|
5150
5169
|
id: b,
|
|
5151
5170
|
role: "assistant",
|
|
@@ -5236,7 +5255,7 @@ function Os(e) {
|
|
|
5236
5255
|
}
|
|
5237
5256
|
//#endregion
|
|
5238
5257
|
//#region ../core/src/cloud/ai-config.ts
|
|
5239
|
-
function
|
|
5258
|
+
function As(e) {
|
|
5240
5259
|
function t(t) {
|
|
5241
5260
|
return e !== !1 && e?.[t] !== !1;
|
|
5242
5261
|
}
|
|
@@ -5247,7 +5266,7 @@ function ks(e) {
|
|
|
5247
5266
|
}
|
|
5248
5267
|
//#endregion
|
|
5249
5268
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5250
|
-
function
|
|
5269
|
+
function js(e) {
|
|
5251
5270
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5252
5271
|
async function l(e, o) {
|
|
5253
5272
|
let s = n();
|
|
@@ -5392,7 +5411,7 @@ function As(e) {
|
|
|
5392
5411
|
}
|
|
5393
5412
|
//#endregion
|
|
5394
5413
|
//#region ../core/src/cloud/design-reference.ts
|
|
5395
|
-
function
|
|
5414
|
+
function Ms(e) {
|
|
5396
5415
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5397
5416
|
async function s(e) {
|
|
5398
5417
|
let s = n();
|
|
@@ -5455,8 +5474,8 @@ function js(e) {
|
|
|
5455
5474
|
}
|
|
5456
5475
|
//#endregion
|
|
5457
5476
|
//#region ../core/src/cloud/comments.ts
|
|
5458
|
-
function
|
|
5459
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5477
|
+
function Ns(e) {
|
|
5478
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new xs(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5460
5479
|
let e = 0;
|
|
5461
5480
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5462
5481
|
return e;
|
|
@@ -5655,17 +5674,17 @@ function Ms(e) {
|
|
|
5655
5674
|
}
|
|
5656
5675
|
//#endregion
|
|
5657
5676
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5658
|
-
function
|
|
5677
|
+
function Ps(e) {
|
|
5659
5678
|
let { comments: t, channel: n } = e;
|
|
5660
5679
|
H(n, (e, n) => {
|
|
5661
5680
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5662
|
-
|
|
5681
|
+
Fs(t, e);
|
|
5663
5682
|
});
|
|
5664
5683
|
}), l(() => {
|
|
5665
5684
|
n.value?.unbind("comment-broadcast");
|
|
5666
5685
|
});
|
|
5667
5686
|
}
|
|
5668
|
-
function
|
|
5687
|
+
function Fs(e, t) {
|
|
5669
5688
|
switch (t.action) {
|
|
5670
5689
|
case "comment_created":
|
|
5671
5690
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5684,7 +5703,7 @@ function Ps(e, t) {
|
|
|
5684
5703
|
}
|
|
5685
5704
|
//#endregion
|
|
5686
5705
|
//#region ../core/src/cloud/collaboration.ts
|
|
5687
|
-
var
|
|
5706
|
+
var Is = [
|
|
5688
5707
|
"pusher:member_added",
|
|
5689
5708
|
"pusher:member_removed",
|
|
5690
5709
|
"client-block_locked",
|
|
@@ -5692,10 +5711,10 @@ var Fs = [
|
|
|
5692
5711
|
"client-operation",
|
|
5693
5712
|
"mcp-operation"
|
|
5694
5713
|
];
|
|
5695
|
-
function
|
|
5696
|
-
for (let t of
|
|
5714
|
+
function Ls(e) {
|
|
5715
|
+
for (let t of Is) e.unbind(t);
|
|
5697
5716
|
}
|
|
5698
|
-
var
|
|
5717
|
+
var Rs = [
|
|
5699
5718
|
"#3b82f6",
|
|
5700
5719
|
"#ef4444",
|
|
5701
5720
|
"#10b981",
|
|
@@ -5707,10 +5726,10 @@ var Ls = [
|
|
|
5707
5726
|
"#6366f1",
|
|
5708
5727
|
"#14b8a6"
|
|
5709
5728
|
];
|
|
5710
|
-
function
|
|
5729
|
+
function zs(e) {
|
|
5711
5730
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5712
5731
|
function u() {
|
|
5713
|
-
let e =
|
|
5732
|
+
let e = Rs[o % Rs.length];
|
|
5714
5733
|
return o++, e;
|
|
5715
5734
|
}
|
|
5716
5735
|
function d(e) {
|
|
@@ -5752,7 +5771,7 @@ function Rs(e) {
|
|
|
5752
5771
|
function h(e) {
|
|
5753
5772
|
s = !0;
|
|
5754
5773
|
try {
|
|
5755
|
-
|
|
5774
|
+
ws(n, e);
|
|
5756
5775
|
} finally {
|
|
5757
5776
|
s = !1;
|
|
5758
5777
|
}
|
|
@@ -5772,7 +5791,7 @@ function Rs(e) {
|
|
|
5772
5791
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5773
5792
|
s || (t && v(t), e && _(e));
|
|
5774
5793
|
}), H(r, (t, n) => {
|
|
5775
|
-
if (n &&
|
|
5794
|
+
if (n && Ls(n), !t) {
|
|
5776
5795
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5777
5796
|
return;
|
|
5778
5797
|
}
|
|
@@ -5804,7 +5823,7 @@ function Rs(e) {
|
|
|
5804
5823
|
h(e);
|
|
5805
5824
|
});
|
|
5806
5825
|
}), l(() => {
|
|
5807
|
-
r.value &&
|
|
5826
|
+
r.value && Ls(r.value);
|
|
5808
5827
|
}), {
|
|
5809
5828
|
collaborators: i,
|
|
5810
5829
|
lockedBlocks: a,
|
|
@@ -5814,7 +5833,7 @@ function Rs(e) {
|
|
|
5814
5833
|
}
|
|
5815
5834
|
//#endregion
|
|
5816
5835
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5817
|
-
function
|
|
5836
|
+
function Bs(e, t) {
|
|
5818
5837
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5819
5838
|
e.addBlock = (e, r, i, a) => {
|
|
5820
5839
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5869,11 +5888,11 @@ function zs(e, t) {
|
|
|
5869
5888
|
}
|
|
5870
5889
|
//#endregion
|
|
5871
5890
|
//#region ../core/src/cloud/web-socket.ts
|
|
5872
|
-
function
|
|
5891
|
+
function Vs(e) {
|
|
5873
5892
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5874
5893
|
async function s(e, s) {
|
|
5875
5894
|
if (a) return;
|
|
5876
|
-
a = new
|
|
5895
|
+
a = new Cs({
|
|
5877
5896
|
authManager: t,
|
|
5878
5897
|
config: s,
|
|
5879
5898
|
onError: n
|
|
@@ -5901,8 +5920,8 @@ function Bs(e) {
|
|
|
5901
5920
|
}
|
|
5902
5921
|
//#endregion
|
|
5903
5922
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5904
|
-
function
|
|
5905
|
-
let t = new
|
|
5923
|
+
function Hs(e) {
|
|
5924
|
+
let t = new xs(e.authManager), n = C([]), r = C(!1);
|
|
5906
5925
|
async function i(i) {
|
|
5907
5926
|
r.value = !0;
|
|
5908
5927
|
try {
|
|
@@ -5950,8 +5969,8 @@ function Vs(e) {
|
|
|
5950
5969
|
}
|
|
5951
5970
|
//#endregion
|
|
5952
5971
|
//#region ../core/src/cloud/snapshots.ts
|
|
5953
|
-
function
|
|
5954
|
-
let t = new
|
|
5972
|
+
function Us(e) {
|
|
5973
|
+
let t = new xs(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5955
5974
|
async function a() {
|
|
5956
5975
|
r.value = !0;
|
|
5957
5976
|
try {
|
|
@@ -5983,8 +6002,8 @@ function Hs(e) {
|
|
|
5983
6002
|
}
|
|
5984
6003
|
//#endregion
|
|
5985
6004
|
//#region ../core/src/cloud/test-email.ts
|
|
5986
|
-
function
|
|
5987
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
6005
|
+
function Ws(e) {
|
|
6006
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new xs(t), l = C(!1), u = C(null), d = C(null);
|
|
5988
6007
|
o && H(o, (e) => {
|
|
5989
6008
|
e && (d.value = t.testEmailConfig);
|
|
5990
6009
|
}, { immediate: !0 });
|
|
@@ -6020,8 +6039,8 @@ function Us(e) {
|
|
|
6020
6039
|
}
|
|
6021
6040
|
//#endregion
|
|
6022
6041
|
//#region ../core/src/cloud/export.ts
|
|
6023
|
-
function
|
|
6024
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
6042
|
+
function Gs(e) {
|
|
6043
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new xs(t);
|
|
6025
6044
|
function a() {
|
|
6026
6045
|
let e = n?.();
|
|
6027
6046
|
return {
|
|
@@ -6047,8 +6066,8 @@ function Ws(e) {
|
|
|
6047
6066
|
}
|
|
6048
6067
|
//#endregion
|
|
6049
6068
|
//#region ../core/src/cloud/plan-config.ts
|
|
6050
|
-
function
|
|
6051
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
6069
|
+
function Ks(e) {
|
|
6070
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new xs(t), o = O(() => r.value?.features ?? null);
|
|
6052
6071
|
function s(e) {
|
|
6053
6072
|
return r.value?.features[e] ?? !1;
|
|
6054
6073
|
}
|
|
@@ -6074,11 +6093,11 @@ function Gs(e) {
|
|
|
6074
6093
|
}
|
|
6075
6094
|
//#endregion
|
|
6076
6095
|
//#region ../core/src/cloud/health-check.ts
|
|
6077
|
-
var
|
|
6078
|
-
function
|
|
6096
|
+
var qs = 5e3;
|
|
6097
|
+
function Js(e) {
|
|
6079
6098
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
6080
6099
|
}
|
|
6081
|
-
async function
|
|
6100
|
+
async function Ys(e, t) {
|
|
6082
6101
|
let n = performance.now();
|
|
6083
6102
|
try {
|
|
6084
6103
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -6130,7 +6149,7 @@ async function Js(e, t) {
|
|
|
6130
6149
|
};
|
|
6131
6150
|
}
|
|
6132
6151
|
}
|
|
6133
|
-
async function
|
|
6152
|
+
async function Xs(e) {
|
|
6134
6153
|
if (!e?.host || !e?.app_key) return {
|
|
6135
6154
|
ok: !1,
|
|
6136
6155
|
error: "WebSocket configuration not available"
|
|
@@ -6146,7 +6165,7 @@ async function Ys(e) {
|
|
|
6146
6165
|
ok: !1,
|
|
6147
6166
|
error: "WebSocket connection timed out"
|
|
6148
6167
|
});
|
|
6149
|
-
},
|
|
6168
|
+
}, qs);
|
|
6150
6169
|
try {
|
|
6151
6170
|
n = new WebSocket(t);
|
|
6152
6171
|
} catch (t) {
|
|
@@ -6166,8 +6185,8 @@ async function Ys(e) {
|
|
|
6166
6185
|
};
|
|
6167
6186
|
});
|
|
6168
6187
|
}
|
|
6169
|
-
async function
|
|
6170
|
-
let t = await Js(
|
|
6188
|
+
async function Zs(e = {}) {
|
|
6189
|
+
let t = await Ys(Js(e), e.authManager), n = await Xs(t.wsConfig);
|
|
6171
6190
|
return {
|
|
6172
6191
|
api: t.api,
|
|
6173
6192
|
websocket: n,
|
|
@@ -6177,29 +6196,29 @@ async function Xs(e = {}) {
|
|
|
6177
6196
|
}
|
|
6178
6197
|
//#endregion
|
|
6179
6198
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
6180
|
-
function
|
|
6199
|
+
function Qs(e) {
|
|
6181
6200
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
6182
6201
|
H(n, (e, n) => {
|
|
6183
6202
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
6184
|
-
|
|
6203
|
+
ws(t, e), r?.(e);
|
|
6185
6204
|
});
|
|
6186
6205
|
});
|
|
6187
6206
|
}
|
|
6188
6207
|
//#endregion
|
|
6189
6208
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6190
|
-
var
|
|
6209
|
+
var $s = {
|
|
6191
6210
|
key: 0,
|
|
6192
6211
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6193
|
-
},
|
|
6212
|
+
}, ec = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, tc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, nc = { class: "tpl:flex tpl:items-center tpl:gap-1" }, rc = ["title"], ic = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, ac = {
|
|
6194
6213
|
key: 0,
|
|
6195
6214
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6196
|
-
},
|
|
6215
|
+
}, oc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, sc = {
|
|
6197
6216
|
key: 1,
|
|
6198
6217
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6199
|
-
},
|
|
6218
|
+
}, cc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, lc = {
|
|
6200
6219
|
key: 2,
|
|
6201
6220
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6202
|
-
},
|
|
6221
|
+
}, uc = {
|
|
6203
6222
|
key: 0,
|
|
6204
6223
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
6205
6224
|
style: {
|
|
@@ -6208,10 +6227,10 @@ var Qs = {
|
|
|
6208
6227
|
"max-width": "85%",
|
|
6209
6228
|
"box-shadow": "var(--tpl-shadow)"
|
|
6210
6229
|
}
|
|
6211
|
-
},
|
|
6230
|
+
}, dc = {
|
|
6212
6231
|
key: 1,
|
|
6213
6232
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6214
|
-
},
|
|
6233
|
+
}, fc = {
|
|
6215
6234
|
key: 1,
|
|
6216
6235
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
6217
6236
|
style: {
|
|
@@ -6220,21 +6239,21 @@ var Qs = {
|
|
|
6220
6239
|
color: "var(--tpl-text)",
|
|
6221
6240
|
"box-shadow": "var(--tpl-shadow)"
|
|
6222
6241
|
}
|
|
6223
|
-
},
|
|
6242
|
+
}, pc = {
|
|
6224
6243
|
key: 0,
|
|
6225
6244
|
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
6226
6245
|
style: {
|
|
6227
6246
|
"background-color": "var(--tpl-danger-light)",
|
|
6228
6247
|
color: "var(--tpl-danger)"
|
|
6229
6248
|
}
|
|
6230
|
-
},
|
|
6249
|
+
}, mc = {
|
|
6231
6250
|
key: 1,
|
|
6232
6251
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
6233
6252
|
style: {
|
|
6234
6253
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6235
6254
|
"backdrop-filter": "blur(2px)"
|
|
6236
6255
|
}
|
|
6237
|
-
},
|
|
6256
|
+
}, hc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, gc = ["onClick"], _c = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, vc = { 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)]" }, yc = ["placeholder", "disabled"], bc = ["disabled"], xc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Sc = /*@__PURE__*/ B({
|
|
6238
6257
|
__name: "AiChatSidebar",
|
|
6239
6258
|
props: {
|
|
6240
6259
|
visible: { type: Boolean },
|
|
@@ -6242,7 +6261,7 @@ var Qs = {
|
|
|
6242
6261
|
},
|
|
6243
6262
|
emits: ["close"],
|
|
6244
6263
|
setup(e, { emit: t }) {
|
|
6245
|
-
let n = e, r = t, i = J(yr, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(mr, "AiChatSidebar"), s = v(Zn, []), l = Ia(), u =
|
|
6264
|
+
let n = e, r = t, i = J(yr, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(mr, "AiChatSidebar"), s = v(Zn, []), l = Ia(), u = ks({
|
|
6246
6265
|
authManager: o,
|
|
6247
6266
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6248
6267
|
onApply: n.onApply,
|
|
@@ -6289,11 +6308,11 @@ var Qs = {
|
|
|
6289
6308
|
"leave-from-class": "tpl:translate-x-0",
|
|
6290
6309
|
"leave-to-class": "tpl:translate-x-full"
|
|
6291
6310
|
}, {
|
|
6292
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6293
|
-
I("div",
|
|
6311
|
+
default: b(() => [e.visible ? (f(), k("div", $s, [
|
|
6312
|
+
I("div", ec, [I("div", tc, [V(j(Ni), {
|
|
6294
6313
|
size: 13,
|
|
6295
6314
|
"stroke-width": 2
|
|
6296
|
-
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div",
|
|
6315
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", nc, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6297
6316
|
key: 0,
|
|
6298
6317
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6299
6318
|
title: j(i).aiChat.clear,
|
|
@@ -6301,30 +6320,30 @@ var Qs = {
|
|
|
6301
6320
|
}, [V(j(Fi), {
|
|
6302
6321
|
size: 14,
|
|
6303
6322
|
"stroke-width": 2
|
|
6304
|
-
})], 8,
|
|
6323
|
+
})], 8, rc)) : A("", !0), I("button", {
|
|
6305
6324
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6306
6325
|
onClick: n[1] ||= (e) => r("close")
|
|
6307
6326
|
}, [V(j(Bi), {
|
|
6308
6327
|
size: 14,
|
|
6309
6328
|
"stroke-width": 2
|
|
6310
6329
|
})])])]),
|
|
6311
|
-
I("div",
|
|
6330
|
+
I("div", ic, [
|
|
6312
6331
|
I("div", {
|
|
6313
6332
|
ref_key: "messagesContainer",
|
|
6314
6333
|
ref: p,
|
|
6315
6334
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6316
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6335
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", ac, [V(j(xi), {
|
|
6317
6336
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6318
6337
|
size: 24,
|
|
6319
6338
|
"stroke-width": 2
|
|
6320
|
-
}), I("p",
|
|
6339
|
+
}), I("p", oc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", sc, [V(j(Ni), {
|
|
6321
6340
|
size: 32,
|
|
6322
6341
|
"stroke-width": 1.5,
|
|
6323
6342
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6324
|
-
}), I("p",
|
|
6343
|
+
}), I("p", cc, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", lc, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6325
6344
|
key: e.id,
|
|
6326
6345
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6327
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
6346
|
+
}, [e.role === "user" ? (f(), k("div", uc, D(e.content), 1)) : (f(), k("div", dc, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Yi, { key: 0 })) : (f(), k("div", fc, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6328
6347
|
key: 2,
|
|
6329
6348
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6330
6349
|
style: {
|
|
@@ -6340,12 +6359,12 @@ var Qs = {
|
|
|
6340
6359
|
size: 12,
|
|
6341
6360
|
"stroke-width": 2
|
|
6342
6361
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6343
|
-
j(u).error.value ? (f(), k("div",
|
|
6362
|
+
j(u).error.value ? (f(), k("div", pc, [V(j(si), {
|
|
6344
6363
|
size: 14,
|
|
6345
6364
|
"stroke-width": 2,
|
|
6346
6365
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6347
6366
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6348
|
-
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div",
|
|
6367
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", mc, [I("div", hc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6349
6368
|
key: t,
|
|
6350
6369
|
class: F(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (j(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
6351
6370
|
style: {
|
|
@@ -6355,99 +6374,99 @@ var Qs = {
|
|
|
6355
6374
|
"box-shadow": "var(--tpl-shadow)"
|
|
6356
6375
|
},
|
|
6357
6376
|
onClick: (t) => E(e)
|
|
6358
|
-
}, D(e), 11,
|
|
6377
|
+
}, D(e), 11, gc))), 128))])])) : A("", !0)
|
|
6359
6378
|
]),
|
|
6360
|
-
I("div",
|
|
6379
|
+
I("div", _c, [I("div", vc, [c(I("textarea", {
|
|
6361
6380
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6362
6381
|
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
6363
6382
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6364
6383
|
disabled: j(u).isGenerating.value,
|
|
6365
6384
|
rows: "3",
|
|
6366
6385
|
onKeydown: te
|
|
6367
|
-
}, null, 40,
|
|
6386
|
+
}, null, 40, yc), [[ae, d.value]]), I("button", {
|
|
6368
6387
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6369
6388
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6370
6389
|
onClick: ee
|
|
6371
6390
|
}, [V(j(ki), {
|
|
6372
6391
|
size: 16,
|
|
6373
6392
|
"stroke-width": 2
|
|
6374
|
-
})], 8,
|
|
6393
|
+
})], 8, bc)]), I("p", xc, D(j(i).aiMenu.disclaimer), 1)])
|
|
6375
6394
|
])) : A("", !0)]),
|
|
6376
6395
|
_: 1
|
|
6377
6396
|
}));
|
|
6378
6397
|
}
|
|
6379
|
-
}),
|
|
6380
|
-
function
|
|
6398
|
+
}), Cc = /* @__PURE__ */ e({ default: () => wc }), wc = /*#__PURE__*/ Gi(Sc, [["__scopeId", "data-v-a55e4bff"]]), Tc = 6e4, Ec = 36e5, Dc = 864e5;
|
|
6399
|
+
function Oc(e, t, n, r) {
|
|
6381
6400
|
let i = new Date(e).getTime();
|
|
6382
6401
|
if (Number.isNaN(i)) return null;
|
|
6383
6402
|
let a = Date.now() - i;
|
|
6384
6403
|
if (a < -6e4) return null;
|
|
6385
|
-
let o = Math.floor(a /
|
|
6404
|
+
let o = Math.floor(a / Tc), s = Math.floor(a / Ec), c = Math.floor(a / Dc);
|
|
6386
6405
|
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
6387
6406
|
}
|
|
6388
6407
|
//#endregion
|
|
6389
6408
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6390
|
-
var
|
|
6409
|
+
var kc = {
|
|
6391
6410
|
key: 0,
|
|
6392
6411
|
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6393
|
-
},
|
|
6412
|
+
}, Ac = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, jc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Mc = {
|
|
6394
6413
|
key: 0,
|
|
6395
6414
|
class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
6396
|
-
},
|
|
6415
|
+
}, Nc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Pc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Fc = {
|
|
6397
6416
|
key: 0,
|
|
6398
6417
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6399
|
-
},
|
|
6418
|
+
}, Ic = {
|
|
6400
6419
|
key: 1,
|
|
6401
6420
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6402
|
-
},
|
|
6421
|
+
}, Lc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Rc = {
|
|
6403
6422
|
key: 2,
|
|
6404
6423
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6405
|
-
},
|
|
6424
|
+
}, zc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Bc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Vc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Hc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Uc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Wc = {
|
|
6406
6425
|
key: 0,
|
|
6407
6426
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6408
|
-
},
|
|
6427
|
+
}, Gc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Kc = ["title", "onClick"], qc = ["title", "onClick"], Jc = ["title", "onClick"], Yc = {
|
|
6409
6428
|
key: 0,
|
|
6410
6429
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6411
|
-
},
|
|
6430
|
+
}, Xc = {
|
|
6412
6431
|
key: 0,
|
|
6413
6432
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6414
|
-
},
|
|
6433
|
+
}, Zc = ["onClick"], Qc = {
|
|
6415
6434
|
key: 2,
|
|
6416
6435
|
class: "tpl:mt-2"
|
|
6417
|
-
},
|
|
6436
|
+
}, $c = ["onKeydown"], el = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, tl = ["disabled", "onClick"], nl = {
|
|
6418
6437
|
key: 3,
|
|
6419
6438
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6420
|
-
},
|
|
6439
|
+
}, rl = {
|
|
6421
6440
|
key: 4,
|
|
6422
6441
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6423
|
-
},
|
|
6442
|
+
}, il = { class: "tpl:flex-1" }, al = ["onClick"], ol = {
|
|
6424
6443
|
key: 5,
|
|
6425
6444
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6426
|
-
},
|
|
6445
|
+
}, sl = ["title", "onClick"], cl = ["onClick"], ll = {
|
|
6427
6446
|
key: 0,
|
|
6428
6447
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6429
|
-
},
|
|
6448
|
+
}, ul = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, dl = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, fl = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, pl = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, ml = {
|
|
6430
6449
|
key: 0,
|
|
6431
6450
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6432
|
-
},
|
|
6451
|
+
}, hl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, gl = ["title", "onClick"], _l = ["title", "onClick"], vl = {
|
|
6433
6452
|
key: 0,
|
|
6434
6453
|
class: "tpl:mt-1.5"
|
|
6435
|
-
},
|
|
6454
|
+
}, yl = ["onKeydown"], bl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, xl = ["disabled", "onClick"], Sl = {
|
|
6436
6455
|
key: 1,
|
|
6437
6456
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6438
|
-
},
|
|
6457
|
+
}, Cl = {
|
|
6439
6458
|
key: 2,
|
|
6440
6459
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6441
|
-
},
|
|
6460
|
+
}, wl = { class: "tpl:flex-1" }, Tl = ["onClick"], El = {
|
|
6442
6461
|
key: 0,
|
|
6443
6462
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6444
|
-
},
|
|
6463
|
+
}, Dl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Ol = ["placeholder", "onKeydown"], kl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Al = ["disabled", "onClick"], jl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ml = {
|
|
6445
6464
|
key: 0,
|
|
6446
6465
|
class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6447
|
-
},
|
|
6466
|
+
}, Nl = {
|
|
6448
6467
|
key: 1,
|
|
6449
6468
|
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
|
|
6450
|
-
},
|
|
6469
|
+
}, Pl = ["placeholder", "disabled"], Fl = ["disabled"], Il = /*@__PURE__*/ B({
|
|
6451
6470
|
__name: "CommentsSidebar",
|
|
6452
6471
|
props: { visible: { type: Boolean } },
|
|
6453
6472
|
emits: ["close", "filterBlock"],
|
|
@@ -6520,7 +6539,7 @@ var Oc = {
|
|
|
6520
6539
|
return e.author_identifier === T.value;
|
|
6521
6540
|
}
|
|
6522
6541
|
function ve(e) {
|
|
6523
|
-
return
|
|
6542
|
+
return Oc(e, o.snapshotHistory) ?? e;
|
|
6524
6543
|
}
|
|
6525
6544
|
function ye(e) {
|
|
6526
6545
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6547,14 +6566,14 @@ var Oc = {
|
|
|
6547
6566
|
"leave-from-class": "tpl:translate-x-0",
|
|
6548
6567
|
"leave-to-class": "tpl:translate-x-full"
|
|
6549
6568
|
}, {
|
|
6550
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6551
|
-
I("div",
|
|
6569
|
+
default: b(() => [e.visible ? (f(), k("div", kc, [
|
|
6570
|
+
I("div", Ac, [I("div", jc, [
|
|
6552
6571
|
V(j(Si), {
|
|
6553
6572
|
size: 13,
|
|
6554
6573
|
"stroke-width": 2
|
|
6555
6574
|
}),
|
|
6556
6575
|
I("span", null, D(j(o).comments.title), 1),
|
|
6557
|
-
j(u).unresolvedCount.value > 0 ? (f(), k("span",
|
|
6576
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", Mc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6558
6577
|
]), I("button", {
|
|
6559
6578
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6560
6579
|
onClick: n[0] ||= (e) => i("close")
|
|
@@ -6562,7 +6581,7 @@ var Oc = {
|
|
|
6562
6581
|
size: 14,
|
|
6563
6582
|
"stroke-width": 2
|
|
6564
6583
|
})])]),
|
|
6565
|
-
I("div",
|
|
6584
|
+
I("div", Nc, [
|
|
6566
6585
|
I("button", {
|
|
6567
6586
|
class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
6568
6587
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6577,24 +6596,24 @@ var Oc = {
|
|
|
6577
6596
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6578
6597
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6579
6598
|
]),
|
|
6580
|
-
I("div",
|
|
6599
|
+
I("div", Pc, [j(u).isLoading.value ? (f(), k("div", Fc, [V(j(xi), {
|
|
6581
6600
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6582
6601
|
size: 24,
|
|
6583
6602
|
"stroke-width": 2
|
|
6584
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6603
|
+
})])) : re.value.length === 0 ? (f(), k("div", Ic, [V(j(Si), {
|
|
6585
6604
|
size: 32,
|
|
6586
6605
|
"stroke-width": 1.5,
|
|
6587
6606
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6588
|
-
}), I("p",
|
|
6607
|
+
}), I("p", Lc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", Rc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6589
6608
|
key: e.id,
|
|
6590
6609
|
class: "tpl-comment-thread"
|
|
6591
6610
|
}, [
|
|
6592
|
-
I("div",
|
|
6593
|
-
I("div",
|
|
6594
|
-
I("span",
|
|
6595
|
-
I("span",
|
|
6596
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6597
|
-
]), I("div",
|
|
6611
|
+
I("div", zc, [
|
|
6612
|
+
I("div", Bc, [I("div", Vc, [
|
|
6613
|
+
I("span", Hc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6614
|
+
I("span", Uc, D(ve(e.created_at)), 1),
|
|
6615
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", Wc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6616
|
+
]), I("div", Gc, [
|
|
6598
6617
|
I("button", {
|
|
6599
6618
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6600
6619
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
@@ -6604,7 +6623,7 @@ var Oc = {
|
|
|
6604
6623
|
"stroke-width": 2,
|
|
6605
6624
|
class: "tpl-resolve-icon",
|
|
6606
6625
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6607
|
-
}, null, 8, ["style"])], 8,
|
|
6626
|
+
}, null, 8, ["style"])], 8, Kc),
|
|
6608
6627
|
_e(e) ? (f(), k("button", {
|
|
6609
6628
|
key: 0,
|
|
6610
6629
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
@@ -6613,7 +6632,7 @@ var Oc = {
|
|
|
6613
6632
|
}, [V(j(wi), {
|
|
6614
6633
|
size: 12,
|
|
6615
6634
|
"stroke-width": 2
|
|
6616
|
-
})], 8,
|
|
6635
|
+
})], 8, qc)) : A("", !0),
|
|
6617
6636
|
_e(e) ? (f(), k("button", {
|
|
6618
6637
|
key: 1,
|
|
6619
6638
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
@@ -6622,45 +6641,45 @@ var Oc = {
|
|
|
6622
6641
|
}, [V(j(Fi), {
|
|
6623
6642
|
size: 12,
|
|
6624
6643
|
"stroke-width": 2
|
|
6625
|
-
})], 8,
|
|
6644
|
+
})], 8, Jc)) : A("", !0)
|
|
6626
6645
|
])]),
|
|
6627
6646
|
V(ie, { name: "tpl-resolve" }, {
|
|
6628
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6647
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Yc, [V(j(ni), {
|
|
6629
6648
|
size: 10,
|
|
6630
6649
|
"stroke-width": 2.5
|
|
6631
6650
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6632
6651
|
_: 2
|
|
6633
6652
|
}, 1024),
|
|
6634
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6653
|
+
e.block_id && te(e.block_id) ? (f(), k("span", Xc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6635
6654
|
key: 1,
|
|
6636
6655
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6637
6656
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6638
|
-
}, " Block ", 8,
|
|
6639
|
-
y.value === e.id ? (f(), k("div",
|
|
6657
|
+
}, " Block ", 8, Zc)) : A("", !0),
|
|
6658
|
+
y.value === e.id ? (f(), k("div", Qc, [c(I("textarea", {
|
|
6640
6659
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6641
6660
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6642
6661
|
rows: "3",
|
|
6643
6662
|
onKeydown: (t) => xe(t, e.id)
|
|
6644
|
-
}, null, 40,
|
|
6663
|
+
}, null, 40, $c), [[ae, x.value]]), I("div", el, [I("button", {
|
|
6645
6664
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6646
6665
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6647
6666
|
onClick: (t) => me(e.id)
|
|
6648
|
-
}, D(j(o).comments.save), 9,
|
|
6667
|
+
}, D(j(o).comments.save), 9, tl), I("button", {
|
|
6649
6668
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6650
6669
|
onClick: n[5] ||= (e) => B()
|
|
6651
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6652
|
-
w.value === e.id ? (f(), k("div",
|
|
6653
|
-
I("span",
|
|
6670
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", nl, D(e.body), 1)),
|
|
6671
|
+
w.value === e.id ? (f(), k("div", rl, [
|
|
6672
|
+
I("span", il, D(j(o).comments.deleteConfirm), 1),
|
|
6654
6673
|
I("button", {
|
|
6655
6674
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6656
6675
|
onClick: (t) => he(e.id)
|
|
6657
|
-
}, D(j(o).comments.delete), 9,
|
|
6676
|
+
}, D(j(o).comments.delete), 9, al),
|
|
6658
6677
|
I("button", {
|
|
6659
6678
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6660
6679
|
onClick: n[6] ||= (e) => de()
|
|
6661
6680
|
}, D(j(o).comments.cancel), 1)
|
|
6662
6681
|
])) : A("", !0),
|
|
6663
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6682
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", ol, [I("button", {
|
|
6664
6683
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6665
6684
|
title: j(o).comments.reply,
|
|
6666
6685
|
onClick: (t) => se(e.id)
|
|
@@ -6668,7 +6687,7 @@ var Oc = {
|
|
|
6668
6687
|
size: 13,
|
|
6669
6688
|
"stroke-width": 2,
|
|
6670
6689
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6671
|
-
})], 8,
|
|
6690
|
+
})], 8, sl), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6672
6691
|
key: 0,
|
|
6673
6692
|
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6674
6693
|
onClick: (t) => oe(e.id)
|
|
@@ -6680,18 +6699,18 @@ var Oc = {
|
|
|
6680
6699
|
key: 1,
|
|
6681
6700
|
size: 11,
|
|
6682
6701
|
"stroke-width": 2
|
|
6683
|
-
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6702
|
+
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, cl)) : A("", !0)])) : A("", !0)
|
|
6684
6703
|
]),
|
|
6685
6704
|
V(ie, { name: "tpl-replies" }, {
|
|
6686
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6705
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", ll, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6687
6706
|
key: t.id,
|
|
6688
6707
|
class: F(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
6689
6708
|
}, [
|
|
6690
|
-
I("div",
|
|
6691
|
-
I("span",
|
|
6692
|
-
I("span",
|
|
6693
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6694
|
-
]), I("div",
|
|
6709
|
+
I("div", ul, [I("div", dl, [
|
|
6710
|
+
I("span", fl, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6711
|
+
I("span", pl, D(ve(t.created_at)), 1),
|
|
6712
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", ml, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6713
|
+
]), I("div", hl, [_e(t) ? (f(), k("button", {
|
|
6695
6714
|
key: 0,
|
|
6696
6715
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6697
6716
|
title: j(o).comments.edit,
|
|
@@ -6699,7 +6718,7 @@ var Oc = {
|
|
|
6699
6718
|
}, [V(j(wi), {
|
|
6700
6719
|
size: 11,
|
|
6701
6720
|
"stroke-width": 2
|
|
6702
|
-
})], 8,
|
|
6721
|
+
})], 8, gl)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6703
6722
|
key: 1,
|
|
6704
6723
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6705
6724
|
title: j(o).comments.delete,
|
|
@@ -6707,26 +6726,26 @@ var Oc = {
|
|
|
6707
6726
|
}, [V(j(Fi), {
|
|
6708
6727
|
size: 11,
|
|
6709
6728
|
"stroke-width": 2
|
|
6710
|
-
})], 8,
|
|
6711
|
-
y.value === t.id ? (f(), k("div",
|
|
6729
|
+
})], 8, _l)) : A("", !0)])]),
|
|
6730
|
+
y.value === t.id ? (f(), k("div", vl, [c(I("textarea", {
|
|
6712
6731
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6713
6732
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6714
6733
|
rows: "2",
|
|
6715
6734
|
onKeydown: (e) => xe(e, t.id)
|
|
6716
|
-
}, null, 40,
|
|
6735
|
+
}, null, 40, yl), [[ae, x.value]]), I("div", bl, [I("button", {
|
|
6717
6736
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6718
6737
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6719
6738
|
onClick: (e) => me(t.id)
|
|
6720
|
-
}, D(j(o).comments.save), 9,
|
|
6739
|
+
}, D(j(o).comments.save), 9, xl), I("button", {
|
|
6721
6740
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6722
6741
|
onClick: n[8] ||= (e) => B()
|
|
6723
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6724
|
-
w.value === t.id ? (f(), k("div",
|
|
6725
|
-
I("span",
|
|
6742
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Sl, D(t.body), 1)),
|
|
6743
|
+
w.value === t.id ? (f(), k("div", Cl, [
|
|
6744
|
+
I("span", wl, D(j(o).comments.deleteConfirm), 1),
|
|
6726
6745
|
I("button", {
|
|
6727
6746
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6728
6747
|
onClick: (e) => he(t.id)
|
|
6729
|
-
}, D(j(o).comments.delete), 9,
|
|
6748
|
+
}, D(j(o).comments.delete), 9, Tl),
|
|
6730
6749
|
I("button", {
|
|
6731
6750
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6732
6751
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6736,20 +6755,20 @@ var Oc = {
|
|
|
6736
6755
|
_: 2
|
|
6737
6756
|
}, 1024),
|
|
6738
6757
|
V(ie, { name: "tpl-replies" }, {
|
|
6739
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6758
|
+
default: b(() => [_.value === e.id ? (f(), k("div", El, [I("div", Dl, [c(I("textarea", {
|
|
6740
6759
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6741
6760
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6742
6761
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6743
6762
|
rows: "2",
|
|
6744
6763
|
onKeydown: (t) => be(t, e.id)
|
|
6745
|
-
}, null, 40,
|
|
6764
|
+
}, null, 40, Ol), [[ae, v.value]]), I("div", kl, [I("button", {
|
|
6746
6765
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6747
6766
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6748
6767
|
onClick: (t) => pe(e.id)
|
|
6749
6768
|
}, [V(j(ki), {
|
|
6750
6769
|
size: 14,
|
|
6751
6770
|
"stroke-width": 2
|
|
6752
|
-
})], 8,
|
|
6771
|
+
})], 8, Al), I("button", {
|
|
6753
6772
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6754
6773
|
onClick: n[11] ||= (e) => ce()
|
|
6755
6774
|
}, [V(j(Bi), {
|
|
@@ -6759,7 +6778,7 @@ var Oc = {
|
|
|
6759
6778
|
_: 2
|
|
6760
6779
|
}, 1024)
|
|
6761
6780
|
]))), 128))]))]),
|
|
6762
|
-
I("div",
|
|
6781
|
+
I("div", jl, [ne.value ? (f(), k("div", Ml, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Nl, [c(I("textarea", {
|
|
6763
6782
|
ref_key: "newCommentInput",
|
|
6764
6783
|
ref: ee,
|
|
6765
6784
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6768,7 +6787,7 @@ var Oc = {
|
|
|
6768
6787
|
disabled: j(u).isSubmitting.value,
|
|
6769
6788
|
rows: "2",
|
|
6770
6789
|
onKeydown: ye
|
|
6771
|
-
}, null, 40,
|
|
6790
|
+
}, null, 40, Pl), [[ae, g.value]]), I("button", {
|
|
6772
6791
|
class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6773
6792
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6774
6793
|
onClick: fe
|
|
@@ -6781,33 +6800,33 @@ var Oc = {
|
|
|
6781
6800
|
key: 1,
|
|
6782
6801
|
size: 16,
|
|
6783
6802
|
"stroke-width": 2
|
|
6784
|
-
}))], 8,
|
|
6803
|
+
}))], 8, Fl)]))])
|
|
6785
6804
|
])) : A("", !0)]),
|
|
6786
6805
|
_: 1
|
|
6787
6806
|
}));
|
|
6788
6807
|
}
|
|
6789
|
-
}),
|
|
6808
|
+
}), Ll = /* @__PURE__ */ e({ default: () => Rl }), Rl = /*#__PURE__*/ Gi(Il, [["__scopeId", "data-v-d204f573"]]), zl = {
|
|
6790
6809
|
key: 0,
|
|
6791
6810
|
class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6792
|
-
},
|
|
6811
|
+
}, Bl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Vl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Hl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Ul = {
|
|
6793
6812
|
key: 0,
|
|
6794
6813
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6795
|
-
},
|
|
6814
|
+
}, Wl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Gl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kl = {
|
|
6796
6815
|
key: 1,
|
|
6797
6816
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6798
|
-
},
|
|
6817
|
+
}, ql = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Jl = {
|
|
6799
6818
|
key: 0,
|
|
6800
6819
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6801
|
-
},
|
|
6820
|
+
}, Yl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Xl = ["src", "alt"], Zl = {
|
|
6802
6821
|
key: 1,
|
|
6803
6822
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6804
|
-
},
|
|
6823
|
+
}, Ql = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, $l = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, eu = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, tu = ["accept"], nu = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ru = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, iu = ["placeholder"], au = {
|
|
6805
6824
|
key: 0,
|
|
6806
6825
|
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
6807
|
-
},
|
|
6826
|
+
}, ou = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, su = { class: "tpl:flex tpl:gap-2" }, cu = {
|
|
6808
6827
|
key: 1,
|
|
6809
6828
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6810
|
-
},
|
|
6829
|
+
}, lu = ["disabled"], uu = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, du = /*@__PURE__*/ B({
|
|
6811
6830
|
__name: "DesignReferenceSidebar",
|
|
6812
6831
|
props: {
|
|
6813
6832
|
visible: { type: Boolean },
|
|
@@ -6815,7 +6834,7 @@ var Oc = {
|
|
|
6815
6834
|
},
|
|
6816
6835
|
emits: ["close", "apply"],
|
|
6817
6836
|
setup(e, { emit: t }) {
|
|
6818
|
-
let n = e, r = t, { t: i } = ta(), a = J(zn, "DesignReferenceSidebar"), o =
|
|
6837
|
+
let n = e, r = t, { t: i } = ta(), a = J(zn, "DesignReferenceSidebar"), o = Ms({
|
|
6819
6838
|
authManager: J(mr, "DesignReferenceSidebar"),
|
|
6820
6839
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6821
6840
|
onApply: (e) => r("apply", e)
|
|
@@ -6887,7 +6906,7 @@ var Oc = {
|
|
|
6887
6906
|
"leave-from-class": "tpl:translate-x-0",
|
|
6888
6907
|
"leave-to-class": "tpl:translate-x-full"
|
|
6889
6908
|
}, {
|
|
6890
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6909
|
+
default: b(() => [e.visible ? (f(), k("div", zl, [I("div", Bl, [I("div", Vl, [V(j(vi), {
|
|
6891
6910
|
size: 13,
|
|
6892
6911
|
"stroke-width": 2
|
|
6893
6912
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
@@ -6896,8 +6915,8 @@ var Oc = {
|
|
|
6896
6915
|
}, [V(j(Bi), {
|
|
6897
6916
|
size: 14,
|
|
6898
6917
|
"stroke-width": 2
|
|
6899
|
-
})])]), I("div",
|
|
6900
|
-
I("div",
|
|
6918
|
+
})])]), I("div", Hl, [j(o).isGenerating.value ? (f(), k("div", Ul, [I("div", Wl, [V(Yi), I("p", Gl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Kl, [
|
|
6919
|
+
I("div", ql, [I("button", {
|
|
6901
6920
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6902
6921
|
style: L({
|
|
6903
6922
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6920,16 +6939,16 @@ var Oc = {
|
|
|
6920
6939
|
size: 12,
|
|
6921
6940
|
"stroke-width": 2
|
|
6922
6941
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6923
|
-
I("div", null, [u.value ? (f(), k("div",
|
|
6942
|
+
I("div", null, [u.value ? (f(), k("div", Jl, [I("div", Yl, [p.value ? (f(), k("img", {
|
|
6924
6943
|
key: 0,
|
|
6925
6944
|
src: p.value,
|
|
6926
6945
|
alt: u.value.name,
|
|
6927
6946
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6928
|
-
}, null, 8,
|
|
6947
|
+
}, null, 8, Xl)) : (f(), k("div", Zl, [V(j(hi), {
|
|
6929
6948
|
size: 32,
|
|
6930
6949
|
"stroke-width": 1.5,
|
|
6931
6950
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6932
|
-
}), I("span",
|
|
6951
|
+
}), I("span", Ql, D(u.value.name), 1)])), I("button", {
|
|
6933
6952
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
6934
6953
|
onClick: x
|
|
6935
6954
|
}, [V(j(Bi), {
|
|
@@ -6952,8 +6971,8 @@ var Oc = {
|
|
|
6952
6971
|
"stroke-width": 1.5,
|
|
6953
6972
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6954
6973
|
}),
|
|
6955
|
-
I("span",
|
|
6956
|
-
I("span",
|
|
6974
|
+
I("span", $l, D(j(i).designReference.dropHint), 1),
|
|
6975
|
+
I("span", eu, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6957
6976
|
], 36)), I("input", {
|
|
6958
6977
|
ref_key: "fileInput",
|
|
6959
6978
|
ref: s,
|
|
@@ -6961,14 +6980,14 @@ var Oc = {
|
|
|
6961
6980
|
class: "tpl:hidden",
|
|
6962
6981
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6963
6982
|
onChange: v
|
|
6964
|
-
}, null, 40,
|
|
6965
|
-
I("div",
|
|
6983
|
+
}, null, 40, tu)]),
|
|
6984
|
+
I("div", nu, [I("label", ru, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6966
6985
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6967
6986
|
class: F(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
6968
6987
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6969
6988
|
rows: "3"
|
|
6970
|
-
}, null, 8,
|
|
6971
|
-
m.value ? (f(), k("div",
|
|
6989
|
+
}, null, 8, iu), [[ae, d.value]])]),
|
|
6990
|
+
m.value ? (f(), k("div", au, [I("p", ou, D(j(i).designReference.replaceWarning), 1), I("div", su, [I("button", {
|
|
6972
6991
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
6973
6992
|
style: { "background-color": "transparent" },
|
|
6974
6993
|
onClick: E
|
|
@@ -6976,7 +6995,7 @@ var Oc = {
|
|
|
6976
6995
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6977
6996
|
onClick: T
|
|
6978
6997
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6979
|
-
j(o).error.value ? (f(), k("div",
|
|
6998
|
+
j(o).error.value ? (f(), k("div", cu, [V(j(si), {
|
|
6980
6999
|
size: 14,
|
|
6981
7000
|
"stroke-width": 2,
|
|
6982
7001
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6989,32 +7008,32 @@ var Oc = {
|
|
|
6989
7008
|
}, [V(j(vi), {
|
|
6990
7009
|
size: 16,
|
|
6991
7010
|
"stroke-width": 2
|
|
6992
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
6993
|
-
I("p",
|
|
7011
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, lu)),
|
|
7012
|
+
I("p", uu, D(j(i).aiMenu.disclaimer), 1)
|
|
6994
7013
|
]))])])) : A("", !0)]),
|
|
6995
7014
|
_: 1
|
|
6996
7015
|
}));
|
|
6997
7016
|
}
|
|
6998
|
-
}),
|
|
7017
|
+
}), fu = /* @__PURE__ */ e({ default: () => pu }), pu = /*#__PURE__*/ Gi(du, [["__scopeId", "data-v-bdbf8d0d"]]), mu = ["disabled", "title"], hu = ["title"], gu = {
|
|
6999
7018
|
key: 0,
|
|
7000
7019
|
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
7001
7020
|
style: {
|
|
7002
7021
|
"backdrop-filter": "blur(8px)",
|
|
7003
7022
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
7004
7023
|
}
|
|
7005
|
-
},
|
|
7024
|
+
}, _u = { 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)]" }, vu = {
|
|
7006
7025
|
key: 0,
|
|
7007
7026
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
7008
|
-
},
|
|
7027
|
+
}, yu = {
|
|
7009
7028
|
key: 1,
|
|
7010
7029
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
7011
|
-
},
|
|
7030
|
+
}, bu = {
|
|
7012
7031
|
key: 2,
|
|
7013
7032
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
7014
|
-
},
|
|
7033
|
+
}, xu = ["disabled", "onClick"], Su = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Cu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, wu = {
|
|
7015
7034
|
key: 0,
|
|
7016
7035
|
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
7017
|
-
},
|
|
7036
|
+
}, Tu = ["disabled", "title"], Eu = /*@__PURE__*/ B({
|
|
7018
7037
|
__name: "SnapshotHistory",
|
|
7019
7038
|
props: {
|
|
7020
7039
|
snapshots: {},
|
|
@@ -7042,7 +7061,7 @@ var Oc = {
|
|
|
7042
7061
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
7043
7062
|
}
|
|
7044
7063
|
function _(e) {
|
|
7045
|
-
let t =
|
|
7064
|
+
let t = Oc(e, a.snapshotHistory, i, 7);
|
|
7046
7065
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
7047
7066
|
month: "short",
|
|
7048
7067
|
day: "numeric",
|
|
@@ -7065,7 +7084,7 @@ var Oc = {
|
|
|
7065
7084
|
}, [V(j(ii), {
|
|
7066
7085
|
size: 14,
|
|
7067
7086
|
"stroke-width": 2
|
|
7068
|
-
})], 8,
|
|
7087
|
+
})], 8, mu),
|
|
7069
7088
|
I("button", {
|
|
7070
7089
|
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
7071
7090
|
title: j(a).snapshotHistory.tooltip,
|
|
@@ -7077,19 +7096,19 @@ var Oc = {
|
|
|
7077
7096
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
7078
7097
|
size: 10,
|
|
7079
7098
|
"stroke-width": 2
|
|
7080
|
-
}, null, 8, ["class"])], 8,
|
|
7099
|
+
}, null, 8, ["class"])], 8, hu),
|
|
7081
7100
|
V(ie, { name: "tpl-dropdown" }, {
|
|
7082
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
7101
|
+
default: b(() => [o.value ? (f(), k("div", gu, [I("div", _u, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", vu, [V(j(xi), {
|
|
7083
7102
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
7084
7103
|
size: 20,
|
|
7085
7104
|
"stroke-width": 2
|
|
7086
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
7105
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", yu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", bu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
7087
7106
|
key: t.id,
|
|
7088
7107
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
|
|
7089
7108
|
style: { "background-color": "transparent" },
|
|
7090
7109
|
disabled: e.isRestoring,
|
|
7091
7110
|
onClick: (e) => g(t.id)
|
|
7092
|
-
}, [I("div",
|
|
7111
|
+
}, [I("div", Su, [I("div", Cu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", wu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, xu))), 128))]))])) : A("", !0)]),
|
|
7093
7112
|
_: 1
|
|
7094
7113
|
}),
|
|
7095
7114
|
I("button", {
|
|
@@ -7100,66 +7119,66 @@ var Oc = {
|
|
|
7100
7119
|
}, [V(j(ai), {
|
|
7101
7120
|
size: 14,
|
|
7102
7121
|
"stroke-width": 2
|
|
7103
|
-
})], 8,
|
|
7122
|
+
})], 8, Tu)
|
|
7104
7123
|
], 512));
|
|
7105
7124
|
}
|
|
7106
|
-
}),
|
|
7125
|
+
}), Du = /* @__PURE__ */ e({ default: () => Ou }), Ou = Eu;
|
|
7107
7126
|
//#endregion
|
|
7108
7127
|
//#region src/cloud/utils/scoringStyles.ts
|
|
7109
|
-
function
|
|
7128
|
+
function ku(e) {
|
|
7110
7129
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
7111
7130
|
}
|
|
7112
|
-
function
|
|
7131
|
+
function Au(e) {
|
|
7113
7132
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
7114
7133
|
}
|
|
7115
|
-
function
|
|
7134
|
+
function ju(e) {
|
|
7116
7135
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
7117
7136
|
}
|
|
7118
|
-
function
|
|
7137
|
+
function Mu(e) {
|
|
7119
7138
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
7120
7139
|
}
|
|
7121
7140
|
//#endregion
|
|
7122
7141
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
7123
|
-
var
|
|
7142
|
+
var Nu = {
|
|
7124
7143
|
key: 0,
|
|
7125
7144
|
class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
7126
|
-
},
|
|
7145
|
+
}, Pu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Fu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Iu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Lu = ["title"], Ru = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, zu = {
|
|
7127
7146
|
key: 0,
|
|
7128
7147
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7129
|
-
},
|
|
7148
|
+
}, Bu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vu = {
|
|
7130
7149
|
key: 1,
|
|
7131
7150
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7132
|
-
},
|
|
7151
|
+
}, Hu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Uu = {
|
|
7133
7152
|
key: 2,
|
|
7134
7153
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
7135
|
-
},
|
|
7154
|
+
}, Wu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Gu = {
|
|
7136
7155
|
key: 0,
|
|
7137
7156
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7138
|
-
},
|
|
7157
|
+
}, Ku = {
|
|
7139
7158
|
key: 0,
|
|
7140
7159
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
7141
|
-
},
|
|
7160
|
+
}, qu = ["onClick"], Ju = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Yu = {
|
|
7142
7161
|
key: 0,
|
|
7143
7162
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
7144
|
-
},
|
|
7163
|
+
}, Xu = {
|
|
7145
7164
|
key: 0,
|
|
7146
7165
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
7147
|
-
},
|
|
7166
|
+
}, Zu = {
|
|
7148
7167
|
key: 0,
|
|
7149
7168
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
7150
|
-
},
|
|
7169
|
+
}, Qu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, $u = { class: "tpl:flex-1 tpl:min-w-0" }, ed = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, td = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, nd = {
|
|
7151
7170
|
key: 0,
|
|
7152
7171
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
7153
|
-
},
|
|
7172
|
+
}, rd = {
|
|
7154
7173
|
key: 1,
|
|
7155
7174
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
7156
|
-
},
|
|
7175
|
+
}, id = ["disabled", "onClick"], ad = {
|
|
7157
7176
|
key: 0,
|
|
7158
7177
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
7159
|
-
},
|
|
7178
|
+
}, od = {
|
|
7160
7179
|
key: 3,
|
|
7161
7180
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
7162
|
-
},
|
|
7181
|
+
}, sd = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cd = { 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)]" }, ld = /*@__PURE__*/ B({
|
|
7163
7182
|
__name: "TemplateScoringPanel",
|
|
7164
7183
|
props: { visible: { type: Boolean } },
|
|
7165
7184
|
emits: ["close"],
|
|
@@ -7210,10 +7229,10 @@ var Mu = {
|
|
|
7210
7229
|
"leave-from-class": "tpl:translate-x-0",
|
|
7211
7230
|
"leave-to-class": "tpl:translate-x-full"
|
|
7212
7231
|
}, {
|
|
7213
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
7232
|
+
default: b(() => [e.visible ? (f(), k("div", Nu, [I("div", Pu, [I("div", Fu, [V(j(ji), {
|
|
7214
7233
|
size: 13,
|
|
7215
7234
|
"stroke-width": 2
|
|
7216
|
-
}), I("span", null, D(j(i).scoring.title), 1)]), I("div",
|
|
7235
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", Iu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
7217
7236
|
key: 0,
|
|
7218
7237
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7219
7238
|
title: j(i).scoring.rescore,
|
|
@@ -7221,19 +7240,19 @@ var Mu = {
|
|
|
7221
7240
|
}, [V(j(Di), {
|
|
7222
7241
|
size: 14,
|
|
7223
7242
|
"stroke-width": 2
|
|
7224
|
-
})], 8,
|
|
7243
|
+
})], 8, Lu)) : A("", !0), I("button", {
|
|
7225
7244
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
7226
7245
|
onClick: n[1] ||= (e) => r("close")
|
|
7227
7246
|
}, [V(j(Bi), {
|
|
7228
7247
|
size: 14,
|
|
7229
7248
|
"stroke-width": 2
|
|
7230
|
-
})])])]), I("div",
|
|
7249
|
+
})])])]), I("div", Ru, [j(o).isScoring.value ? (f(), k("div", zu, [I("p", Bu, D(j(i).scoring.scoring), 1), V(Yi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", Vu, [
|
|
7231
7250
|
V(j(si), {
|
|
7232
7251
|
size: 32,
|
|
7233
7252
|
"stroke-width": 1.5,
|
|
7234
7253
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7235
7254
|
}),
|
|
7236
|
-
I("p",
|
|
7255
|
+
I("p", Hu, D(j(i).scoring.error), 1),
|
|
7237
7256
|
I("button", {
|
|
7238
7257
|
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
7239
7258
|
onClick: n[2] ||= (e) => m()
|
|
@@ -7241,19 +7260,19 @@ var Mu = {
|
|
|
7241
7260
|
size: 12,
|
|
7242
7261
|
"stroke-width": 2
|
|
7243
7262
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7244
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
7263
|
+
])) : j(o).scoringResult.value ? (f(), k("div", Uu, [
|
|
7245
7264
|
I("div", {
|
|
7246
7265
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7247
|
-
style: L({ backgroundColor: j(
|
|
7266
|
+
style: L({ backgroundColor: j(Au)(j(o).scoringResult.value.score) })
|
|
7248
7267
|
}, [
|
|
7249
7268
|
I("span", {
|
|
7250
7269
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7251
|
-
style: L({ color: j(
|
|
7270
|
+
style: L({ color: j(ku)(j(o).scoringResult.value.score) })
|
|
7252
7271
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7253
|
-
I("span",
|
|
7254
|
-
_() > 0 ? (f(), k("span",
|
|
7272
|
+
I("span", Wu, D(j(i).scoring.overallScore), 1),
|
|
7273
|
+
_() > 0 ? (f(), k("span", Gu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
7255
7274
|
], 4),
|
|
7256
|
-
j(o).fixError.value ? (f(), k("div",
|
|
7275
|
+
j(o).fixError.value ? (f(), k("div", Ku, [V(j(si), {
|
|
7257
7276
|
size: 14,
|
|
7258
7277
|
"stroke-width": 2,
|
|
7259
7278
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7268,40 +7287,40 @@ var Mu = {
|
|
|
7268
7287
|
(f(), N(d(p[e]), {
|
|
7269
7288
|
size: 14,
|
|
7270
7289
|
"stroke-width": 2,
|
|
7271
|
-
style: L({ color: j(
|
|
7290
|
+
style: L({ color: j(ku)(j(o).scoringResult.value.categories[e].score) })
|
|
7272
7291
|
}, null, 8, ["style"])),
|
|
7273
|
-
I("span",
|
|
7292
|
+
I("span", Ju, D(j(i).scoring.categories[e]), 1),
|
|
7274
7293
|
I("span", {
|
|
7275
7294
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7276
7295
|
style: L({
|
|
7277
|
-
color: j(
|
|
7278
|
-
backgroundColor: j(
|
|
7296
|
+
color: j(ku)(j(o).scoringResult.value.categories[e].score),
|
|
7297
|
+
backgroundColor: j(Au)(j(o).scoringResult.value.categories[e].score)
|
|
7279
7298
|
})
|
|
7280
7299
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7281
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7300
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Yu, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7282
7301
|
V(j(ri), {
|
|
7283
7302
|
size: 12,
|
|
7284
7303
|
"stroke-width": 2,
|
|
7285
7304
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7286
7305
|
}, null, 8, ["class"])
|
|
7287
|
-
], 8,
|
|
7306
|
+
], 8, qu), c.value[e] ? (f(), k("div", Xu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Zu, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
|
|
7288
7307
|
key: e.id,
|
|
7289
7308
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7290
|
-
}, [I("div",
|
|
7309
|
+
}, [I("div", Qu, [(f(), N(d(j(e.severity === "high" ? si : e.severity === "medium" ? Ii : bi)), {
|
|
7291
7310
|
size: 13,
|
|
7292
7311
|
"stroke-width": 2,
|
|
7293
7312
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7294
|
-
style: L({ color: j(
|
|
7295
|
-
}, null, 8, ["style"])), I("div",
|
|
7296
|
-
I("div",
|
|
7313
|
+
style: L({ color: j(ju)(e.severity) })
|
|
7314
|
+
}, null, 8, ["style"])), I("div", $u, [
|
|
7315
|
+
I("div", ed, [I("span", {
|
|
7297
7316
|
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
7298
7317
|
style: L({
|
|
7299
|
-
color: j(
|
|
7300
|
-
backgroundColor: j(
|
|
7318
|
+
color: j(ju)(e.severity),
|
|
7319
|
+
backgroundColor: j(Mu)(e.severity)
|
|
7301
7320
|
})
|
|
7302
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7303
|
-
e.suggestion ? (f(), k("p",
|
|
7304
|
-
e.blockId ? (f(), k("div",
|
|
7321
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", td, D(e.message), 1)]),
|
|
7322
|
+
e.suggestion ? (f(), k("p", nd, D(e.suggestion), 1)) : A("", !0),
|
|
7323
|
+
e.blockId ? (f(), k("div", rd, [I("button", {
|
|
7305
7324
|
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
7306
7325
|
style: { "background-color": "transparent" },
|
|
7307
7326
|
disabled: j(o).fixingFindingId.value !== null,
|
|
@@ -7315,27 +7334,27 @@ var Mu = {
|
|
|
7315
7334
|
key: 1,
|
|
7316
7335
|
size: 11,
|
|
7317
7336
|
"stroke-width": 2
|
|
7318
|
-
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8,
|
|
7337
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, id), j(o).fixError.value ? (f(), k("p", ad, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7319
7338
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7320
|
-
])) : (f(), k("div",
|
|
7339
|
+
])) : (f(), k("div", od, [V(j(ji), {
|
|
7321
7340
|
size: 32,
|
|
7322
7341
|
"stroke-width": 1.5,
|
|
7323
7342
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7324
|
-
}), I("p",
|
|
7343
|
+
}), I("p", sd, D(j(i).scoring.emptyState), 1)])), I("p", cd, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7325
7344
|
_: 1
|
|
7326
7345
|
}));
|
|
7327
7346
|
}
|
|
7328
|
-
}),
|
|
7347
|
+
}), ud = /* @__PURE__ */ e({ default: () => dd }), dd = /*#__PURE__*/ Gi(ld, [["__scopeId", "data-v-c23c73d4"]]), fd = ["aria-busy"], pd = {
|
|
7329
7348
|
id: "tpl-test-email-title",
|
|
7330
7349
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7331
|
-
},
|
|
7350
|
+
}, md = { class: "tpl:mb-3" }, hd = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, gd = ["value"], _d = ["disabled"], vd = ["value"], yd = {
|
|
7332
7351
|
key: 0,
|
|
7333
7352
|
role: "alert",
|
|
7334
7353
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7335
|
-
},
|
|
7354
|
+
}, bd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, xd = ["disabled"], Sd = ["disabled"], Cd = {
|
|
7336
7355
|
key: 0,
|
|
7337
7356
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7338
|
-
},
|
|
7357
|
+
}, wd = { key: 1 }, Td = /*@__PURE__*/ B({
|
|
7339
7358
|
__name: "TestEmailModal",
|
|
7340
7359
|
props: {
|
|
7341
7360
|
visible: { type: Boolean },
|
|
@@ -7358,7 +7377,7 @@ var Mu = {
|
|
|
7358
7377
|
function l(e) {
|
|
7359
7378
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7360
7379
|
}
|
|
7361
|
-
return (t, n) => (f(), N(
|
|
7380
|
+
return (t, n) => (f(), N(ps, {
|
|
7362
7381
|
visible: e.visible,
|
|
7363
7382
|
onClose: s,
|
|
7364
7383
|
onKeydown: l
|
|
@@ -7374,14 +7393,14 @@ var Mu = {
|
|
|
7374
7393
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7375
7394
|
}
|
|
7376
7395
|
}, [
|
|
7377
|
-
I("h3",
|
|
7378
|
-
I("div",
|
|
7396
|
+
I("h3", pd, D(j(i).testEmail.title), 1),
|
|
7397
|
+
I("div", md, [I("label", hd, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7379
7398
|
key: 0,
|
|
7380
7399
|
type: "text",
|
|
7381
7400
|
value: a.value,
|
|
7382
7401
|
disabled: "",
|
|
7383
7402
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
7384
|
-
}, null, 8,
|
|
7403
|
+
}, null, 8, gd)) : c((f(), k("select", {
|
|
7385
7404
|
key: 1,
|
|
7386
7405
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7387
7406
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
@@ -7389,29 +7408,29 @@ var Mu = {
|
|
|
7389
7408
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7390
7409
|
key: e,
|
|
7391
7410
|
value: e
|
|
7392
|
-
}, D(e), 9,
|
|
7393
|
-
e.error ? (f(), k("p",
|
|
7394
|
-
I("div",
|
|
7411
|
+
}, D(e), 9, vd))), 128))], 8, _d)), [[w, a.value]])]),
|
|
7412
|
+
e.error ? (f(), k("p", yd, D(e.error), 1)) : A("", !0),
|
|
7413
|
+
I("div", bd, [I("button", {
|
|
7395
7414
|
type: "button",
|
|
7396
7415
|
class: F(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
7397
7416
|
disabled: e.isSending,
|
|
7398
7417
|
onClick: s
|
|
7399
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7418
|
+
}, D(j(i).testEmail.cancel), 11, xd), I("button", {
|
|
7400
7419
|
type: "button",
|
|
7401
7420
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
7402
7421
|
disabled: !a.value || e.isSending,
|
|
7403
7422
|
onClick: o
|
|
7404
|
-
}, [e.isSending ? (f(), k("span",
|
|
7423
|
+
}, [e.isSending ? (f(), k("span", Cd, [V(j(xi), {
|
|
7405
7424
|
class: "tpl:animate-spin",
|
|
7406
7425
|
size: 12,
|
|
7407
7426
|
"stroke-width": 2
|
|
7408
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7409
|
-
], 8,
|
|
7427
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", wd, D(j(i).testEmail.send), 1))], 8, Sd)])
|
|
7428
|
+
], 8, fd)]),
|
|
7410
7429
|
_: 1
|
|
7411
7430
|
}, 8, ["visible"]));
|
|
7412
7431
|
}
|
|
7413
|
-
}),
|
|
7432
|
+
}), Ed = /* @__PURE__ */ e({ default: () => Dd }), Dd = Td;
|
|
7414
7433
|
//#endregion
|
|
7415
|
-
export {
|
|
7434
|
+
export { pa as $, fe as $n, zn as $t, ls as A, mt as An, ui as At, fo as B, be as Bn, Y as Bt, xs as C, Lt as Cn, xi as Ct, hs as D, Ct as Dn, pi as Dt, ms as E, xt as En, vi as Et, Po as F, st as Fn, ni as Ft, Ra as G, he as Gn, qn as Gt, to as H, ve as Hn, cr as Ht, Ao as I, W as In, X as It, Aa as J, Ee as Jn, gr as Jt, Ia as K, Se as Kn, lr as Kt, Oo as L, We as Ln, Wr as Lt, qo as M, ut as Mn, si as Mt, Wo as N, lt as Nn, ai as Nt, ps as O, yt as On, fi as Ot, Lo as P, ct as Pn, ri as Pt, ha as Q, de as Qn, sr as Qt, mo as R, ye as Rn, jr as Rt, Ss as S, un as Sn, Si as St, Z as T, dt as Tn, yi as Tt, eo as U, Te as Un, mr as Ut, no as V, we as Vn, hr as Vt, Xa as W, _e as Wn, Kn as Wt, ya as X, xe as Xn, Jn as Xt, Oa as Y, ge as Yn, Hn as Yt, _a as Z, pe as Zn, Xn as Zt, Ps as _, Nn as _n, Ai as _t, Ll as a, Yn as an, ea as at, As as b, an as bn, wi as bt, Zs as c, dr as cn, Gi as ct, Ws as d, Gn as dn, Ri as dt, Un as en, ue as er, la as et, Us as f, J as fn, Ii as ft, zs as g, q as gn, ji as gt, Bs as h, Dn as hn, Ni as ht, fu as i, or as in, na as it, $o as j, St as jn, li as jt, ds as k, ht as kn, di as kt, Ks as l, Wn as ln, Wi as lt, Vs as m, En as mn, Pi as mt, ud as n, tr as nn, ia as nt, Cc as o, _r as on, ta as ot, Hs as p, vn as pn, Fi as pt, Fa as q, Ce as qn, yr as qt, Du as r, Qn as rn, ra as rt, Qs as s, vr as sn, Qi as st, Ed as t, ir as tn, ca as tt, Gs as u, Rn as un, Bi as ut, Ns as v, An as vn, ki as vt, $ as w, Ot as wn, bi as wt, Es as x, ln as xn, Ci as xt, js as y, on as yn, Di as yt, po as z, De as zn, wr as zt };
|
|
7416
7435
|
|
|
7417
|
-
//# sourceMappingURL=features-
|
|
7436
|
+
//# sourceMappingURL=features-BSpDuFFR.js.map
|