@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,5 +1,5 @@
1
- import { K as e, T as t } from "./draggable-Z4XXmbPC.js";
2
- import { H as n } from "./keys-DsoX52o_.js";
1
+ import { K as e, T as t } from "./draggable-DCs9qL-b.js";
2
+ import { H as n } from "./keys-Cmc2Yl3D.js";
3
3
  //#region src/composables/useI18n.ts
4
4
  function r(r) {
5
5
  let i = r ?? t(n, null);
@@ -16,4 +16,4 @@ function r(r) {
16
16
  //#endregion
17
17
  export { r as t };
18
18
 
19
- //# sourceMappingURL=useI18n-BvcEYzrI.js.map
19
+ //# sourceMappingURL=useI18n-UMs0F71x.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useI18n-BvcEYzrI.js","names":[],"sources":["../../../src/composables/useI18n.ts"],"sourcesContent":["import type { Translations } from \"../i18n\";\nimport { type Ref, inject, isRef } from \"vue\";\nimport { TRANSLATIONS_KEY } from \"../keys\";\n\nexport interface UseI18nReturn {\n /** Current translations object */\n t: Translations;\n /** Format a string with placeholders */\n format: (template: string, values: Record<string, string | number>) => string;\n}\n\n/**\n * Composable for internationalization.\n * Provides access to the current locale's translations.\n *\n * @param translationsOverride - Optional translations to use instead of injected value\n */\nexport function useI18n(translationsOverride?: Translations): UseI18nReturn {\n const injected =\n translationsOverride ??\n (inject(TRANSLATIONS_KEY, null) as Translations | Ref<Translations> | null);\n\n if (!injected) {\n throw new Error(\n \"useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.\",\n );\n }\n\n const t: Translations = isRef(injected) ? injected.value : injected;\n\n /**\n * Format a string with placeholders.\n * e.g., format('{minutes}m ago', { minutes: 5 }) -> '5m ago'\n */\n function format(\n template: string,\n values: Record<string, string | number>,\n ): string {\n return template.replace(/\\{(\\w+)\\}/g, (_, key) => {\n return key in values ? String(values[key]) : `{${key}}`;\n });\n }\n\n return {\n t,\n format,\n };\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAQ,GAAoD;CAC1E,IAAM,IACJ,KACC,EAAO,GAAkB,IAAI;CAEhC,IAAI,CAAC,GACH,MAAU,MACR,4GACF;CAGF,IAAM,IAAkB,EAAM,CAAQ,IAAI,EAAS,QAAQ;CAM3D,SAAS,EACP,GACA,GACQ;EACR,OAAO,EAAS,QAAQ,eAAe,GAAG,MACjC,KAAO,IAAS,OAAO,EAAO,EAAI,IAAI,IAAI,EAAI,EACtD;CACH;CAEA,OAAO;EACL;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useI18n-UMs0F71x.js","names":[],"sources":["../../../src/composables/useI18n.ts"],"sourcesContent":["import type { Translations } from \"../i18n\";\nimport { type Ref, inject, isRef } from \"vue\";\nimport { TRANSLATIONS_KEY } from \"../keys\";\n\nexport interface UseI18nReturn {\n /** Current translations object */\n t: Translations;\n /** Format a string with placeholders */\n format: (template: string, values: Record<string, string | number>) => string;\n}\n\n/**\n * Composable for internationalization.\n * Provides access to the current locale's translations.\n *\n * @param translationsOverride - Optional translations to use instead of injected value\n */\nexport function useI18n(translationsOverride?: Translations): UseI18nReturn {\n const injected =\n translationsOverride ??\n (inject(TRANSLATIONS_KEY, null) as Translations | Ref<Translations> | null);\n\n if (!injected) {\n throw new Error(\n \"useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.\",\n );\n }\n\n const t: Translations = isRef(injected) ? injected.value : injected;\n\n /**\n * Format a string with placeholders.\n * e.g., format('{minutes}m ago', { minutes: 5 }) -> '5m ago'\n */\n function format(\n template: string,\n values: Record<string, string | number>,\n ): string {\n return template.replace(/\\{(\\w+)\\}/g, (_, key) => {\n return key in values ? String(values[key]) : `{${key}}`;\n });\n }\n\n return {\n t,\n format,\n };\n}\n"],"mappings":";;;AAiBA,SAAgB,EAAQ,GAAoD;CAC1E,IAAM,IACJ,KACC,EAAO,GAAkB,IAAI;CAEhC,IAAI,CAAC,GACH,MAAU,MACR,4GACF;CAGF,IAAM,IAAkB,EAAM,CAAQ,IAAI,EAAS,QAAQ;CAM3D,SAAS,EACP,GACA,GACQ;EACR,OAAO,EAAS,QAAQ,eAAe,GAAG,MACjC,KAAO,IAAS,OAAO,EAAO,EAAI,IAAI,IAAI,EAAI,EACtD;CACH;CAEA,OAAO;EACL;EACA;CACF;AACF"}
@@ -1,6 +1,6 @@
1
- import { T as e, Z as t } from "./draggable-Z4XXmbPC.js";
2
- import { f as n, o as r, r as i } from "./src-CZjSXPYq.js";
3
- import { A as a, D as o, E as s, N as c, O as l } from "./keys-DsoX52o_.js";
1
+ import { T as e, Z as t } from "./draggable-DCs9qL-b.js";
2
+ import { f as n, o as r, r as i } from "./src-DsvVSm7Z.js";
3
+ import { A as a, D as o, E as s, N as c, O as l } from "./keys-Cmc2Yl3D.js";
4
4
  //#region src/composables/useMergeTag.ts
5
5
  function u() {
6
6
  let u = e(s, []), d = e(a, i.liquid), f = e(c, null), p = e(o, !0), m = e(l, null), h = t(!1);
@@ -43,4 +43,4 @@ function u() {
43
43
  //#endregion
44
44
  export { u as t };
45
45
 
46
- //# sourceMappingURL=useMergeTag-BSdxMUzg.js.map
46
+ //# sourceMappingURL=useMergeTag-DjQoCGEz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMergeTag-BSdxMUzg.js","names":[],"sources":["../../../src/composables/useMergeTag.ts"],"sourcesContent":["import type { MergeTag, SyntaxPreset } from \"@templatical/types\";\nimport {\n isMergeTagValue as checkIsMergeTagValue,\n getMergeTagLabel as resolveMergeTagLabel,\n SYNTAX_PRESETS,\n} from \"@templatical/types\";\nimport { inject, ref, type Ref } from \"vue\";\nimport {\n MERGE_TAGS_KEY,\n MERGE_TAG_SYNTAX_KEY,\n MERGE_TAG_AUTOCOMPLETE_KEY,\n MERGE_TAG_PICKER_KEY,\n ON_REQUEST_MERGE_TAG_KEY,\n} from \"../keys\";\n\nexport interface UseMergeTagReturn {\n /** Available merge tags from config */\n mergeTags: MergeTag[];\n /** Whether a merge tag request is in progress */\n isRequesting: Ref<boolean>;\n /**\n * Whether the \"Insert merge tag\" button should be shown. True when\n * either `onRequestMergeTag` is provided or `mergeTags.tags` is\n * non-empty (the built-in picker then handles the click).\n */\n canRequestMergeTag: boolean;\n /** Whether typing-based autocomplete is enabled by configuration */\n autocomplete: boolean;\n /** The resolved syntax preset for merge tags */\n syntax: SyntaxPreset;\n /** Check if a value matches the configured merge tag syntax */\n isMergeTagValue: (value: string) => boolean;\n /** Get the human-readable label for a merge tag value */\n getMergeTagLabel: (value: string) => string;\n /**\n * Request a merge tag from the user. Precedence: when\n * `onRequestMergeTag` is set it owns the UX; otherwise the built-in\n * picker opens with the configured `mergeTags.tags`; otherwise null.\n */\n requestMergeTag: () => Promise<MergeTag | null>;\n}\n\n/**\n * Composable for merge tag functionality.\n * Provides utilities for detecting, displaying, and requesting merge tags.\n */\nexport function useMergeTag(): UseMergeTagReturn {\n const mergeTags = inject(MERGE_TAGS_KEY, []);\n const syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\n const onRequestMergeTag = inject(ON_REQUEST_MERGE_TAG_KEY, null);\n const autocomplete = inject(MERGE_TAG_AUTOCOMPLETE_KEY, true);\n // Picker may be null in headless contexts (tests, non-editor consumers).\n // requestMergeTag() returns null in that case rather than throwing.\n const picker = inject(MERGE_TAG_PICKER_KEY, null);\n\n const isRequesting = ref(false);\n\n function isMergeTagValue(value: string): boolean {\n return checkIsMergeTagValue(value, syntax);\n }\n\n function getMergeTagLabel(value: string): string {\n return resolveMergeTagLabel(value, mergeTags);\n }\n\n /**\n * Request a merge tag from the user. Precedence:\n * 1. `onRequestMergeTag` callback (consumer-owned UX)\n * 2. Built-in picker over `mergeTags.tags`\n * 3. null (nothing configured)\n */\n async function requestMergeTag(): Promise<MergeTag | null> {\n if (onRequestMergeTag) {\n isRequesting.value = true;\n try {\n return await onRequestMergeTag();\n } finally {\n isRequesting.value = false;\n }\n }\n if (mergeTags.length > 0 && picker) {\n isRequesting.value = true;\n try {\n return await picker.open(mergeTags);\n } finally {\n isRequesting.value = false;\n }\n }\n return null;\n }\n\n const canRequestMergeTag = !!onRequestMergeTag || mergeTags.length > 0;\n\n return {\n mergeTags,\n isRequesting,\n canRequestMergeTag,\n autocomplete,\n syntax,\n isMergeTagValue,\n getMergeTagLabel,\n requestMergeTag,\n };\n}\n"],"mappings":";;;;AA8CA,SAAgB,IAAiC;CAC/C,IAAM,IAAY,EAAO,GAAgB,CAAC,CAAC,GACrC,IAAS,EAAO,GAAsB,EAAe,MAAM,GAC3D,IAAoB,EAAO,GAA0B,IAAI,GACzD,IAAe,EAAO,GAA4B,EAAI,GAGtD,IAAS,EAAO,GAAsB,IAAI,GAE1C,IAAe,EAAI,EAAK;CAE9B,SAAS,EAAgB,GAAwB;EAC/C,OAAO,EAAqB,GAAO,CAAM;CAC3C;CAEA,SAAS,EAAiB,GAAuB;EAC/C,OAAO,EAAqB,GAAO,CAAS;CAC9C;CAQA,eAAe,IAA4C;EACzD,IAAI,GAAmB;GACrB,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAkB;GACjC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,IAAI,EAAU,SAAS,KAAK,GAAQ;GAClC,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAO,KAAK,CAAS;GACpC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,OAAO;CACT;CAIA,OAAO;EACL;EACA;EACA,oBALyB,CAAC,CAAC,KAAqB,EAAU,SAAS;EAMnE;EACA;EACA,iBAAA;EACA,kBAAA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"useMergeTag-DjQoCGEz.js","names":[],"sources":["../../../src/composables/useMergeTag.ts"],"sourcesContent":["import type { MergeTag, SyntaxPreset } from \"@templatical/types\";\nimport {\n isMergeTagValue as checkIsMergeTagValue,\n getMergeTagLabel as resolveMergeTagLabel,\n SYNTAX_PRESETS,\n} from \"@templatical/types\";\nimport { inject, ref, type Ref } from \"vue\";\nimport {\n MERGE_TAGS_KEY,\n MERGE_TAG_SYNTAX_KEY,\n MERGE_TAG_AUTOCOMPLETE_KEY,\n MERGE_TAG_PICKER_KEY,\n ON_REQUEST_MERGE_TAG_KEY,\n} from \"../keys\";\n\nexport interface UseMergeTagReturn {\n /** Available merge tags from config */\n mergeTags: MergeTag[];\n /** Whether a merge tag request is in progress */\n isRequesting: Ref<boolean>;\n /**\n * Whether the \"Insert merge tag\" button should be shown. True when\n * either `onRequestMergeTag` is provided or `mergeTags.tags` is\n * non-empty (the built-in picker then handles the click).\n */\n canRequestMergeTag: boolean;\n /** Whether typing-based autocomplete is enabled by configuration */\n autocomplete: boolean;\n /** The resolved syntax preset for merge tags */\n syntax: SyntaxPreset;\n /** Check if a value matches the configured merge tag syntax */\n isMergeTagValue: (value: string) => boolean;\n /** Get the human-readable label for a merge tag value */\n getMergeTagLabel: (value: string) => string;\n /**\n * Request a merge tag from the user. Precedence: when\n * `onRequestMergeTag` is set it owns the UX; otherwise the built-in\n * picker opens with the configured `mergeTags.tags`; otherwise null.\n */\n requestMergeTag: () => Promise<MergeTag | null>;\n}\n\n/**\n * Composable for merge tag functionality.\n * Provides utilities for detecting, displaying, and requesting merge tags.\n */\nexport function useMergeTag(): UseMergeTagReturn {\n const mergeTags = inject(MERGE_TAGS_KEY, []);\n const syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\n const onRequestMergeTag = inject(ON_REQUEST_MERGE_TAG_KEY, null);\n const autocomplete = inject(MERGE_TAG_AUTOCOMPLETE_KEY, true);\n // Picker may be null in headless contexts (tests, non-editor consumers).\n // requestMergeTag() returns null in that case rather than throwing.\n const picker = inject(MERGE_TAG_PICKER_KEY, null);\n\n const isRequesting = ref(false);\n\n function isMergeTagValue(value: string): boolean {\n return checkIsMergeTagValue(value, syntax);\n }\n\n function getMergeTagLabel(value: string): string {\n return resolveMergeTagLabel(value, mergeTags);\n }\n\n /**\n * Request a merge tag from the user. Precedence:\n * 1. `onRequestMergeTag` callback (consumer-owned UX)\n * 2. Built-in picker over `mergeTags.tags`\n * 3. null (nothing configured)\n */\n async function requestMergeTag(): Promise<MergeTag | null> {\n if (onRequestMergeTag) {\n isRequesting.value = true;\n try {\n return await onRequestMergeTag();\n } finally {\n isRequesting.value = false;\n }\n }\n if (mergeTags.length > 0 && picker) {\n isRequesting.value = true;\n try {\n return await picker.open(mergeTags);\n } finally {\n isRequesting.value = false;\n }\n }\n return null;\n }\n\n const canRequestMergeTag = !!onRequestMergeTag || mergeTags.length > 0;\n\n return {\n mergeTags,\n isRequesting,\n canRequestMergeTag,\n autocomplete,\n syntax,\n isMergeTagValue,\n getMergeTagLabel,\n requestMergeTag,\n };\n}\n"],"mappings":";;;;AA8CA,SAAgB,IAAiC;CAC/C,IAAM,IAAY,EAAO,GAAgB,CAAC,CAAC,GACrC,IAAS,EAAO,GAAsB,EAAe,MAAM,GAC3D,IAAoB,EAAO,GAA0B,IAAI,GACzD,IAAe,EAAO,GAA4B,EAAI,GAGtD,IAAS,EAAO,GAAsB,IAAI,GAE1C,IAAe,EAAI,EAAK;CAE9B,SAAS,EAAgB,GAAwB;EAC/C,OAAO,EAAqB,GAAO,CAAM;CAC3C;CAEA,SAAS,EAAiB,GAAuB;EAC/C,OAAO,EAAqB,GAAO,CAAS;CAC9C;CAQA,eAAe,IAA4C;EACzD,IAAI,GAAmB;GACrB,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAkB;GACjC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,IAAI,EAAU,SAAS,KAAK,GAAQ;GAClC,EAAa,QAAQ;GACrB,IAAI;IACF,OAAO,MAAM,EAAO,KAAK,CAAS;GACpC,UAAU;IACR,EAAa,QAAQ;GACvB;EACF;EACA,OAAO;CACT;CAIA,OAAO;EACL;EACA;EACA,oBALyB,CAAC,CAAC,KAAqB,EAAU,SAAS;EAMnE;EACA;EACA,iBAAA;EACA,kBAAA;EACA;CACF;AACF"}
@@ -1,5 +1,5 @@
1
- import { T as e, Z as t } from "./draggable-Z4XXmbPC.js";
2
- import { F as n } from "./keys-DsoX52o_.js";
1
+ import { T as e, Z as t } from "./draggable-DCs9qL-b.js";
2
+ import { F as n } from "./keys-Cmc2Yl3D.js";
3
3
  //#region src/utils/resolveColorsConfig.ts
4
4
  var r = {
5
5
  presets: [],
@@ -58,4 +58,4 @@ function l() {
58
58
  //#endregion
59
59
  export { r as a, o as i, c as n, a as o, s as r, l as t };
60
60
 
61
- //# sourceMappingURL=usePopoverPosition-ig-71caO.js.map
61
+ //# sourceMappingURL=usePopoverPosition-cf8Y-ynK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePopoverPosition-ig-71caO.js","names":[],"sources":["../../../src/utils/resolveColorsConfig.ts","../../../src/utils/color.ts","../../../src/composables/usePopoverRoot.ts","../../../src/composables/usePopoverPosition.ts"],"sourcesContent":["import type { ColorsConfig } from \"@templatical/types\";\n\n/**\n * Normalized color-picker configuration handed to the provide/inject layer and\n * to `ColorPicker`. `presets` defaults to an empty array and `allowCustom` to\n * `true`, so consumers never branch on `undefined`.\n *\n * `allowCustomIgnored` is a validation signal, not a rendered value: it is\n * `true` when `allowCustom: false` was requested but forced back to `true`\n * because there were no presets to fall back on. This util stays pure — it\n * never logs; the consumer that owns the config surface emits the warning\n * (today that is `useEditorCore` for the editor-level config), the same split\n * `resolvePaletteBlocks` / `Sidebar.vue` use.\n */\nexport interface ResolvedColors {\n presets: string[];\n allowCustom: boolean;\n allowCustomIgnored: boolean;\n /**\n * Preset entries dropped because they are not a valid `#rgb` / `#rrggbb` hex\n * string (see the validity rule on {@link resolveColorsConfig}). Collected —\n * not logged — so the config-owning consumer can warn once listing them,\n * exactly as `allowCustomIgnored` is surfaced. Reflects THIS resolution's\n * `colors.presets` input only: when a `fallback`'s already-resolved (already\n * filtered) presets are inherited, its invalids are never re-reported here.\n */\n invalidPresets: string[];\n}\n\n/**\n * The unconfigured baseline: no presets, free-form entry allowed — i.e. the\n * picker behaves exactly as it did before the `colors` option existed. Used as\n * the inject default and as the fallback for the top-level resolution.\n */\nexport const DEFAULT_RESOLVED_COLORS: ResolvedColors = {\n presets: [],\n allowCustom: true,\n allowCustomIgnored: false,\n invalidPresets: [],\n};\n\n/**\n * A valid preset is a `#rgb` or `#rrggbb` hex string. 4-/8-digit alpha hex is\n * deliberately rejected: the wheel (vanilla-colorful) is RGB-only,\n * `normalizeColorToHex` drops alpha on the DOM round-trip so a selected alpha\n * preset would never read back as selected, and alpha degrades unpredictably\n * across email clients.\n */\nconst VALID_PRESET_HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * Resolve a `ColorsConfig` against an already-resolved `fallback`, applying\n * precedence per property (`input` → `fallback` → default) plus the shared\n * validation rule.\n *\n * The editor-level call passes no `fallback` (it defaults to\n * {@link DEFAULT_RESOLVED_COLORS}) and its result is provided via `COLORS_KEY`.\n * The `fallback` parameter is the nested-resolution seam: a narrower config can\n * be resolved against a broader already-resolved one, inheriting whichever\n * property it does not set.\n *\n * Validation: entries in `colors.presets` that aren't valid hex\n * ({@link VALID_PRESET_HEX}) are dropped from `presets` and collected into\n * `invalidPresets` for the caller to warn about. Separately, `allowCustom:\n * false` with no presets anywhere in the chain is ignored — forced back to\n * `true`, with `allowCustomIgnored` set so the caller can warn — because\n * hiding the wheel and hex input without a preset grid would leave the picker\n * unable to set a color. Filtering runs BEFORE that guard, so an all-invalid\n * list with `allowCustom: false` cascades into the forced-true path. This\n * mirrors how `paletteBlocks` is resolved: `resolvePaletteBlocks` collects the\n * offending entries and the consumer warns; this util stays pure the same way.\n */\nexport function resolveColorsConfig(\n colors: ColorsConfig | undefined,\n fallback: ResolvedColors = DEFAULT_RESOLVED_COLORS,\n): ResolvedColors {\n // Validate only presets this resolution actually supplies. When it inherits\n // `fallback.presets`, those were already resolved (already filtered), so\n // re-validating would double-report an upstream invalid entry.\n let presets: string[];\n let invalidPresets: string[];\n if (colors?.presets === undefined) {\n presets = fallback.presets;\n invalidPresets = [];\n } else {\n presets = [];\n invalidPresets = [];\n for (const entry of colors.presets) {\n if (VALID_PRESET_HEX.test(entry)) {\n presets.push(entry);\n } else {\n invalidPresets.push(entry);\n }\n }\n }\n\n const requestedAllowCustom = colors?.allowCustom ?? fallback.allowCustom;\n\n const allowCustomIgnored = !requestedAllowCustom && presets.length === 0;\n const allowCustom = allowCustomIgnored ? true : requestedAllowCustom;\n\n return { presets, allowCustom, allowCustomIgnored, invalidPresets };\n}\n","/**\n * Normalize a browser-serialized `rgb()/rgba()` color to `#rrggbb`. The browser\n * serializes an inline `style=\"color:#hex\"` to `rgb(...)`, so reading a stored\n * color back via `element.style.color` (e.g. a TipTap textStyle/highlight mark,\n * or a saved link color) surfaces `rgb(...)` — mismatching the hex used\n * everywhere else, and unparseable by the hex-only picker (`vanilla-colorful`)\n * and the native `<input type=\"color\">`. Non-rgb input (already hex, a keyword,\n * or empty) is returned unchanged.\n */\nexport function normalizeColorToHex(value: string): string {\n const m = /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)/i.exec(value.trim());\n if (!m) return value;\n const toHex = (n: string) => Number(n).toString(16).padStart(2, \"0\");\n return `#${toHex(m[1])}${toHex(m[2])}${toHex(m[3])}`;\n}\n\n/**\n * Canonicalize a hex color to the lowercase 6-digit form used for preset\n * membership tests. Runs {@link normalizeColorToHex} first (so a\n * browser-serialized `rgb(...)` round-trip collapses to hex), then expands a\n * 3-digit shorthand (`#abc` → `#aabbcc`) and lowercases it. Non-hex input (a\n * keyword, or empty) is returned unchanged after that rgb normalization —\n * the caller decides whether that counts as a member.\n *\n * Kept separate from `normalizeColorToHex` (which is left untouched) because a\n * configured preset may be `#abc` while the browser round-trips the selected\n * value to `#aabbcc`, and a factory default may be `#FFFFFF` while the preset\n * is `#ffffff` — bare equality misses both. Preset-selection display\n * (`ColorPicker`) and the off-palette defaults audit (`collectOffPaletteDefaults`)\n * both compare through this one function so the two membership tests can't drift.\n */\nexport function canonicalizeHexColor(value: string): string {\n const hex = normalizeColorToHex(value);\n const short = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(hex);\n if (short) {\n return `#${short[1]}${short[1]}${short[2]}${short[2]}${short[3]}${short[3]}`.toLowerCase();\n }\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return hex.toLowerCase();\n }\n return hex;\n}\n","import { inject, ref, type Ref } from \"vue\";\nimport { POPOVER_ROOT_KEY } from \"../keys\";\n\n/**\n * Returns the editor's shared popover mount ref — the `<div\n * class=\"tpl-popover-root\" />` rendered at the top level of `Editor.vue` /\n * `CloudEditor.vue`. Teleport targets that previously hard-coded\n * `to=\"body\"` (RichTextLinkDialog, TitleEditor toolbar, ParagraphToolbar,\n * TplModal) inject this and teleport to `popoverRoot.value` instead, so\n * popups stay inside the editor's effective DOM root (shadow-aware).\n *\n * Falls back to a never-resolving `ref(null)` when no provider is in scope.\n * Components must guard with `v-if=\"popoverRoot\"` before teleporting —\n * with the fallback, isolated component tests that don't mount the editor\n * shell simply render nothing rather than blow up.\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverRoot(): Ref<HTMLElement | null> {\n return inject(POPOVER_ROOT_KEY, ref<HTMLElement | null>(null));\n}\n","import { usePopoverRoot } from \"./usePopoverRoot\";\n\n/**\n * Coordinate helper for popovers that teleport into the shared popover root\n * (`.tpl-popover-root`, `position: relative`) and position themselves with\n * `position: absolute`.\n *\n * Callers compute a target point in **viewport** space — from\n * `getBoundingClientRect()`, `useElementBounding`, or a TipTap caret rect —\n * and `toLocal` converts it to coordinates **local to the popover root** by\n * subtracting the root's own viewport rect.\n *\n * Why this exists: a `position: fixed` popover resolves its coordinates\n * against the nearest ancestor that establishes a containing block — and any\n * `transform` / `filter` / `will-change` on an ancestor of the editor (a\n * consumer's scroll-parallax wrapper, route-transition, reveal animation…)\n * does exactly that, even while its computed `transform` reads `none` (a\n * running/animated transform still promotes the element). The fixed popover\n * would then be offset by that ancestor's position. Anchoring `absolute`\n * inside the (positioned) popover root instead makes the placement immune:\n * both points are read in viewport space, so the subtraction cancels the\n * ancestor offset, and the popover tracks the editor if the ancestor moves.\n *\n * Read `toLocal` inside a `computed` for a reactive result (recomputes with\n * its viewport-coordinate dependencies), or call it once when a popover opens.\n * Falls back to the viewport coordinates unchanged when no popover root is in\n * scope (isolated component tests / headless callers).\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverPosition(): {\n toLocal: (viewport: { top: number; left: number }) => {\n top: number;\n left: number;\n };\n} {\n const popoverRoot = usePopoverRoot();\n function toLocal(viewport: { top: number; left: number }): {\n top: number;\n left: number;\n } {\n const rect = popoverRoot.value?.getBoundingClientRect();\n if (!rect) return { top: viewport.top, left: viewport.left };\n return { top: viewport.top - rect.top, left: viewport.left - rect.left };\n }\n return { toLocal };\n}\n"],"mappings":";;;AAkCA,IAAa,IAA0C;CACrD,SAAS,CAAC;CACV,aAAa;CACb,oBAAoB;CACpB,gBAAgB,CAAC;AACnB,GASM,IAAmB;AAwBzB,SAAgB,EACd,GACA,IAA2B,GACX;CAIhB,IAAI,GACA;CACJ,IAAI,GAAQ,YAAY,KAAA,GAEtB,AADA,IAAU,EAAS,SACnB,IAAiB,CAAC;MACb;EAEL,AADA,IAAU,CAAC,GACX,IAAiB,CAAC;EAClB,KAAK,IAAM,KAAS,EAAO,SACzB,AAAI,EAAiB,KAAK,CAAK,IAC7B,EAAQ,KAAK,CAAK,IAElB,EAAe,KAAK,CAAK;CAG/B;CAEA,IAAM,IAAuB,GAAQ,eAAe,EAAS,aAEvD,IAAqB,CAAC,KAAwB,EAAQ,WAAW;CAGvE,OAAO;EAAE;EAAS,aAFE,IAAqB,KAAO;EAEjB;EAAoB;CAAe;AACpE;;;AC7FA,SAAgB,EAAoB,GAAuB;CACzD,IAAM,IAAI,4CAA4C,KAAK,EAAM,KAAK,CAAC;CACvE,IAAI,CAAC,GAAG,OAAO;CACf,IAAM,KAAS,MAAc,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACnE,OAAO,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE;AACnD;AAiBA,SAAgB,EAAqB,GAAuB;CAC1D,IAAM,IAAM,EAAoB,CAAK,GAC/B,IAAQ,qCAAqC,KAAK,CAAG;CAO3D,OANI,IACK,IAAI,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,YAAY,IAEvF,kBAAkB,KAAK,CAAG,IACrB,EAAI,YAAY,IAElB;AACT;;;ACvBA,SAAgB,IAA0C;CACxD,OAAO,EAAO,GAAkB,EAAwB,IAAI,CAAC;AAC/D;;;ACUA,SAAgB,IAKd;CACA,IAAM,IAAc,EAAe;CACnC,SAAS,EAAQ,GAGf;EACA,IAAM,IAAO,EAAY,OAAO,sBAAsB;EAEtD,OADK,IACE;GAAE,KAAK,EAAS,MAAM,EAAK;GAAK,MAAM,EAAS,OAAO,EAAK;EAAK,IADrD;GAAE,KAAK,EAAS;GAAK,MAAM,EAAS;EAAK;CAE7D;CACA,OAAO,EAAE,WAAQ;AACnB"}
1
+ {"version":3,"file":"usePopoverPosition-cf8Y-ynK.js","names":[],"sources":["../../../src/utils/resolveColorsConfig.ts","../../../src/utils/color.ts","../../../src/composables/usePopoverRoot.ts","../../../src/composables/usePopoverPosition.ts"],"sourcesContent":["import type { ColorsConfig } from \"@templatical/types\";\n\n/**\n * Normalized color-picker configuration handed to the provide/inject layer and\n * to `ColorPicker`. `presets` defaults to an empty array and `allowCustom` to\n * `true`, so consumers never branch on `undefined`.\n *\n * `allowCustomIgnored` is a validation signal, not a rendered value: it is\n * `true` when `allowCustom: false` was requested but forced back to `true`\n * because there were no presets to fall back on. This util stays pure — it\n * never logs; the consumer that owns the config surface emits the warning\n * (today that is `useEditorCore` for the editor-level config), the same split\n * `resolvePaletteBlocks` / `Sidebar.vue` use.\n */\nexport interface ResolvedColors {\n presets: string[];\n allowCustom: boolean;\n allowCustomIgnored: boolean;\n /**\n * Preset entries dropped because they are not a valid `#rgb` / `#rrggbb` hex\n * string (see the validity rule on {@link resolveColorsConfig}). Collected —\n * not logged — so the config-owning consumer can warn once listing them,\n * exactly as `allowCustomIgnored` is surfaced. Reflects THIS resolution's\n * `colors.presets` input only: when a `fallback`'s already-resolved (already\n * filtered) presets are inherited, its invalids are never re-reported here.\n */\n invalidPresets: string[];\n}\n\n/**\n * The unconfigured baseline: no presets, free-form entry allowed — i.e. the\n * picker behaves exactly as it did before the `colors` option existed. Used as\n * the inject default and as the fallback for the top-level resolution.\n */\nexport const DEFAULT_RESOLVED_COLORS: ResolvedColors = {\n presets: [],\n allowCustom: true,\n allowCustomIgnored: false,\n invalidPresets: [],\n};\n\n/**\n * A valid preset is a `#rgb` or `#rrggbb` hex string. 4-/8-digit alpha hex is\n * deliberately rejected: the wheel (vanilla-colorful) is RGB-only,\n * `normalizeColorToHex` drops alpha on the DOM round-trip so a selected alpha\n * preset would never read back as selected, and alpha degrades unpredictably\n * across email clients.\n */\nconst VALID_PRESET_HEX = /^#([0-9a-f]{3}|[0-9a-f]{6})$/i;\n\n/**\n * Resolve a `ColorsConfig` against an already-resolved `fallback`, applying\n * precedence per property (`input` → `fallback` → default) plus the shared\n * validation rule.\n *\n * The editor-level call passes no `fallback` (it defaults to\n * {@link DEFAULT_RESOLVED_COLORS}) and its result is provided via `COLORS_KEY`.\n * The `fallback` parameter is the nested-resolution seam: a narrower config can\n * be resolved against a broader already-resolved one, inheriting whichever\n * property it does not set.\n *\n * Validation: entries in `colors.presets` that aren't valid hex\n * ({@link VALID_PRESET_HEX}) are dropped from `presets` and collected into\n * `invalidPresets` for the caller to warn about. Separately, `allowCustom:\n * false` with no presets anywhere in the chain is ignored — forced back to\n * `true`, with `allowCustomIgnored` set so the caller can warn — because\n * hiding the wheel and hex input without a preset grid would leave the picker\n * unable to set a color. Filtering runs BEFORE that guard, so an all-invalid\n * list with `allowCustom: false` cascades into the forced-true path. This\n * mirrors how `paletteBlocks` is resolved: `resolvePaletteBlocks` collects the\n * offending entries and the consumer warns; this util stays pure the same way.\n */\nexport function resolveColorsConfig(\n colors: ColorsConfig | undefined,\n fallback: ResolvedColors = DEFAULT_RESOLVED_COLORS,\n): ResolvedColors {\n // Validate only presets this resolution actually supplies. When it inherits\n // `fallback.presets`, those were already resolved (already filtered), so\n // re-validating would double-report an upstream invalid entry.\n let presets: string[];\n let invalidPresets: string[];\n if (colors?.presets === undefined) {\n presets = fallback.presets;\n invalidPresets = [];\n } else {\n presets = [];\n invalidPresets = [];\n for (const entry of colors.presets) {\n if (VALID_PRESET_HEX.test(entry)) {\n presets.push(entry);\n } else {\n invalidPresets.push(entry);\n }\n }\n }\n\n const requestedAllowCustom = colors?.allowCustom ?? fallback.allowCustom;\n\n const allowCustomIgnored = !requestedAllowCustom && presets.length === 0;\n const allowCustom = allowCustomIgnored ? true : requestedAllowCustom;\n\n return { presets, allowCustom, allowCustomIgnored, invalidPresets };\n}\n","/**\n * Normalize a browser-serialized `rgb()/rgba()` color to `#rrggbb`. The browser\n * serializes an inline `style=\"color:#hex\"` to `rgb(...)`, so reading a stored\n * color back via `element.style.color` (e.g. a TipTap textStyle/highlight mark,\n * or a saved link color) surfaces `rgb(...)` — mismatching the hex used\n * everywhere else, and unparseable by the hex-only picker (`vanilla-colorful`)\n * and the native `<input type=\"color\">`. Non-rgb input (already hex, a keyword,\n * or empty) is returned unchanged.\n */\nexport function normalizeColorToHex(value: string): string {\n const m = /^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)/i.exec(value.trim());\n if (!m) return value;\n const toHex = (n: string) => Number(n).toString(16).padStart(2, \"0\");\n return `#${toHex(m[1])}${toHex(m[2])}${toHex(m[3])}`;\n}\n\n/**\n * Canonicalize a hex color to the lowercase 6-digit form used for preset\n * membership tests. Runs {@link normalizeColorToHex} first (so a\n * browser-serialized `rgb(...)` round-trip collapses to hex), then expands a\n * 3-digit shorthand (`#abc` → `#aabbcc`) and lowercases it. Non-hex input (a\n * keyword, or empty) is returned unchanged after that rgb normalization —\n * the caller decides whether that counts as a member.\n *\n * Kept separate from `normalizeColorToHex` (which is left untouched) because a\n * configured preset may be `#abc` while the browser round-trips the selected\n * value to `#aabbcc`, and a factory default may be `#FFFFFF` while the preset\n * is `#ffffff` — bare equality misses both. Preset-selection display\n * (`ColorPicker`) and the off-palette defaults audit (`collectOffPaletteDefaults`)\n * both compare through this one function so the two membership tests can't drift.\n */\nexport function canonicalizeHexColor(value: string): string {\n const hex = normalizeColorToHex(value);\n const short = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(hex);\n if (short) {\n return `#${short[1]}${short[1]}${short[2]}${short[2]}${short[3]}${short[3]}`.toLowerCase();\n }\n if (/^#[0-9a-f]{6}$/i.test(hex)) {\n return hex.toLowerCase();\n }\n return hex;\n}\n","import { inject, ref, type Ref } from \"vue\";\nimport { POPOVER_ROOT_KEY } from \"../keys\";\n\n/**\n * Returns the editor's shared popover mount ref — the `<div\n * class=\"tpl-popover-root\" />` rendered at the top level of `Editor.vue` /\n * `CloudEditor.vue`. Teleport targets that previously hard-coded\n * `to=\"body\"` (RichTextLinkDialog, TitleEditor toolbar, ParagraphToolbar,\n * TplModal) inject this and teleport to `popoverRoot.value` instead, so\n * popups stay inside the editor's effective DOM root (shadow-aware).\n *\n * Falls back to a never-resolving `ref(null)` when no provider is in scope.\n * Components must guard with `v-if=\"popoverRoot\"` before teleporting —\n * with the fallback, isolated component tests that don't mount the editor\n * shell simply render nothing rather than blow up.\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverRoot(): Ref<HTMLElement | null> {\n return inject(POPOVER_ROOT_KEY, ref<HTMLElement | null>(null));\n}\n","import { usePopoverRoot } from \"./usePopoverRoot\";\n\n/**\n * Coordinate helper for popovers that teleport into the shared popover root\n * (`.tpl-popover-root`, `position: relative`) and position themselves with\n * `position: absolute`.\n *\n * Callers compute a target point in **viewport** space — from\n * `getBoundingClientRect()`, `useElementBounding`, or a TipTap caret rect —\n * and `toLocal` converts it to coordinates **local to the popover root** by\n * subtracting the root's own viewport rect.\n *\n * Why this exists: a `position: fixed` popover resolves its coordinates\n * against the nearest ancestor that establishes a containing block — and any\n * `transform` / `filter` / `will-change` on an ancestor of the editor (a\n * consumer's scroll-parallax wrapper, route-transition, reveal animation…)\n * does exactly that, even while its computed `transform` reads `none` (a\n * running/animated transform still promotes the element). The fixed popover\n * would then be offset by that ancestor's position. Anchoring `absolute`\n * inside the (positioned) popover root instead makes the placement immune:\n * both points are read in viewport space, so the subtraction cancels the\n * ancestor offset, and the popover tracks the editor if the ancestor moves.\n *\n * Read `toLocal` inside a `computed` for a reactive result (recomputes with\n * its viewport-coordinate dependencies), or call it once when a popover opens.\n * Falls back to the viewport coordinates unchanged when no popover root is in\n * scope (isolated component tests / headless callers).\n *\n * Internal — not exported from the package entry.\n */\nexport function usePopoverPosition(): {\n toLocal: (viewport: { top: number; left: number }) => {\n top: number;\n left: number;\n };\n} {\n const popoverRoot = usePopoverRoot();\n function toLocal(viewport: { top: number; left: number }): {\n top: number;\n left: number;\n } {\n const rect = popoverRoot.value?.getBoundingClientRect();\n if (!rect) return { top: viewport.top, left: viewport.left };\n return { top: viewport.top - rect.top, left: viewport.left - rect.left };\n }\n return { toLocal };\n}\n"],"mappings":";;;AAkCA,IAAa,IAA0C;CACrD,SAAS,CAAC;CACV,aAAa;CACb,oBAAoB;CACpB,gBAAgB,CAAC;AACnB,GASM,IAAmB;AAwBzB,SAAgB,EACd,GACA,IAA2B,GACX;CAIhB,IAAI,GACA;CACJ,IAAI,GAAQ,YAAY,KAAA,GAEtB,AADA,IAAU,EAAS,SACnB,IAAiB,CAAC;MACb;EAEL,AADA,IAAU,CAAC,GACX,IAAiB,CAAC;EAClB,KAAK,IAAM,KAAS,EAAO,SACzB,AAAI,EAAiB,KAAK,CAAK,IAC7B,EAAQ,KAAK,CAAK,IAElB,EAAe,KAAK,CAAK;CAG/B;CAEA,IAAM,IAAuB,GAAQ,eAAe,EAAS,aAEvD,IAAqB,CAAC,KAAwB,EAAQ,WAAW;CAGvE,OAAO;EAAE;EAAS,aAFE,IAAqB,KAAO;EAEjB;EAAoB;CAAe;AACpE;;;AC7FA,SAAgB,EAAoB,GAAuB;CACzD,IAAM,IAAI,4CAA4C,KAAK,EAAM,KAAK,CAAC;CACvE,IAAI,CAAC,GAAG,OAAO;CACf,IAAM,KAAS,MAAc,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CACnE,OAAO,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE,IAAI,EAAM,EAAE,EAAE;AACnD;AAiBA,SAAgB,EAAqB,GAAuB;CAC1D,IAAM,IAAM,EAAoB,CAAK,GAC/B,IAAQ,qCAAqC,KAAK,CAAG;CAO3D,OANI,IACK,IAAI,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,EAAM,KAAK,YAAY,IAEvF,kBAAkB,KAAK,CAAG,IACrB,EAAI,YAAY,IAElB;AACT;;;ACvBA,SAAgB,IAA0C;CACxD,OAAO,EAAO,GAAkB,EAAwB,IAAI,CAAC;AAC/D;;;ACUA,SAAgB,IAKd;CACA,IAAM,IAAc,EAAe;CACnC,SAAS,EAAQ,GAGf;EACA,IAAM,IAAO,EAAY,OAAO,sBAAsB;EAEtD,OADK,IACE;GAAE,KAAK,EAAS,MAAM,EAAK;GAAK,MAAM,EAAS,OAAO,EAAK;EAAK,IADrD;GAAE,KAAK,EAAS;GAAK,MAAM,EAAS;EAAK;CAE7D;CACA,OAAO,EAAE,WAAQ;AACnB"}
@@ -1,20 +1,20 @@
1
- import { A as e, C as t, H as n, M as r, V as i, Z as a, b as o, ct as s, g as c, h as l, it as u, j as d, l as f, m as p, n as ee, ot as m, p as h, r as g, s as _, st as v, v as y, x as b, y as x } from "./chunks/draggable-Z4XXmbPC.js";
1
+ import { A as e, C as t, H as n, M as r, V as i, Z as a, b as o, ct as s, g as c, h as l, it as u, j as d, l as f, lt as p, m, n as ee, p as h, r as g, s as _, st as v, v as y, x as b, y as x } from "./chunks/draggable-DCs9qL-b.js";
2
2
  import { r as S } from "./chunks/timeouts-SsLMC4a3.js";
3
- import { I as C, v as w } from "./chunks/src-CZjSXPYq.js";
4
- import { F as T, R as te, b as ne, t as re, w as E } from "./chunks/useEditorCore-BMXBmdd8.js";
5
- import { I as ie, M as ae } from "./chunks/icons-C_kRN0_C.js";
6
- import { t as D } from "./chunks/_plugin-vue_export-helper-B3ysoDQm.js";
7
- import { a as oe, c as se, d as ce, f as le, i as ue, l as de, m as fe, n as pe, o as me, p as O, r as he, s as ge, t as _e, u as ve } from "./chunks/styles-znpPfrFd.js";
8
- import { n as ye, t as be } from "./chunks/MergeTagModeToggle-BCmQg4Qe.js";
3
+ import { R as C, b as w } from "./chunks/src-DsvVSm7Z.js";
4
+ import { F as T, R as E, b as te, t as ne, w as D } from "./chunks/useEditorCore-fyFmWS3D.js";
5
+ import { I as re, M as ie } from "./chunks/icons-CvYN6zrM.js";
6
+ import { t as O } from "./chunks/_plugin-vue_export-helper-B3ysoDQm.js";
7
+ import { a as ae, c as oe, d as se, f as ce, i as le, l as ue, m as de, n as fe, o as pe, p as k, r as me, s as he, t as ge, u as _e } from "./chunks/styles-DEU_sn3k.js";
8
+ import { n as ve, t as ye } from "./chunks/MergeTagModeToggle-ClGdRNpZ.js";
9
9
  //#region src/Editor.vue?vue&type=script&setup=true&lang.ts
10
- var k = ["data-tpl-theme"], A = {
10
+ var be = ["data-tpl-theme"], A = {
11
11
  class: "tpl-header tpl:absolute tpl:top-0 tpl:right-0 tpl:left-0 tpl:z-50 tpl:grid tpl:h-14 tpl:grid-cols-[1fr_auto_1fr] tpl:items-center tpl:px-4 tpl:shadow-[var(--tpl-shadow-md)] tpl:border-b tpl:border-[var(--tpl-border)]",
12
12
  style: {
13
13
  "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)",
14
14
  "backdrop-filter": "blur(12px)",
15
15
  "-webkit-backdrop-filter": "blur(12px)"
16
16
  }
17
- }, j = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, M = { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, N = ["aria-label", "title"], xe = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Se = { class: "tpl:flex tpl:justify-center tpl:p-8" }, Ce = ["aria-label"], P = /*#__PURE__*/ D(/* @__PURE__ */ b({
17
+ }, j = { class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-10" }, M = { class: "tpl:flex tpl:min-w-[200px] tpl:items-center tpl:justify-end tpl:gap-3" }, N = ["aria-label", "title"], xe = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Se = { class: "tpl:flex tpl:justify-center tpl:p-8" }, Ce = ["aria-label"], P = /*#__PURE__*/ O(/* @__PURE__ */ b({
18
18
  __name: "Editor",
19
19
  props: {
20
20
  config: {},
@@ -23,19 +23,19 @@ var k = ["data-tpl-theme"], A = {
23
23
  shadowRoot: {}
24
24
  },
25
25
  setup(t, { expose: g }) {
26
- let b = t, S = te({
26
+ let b = t, S = E({
27
27
  content: b.config.content,
28
28
  templateDefaults: b.config.templateDefaults
29
- }), C = a(null), w = b.config.savedBlocks ? fe({
29
+ }), C = a(null), w = b.config.savedBlocks ? de({
30
30
  provider: b.config.savedBlocks,
31
31
  editor: S,
32
32
  onError: b.config.onError
33
- }) : null, T = o(() => import("./chunks/SavedBlocksPanels-ElerTTa_.js")), E = b.config.testEmail ? le({
33
+ }) : null, T = o(() => import("./chunks/SavedBlocksPanels-WYrSyf-l.js")), D = b.config.testEmail ? ce({
34
34
  provider: b.config.testEmail,
35
35
  getContent: () => S.content.value,
36
36
  renderMjml: F,
37
37
  onError: b.config.onError
38
- }) : null, D = o(() => import("./chunks/TestEmailPanel-1zxRa00s.js")), P = re({
38
+ }) : null, O = o(() => import("./chunks/TestEmailPanel-CpK5t4E3.js")), P = ne({
39
39
  editor: S,
40
40
  containerEl: C,
41
41
  config: {
@@ -53,7 +53,7 @@ var k = ["data-tpl-theme"], A = {
53
53
  onRequestMedia: b.config.onRequestMedia,
54
54
  resolvePreview: b.config.resolvePreview,
55
55
  resolveImageUrl: b.config.resolveImageUrl,
56
- lint: ce(b.config),
56
+ lint: se(b.config),
57
57
  onSave: b.config.onSave ? () => b.config.onSave(JSON.parse(JSON.stringify(S.state.content))) : void 0
58
58
  },
59
59
  translations: b.translations,
@@ -61,18 +61,18 @@ var k = ["data-tpl-theme"], A = {
61
61
  autoSaveOptions: b.config.onChange ? { onChange: () => b.config.onChange(JSON.parse(JSON.stringify(S.state.content))) } : null,
62
62
  capabilities: {
63
63
  ...w ? { savedBlocks: w.capability } : {},
64
- ...E ? { testEmail: E.capability } : {}
64
+ ...D ? { testEmail: D.capability } : {}
65
65
  },
66
66
  editorRoot: b.shadowRoot
67
67
  });
68
68
  function F() {
69
- return O({
69
+ return k({
70
70
  getContent: () => S.content.value,
71
71
  renderCustomBlock: P.registry.renderCustomBlock,
72
72
  getCustomBlockStylesheet: (e) => P.registry.getDefinition(e)?.stylesheet
73
73
  });
74
74
  }
75
- let { showNotice: I } = ne(() => b.config.smallScreenNotice);
75
+ let { showNotice: I } = te(() => b.config.smallScreenNotice);
76
76
  return e(async () => {
77
77
  await b.fontsManager.loadCustomFonts();
78
78
  }), d(() => {
@@ -86,50 +86,50 @@ var k = ["data-tpl-theme"], A = {
86
86
  }), (e, a) => (r(), c("div", {
87
87
  ref_key: "rootEl",
88
88
  ref: C,
89
- class: m(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": u(S).state.darkMode }]),
89
+ class: v(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": u(S).state.darkMode }]),
90
90
  "data-tpl-theme": u(P).resolvedTheme.value,
91
- style: v(u(P).themeStyles.value),
91
+ style: s(u(P).themeStyles.value),
92
92
  onDragover: a[7] ||= f(() => {}, ["prevent"]),
93
93
  onDrop: a[8] ||= f(() => {}, ["prevent"])
94
94
  }, [
95
- x(de),
95
+ x(ue),
96
96
  h("header", A, [
97
97
  a[9] ||= h("div", { class: "tpl:flex tpl:items-center tpl:gap-2.5" }, null, -1),
98
98
  h("div", j, [
99
- x(ye, {
99
+ x(ve, {
100
100
  viewport: u(S).state.viewport,
101
101
  onChange: u(S).setViewport
102
102
  }, null, 8, ["viewport", "onChange"]),
103
- x(ue, {
103
+ x(le, {
104
104
  "dark-mode": u(S).state.darkMode,
105
105
  onChange: u(S).setDarkMode
106
106
  }, null, 8, ["dark-mode", "onChange"]),
107
- x(oe, {
107
+ x(ae, {
108
108
  "preview-mode": u(S).state.previewMode,
109
109
  onChange: u(S).setPreviewMode
110
110
  }, null, 8, ["preview-mode", "onChange"]),
111
- u(S).state.previewMode && !u(P).previewResolution.supersedesSamples.value ? (r(), p(be, {
111
+ u(S).state.previewMode && !u(P).previewResolution.supersedesSamples.value ? (r(), m(ye, {
112
112
  key: 0,
113
113
  "sample-mode": u(P).mergeTagSampleMode.value,
114
114
  onChange: a[0] ||= (e) => u(P).mergeTagSampleMode.value = e
115
115
  }, null, 8, ["sample-mode"])) : l("", !0)
116
116
  ]),
117
- h("div", M, [u(E)?.isAvailable.value ? (r(), c("button", {
117
+ h("div", M, [u(D)?.isAvailable.value ? (r(), c("button", {
118
118
  key: 0,
119
119
  type: "button",
120
120
  "data-testid": "test-email-trigger",
121
121
  "aria-label": u(P).t.testEmail.title,
122
122
  title: u(P).t.testEmail.title,
123
123
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)]",
124
- onClick: a[1] ||= (e) => u(E).open()
125
- }, [x(u(ae), {
124
+ onClick: a[1] ||= (e) => u(D).open()
125
+ }, [x(u(ie), {
126
126
  size: 14,
127
127
  "stroke-width": 1.75
128
- }), y(" " + s(u(P).t.testEmail.button), 1)], 8, N)) : l("", !0)])
128
+ }), y(" " + p(u(P).t.testEmail.button), 1)], 8, N)) : l("", !0)])
129
129
  ]),
130
- n(x(se, null, null, 512), [[_, !u(S).state.previewMode]]),
130
+ n(x(oe, null, null, 512), [[_, !u(S).state.previewMode]]),
131
131
  h("div", {
132
- class: m(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [u(S).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
132
+ class: v(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto tpl:bg-[var(--tpl-canvas-bg)]", [u(S).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]", "tpl:top-14"]]),
133
133
  style: { transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)" }
134
134
  }, [h("div", xe, [x(ee, { name: "tpl-restore-btn" }, {
135
135
  default: i(() => [u(P).conditionPreview.hasHiddenBlocks.value && u(P).appliesConditionFilter.value ? (r(), c("button", {
@@ -138,12 +138,12 @@ var k = ["data-tpl-theme"], A = {
138
138
  style: { "backdrop-filter": "blur(8px)" },
139
139
  "data-testid": "restore-hidden-blocks",
140
140
  onClick: a[2] ||= (e) => u(P).conditionPreview.reset()
141
- }, [x(u(ie), {
141
+ }, [x(u(re), {
142
142
  size: 13,
143
143
  "stroke-width": 2
144
- }), y(" " + s(u(P).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
144
+ }), y(" " + p(u(P).t.blockSettings.restoreHiddenBlocks), 1)])) : l("", !0)]),
145
145
  _: 1
146
- })]), h("div", Se, [x(ve, {
146
+ })]), h("div", Se, [x(_e, {
147
147
  viewport: u(S).state.viewport,
148
148
  content: u(P).previewResolution.content.value,
149
149
  "selected-block-id": u(S).state.selectedBlockId,
@@ -158,7 +158,7 @@ var k = ["data-tpl-theme"], A = {
158
158
  "preview-mode",
159
159
  "onSelectBlock"
160
160
  ])])], 2),
161
- t.config.branding === !1 ? l("", !0) : (r(), p(he, {
161
+ t.config.branding === !1 ? l("", !0) : (r(), m(me, {
162
162
  key: 0,
163
163
  "position-class": [u(S).state.previewMode ? "tpl:left-0 tpl:right-0" : "tpl:left-12 tpl:right-[320px]"]
164
164
  }, null, 8, ["position-class"])),
@@ -168,8 +168,8 @@ var k = ["data-tpl-theme"], A = {
168
168
  "aria-live": "polite",
169
169
  "aria-atomic": "true",
170
170
  "aria-label": u(P).t.landmarks.reorderAnnouncements
171
- }, s(u(P).keyboardReorder.announcement.value), 9, Ce),
172
- n(x(ge, {
171
+ }, p(u(P).keyboardReorder.announcement.value), 9, Ce),
172
+ n(x(he, {
173
173
  "selected-block": u(S).selectedBlock.value,
174
174
  settings: u(S).content.value.settings,
175
175
  onUpdateBlock: a[3] ||= (e) => u(S).updateBlock(u(S).state.selectedBlockId, e),
@@ -185,18 +185,18 @@ var k = ["data-tpl-theme"], A = {
185
185
  ref: (e) => u(P).popoverRoot.value = e,
186
186
  class: "tpl-popover-root"
187
187
  }, null, 512),
188
- x(pe),
189
- x(_e),
190
- u(w)?.isAvailable.value ? (r(), p(u(T), {
188
+ x(fe),
189
+ x(ge),
190
+ u(w)?.isAvailable.value ? (r(), m(u(T), {
191
191
  key: 1,
192
192
  feature: u(w)
193
193
  }, null, 8, ["feature"])) : l("", !0),
194
- u(E)?.isAvailable.value ? (r(), p(u(D), {
194
+ u(D)?.isAvailable.value ? (r(), m(u(O), {
195
195
  key: 2,
196
- feature: u(E)
196
+ feature: u(D)
197
197
  }, null, 8, ["feature"])) : l("", !0),
198
- u(I) ? (r(), p(me, { key: 3 })) : l("", !0)
199
- ], 46, k));
198
+ u(I) ? (r(), m(pe, { key: 3 })) : l("", !0)
199
+ ], 46, be));
200
200
  }
201
201
  }), [["__scopeId", "data-v-40001312"]]), F = /* #__PURE__ */ Object.assign({
202
202
  "./locales/ca.ts": () => import("./chunks/ca-D1zgI9fQ.js"),
@@ -287,7 +287,7 @@ function X(e) {
287
287
  async function Me(e) {
288
288
  let n = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
289
289
  if (!n) throw Error(`[Templatical] Container element not found: ${e.container}`);
290
- let r = await G(e.locale ?? "en"), i = E(e.fonts);
290
+ let r = await G(e.locale ?? "en"), i = D(e.fonts);
291
291
  X(n);
292
292
  let o = q(n, e.shadowDom ?? !0), s = a(null), c = g({ setup() {
293
293
  return () => t(P, {
@@ -320,7 +320,7 @@ async function Me(e) {
320
320
  getCustomBlockStylesheet(e) {
321
321
  if (s.value) return s.value.getCustomBlockStylesheet(e);
322
322
  },
323
- toMjml: () => O(l)
323
+ toMjml: () => k(l)
324
324
  };
325
325
  return l;
326
326
  }
@@ -332,7 +332,7 @@ function $(e) {
332
332
  async function Ne(e) {
333
333
  let n = typeof e.container == "string" ? document.querySelector(e.container) : e.container;
334
334
  if (!n) throw Error(`[Templatical] Container element not found: ${e.container}`);
335
- let { default: r } = await import("./chunks/CloudEditor-BaqiFbf0.js"), [i, o] = await Promise.all([G(e.locale ?? "en"), we(e.locale ?? "en")]), s = E(e.fonts);
335
+ let { default: r } = await import("./chunks/CloudEditor-Ddnatfuw.js"), [i, o] = await Promise.all([G(e.locale ?? "en"), we(e.locale ?? "en")]), s = D(e.fonts);
336
336
  $(n);
337
337
  let c = q(n, e.shadowDom ?? !0), l = a(null);
338
338
  return await new Promise((a, u) => {
@@ -382,6 +382,6 @@ function Pe() {
382
382
  Y && X(Y);
383
383
  }
384
384
  //#endregion
385
- export { T as createLocalStorageSavedBlocksProvider, H as getBaseLocale, Oe as getSupportedCloudLocales, De as getSupportedLocales, Me as init, Ne as initCloud, Ee as isCloudLocaleSupported, Te as isLocaleSupported, Pe as unmount, E as useFonts };
385
+ export { T as createLocalStorageSavedBlocksProvider, H as getBaseLocale, Oe as getSupportedCloudLocales, De as getSupportedLocales, Me as init, Ne as initCloud, Ee as isCloudLocaleSupported, Te as isLocaleSupported, Pe as unmount, D as useFonts };
386
386
 
387
387
  //# sourceMappingURL=editor.js.map