@templatical/editor 0.6.4 → 0.6.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/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
- package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
- package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-uXTxJh06.js} +20 -20
- package/dist/{cdn/chunks/BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-C0S6kPC4.js} +10 -9
- package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-_GaYluN7.js} +441 -441
- package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-C4eXJkXW.js} +20 -20
- package/dist/CommentsSidebar-BQROg36f.js +441 -0
- package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
- package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
- package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
- package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
- package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-EDKHLJtb.js} +79 -79
- package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-MQxat34K.js} +29 -29
- package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
- package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-C8IP9HOZ.js} +218 -218
- package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
- package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-Bgu0FVr6.js} +34 -34
- package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-aSULEKUJ.js} +33 -33
- package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
- package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-wcbmmWCs.js} +30 -30
- package/dist/{TitleEditor-fStSADI-.js → TitleEditor-21D8_OUQ.js} +67 -67
- package/dist/{TplModal-BwSfxIHf.js → TplModal-CINtyB6Y.js} +14 -14
- package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
- package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-DKetBdJx.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-BMSGhaNU.js} +34 -34
- package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-BMSGhaNU.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-hNba-JqQ.js} +16 -16
- package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-hNba-JqQ.js.map} +1 -1
- package/dist/{BlockA11yBadge-CXDLqkcJ.js → cdn/chunks/BlockA11yBadge-BIR88CvN.js} +11 -12
- package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BIR88CvN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-D2G2nNpQ.js} +425 -425
- package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-D2G2nNpQ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-Btzom8dY.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-Btzom8dY.js.map} +1 -1
- package/dist/cdn/chunks/CountdownBlock-BJSAJlJ1.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BJSAJlJ1.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DbknNrIi.js +212 -0
- package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-DbknNrIi.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BvAuW8O5.js} +43 -43
- package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BvAuW8O5.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CYtt0boo.js} +23 -23
- package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CYtt0boo.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-CVfo9ztG.js} +108 -108
- package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-CVfo9ztG.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-DCo58JP8.js} +187 -187
- package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-DCo58JP8.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-BzCThv84.js} +33 -33
- package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-BzCThv84.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-S2Lix1LD.js} +27 -27
- package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-S2Lix1LD.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-CYzAMuUW.js} +66 -66
- package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-CYzAMuUW.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DOzUHoor.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DOzUHoor.js.map} +1 -1
- package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
- package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-wafZZ0-_.js} +95 -95
- package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-wafZZ0-_.js.map} +1 -1
- package/dist/cdn/chunks/{features-DEMb13KS.js → features-B4tNvoi4.js} +2260 -2267
- package/dist/cdn/chunks/features-B4tNvoi4.js.map +1 -0
- package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-B5nBFtvb.js} +2 -2
- package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-B5nBFtvb.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-BLaoBxHe.js} +1397 -1397
- package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-BLaoBxHe.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
- package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-D920ZxXf.js} +3 -3
- package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-D920ZxXf.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-Yk30CckU.js} +3 -3
- package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-Yk30CckU.js.map} +1 -1
- package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
- package/dist/cdn/chunks/{src-CRaqN-p8.js → src-kLJg7Y0m.js} +171 -171
- package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-kLJg7Y0m.js.map} +1 -1
- package/dist/cdn/chunks/styles-DrVLif14.js +2944 -0
- package/dist/cdn/chunks/styles-DrVLif14.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
- package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +122 -122
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
- package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
- package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
- package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
- package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
- package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
- package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
- package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
- package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
- package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
- package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
- package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
- package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
- package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
- package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
- package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
- package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/styles-CwJQsnSp.js +3173 -0
- package/dist/templatical-editor.js +99 -99
- package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
- package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
- package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
- package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
- package/dist/useEditorCore-DLd-5qMg.js +3784 -0
- package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
- package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
- package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
- package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
- package/package.json +8 -8
- package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
- package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
- package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
- package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
- package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
- package/dist/styles-DEXEkBvg.js +0 -3176
- package/dist/useEditorCore-C6ost42Q.js +0 -9342
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as e, L as t, X as n, Y as r, d as i, q as a } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
2
|
import { r as o, u as s } from "./dist-DJmnUmW9.js";
|
|
3
3
|
//#region ../core/dist/cloud/index.js
|
|
4
4
|
var c = class e {
|
|
@@ -431,10 +431,10 @@ function b(e, t) {
|
|
|
431
431
|
break;
|
|
432
432
|
}
|
|
433
433
|
}
|
|
434
|
-
function x(
|
|
435
|
-
let n = new _(
|
|
434
|
+
function x(t) {
|
|
435
|
+
let n = new _(t.authManager), a = e({
|
|
436
436
|
template: null,
|
|
437
|
-
content: s(
|
|
437
|
+
content: s(t.defaultFontFamily, t.templateDefaults),
|
|
438
438
|
selectedBlockId: null,
|
|
439
439
|
viewport: "desktop",
|
|
440
440
|
darkMode: !1,
|
|
@@ -479,8 +479,8 @@ function x(e) {
|
|
|
479
479
|
}
|
|
480
480
|
return null;
|
|
481
481
|
}
|
|
482
|
-
function p(
|
|
483
|
-
return
|
|
482
|
+
function p(e) {
|
|
483
|
+
return t.lockedBlocks?.value.has(e) ?? !1;
|
|
484
484
|
}
|
|
485
485
|
function m(e, t = !0) {
|
|
486
486
|
a.content = e, t && (a.isDirty = !0);
|
|
@@ -542,25 +542,25 @@ function x(e) {
|
|
|
542
542
|
} else a.content.blocks.splice(t, 0, s);
|
|
543
543
|
a.isDirty = !0;
|
|
544
544
|
}
|
|
545
|
-
async function E(
|
|
545
|
+
async function E(e) {
|
|
546
546
|
a.isLoading = !0;
|
|
547
547
|
try {
|
|
548
|
-
|
|
549
|
-
let
|
|
550
|
-
return a.template =
|
|
551
|
-
} catch (
|
|
552
|
-
throw
|
|
548
|
+
e && (a.content = e);
|
|
549
|
+
let t = await n.createTemplate(a.content);
|
|
550
|
+
return a.template = t, a.isDirty = !1, t;
|
|
551
|
+
} catch (e) {
|
|
552
|
+
throw t.onError?.(e), e;
|
|
553
553
|
} finally {
|
|
554
554
|
a.isLoading = !1;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
async function D(
|
|
557
|
+
async function D(e) {
|
|
558
558
|
a.isLoading = !0;
|
|
559
559
|
try {
|
|
560
|
-
let
|
|
561
|
-
return a.template =
|
|
562
|
-
} catch (
|
|
563
|
-
throw
|
|
560
|
+
let t = await n.getTemplate(e);
|
|
561
|
+
return a.template = t, a.content = t.content, a.isDirty = !1, t;
|
|
562
|
+
} catch (e) {
|
|
563
|
+
throw t.onError?.(e), e;
|
|
564
564
|
} finally {
|
|
565
565
|
a.isLoading = !1;
|
|
566
566
|
}
|
|
@@ -571,8 +571,8 @@ function x(e) {
|
|
|
571
571
|
try {
|
|
572
572
|
let e = await n.updateTemplate(a.template.id, a.content);
|
|
573
573
|
return a.template = e, a.isDirty = !1, e;
|
|
574
|
-
} catch (
|
|
575
|
-
throw
|
|
574
|
+
} catch (e) {
|
|
575
|
+
throw t.onError?.(e), e;
|
|
576
576
|
} finally {
|
|
577
577
|
a.isSaving = !1;
|
|
578
578
|
}
|
|
@@ -580,8 +580,8 @@ function x(e) {
|
|
|
580
580
|
async function k() {
|
|
581
581
|
if (a.template?.id) try {
|
|
582
582
|
await n.createSnapshot(a.template.id, a.content);
|
|
583
|
-
} catch (
|
|
584
|
-
throw
|
|
583
|
+
} catch (e) {
|
|
584
|
+
throw t.onError?.(e), e;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
587
|
function A() {
|
|
@@ -619,8 +619,8 @@ var S = 0;
|
|
|
619
619
|
function C() {
|
|
620
620
|
return `msg_${Date.now()}_${++S}`;
|
|
621
621
|
}
|
|
622
|
-
function w(
|
|
623
|
-
let { authManager:
|
|
622
|
+
function w(e) {
|
|
623
|
+
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n([]), s = n(!1), c = n(!1), u = n(null), d = n(null), f = n(null), p = n(null), m = n(null), h = n(null), _ = n(!1), v = n([]), y = n(!1);
|
|
624
624
|
function b(e, t) {
|
|
625
625
|
let n = o.value.findIndex((t) => t.id === e);
|
|
626
626
|
if (n === -1) return;
|
|
@@ -639,11 +639,11 @@ function w(t) {
|
|
|
639
639
|
if (e) {
|
|
640
640
|
c.value = !0;
|
|
641
641
|
try {
|
|
642
|
-
let
|
|
643
|
-
project:
|
|
644
|
-
tenant:
|
|
642
|
+
let n = l(g["ai.conversationMessages"], {
|
|
643
|
+
project: t.projectId,
|
|
644
|
+
tenant: t.tenantSlug,
|
|
645
645
|
template: e
|
|
646
|
-
}), r = await
|
|
646
|
+
}), r = await t.authenticatedFetch(n, {
|
|
647
647
|
method: "GET",
|
|
648
648
|
headers: { Accept: "application/json" }
|
|
649
649
|
});
|
|
@@ -660,16 +660,16 @@ function w(t) {
|
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
|
-
async function S(e,
|
|
663
|
+
async function S(e, n) {
|
|
664
664
|
let i = r();
|
|
665
665
|
if (i) {
|
|
666
666
|
y.value = !0;
|
|
667
667
|
try {
|
|
668
668
|
let r = l(g["ai.suggestions"], {
|
|
669
|
-
project:
|
|
670
|
-
tenant:
|
|
669
|
+
project: t.projectId,
|
|
670
|
+
tenant: t.tenantSlug,
|
|
671
671
|
template: i
|
|
672
|
-
}), a = await
|
|
672
|
+
}), a = await t.authenticatedFetch(r, {
|
|
673
673
|
method: "POST",
|
|
674
674
|
headers: {
|
|
675
675
|
"Content-Type": "application/json",
|
|
@@ -677,7 +677,7 @@ function w(t) {
|
|
|
677
677
|
},
|
|
678
678
|
body: JSON.stringify({
|
|
679
679
|
current_content: e,
|
|
680
|
-
merge_tags:
|
|
680
|
+
merge_tags: n.map((e) => ({
|
|
681
681
|
label: e.label,
|
|
682
682
|
value: e.value
|
|
683
683
|
}))
|
|
@@ -709,7 +709,7 @@ function w(t) {
|
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
async function w(e,
|
|
712
|
+
async function w(e, n, c) {
|
|
713
713
|
let y = r();
|
|
714
714
|
if (!y) throw Error("Template must be saved before using AI generation");
|
|
715
715
|
s.value = !0, u.value = null, d.value = null, v.value = [];
|
|
@@ -729,10 +729,10 @@ function w(t) {
|
|
|
729
729
|
}];
|
|
730
730
|
try {
|
|
731
731
|
let r = l(g["ai.generate"], {
|
|
732
|
-
project:
|
|
733
|
-
tenant:
|
|
732
|
+
project: t.projectId,
|
|
733
|
+
tenant: t.tenantSlug,
|
|
734
734
|
template: y
|
|
735
|
-
}), a = await
|
|
735
|
+
}), a = await t.authenticatedFetch(r, {
|
|
736
736
|
method: "POST",
|
|
737
737
|
headers: {
|
|
738
738
|
"Content-Type": "application/json",
|
|
@@ -740,7 +740,7 @@ function w(t) {
|
|
|
740
740
|
},
|
|
741
741
|
body: JSON.stringify({
|
|
742
742
|
prompt: e,
|
|
743
|
-
current_content:
|
|
743
|
+
current_content: n,
|
|
744
744
|
merge_tags: c.map((e) => ({
|
|
745
745
|
label: e.label,
|
|
746
746
|
value: e.value
|
|
@@ -757,22 +757,22 @@ function w(t) {
|
|
|
757
757
|
let d = new TextDecoder(), v = "", x = null;
|
|
758
758
|
try {
|
|
759
759
|
for (;;) {
|
|
760
|
-
let { done: e, value:
|
|
760
|
+
let { done: e, value: t } = await s.read();
|
|
761
761
|
if (e) break;
|
|
762
|
-
v += d.decode(
|
|
762
|
+
v += d.decode(t, { stream: !0 });
|
|
763
763
|
let r = v.split("\n");
|
|
764
764
|
v = r.pop() ?? "";
|
|
765
765
|
for (let e of r) {
|
|
766
766
|
if (!e.startsWith("data: ")) continue;
|
|
767
|
-
let
|
|
767
|
+
let t = e.slice(6), r;
|
|
768
768
|
try {
|
|
769
|
-
r = JSON.parse(
|
|
769
|
+
r = JSON.parse(t);
|
|
770
770
|
} catch {
|
|
771
771
|
continue;
|
|
772
772
|
}
|
|
773
773
|
if (r.type === "text") b(S, { content: (o.value.find((e) => e.id === S)?.content ?? "") + r.text });
|
|
774
774
|
else if (r.type === "error") throw Error(r.message || "Failed to generate template");
|
|
775
|
-
else r.type === "done" && (r.conversation_id && (f.value = r.conversation_id), b(S, { content: r.text }), x = r.content ?? null, x ? (m.value =
|
|
775
|
+
else r.type === "done" && (r.conversation_id && (f.value = r.conversation_id), b(S, { content: r.text }), x = r.content ?? null, x ? (m.value = n, h.value = x, p.value = S, _.value = !1, i?.(x)) : u.value = "ai_apply_failed");
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
} finally {
|
|
@@ -818,18 +818,18 @@ function T(e) {
|
|
|
818
818
|
hasAnyMenuFeature: i(() => t("chat") || t("scoring") || t("designToTemplate"))
|
|
819
819
|
};
|
|
820
820
|
}
|
|
821
|
-
function E(
|
|
822
|
-
let { authManager:
|
|
823
|
-
async function d(e,
|
|
821
|
+
function E(e) {
|
|
822
|
+
let { authManager: t, getTemplateId: r } = e, i = n(!1), a = n(null), o = n(null), s = n(null), c = n(""), u = n(null);
|
|
823
|
+
async function d(e, n) {
|
|
824
824
|
let s = r();
|
|
825
825
|
if (!s) return null;
|
|
826
826
|
i.value = !0, o.value = null, a.value = null;
|
|
827
827
|
try {
|
|
828
828
|
let r = l(g["ai.score"], {
|
|
829
|
-
project:
|
|
830
|
-
tenant:
|
|
829
|
+
project: t.projectId,
|
|
830
|
+
tenant: t.tenantSlug,
|
|
831
831
|
template: s
|
|
832
|
-
}), i = await
|
|
832
|
+
}), i = await t.authenticatedFetch(r, {
|
|
833
833
|
method: "POST",
|
|
834
834
|
headers: {
|
|
835
835
|
"Content-Type": "application/json",
|
|
@@ -837,7 +837,7 @@ function E(t) {
|
|
|
837
837
|
},
|
|
838
838
|
body: JSON.stringify({
|
|
839
839
|
current_content: e,
|
|
840
|
-
merge_tags:
|
|
840
|
+
merge_tags: n.map((e) => ({
|
|
841
841
|
label: e.label,
|
|
842
842
|
value: e.value
|
|
843
843
|
}))
|
|
@@ -877,16 +877,16 @@ function E(t) {
|
|
|
877
877
|
i.value = !1;
|
|
878
878
|
}
|
|
879
879
|
}
|
|
880
|
-
async function f(e,
|
|
880
|
+
async function f(e, n, i) {
|
|
881
881
|
let a = r();
|
|
882
882
|
if (!a) return null;
|
|
883
|
-
s.value =
|
|
883
|
+
s.value = n.id, c.value = "", u.value = null;
|
|
884
884
|
try {
|
|
885
885
|
let r = l(g["ai.fixFinding"], {
|
|
886
|
-
project:
|
|
887
|
-
tenant:
|
|
886
|
+
project: t.projectId,
|
|
887
|
+
tenant: t.tenantSlug,
|
|
888
888
|
template: a
|
|
889
|
-
}), o = await
|
|
889
|
+
}), o = await t.authenticatedFetch(r, {
|
|
890
890
|
method: "POST",
|
|
891
891
|
headers: {
|
|
892
892
|
"Content-Type": "application/json",
|
|
@@ -895,10 +895,10 @@ function E(t) {
|
|
|
895
895
|
body: JSON.stringify({
|
|
896
896
|
content: e,
|
|
897
897
|
finding: {
|
|
898
|
-
id:
|
|
899
|
-
message:
|
|
900
|
-
suggestion:
|
|
901
|
-
category:
|
|
898
|
+
id: n.id,
|
|
899
|
+
message: n.message,
|
|
900
|
+
suggestion: n.suggestion,
|
|
901
|
+
category: n.category
|
|
902
902
|
},
|
|
903
903
|
merge_tags: i.map((e) => ({
|
|
904
904
|
label: e.label,
|
|
@@ -961,20 +961,20 @@ function E(t) {
|
|
|
961
961
|
reset: m
|
|
962
962
|
};
|
|
963
963
|
}
|
|
964
|
-
function D(
|
|
965
|
-
let { authManager:
|
|
964
|
+
function D(e) {
|
|
965
|
+
let { authManager: t, getTemplateId: r, onApply: i, onError: a } = e, o = n(!1), s = n(null);
|
|
966
966
|
async function c(e) {
|
|
967
|
-
let
|
|
968
|
-
if (!
|
|
967
|
+
let n = r();
|
|
968
|
+
if (!n) throw Error("Template must be saved before using design reference");
|
|
969
969
|
o.value = !0, s.value = null;
|
|
970
970
|
try {
|
|
971
971
|
let r = new FormData();
|
|
972
972
|
e.prompt && r.append("prompt", e.prompt), e.imageUpload && r.append("image_upload", e.imageUpload), e.pdfUpload && r.append("pdf_upload", e.pdfUpload);
|
|
973
973
|
let a = l(g["ai.generateFromDesign"], {
|
|
974
|
-
project:
|
|
975
|
-
tenant:
|
|
976
|
-
template:
|
|
977
|
-
}), o = await
|
|
974
|
+
project: t.projectId,
|
|
975
|
+
tenant: t.tenantSlug,
|
|
976
|
+
template: n
|
|
977
|
+
}), o = await t.authenticatedFetch(a, {
|
|
978
978
|
method: "POST",
|
|
979
979
|
headers: { Accept: "text/event-stream" },
|
|
980
980
|
body: r
|
|
@@ -1022,8 +1022,8 @@ function D(t) {
|
|
|
1022
1022
|
reset: u
|
|
1023
1023
|
};
|
|
1024
1024
|
}
|
|
1025
|
-
function O(
|
|
1026
|
-
let { authManager:
|
|
1025
|
+
function O(e) {
|
|
1026
|
+
let { authManager: t, getTemplateId: r, getSocketId: a, onComment: o, onError: s, hasCommentingFeature: c } = e, l = new _(t), u = n([]), d = n(!1), f = n(!1), p = i(() => (c?.() ?? !1) && t.userConfig !== null), m = i(() => {
|
|
1027
1027
|
let e = 0;
|
|
1028
1028
|
for (let t of u.value) e += 1 + (t.replies?.length ?? 0);
|
|
1029
1029
|
return e;
|
|
@@ -1033,7 +1033,7 @@ function O(t) {
|
|
|
1033
1033
|
return e;
|
|
1034
1034
|
});
|
|
1035
1035
|
function v() {
|
|
1036
|
-
let e =
|
|
1036
|
+
let e = t.userConfig;
|
|
1037
1037
|
if (!e) throw Error("User config not available");
|
|
1038
1038
|
return {
|
|
1039
1039
|
user_id: e.id,
|
|
@@ -1221,12 +1221,12 @@ function O(t) {
|
|
|
1221
1221
|
};
|
|
1222
1222
|
}
|
|
1223
1223
|
function k(e) {
|
|
1224
|
-
let { comments:
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
A(
|
|
1224
|
+
let { comments: n, channel: r } = e;
|
|
1225
|
+
t(r, (e, t) => {
|
|
1226
|
+
t && t.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
1227
|
+
A(n, e);
|
|
1228
1228
|
});
|
|
1229
|
-
}),
|
|
1229
|
+
}), a(() => {
|
|
1230
1230
|
r.value?.unbind("comment-broadcast");
|
|
1231
1231
|
});
|
|
1232
1232
|
}
|
|
@@ -1270,8 +1270,8 @@ var N = [
|
|
|
1270
1270
|
"#6366f1",
|
|
1271
1271
|
"#14b8a6"
|
|
1272
1272
|
];
|
|
1273
|
-
function P(
|
|
1274
|
-
let { authManager: r, editor: o, channel: s } =
|
|
1273
|
+
function P(e) {
|
|
1274
|
+
let { authManager: r, editor: o, channel: s } = e, c = n([]), l = n(/* @__PURE__ */ new Map()), u = 0, d = !1, f = i(() => r.userConfig?.id ?? "");
|
|
1275
1275
|
function p() {
|
|
1276
1276
|
let e = N[u % N.length];
|
|
1277
1277
|
return u++, e;
|
|
@@ -1332,41 +1332,41 @@ function P(t) {
|
|
|
1332
1332
|
function S(e) {
|
|
1333
1333
|
s.value && s.value.trigger("client-block_unlocked", { blockId: e });
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1335
|
+
return t(() => o.state.selectedBlockId, (e, t) => {
|
|
1336
1336
|
d || (t && S(t), e && x(e));
|
|
1337
|
-
}),
|
|
1338
|
-
if (n && M(n), !
|
|
1337
|
+
}), t(s, (t, n) => {
|
|
1338
|
+
if (n && M(n), !t) {
|
|
1339
1339
|
c.value = [], l.value = /* @__PURE__ */ new Map(), u = 0;
|
|
1340
1340
|
return;
|
|
1341
1341
|
}
|
|
1342
|
-
let r =
|
|
1342
|
+
let r = t.members;
|
|
1343
1343
|
r && r.each((e) => {
|
|
1344
1344
|
m(e.info);
|
|
1345
|
-
}),
|
|
1346
|
-
let n = m(
|
|
1347
|
-
n &&
|
|
1348
|
-
}),
|
|
1349
|
-
let n = c.value.find((
|
|
1350
|
-
h(
|
|
1351
|
-
}),
|
|
1352
|
-
g(
|
|
1353
|
-
let n = c.value.find((
|
|
1354
|
-
n &&
|
|
1355
|
-
blockId:
|
|
1345
|
+
}), t.bind("pusher:member_added", (t) => {
|
|
1346
|
+
let n = m(t.info);
|
|
1347
|
+
n && e.onCollaboratorJoined?.(n);
|
|
1348
|
+
}), t.bind("pusher:member_removed", (t) => {
|
|
1349
|
+
let n = c.value.find((e) => e.id === t.id);
|
|
1350
|
+
h(t.id), n && e.onCollaboratorLeft?.(n);
|
|
1351
|
+
}), t.bind("client-block_locked", (t) => {
|
|
1352
|
+
g(t);
|
|
1353
|
+
let n = c.value.find((e) => e.id === t.userId);
|
|
1354
|
+
n && e.onBlockLocked?.({
|
|
1355
|
+
blockId: t.blockId,
|
|
1356
1356
|
collaborator: n
|
|
1357
1357
|
});
|
|
1358
|
-
}),
|
|
1359
|
-
let n = l.value.get(
|
|
1360
|
-
_(
|
|
1361
|
-
blockId:
|
|
1358
|
+
}), t.bind("client-block_unlocked", (t) => {
|
|
1359
|
+
let n = l.value.get(t.blockId);
|
|
1360
|
+
_(t), n && e.onBlockUnlocked?.({
|
|
1361
|
+
blockId: t.blockId,
|
|
1362
1362
|
collaborator: n
|
|
1363
1363
|
});
|
|
1364
|
-
}),
|
|
1364
|
+
}), t.bind("client-operation", (e) => {
|
|
1365
1365
|
v(e);
|
|
1366
|
-
}),
|
|
1366
|
+
}), t.bind("mcp-operation", (e) => {
|
|
1367
1367
|
v(e);
|
|
1368
1368
|
});
|
|
1369
|
-
}),
|
|
1369
|
+
}), a(() => {
|
|
1370
1370
|
s.value && M(s.value);
|
|
1371
1371
|
}), {
|
|
1372
1372
|
collaborators: c,
|
|
@@ -1427,13 +1427,13 @@ function F(e, t) {
|
|
|
1427
1427
|
});
|
|
1428
1428
|
};
|
|
1429
1429
|
}
|
|
1430
|
-
function I(
|
|
1431
|
-
let { authManager:
|
|
1432
|
-
async function c(e,
|
|
1430
|
+
function I(e) {
|
|
1431
|
+
let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = null, s = null;
|
|
1432
|
+
async function c(e, n) {
|
|
1433
1433
|
if (o) return;
|
|
1434
1434
|
o = new y({
|
|
1435
|
-
authManager:
|
|
1436
|
-
config:
|
|
1435
|
+
authManager: t,
|
|
1436
|
+
config: n,
|
|
1437
1437
|
onError: r
|
|
1438
1438
|
}), await o.connect(), s = `presence-template.${e}`;
|
|
1439
1439
|
let c = o.subscribePresence(s);
|
|
@@ -1457,42 +1457,42 @@ function I(t) {
|
|
|
1457
1457
|
getSocketId: u
|
|
1458
1458
|
};
|
|
1459
1459
|
}
|
|
1460
|
-
function L(
|
|
1461
|
-
let
|
|
1462
|
-
async function a(
|
|
1460
|
+
function L(e) {
|
|
1461
|
+
let t = new _(e.authManager), r = n([]), i = n(!1);
|
|
1462
|
+
async function a(n) {
|
|
1463
1463
|
i.value = !0;
|
|
1464
1464
|
try {
|
|
1465
|
-
r.value = await
|
|
1466
|
-
} catch (
|
|
1467
|
-
throw
|
|
1465
|
+
r.value = await t.listModules(n);
|
|
1466
|
+
} catch (t) {
|
|
1467
|
+
throw e.onError?.(t), t;
|
|
1468
1468
|
} finally {
|
|
1469
1469
|
i.value = !1;
|
|
1470
1470
|
}
|
|
1471
1471
|
}
|
|
1472
|
-
async function o(
|
|
1472
|
+
async function o(n, i) {
|
|
1473
1473
|
try {
|
|
1474
|
-
let
|
|
1475
|
-
name:
|
|
1474
|
+
let e = await t.createModule({
|
|
1475
|
+
name: n,
|
|
1476
1476
|
content: i
|
|
1477
1477
|
});
|
|
1478
|
-
return r.value = [
|
|
1479
|
-
} catch (
|
|
1480
|
-
throw
|
|
1478
|
+
return r.value = [e, ...r.value], e;
|
|
1479
|
+
} catch (t) {
|
|
1480
|
+
throw e.onError?.(t), t;
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
|
-
async function s(
|
|
1483
|
+
async function s(n, i) {
|
|
1484
1484
|
try {
|
|
1485
|
-
let
|
|
1486
|
-
return r.value = r.value.map((
|
|
1487
|
-
} catch (
|
|
1488
|
-
throw
|
|
1485
|
+
let e = await t.updateModule(n, i);
|
|
1486
|
+
return r.value = r.value.map((t) => t.id === n ? e : t), e;
|
|
1487
|
+
} catch (t) {
|
|
1488
|
+
throw e.onError?.(t), t;
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
|
-
async function c(
|
|
1491
|
+
async function c(n) {
|
|
1492
1492
|
try {
|
|
1493
|
-
await
|
|
1494
|
-
} catch (
|
|
1495
|
-
throw
|
|
1493
|
+
await t.deleteModule(n), r.value = r.value.filter((e) => e.id !== n);
|
|
1494
|
+
} catch (t) {
|
|
1495
|
+
throw e.onError?.(t), t;
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
return {
|
|
@@ -1504,25 +1504,25 @@ function L(t) {
|
|
|
1504
1504
|
deleteModule: c
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
|
-
function R(
|
|
1508
|
-
let
|
|
1507
|
+
function R(e) {
|
|
1508
|
+
let t = new _(e.authManager), r = n([]), i = n(!1), a = n(!1);
|
|
1509
1509
|
async function o() {
|
|
1510
1510
|
i.value = !0;
|
|
1511
1511
|
try {
|
|
1512
|
-
r.value = await
|
|
1513
|
-
} catch (
|
|
1514
|
-
throw
|
|
1512
|
+
r.value = await t.getSnapshots(e.templateId);
|
|
1513
|
+
} catch (t) {
|
|
1514
|
+
throw e.onError?.(t), t;
|
|
1515
1515
|
} finally {
|
|
1516
1516
|
i.value = !1;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
-
async function s(
|
|
1519
|
+
async function s(n) {
|
|
1520
1520
|
a.value = !0;
|
|
1521
1521
|
try {
|
|
1522
|
-
let r = await
|
|
1523
|
-
return
|
|
1524
|
-
} catch (
|
|
1525
|
-
throw
|
|
1522
|
+
let r = await t.restoreSnapshot(e.templateId, n);
|
|
1523
|
+
return e.onRestore?.(r), r;
|
|
1524
|
+
} catch (t) {
|
|
1525
|
+
throw e.onError?.(t), t;
|
|
1526
1526
|
} finally {
|
|
1527
1527
|
a.value = !1;
|
|
1528
1528
|
}
|
|
@@ -1535,15 +1535,15 @@ function R(t) {
|
|
|
1535
1535
|
restoreSnapshot: s
|
|
1536
1536
|
};
|
|
1537
1537
|
}
|
|
1538
|
-
function z(
|
|
1539
|
-
let { authManager:
|
|
1540
|
-
l &&
|
|
1541
|
-
e && (m.value =
|
|
1538
|
+
function z(e) {
|
|
1539
|
+
let { authManager: r, getTemplateId: a, save: o, exportHtml: s, onError: c, isAuthReady: l, onBeforeTestEmail: u } = e, d = new _(r), f = n(!1), p = n(null), m = n(null);
|
|
1540
|
+
l && t(l, (e) => {
|
|
1541
|
+
e && (m.value = r.testEmailConfig);
|
|
1542
1542
|
}, { immediate: !0 });
|
|
1543
1543
|
let h = i(() => m.value !== null), g = i(() => m.value?.allowedEmails ?? []);
|
|
1544
1544
|
async function v(e) {
|
|
1545
1545
|
if (!m.value) throw Error("Test email is not enabled for this project");
|
|
1546
|
-
let t =
|
|
1546
|
+
let t = a();
|
|
1547
1547
|
if (!t) throw Error("Template must be saved before sending a test email");
|
|
1548
1548
|
f.value = !0, p.value = null;
|
|
1549
1549
|
try {
|
|
@@ -1595,8 +1595,8 @@ function B(e) {
|
|
|
1595
1595
|
getMjmlSource: s
|
|
1596
1596
|
};
|
|
1597
1597
|
}
|
|
1598
|
-
function V(
|
|
1599
|
-
let { authManager:
|
|
1598
|
+
function V(e) {
|
|
1599
|
+
let { authManager: t, onError: r } = e, a = n(null), o = n(!1), s = new _(t), c = i(() => a.value?.features ?? null);
|
|
1600
1600
|
function l(e) {
|
|
1601
1601
|
return a.value?.features[e] ?? !1;
|
|
1602
1602
|
}
|
|
@@ -1722,10 +1722,10 @@ async function K(e = {}) {
|
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
1724
1724
|
function q(e) {
|
|
1725
|
-
let { editor:
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
b(
|
|
1725
|
+
let { editor: n, channel: r, onOperation: i } = e;
|
|
1726
|
+
t(r, (e, t) => {
|
|
1727
|
+
t && t.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
1728
|
+
b(n, e), i?.(e);
|
|
1729
1729
|
});
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as e, d as t, w as n } from "./vue.runtime.esm-bundler-Bxqkjqhc.js";
|
|
2
2
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.14.0_vue@3.5.33_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/isEmptyString.mjs
|
|
3
3
|
var r = (e) => e === "", i = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), a = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), o = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), s = (e) => {
|
|
4
4
|
let t = o(e);
|
|
@@ -15,29 +15,29 @@ var r = (e) => e === "", i = (...e) => e.filter((e, t, n) => !!e && e.trim() !==
|
|
|
15
15
|
"stroke-linejoin": "round"
|
|
16
16
|
}, l = Symbol("lucide-icons");
|
|
17
17
|
function u() {
|
|
18
|
-
return
|
|
18
|
+
return n(l, {});
|
|
19
19
|
}
|
|
20
20
|
//#endregion
|
|
21
21
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.14.0_vue@3.5.33_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
22
|
-
var d = ({ name:
|
|
22
|
+
var d = ({ name: n, iconNode: o, absoluteStrokeWidth: l, "absolute-stroke-width": d, strokeWidth: f, "stroke-width": p, size: m, color: h, ...g }, { slots: _ }) => {
|
|
23
23
|
let { size: v, color: y, strokeWidth: b = 2, absoluteStrokeWidth: x = !1, class: S = "" } = u(), C = t(() => {
|
|
24
24
|
let e = r(l) || r(d) || l === !0 || d === !0 || x === !0, t = f || p || b || c["stroke-width"];
|
|
25
25
|
return e ? Number(t) * 24 / Number(m ?? v ?? c.width) : t;
|
|
26
26
|
});
|
|
27
|
-
return
|
|
27
|
+
return e("svg", {
|
|
28
28
|
...c,
|
|
29
29
|
...g,
|
|
30
30
|
width: m ?? v ?? c.width,
|
|
31
31
|
height: m ?? v ?? c.height,
|
|
32
32
|
stroke: h ?? y ?? c.stroke,
|
|
33
33
|
"stroke-width": C.value,
|
|
34
|
-
class: i("lucide", S, ...
|
|
35
|
-
}, [...o.map((
|
|
36
|
-
}, f = (
|
|
34
|
+
class: i("lucide", S, ...n ? [`lucide-${a(s(n))}-icon`, `lucide-${a(n)}`] : ["lucide-icon"])
|
|
35
|
+
}, [...o.map((t) => e(...t)), ..._.default ? [_.default()] : []]);
|
|
36
|
+
}, f = (t, n) => (r, { slots: i, attrs: a }) => e(d, {
|
|
37
37
|
...a,
|
|
38
38
|
...r,
|
|
39
|
-
iconNode:
|
|
40
|
-
name:
|
|
39
|
+
iconNode: n,
|
|
40
|
+
name: t
|
|
41
41
|
}, i);
|
|
42
42
|
//#endregion
|
|
43
43
|
export { f as t };
|