@templatical/editor 0.25.2 → 0.26.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 (179) hide show
  1. package/dist/{AiChatSidebar-JLsbPnsH.js → AiChatSidebar-B_fwa6zc.js} +8 -8
  2. package/dist/{AiFeatureMenu-BvA-lViN.js → AiFeatureMenu-BBBKsYD4.js} +4 -4
  3. package/dist/{BlockIssueBadge-Cf0-GC3o.js → BlockIssueBadge-Buk3_6QF.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-CnJIM5TO.js → BlockPreviewCanvas-zyyq2de0.js} +1 -1
  5. package/dist/{CloudEditor-Caq7z4-7.js → CloudEditor-DM3RRCVn.js} +19 -19
  6. package/dist/{CollaboratorBar-BFz4LgA0.js → CollaboratorBar-Coj8Ebwf.js} +2 -2
  7. package/dist/{ColorPicker-B5xXWWX5.js → ColorPicker-ClETsjA3.js} +1 -1
  8. package/dist/{CommentsSidebar-CGihWwn9.js → CommentsSidebar-CdRCCSDD.js} +10 -10
  9. package/dist/{CountdownToolbar-DpNCZAUI.js → CountdownToolbar-CBE9wRaV.js} +2 -2
  10. package/dist/{DesignReferenceSidebar-CiIHHiil.js → DesignReferenceSidebar-hDXOvGoV.js} +6 -6
  11. package/dist/{IssuesPanel-CUkmAC_S.js → IssuesPanel-Do7RLXsP.js} +5 -5
  12. package/dist/{MergeTagModeToggle-C6nS3qri.js → MergeTagModeToggle-D0t5NHBZ.js} +3 -3
  13. package/dist/{MergeTagSuggestion-98fAcuM-.js → MergeTagSuggestion-BJ43ihWR.js} +9 -9
  14. package/dist/{NumberWithSuffix-DB-1GNvx.js → NumberWithSuffix-D37ZWiZh.js} +1 -1
  15. package/dist/{ParagraphEditor-NgW-T9YV.js → ParagraphEditor-B-CYrQMY.js} +19 -19
  16. package/dist/{RichTextEditorContent-CN7OVR6u.js → RichTextEditorContent-fbYJXAio.js} +3 -3
  17. package/dist/{SaveBlockDialog-lgcmhAsO.js → SaveBlockDialog-CoVPZfUv.js} +6 -6
  18. package/dist/{SavedBlocksBrowserModal-3u247V2z.js → SavedBlocksBrowserModal-DX13xw0O.js} +7 -7
  19. package/dist/{SavedBlocksPanels-Dh6dABJt.js → SavedBlocksPanels-B7pBiZcc.js} +1 -1
  20. package/dist/{SavedBlocksPickBar-Bo82D3Qy.js → SavedBlocksPickBar-ZfqXByph.js} +2 -2
  21. package/dist/{SnapshotHistory-Dsb1i40w.js → SnapshotHistory-BxABntv5.js} +11 -11
  22. package/dist/{TemplateScoringPanel-Bzd_YSag.js → TemplateScoringPanel-BZUsb3FD.js} +10 -10
  23. package/dist/{TestEmailModal-DvqDTOcO.js → TestEmailModal-Db4qheuy.js} +7 -7
  24. package/dist/{TestEmailPanel-BXoVnAqu.js → TestEmailPanel-B-SXSnRg.js} +1 -1
  25. package/dist/{TitleEditor-DWSi998C.js → TitleEditor-DmoaKooA.js} +8 -8
  26. package/dist/{TplModal-DKn0h2qe.js → TplModal-Bym-Kf_i.js} +1 -1
  27. package/dist/{blockTypeIcons-DKlza6aR.js → blockTypeIcons-BnCXsB2I.js} +2 -2
  28. package/dist/bundle-stats.json +6 -6
  29. package/dist/cdn/chunks/{AiChatSidebar-BY1Iy-e8.js → AiChatSidebar-CFvS4-EZ.js} +35 -35
  30. package/dist/cdn/chunks/{AiChatSidebar-BY1Iy-e8.js.map → AiChatSidebar-CFvS4-EZ.js.map} +1 -1
  31. package/dist/cdn/chunks/{AiFeatureMenu-BS4Rek6j.js → AiFeatureMenu-a0gBZiJ9.js} +11 -11
  32. package/dist/cdn/chunks/{AiFeatureMenu-BS4Rek6j.js.map → AiFeatureMenu-a0gBZiJ9.js.map} +1 -1
  33. package/dist/cdn/chunks/{BlockIssueBadge-BcIQUe_Q.js → BlockIssueBadge-BEEY9o2o.js} +5 -5
  34. package/dist/cdn/chunks/{BlockIssueBadge-BcIQUe_Q.js.map → BlockIssueBadge-BEEY9o2o.js.map} +1 -1
  35. package/dist/cdn/chunks/{BlockPreviewCanvas-oND1iXLL.js → BlockPreviewCanvas-C27XK2q0.js} +22 -22
  36. package/dist/cdn/chunks/{BlockPreviewCanvas-oND1iXLL.js.map → BlockPreviewCanvas-C27XK2q0.js.map} +1 -1
  37. package/dist/cdn/chunks/{CloudEditor-BaqiFbf0.js → CloudEditor-Ddnatfuw.js} +65 -65
  38. package/dist/cdn/chunks/{CloudEditor-BaqiFbf0.js.map → CloudEditor-Ddnatfuw.js.map} +1 -1
  39. package/dist/cdn/chunks/{CollaboratorBar-DF02nTwF.js → CollaboratorBar-C5Xf6Mz9.js} +12 -12
  40. package/dist/cdn/chunks/{CollaboratorBar-DF02nTwF.js.map → CollaboratorBar-C5Xf6Mz9.js.map} +1 -1
  41. package/dist/cdn/chunks/{ColorPicker-BXH44v2H.js → ColorPicker-W_UyiVGc.js} +131 -131
  42. package/dist/cdn/chunks/{ColorPicker-BXH44v2H.js.map → ColorPicker-W_UyiVGc.js.map} +1 -1
  43. package/dist/cdn/chunks/{CommentsSidebar-B9bWvvbl.js → CommentsSidebar-BLRZRSSC.js} +112 -112
  44. package/dist/cdn/chunks/{CommentsSidebar-B9bWvvbl.js.map → CommentsSidebar-BLRZRSSC.js.map} +1 -1
  45. package/dist/cdn/chunks/{CountdownBlock-BTpRd0Hn.js → CountdownBlock-vLTkTI9e.js} +11 -11
  46. package/dist/cdn/chunks/{CountdownBlock-BTpRd0Hn.js.map → CountdownBlock-vLTkTI9e.js.map} +1 -1
  47. package/dist/cdn/chunks/{CountdownToolbar-CW10rbWt.js → CountdownToolbar-DPjcgcVR.js} +41 -41
  48. package/dist/cdn/chunks/{CountdownToolbar-CW10rbWt.js.map → CountdownToolbar-DPjcgcVR.js.map} +1 -1
  49. package/dist/cdn/chunks/{DesignReferenceSidebar-BXjH47QC.js → DesignReferenceSidebar-CZiP00JN.js} +28 -28
  50. package/dist/cdn/chunks/{DesignReferenceSidebar-BXjH47QC.js.map → DesignReferenceSidebar-CZiP00JN.js.map} +1 -1
  51. package/dist/cdn/chunks/{IssuesPanel-DStHCHfr.js → IssuesPanel-DKTS4QVb.js} +32 -32
  52. package/dist/cdn/chunks/{IssuesPanel-DStHCHfr.js.map → IssuesPanel-DKTS4QVb.js.map} +1 -1
  53. package/dist/cdn/chunks/{LoadingTrack-DQowK3MV.js → LoadingTrack-C52ZGL5q.js} +2 -2
  54. package/dist/cdn/chunks/{LoadingTrack-DQowK3MV.js.map → LoadingTrack-C52ZGL5q.js.map} +1 -1
  55. package/dist/cdn/chunks/{MergeTagModeToggle-BCmQg4Qe.js → MergeTagModeToggle-ClGdRNpZ.js} +20 -20
  56. package/dist/cdn/chunks/{MergeTagModeToggle-BCmQg4Qe.js.map → MergeTagModeToggle-ClGdRNpZ.js.map} +1 -1
  57. package/dist/cdn/chunks/{MergeTagSuggestion-BgExdloL.js → MergeTagSuggestion-Dn8dExNa.js} +18 -18
  58. package/dist/cdn/chunks/{MergeTagSuggestion-BgExdloL.js.map → MergeTagSuggestion-Dn8dExNa.js.map} +1 -1
  59. package/dist/cdn/chunks/{NumberWithSuffix-BANVbpT0.js → NumberWithSuffix-BXrRdfq1.js} +22 -22
  60. package/dist/cdn/chunks/{NumberWithSuffix-BANVbpT0.js.map → NumberWithSuffix-BXrRdfq1.js.map} +1 -1
  61. package/dist/cdn/chunks/{ParagraphEditor-DqilB4_f.js → ParagraphEditor-BNc146Pp.js} +43 -43
  62. package/dist/cdn/chunks/{ParagraphEditor-DqilB4_f.js.map → ParagraphEditor-BNc146Pp.js.map} +1 -1
  63. package/dist/cdn/chunks/{RichTextEditorContent-BeJx4LVH.js → RichTextEditorContent-DtL49Jpo.js} +20 -20
  64. package/dist/cdn/chunks/{RichTextEditorContent-BeJx4LVH.js.map → RichTextEditorContent-DtL49Jpo.js.map} +1 -1
  65. package/dist/cdn/chunks/{SaveBlockDialog-Dm31xRZy.js → SaveBlockDialog-ogieDQp7.js} +43 -43
  66. package/dist/cdn/chunks/{SaveBlockDialog-Dm31xRZy.js.map → SaveBlockDialog-ogieDQp7.js.map} +1 -1
  67. package/dist/cdn/chunks/{SavedBlocksBrowserModal-Tp37b4y7.js → SavedBlocksBrowserModal-DSpZcT_T.js} +62 -62
  68. package/dist/cdn/chunks/{SavedBlocksBrowserModal-Tp37b4y7.js.map → SavedBlocksBrowserModal-DSpZcT_T.js.map} +1 -1
  69. package/dist/cdn/chunks/{SavedBlocksPanels-ElerTTa_.js → SavedBlocksPanels-WYrSyf-l.js} +3 -3
  70. package/dist/cdn/chunks/{SavedBlocksPanels-ElerTTa_.js.map → SavedBlocksPanels-WYrSyf-l.js.map} +1 -1
  71. package/dist/cdn/chunks/{SavedBlocksPickBar-QHJ-Mjx0.js → SavedBlocksPickBar-DGbLBG5P.js} +12 -12
  72. package/dist/cdn/chunks/{SavedBlocksPickBar-QHJ-Mjx0.js.map → SavedBlocksPickBar-DGbLBG5P.js.map} +1 -1
  73. package/dist/cdn/chunks/{SnapshotHistory-jogWGLB-.js → SnapshotHistory-VyL4tJwn.js} +26 -26
  74. package/dist/cdn/chunks/{SnapshotHistory-jogWGLB-.js.map → SnapshotHistory-VyL4tJwn.js.map} +1 -1
  75. package/dist/cdn/chunks/{TemplateScoringPanel-B2XIOTl-.js → TemplateScoringPanel-NucRtAP0.js} +34 -34
  76. package/dist/cdn/chunks/{TemplateScoringPanel-B2XIOTl-.js.map → TemplateScoringPanel-NucRtAP0.js.map} +1 -1
  77. package/dist/cdn/chunks/{TestEmailModal-BcPjQygV.js → TestEmailModal-DRte11oT.js} +31 -31
  78. package/dist/cdn/chunks/{TestEmailModal-BcPjQygV.js.map → TestEmailModal-DRte11oT.js.map} +1 -1
  79. package/dist/cdn/chunks/{TestEmailPanel-1zxRa00s.js → TestEmailPanel-CpK5t4E3.js} +3 -3
  80. package/dist/cdn/chunks/{TestEmailPanel-1zxRa00s.js.map → TestEmailPanel-CpK5t4E3.js.map} +1 -1
  81. package/dist/cdn/chunks/{TitleEditor-DTrmublj.js → TitleEditor-EkDchueW.js} +35 -35
  82. package/dist/cdn/chunks/{TitleEditor-DTrmublj.js.map → TitleEditor-EkDchueW.js.map} +1 -1
  83. package/dist/cdn/chunks/{TplModal-By50gtwa.js → TplModal-BGLstO3F.js} +17 -17
  84. package/dist/cdn/chunks/{TplModal-By50gtwa.js.map → TplModal-BGLstO3F.js.map} +1 -1
  85. package/dist/cdn/chunks/{blockTypeIcons-BhFhHuFt.js → blockTypeIcons-FXlMM3PL.js} +2 -2
  86. package/dist/cdn/chunks/{blockTypeIcons-BhFhHuFt.js.map → blockTypeIcons-FXlMM3PL.js.map} +1 -1
  87. package/dist/cdn/chunks/{cloud-B0f7Ub8f.js → cloud-CNpvDuv7.js} +3 -3
  88. package/dist/cdn/chunks/{cloud-B0f7Ub8f.js.map → cloud-CNpvDuv7.js.map} +1 -1
  89. package/dist/cdn/chunks/{dist-H51neg3K.js → dist-B2HKGHnc.js} +3 -3
  90. package/dist/cdn/chunks/{dist-H51neg3K.js.map → dist-B2HKGHnc.js.map} +1 -1
  91. package/dist/cdn/chunks/{dist-B4VIlp1g.js → dist-C6z8AjBC.js} +2 -2
  92. package/dist/cdn/chunks/{dist-B4VIlp1g.js.map → dist-C6z8AjBC.js.map} +1 -1
  93. package/dist/cdn/chunks/{draggable-Z4XXmbPC.js → draggable-DCs9qL-b.js} +2 -2
  94. package/dist/cdn/chunks/{draggable-Z4XXmbPC.js.map → draggable-DCs9qL-b.js.map} +1 -1
  95. package/dist/cdn/chunks/{extensions-Dq0D79tq.js → extensions-CZAB08kD.js} +22 -22
  96. package/dist/cdn/chunks/{extensions-Dq0D79tq.js.map → extensions-CZAB08kD.js.map} +1 -1
  97. package/dist/cdn/chunks/{icons-C_kRN0_C.js → icons-CvYN6zrM.js} +8 -8
  98. package/dist/cdn/chunks/{icons-C_kRN0_C.js.map → icons-CvYN6zrM.js.map} +1 -1
  99. package/dist/cdn/chunks/{keys-DsoX52o_.js → keys-Cmc2Yl3D.js} +2 -2
  100. package/dist/cdn/chunks/{keys-DsoX52o_.js.map → keys-Cmc2Yl3D.js.map} +1 -1
  101. package/dist/cdn/chunks/{liquid.browser-DrGys_ek.js → liquid.browser-UlAOKBjI.js} +99 -91
  102. package/dist/cdn/chunks/liquid.browser-UlAOKBjI.js.map +1 -0
  103. package/dist/cdn/chunks/{src-CRvTVX4F.js → src-BRRRFqXr.js} +201 -201
  104. package/dist/cdn/chunks/{src-CRvTVX4F.js.map → src-BRRRFqXr.js.map} +1 -1
  105. package/dist/cdn/chunks/{src-Aea1Vl1H.js → src-COnW7gMq.js} +123 -123
  106. package/dist/cdn/chunks/src-COnW7gMq.js.map +1 -0
  107. package/dist/cdn/chunks/{src-CZjSXPYq.js → src-DsvVSm7Z.js} +221 -166
  108. package/dist/cdn/chunks/src-DsvVSm7Z.js.map +1 -0
  109. package/dist/cdn/chunks/{src-_GNJgPcS.js → src-DzH5U9Vm.js} +79 -79
  110. package/dist/cdn/chunks/{src-_GNJgPcS.js.map → src-DzH5U9Vm.js.map} +1 -1
  111. package/dist/cdn/chunks/{styles-znpPfrFd.js → styles-DEU_sn3k.js} +935 -917
  112. package/dist/cdn/chunks/styles-DEU_sn3k.js.map +1 -0
  113. package/dist/cdn/chunks/{tiptap-C5vzWlHv.js → tiptap-C44S1Cmh.js} +3480 -2806
  114. package/dist/cdn/chunks/tiptap-C44S1Cmh.js.map +1 -0
  115. package/dist/cdn/chunks/{useAliveFlag-4IDYQRNu.js → useAliveFlag-Dxwgo6P4.js} +2 -2
  116. package/dist/cdn/chunks/{useAliveFlag-4IDYQRNu.js.map → useAliveFlag-Dxwgo6P4.js.map} +1 -1
  117. package/dist/cdn/chunks/{useCloudI18n-D4JpHTPk.js → useCloudI18n-8wkJtuJD.js} +3 -3
  118. package/dist/cdn/chunks/{useCloudI18n-D4JpHTPk.js.map → useCloudI18n-8wkJtuJD.js.map} +1 -1
  119. package/dist/cdn/chunks/{useEditorCore-BMXBmdd8.js → useEditorCore-fyFmWS3D.js} +297 -297
  120. package/dist/cdn/chunks/useEditorCore-fyFmWS3D.js.map +1 -0
  121. package/dist/cdn/chunks/{useI18n-BvcEYzrI.js → useI18n-UMs0F71x.js} +3 -3
  122. package/dist/cdn/chunks/{useI18n-BvcEYzrI.js.map → useI18n-UMs0F71x.js.map} +1 -1
  123. package/dist/cdn/chunks/{useMergeTag-BSdxMUzg.js → useMergeTag-DjQoCGEz.js} +4 -4
  124. package/dist/cdn/chunks/{useMergeTag-BSdxMUzg.js.map → useMergeTag-DjQoCGEz.js.map} +1 -1
  125. package/dist/cdn/chunks/{usePopoverPosition-ig-71caO.js → usePopoverPosition-cf8Y-ynK.js} +3 -3
  126. package/dist/cdn/chunks/{usePopoverPosition-ig-71caO.js.map → usePopoverPosition-cf8Y-ynK.js.map} +1 -1
  127. package/dist/cdn/editor.js +47 -47
  128. package/dist/cdn/editor.js.map +1 -1
  129. package/dist/{check-COV27dGb.js → check-On4TSac-.js} +1 -1
  130. package/dist/{chevron-down-vsU88vcr.js → chevron-down-69EiBGoB.js} +1 -1
  131. package/dist/{chevron-up-RrZ0Rjn9.js → chevron-up-Dh3MG1Dw.js} +1 -1
  132. package/dist/{circle-alert-B6GlHmmi.js → circle-alert-cilwzafX.js} +1 -1
  133. package/dist/{clock-egOt8zjQ.js → clock-Dt0APH92.js} +1 -1
  134. package/dist/{cloud-D-2StbvU.js → cloud-4SuOLNTK.js} +1 -1
  135. package/dist/{createLucideIcon-D6cqT5Pm.js → createLucideIcon-C8WzBYCv.js} +2 -2
  136. package/dist/dist-6YJAWMuf.js +5 -0
  137. package/dist/dist-8vlm9kfO.js +5 -0
  138. package/dist/{dist-DHwnYYx0.js → dist-BImfm-46.js} +2 -2
  139. package/dist/{dist-CQ0fVBQ3.js → dist-BvYvG5SQ.js} +110 -57
  140. package/dist/{dist-DzzTB4eE.js → dist-C08jiemd.js} +7 -7
  141. package/dist/{dist-CqV4XslQ.js → dist-C27SeFL5.js} +15 -15
  142. package/dist/{dist-MwT7T6Xp.js → dist-CYx-E82k.js} +2 -2
  143. package/dist/{dist-CHxPjcxA.js → dist-ChYLhoJ4.js} +2143 -1583
  144. package/dist/{dist-UkG5ZJ1P.js → dist-Cl8J0IES.js} +258 -172
  145. package/dist/{dist-D4GoAr2g.js → dist-DMJRSouD.js} +464 -436
  146. package/dist/{dist-GUZZpDK3.js → dist-DfpeSdmE.js} +2 -2
  147. package/dist/{dist-Du95Y9M3.js → dist-M7m1lYRe.js} +47 -47
  148. package/dist/{dist-vpuiQ7_Q.js → dist-g6cbzhZW.js} +2 -2
  149. package/dist/{extensions-y6KjLr9t.js → extensions-Dz5jj0wf.js} +16 -16
  150. package/dist/{image-up-CycES-MQ.js → image-up-Ceggh_R3.js} +1 -1
  151. package/dist/{info-BUdvm046.js → info-DO5odBcZ.js} +1 -1
  152. package/dist/{liquid.browser-Di5zMIEx.js → liquid.browser-B-rGrnrQ.js} +98 -90
  153. package/dist/{list-checks-BAeuuATD.js → list-checks-BSkPKbuI.js} +1 -1
  154. package/dist/{loader-circle-L5yuAx_j.js → loader-circle-bO7o7_HD.js} +1 -1
  155. package/dist/{message-circle-DRdaapVc.js → message-circle-BEkAk65X.js} +1 -1
  156. package/dist/{pencil-BfErVPf_.js → pencil-t6m0EtKL.js} +1 -1
  157. package/dist/{refresh-cw-D0PYatER.js → refresh-cw-CkOYVzK5.js} +1 -1
  158. package/dist/{scan-line-Byi3fJcr.js → scan-line-DwSVj25O.js} +1 -1
  159. package/dist/{send-DuyNexMY.js → send-CWsWN8PQ.js} +1 -1
  160. package/dist/{shield-check-BkkN_1qw.js → shield-check-qje8Kufw.js} +1 -1
  161. package/dist/{sparkles-DAw2sBXk.js → sparkles-DumaWRW-.js} +1 -1
  162. package/dist/{styles-BzwheHH_.js → styles-DbP2S8Z1.js} +446 -428
  163. package/dist/templatical-editor.js +9 -9
  164. package/dist/{text-align-start-Ba3xJKn6.js → text-align-start-Ir8Ah4mT.js} +1 -1
  165. package/dist/{trash-2-CapEBXBI.js → trash-2-CklAFCmO.js} +1 -1
  166. package/dist/{triangle-alert-52pdw8jI.js → triangle-alert-BBi4n93g.js} +1 -1
  167. package/dist/{upload-oAgigC31.js → upload-sVqqppuv.js} +1 -1
  168. package/dist/{useEditorCore-BhjEMSeE.js → useEditorCore-CbcmGpwp.js} +889 -889
  169. package/dist/{useMergeTag-DTSOQnyr.js → useMergeTag-B9xG9EJ7.js} +1 -1
  170. package/dist/{x-DvBgbDuf.js → x-Mby7KlhS.js} +1 -1
  171. package/package.json +23 -23
  172. package/dist/cdn/chunks/liquid.browser-DrGys_ek.js.map +0 -1
  173. package/dist/cdn/chunks/src-Aea1Vl1H.js.map +0 -1
  174. package/dist/cdn/chunks/src-CZjSXPYq.js.map +0 -1
  175. package/dist/cdn/chunks/styles-znpPfrFd.js.map +0 -1
  176. package/dist/cdn/chunks/tiptap-C5vzWlHv.js.map +0 -1
  177. package/dist/cdn/chunks/useEditorCore-BMXBmdd8.js.map +0 -1
  178. package/dist/dist-B56SufAv.js +0 -5
  179. package/dist/dist-BQZkRg05.js +0 -5
@@ -1,7 +1,7 @@
1
1
  import { n as e } from "./rolldown-runtime-B0aSnxlc.js";
2
- import { I as t, L as n, M as r, N as i, P as a, T as o, f as s, g as c, it as l, m as u, p as d, st as f, u as p, x as m } from "./draggable-Z4XXmbPC.js";
3
- import { _ as h, a as g, c as _, d as v, f as y, h as b, i as x, k as S, m as C, n as w, p as T, r as E, u as D, v as O, y as k } from "./useEditorCore-BMXBmdd8.js";
4
- import { W as A, f as j, g as M, k as N, s as P } from "./keys-DsoX52o_.js";
2
+ import { I as t, L as n, M as r, N as i, P as a, T as o, ct as s, f as c, g as l, it as u, m as d, p as f, u as p, x as m } from "./draggable-DCs9qL-b.js";
3
+ import { _ as h, a as g, c as _, d as v, f as y, h as b, i as x, k as S, m as C, n as w, p as T, r as E, u as D, v as O, y as k } from "./useEditorCore-fyFmWS3D.js";
4
+ import { W as A, f as j, g as M, k as N, s as P } from "./keys-Cmc2Yl3D.js";
5
5
  import { n as F, t as I } from "./emailFrameWidth-BmFCN2dp.js";
6
6
  //#region src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
7
7
  var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__PURE__ */ m({
@@ -25,7 +25,7 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
25
25
  spacer: x,
26
26
  html: h,
27
27
  custom: k
28
- }, m = e, v = o(P, null), A = s(() => {
28
+ }, m = e, v = o(P, null), A = c(() => {
29
29
  switch (m.block.columns) {
30
30
  case "2": return ["50%", "50%"];
31
31
  case "3": return [
@@ -37,7 +37,7 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
37
37
  case "2-1": return ["66.67%", "33.33%"];
38
38
  default: return ["100%"];
39
39
  }
40
- }), j = s(() => {
40
+ }), j = c(() => {
41
41
  let e = A.value.length, t = [...m.block.children];
42
42
  for (; t.length < e;) t.push([]);
43
43
  return t.slice(0, e);
@@ -50,17 +50,17 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
50
50
  }
51
51
  return (e, i) => {
52
52
  let o = t("PreviewSectionBlock", !0);
53
- return r(), c("div", L, [d("div", R, [(r(!0), c(p, null, a(j.value, (e, t) => (r(), c("div", {
53
+ return r(), l("div", L, [f("div", R, [(r(!0), l(p, null, a(j.value, (e, t) => (r(), l("div", {
54
54
  key: t,
55
- style: f({ width: A.value[t] })
56
- }, [(r(!0), c(p, null, a(M(t), (e) => (r(), c("div", {
55
+ style: s({ width: A.value[t] })
56
+ }, [(r(!0), l(p, null, a(M(t), (e) => (r(), l("div", {
57
57
  key: e.id,
58
- style: f(l(D)(e))
59
- }, [e.type === "section" ? (r(), u(o, {
58
+ style: s(u(D)(e))
59
+ }, [e.type === "section" ? (r(), d(o, {
60
60
  key: 0,
61
61
  block: e,
62
62
  viewport: "desktop"
63
- }, null, 8, ["block"])) : (r(), u(n(N(e)), {
63
+ }, null, 8, ["block"])) : (r(), d(n(N(e)), {
64
64
  key: 1,
65
65
  block: e,
66
66
  viewport: "desktop"
@@ -78,9 +78,9 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
78
78
  }
79
79
  },
80
80
  setup(e) {
81
- let t = e, d = o(P), m = o(M, null), L = o(j, null), R = o(N, null);
82
- i(A, s(() => R?.value ?? !1));
83
- let B = s(() => t.applyConditionFilter ? t.blocks.filter((e) => !L?.isHidden(e.id)) : t.blocks), V = s(() => F(m?.content.value.settings, t.viewport)), H = s(() => m ? v(m.content.value.settings) : {}), U = {
81
+ let t = e, f = o(P), m = o(M, null), L = o(j, null), R = o(N, null);
82
+ i(A, c(() => R?.value ?? !1));
83
+ let B = c(() => t.applyConditionFilter ? t.blocks.filter((e) => !L?.isHidden(e.id)) : t.blocks), V = c(() => F(m?.content.value.settings, t.viewport)), H = c(() => m ? v(m.content.value.settings) : {}), U = {
84
84
  section: z,
85
85
  title: _,
86
86
  paragraph: T,
@@ -96,22 +96,22 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
96
96
  custom: k
97
97
  };
98
98
  function W(e) {
99
- return y(e, d, U);
99
+ return y(e, f, U);
100
100
  }
101
- return (t, i) => (r(), c("div", {
101
+ return (t, i) => (r(), l("div", {
102
102
  "data-testid": "block-preview-canvas",
103
103
  class: "tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg",
104
- style: f({
104
+ style: s({
105
105
  width: `${V.value}px`,
106
- transition: l(I),
106
+ transition: u(I),
107
107
  backgroundColor: "var(--tpl-canvas-bg)",
108
108
  boxShadow: "var(--tpl-shadow-sm)",
109
109
  ...H.value
110
110
  })
111
- }, [(r(!0), c(p, null, a(B.value, (t) => (r(), c("div", {
111
+ }, [(r(!0), l(p, null, a(B.value, (t) => (r(), l("div", {
112
112
  key: t.id,
113
- style: f(l(D)(t))
114
- }, [(r(), u(n(W(t)), {
113
+ style: s(u(D)(t))
114
+ }, [(r(), d(n(W(t)), {
115
115
  block: t,
116
116
  viewport: e.viewport
117
117
  }, null, 8, ["block", "viewport"]))], 4))), 128))], 4));
@@ -120,4 +120,4 @@ var L = { class: "tpl:w-full" }, R = { class: "tpl:flex tpl:gap-0" }, z = /* @__
120
120
  //#endregion
121
121
  export { V as n, H as t };
122
122
 
123
- //# sourceMappingURL=BlockPreviewCanvas-oND1iXLL.js.map
123
+ //# sourceMappingURL=BlockPreviewCanvas-C27XK2q0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockPreviewCanvas-oND1iXLL.js","names":[],"sources":["../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/BlockPreviewCanvas.vue","../../../src/components/BlockPreviewCanvas.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"BlockPreviewCanvas-C27XK2q0.js","names":[],"sources":["../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/blocks/PreviewSectionBlock.vue","../../../src/components/BlockPreviewCanvas.vue","../../../src/components/BlockPreviewCanvas.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./ButtonBlock.vue\";\nimport CustomBlock from \"./CustomBlock.vue\";\nimport DividerBlock from \"./DividerBlock.vue\";\nimport HtmlBlock from \"./HtmlBlock.vue\";\nimport ImageBlock from \"./ImageBlock.vue\";\nimport MenuBlock from \"./MenuBlock.vue\";\nimport SocialIconsBlock from \"./SocialIconsBlock.vue\";\nimport SpacerBlock from \"./SpacerBlock.vue\";\nimport TableBlock from \"./TableBlock.vue\";\nimport TitleBlock from \"./TitleBlock.vue\";\nimport ParagraphBlock from \"./ParagraphBlock.vue\";\nimport VideoBlock from \"./VideoBlock.vue\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n SectionBlock as SectionBlockType,\n} from \"@templatical/types\";\nimport { computed, inject, type Component } from \"vue\";\nimport { BLOCK_REGISTRY_KEY } from \"../../keys\";\n\nconst previewBlockComponentMap: Record<string, Component> = {\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nconst props = defineProps<{\n block: SectionBlockType;\n viewport: \"desktop\";\n}>();\n\ndefineOptions({ name: \"PreviewSectionBlock\" });\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\n\nconst columnWidths = computed(() => {\n switch (props.block.columns) {\n case \"2\":\n return [\"50%\", \"50%\"];\n case \"3\":\n return [\"33.33%\", \"33.33%\", \"33.33%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n default:\n return [\"100%\"];\n }\n});\n\nconst columns = computed(() => {\n const count = columnWidths.value.length;\n const children = [...props.block.children];\n while (children.length < count) {\n children.push([]);\n }\n return children.slice(0, count);\n});\n\nfunction getColumnBlocks(colIndex: number): Block[] {\n return columns.value[colIndex] || [];\n}\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewBlockComponentMap);\n}\n</script>\n\n<template>\n <div class=\"tpl:w-full\">\n <div class=\"tpl:flex tpl:gap-0\">\n <div\n v-for=\"(_, colIndex) in columns\"\n :key=\"colIndex\"\n :style=\"{ width: columnWidths[colIndex] }\"\n >\n <div\n v-for=\"childBlock in getColumnBlocks(colIndex)\"\n :key=\"childBlock.id\"\n :style=\"getBlockWrapperStyle(childBlock)\"\n >\n <!-- Recursive self-reference for nested sections -->\n <PreviewSectionBlock\n v-if=\"childBlock.type === 'section'\"\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n <component\n :is=\"getBlockComponent(childBlock)\"\n v-else\n :block=\"childBlock\"\n viewport=\"desktop\"\n />\n </div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport ButtonBlock from \"./blocks/ButtonBlock.vue\";\nimport CustomBlock from \"./blocks/CustomBlock.vue\";\nimport DividerBlock from \"./blocks/DividerBlock.vue\";\nimport HtmlBlock from \"./blocks/HtmlBlock.vue\";\nimport ImageBlock from \"./blocks/ImageBlock.vue\";\nimport MenuBlock from \"./blocks/MenuBlock.vue\";\nimport PreviewSectionBlock from \"./blocks/PreviewSectionBlock.vue\";\nimport SocialIconsBlock from \"./blocks/SocialIconsBlock.vue\";\nimport SpacerBlock from \"./blocks/SpacerBlock.vue\";\nimport TableBlock from \"./blocks/TableBlock.vue\";\nimport TitleBlock from \"./blocks/TitleBlock.vue\";\nimport ParagraphBlock from \"./blocks/ParagraphBlock.vue\";\nimport VideoBlock from \"./blocks/VideoBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n} from \"../keys\";\nimport {\n resolveBlockComponent,\n getBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport type { Block, ViewportSize } from \"@templatical/types\";\nimport { computed, inject, provide, type Component } from \"vue\";\n\nconst props = withDefaults(\n defineProps<{\n blocks: Block[];\n /**\n * Which viewport to render. Defaults to `desktop`, so the saved-blocks\n * surfaces — which have no viewport control — behave exactly as before.\n * The test-email dialog passes the user's choice so responsive blocks show\n * the variant a recipient on that device would receive.\n */\n viewport?: ViewportSize;\n /**\n * Whether the hand-toggled display-condition filter still applies here.\n * `false` where a resolver owns the preview: it has already evaluated every\n * condition against real data, so layering a manual hide on top would veto\n * the answer that was asked for.\n *\n * A prop rather than an injected `PREVIEW_RESOLUTION_KEY` read, because the\n * test-email dialog builds its *own* resolution instance (keyed to the\n * selected recipient) — injecting would consult the shared canvas instance\n * and get the wrong answer.\n */\n applyConditionFilter?: boolean;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\n\n/**\n * This canvas is only ever a preview — nothing here is editable — so it honours\n * the user's mode directly, with no `previewMode` gate of the kind `Canvas.vue`\n * needs. Re-provided rather than left to inherit, because a `BlockPreviewCanvas`\n * inside a dialog may sit under an editing `Canvas` that provides `false`.\n */\nconst mergeTagSampleMode = inject(MERGE_TAG_SAMPLE_MODE_KEY, null);\nprovide(\n USE_MERGE_TAG_SAMPLES_KEY,\n computed(() => mergeTagSampleMode?.value ?? false),\n);\n\n/**\n * Blocks a display condition currently excludes, so a preview never shows\n * content the recipient won't get. The canvas does the same via\n * `v-show=\"!conditionPreview?.isHidden(block.id)\"`.\n *\n * A no-op for the saved-blocks browser: entries there carry their *stored* ids,\n * which aren't in the current template, so nothing is tracked as hidden. It\n * bites where it should — the save dialog and the test-email preview, both of\n * which show blocks that are live on the canvas.\n *\n * Skipped entirely when `applyConditionFilter` is false — see the prop.\n */\nconst visibleBlocks = computed(() =>\n props.applyConditionFilter\n ? props.blocks.filter((block) => !conditionPreview?.isHidden(block.id))\n : props.blocks,\n);\n\n/**\n * Frame width, from the one helper the canvas and the scaled preview rows also\n * use — so all three agree by construction rather than by three constants that\n * happen to match. A template with a custom body width now previews at that\n * width instead of a flat 600.\n */\nconst frameWidth = computed(() =>\n getEmailFrameWidth(editor?.content.value.settings, props.viewport),\n);\n\n/**\n * The same document-level style the canvas applies, so a previewed block\n * renders identically to the canvas one: without it the font falls back to the\n * editor UI's and the link rules hit their unset defaults, dropping the\n * underline and the link colour.\n *\n * Read from the *current* template even in the saved-blocks browser, where the\n * previewed content came from elsewhere — a saved block stores only `Block[]`,\n * and the current settings are what it will actually look like once inserted.\n */\nconst documentStyle = computed(() =>\n editor ? getDocumentStyle(editor.content.value.settings) : {},\n);\n\nconst previewComponentMap: Record<string, Component> = {\n section: PreviewSectionBlock,\n title: TitleBlock,\n paragraph: ParagraphBlock,\n image: ImageBlock,\n video: VideoBlock,\n button: ButtonBlock,\n divider: DividerBlock,\n social: SocialIconsBlock,\n menu: MenuBlock,\n table: TableBlock,\n spacer: SpacerBlock,\n html: HtmlBlock,\n custom: CustomBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n</script>\n\n<template>\n <div\n data-testid=\"block-preview-canvas\"\n class=\"tpl:pointer-events-none tpl:mx-auto tpl:select-none tpl:rounded-lg\"\n :style=\"{\n width: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n backgroundColor: 'var(--tpl-canvas-bg)',\n boxShadow: 'var(--tpl-shadow-sm)',\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"getBlockWrapperStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n</template>\n"],"mappings":"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"}
@@ -1,18 +1,18 @@
1
- import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, m as v, n as y, ot as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-Z4XXmbPC.js";
1
+ import { $ as e, A as t, H as n, J as r, M as i, N as a, P as o, V as s, Z as c, _ as l, b as u, ct as d, f, g as p, h as m, it as h, j as g, l as _, lt as v, m as y, n as b, p as x, s as S, st as C, u as w, v as T, x as E, y as D, z as O } from "./draggable-DCs9qL-b.js";
2
2
  import { t as k } from "./timeouts-SsLMC4a3.js";
3
- import { B as A } from "./src-CZjSXPYq.js";
4
- import { T as j, b as M, j as ee, t as N } from "./useEditorCore-BMXBmdd8.js";
5
- import { _ as P } from "./dist-B4VIlp1g.js";
6
- import { t as F } from "./dist-H51neg3K.js";
7
- import { M as I, c as te, d as L, i as R, l as z, t as B, z as ne } from "./keys-DsoX52o_.js";
8
- import { t as V } from "./useI18n-BvcEYzrI.js";
9
- import { E as H, F as U, I as W, Lt as G, M as K, Mt as q, it as J, kt as Y, tt as re, u as ie } from "./icons-C_kRN0_C.js";
3
+ import { H as A } from "./src-DsvVSm7Z.js";
4
+ import { T as j, b as M, j as ee, t as N } from "./useEditorCore-fyFmWS3D.js";
5
+ import { _ as P } from "./dist-C6z8AjBC.js";
6
+ import { t as F } from "./dist-B2HKGHnc.js";
7
+ import { M as I, c as te, d as L, i as R, l as z, t as B, z as ne } from "./keys-Cmc2Yl3D.js";
8
+ import { t as V } from "./useI18n-UMs0F71x.js";
9
+ import { E as H, F as U, I as W, Lt as G, M as K, Mt as q, it as J, kt as Y, tt as re, u as ie } from "./icons-CvYN6zrM.js";
10
10
  import { t as ae } from "./_plugin-vue_export-helper-B3ysoDQm.js";
11
- import { n as X } from "./useCloudI18n-D4JpHTPk.js";
12
- import { a as Z, c as oe, d as Q, f as se, i as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e } from "./styles-znpPfrFd.js";
13
- import { d as $ } from "./ColorPicker-BXH44v2H.js";
14
- import { n as ve, t as ye } from "./MergeTagModeToggle-BCmQg4Qe.js";
15
- import { C as be, a as xe, c as Se, d as Ce, f as we, g as Te, h as Ee, i as De, l as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, y as Le } from "./cloud-B0f7Ub8f.js";
11
+ import { n as X } from "./useCloudI18n-8wkJtuJD.js";
12
+ import { a as Z, c as oe, d as Q, f as se, i as ce, l as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e } from "./styles-DEU_sn3k.js";
13
+ import { d as $ } from "./ColorPicker-W_UyiVGc.js";
14
+ import { n as ve, t as ye } from "./MergeTagModeToggle-ClGdRNpZ.js";
15
+ import { C as be, a as xe, c as Se, d as Ce, f as we, g as Te, h as Ee, i as De, l as Oe, n as ke, o as Ae, p as je, r as Me, s as Ne, t as Pe, u as Fe, v as Ie, y as Le } from "./cloud-CNpvDuv7.js";
16
16
  //#region src/cloud/composables/useSnapshotPreview.ts
17
17
  function Re(t) {
18
18
  let { authManager: n, editor: i, history: a, conditionPreview: o, autoSave: s, onError: l } = t, u = e(null), d = c(null), p = c(null), m = !1;
@@ -184,7 +184,7 @@ function He(e) {
184
184
  let t = f(e);
185
185
  if (t) return s?.(t), null;
186
186
  try {
187
- let { MediaApiClient: t } = await import("./src-CRvTVX4F.js");
187
+ let { MediaApiClient: t } = await import("./src-BRRRFqXr.js");
188
188
  return l(await new t(a).uploadMedia(e));
189
189
  } catch (e) {
190
190
  return s?.(e), null;
@@ -532,7 +532,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
532
532
  emits: ["cancel", "confirm"],
533
533
  setup(e, { emit: t }) {
534
534
  let n = t, { t: r } = X();
535
- return (t, a) => (i(), v(y, {
535
+ return (t, a) => (i(), y(b, {
536
536
  "enter-active-class": "tpl:transition-opacity tpl:duration-150",
537
537
  "leave-active-class": "tpl:transition-opacity tpl:duration-150",
538
538
  "enter-from-class": "tpl:opacity-0",
@@ -550,21 +550,21 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
550
550
  size: 18,
551
551
  "stroke-width": 2,
552
552
  class: "tpl:text-[var(--tpl-warning)]"
553
- }), x("h2", Xe, d(h(r).saveGate.title), 1)]),
554
- x("p", Ze, d(h(r).saveGate.body), 1),
553
+ }), x("h2", Xe, v(h(r).saveGate.title), 1)]),
554
+ x("p", Ze, v(h(r).saveGate.body), 1),
555
555
  x("ul", Qe, [(i(!0), p(w, null, o(e.issues, (e) => (i(), p("li", {
556
556
  key: `${e.ruleId}-${e.blockId ?? "template"}`,
557
557
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
558
- }, [x("span", $e, d(e.message), 1), x("span", et, d(e.ruleId), 1)]))), 128))]),
558
+ }, [x("span", $e, v(e.message), 1), x("span", et, v(e.ruleId), 1)]))), 128))]),
559
559
  x("footer", tt, [x("button", {
560
560
  type: "button",
561
561
  class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
562
562
  onClick: a[0] ||= (e) => n("cancel")
563
- }, d(h(r).saveGate.cancel), 1), x("button", {
563
+ }, v(h(r).saveGate.cancel), 1), x("button", {
564
564
  type: "button",
565
565
  class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
566
566
  onClick: a[1] ||= (e) => n("confirm")
567
- }, d(h(r).saveGate.confirm), 1)])
567
+ }, v(h(r).saveGate.confirm), 1)])
568
568
  ])], 8, qe)) : m("", !0)]),
569
569
  _: 1
570
570
  }));
@@ -613,9 +613,9 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
613
613
  },
614
614
  emits: ["save"],
615
615
  setup(e) {
616
- let t = u(() => import("./CollaboratorBar-DF02nTwF.js")), n = u(() => import("./SnapshotHistory-jogWGLB-.js")), r = u(() => import("./AiFeatureMenu-BS4Rek6j.js")), { t: a } = V(), { t: o, format: c } = X();
616
+ let t = u(() => import("./CollaboratorBar-C5Xf6Mz9.js")), n = u(() => import("./SnapshotHistory-VyL4tJwn.js")), r = u(() => import("./AiFeatureMenu-a0gBZiJ9.js")), { t: a } = V(), { t: o, format: c } = X();
617
617
  return (l, u) => (i(), p("header", rt, [
618
- x("div", it, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", at, d(h(c)(h(o).header.templatesUsed, {
618
+ x("div", it, [e.featureFlags.templateLimit.value === null ? m("", !0) : (i(), p("span", at, v(h(c)(h(o).header.templatesUsed, {
619
619
  used: e.featureFlags.templateCount.value,
620
620
  max: e.featureFlags.templateLimit.value
621
621
  })), 1))]),
@@ -632,17 +632,17 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
632
632
  "preview-mode": e.editor.state.previewMode,
633
633
  onChange: e.editor.setPreviewMode
634
634
  }, null, 8, ["preview-mode", "onChange"]),
635
- e.editor.state.previewMode && !e.core.previewResolution.supersedesSamples.value ? (i(), v(ye, {
635
+ e.editor.state.previewMode && !e.core.previewResolution.supersedesSamples.value ? (i(), y(ye, {
636
636
  key: 0,
637
637
  "sample-mode": e.core.mergeTagSampleMode.value,
638
638
  onChange: u[0] ||= (t) => e.core.mergeTagSampleMode.value = t
639
639
  }, null, 8, ["sample-mode"])) : m("", !0),
640
- e.collaboration && e.isCollaborationEnabled ? (i(), v(h(t), {
640
+ e.collaboration && e.isCollaborationEnabled ? (i(), y(h(t), {
641
641
  key: 1,
642
642
  collaborators: e.collaboration.collaborators.value,
643
643
  "is-connected": e.websocket.isConnected.value
644
644
  }, null, 8, ["collaborators", "is-connected"])) : m("", !0),
645
- e.snapshotPreview.snapshotHistoryInstance.value ? (i(), v(h(n), {
645
+ e.snapshotPreview.snapshotHistoryInstance.value ? (i(), y(h(n), {
646
646
  key: 2,
647
647
  snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
648
648
  "is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
@@ -666,16 +666,16 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
666
666
  }, [D(h(q), {
667
667
  size: 12,
668
668
  "stroke-width": 2.5
669
- }), T(" " + d(h(o).header.saveFailed), 1)], 8, ct)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", lt, [D(h(G), {
669
+ }), T(" " + v(h(o).header.saveFailed), 1)], 8, ct)) : e.featureFlags.saveStatus.value === "saved" ? (i(), p("div", lt, [D(h(G), {
670
670
  size: 12,
671
671
  "stroke-width": 2.5
672
- }), T(" " + d(h(o).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", ut, [u[5] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + d(h(o).header.unsaved), 1)])) : m("", !0),
672
+ }), T(" " + v(h(o).header.saved), 1)])) : e.editor.state.isDirty ? (i(), p("div", ut, [u[5] ||= x("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), T(" " + v(h(o).header.unsaved), 1)])) : m("", !0),
673
673
  e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("button", {
674
674
  key: 3,
675
675
  "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${h(o).comments.button} (${e.commentsInstance.unresolvedCount.value})` : h(o).comments.button,
676
676
  "aria-expanded": e.panelState.commentsOpen.value,
677
- class: b(h($)),
678
- style: C({
677
+ class: C(h($)),
678
+ style: d({
679
679
  backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
680
680
  color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
681
681
  borderColor: "var(--tpl-primary)"
@@ -686,8 +686,8 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
686
686
  size: 16,
687
687
  "stroke-width": 2
688
688
  }),
689
- T(" " + d(h(o).comments.button) + " ", 1),
690
- e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", ft, d(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
689
+ T(" " + v(h(o).comments.button) + " ", 1),
690
+ e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (i(), p("span", ft, v(e.commentsInstance.unresolvedCount.value), 1)) : m("", !0)
691
691
  ], 14, dt)) : m("", !0),
692
692
  e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (i(), p("div", {
693
693
  key: 4,
@@ -695,13 +695,13 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
695
695
  class: "tpl:relative"
696
696
  }, [x("button", {
697
697
  "aria-expanded": e.panelState.aiMenuOpen.value,
698
- class: b(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
698
+ class: C(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
699
699
  onClick: u[2] ||= _((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
700
700
  }, [D(h(H), {
701
701
  size: 16,
702
702
  "stroke-width": 2,
703
703
  class: "tpl-ai-btn-icon"
704
- }), T(" " + d(h(o).aiChat.button), 1)], 10, pt), D(y, {
704
+ }), T(" " + v(h(o).aiChat.button), 1)], 10, pt), D(b, {
705
705
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
706
706
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
707
707
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -717,7 +717,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
717
717
  })], 512)) : m("", !0),
718
718
  e.testEmail.isAvailable.value ? (i(), p("button", {
719
719
  key: 5,
720
- class: b(h($)),
720
+ class: C(h($)),
721
721
  "data-testid": "test-email-trigger",
722
722
  style: {
723
723
  "background-color": "transparent",
@@ -726,18 +726,18 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
726
726
  },
727
727
  disabled: e.testEmail.isSending.value,
728
728
  onClick: u[3] ||= (t) => e.testEmail.open()
729
- }, [e.testEmail.isSending.value ? (i(), v(h(J), {
729
+ }, [e.testEmail.isSending.value ? (i(), y(h(J), {
730
730
  key: 1,
731
731
  class: "tpl-spinner",
732
732
  size: 16,
733
733
  "stroke-width": 2
734
- })) : (i(), v(h(K), {
734
+ })) : (i(), y(h(K), {
735
735
  key: 0,
736
736
  size: 16,
737
737
  "stroke-width": 2
738
- })), T(" " + d(h(a).testEmail.button), 1)], 10, ht)) : m("", !0),
738
+ })), T(" " + v(h(a).testEmail.button), 1)], 10, ht)) : m("", !0),
739
739
  x("button", {
740
- class: b(h($)),
740
+ class: C(h($)),
741
741
  style: {
742
742
  "background-color": "transparent",
743
743
  color: "var(--tpl-primary)",
@@ -745,16 +745,16 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
745
745
  },
746
746
  disabled: e.isSaveDisabled,
747
747
  onClick: u[4] ||= (e) => l.$emit("save")
748
- }, [e.isSaving ? (i(), v(h(J), {
748
+ }, [e.isSaving ? (i(), y(h(J), {
749
749
  key: 1,
750
750
  class: "tpl-spinner",
751
751
  size: 16,
752
752
  "stroke-width": 2
753
- })) : (i(), v(h(U), {
753
+ })) : (i(), y(h(U), {
754
754
  key: 0,
755
755
  size: 16,
756
756
  "stroke-width": 2
757
- })), T(" " + d(e.isSaving ? h(o).header.saving : h(o).header.save), 1)], 10, gt)
757
+ })), T(" " + v(e.isSaving ? h(o).header.saving : h(o).header.save), 1)], 10, gt)
758
758
  ])
759
759
  ]));
760
760
  }
@@ -769,9 +769,9 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
769
769
  mediaLib: {}
770
770
  },
771
771
  setup(e, { expose: t }) {
772
- let n = u(() => import("./AiChatSidebar-BY1Iy-e8.js")), r = u(() => import("./CommentsSidebar-B9bWvvbl.js")), a = u(() => import("./DesignReferenceSidebar-BXjH47QC.js")), o = u(() => import("./TemplateScoringPanel-B2XIOTl-.js")), s = u(async () => {
772
+ let n = u(() => import("./AiChatSidebar-CFvS4-EZ.js")), r = u(() => import("./CommentsSidebar-BLRZRSSC.js")), a = u(() => import("./DesignReferenceSidebar-CZiP00JN.js")), o = u(() => import("./TemplateScoringPanel-NucRtAP0.js")), s = u(async () => {
773
773
  try {
774
- return (await import("./src-CRvTVX4F.js")).MediaLibraryModal;
774
+ return (await import("./src-BRRRFqXr.js")).MediaLibraryModal;
775
775
  } catch {
776
776
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
777
777
  }
@@ -857,12 +857,12 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
857
857
  "stroke-width": 1.5,
858
858
  class: "tpl:text-[var(--tpl-danger)]"
859
859
  })]),
860
- x("div", Tt, [x("h2", Et, d(h(r).error.title), 1), x("p", Dt, d(a(e.error)), 1)]),
860
+ x("div", Tt, [x("h2", Et, v(h(r).error.title), 1), x("p", Dt, v(a(e.error)), 1)]),
861
861
  o(e.error) ? m("", !0) : (i(), p("button", {
862
862
  key: 0,
863
863
  class: "tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
864
864
  onClick: s[0] ||= (e) => n("retry")
865
- }, d(h(r).error.retry), 1))
865
+ }, v(h(r).error.retry), 1))
866
866
  ])) : m("", !0);
867
867
  }
868
868
  }), kt = {
@@ -878,14 +878,14 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
878
878
  size: 18,
879
879
  "stroke-width": 2,
880
880
  class: "tpl:text-[var(--tpl-primary)]"
881
- }), x("span", null, d(h(r).snapshotPreview.message), 1)]), x("div", jt, [x("button", {
881
+ }), x("span", null, v(h(r).snapshotPreview.message), 1)]), x("div", jt, [x("button", {
882
882
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
883
883
  style: { "background-color": "transparent" },
884
884
  onClick: a[0] ||= (e) => n("cancel")
885
- }, d(h(r).snapshotPreview.cancel), 1), x("button", {
885
+ }, v(h(r).snapshotPreview.cancel), 1), x("button", {
886
886
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
887
887
  onClick: a[1] ||= (e) => n("confirm")
888
- }, d(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
888
+ }, v(h(r).snapshotPreview.restore), 1)])])) : m("", !0);
889
889
  }
890
890
  }), Nt = {
891
891
  key: 0,
@@ -902,7 +902,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
902
902
  props: { visible: { type: Boolean } },
903
903
  setup(e) {
904
904
  let { t } = V();
905
- return (n, r) => e.visible ? (i(), p("div", Nt, d(h(t).history.collabWarning), 1)) : m("", !0);
905
+ return (n, r) => e.visible ? (i(), p("div", Nt, v(h(t).history.collabWarning), 1)) : m("", !0);
906
906
  }
907
907
  }), Ft = ["data-tpl-theme"], It = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Lt = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, Rt = ["aria-label"], zt = /*#__PURE__*/ ae(/* @__PURE__ */ E({
908
908
  __name: "CloudEditor",
@@ -915,7 +915,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
915
915
  },
916
916
  emits: ["ready"],
917
917
  setup(e, { expose: r, emit: o }) {
918
- let l = u(() => import("./SavedBlocksPanels-ElerTTa_.js")), f = u(() => import("./TestEmailPanel-1zxRa00s.js")), w = e;
918
+ let l = u(() => import("./SavedBlocksPanels-WYrSyf-l.js")), f = u(() => import("./TestEmailPanel-CpK5t4E3.js")), w = e;
919
919
  a(z, w.cloudTranslations);
920
920
  let E = o, O = c(null), k = c(null), A = Ue({
921
921
  config: w.config,
@@ -964,14 +964,14 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
964
964
  }), (t, r) => (i(), p("div", {
965
965
  ref_key: "rootEl",
966
966
  ref: k,
967
- class: b(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(L).state.darkMode }]),
967
+ class: C(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": h(L).state.darkMode }]),
968
968
  "data-tpl-theme": h(R).resolvedTheme.value,
969
- style: C(h(R).themeStyles.value),
969
+ style: d(h(R).themeStyles.value),
970
970
  onDragover: r[6] ||= _(() => {}, ["prevent"]),
971
971
  onDrop: r[7] ||= _(() => {}, ["prevent"])
972
972
  }, [
973
973
  D(le),
974
- D(y, {
974
+ D(b, {
975
975
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
976
976
  "enter-from-class": "tpl:opacity-100",
977
977
  "enter-to-class": "tpl:opacity-100",
@@ -982,7 +982,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
982
982
  default: s(() => [D(St, { visible: h(j) || h(L).state.isLoading }, null, 8, ["visible"])]),
983
983
  _: 1
984
984
  }),
985
- D(y, {
985
+ D(b, {
986
986
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
987
987
  "enter-from-class": "tpl:opacity-0",
988
988
  "enter-to-class": "tpl:opacity-100",
@@ -1045,7 +1045,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1045
1045
  onCancel: h(q).cancelPreview,
1046
1046
  onConfirm: ae
1047
1047
  }, null, 8, ["visible", "onCancel"]),
1048
- D(y, {
1048
+ D(b, {
1049
1049
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
1050
1050
  "enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
1051
1051
  "enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
@@ -1058,12 +1058,12 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1058
1058
  }),
1059
1059
  n(D(oe, null, null, 512), [[S, !h(L).state.previewMode]]),
1060
1060
  x("div", {
1061
- class: b(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(L).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(q).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1061
+ class: C(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [h(L).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", h(q).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1062
1062
  style: {
1063
1063
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1064
1064
  "background-color": "var(--tpl-canvas-bg)"
1065
1065
  }
1066
- }, [x("div", It, [D(y, { name: "tpl-restore-btn" }, {
1066
+ }, [x("div", It, [D(b, { name: "tpl-restore-btn" }, {
1067
1067
  default: s(() => [h(R).conditionPreview.hasHiddenBlocks.value && h(R).appliesConditionFilter.value ? (i(), p("button", {
1068
1068
  key: 0,
1069
1069
  class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80",
@@ -1078,7 +1078,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1078
1078
  }, [D(h(W), {
1079
1079
  size: 13,
1080
1080
  "stroke-width": 2
1081
- }), T(" " + d(h(R).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1081
+ }), T(" " + v(h(R).t.blockSettings.restoreHiddenBlocks), 1)])) : m("", !0)]),
1082
1082
  _: 1
1083
1083
  })]), x("main", Lt, [D(_e, {
1084
1084
  viewport: h(L).state.viewport,
@@ -1099,7 +1099,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1099
1099
  "locked-blocks",
1100
1100
  "onSelectBlock"
1101
1101
  ])])], 2),
1102
- e.config.branding !== !1 && !h(B).isWhiteLabeled.value ? (i(), v(me, {
1102
+ e.config.branding !== !1 && !h(B).isWhiteLabeled.value ? (i(), y(me, {
1103
1103
  key: 0,
1104
1104
  "position-class": [h(L).state.previewMode ? "tpl:left-0 tpl:right-0" : h(K).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1105
1105
  }, null, 8, ["position-class"])) : m("", !0),
@@ -1109,7 +1109,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1109
1109
  "aria-live": "polite",
1110
1110
  "aria-atomic": "true",
1111
1111
  "aria-label": h(R).t.landmarks.reorderAnnouncements
1112
- }, d(h(R).keyboardReorder.announcement.value), 9, Rt),
1112
+ }, v(h(R).keyboardReorder.announcement.value), 9, Rt),
1113
1113
  n(D(he, {
1114
1114
  "selected-block": h(L).selectedBlock.value,
1115
1115
  settings: h(L).content.value.settings,
@@ -1124,7 +1124,7 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1124
1124
  "shifted-left",
1125
1125
  "onUpdateSettings"
1126
1126
  ]), [[S, !h(L).state.previewMode]]),
1127
- !h(j) && h(ee) ? (i(), v(vt, {
1127
+ !h(j) && h(ee) ? (i(), y(vt, {
1128
1128
  key: 1,
1129
1129
  ref_key: "cloudPanelsRef",
1130
1130
  ref: O,
@@ -1142,11 +1142,11 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1142
1142
  "plan-config-instance",
1143
1143
  "media-lib"
1144
1144
  ])) : m("", !0),
1145
- h(G).isAvailable.value ? (i(), v(h(l), {
1145
+ h(G).isAvailable.value ? (i(), y(h(l), {
1146
1146
  key: 2,
1147
1147
  feature: h(G)
1148
1148
  }, null, 8, ["feature"])) : m("", !0),
1149
- h(H).isAvailable.value ? (i(), v(h(f), {
1149
+ h(H).isAvailable.value ? (i(), y(h(f), {
1150
1150
  key: 3,
1151
1151
  feature: h(H)
1152
1152
  }, null, 8, ["feature"])) : m("", !0),
@@ -1156,11 +1156,11 @@ var qe = ["aria-label"], Je = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1156
1156
  }, null, 512),
1157
1157
  D(de),
1158
1158
  D(ge),
1159
- h(ie) ? (i(), v(fe, { key: 4 })) : m("", !0)
1159
+ h(ie) ? (i(), y(fe, { key: 4 })) : m("", !0)
1160
1160
  ], 46, Ft));
1161
1161
  }
1162
1162
  }), [["__scopeId", "data-v-16786f1a"]]);
1163
1163
  //#endregion
1164
1164
  export { zt as default };
1165
1165
 
1166
- //# sourceMappingURL=CloudEditor-BaqiFbf0.js.map
1166
+ //# sourceMappingURL=CloudEditor-Ddnatfuw.js.map