@templatical/editor 0.0.2 → 0.0.4

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 (143) hide show
  1. package/dist/{AiChatSidebar-XBj5Rw2l.js → AiChatSidebar-CjfhTZwo.js} +1 -1
  2. package/dist/{AiFeatureMenu-my1mZ9DL.js → AiFeatureMenu-K44aZa_P.js} +3 -3
  3. package/dist/CloudEditor-DFyuRxUV.js +926 -0
  4. package/dist/{CollaboratorBar-BZq_Gv38.js → CollaboratorBar-BuCEcdbB.js} +25 -21
  5. package/dist/{CommentsSidebar-D9oxqO6l.js → CommentsSidebar-2lcqMfIP.js} +2 -2
  6. package/dist/{DesignReferenceSidebar-CyHq4SWt.js → DesignReferenceSidebar-CNMu4Zrx.js} +55 -54
  7. package/dist/{ModuleBrowserModal-Cus2Hdwl.js → ModuleBrowserModal-CvQ0xyQf.js} +6 -6
  8. package/dist/{ModulePreviewCanvas-DaByXKY_.js → ModulePreviewCanvas-Be2B3Y07.js} +3 -3
  9. package/dist/ParagraphEditor-CcMPnbDr.js +652 -0
  10. package/dist/{RichTextEditorContent-BRpjJ6SV.js → RichTextEditorContent-CHJlh7HJ.js} +8 -4
  11. package/dist/{SaveModuleDialog-BIZBQrd8.js → SaveModuleDialog-BaaeH5Xm.js} +5 -5
  12. package/dist/{SnapshotHistory-Ds1-QNbx.js → SnapshotHistory-BPfjiuu1.js} +2 -2
  13. package/dist/{TemplateScoringPanel-C8XSk_Ys.js → TemplateScoringPanel-D58A23Vq.js} +3 -3
  14. package/dist/{TestEmailModal-CCVfaFgV.js → TestEmailModal-DIAlB3e_.js} +3 -3
  15. package/dist/{TitleEditor-V4qaEULF.js → TitleEditor-D9DPjQkX.js} +7 -7
  16. package/dist/{TplModal-LT3FXlgs.js → TplModal-CmTSvCY-.js} +2 -2
  17. package/dist/{blockTypeIcons-BujoY5Dl.js → blockTypeIcons-D1RTWOkx.js} +1 -1
  18. package/dist/cdn/chunks/AiChatSidebar-CmPTbTFG.js +2 -0
  19. package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js +59 -0
  20. package/dist/cdn/chunks/AiFeatureMenu-lxVm1RjH.js.map +1 -0
  21. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js +900 -0
  22. package/dist/cdn/chunks/CloudEditor-Bmp5IlWi.js.map +1 -0
  23. package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js +51 -0
  24. package/dist/cdn/chunks/CollaboratorBar-D2PKtlOw.js.map +1 -0
  25. package/dist/cdn/chunks/CommentsSidebar-BOelj4Ca.js +2 -0
  26. package/dist/cdn/chunks/DesignReferenceSidebar-Bf6rg0A7.js +2 -0
  27. package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js +195 -0
  28. package/dist/cdn/chunks/ModuleBrowserModal-CxDXzkKS.js.map +1 -0
  29. package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js +107 -0
  30. package/dist/cdn/chunks/ModulePreviewCanvas-DEfHampA.js.map +1 -0
  31. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js +503 -0
  32. package/dist/cdn/chunks/ParagraphEditor-DHdu6lb3.js.map +1 -0
  33. package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js +106 -0
  34. package/dist/cdn/chunks/RichTextEditorContent-DWUzizsC.js.map +1 -0
  35. package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js +119 -0
  36. package/dist/cdn/chunks/SaveModuleDialog-DVna2xUl.js.map +1 -0
  37. package/dist/cdn/chunks/SnapshotHistory-BFF2SsTN.js +2 -0
  38. package/dist/cdn/chunks/TemplateScoringPanel-gi8wc_m7.js +2 -0
  39. package/dist/cdn/chunks/TestEmailModal-Qtd6aC-6.js +2 -0
  40. package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js +166 -0
  41. package/dist/cdn/chunks/TitleEditor-DDf_OcHS.js.map +1 -0
  42. package/dist/cdn/chunks/_rolldown_dynamic_import_helper-DMEI4TQ3.js +9 -0
  43. package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js +22 -0
  44. package/dist/cdn/chunks/blockTypeIcons-BnobReQm.js.map +1 -0
  45. package/dist/cdn/chunks/de-BB3dgVOc.js +700 -0
  46. package/dist/cdn/chunks/de-BB3dgVOc.js.map +1 -0
  47. package/dist/cdn/chunks/de-BvYD17KT.js +89 -0
  48. package/dist/cdn/chunks/de-BvYD17KT.js.map +1 -0
  49. package/dist/cdn/chunks/dist-B6AUkMyh.js +2 -0
  50. package/dist/cdn/chunks/dist-B878xb_62.js +457 -0
  51. package/dist/cdn/chunks/dist-B878xb_62.js.map +1 -0
  52. package/dist/cdn/chunks/dist-Bf1Op9A1.js +2 -0
  53. package/dist/cdn/chunks/dist-BkETaOfw.js +2 -0
  54. package/dist/cdn/chunks/dist-CJcMnY7o.js +2 -0
  55. package/dist/cdn/chunks/dist-CWsl6S1K.js +2 -0
  56. package/dist/cdn/chunks/dist-CllLxIMQ.js +2 -0
  57. package/dist/cdn/chunks/dist-Cs0wFwdw.js +2 -0
  58. package/dist/cdn/chunks/dist-DLWHlekl.js +2 -0
  59. package/dist/cdn/chunks/dist-DS3_HVpX.js +2 -0
  60. package/dist/cdn/chunks/dist-DTXopj1a.js +2 -0
  61. package/dist/cdn/chunks/dist-DnwLoNLm.js +2 -0
  62. package/dist/cdn/chunks/draggable-BQNU47zu.js +11544 -0
  63. package/dist/cdn/chunks/{draggable-ClUwYCFL.js.map → draggable-BQNU47zu.js.map} +1 -1
  64. package/dist/cdn/chunks/emojiData-BVEJHcNH.js +19 -0
  65. package/dist/cdn/chunks/{emojiData-6fVLNqeH.js.map → emojiData-BVEJHcNH.js.map} +1 -1
  66. package/dist/cdn/chunks/en-CpotcOPr.js +89 -0
  67. package/dist/cdn/chunks/en-CpotcOPr.js.map +1 -0
  68. package/dist/cdn/chunks/en-DeDcpnoS.js +700 -0
  69. package/dist/cdn/chunks/en-DeDcpnoS.js.map +1 -0
  70. package/dist/cdn/chunks/extensions-B_kcV0tK.js +419 -0
  71. package/dist/cdn/chunks/{extensions-BfjbWqOx.js.map → extensions-B_kcV0tK.js.map} +1 -1
  72. package/dist/cdn/chunks/features-ofOGnSC0.js +6700 -0
  73. package/dist/cdn/chunks/features-ofOGnSC0.js.map +1 -0
  74. package/dist/cdn/chunks/icons-bIb7PBOE.js +653 -0
  75. package/dist/cdn/chunks/icons-bIb7PBOE.js.map +1 -0
  76. package/dist/cdn/chunks/liquid.browser-C1VIYISn.js +3272 -0
  77. package/dist/cdn/chunks/liquid.browser-C1VIYISn.js.map +1 -0
  78. package/dist/cdn/chunks/media-library-BIYzV2Y2.js +6005 -0
  79. package/dist/cdn/chunks/media-library-BIYzV2Y2.js.map +1 -0
  80. package/dist/cdn/chunks/pusher-DJPhQnE8.js +2505 -0
  81. package/dist/cdn/chunks/pusher-DJPhQnE8.js.map +1 -0
  82. package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js +32 -0
  83. package/dist/cdn/chunks/readableTextColor-Cd_cgWO_.js.map +1 -0
  84. package/dist/cdn/chunks/rolldown-runtime-DPITmOBR.js +20 -0
  85. package/dist/cdn/chunks/src-BuW9oYtm.js +494 -0
  86. package/dist/cdn/chunks/src-BuW9oYtm.js.map +1 -0
  87. package/dist/cdn/chunks/styleConstants-1KwsBMxJ.js +57 -0
  88. package/dist/cdn/chunks/{styleConstants-UTJ94gco.js.map → styleConstants-1KwsBMxJ.js.map} +1 -1
  89. package/dist/cdn/chunks/styles-DQFExz-T.js +3222 -0
  90. package/dist/cdn/chunks/styles-DQFExz-T.js.map +1 -0
  91. package/dist/cdn/chunks/tiptap-DplY-S-k.js +14208 -0
  92. package/dist/cdn/chunks/{tiptap-Cya4P9CN.js.map → tiptap-DplY-S-k.js.map} +1 -1
  93. package/dist/cdn/editor.css +2 -1
  94. package/dist/cdn/editor.js +260 -1
  95. package/dist/cdn/editor.js.map +1 -1
  96. package/dist/{de-B4Ob4vCo.js → de-D7TLGIPA.js} +20 -4
  97. package/dist/{dist-DNjZKe2Z.js → dist-BkIys9zn.js} +1 -1
  98. package/dist/{en-YXsspZJG.js → en-DvtiEMwP.js} +20 -4
  99. package/dist/{extensions-BA4NshZQ.js → extensions-DEjfEFhD.js} +3 -3
  100. package/dist/keys-C0MQRs8d.js +10 -0
  101. package/dist/readableTextColor-LDlmVEUv.js +30 -0
  102. package/dist/{styleConstants-CgtFM9hQ.js → styleConstants-D4SOZGBV.js} +53 -2
  103. package/dist/{styles-hQgJKM4i.js → styles-CgLaxDfu.js} +1091 -1069
  104. package/dist/templatical-editor.css +1 -1
  105. package/dist/templatical-editor.js +113 -89
  106. package/dist/templatical-editor.umd.cjs +59 -59
  107. package/dist/{useEditorCore-DVp5qmtC.js → useEditorCore-CjwRMl7K.js} +1185 -1043
  108. package/dist/{useI18n-DzH4KXDk.js → useI18n-D6m7ZUgY.js} +2 -2
  109. package/dist/{useMergeTag-D9zQVE-e.js → useMergeTag-BZ3X0bNr.js} +2 -2
  110. package/package.json +2 -2
  111. package/dist/CloudEditor-BVjgKwq3.js +0 -940
  112. package/dist/ParagraphEditor-BSyk5B6S.js +0 -670
  113. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +0 -3
  114. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +0 -1
  115. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +0 -2
  116. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +0 -1
  117. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +0 -3
  118. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +0 -1
  119. package/dist/cdn/chunks/dist-0UheN8rK.js +0 -1
  120. package/dist/cdn/chunks/dist-55mmbGQ9.js +0 -1
  121. package/dist/cdn/chunks/dist-B31mxKyP.js +0 -1
  122. package/dist/cdn/chunks/dist-B5JI9nIg.js +0 -1
  123. package/dist/cdn/chunks/dist-B93vLKhU.js +0 -1
  124. package/dist/cdn/chunks/dist-BDt3FJvj.js +0 -1
  125. package/dist/cdn/chunks/dist-BJRuFHmi.js +0 -1
  126. package/dist/cdn/chunks/dist-BKSzrf0L.js +0 -1
  127. package/dist/cdn/chunks/dist-BL8c5gYQ.js +0 -1
  128. package/dist/cdn/chunks/dist-CYThWMP5.js +0 -1
  129. package/dist/cdn/chunks/dist-DxZbPJYt.js +0 -1
  130. package/dist/cdn/chunks/draggable-ClUwYCFL.js +0 -17
  131. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +0 -2
  132. package/dist/cdn/chunks/extensions-BfjbWqOx.js +0 -2
  133. package/dist/cdn/chunks/icons-vmLJTaJk.js +0 -2
  134. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +0 -1
  135. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +0 -1
  136. package/dist/cdn/chunks/styleConstants-UTJ94gco.js +0 -2
  137. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +0 -145
  138. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +0 -2
  139. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +0 -1
  140. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +0 -2
  141. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +0 -1
  142. package/dist/i18n-ikyi28RU.js +0 -23
  143. package/dist/keys-8B5MFafK.js +0 -4
@@ -1,8 +1,9 @@
1
- import "./useEditorCore-DVp5qmtC.js";
2
- import { t as e } from "./useI18n-DzH4KXDk.js";
1
+ import "./useEditorCore-CjwRMl7K.js";
2
+ import { t as e } from "./useI18n-D6m7ZUgY.js";
3
3
  import { n as t } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
- import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, normalizeStyle as l, openBlock as u, renderList as d, toDisplayString as f, unref as p } from "vue";
5
- var m = t("wifi-off", [
4
+ import { t as n } from "./readableTextColor-LDlmVEUv.js";
5
+ import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, normalizeStyle as u, openBlock as d, renderList as f, toDisplayString as p, unref as m } from "vue";
6
+ var h = t("wifi-off", [
6
7
  ["path", {
7
8
  d: "M12 20h.01",
8
9
  key: "zekei9"
@@ -31,7 +32,7 @@ var m = t("wifi-off", [
31
32
  d: "m2 2 20 20",
32
33
  key: "1ooewy"
33
34
  }]
34
- ]), h = t("wifi", [
35
+ ]), g = t("wifi", [
35
36
  ["path", {
36
37
  d: "M12 20h.01",
37
38
  key: "zekei9"
@@ -48,44 +49,47 @@ var m = t("wifi-off", [
48
49
  d: "M8.5 16.429a5 5 0 0 1 7 0",
49
50
  key: "1bycff"
50
51
  }]
51
- ]), g = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, _ = ["title"], v = {
52
+ ]), _ = { class: "tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2" }, v = ["title"], y = {
52
53
  key: 0,
53
54
  class: "tpl:flex tpl:items-center tpl:-space-x-1.5"
54
- }, y = ["title"], b = ["title"], x = 3, S = /* @__PURE__ */ c({
55
+ }, b = ["title"], x = ["title"], S = 3, C = /* @__PURE__ */ l({
55
56
  __name: "CollaboratorBar",
56
57
  props: {
57
58
  collaborators: {},
58
59
  isConnected: { type: Boolean }
59
60
  },
60
61
  setup(t) {
61
- let c = t, { t: S } = e(), C = r(() => c.collaborators.slice(0, x)), w = r(() => c.collaborators.slice(x)), T = r(() => w.value.length), E = r(() => w.value.map((e) => e.name).join("\n"));
62
- function D(e) {
62
+ let l = t, { t: C } = e(), w = i(() => l.collaborators.slice(0, S)), T = i(() => l.collaborators.slice(S)), E = i(() => T.value.length), D = i(() => T.value.map((e) => e.name).join("\n"));
63
+ function O(e) {
63
64
  let t = e.trim().split(/\s+/);
64
65
  return t.length >= 2 ? (t[0].charAt(0) + t[t.length - 1].charAt(0)).toUpperCase() : e.charAt(0).toUpperCase();
65
66
  }
66
- return (e, r) => (u(), o("div", g, [s("div", {
67
+ return (e, i) => (d(), s("div", _, [c("div", {
67
68
  class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[11px]",
68
- style: l({ color: t.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
69
- title: t.isConnected ? p(S).collaboration.connected : p(S).collaboration.disconnected
70
- }, [t.isConnected ? (u(), i(p(h), {
69
+ style: u({ color: t.isConnected ? "var(--tpl-success)" : "var(--tpl-text-muted)" }),
70
+ title: t.isConnected ? m(C).collaboration.connected : m(C).collaboration.disconnected
71
+ }, [t.isConnected ? (d(), a(m(g), {
71
72
  key: 0,
72
73
  size: 12,
73
74
  "stroke-width": 2
74
- })) : (u(), i(p(m), {
75
+ })) : (d(), a(m(h), {
75
76
  key: 1,
76
77
  size: 12,
77
78
  "stroke-width": 2
78
- }))], 12, _), t.collaborators.length > 0 ? (u(), o("div", v, [(u(!0), o(n, null, d(C.value, (e) => (u(), o("div", {
79
+ }))], 12, v), t.collaborators.length > 0 ? (d(), s("div", y, [(d(!0), s(r, null, f(w.value, (e) => (d(), s("div", {
79
80
  key: e.id,
80
- class: "tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:text-white tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]",
81
- style: l({ backgroundColor: e.color }),
81
+ class: "tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:duration-150 tpl:hover:z-10 tpl:hover:scale-110 tpl:border-[var(--tpl-bg)]",
82
+ style: u({
83
+ backgroundColor: e.color,
84
+ color: m(n)(e.color)
85
+ }),
82
86
  title: e.name
83
- }, f(D(e.name)), 13, y))), 128)), T.value > 0 ? (u(), o("div", {
87
+ }, p(O(e.name)), 13, b))), 128)), E.value > 0 ? (d(), s("div", {
84
88
  key: 0,
85
89
  class: "tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:text-[9px] tpl:font-bold tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
86
- title: E.value
87
- }, " +" + f(T.value), 9, b)) : a("", !0)])) : a("", !0)]));
90
+ title: D.value
91
+ }, " +" + p(E.value), 9, x)) : o("", !0)])) : o("", !0)]));
88
92
  }
89
93
  });
90
94
  //#endregion
91
- export { S as default };
95
+ export { C as default };
@@ -1,5 +1,5 @@
1
- import { c as e, f as t, r as n } from "./keys-8B5MFafK.js";
2
- import { t as r } from "./useI18n-DzH4KXDk.js";
1
+ import { c as e, f as t, r as n } from "./keys-C0MQRs8d.js";
2
+ import { t as r } from "./useI18n-D6m7ZUgY.js";
3
3
  import { n as i, t as ee } from "./_plugin-vue_export-helper-B1-bu7yR.js";
4
4
  import { t as te } from "./check-B7kDuZmP.js";
5
5
  import { t as ne } from "./chevron-down-DJLW2Q9Z.js";
@@ -1,6 +1,6 @@
1
1
  import "./timeouts-CmBrLeZA.js";
2
- import { f as e, r as t } from "./keys-8B5MFafK.js";
3
- import { t as n } from "./useI18n-DzH4KXDk.js";
2
+ import { f as e, r as t } from "./keys-C0MQRs8d.js";
3
+ import { t as n } from "./useI18n-D6m7ZUgY.js";
4
4
  import { n as r, t as i } from "./_plugin-vue_export-helper-B1-bu7yR.js";
5
5
  import { t as ee } from "./circle-alert-E2vYPs5r.js";
6
6
  import { t as a } from "./image-up-X4xIq4ea.js";
@@ -64,25 +64,25 @@ var ue = r("file-image", [
64
64
  ]), fe = {
65
65
  key: 0,
66
66
  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)]"
67
- }, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, me = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, x = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, S = {
67
+ }, pe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, me = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, he = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, x = {
68
68
  key: 0,
69
69
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
70
- }, C = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, w = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, T = {
70
+ }, S = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, C = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, w = {
71
71
  key: 1,
72
72
  class: "tpl:flex tpl:flex-col tpl:gap-4"
73
- }, E = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, D = {
73
+ }, T = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, E = {
74
74
  key: 0,
75
75
  class: "tpl:flex tpl:flex-col tpl:gap-2"
76
- }, O = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, k = ["src", "alt"], A = {
76
+ }, D = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, O = ["src", "alt"], k = {
77
77
  key: 1,
78
78
  class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
79
- }, j = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, N = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, P = ["accept"], F = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, I = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, L = ["placeholder"], R = {
79
+ }, A = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, j = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, M = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, N = ["accept"], P = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, F = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, I = ["placeholder"], L = {
80
80
  key: 0,
81
81
  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)]"
82
- }, z = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, he = { class: "tpl:flex tpl:gap-2" }, ge = {
82
+ }, R = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ge = { class: "tpl:flex tpl:gap-2" }, _e = {
83
83
  key: 1,
84
84
  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)]"
85
- }, _e = ["disabled"], ve = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, B = /* @__PURE__ */ i(/* @__PURE__ */ f({
85
+ }, ve = ["disabled"], ye = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, z = /* @__PURE__ */ i(/* @__PURE__ */ f({
86
86
  __name: "DesignReferenceSidebar",
87
87
  props: {
88
88
  visible: { type: Boolean },
@@ -90,21 +90,21 @@ var ue = r("file-image", [
90
90
  },
91
91
  emits: ["close", "apply"],
92
92
  setup(r, { emit: i }) {
93
- let f = r, B = i, { t: V } = n(), ye = p(e), H = le({
93
+ let f = r, z = i, { t: B } = n(), be = p(e), V = le({
94
94
  authManager: p(t),
95
- getTemplateId: () => ye.state.template?.id ?? null,
96
- onApply: (e) => B("apply", e)
97
- }), U = g("image"), W = g(null), G = g(""), K = g(null), q = g(!1), J = g(!1), Y = re(() => H.isGenerating.value ? !1 : W.value !== null);
95
+ getTemplateId: () => be.state.template?.id ?? null,
96
+ onApply: (e) => z("apply", e)
97
+ }), H = g(null), U = g("image"), W = g(null), G = g(""), K = g(null), q = g(!1), J = g(!1), Y = re(() => V.isGenerating.value ? !1 : W.value !== null);
98
98
  function X(e) {
99
99
  U.value = e, Q();
100
100
  }
101
- function be(e) {
101
+ function xe(e) {
102
102
  let t = e.target, n = t.files?.[0];
103
103
  n && Z(n), t.value = "";
104
104
  }
105
105
  function Z(e) {
106
106
  if (e.size > 10485760) {
107
- H.error.value = V.designReference.fileTooLarge;
107
+ V.error.value = B.designReference.fileTooLarge;
108
108
  return;
109
109
  }
110
110
  if (U.value === "image") {
@@ -114,25 +114,25 @@ var ue = r("file-image", [
114
114
  "image/jpg",
115
115
  "image/webp"
116
116
  ].includes(e.type)) {
117
- H.error.value = V.designReference.invalidFileType;
117
+ V.error.value = B.designReference.invalidFileType;
118
118
  return;
119
119
  }
120
120
  } else if (U.value === "pdf" && e.type !== "application/pdf") {
121
- H.error.value = V.designReference.invalidFileType;
121
+ V.error.value = B.designReference.invalidFileType;
122
122
  return;
123
123
  }
124
- W.value = e, H.error.value = null, K.value && URL.revokeObjectURL(K.value), e.type.startsWith("image/") ? K.value = URL.createObjectURL(e) : K.value = null;
124
+ W.value = e, V.error.value = null, K.value && URL.revokeObjectURL(K.value), e.type.startsWith("image/") ? K.value = URL.createObjectURL(e) : K.value = null;
125
125
  }
126
126
  function Q() {
127
127
  K.value &&= (URL.revokeObjectURL(K.value), null), W.value = null;
128
128
  }
129
- function xe(e) {
129
+ function Se(e) {
130
130
  e.preventDefault(), J.value = !0;
131
131
  }
132
- function Se() {
132
+ function Ce() {
133
133
  J.value = !1;
134
134
  }
135
- function Ce(e) {
135
+ function we(e) {
136
136
  e.preventDefault(), J.value = !1;
137
137
  let t = e.dataTransfer?.files?.[0];
138
138
  t && Z(t);
@@ -145,9 +145,9 @@ var ue = r("file-image", [
145
145
  }
146
146
  q.value = !1;
147
147
  let e = {};
148
- G.value.trim() && (e.prompt = G.value.trim()), U.value === "image" && W.value ? e.imageUpload = W.value : U.value === "pdf" && W.value && (e.pdfUpload = W.value), H.generate(e);
148
+ G.value.trim() && (e.prompt = G.value.trim()), U.value === "image" && W.value ? e.imageUpload = W.value : U.value === "pdf" && W.value && (e.pdfUpload = W.value), V.generate(e);
149
149
  }
150
- function we() {
150
+ function Te() {
151
151
  q.value = !1;
152
152
  }
153
153
  return oe(() => f.visible, (e) => {
@@ -163,14 +163,14 @@ var ue = r("file-image", [
163
163
  default: se(() => [r.visible ? (h(), c("div", fe, [l("div", pe, [l("div", me, [d(v(a), {
164
164
  size: 13,
165
165
  "stroke-width": 2
166
- }), l("span", null, _(v(V).designReference.title), 1)]), l("button", {
166
+ }), l("span", null, _(v(B).designReference.title), 1)]), l("button", {
167
167
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
168
- onClick: t[0] ||= (e) => B("close")
168
+ onClick: t[0] ||= (e) => z("close")
169
169
  }, [d(v(o), {
170
170
  size: 14,
171
171
  "stroke-width": 2
172
- })])]), l("div", x, [v(H).isGenerating.value ? (h(), c("div", S, [l("div", C, [d(te), l("p", w, _(v(V).designReference.generating), 1)])])) : (h(), c("div", T, [
173
- l("div", E, [l("button", {
172
+ })])]), l("div", he, [v(V).isGenerating.value ? (h(), c("div", x, [l("div", S, [d(te), l("p", C, _(v(B).designReference.generating), 1)])])) : (h(), c("div", w, [
173
+ l("div", T, [l("button", {
174
174
  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",
175
175
  style: m({
176
176
  backgroundColor: U.value === "image" ? "var(--tpl-bg)" : "transparent",
@@ -181,7 +181,7 @@ var ue = r("file-image", [
181
181
  }, [d(v(ue), {
182
182
  size: 12,
183
183
  "stroke-width": 2
184
- }), u(" " + _(v(V).designReference.uploadImage), 1)], 4), l("button", {
184
+ }), u(" " + _(v(B).designReference.uploadImage), 1)], 4), l("button", {
185
185
  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",
186
186
  style: m({
187
187
  backgroundColor: U.value === "pdf" ? "var(--tpl-bg)" : "transparent",
@@ -192,17 +192,17 @@ var ue = r("file-image", [
192
192
  }, [d(v(b), {
193
193
  size: 12,
194
194
  "stroke-width": 2
195
- }), u(" " + _(v(V).designReference.uploadPdf), 1)], 4)]),
196
- l("div", null, [W.value ? (h(), c("div", D, [l("div", O, [K.value ? (h(), c("img", {
195
+ }), u(" " + _(v(B).designReference.uploadPdf), 1)], 4)]),
196
+ l("div", null, [W.value ? (h(), c("div", E, [l("div", D, [K.value ? (h(), c("img", {
197
197
  key: 0,
198
198
  src: K.value,
199
199
  alt: W.value.name,
200
200
  class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
201
- }, null, 8, k)) : (h(), c("div", A, [d(v(b), {
201
+ }, null, 8, O)) : (h(), c("div", k, [d(v(b), {
202
202
  size: 32,
203
203
  "stroke-width": 1.5,
204
204
  class: "tpl:text-[var(--tpl-text-dim)]"
205
- }), l("span", j, _(W.value.name), 1)])), l("button", {
205
+ }), l("span", A, _(W.value.name), 1)])), l("button", {
206
206
  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)]",
207
207
  onClick: Q
208
208
  }, [d(v(o), {
@@ -215,44 +215,45 @@ var ue = r("file-image", [
215
215
  borderColor: J.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
216
216
  backgroundColor: J.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
217
217
  }),
218
- onClick: t[3] ||= (t) => e.$refs.fileInput?.click(),
219
- onDragover: xe,
220
- onDragleave: Se,
221
- onDrop: Ce
218
+ onClick: t[3] ||= (e) => H.value?.click(),
219
+ onDragover: Se,
220
+ onDragleave: Ce,
221
+ onDrop: we
222
222
  }, [
223
223
  d(v(de), {
224
224
  size: 24,
225
225
  "stroke-width": 1.5,
226
226
  class: "tpl:text-[var(--tpl-text-dim)]"
227
227
  }),
228
- l("span", M, _(v(V).designReference.dropHint), 1),
229
- l("span", N, _(U.value === "image" ? v(V).designReference.acceptedImages : v(V).designReference.acceptedPdf), 1)
228
+ l("span", j, _(v(B).designReference.dropHint), 1),
229
+ l("span", M, _(U.value === "image" ? v(B).designReference.acceptedImages : v(B).designReference.acceptedPdf), 1)
230
230
  ], 36)), l("input", {
231
- ref: "fileInput",
231
+ ref_key: "fileInput",
232
+ ref: H,
232
233
  type: "file",
233
234
  class: "tpl:hidden",
234
235
  accept: U.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
235
- onChange: be
236
- }, null, 40, P)]),
237
- l("div", F, [l("label", I, _(v(V).designReference.promptLabel), 1), ce(l("textarea", {
236
+ onChange: xe
237
+ }, null, 40, N)]),
238
+ l("div", P, [l("label", F, _(v(B).designReference.promptLabel), 1), ce(l("textarea", {
238
239
  "onUpdate:modelValue": t[4] ||= (e) => G.value = e,
239
240
  class: ae(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
240
- placeholder: v(V).designReference.promptPlaceholder,
241
+ placeholder: v(B).designReference.promptPlaceholder,
241
242
  rows: "3"
242
- }, null, 8, L), [[y, G.value]])]),
243
- q.value ? (h(), c("div", R, [l("p", z, _(v(V).designReference.replaceWarning), 1), l("div", he, [l("button", {
243
+ }, null, 8, I), [[y, G.value]])]),
244
+ q.value ? (h(), c("div", L, [l("p", R, _(v(B).designReference.replaceWarning), 1), l("div", ge, [l("button", {
244
245
  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)]",
245
246
  style: { "background-color": "transparent" },
246
- onClick: we
247
- }, _(v(V).designReference.replaceCancel), 1), l("button", {
247
+ onClick: Te
248
+ }, _(v(B).designReference.replaceCancel), 1), l("button", {
248
249
  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)]",
249
250
  onClick: $
250
- }, _(v(V).designReference.replaceConfirm), 1)])])) : s("", !0),
251
- v(H).error.value ? (h(), c("div", ge, [d(v(ee), {
251
+ }, _(v(B).designReference.replaceConfirm), 1)])])) : s("", !0),
252
+ v(V).error.value ? (h(), c("div", _e, [d(v(ee), {
252
253
  size: 14,
253
254
  "stroke-width": 2,
254
255
  class: "tpl:mt-0.5 tpl:shrink-0"
255
- }), l("span", null, _(v(V).designReference.error), 1)])) : s("", !0),
256
+ }), l("span", null, _(v(B).designReference.error), 1)])) : s("", !0),
256
257
  q.value ? s("", !0) : (h(), c("button", {
257
258
  key: 2,
258
259
  class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
@@ -261,12 +262,12 @@ var ue = r("file-image", [
261
262
  }, [d(v(a), {
262
263
  size: 16,
263
264
  "stroke-width": 2
264
- }), u(" " + _(v(V).designReference.generate), 1)], 8, _e)),
265
- l("p", ve, _(v(V).aiMenu.disclaimer), 1)
265
+ }), u(" " + _(v(B).designReference.generate), 1)], 8, ve)),
266
+ l("p", ye, _(v(B).aiMenu.disclaimer), 1)
266
267
  ]))])])) : s("", !0)]),
267
268
  _: 1
268
269
  }));
269
270
  }
270
- }), [["__scopeId", "data-v-0b1509fc"]]);
271
+ }), [["__scopeId", "data-v-1c8d2ac8"]]);
271
272
  //#endregion
272
- export { B as default };
273
+ export { z as default };
@@ -1,11 +1,11 @@
1
- import "./useEditorCore-DVp5qmtC.js";
2
- import { f as e, y as t } from "./keys-8B5MFafK.js";
3
- import { t as n } from "./useI18n-DzH4KXDk.js";
1
+ import "./useEditorCore-CjwRMl7K.js";
2
+ import { b as e, f as t } from "./keys-C0MQRs8d.js";
3
+ import { t as n } from "./useI18n-D6m7ZUgY.js";
4
4
  import { n as r } from "./_plugin-vue_export-helper-B1-bu7yR.js";
5
- import { n as i, t as a } from "./blockTypeIcons-BujoY5Dl.js";
5
+ import { n as i, t as a } from "./blockTypeIcons-D1RTWOkx.js";
6
6
  import { t as ee } from "./trash-2-OwjZ-guZ.js";
7
7
  import { t as te } from "./x-CGlq2XQe.js";
8
- import { t as ne } from "./TplModal-LT3FXlgs.js";
8
+ import { t as ne } from "./TplModal-CmTSvCY-.js";
9
9
  import { Fragment as o, computed as s, createBlock as c, createCommentVNode as re, createElementBlock as l, createElementVNode as u, createVNode as d, defineAsyncComponent as ie, defineComponent as f, inject as p, normalizeStyle as ae, openBlock as m, ref as h, renderList as g, resolveDynamicComponent as oe, toDisplayString as _, unref as v, vModelSelect as se, vModelText as ce, watch as le, withCtx as ue, withDirectives as y, withModifiers as b } from "vue";
10
10
  var de = r("search", [["path", {
11
11
  d: "m21 21-4.34-4.34",
@@ -52,7 +52,7 @@ var de = r("search", [["path", {
52
52
  props: { visible: { type: Boolean } },
53
53
  emits: ["close", "insert"],
54
54
  setup(r, { emit: f }) {
55
- let B = r, V = f, Te = ie(() => import("./ModulePreviewCanvas-DaByXKY_.js")), { t: H } = n(), U = p(t), W = p(e), G = h(""), K = h(null), q = h(null), J = h("end"), Y = s(() => {
55
+ let B = r, V = f, Te = ie(() => import("./ModulePreviewCanvas-Be2B3Y07.js")), { t: H } = n(), U = p(e), W = p(t), G = h(""), K = h(null), q = h(null), J = h("end"), Y = s(() => {
56
56
  let e = U.modules.value;
57
57
  if (!G.value) return e;
58
58
  let t = G.value.toLowerCase();
@@ -1,5 +1,5 @@
1
- import { P as e, _ as t, a as n, f as r, g as i, h as a, i as o, m as s, n as c, p as l, r as u, u as d, v as f, y as p } from "./useEditorCore-DVp5qmtC.js";
2
- import { o as m } from "./keys-8B5MFafK.js";
1
+ import { P as e, _ as t, a as n, f as r, g as i, h as a, i as o, m as s, n as c, p as l, r as u, u as d, v as f, y as p } from "./useEditorCore-CjwRMl7K.js";
2
+ import { o as m } from "./keys-C0MQRs8d.js";
3
3
  import { Fragment as h, computed as g, createBlock as _, createElementBlock as v, createElementVNode as y, defineComponent as b, inject as x, normalizeStyle as S, openBlock as C, renderList as w, resolveComponent as T, resolveDynamicComponent as E, unref as D } from "vue";
4
4
  //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
5
5
  var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__PURE__ */ b({
@@ -23,7 +23,7 @@ var O = { class: "tpl:w-full" }, k = { class: "tpl:flex tpl:gap-0" }, A = /* @__
23
23
  spacer: o,
24
24
  html: t,
25
25
  custom: p
26
- }, j = b, M = x(m), N = g(() => {
26
+ }, j = b, M = x(m, null), N = g(() => {
27
27
  switch (j.block.columns) {
28
28
  case "2": return ["50%", "50%"];
29
29
  case "3": return [