@aswin.dev/editor 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.md +3 -3
  2. package/dist/{AccessibilityPanel-CvQGLdu6.js → AccessibilityPanel-COL6Wm7p.js} +37 -37
  3. package/dist/{AiChatSidebar-B3SJIKG_.js → AiChatSidebar-DWGPVtvC.js} +68 -68
  4. package/dist/{AiFeatureMenu-BLLKoOos.js → AiFeatureMenu-duUFSfDf.js} +22 -22
  5. package/dist/{BlockA11yBadge-CXDLqkcJ.js → BlockA11yBadge-Qs6HtXid.js} +12 -12
  6. package/dist/CloudEditor-CFldoCOb.js +1207 -0
  7. package/dist/{CollaboratorBar-DuPYW5iF.js → CollaboratorBar-Bw-lbt61.js} +21 -21
  8. package/dist/CommentsSidebar-BaD5F53-.js +436 -0
  9. package/dist/CountdownBlock-DaYGxKqo.js +92 -0
  10. package/dist/CountdownToolbar-Dg4F8MTk.js +210 -0
  11. package/dist/{DesignReferenceSidebar-B8V_F2yF.js → DesignReferenceSidebar-BSH7uNP_.js} +58 -58
  12. package/dist/{LoadingTrack-B0CWFHXQ.js → LoadingTrack-Ba2pfF57.js} +2 -2
  13. package/dist/{ModuleBrowserModal-DrUFMTDx.js → ModuleBrowserModal-6phxZSKI.js} +80 -80
  14. package/dist/ModulePreviewCanvas-BW8L3eQX.js +108 -0
  15. package/dist/{NumberWithSuffix-DkXUez9t.js → NumberWithSuffix-BpUzQOJt.js} +87 -87
  16. package/dist/{ParagraphEditor-D75wl3BX.js → ParagraphEditor-DNSzAB-I.js} +182 -182
  17. package/dist/{RichTextEditorContent-DYkIauIk.js → RichTextEditorContent-CrqPQdnk.js} +38 -38
  18. package/dist/{SaveModuleDialog-FZ9lxY7_.js → SaveModuleDialog-zMQTpez7.js} +28 -28
  19. package/dist/{SnapshotHistory-BR3eV120.js → SnapshotHistory-Do-A5rYU.js} +45 -50
  20. package/dist/{TemplateScoringPanel-4GTNHej5.js → TemplateScoringPanel-CS7o62zS.js} +75 -75
  21. package/dist/{TestEmailModal--ue5w9fT.js → TestEmailModal-DGj_9V1u.js} +28 -28
  22. package/dist/{TitleEditor-fStSADI-.js → TitleEditor-C7IDnAoS.js} +68 -68
  23. package/dist/{TplModal-BwSfxIHf.js → TplModal-BAsVzcTb.js} +14 -14
  24. package/dist/{accessibility-e8JYu_zd.js → accessibility-BU09xZrQ.js} +1 -1
  25. package/dist/{blockTypeIcons-BcTrDjmH.js → blockTypeIcons-C6LDKvmd.js} +19 -5
  26. package/dist/bundle-stats.json +7 -7
  27. package/dist/{check-Da05j8yl.js → check-DJrpDKO_.js} +1 -1
  28. package/dist/{chevron-down-R2uY34iD.js → chevron-down-C5oBUhT8.js} +1 -1
  29. package/dist/chevron-right-BqCptpdp.js +10 -0
  30. package/dist/{circle-alert-DZuGWPX-.js → circle-alert-ZQQc98HC.js} +1 -1
  31. package/dist/{clock-CRp2sIub.js → clock-ik2pRJKG.js} +1 -1
  32. package/dist/{cloud-DEk_b4CR.js → cloud-6ZmAvF0j.js} +485 -427
  33. package/dist/{createLucideIcon-C3pa2siy.js → createLucideIcon-ClREiSx3.js} +6 -6
  34. package/dist/{de-Brqvgr43.js → de-DWcgp-7T.js} +209 -1
  35. package/dist/{dist-BaQIYPsn.js → dist-BUzw1buG.js} +1 -1
  36. package/dist/{dist-DjviJBCi.js → dist-BZyY-SS4.js} +1 -1
  37. package/dist/{dist-D6uC2xhi.js → dist-BadNx4qo.js} +1 -1
  38. package/dist/{dist-aRzjfSRN.js → dist-BesOh2mk.js} +1 -1
  39. package/dist/{dist-D90y8dvT.js → dist-Bz3M4RXG.js} +3 -3
  40. package/dist/dist-C04s_fLA.js +563 -0
  41. package/dist/{dist-DDJIWTRY.js → dist-C3T2AKtB.js} +1 -1
  42. package/dist/{dist-BFawx6IS.js → dist-C9ckKEZL.js} +51 -51
  43. package/dist/{dist-us-RpCWN.js → dist-CBItRG-Z.js} +1 -1
  44. package/dist/{dist-wzMIGj-D.js → dist-COSzWQUs.js} +1 -1
  45. package/dist/dist-CivF9P8b.js +382 -0
  46. package/dist/{dist-Cp0zXPAD.js → dist-DtiDUrX-.js} +1 -1
  47. package/dist/{dist-KoBJjK1G.js → dist-Dzt5foyL.js} +1 -1
  48. package/dist/{en-WDVp87TE.js → en-Cxd4fhNm.js} +209 -1
  49. package/dist/{extensions-CUcl9Ok4.js → extensions-D__hOlV1.js} +106 -106
  50. package/dist/{image-up-MBZKKg9p.js → image-up-DT7gcJLN.js} +1 -1
  51. package/dist/index.d.ts +88 -11
  52. package/dist/{info-CJEC7piy.js → info-BSPGcsSM.js} +1 -1
  53. package/dist/keys-CvX8D-8C.js +10 -0
  54. package/dist/{loader-circle-DsY5Yg33.js → loader-circle-Balo8p3d.js} +1 -1
  55. package/dist/{message-circle-yElBbR2C.js → message-circle-B39qAHxs.js} +1 -1
  56. package/dist/pencil-BZJPNYWR.js +10 -0
  57. package/dist/{refresh-cw-CE_AGtn8.js → refresh-cw-DwDqGUM0.js} +1 -1
  58. package/dist/{scan-line-D0vcUekt.js → scan-line-CzfFJO1o.js} +1 -1
  59. package/dist/{send-DH4oDQqC.js → send-D2eSo4GH.js} +1 -1
  60. package/dist/{shield-check-CfJgs2Hd.js → shield-check-jkpgcC0-.js} +1 -1
  61. package/dist/{sparkles-CvRXGqFs.js → sparkles-Chm5CZfb.js} +1 -1
  62. package/dist/style.css +1 -1
  63. package/dist/styleConstants-34eUKPOZ.js +55 -0
  64. package/dist/styles-B4tjX5SP.js +5224 -0
  65. package/dist/templatical-editor.js +189 -126
  66. package/dist/{text-align-start-BT9VUDxK.js → text-align-start-CzBnJsW8.js} +1 -1
  67. package/dist/{trash-2-DbP2Y6t2.js → trash-2-CtK2apEH.js} +1 -1
  68. package/dist/{triangle-alert-aOXceTSe.js → triangle-alert-KpDVNbpn.js} +1 -1
  69. package/dist/{useCloudI18n-BuIwR6OE.js → useCloudI18n-DOKSZql1.js} +2 -2
  70. package/dist/{useEditorCore-C6ost42Q.js → useEditorCore-wslttMH-.js} +2425 -2250
  71. package/dist/{useI18n-lb2DHDiu.js → useI18n-C2xQZ6K9.js} +2 -2
  72. package/dist/{useMergeTag-CBwKnnNB.js → useMergeTag-DX0XG5V9.js} +5 -5
  73. package/dist/{vue.runtime.esm-bundler-DpvJL-nX.js → vue.runtime.esm-bundler-CjauPXjj.js} +1 -1
  74. package/dist/{x-u2oVmjN_.js → x-BkaOMosX.js} +1 -1
  75. package/package.json +10 -10
  76. package/dist/CloudEditor-BCz1ZTYC.js +0 -1172
  77. package/dist/CommentsSidebar-B1pvJdqF.js +0 -441
  78. package/dist/CountdownBlock-BNSj1jvJ.js +0 -92
  79. package/dist/CountdownToolbar-ClJr2GzL.js +0 -210
  80. package/dist/ModulePreviewCanvas-CHdOwV_4.js +0 -106
  81. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +0 -97
  82. package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +0 -1
  83. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +0 -59
  84. package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +0 -1
  85. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +0 -33
  86. package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +0 -1
  87. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +0 -1143
  88. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +0 -1
  89. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +0 -51
  90. package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +0 -1
  91. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +0 -93
  92. package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +0 -1
  93. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +0 -212
  94. package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +0 -1
  95. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +0 -195
  96. package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +0 -1
  97. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +0 -107
  98. package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +0 -1
  99. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +0 -423
  100. package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +0 -1
  101. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +0 -544
  102. package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +0 -1
  103. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +0 -106
  104. package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +0 -1
  105. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +0 -119
  106. package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +0 -1
  107. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +0 -171
  108. package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +0 -1
  109. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +0 -22
  110. package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +0 -1
  111. package/dist/cdn/chunks/de-Ce-LbJ2J.js +0 -89
  112. package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +0 -1
  113. package/dist/cdn/chunks/de-D8CnZxV9.js +0 -523
  114. package/dist/cdn/chunks/de-D8CnZxV9.js.map +0 -1
  115. package/dist/cdn/chunks/de-RQrZR56a.js +0 -209
  116. package/dist/cdn/chunks/de-RQrZR56a.js.map +0 -1
  117. package/dist/cdn/chunks/draggable-Bcb86AsV.js +0 -11572
  118. package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +0 -1
  119. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +0 -19
  120. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +0 -1
  121. package/dist/cdn/chunks/en-8FHaQv4V.js +0 -523
  122. package/dist/cdn/chunks/en-8FHaQv4V.js.map +0 -1
  123. package/dist/cdn/chunks/en-Bl1ecfRF.js +0 -209
  124. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +0 -1
  125. package/dist/cdn/chunks/en-DiCWK5fG.js +0 -89
  126. package/dist/cdn/chunks/en-DiCWK5fG.js.map +0 -1
  127. package/dist/cdn/chunks/extensions-DIxF31tA.js +0 -598
  128. package/dist/cdn/chunks/extensions-DIxF31tA.js.map +0 -1
  129. package/dist/cdn/chunks/features-DEMb13KS.js +0 -6814
  130. package/dist/cdn/chunks/features-DEMb13KS.js.map +0 -1
  131. package/dist/cdn/chunks/icons-CsLTcirh.js +0 -700
  132. package/dist/cdn/chunks/icons-CsLTcirh.js.map +0 -1
  133. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +0 -3279
  134. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  135. package/dist/cdn/chunks/media-library-CVaNvhpM.js +0 -6014
  136. package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +0 -1
  137. package/dist/cdn/chunks/pusher-CDbNlZBE.js +0 -2508
  138. package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +0 -1
  139. package/dist/cdn/chunks/quality-BaBfc54_.js +0 -1456
  140. package/dist/cdn/chunks/quality-BaBfc54_.js.map +0 -1
  141. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +0 -32
  142. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +0 -1
  143. package/dist/cdn/chunks/renderer-CUxvx7ro.js +0 -548
  144. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +0 -1
  145. package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +0 -20
  146. package/dist/cdn/chunks/src-CRaqN-p8.js +0 -497
  147. package/dist/cdn/chunks/src-CRaqN-p8.js.map +0 -1
  148. package/dist/cdn/chunks/styleConstants-DP1VOca8.js +0 -57
  149. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +0 -1
  150. package/dist/cdn/chunks/styles-BHJULjNR.js +0 -2947
  151. package/dist/cdn/chunks/styles-BHJULjNR.js.map +0 -1
  152. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +0 -14654
  153. package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +0 -1
  154. package/dist/cdn/editor.css +0 -2
  155. package/dist/cdn/editor.js +0 -250
  156. package/dist/cdn/editor.js.map +0 -1
  157. package/dist/dist-B1IR0bpH.js +0 -326
  158. package/dist/dist-DJmnUmW9.js +0 -362
  159. package/dist/keys-ciNfSSGj.js +0 -10
  160. package/dist/styleConstants-fWzlIIwN.js +0 -55
  161. package/dist/styles-DEXEkBvg.js +0 -3176
  162. /package/dist/{_plugin-vue_export-helper-B0hnzhyu.js → _plugin-vue_export-helper-BVAJ4lgT.js} +0 -0
  163. /package/dist/{de-DCaaCE5s.js → de-GOtR9DwW.js} +0 -0
  164. /package/dist/{dist-iLBdeBDR.js → dist-DXa1uAMh.js} +0 -0
  165. /package/dist/{emojiData-PQyVa4bU.js → emojiData-DrBuvEoP.js} +0 -0
  166. /package/dist/{en-DXCyK4-X.js → en-dFFQVzNn.js} +0 -0
  167. /package/dist/{formatRelativeTime-BOEf47hq.js → formatRelativeTime-BhhO8yCl.js} +0 -0
  168. /package/dist/{liquid.browser-CdMv1BTn.js → liquid.browser-BvCyLQII.js} +0 -0
  169. /package/dist/{readableTextColor-CY3SiRnt.js → readableTextColor-DVuzNX1y.js} +0 -0
@@ -1,14 +1,14 @@
1
- import { H as e, L as t, M as n, Mt as r, Ot as i, P as a, Q as o, S as s, V as ee, _ as c, b as l, d as u, g as te, h as d, it as f, m as p, o as ne, p as m, s as re, u as h, x as ie, z as ae } from "./vue.runtime.esm-bundler-DpvJL-nX.js";
2
- import "./useEditorCore-C6ost42Q.js";
3
- import { C as oe, O as g, m as se } from "./keys-ciNfSSGj.js";
4
- import { t as ce } from "./useI18n-lb2DHDiu.js";
5
- import { t as _ } from "./createLucideIcon-C3pa2siy.js";
6
- import { n as v, t as y } from "./blockTypeIcons-BcTrDjmH.js";
7
- import { t as le } from "./trash-2-DbP2Y6t2.js";
8
- import { t as ue } from "./x-u2oVmjN_.js";
9
- import { n as de } from "./useCloudI18n-BuIwR6OE.js";
10
- import { t as fe } from "./TplModal-BwSfxIHf.js";
11
- var pe = _("search", [["path", {
1
+ import { C as e, F as t, Ft as n, N as r, R as i, S as a, U as ee, V as o, W as s, _ as te, c as ne, d as c, et as l, f as u, g as d, h as f, jt as re, m as p, s as ie, st as m, v as h, x as g } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import "./useEditorCore-wslttMH-.js";
3
+ import { A as _, T as ae, m as oe } from "./keys-CvX8D-8C.js";
4
+ import { t as se } from "./useI18n-C2xQZ6K9.js";
5
+ import { t as v } from "./createLucideIcon-ClREiSx3.js";
6
+ import { n as y, t as b } from "./blockTypeIcons-C6LDKvmd.js";
7
+ import { t as ce } from "./trash-2-CtK2apEH.js";
8
+ import { t as le } from "./x-BkaOMosX.js";
9
+ import { n as ue } from "./useCloudI18n-DOKSZql1.js";
10
+ import { t as de } from "./TplModal-BAsVzcTb.js";
11
+ var fe = v("search", [["path", {
12
12
  d: "m21 21-4.34-4.34",
13
13
  key: "14j7rj"
14
14
  }], ["circle", {
@@ -16,7 +16,7 @@ var pe = _("search", [["path", {
16
16
  cy: "11",
17
17
  r: "8",
18
18
  key: "4ej97u"
19
- }]]), me = {
19
+ }]]), pe = {
20
20
  role: "dialog",
21
21
  "aria-modal": "true",
22
22
  "aria-labelledby": "tpl-module-browser-title",
@@ -26,7 +26,7 @@ var pe = _("search", [["path", {
26
26
  "box-shadow": "var(--tpl-shadow-xl)",
27
27
  "max-height": "90vh"
28
28
  }
29
- }, he = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, b = {
29
+ }, me = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, he = {
30
30
  id: "tpl-module-browser-title",
31
31
  class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
32
32
  }, x = ["aria-label"], S = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, C = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, w = { class: "tpl:px-4 tpl:pt-4 tpl:pb-3" }, T = { class: "tpl:relative" }, E = ["placeholder"], D = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, O = {
@@ -42,56 +42,56 @@ var pe = _("search", [["path", {
42
42
  ], L = {
43
43
  key: 1,
44
44
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
45
- }, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, z = {
45
+ }, R = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, ge = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, _e = {
46
46
  key: 0,
47
47
  class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
48
- }, _e = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ve = {
48
+ }, ve = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ye = {
49
49
  key: 1,
50
50
  class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
51
- }, ye = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, be = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, xe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Se = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ce = ["value"], we = { class: "tpl:flex tpl:gap-2" }, Te = ["disabled"], B = /* @__PURE__ */ s({
51
+ }, be = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, xe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, Se = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ce = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, we = ["value"], Te = { class: "tpl:flex tpl:gap-2" }, Ee = ["disabled"], z = /* @__PURE__ */ e({
52
52
  __name: "ModuleBrowserModal",
53
53
  props: { visible: { type: Boolean } },
54
54
  emits: ["close", "insert"],
55
- setup(s, { emit: _ }) {
56
- let B = s, V = _, Ee = ie(() => import("./ModulePreviewCanvas-CHdOwV_4.js")), { t: De } = ce(), { t: H } = de(), U = g(oe, "ModuleBrowserModal"), W = g(se, "ModuleBrowserModal"), G = o(""), K = o(null), q = o(null), J = o("end"), Y = m(() => {
57
- let e = U.modules.value;
58
- if (!G.value) return e;
59
- let t = G.value.toLowerCase();
55
+ setup(e, { emit: v }) {
56
+ let z = e, B = v, De = a(() => import("./ModulePreviewCanvas-BW8L3eQX.js")), { t: Oe } = se(), { t: V } = ue(), H = _(ae, "ModuleBrowserModal"), U = _(oe, "ModuleBrowserModal"), W = l(""), G = l(null), K = l(null), q = l("end"), J = p(() => {
57
+ let e = H.modules.value;
58
+ if (!W.value) return e;
59
+ let t = W.value.toLowerCase();
60
60
  return e.filter((e) => e.name.toLowerCase().includes(t));
61
- }), X = m(() => K.value ? U.modules.value.find((e) => e.id === K.value) ?? null : null), Oe = m(() => {
61
+ }), Y = p(() => G.value ? H.modules.value.find((e) => e.id === G.value) ?? null : null), X = p(() => {
62
62
  let e = [{
63
63
  value: "beginning",
64
- label: H.modules.insertAtBeginning
65
- }], t = W.content.value.blocks;
64
+ label: V.modules.insertAtBeginning
65
+ }], t = U.content.value.blocks;
66
66
  for (let n = 0; n < t.length; n++) {
67
- let r = t[n], i = r.type, a = De.blocks[i] ?? r.type;
67
+ let r = t[n], i = r.type, a = Oe.blocks[i] ?? r.type;
68
68
  e.push({
69
69
  value: r.id,
70
- label: H.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
70
+ label: V.modules.insertAfterBlock.replace("{block}", `${a} ${n + 1}`)
71
71
  });
72
72
  }
73
73
  return e.push({
74
74
  value: "end",
75
- label: H.modules.insertAtEnd
75
+ label: V.modules.insertAtEnd
76
76
  }), e;
77
- }), ke = m(() => {
78
- if (J.value === "end") return;
79
- if (J.value === "beginning") return 0;
80
- let e = W.content.value.blocks.findIndex((e) => e.id === J.value);
77
+ }), ke = p(() => {
78
+ if (q.value === "end") return;
79
+ if (q.value === "beginning") return 0;
80
+ let e = U.content.value.blocks.findIndex((e) => e.id === q.value);
81
81
  if (e !== -1) return e + 1;
82
82
  });
83
- ae(() => B.visible, (e) => {
83
+ o(() => z.visible, (e) => {
84
84
  if (e) {
85
- G.value = "", K.value = null, q.value = null;
86
- let e = W.state.selectedBlockId;
87
- e ? J.value = W.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : J.value = "end";
85
+ W.value = "", G.value = null, K.value = null;
86
+ let e = U.state.selectedBlockId;
87
+ e ? q.value = U.content.value.blocks.findIndex((t) => t.id === e) === -1 ? "end" : e : q.value = "end";
88
88
  }
89
89
  });
90
90
  function Ae(e) {
91
91
  let t = [], n = /* @__PURE__ */ new Set();
92
- for (let r of e.content) if (!n.has(r.type) && y[r.type] && (n.add(r.type), t.push({
92
+ for (let r of e.content) if (!n.has(r.type) && b[r.type] && (n.add(r.type), t.push({
93
93
  type: r.type,
94
- icon: y[r.type]
94
+ icon: b[r.type]
95
95
  })), t.length >= 5) break;
96
96
  return t;
97
97
  }
@@ -101,106 +101,106 @@ var pe = _("search", [["path", {
101
101
  }
102
102
  async function je(e) {
103
103
  try {
104
- await U.deleteModule(e), K.value === e && (K.value = null);
104
+ await H.deleteModule(e), G.value === e && (G.value = null);
105
105
  } finally {
106
- q.value = null;
106
+ K.value = null;
107
107
  }
108
108
  }
109
109
  function Q() {
110
- X.value && V("insert", X.value, ke.value);
110
+ Y.value && B("insert", Y.value, ke.value);
111
111
  }
112
112
  function $() {
113
- V("close");
113
+ B("close");
114
114
  }
115
115
  function Me(e) {
116
- e.key === "Escape" && $(), e.key === "Enter" && X.value && (e.preventDefault(), Q());
116
+ e.key === "Escape" && $(), e.key === "Enter" && Y.value && (e.preventDefault(), Q());
117
117
  }
118
- return (o, m) => (n(), d(fe, {
119
- visible: s.visible,
118
+ return (a, o) => (r(), d(de, {
119
+ visible: e.visible,
120
120
  onClose: $,
121
121
  onKeydown: Me
122
122
  }, {
123
- default: ee(() => [p("div", me, [
124
- p("div", he, [p("h3", b, r(f(H).modules.browse), 1), p("button", {
125
- "aria-label": f(H).modules.close,
123
+ default: ee(() => [f("div", pe, [
124
+ f("div", me, [f("h3", he, n(m(V).modules.browse), 1), f("button", {
125
+ "aria-label": m(V).modules.close,
126
126
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
127
127
  onClick: $
128
- }, [l(f(ue), {
128
+ }, [g(m(le), {
129
129
  size: 16,
130
130
  "stroke-width": 2
131
131
  })], 8, x)]),
132
- p("div", S, [p("div", C, [p("div", w, [p("div", T, [l(f(pe), {
132
+ f("div", S, [f("div", C, [f("div", w, [f("div", T, [g(m(fe), {
133
133
  size: 14,
134
134
  "stroke-width": 2,
135
135
  class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
136
- }), e(p("input", {
137
- "onUpdate:modelValue": m[0] ||= (e) => G.value = e,
136
+ }), s(f("input", {
137
+ "onUpdate:modelValue": o[0] ||= (e) => W.value = e,
138
138
  type: "text",
139
- placeholder: f(H).modules.search,
139
+ placeholder: m(V).modules.search,
140
140
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
141
- }, null, 8, E), [[re, G.value]])])]), p("div", D, [Y.value.length > 0 ? (n(), c("div", O, [(n(!0), c(u, null, a(Y.value, (e) => (n(), c("button", {
141
+ }, null, 8, E), [[ne, W.value]])])]), f("div", D, [J.value.length > 0 ? (r(), h("div", O, [(r(!0), h(u, null, t(J.value, (e) => (r(), h("button", {
142
142
  key: e.id,
143
143
  type: "button",
144
- "aria-pressed": K.value === e.id,
144
+ "aria-pressed": G.value === e.id,
145
145
  class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
146
- style: i({
147
- borderColor: K.value === e.id ? "var(--tpl-primary)" : "var(--tpl-border)",
148
- backgroundColor: K.value === e.id ? "var(--tpl-primary-light)" : "transparent"
146
+ style: re({
147
+ borderColor: G.value === e.id ? "var(--tpl-primary)" : "var(--tpl-border)",
148
+ backgroundColor: G.value === e.id ? "var(--tpl-primary-light)" : "transparent"
149
149
  }),
150
- onClick: (t) => K.value = e.id
151
- }, [p("div", A, [p("span", j, r(e.name), 1), p("span", M, r(f(H).modules.blockCount.replace("{count}", String(e.content.length))), 1)]), p("div", N, [
152
- (n(!0), c(u, null, a(Ae(e), (e) => (n(), d(t(e.icon), {
150
+ onClick: (t) => G.value = e.id
151
+ }, [f("div", A, [f("span", j, n(e.name), 1), f("span", M, n(m(V).modules.blockCount.replace("{count}", String(e.content.length))), 1)]), f("div", N, [
152
+ (r(!0), h(u, null, t(Ae(e), (e) => (r(), d(i(e.icon), {
153
153
  key: e.type,
154
154
  size: 14,
155
155
  "stroke-width": 1.5,
156
156
  class: "tpl:text-[var(--tpl-text-dim)]"
157
157
  }))), 128)),
158
- Z(e) > 0 ? (n(), c("span", P, " +" + r(Z(e)), 1)) : te("", !0),
159
- q.value === e.id ? (n(), c("button", {
158
+ Z(e) > 0 ? (r(), h("span", P, " +" + n(Z(e)), 1)) : te("", !0),
159
+ K.value === e.id ? (r(), h("button", {
160
160
  key: 1,
161
- "aria-label": f(H).modules.deleteConfirm,
161
+ "aria-label": m(V).modules.deleteConfirm,
162
162
  class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-100 tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
163
163
  style: { "background-color": "transparent" },
164
- onClick: h((t) => je(e.id), ["stop"])
165
- }, r(f(H).modules.deleteConfirm), 9, F)) : (n(), c("button", {
164
+ onClick: c((t) => je(e.id), ["stop"])
165
+ }, n(m(V).modules.deleteConfirm), 9, F)) : (r(), h("button", {
166
166
  key: 2,
167
167
  class: "tpl-module-delete-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:duration-100 tpl:text-[var(--tpl-text-dim)]",
168
- "aria-label": f(H).modules.delete,
169
- title: f(H).modules.delete,
170
- onClick: h((t) => q.value = e.id, ["stop"])
171
- }, [l(f(le), {
168
+ "aria-label": m(V).modules.delete,
169
+ title: m(V).modules.delete,
170
+ onClick: c((t) => K.value = e.id, ["stop"])
171
+ }, [g(m(ce), {
172
172
  size: 12,
173
173
  "stroke-width": 1.5
174
174
  })], 8, I))
175
- ])], 12, k))), 128))])) : (n(), c("div", L, [l(f(v), {
175
+ ])], 12, k))), 128))])) : (r(), h("div", L, [g(m(y), {
176
176
  size: 32,
177
177
  "stroke-width": 1,
178
178
  class: "tpl:text-[var(--tpl-text-dim)]"
179
- }), p("p", R, r(G.value ? f(H).modules.noModules : f(H).modules.noModulesHint), 1)]))])]), p("div", ge, [X.value ? (n(), c("div", z, [p("div", _e, [l(f(Ee), { blocks: X.value.content }, null, 8, ["blocks"])])])) : (n(), c("div", ve, [l(f(v), {
179
+ }), f("p", R, n(W.value ? m(V).modules.noModules : m(V).modules.noModulesHint), 1)]))])]), f("div", ge, [Y.value ? (r(), h("div", _e, [f("div", ve, [g(m(De), { blocks: Y.value.content }, null, 8, ["blocks"])])])) : (r(), h("div", ye, [g(m(y), {
180
180
  size: 32,
181
181
  "stroke-width": 1,
182
182
  class: "tpl:text-[var(--tpl-text-dim)]"
183
- }), p("p", ye, r(f(H).modules.selectToPreview), 1)]))])]),
184
- p("div", be, [p("div", xe, [p("label", Se, r(f(H).modules.insertPosition), 1), e(p("select", {
185
- "onUpdate:modelValue": m[1] ||= (e) => J.value = e,
183
+ }), f("p", be, n(m(V).modules.selectToPreview), 1)]))])]),
184
+ f("div", xe, [f("div", Se, [f("label", Ce, n(m(V).modules.insertPosition), 1), s(f("select", {
185
+ "onUpdate:modelValue": o[1] ||= (e) => q.value = e,
186
186
  class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
187
- }, [(n(!0), c(u, null, a(Oe.value, (e) => (n(), c("option", {
187
+ }, [(r(!0), h(u, null, t(X.value, (e) => (r(), h("option", {
188
188
  key: e.value,
189
189
  value: e.value
190
- }, r(e.label), 9, Ce))), 128))], 512), [[ne, J.value]])]), p("div", we, [p("button", {
190
+ }, n(e.label), 9, we))), 128))], 512), [[ie, q.value]])]), f("div", Te, [f("button", {
191
191
  type: "button",
192
192
  class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
193
193
  onClick: $
194
- }, r(f(H).modules.close), 1), p("button", {
194
+ }, n(m(V).modules.close), 1), f("button", {
195
195
  type: "button",
196
196
  class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
197
- disabled: !X.value,
197
+ disabled: !Y.value,
198
198
  onClick: Q
199
- }, r(f(H).modules.insert), 9, Te)])])
199
+ }, n(m(V).modules.insert), 9, Ee)])])
200
200
  ])]),
201
201
  _: 1
202
202
  }, 8, ["visible"]));
203
203
  }
204
204
  });
205
205
  //#endregion
206
- export { B as default };
206
+ export { z as default };
@@ -0,0 +1,108 @@
1
+ import { C as e, D as t, F as n, L as r, N as i, R as a, f as o, g as s, h as c, jt as l, m as u, st as d, v as f } from "./vue.runtime.esm-bundler-CjauPXjj.js";
2
+ import { P as p, _ as m, a as h, b as g, f as _, g as v, h as y, i as b, m as x, n as S, p as C, r as w, u as T, v as E, y as D } from "./useEditorCore-wslttMH-.js";
3
+ import { s as O } from "./keys-CvX8D-8C.js";
4
+ //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
5
+ var k = { class: "tpl:w-full" }, A = { class: "tpl:flex tpl:gap-0" }, j = /* @__PURE__ */ e({
6
+ name: "PreviewSectionBlock",
7
+ __name: "PreviewSectionBlock",
8
+ props: {
9
+ block: {},
10
+ viewport: {}
11
+ },
12
+ setup(e) {
13
+ let j = {
14
+ title: T,
15
+ paragraph: x,
16
+ image: m,
17
+ video: S,
18
+ button: p,
19
+ input: v,
20
+ divider: D,
21
+ social: h,
22
+ menu: y,
23
+ table: w,
24
+ spacer: b,
25
+ html: E,
26
+ custom: g
27
+ }, M = e, N = t(O, null), P = u(() => {
28
+ switch (M.block.columns) {
29
+ case "2": return ["50%", "50%"];
30
+ case "3": return [
31
+ "33.33%",
32
+ "33.33%",
33
+ "33.33%"
34
+ ];
35
+ case "1-2": return ["33.33%", "66.67%"];
36
+ case "2-1": return ["66.67%", "33.33%"];
37
+ default: return ["100%"];
38
+ }
39
+ }), F = u(() => {
40
+ let e = P.value.length, t = [...M.block.children];
41
+ for (; t.length < e;) t.push([]);
42
+ return t.slice(0, e);
43
+ });
44
+ function I(e) {
45
+ return F.value[e] || [];
46
+ }
47
+ function L(e) {
48
+ return C(e, N, j);
49
+ }
50
+ return (e, t) => {
51
+ let u = r("PreviewSectionBlock", !0);
52
+ return i(), f("div", k, [c("div", A, [(i(!0), f(o, null, n(F.value, (e, t) => (i(), f("div", {
53
+ key: t,
54
+ style: l({ width: P.value[t] })
55
+ }, [(i(!0), f(o, null, n(I(t), (e) => (i(), f("div", {
56
+ key: e.id,
57
+ style: l(d(_)(e))
58
+ }, [e.type === "section" ? (i(), s(u, {
59
+ key: 0,
60
+ block: e,
61
+ viewport: "desktop"
62
+ }, null, 8, ["block"])) : (i(), s(a(L(e)), {
63
+ key: 1,
64
+ block: e,
65
+ viewport: "desktop"
66
+ }, null, 8, ["block"]))], 4))), 128))], 4))), 128))])]);
67
+ };
68
+ }
69
+ }), M = {
70
+ class: "tpl:pointer-events-none tpl:mx-auto tpl:w-[600px] tpl:select-none tpl:rounded-lg",
71
+ style: {
72
+ "background-color": "var(--tpl-canvas-bg)",
73
+ "box-shadow": "var(--tpl-shadow-sm)"
74
+ }
75
+ }, N = /* @__PURE__ */ e({
76
+ __name: "ModulePreviewCanvas",
77
+ props: { blocks: {} },
78
+ setup(e) {
79
+ let r = t(O), c = {
80
+ section: j,
81
+ title: T,
82
+ paragraph: x,
83
+ image: m,
84
+ video: S,
85
+ button: p,
86
+ input: v,
87
+ divider: D,
88
+ social: h,
89
+ menu: y,
90
+ table: w,
91
+ spacer: b,
92
+ html: E,
93
+ custom: g
94
+ };
95
+ function u(e) {
96
+ return C(e, r, c);
97
+ }
98
+ return (t, r) => (i(), f("div", M, [(i(!0), f(o, null, n(e.blocks, (e) => (i(), f("div", {
99
+ key: e.id,
100
+ style: l(d(_)(e))
101
+ }, [(i(), s(a(u(e)), {
102
+ block: e,
103
+ viewport: "desktop"
104
+ }, null, 8, ["block"]))], 4))), 128))]));
105
+ }
106
+ });
107
+ //#endregion
108
+ export { N as default };