@templatical/editor 0.6.4 → 0.6.6

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.
Files changed (128) hide show
  1. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-B2MT0M58.js} +34 -34
  2. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-w5ek3Z76.js} +62 -62
  3. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-ChlAWywJ.js} +20 -20
  4. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-C0S6kPC4.js} +12 -12
  5. package/dist/{CloudEditor-nzrRhHIi.js → CloudEditor-DYYaScFe.js} +441 -441
  6. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bo8vtPId.js} +20 -20
  7. package/dist/CommentsSidebar-BQROg36f.js +441 -0
  8. package/dist/{cdn/chunks/CountdownBlock-5YdT1uUu.js → CountdownBlock-Bxqe7zwL.js} +21 -22
  9. package/dist/CountdownToolbar-CpFAnjSo.js +210 -0
  10. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-CfqpcWX6.js} +52 -52
  11. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-CFkDkjBb.js} +1 -1
  12. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-CKhsaPnA.js} +79 -79
  13. package/dist/{ModulePreviewCanvas-CHdOwV_4.js → ModulePreviewCanvas-Cw9GeGus.js} +29 -29
  14. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-Dw8dN1Pt.js} +88 -88
  15. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DjDiUzmv.js} +218 -218
  16. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CK3Om7ES.js} +38 -38
  17. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-CSUPmfRP.js} +34 -34
  18. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-DwX2fj6N.js} +33 -33
  19. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-BIAeCAEP.js} +82 -82
  20. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-CIlBvWWn.js} +30 -30
  21. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-BCV5k6wj.js} +67 -67
  22. package/dist/{TplModal-BwSfxIHf.js → TplModal-C3Hq9b58.js} +14 -14
  23. package/dist/{accessibility-e8JYu_zd.js → accessibility-BgUEA-Ai.js} +1 -1
  24. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-iUurP50H.js} +2 -2
  25. package/dist/bundle-stats.json +6 -6
  26. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js → AccessibilityPanel-AQD2ygU6.js} +34 -34
  27. package/dist/cdn/chunks/{AccessibilityPanel-B6DOjojm.js.map → AccessibilityPanel-AQD2ygU6.js.map} +1 -1
  28. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js → AiFeatureMenu-CDh9ifC8.js} +16 -16
  29. package/dist/cdn/chunks/{AiFeatureMenu-qEdB2fZJ.js.map → AiFeatureMenu-CDh9ifC8.js.map} +1 -1
  30. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js → BlockA11yBadge-BxZr3s7T.js} +10 -10
  31. package/dist/cdn/chunks/{BlockA11yBadge-DcEZftf6.js.map → BlockA11yBadge-BxZr3s7T.js.map} +1 -1
  32. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js → CloudEditor-Fg7pQ9IQ.js} +425 -425
  33. package/dist/cdn/chunks/{CloudEditor-dwzWDF_n.js.map → CloudEditor-Fg7pQ9IQ.js.map} +1 -1
  34. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js → CollaboratorBar-B5a8eBXN.js} +20 -20
  35. package/dist/cdn/chunks/{CollaboratorBar--nO7TX6b.js.map → CollaboratorBar-B5a8eBXN.js.map} +1 -1
  36. package/dist/cdn/chunks/CountdownBlock-BeHkO19t.js +93 -0
  37. package/dist/cdn/chunks/{CountdownBlock-5YdT1uUu.js.map → CountdownBlock-BeHkO19t.js.map} +1 -1
  38. package/dist/cdn/chunks/CountdownToolbar-8UfW0jb1.js +212 -0
  39. package/dist/cdn/chunks/{CountdownToolbar-DXPXrbAA.js.map → CountdownToolbar-8UfW0jb1.js.map} +1 -1
  40. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js → ModuleBrowserModal-BMUyAmmj.js} +43 -43
  41. package/dist/cdn/chunks/{ModuleBrowserModal-DxoPp81s.js.map → ModuleBrowserModal-BMUyAmmj.js.map} +1 -1
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js → ModulePreviewCanvas-CxSc7Pvd.js} +23 -23
  43. package/dist/cdn/chunks/{ModulePreviewCanvas-CoLdb4ar.js.map → ModulePreviewCanvas-CxSc7Pvd.js.map} +1 -1
  44. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js → NumberWithSuffix-BSOUOUCL.js} +108 -108
  45. package/dist/cdn/chunks/{NumberWithSuffix-CE3NrZhH.js.map → NumberWithSuffix-BSOUOUCL.js.map} +1 -1
  46. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js → ParagraphEditor-S1bpgxe5.js} +187 -187
  47. package/dist/cdn/chunks/{ParagraphEditor-B6Ygu-Mq.js.map → ParagraphEditor-S1bpgxe5.js.map} +1 -1
  48. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js → RichTextEditorContent-ByehRfEA.js} +33 -33
  49. package/dist/cdn/chunks/{RichTextEditorContent-DL_y2SrR.js.map → RichTextEditorContent-ByehRfEA.js.map} +1 -1
  50. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js → SaveModuleDialog-5CNMvgYL.js} +27 -27
  51. package/dist/cdn/chunks/{SaveModuleDialog-B0TnO_o9.js.map → SaveModuleDialog-5CNMvgYL.js.map} +1 -1
  52. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js → TitleEditor-BASWPsCM.js} +66 -66
  53. package/dist/cdn/chunks/{TitleEditor-BHpfxvwy.js.map → TitleEditor-BASWPsCM.js.map} +1 -1
  54. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js → blockTypeIcons-DfOffaYP.js} +3 -3
  55. package/dist/cdn/chunks/{blockTypeIcons-BzzY9_kA.js.map → blockTypeIcons-DfOffaYP.js.map} +1 -1
  56. package/dist/cdn/chunks/draggable-CNhyCGIO.js +4804 -0
  57. package/dist/cdn/chunks/draggable-CNhyCGIO.js.map +1 -0
  58. package/dist/cdn/chunks/{extensions-DIxF31tA.js → extensions-BJOV1jre.js} +95 -95
  59. package/dist/cdn/chunks/{extensions-DIxF31tA.js.map → extensions-BJOV1jre.js.map} +1 -1
  60. package/dist/cdn/chunks/{features-DEMb13KS.js → features-D6FoOm8v.js} +2272 -2269
  61. package/dist/cdn/chunks/features-D6FoOm8v.js.map +1 -0
  62. package/dist/cdn/chunks/{icons-CsLTcirh.js → icons-CpsjWPU-.js} +2 -2
  63. package/dist/cdn/chunks/{icons-CsLTcirh.js.map → icons-CpsjWPU-.js.map} +1 -1
  64. package/dist/cdn/chunks/{media-library-CVaNvhpM.js → media-library-CEd7Lqxk.js} +1397 -1397
  65. package/dist/cdn/chunks/{media-library-CVaNvhpM.js.map → media-library-CEd7Lqxk.js.map} +1 -1
  66. package/dist/cdn/chunks/{pusher-CDbNlZBE.js → pusher-bjpcqCZG.js} +2 -2
  67. package/dist/cdn/chunks/{pusher-CDbNlZBE.js.map → pusher-bjpcqCZG.js.map} +1 -1
  68. package/dist/cdn/chunks/{quality-BaBfc54_.js → quality-Bx1oORXQ.js} +3 -3
  69. package/dist/cdn/chunks/{quality-BaBfc54_.js.map → quality-Bx1oORXQ.js.map} +1 -1
  70. package/dist/cdn/chunks/{renderer-CUxvx7ro.js → renderer-CwxCisa-.js} +3 -3
  71. package/dist/cdn/chunks/{renderer-CUxvx7ro.js.map → renderer-CwxCisa-.js.map} +1 -1
  72. package/dist/{rolldown-runtime-BZGGJVDF.js → cdn/chunks/rolldown-runtime-C266TIVP.js} +5 -5
  73. package/dist/cdn/chunks/{src-CRaqN-p8.js → src-DDSInEkE.js} +171 -171
  74. package/dist/cdn/chunks/{src-CRaqN-p8.js.map → src-DDSInEkE.js.map} +1 -1
  75. package/dist/cdn/chunks/styles-B1uu-Cc9.js +2944 -0
  76. package/dist/cdn/chunks/styles-B1uu-Cc9.js.map +1 -0
  77. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js → tiptap-IyIsncxY.js} +45 -46
  78. package/dist/cdn/chunks/{tiptap-ZhwKyFp7.js.map → tiptap-IyIsncxY.js.map} +1 -1
  79. package/dist/cdn/editor.css +1 -1
  80. package/dist/cdn/editor.js +122 -122
  81. package/dist/cdn/editor.js.map +1 -1
  82. package/dist/{check-Da05j8yl.js → check-Bg5yrRmX.js} +1 -1
  83. package/dist/{chevron-down-R2uY34iD.js → chevron-down-tee-ghFi.js} +1 -1
  84. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-C0L9pUQ4.js} +1 -1
  85. package/dist/{clock-CRp2sIub.js → clock-CDlEdqiP.js} +1 -1
  86. package/dist/{cloud-DEk_b4CR.js → cloud-a3VovHva.js} +145 -145
  87. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-Di4mqmGn.js} +9 -9
  88. package/dist/{dist-B1IR0bpH.js → dist-BzRLLpfq.js} +107 -107
  89. package/dist/{dist-BFawx6IS.js → dist-Pk4MhWMP.js} +35 -35
  90. package/dist/{extensions-CUcl9Ok4.js → extensions-BF39Siqk.js} +103 -103
  91. package/dist/{image-up-MBZKKg9p.js → image-up-1D_3XDdO.js} +1 -1
  92. package/dist/index.d.ts +8 -8
  93. package/dist/{info-CJEC7piy.js → info-DTGrc0Bx.js} +1 -1
  94. package/dist/{keys-ciNfSSGj.js → keys-Bqs_0du9.js} +1 -1
  95. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-_9bP23op.js} +1 -1
  96. package/dist/{message-circle-yElBbR2C.js → message-circle-gzy2ZGJ3.js} +1 -1
  97. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-BNAhAmtL.js} +1 -1
  98. package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
  99. package/dist/{scan-line-D0vcUekt.js → scan-line-DUEg6DoT.js} +1 -1
  100. package/dist/{send-DH4oDQqC.js → send-BatIZC9a.js} +1 -1
  101. package/dist/{shield-check-CfJgs2Hd.js → shield-check-C5Gv2cM1.js} +1 -1
  102. package/dist/{sparkles-CvRXGqFs.js → sparkles-D1IGi_cC.js} +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/styles-BgmKdc2x.js +3173 -0
  105. package/dist/templatical-editor.js +99 -99
  106. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-DG3aAH7Y.js} +1 -1
  107. package/dist/{trash-2-DbP2Y6t2.js → trash-2-424iqbpN.js} +1 -1
  108. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-DWQySIE2.js} +1 -1
  109. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-CL_AwWwi.js} +4 -4
  110. package/dist/useEditorCore-CnXrv71D.js +3794 -0
  111. package/dist/{useI18n-lb2DHDiu.js → useI18n-CgmQftNf.js} +4 -4
  112. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-vpwrZ9eQ.js} +3 -3
  113. package/dist/vue.runtime.esm-bundler-Bxqkjqhc.js +4300 -0
  114. package/dist/{x-u2oVmjN_.js → x-Dlaenqta.js} +1 -1
  115. package/package.json +8 -8
  116. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  117. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  118. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  119. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  120. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  121. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  122. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  123. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  124. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  125. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  126. package/dist/styles-DEXEkBvg.js +0 -3176
  127. package/dist/useEditorCore-C6ost42Q.js +0 -9342
  128. package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +0 -5775
@@ -1,4 +1,4 @@
1
- import { Q as e, X as t, Y as n, Z as r, p as i, z as a } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
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(e) {
435
- let n = new _(e.authManager), a = t({
434
+ function x(t) {
435
+ let n = new _(t.authManager), a = e({
436
436
  template: null,
437
- content: s(e.defaultFontFamily, e.templateDefaults),
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(t) {
483
- return e.lockedBlocks?.value.has(t) ?? !1;
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(t) {
545
+ async function E(e) {
546
546
  a.isLoading = !0;
547
547
  try {
548
- t && (a.content = t);
549
- let e = await n.createTemplate(a.content);
550
- return a.template = e, a.isDirty = !1, e;
551
- } catch (t) {
552
- throw e.onError?.(t), t;
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(t) {
557
+ async function D(e) {
558
558
  a.isLoading = !0;
559
559
  try {
560
- let e = await n.getTemplate(t);
561
- return a.template = e, a.content = e.content, a.isDirty = !1, e;
562
- } catch (t) {
563
- throw e.onError?.(t), t;
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 (t) {
575
- throw e.onError?.(t), t;
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 (t) {
584
- throw e.onError?.(t), t;
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(t) {
623
- let { authManager: n, getTemplateId: r, onApply: i, onError: a } = t, o = e([]), s = e(!1), c = e(!1), u = e(null), d = e(null), f = e(null), p = e(null), m = e(null), h = e(null), _ = e(!1), v = e([]), y = e(!1);
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 t = l(g["ai.conversationMessages"], {
643
- project: n.projectId,
644
- tenant: n.tenantSlug,
642
+ let n = l(g["ai.conversationMessages"], {
643
+ project: t.projectId,
644
+ tenant: t.tenantSlug,
645
645
  template: e
646
- }), r = await n.authenticatedFetch(t, {
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, t) {
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: n.projectId,
670
- tenant: n.tenantSlug,
669
+ project: t.projectId,
670
+ tenant: t.tenantSlug,
671
671
  template: i
672
- }), a = await n.authenticatedFetch(r, {
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: t.map((e) => ({
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, t, c) {
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: n.projectId,
733
- tenant: n.tenantSlug,
732
+ project: t.projectId,
733
+ tenant: t.tenantSlug,
734
734
  template: y
735
- }), a = await n.authenticatedFetch(r, {
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: t,
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: n } = await s.read();
760
+ let { done: e, value: t } = await s.read();
761
761
  if (e) break;
762
- v += d.decode(n, { stream: !0 });
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 n = e.slice(6), r;
767
+ let t = e.slice(6), r;
768
768
  try {
769
- r = JSON.parse(n);
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 = t, h.value = x, p.value = S, _.value = !1, i?.(x)) : u.value = "ai_apply_failed");
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(t) {
822
- let { authManager: n, getTemplateId: r } = t, i = e(!1), a = e(null), o = e(null), s = e(null), c = e(""), u = e(null);
823
- async function d(e, t) {
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: n.projectId,
830
- tenant: n.tenantSlug,
829
+ project: t.projectId,
830
+ tenant: t.tenantSlug,
831
831
  template: s
832
- }), i = await n.authenticatedFetch(r, {
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: t.map((e) => ({
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, t, i) {
880
+ async function f(e, n, i) {
881
881
  let a = r();
882
882
  if (!a) return null;
883
- s.value = t.id, c.value = "", u.value = null;
883
+ s.value = n.id, c.value = "", u.value = null;
884
884
  try {
885
885
  let r = l(g["ai.fixFinding"], {
886
- project: n.projectId,
887
- tenant: n.tenantSlug,
886
+ project: t.projectId,
887
+ tenant: t.tenantSlug,
888
888
  template: a
889
- }), o = await n.authenticatedFetch(r, {
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: t.id,
899
- message: t.message,
900
- suggestion: t.suggestion,
901
- category: t.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(t) {
965
- let { authManager: n, getTemplateId: r, onApply: i, onError: a } = t, o = e(!1), s = e(null);
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 t = r();
968
- if (!t) throw Error("Template must be saved before using design reference");
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: n.projectId,
975
- tenant: n.tenantSlug,
976
- template: t
977
- }), o = await n.authenticatedFetch(a, {
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(t) {
1026
- let { authManager: n, getTemplateId: r, getSocketId: a, onComment: o, onError: s, hasCommentingFeature: c } = t, l = new _(n), u = e([]), d = e(!1), f = e(!1), p = i(() => (c?.() ?? !1) && n.userConfig !== null), m = i(() => {
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 = n.userConfig;
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: t, channel: r } = e;
1225
- a(r, (e, n) => {
1226
- n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
1227
- A(t, e);
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
- }), n(() => {
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(t) {
1274
- let { authManager: r, editor: o, channel: s } = t, c = e([]), l = e(/* @__PURE__ */ new Map()), u = 0, d = !1, f = i(() => r.userConfig?.id ?? "");
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 a(() => o.state.selectedBlockId, (e, t) => {
1335
+ return t(() => o.state.selectedBlockId, (e, t) => {
1336
1336
  d || (t && S(t), e && x(e));
1337
- }), a(s, (e, n) => {
1338
- if (n && M(n), !e) {
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 = e.members;
1342
+ let r = t.members;
1343
1343
  r && r.each((e) => {
1344
1344
  m(e.info);
1345
- }), e.bind("pusher:member_added", (e) => {
1346
- let n = m(e.info);
1347
- n && t.onCollaboratorJoined?.(n);
1348
- }), e.bind("pusher:member_removed", (e) => {
1349
- let n = c.value.find((t) => t.id === e.id);
1350
- h(e.id), n && t.onCollaboratorLeft?.(n);
1351
- }), e.bind("client-block_locked", (e) => {
1352
- g(e);
1353
- let n = c.value.find((t) => t.id === e.userId);
1354
- n && t.onBlockLocked?.({
1355
- blockId: e.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
- }), e.bind("client-block_unlocked", (e) => {
1359
- let n = l.value.get(e.blockId);
1360
- _(e), n && t.onBlockUnlocked?.({
1361
- blockId: e.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
- }), e.bind("client-operation", (e) => {
1364
+ }), t.bind("client-operation", (e) => {
1365
1365
  v(e);
1366
- }), e.bind("mcp-operation", (e) => {
1366
+ }), t.bind("mcp-operation", (e) => {
1367
1367
  v(e);
1368
1368
  });
1369
- }), n(() => {
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(t) {
1431
- let { authManager: n, onError: r } = t, i = e(null), a = e(!1), o = null, s = null;
1432
- async function c(e, t) {
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: n,
1436
- config: t,
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(t) {
1461
- let n = new _(t.authManager), r = e([]), i = e(!1);
1462
- async function a(e) {
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 n.listModules(e);
1466
- } catch (e) {
1467
- throw t.onError?.(e), e;
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(e, i) {
1472
+ async function o(n, i) {
1473
1473
  try {
1474
- let t = await n.createModule({
1475
- name: e,
1474
+ let e = await t.createModule({
1475
+ name: n,
1476
1476
  content: i
1477
1477
  });
1478
- return r.value = [t, ...r.value], t;
1479
- } catch (e) {
1480
- throw t.onError?.(e), e;
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(e, i) {
1483
+ async function s(n, i) {
1484
1484
  try {
1485
- let t = await n.updateModule(e, i);
1486
- return r.value = r.value.map((n) => n.id === e ? t : n), t;
1487
- } catch (e) {
1488
- throw t.onError?.(e), e;
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(e) {
1491
+ async function c(n) {
1492
1492
  try {
1493
- await n.deleteModule(e), r.value = r.value.filter((t) => t.id !== e);
1494
- } catch (e) {
1495
- throw t.onError?.(e), e;
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(t) {
1508
- let n = new _(t.authManager), r = e([]), i = e(!1), a = e(!1);
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 n.getSnapshots(t.templateId);
1513
- } catch (e) {
1514
- throw t.onError?.(e), e;
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(e) {
1519
+ async function s(n) {
1520
1520
  a.value = !0;
1521
1521
  try {
1522
- let r = await n.restoreSnapshot(t.templateId, e);
1523
- return t.onRestore?.(r), r;
1524
- } catch (e) {
1525
- throw t.onError?.(e), e;
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(t) {
1539
- let { authManager: n, getTemplateId: r, save: o, exportHtml: s, onError: c, isAuthReady: l, onBeforeTestEmail: u } = t, d = new _(n), f = e(!1), p = e(null), m = e(null);
1540
- l && a(l, (e) => {
1541
- e && (m.value = n.testEmailConfig);
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 = r();
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(t) {
1599
- let { authManager: n, onError: r } = t, a = e(null), o = e(!1), s = new _(n), c = i(() => a.value?.features ?? null);
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: t, channel: n, onOperation: r } = e;
1726
- a(n, (e, n) => {
1727
- n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
1728
- b(t, e), r?.(e);
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 { E as e, p as t, w as n } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
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 e(l, {});
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: e, iconNode: o, absoluteStrokeWidth: l, "absolute-stroke-width": d, strokeWidth: f, "stroke-width": p, size: m, color: h, ...g }, { slots: _ }) => {
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 n("svg", {
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, ...e ? [`lucide-${a(s(e))}-icon`, `lucide-${a(e)}`] : ["lucide-icon"])
35
- }, [...o.map((e) => n(...e)), ..._.default ? [_.default()] : []]);
36
- }, f = (e, t) => (r, { slots: i, attrs: a }) => n(d, {
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: t,
40
- name: e
39
+ iconNode: n,
40
+ name: t
41
41
  }, i);
42
42
  //#endregion
43
43
  export { f as t };