@templatical/editor 0.57.1 → 0.57.2

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 (222) hide show
  1. package/dist/{AiAltTextPopover-BiZHthAB.js → AiAltTextPopover-B4cg0jQG.js} +1 -1
  2. package/dist/{AiAltTextReview-BwhROHiF.js → AiAltTextReview-Dni8I9eV.js} +1 -1
  3. package/dist/{AiChatPanel-Cros4ZCM.js → AiChatPanel-QWqGhy2s.js} +8 -8
  4. package/dist/{AiPanels-D_CdHqFZ.js → AiPanels-DE2ysIV1.js} +1 -1
  5. package/dist/{AiRewriteMenu-6b8GNj64.js → AiRewriteMenu-B25gpnip.js} +8 -8
  6. package/dist/{BlockIssueBadge-i2cZy5PB.js → BlockIssueBadge-Ri7dQhuz.js} +2 -2
  7. package/dist/{BlockPreviewCanvas-BAYIy-QJ.js → BlockPreviewCanvas-yr5MmQql.js} +4 -4
  8. package/dist/{CloudPanels-Cb54vtYC.js → CloudPanels-ZOR9By8W.js} +3 -3
  9. package/dist/{CollaborationNotices-DkYX-ose.js → CollaborationNotices-COS_YvTq.js} +1 -1
  10. package/dist/{CollaboratorBar-xDweDvB6.js → CollaboratorBar-jq6HH0fb.js} +1 -1
  11. package/dist/{CommentsPanel-t3w16YUl.js → CommentsPanel-B0_Ob2vO.js} +1 -1
  12. package/dist/{CommentsSidebar-B3M90RY_.js → CommentsSidebar-DFoLon5D.js} +10 -10
  13. package/dist/{CountdownToolbar-CTbJPh8B.js → CountdownToolbar-BtP0n0yZ.js} +4 -4
  14. package/dist/{IssuesPanel-BUKc8lld.js → IssuesPanel-CarJYQFu.js} +9 -9
  15. package/dist/{LanguageMenu-DruJAMET.js → LanguageMenu-confz89v.js} +10 -10
  16. package/dist/{LocaleNotices-D6zk-QCL.js → LocaleNotices-D8aE167E.js} +2 -2
  17. package/dist/{LogicTagInsertButton-Ci7V0Exe.js → LogicTagInsertButton-DFL3kvGK.js} +6 -6
  18. package/dist/{MediaEditModal-BxbwZxnf.js → MediaEditModal-BWOqjEZN.js} +1 -1
  19. package/dist/{MediaPanels-BiUxsTMM.js → MediaPanels-C-XrldMu.js} +1 -1
  20. package/dist/{MergeTagInput-BA89v7KJ.js → MergeTagInput-BuGJeeyA.js} +1 -1
  21. package/dist/{MergeTagModeToggle-De_FNmcG.js → MergeTagModeToggle-D7482NZf.js} +4 -4
  22. package/dist/{MergeTagTextarea-BRMB24Dg.js → MergeTagTextarea-Qt9_NeY4.js} +3 -3
  23. package/dist/{ParagraphEditor-DYqh0kEa.js → ParagraphEditor-Cd-CBE_l.js} +45 -45
  24. package/dist/{RestoreVersionDialog-CRkyFafq.js → RestoreVersionDialog-Clh4l0Bn.js} +3 -3
  25. package/dist/{RichTextEditorContent-WeCqqCy3.js → RichTextEditorContent-Dw_Z9zhi.js} +4 -4
  26. package/dist/{SaveBlockDialog-D992yyO4.js → SaveBlockDialog-kboYvk_a.js} +7 -7
  27. package/dist/{SavedBlocksBrowserModal-tH74h2Tz.js → SavedBlocksBrowserModal-wVGMC6My.js} +9 -9
  28. package/dist/{SavedBlocksPanels-BuzEwYfp.js → SavedBlocksPanels-C9AHYfYR.js} +1 -1
  29. package/dist/{SavedBlocksPickBar-DbULBPsI.js → SavedBlocksPickBar-CVbV5MVL.js} +2 -2
  30. package/dist/{TemplateSettings-eMBAy_wd.js → TemplateSettings-ChCm5_2b.js} +8 -8
  31. package/dist/{TestEmailModal-hb9iopaZ.js → TestEmailModal-CYq9Ec7x.js} +7 -7
  32. package/dist/{TestEmailPanel-DbeZjj0u.js → TestEmailPanel-7Ua54CYL.js} +1 -1
  33. package/dist/{TitleEditor-CisDioGi.js → TitleEditor-DXMOgW-9.js} +9 -9
  34. package/dist/{Toolbar-BUVRjylH.js → Toolbar-CVHJl6i4.js} +30 -30
  35. package/dist/{TplModal-BPPP-uM6.js → TplModal-BErE8I3p.js} +1 -1
  36. package/dist/{VersionHistoryMenu-Cd2IaHgT.js → VersionHistoryMenu-P3P00KqQ.js} +5 -5
  37. package/dist/{VersionHistoryPanels-BNONrE-8.js → VersionHistoryPanels-DES1b1Pq.js} +1 -1
  38. package/dist/{VersionPreviewBanner-lkAf7tc8.js → VersionPreviewBanner-D2TtR9I5.js} +1 -1
  39. package/dist/{WrapperBlock-B3UAv5kv.js → WrapperBlock-B1zI7POT.js} +3 -3
  40. package/dist/{blockTypeIcons-BPPpqFc2.js → blockTypeIcons-Dp540i74.js} +3 -3
  41. package/dist/bundle-stats.json +6 -6
  42. package/dist/cdn/chunks/{AiAltTextPopover-CafZSF50.js → AiAltTextPopover-sx3bmRiV.js} +2 -2
  43. package/dist/cdn/chunks/{AiAltTextPopover-CafZSF50.js.map → AiAltTextPopover-sx3bmRiV.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiAltTextReview-BJcaqyp5.js → AiAltTextReview-Cj3PKInZ.js} +2 -2
  45. package/dist/cdn/chunks/{AiAltTextReview-BJcaqyp5.js.map → AiAltTextReview-Cj3PKInZ.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiChatPanel-DNCUpV8n.js → AiChatPanel-DibkqrqY.js} +2 -2
  47. package/dist/cdn/chunks/{AiChatPanel-DNCUpV8n.js.map → AiChatPanel-DibkqrqY.js.map} +1 -1
  48. package/dist/cdn/chunks/{AiPanels-IV0VEkBL.js → AiPanels-DVs4r8sY.js} +2 -2
  49. package/dist/cdn/chunks/{AiPanels-IV0VEkBL.js.map → AiPanels-DVs4r8sY.js.map} +1 -1
  50. package/dist/cdn/chunks/{AiRewriteMenu-DFUZWA7e.js → AiRewriteMenu-BbZ9NRoe.js} +6 -6
  51. package/dist/cdn/chunks/{AiRewriteMenu-DFUZWA7e.js.map → AiRewriteMenu-BbZ9NRoe.js.map} +1 -1
  52. package/dist/cdn/chunks/{BlockIssueBadge-DIlFDDwh.js → BlockIssueBadge-BWIth1y6.js} +2 -2
  53. package/dist/cdn/chunks/{BlockIssueBadge-DIlFDDwh.js.map → BlockIssueBadge-BWIth1y6.js.map} +1 -1
  54. package/dist/cdn/chunks/{BlockPreviewCanvas-D0VhkzY8.js → BlockPreviewCanvas-BDZ6pMHq.js} +5 -5
  55. package/dist/cdn/chunks/{BlockPreviewCanvas-D0VhkzY8.js.map → BlockPreviewCanvas-BDZ6pMHq.js.map} +1 -1
  56. package/dist/cdn/chunks/{CloudPanels-BiU1MD-4.js → CloudPanels-BI_hJwcJ.js} +3 -3
  57. package/dist/cdn/chunks/{CloudPanels-BiU1MD-4.js.map → CloudPanels-BI_hJwcJ.js.map} +1 -1
  58. package/dist/cdn/chunks/{CollaborationNotices-DGA8XRZJ.js → CollaborationNotices-yKOt4o7B.js} +2 -2
  59. package/dist/cdn/chunks/{CollaborationNotices-DGA8XRZJ.js.map → CollaborationNotices-yKOt4o7B.js.map} +1 -1
  60. package/dist/cdn/chunks/{CollaboratorBar-BWL1Shc1.js → CollaboratorBar-D5fycyLP.js} +2 -2
  61. package/dist/cdn/chunks/{CollaboratorBar-BWL1Shc1.js.map → CollaboratorBar-D5fycyLP.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsPanel-4mrl4zMK.js → CommentsPanel-BPoa1lBK.js} +2 -2
  63. package/dist/cdn/chunks/{CommentsPanel-4mrl4zMK.js.map → CommentsPanel-BPoa1lBK.js.map} +1 -1
  64. package/dist/cdn/chunks/{CommentsSidebar-BJ87vc7i.js → CommentsSidebar-DLn9qWtv.js} +2 -2
  65. package/dist/cdn/chunks/{CommentsSidebar-BJ87vc7i.js.map → CommentsSidebar-DLn9qWtv.js.map} +1 -1
  66. package/dist/cdn/chunks/{CountdownToolbar-CH8UK01N.js → CountdownToolbar-D5_QBuhO.js} +5 -5
  67. package/dist/cdn/chunks/{CountdownToolbar-CH8UK01N.js.map → CountdownToolbar-D5_QBuhO.js.map} +1 -1
  68. package/dist/cdn/chunks/{IssuesPanel-3NPqHXJx.js → IssuesPanel-BzVpxRkq.js} +4 -4
  69. package/dist/cdn/chunks/{IssuesPanel-3NPqHXJx.js.map → IssuesPanel-BzVpxRkq.js.map} +1 -1
  70. package/dist/cdn/chunks/{LanguageMenu-75uu4P2d.js → LanguageMenu-GEbUX5Oe.js} +5 -5
  71. package/dist/cdn/chunks/{LanguageMenu-75uu4P2d.js.map → LanguageMenu-GEbUX5Oe.js.map} +1 -1
  72. package/dist/cdn/chunks/{LocaleNotices-CUN5K5QJ.js → LocaleNotices-CWRS_G-4.js} +2 -2
  73. package/dist/cdn/chunks/{LocaleNotices-CUN5K5QJ.js.map → LocaleNotices-CWRS_G-4.js.map} +1 -1
  74. package/dist/cdn/chunks/{LogicTagInsertButton-C5L73hYh.js → LogicTagInsertButton-CrkAz1t_.js} +5 -5
  75. package/dist/cdn/chunks/{LogicTagInsertButton-C5L73hYh.js.map → LogicTagInsertButton-CrkAz1t_.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-BHTMNHx0.js → MediaEditModal-CfgN7Jyi.js} +2 -2
  77. package/dist/cdn/chunks/{MediaEditModal-BHTMNHx0.js.map → MediaEditModal-CfgN7Jyi.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-BlianNRh.js → MediaPanels-Cb5vsgb-.js} +2 -2
  79. package/dist/cdn/chunks/{MediaPanels-BlianNRh.js.map → MediaPanels-Cb5vsgb-.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-D8cbnnZu.js → MergeTagInput-DkCATtfE.js} +2 -2
  81. package/dist/cdn/chunks/{MergeTagInput-D8cbnnZu.js.map → MergeTagInput-DkCATtfE.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-D-RhwBsO.js → MergeTagModeToggle-DYAFxyoB.js} +3 -3
  83. package/dist/cdn/chunks/{MergeTagModeToggle-D-RhwBsO.js.map → MergeTagModeToggle-DYAFxyoB.js.map} +1 -1
  84. package/dist/cdn/chunks/{MergeTagTextarea-CAJIi2FE.js → MergeTagTextarea-DRS6pXSE.js} +4 -4
  85. package/dist/cdn/chunks/{MergeTagTextarea-CAJIi2FE.js.map → MergeTagTextarea-DRS6pXSE.js.map} +1 -1
  86. package/dist/cdn/chunks/{ParagraphEditor-sRPXZDzp.js → ParagraphEditor-rEdKBett.js} +25 -25
  87. package/dist/cdn/chunks/{ParagraphEditor-sRPXZDzp.js.map → ParagraphEditor-rEdKBett.js.map} +1 -1
  88. package/dist/cdn/chunks/{RestoreVersionDialog-CJK-14PX.js → RestoreVersionDialog-B7eTijWD.js} +3 -3
  89. package/dist/cdn/chunks/{RestoreVersionDialog-CJK-14PX.js.map → RestoreVersionDialog-B7eTijWD.js.map} +1 -1
  90. package/dist/cdn/chunks/{RichTextEditorContent-DU0wtA_j.js → RichTextEditorContent-EtUIYzHB.js} +4 -4
  91. package/dist/cdn/chunks/{RichTextEditorContent-DU0wtA_j.js.map → RichTextEditorContent-EtUIYzHB.js.map} +1 -1
  92. package/dist/cdn/chunks/{SaveBlockDialog-C8hY9xA-.js → SaveBlockDialog-BquE_Brz.js} +6 -6
  93. package/dist/cdn/chunks/{SaveBlockDialog-C8hY9xA-.js.map → SaveBlockDialog-BquE_Brz.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B3nFAgAa.js → SavedBlocksBrowserModal--fNlId5y.js} +6 -6
  95. package/dist/cdn/chunks/{SavedBlocksBrowserModal-B3nFAgAa.js.map → SavedBlocksBrowserModal--fNlId5y.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPanels-CQenugHO.js → SavedBlocksPanels-0Z0dELDm.js} +2 -2
  97. package/dist/cdn/chunks/{SavedBlocksPanels-CQenugHO.js.map → SavedBlocksPanels-0Z0dELDm.js.map} +1 -1
  98. package/dist/cdn/chunks/{SavedBlocksPickBar-DzUP4IYv.js → SavedBlocksPickBar-yezZxZeP.js} +3 -3
  99. package/dist/cdn/chunks/{SavedBlocksPickBar-DzUP4IYv.js.map → SavedBlocksPickBar-yezZxZeP.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-DnOwyN_1.js → TemplateSettings-DFetnT9P.js} +6 -6
  101. package/dist/cdn/chunks/{TemplateSettings-DnOwyN_1.js.map → TemplateSettings-DFetnT9P.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-BFqmfOZ1.js → TestEmailModal-DJpwpEZs.js} +7 -7
  103. package/dist/cdn/chunks/{TestEmailModal-BFqmfOZ1.js.map → TestEmailModal-DJpwpEZs.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-DFOhhaa9.js → TestEmailPanel-C2dxmmoW.js} +2 -2
  105. package/dist/cdn/chunks/{TestEmailPanel-DFOhhaa9.js.map → TestEmailPanel-C2dxmmoW.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-ChPXTB9T.js → TitleEditor-Bq62I2SC.js} +8 -8
  107. package/dist/cdn/chunks/{TitleEditor-ChPXTB9T.js.map → TitleEditor-Bq62I2SC.js.map} +1 -1
  108. package/dist/cdn/chunks/{Toolbar-bbO5WoKo.js → Toolbar-CwmW8wAI.js} +19 -19
  109. package/dist/cdn/chunks/{Toolbar-bbO5WoKo.js.map → Toolbar-CwmW8wAI.js.map} +1 -1
  110. package/dist/cdn/chunks/{TplModal-Bg97XHIJ.js → TplModal-DE6BniBg.js} +2 -2
  111. package/dist/cdn/chunks/{TplModal-Bg97XHIJ.js.map → TplModal-DE6BniBg.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryMenu-BNPxnWiO.js → VersionHistoryMenu-BBYU71Ua.js} +2 -2
  113. package/dist/cdn/chunks/{VersionHistoryMenu-BNPxnWiO.js.map → VersionHistoryMenu-BBYU71Ua.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryPanels-CyyRXWPU.js → VersionHistoryPanels-mMMqnf3O.js} +2 -2
  115. package/dist/cdn/chunks/{VersionHistoryPanels-CyyRXWPU.js.map → VersionHistoryPanels-mMMqnf3O.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionPreviewBanner-BldFvgxJ.js → VersionPreviewBanner-tBz-3lGg.js} +2 -2
  117. package/dist/cdn/chunks/{VersionPreviewBanner-BldFvgxJ.js.map → VersionPreviewBanner-tBz-3lGg.js.map} +1 -1
  118. package/dist/cdn/chunks/{WrapperBlock-ZBCf7Y8u.js → WrapperBlock-B9XxtFql.js} +4 -4
  119. package/dist/cdn/chunks/{WrapperBlock-ZBCf7Y8u.js.map → WrapperBlock-B9XxtFql.js.map} +1 -1
  120. package/dist/cdn/chunks/{blockTypeIcons-19xd5ZPi.js → blockTypeIcons-CGxNYHVA.js} +6 -6
  121. package/dist/cdn/chunks/{blockTypeIcons-19xd5ZPi.js.map → blockTypeIcons-CGxNYHVA.js.map} +1 -1
  122. package/dist/cdn/chunks/{composables-CMBZad02.js → composables-CkthyXi9.js} +12 -12
  123. package/dist/cdn/chunks/{composables-CMBZad02.js.map → composables-CkthyXi9.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-BHGFjpek.js → createCloudRuntime-k12jYbXP.js} +3 -3
  125. package/dist/cdn/chunks/{createCloudRuntime-BHGFjpek.js.map → createCloudRuntime-k12jYbXP.js.map} +1 -1
  126. package/dist/cdn/chunks/{editor-modal-CarOiAYJ.js → editor-modal-CXSSZplR.js} +4 -4
  127. package/dist/cdn/chunks/{editor-modal-CarOiAYJ.js.map → editor-modal-CXSSZplR.js.map} +1 -1
  128. package/dist/cdn/chunks/en-DYMYt1TN.js +1 -0
  129. package/dist/cdn/chunks/{extensions-Beg0g2wm.js → extensions-Djyg5slk.js} +5 -5
  130. package/dist/cdn/chunks/{extensions-Beg0g2wm.js.map → extensions-Djyg5slk.js.map} +1 -1
  131. package/dist/cdn/chunks/{icons-Cl4oR2mf.js → icons-C7vjUBLn.js} +47 -47
  132. package/dist/cdn/chunks/{icons-Cl4oR2mf.js.map → icons-C7vjUBLn.js.map} +1 -1
  133. package/dist/cdn/chunks/{normalizeMergeTagMarkup-B8yU4usU.js → normalizeMergeTagMarkup-nDyYIXvL.js} +2 -2
  134. package/dist/cdn/chunks/{normalizeMergeTagMarkup-B8yU4usU.js.map → normalizeMergeTagMarkup-nDyYIXvL.js.map} +1 -1
  135. package/dist/cdn/chunks/{preRenderCustomBlocks-CPHm2GOQ.js → preRenderCustomBlocks-CxwYcAQe.js} +2 -2
  136. package/dist/cdn/chunks/{preRenderCustomBlocks-CPHm2GOQ.js.map → preRenderCustomBlocks-CxwYcAQe.js.map} +1 -1
  137. package/dist/cdn/chunks/{sanitizeHtml-B7LC0gKK.js → sanitizeHtml-5T_KaDcp.js} +2 -2
  138. package/dist/cdn/chunks/{sanitizeHtml-B7LC0gKK.js.map → sanitizeHtml-5T_KaDcp.js.map} +1 -1
  139. package/dist/cdn/chunks/{socialIcons-D9D02_y5.js → socialIcons-CkgQUpim.js} +3 -3
  140. package/dist/cdn/chunks/{socialIcons-D9D02_y5.js.map → socialIcons-CkgQUpim.js.map} +1 -1
  141. package/dist/cdn/chunks/{src-BCrSqaj8.js → src-BRyzUujm.js} +2 -2
  142. package/dist/cdn/chunks/{src-BCrSqaj8.js.map → src-BRyzUujm.js.map} +1 -1
  143. package/dist/cdn/chunks/{src-DeywvttP.js → src-CVHGPKSW.js} +7 -8
  144. package/dist/cdn/chunks/src-CVHGPKSW.js.map +1 -0
  145. package/dist/cdn/chunks/{src-BO4aXl_Y.js → src-CpUX1Mhb.js} +3 -3
  146. package/dist/cdn/chunks/{src-BO4aXl_Y.js.map → src-CpUX1Mhb.js.map} +1 -1
  147. package/dist/cdn/chunks/{tiptap-BPiZqxCt.js → tiptap-B7gxx0aJ.js} +2578 -2570
  148. package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +1 -0
  149. package/dist/cdn/chunks/{useLocalizedDisplay-oykFcYrW.js → useLocalizedDisplay-7iwZ1UhB.js} +2 -2
  150. package/dist/cdn/chunks/{useLocalizedDisplay-oykFcYrW.js.map → useLocalizedDisplay-7iwZ1UhB.js.map} +1 -1
  151. package/dist/cdn/chunks/{useLogicTag-D_qg9qqO.js → useLogicTag-YXRBcfgG.js} +2 -2
  152. package/dist/cdn/chunks/{useLogicTag-D_qg9qqO.js.map → useLogicTag-YXRBcfgG.js.map} +1 -1
  153. package/dist/cdn/chunks/{useMergeTag-VLnVHtxV.js → useMergeTag-lb-Wrw-B.js} +2 -2
  154. package/dist/cdn/chunks/{useMergeTag-VLnVHtxV.js.map → useMergeTag-lb-Wrw-B.js.map} +1 -1
  155. package/dist/cdn/chunks/{withCurrentFont-m6TtR0dC.js → withCurrentFont-BaeBoPQZ.js} +2 -2
  156. package/dist/cdn/chunks/{withCurrentFont-m6TtR0dC.js.map → withCurrentFont-BaeBoPQZ.js.map} +1 -1
  157. package/dist/cdn/editor.js +25 -25
  158. package/dist/cdn/editor.js.map +1 -1
  159. package/dist/{check-C7ua4TAK.js → check-ErKdPXG6.js} +1 -1
  160. package/dist/{chevron-down-DftQrAkI.js → chevron-down-C_vv5fZE.js} +1 -1
  161. package/dist/{chevron-right-B-DULGbg.js → chevron-right-Cw4GpjFA.js} +1 -1
  162. package/dist/{chevron-up-CeYsyD8c.js → chevron-up-uijYZoph.js} +1 -1
  163. package/dist/{circle-exclamation-point-DHjORV_I.js → circle-exclamation-point-CIYHx5Tw.js} +1 -1
  164. package/dist/{clock-CajOtLEZ.js → clock-tnC1IvZk.js} +1 -1
  165. package/dist/{composables-Cq7rsxRc.js → composables-BrzGZQkd.js} +17 -17
  166. package/dist/{createCloudRuntime-CHsFF8DI.js → createCloudRuntime-DgQfMi22.js} +2 -2
  167. package/dist/{createLucideIcon-D-mELTSY.js → createLucideIcon-CssArtUe.js} +5 -5
  168. package/dist/{dist-B3G4Yvpd.js → dist-BTUMr4Pb.js} +2 -2
  169. package/dist/{dist-C0hVefGI.js → dist-BTjObRcv.js} +6 -7
  170. package/dist/{dist-B15BvV94.js → dist-BlrlMP8f.js} +2 -2
  171. package/dist/{dist-CMBOqk9I.js → dist-C-NRkFsp.js} +5 -5
  172. package/dist/{dist-BmV-2uBJ.js → dist-CkHJRChP.js} +2 -2
  173. package/dist/dist-CkIeJEsa.js +4 -0
  174. package/dist/{dist-DI_8rB1X.js → dist-Clfx1JeL.js} +2 -2
  175. package/dist/{dist-BxKFi2h_.js → dist-CsplpC_6.js} +2 -2
  176. package/dist/{dist-CXTsTO5h.js → dist-DY3WbyCO.js} +2 -2
  177. package/dist/{dist-DENg3ORe.js → dist-DwpKFWF4.js} +1206 -1198
  178. package/dist/{dist-D5BUcCjv.js → dist-HKEDfp__.js} +2 -2
  179. package/dist/{dist-DAdrn64r.js → dist-bWIkrMkM.js} +2 -2
  180. package/dist/dist-eAgG-nCb.js +4 -0
  181. package/dist/{editor-modal-CgsaLpwB.js → editor-modal-BWvxfSj8.js} +15 -15
  182. package/dist/en-DvCaYqiR.js +1 -0
  183. package/dist/{extensions-BSXjPQEc.js → extensions-Cyp2x7cD.js} +6 -6
  184. package/dist/{eye-fe5sKF_K.js → eye-DK4--qHk.js} +1 -1
  185. package/dist/{image-CUC7SZiW.js → image-B5pJOw5Q.js} +1 -1
  186. package/dist/{info-DDbLU4pT.js → info-DKM0_thN.js} +1 -1
  187. package/dist/{link-C2icj0iH.js → link-BNgTZ_Sw.js} +1 -1
  188. package/dist/{list-KYC_Jb5A.js → list-Bqynqm7o.js} +1 -1
  189. package/dist/{loader-circle-DmyagWpc.js → loader-circle-BMc3fVpa.js} +1 -1
  190. package/dist/{message-circle-ijyWn6UJ.js → message-circle-D_TpvAJh.js} +1 -1
  191. package/dist/{normalizeMergeTagMarkup-CBLCQe02.js → normalizeMergeTagMarkup-fgoVMKAc.js} +1 -1
  192. package/dist/{package-CKYm_jQY.js → package-D2fov5PU.js} +1 -1
  193. package/dist/{pencil-C2TRSR-Y.js → pencil-BNdkJyfY.js} +1 -1
  194. package/dist/{plus-CotJVDxb.js → plus-CWmBmMx-.js} +1 -1
  195. package/dist/{preRenderCustomBlocks-e2OlY4aU.js → preRenderCustomBlocks-CgPtlLGL.js} +1 -1
  196. package/dist/{refresh-cw-CuCRV6D5.js → refresh-cw-Ryg1j66N.js} +1 -1
  197. package/dist/{rotate-ccw-BlnQ3y6R.js → rotate-ccw-D8j7gXXv.js} +1 -1
  198. package/dist/{sanitizeHtml-Dfn-fH17.js → sanitizeHtml-D2wueiEe.js} +2 -2
  199. package/dist/{search-Dxw6oFrZ.js → search-CX2JkSHz.js} +1 -1
  200. package/dist/{send-C-blQBZ9.js → send-BLR1b-p5.js} +1 -1
  201. package/dist/{smartphone-rLz4X-Dd.js → smartphone-Co8m0LLg.js} +1 -1
  202. package/dist/{socialIcons-BZRLo0eT.js → socialIcons-ZfH8PyV2.js} +4 -4
  203. package/dist/{sparkles-JWQlUiSn.js → sparkles-Dc3Undp5.js} +1 -1
  204. package/dist/{square-DshDy1Il.js → square-CPw_cyX8.js} +1 -1
  205. package/dist/templatical-editor.js +34 -34
  206. package/dist/{text-align-start-CyasaQtr.js → text-align-start-2VZGhCiK.js} +13 -13
  207. package/dist/{trash-B1lZp2Tv.js → trash-t6XXliVc.js} +1 -1
  208. package/dist/{triangle-exclamation-point-BhJvBEoT.js → triangle-exclamation-point-_YYWE2ZH.js} +1 -1
  209. package/dist/{upload-CNK8JX38.js → upload-BWYXWYHb.js} +1 -1
  210. package/dist/{useLocalizedDisplay-B7tlQF4g.js → useLocalizedDisplay-9RqT2y_Y.js} +1 -1
  211. package/dist/{useLogicTag-k_y-4o4W.js → useLogicTag-BTCtn-uG.js} +1 -1
  212. package/dist/{useMergeTag-BiZ6XOdL.js → useMergeTag-QlXUjCWT.js} +1 -1
  213. package/dist/{useScrollToBlock-vf_KD0FM.js → useScrollToBlock-DruzlN2h.js} +1 -1
  214. package/dist/{withCurrentFont-CPhRujet.js → withCurrentFont-BXZ7g-K6.js} +1 -1
  215. package/dist/{x-DbLX5Qdm.js → x-CTKOxIyZ.js} +1 -1
  216. package/package.json +22 -22
  217. package/dist/cdn/chunks/en-B4s_0ryk.js +0 -1
  218. package/dist/cdn/chunks/src-DeywvttP.js.map +0 -1
  219. package/dist/cdn/chunks/tiptap-BPiZqxCt.js.map +0 -1
  220. package/dist/dist-D9cbSSSx.js +0 -4
  221. package/dist/dist-ELLEk-lS.js +0 -4
  222. package/dist/en-DBLcB-CW.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"BlockIssueBadge-DIlFDDwh.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createBlock","_unref","CircleAlert","TriangleAlert","_createCommentVNode","_sfc_main","defineComponent","openBlock","inject","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","computed","CircleExclamationPoint","TriangleExclamationPoint","useI18n","TEMPLATE_LINT_KEY","EDITOR_KEY","_hoisted_1","BlockIssueBadge_default","props","__props","lint","editor","blockIssues","i","severity","tooltip","t"],"sources":["../../../src/components/canvas/BlockIssueBadge.vue","../../../src/components/canvas/BlockIssueBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;;;EAMA,IAAMyB,IAAQC,GACR,EAAE,SAAMN,EAAQ,GAChBO,IAAOhB,EAAOU,GAAmB,IAAI,GACrCO,IAASjB,EAAOW,GAAY,IAAI,GAEhCO,IAAcZ,SACjBU,GAAM,OAAO,SAAS,CAAC,EAAA,CAAG,QACxB,MACCG,EAAE,YAAYL,EAAM,WACpB,EAAEG,GAAQ,cAAc,SAASE,EAAE,OAAO,WAAW,eAAe,EACxE,CACF,GAEMC,IAAWd,QACXY,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,OAAO,IAAU,UAC9DD,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,SAAS,IAAU,YAC7D,IACR,GAEKE,IAAUf,QACdc,EAAS,UAAU,UAAUE,EAAE,OAAO,aAAaA,EAAE,OAAO,YAC9D;E,iBAKUF,EAAA,SADR/B,EAAA,GAAAC,EA0BO,QAAA;;GAxBL,OAAKC,EAAA,CAAC,sNACS6B,EAAA,UAAQ,U;GAKtB,OAAOC,EAAA;GACP,cAAYA,EAAA;GACb,MAAK;E,IAGGD,EAAA,UAAQ,WADhB/B,EAAA,GAAAG,EAMEC,EAAAC,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;E,OAETL,EAAA,GAAAG,EAMEC,EAAAE,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}
1
+ {"version":3,"file":"BlockIssueBadge-BWIth1y6.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createBlock","_unref","CircleAlert","TriangleAlert","_createCommentVNode","_sfc_main","defineComponent","openBlock","inject","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","computed","CircleExclamationPoint","TriangleExclamationPoint","useI18n","TEMPLATE_LINT_KEY","EDITOR_KEY","_hoisted_1","BlockIssueBadge_default","props","__props","lint","editor","blockIssues","i","severity","tooltip","t"],"sources":["../../../src/components/canvas/BlockIssueBadge.vue","../../../src/components/canvas/BlockIssueBadge.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n","<script setup lang=\"ts\">\nimport { computed, inject } from \"vue\";\nimport { CircleAlert, TriangleAlert } from \"@lucide/vue\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { EDITOR_KEY, TEMPLATE_LINT_KEY } from \"../../keys\";\n\nconst props = defineProps<{ blockId: string }>();\nconst { t } = useI18n();\nconst lint = inject(TEMPLATE_LINT_KEY, null);\nconst editor = inject(EDITOR_KEY, null);\n\nconst blockIssues = computed(() =>\n (lint?.issues.value ?? []).filter(\n (i) =>\n i.blockId === props.blockId &&\n !(editor?.activeLocale?.value && i.ruleId.startsWith(\"localization.\")),\n ),\n);\n\nconst severity = computed<\"error\" | \"warning\" | null>(() => {\n if (blockIssues.value.some((i) => i.severity === \"error\")) return \"error\";\n if (blockIssues.value.some((i) => i.severity === \"warning\")) return \"warning\";\n return null;\n});\n\nconst tooltip = computed(() =>\n severity.value === \"error\" ? t.issues.badgeError : t.issues.badgeWarning,\n);\n</script>\n\n<template>\n <span\n v-if=\"severity\"\n class=\"tpl-block-issue-badge tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-bg)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:hover:shadow-[var(--tpl-shadow-sm)]\"\n :class=\"\n severity === 'error'\n ? 'tpl:text-[var(--tpl-danger)]'\n : 'tpl:text-[var(--tpl-warning)]'\n \"\n :title=\"tooltip\"\n :aria-label=\"tooltip\"\n role=\"img\"\n >\n <CircleAlert\n v-if=\"severity === 'error'\"\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n <TriangleAlert\n v-else\n :size=\"14\"\n :stroke-width=\"2.25\"\n fill=\"currentColor\"\n stroke=\"var(--tpl-bg)\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;;;EAMA,IAAMyB,IAAQC,GACR,EAAE,SAAMN,EAAQ,GAChBO,IAAOhB,EAAOU,GAAmB,IAAI,GACrCO,IAASjB,EAAOW,GAAY,IAAI,GAEhCO,IAAcZ,SACjBU,GAAM,OAAO,SAAS,CAAC,EAAA,CAAG,QACxB,MACCG,EAAE,YAAYL,EAAM,WACpB,EAAEG,GAAQ,cAAc,SAASE,EAAE,OAAO,WAAW,eAAe,EACxE,CACF,GAEMC,IAAWd,QACXY,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,OAAO,IAAU,UAC9DD,EAAY,MAAM,MAAM,MAAMC,EAAE,aAAa,SAAS,IAAU,YAC7D,IACR,GAEKE,IAAUf,QACdc,EAAS,UAAU,UAAUE,EAAE,OAAO,aAAaA,EAAE,OAAO,YAC9D;E,iBAKUF,EAAA,SADR/B,EAAA,GAAAC,EA0BO,QAAA;;GAxBL,OAAKC,EAAA,CAAC,sNACS6B,EAAA,UAAQ,U;GAKtB,OAAOC,EAAA;GACP,cAAYA,EAAA;GACb,MAAK;E,IAGGD,EAAA,UAAQ,WADhB/B,EAAA,GAAAG,EAMEC,EAAAC,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO;E,OAETL,EAAA,GAAAG,EAMEC,EAAAE,CAAA,GAAA;;GAJC,MAAM;GACN,gBAAc;GACf,MAAK;GACL,QAAO"}
@@ -1,10 +1,10 @@
1
1
  import { n as e } from "./rolldown-runtime-QGRDbDUS.js";
2
2
  import { B as t, C as n, F as r, I as i, L as a, O as o, _ as s, ct as c, h as l, m as u, p as d, pt as f, u as p, z as m } from "./draggable-IRVFEZ-b.js";
3
- import { E as h, O as g, T as _, _ as v, a as y, b, g as x, h as S, i as C, m as w, o as T, p as E, r as D, u as O, v as k, w as A, x as j } from "./composables-CMBZad02.js";
3
+ import { E as h, O as g, T as _, _ as v, a as y, b, g as x, h as S, i as C, m as w, o as T, p as E, r as D, u as O, v as k, w as A, x as j } from "./composables-CkthyXi9.js";
4
4
  import { B as M, C as N, R as P, Y as F, b as I, ct as L, l as R, m as ee, st as te, v as ne } from "./keys-BQqbBUag.js";
5
- import { t as re } from "./WrapperBlock-ZBCf7Y8u.js";
6
- import { c as z, l as B, o as V } from "./socialIcons-D9D02_y5.js";
7
- import { H, dt as U } from "./src-DeywvttP.js";
5
+ import { t as re } from "./WrapperBlock-B9XxtFql.js";
6
+ import { c as z, l as B, o as V } from "./socialIcons-CkgQUpim.js";
7
+ import { H, dt as U } from "./src-CVHGPKSW.js";
8
8
  // src/components/blocks/PreviewSectionBlock.vue?vue&type=script&setup=true&lang.ts
9
9
  var W = { class: "tpl:w-full" }, G = { class: "tpl:flex tpl:gap-0" }, K = /* @__PURE__ */ n({
10
10
  name: "PreviewSectionBlock",
@@ -153,4 +153,4 @@ var W = { class: "tpl:w-full" }, G = { class: "tpl:flex tpl:gap-0" }, K = /* @__
153
153
  }), Y = /* @__PURE__ */ e({ default: () => X }), X = J;
154
154
  export { Y as n, X as t };
155
155
 
156
- //# sourceMappingURL=BlockPreviewCanvas-D0VhkzY8.js.map
156
+ //# sourceMappingURL=BlockPreviewCanvas-BDZ6pMHq.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BlockPreviewCanvas-D0VhkzY8.js","names":["_hoisted_1","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","_resolveComponent","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_normalizeStyle","_unref","_createBlock","_resolveDynamicComponent","_sfc_main","PreviewSectionBlock","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","WrapperBlock","_openBlock","_createElementBlock","_normalizeStyle","_createElementVNode","_unref","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_sfc_main","__exportAll","resolveDynamicComponent","defineComponent","openBlock","provide","renderList","inject","createElementBlock","unref","createBlock","createBaseVNode","computed","normalizeStyle","Fragment","resolveComponent","getDocumentStyle","resolveBlockComponent","getCachedBlockWrapperStyle","DividerBlock_default","SpacerBlock_default","HtmlBlock_default","ImageBlock_default","TableBlock_default","MenuBlock_default","SocialIconsBlock_default","ParagraphBlock_default","VideoBlock_default","TitleBlock_default","CustomBlock_default","getBlockWrapperStyle","EMAIL_FRAME_WIDTH_VAR","MERGE_TAG_SYNTAX_KEY","IMAGE_URL_RESOLVER_KEY","MERGE_TAG_SAMPLE_MODE_KEY","READ_ONLY_SURFACE_KEY","FONTS_MANAGER_KEY","requireInject","BLOCK_REGISTRY_KEY","CONDITION_PREVIEW_KEY","USE_MERGE_TAG_SAMPLES_KEY","EDITOR_KEY","WrapperBlock_default","EMAIL_FRAME_WIDTH_TRANSITION","getEmailFrameWidth","matchImageBoxWidth","resolveContentDirection","_hoisted_1$1","_hoisted_2","PreviewSectionBlock_default","previewBlockComponentMap","ButtonBlock_default","props","__props","blockRegistry","columnWidths","columns","count","children","getColumnBlocks","colIndex","getBlockComponent","block","_component_PreviewSectionBlock","childBlock","_hoisted_1","BlockPreviewCanvas_vue_vue_type_script_setup_true_lang_default","editor","conditionPreview","fontsManager","imageUrlResolver","mergeTagSyntax","SYNTAX_PRESETS","mergeTagSampleMode","visibleBlocks","previewSettings","frameWidth","documentStyle","contentLang","contentDir","emailBackground","stageWidth","previewComponentMap","previewBlockStyle","settings","BlockPreviewCanvas_exports","BlockPreviewCanvas_default"],"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 \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\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 \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\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 WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} 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 * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true, settings: undefined },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\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 READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\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\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\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(previewSettings.value, 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 previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\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 wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\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 WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} 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 * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true, settings: undefined },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\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 READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\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\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\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(previewSettings.value, 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 previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\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 wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAwBA,IAAMiG,IAAsD;GAC1D,OAAOhG;GACP,WAAWC;GACX,OAAOC;GACP,OAAOC;GACP,QAAQC;GACR,SAASC;GACT,QAAQC;GACR,MAAMC;GACN,OAAOC;GACP,QAAQC;GACR,MAAMC;GACN,QAAQC;EACV,GAEMuF,IAAQC,GAORC,IAAgB/C,EAAO+B,GAAoB,IAAI,GAE/CiB,IAAe3C,QAAe;GAClC,QAAQwC,EAAM,MAAM,SAApB;IACE,KAAK,KACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,KACH,OAAO;KAAC;KAAU;KAAU;IAAQ;IACtC,KAAK,KACH,OAAO;KAAC;KAAO;KAAO;KAAO;IAAK;IACpC,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,UAAU,QAAQ;IAC5B,KAAK,OACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,OACH,OAAO,CAAC,OAAO,KAAK;IACtB,KAAK,SACH,OAAO;KAAC;KAAO;KAAO;IAAK;IAC7B,SACE,OAAO,CAAC,MAAM;GAClB;EACF,CAAC,GAEKI,IAAU5C,QAAe;GAC7B,IAAM6C,IAAQF,EAAa,MAAM,QAC3BG,IAAW,CAAC,GAAGN,EAAM,MAAM,QAAQ;GACzC,OAAOM,EAAS,SAASD,IACvB,EAAS,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AA,GAAAL,EAAA,MAAU;;IAAqD,iBAAAI,GAAA;;;E,IAW5HtF,EAsBM,OAAA;GArBJ,eAAY;GACX,MAAMoF,GAAA;GACN,KAAKC,GAAA;GACL,OAAKtF,EAAA;IAAsB,OAAA,GAAAmF,EAAA,MAAU;KAAejF,EAAAoC,CAAA,IAAqB,GAAM6C,EAAA,MAAU;IAA0B,YAAAjF,EAAAgD,CAAA;IAAyC,GAAAkC,GAAA;;E,KAO7JtF,EAAA,EAAA,GAAAC,EAUMI,GAAA,MAAAC,EATY6E,GAAA,QAAT,OADTnF,EAAA,GAAAC,EAUM,OAAA;GARH,KAAKsE,EAAM;GACX,OAAKrE,EAAE0F,GAAkBrB,CAAK,CAAA;E,KAE/BvE,EAAA,GAAAO,EAIEC,EAHK8D,GAAkBC,CAAK,CAAA,GAAA;GACpB;GACP,UAAUT,EAAA"}
1
+ {"version":3,"file":"BlockPreviewCanvas-BDZ6pMHq.js","names":["_hoisted_1","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","_resolveComponent","_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_normalizeStyle","_unref","_createBlock","_resolveDynamicComponent","_sfc_main","PreviewSectionBlock","TitleBlock","ParagraphBlock","ImageBlock","VideoBlock","ButtonBlock","DividerBlock","SocialIconsBlock","MenuBlock","TableBlock","SpacerBlock","HtmlBlock","CustomBlock","WrapperBlock","_openBlock","_createElementBlock","_normalizeStyle","_createElementVNode","_unref","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_sfc_main","__exportAll","resolveDynamicComponent","defineComponent","openBlock","provide","renderList","inject","createElementBlock","unref","createBlock","createBaseVNode","computed","normalizeStyle","Fragment","resolveComponent","getDocumentStyle","resolveBlockComponent","getCachedBlockWrapperStyle","DividerBlock_default","SpacerBlock_default","HtmlBlock_default","ImageBlock_default","TableBlock_default","MenuBlock_default","SocialIconsBlock_default","ParagraphBlock_default","VideoBlock_default","TitleBlock_default","CustomBlock_default","getBlockWrapperStyle","EMAIL_FRAME_WIDTH_VAR","MERGE_TAG_SYNTAX_KEY","IMAGE_URL_RESOLVER_KEY","MERGE_TAG_SAMPLE_MODE_KEY","READ_ONLY_SURFACE_KEY","FONTS_MANAGER_KEY","requireInject","BLOCK_REGISTRY_KEY","CONDITION_PREVIEW_KEY","USE_MERGE_TAG_SAMPLES_KEY","EDITOR_KEY","WrapperBlock_default","EMAIL_FRAME_WIDTH_TRANSITION","getEmailFrameWidth","matchImageBoxWidth","resolveContentDirection","_hoisted_1$1","_hoisted_2","PreviewSectionBlock_default","previewBlockComponentMap","ButtonBlock_default","props","__props","blockRegistry","columnWidths","columns","count","children","getColumnBlocks","colIndex","getBlockComponent","block","_component_PreviewSectionBlock","childBlock","_hoisted_1","BlockPreviewCanvas_vue_vue_type_script_setup_true_lang_default","editor","conditionPreview","fontsManager","imageUrlResolver","mergeTagSyntax","SYNTAX_PRESETS","mergeTagSampleMode","visibleBlocks","previewSettings","frameWidth","documentStyle","contentLang","contentDir","emailBackground","stageWidth","previewComponentMap","previewBlockStyle","settings","BlockPreviewCanvas_exports","BlockPreviewCanvas_default"],"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 \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\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 \"4\":\n return [\"25%\", \"25%\", \"25%\", \"25%\"];\n case \"1-2\":\n return [\"33.33%\", \"66.67%\"];\n case \"2-1\":\n return [\"66.67%\", \"33.33%\"];\n case \"1-3\":\n return [\"25%\", \"75%\"];\n case \"3-1\":\n return [\"75%\", \"25%\"];\n case \"1-2-1\":\n return [\"25%\", \"50%\", \"25%\"];\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 WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} 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 * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true, settings: undefined },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\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 READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\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\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\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(previewSettings.value, 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 previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\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 wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlockComponent(block)\"\n :block=\"block\"\n :viewport=\"viewport\"\n />\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 WrapperBlock from \"./blocks/WrapperBlock.vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n CONDITION_PREVIEW_KEY,\n EDITOR_KEY,\n FONTS_MANAGER_KEY,\n IMAGE_URL_RESOLVER_KEY,\n MERGE_TAG_SAMPLE_MODE_KEY,\n MERGE_TAG_SYNTAX_KEY,\n READ_ONLY_SURFACE_KEY,\n USE_MERGE_TAG_SAMPLES_KEY,\n requireInject,\n} from \"../keys\";\nimport {\n EMAIL_FRAME_WIDTH_VAR,\n resolveBlockComponent,\n getCachedBlockWrapperStyle,\n getDocumentStyle,\n} from \"../utils/blockComponentResolver\";\nimport {\n EMAIL_FRAME_WIDTH_TRANSITION,\n EMAIL_GUTTER,\n getEmailFrameWidth,\n} from \"../utils/emailFrameWidth\";\nimport { matchImageBoxWidth } from \"../utils/imageRoom\";\nimport {\n SYNTAX_PRESETS,\n resolveContentDirection,\n type Block,\n type TemplateSettings,\n type ViewportSize,\n} 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 * Document settings for this surface. Test-email passes the composed\n * document so the mat is layout `backgroundColor` (`mj-body`). Saved-block\n * previews omit it and read the live editor template.\n */\n settings?: TemplateSettings;\n }>(),\n { viewport: \"desktop\", applyConditionFilter: true, settings: undefined },\n);\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY);\nconst editor = inject(EDITOR_KEY, null);\nconst conditionPreview = inject(CONDITION_PREVIEW_KEY, null);\nconst fontsManager = requireInject(FONTS_MANAGER_KEY, \"BlockPreviewCanvas\");\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst mergeTagSyntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\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 READ_ONLY_SURFACE_KEY,\n computed(() => true),\n);\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\nconst previewSettings = computed(\n () => props.settings ?? editor?.content.value.settings,\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(previewSettings.value, 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 previewSettings.value\n ? getDocumentStyle(previewSettings.value, fontsManager.resolveFontFamily)\n : {},\n);\n\n/**\n * The email's own language, for the browser's spellchecker and hyphenation —\n * the same binding the editing canvas carries, so a preview is checked by the\n * same rules as the block it mirrors.\n *\n * From `settings.locale`, never `config.locale`: the chrome's language says\n * nothing about the content's. Read from the *current* template for the same\n * reason `documentStyle` is — a saved block stores only `Block[]`. Undefined\n * rather than `\"\"`, which would declare \"unknown language\" and suppress\n * spellcheck instead of falling back.\n */\nconst contentLang = computed(\n () => previewSettings.value?.locale?.trim() || undefined,\n);\nconst contentDir = computed(() =>\n resolveContentDirection(previewSettings.value ?? { locale: \"en\" }),\n);\n\n/**\n * The email's body background — `mj-body background-color` when sent, and the\n * `.tpl-canvas-bg` layer on the editing canvas.\n *\n * Deliberately NOT part of `getDocumentStyle`: the canvas applies that helper\n * to `.tpl-canvas`, which must stay transparent so the invertible background\n * layer beneath it shows through. A background there would double-paint and\n * defeat the dark-mode preview.\n *\n * Truthiness, not `??`: the colour pickers clear to an empty string to mean\n * \"unset\", which as an inline style renders the frame transparent rather than\n * falling back to the neutral preview surface.\n */\nconst emailBackground = computed(\n () => previewSettings.value?.backgroundColor || \"var(--tpl-canvas-bg)\",\n);\n\n/**\n * Width the stage asks for: the content column plus a full gutter on each side,\n * the same stage the canvas builds. It is an ask rather than a fixed size —\n * paired with `max-width: 100%` below, so a container with less room hands over\n * what it has and shows a narrower band instead of overflowing.\n *\n * It has to be a specified width, not `100%`: `TplModal`'s wrapper is\n * shrink-to-fit, so a percentage there resolves against a container whose size\n * the stage is itself supposed to influence, and the stage collapses to its\n * `min-width` — no gutters, on the one surface this exists for.\n */\nconst stageWidth = computed(() => frameWidth.value + EMAIL_GUTTER * 2);\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 wrapper: WrapperBlock,\n};\n\nfunction getBlockComponent(block: Block): Component | null {\n return resolveBlockComponent(block, blockRegistry, previewComponentMap);\n}\n\n// This loop reads the resolver cache and never starts a lookup itself, so a\n// section's background image paints whatever the canvas has already resolved;\n// nested components (e.g. `ImageBlock`, a layout `WrapperBlock`) may resolve\n// their own images.\nfunction previewBlockStyle(block: Block): Record<string, string> {\n const settings = previewSettings.value;\n return getCachedBlockWrapperStyle(\n block,\n imageUrlResolver,\n mergeTagSyntax,\n matchImageBoxWidth(\n block,\n settings ? { blocks: props.blocks, settings } : undefined,\n ),\n );\n}\n</script>\n\n<template>\n <!-- STAGE — the email body, holding the background and a gutter of it on\n each side of the content column, the same shape `Canvas.vue` builds.\n `max-width: 100%` is what makes it fit anywhere: a roomy surface shows\n the full band, a dialog shows as much as it has, and a container sized to\n the content column shows none. `min-width` keeps it from squeezing the\n column, so a cramped surface clips exactly as it did when the frame\n carried the width itself. -->\n <div\n data-testid=\"block-preview-stage\"\n class=\"tpl-canvas-pane tpl:pointer-events-none tpl:mx-auto tpl:flex tpl:select-none tpl:justify-center tpl:rounded-lg\"\n :style=\"{\n width: `${stageWidth}px`,\n minWidth: `${frameWidth}px`,\n maxWidth: '100%',\n backgroundColor: emailBackground,\n boxShadow: 'var(--tpl-shadow-sm)',\n }\"\n >\n <!-- CONTENT COLUMN — the blocks at their true email width. Keeps the\n testid: this is the element whose width *is* the email width, which is\n what every viewport assertion measures. -->\n <div\n data-testid=\"block-preview-canvas\"\n :lang=\"contentLang\"\n :dir=\"contentDir\"\n :style=\"{\n width: `${frameWidth}px`,\n [EMAIL_FRAME_WIDTH_VAR]: `${frameWidth}px`,\n transition: EMAIL_FRAME_WIDTH_TRANSITION,\n ...documentStyle,\n }\"\n >\n <div\n v-for=\"block in visibleBlocks\"\n :key=\"block.id\"\n :style=\"previewBlockStyle(block)\"\n >\n <component\n :is=\"getBlock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C,EAUMI,GAAA,MAAAC,EATY6E,GAAA,QAAT,OADTnF,EAAA,GAAAC,EAUM,OAAA;GARH,KAAKsE,EAAM;GACX,OAAKrE,EAAE0F,GAAkBrB,CAAK,CAAA;E,KAE/BvE,EAAA,GAAAO,EAIEC,EAHK8D,GAAkBC,CAAK,CAAA,GAAA;GACpB;GACP,UAAUT,EAAA"}
@@ -1,8 +1,8 @@
1
1
  import { C as e, F as t, G as n, L as r, _ as i, ct as a, dt as o, g as s, h as c, m as l, mt as u, n as d, u as f, x as p, y as m } from "./draggable-IRVFEZ-b.js";
2
- import { Ft as h, d as g } from "./icons-Cl4oR2mf.js";
2
+ import { Ft as h, d as g } from "./icons-C7vjUBLn.js";
3
3
  import { C as _, b as v, f as y } from "./styleConstants-CgiNKdnc.js";
4
4
  import { t as b } from "./useCloudI18n-Dr4S2TRW.js";
5
- import { t as x } from "./TplModal-Bg97XHIJ.js";
5
+ import { t as x } from "./TplModal-DE6BniBg.js";
6
6
  // src/cloud/components/CloudErrorOverlay.vue?vue&type=script&setup=true&lang.ts
7
7
  var S = {
8
8
  key: 0,
@@ -164,4 +164,4 @@ var S = {
164
164
  });
165
165
  export { V as default };
166
166
 
167
- //# sourceMappingURL=CloudPanels-BiU1MD-4.js.map
167
+ //# sourceMappingURL=CloudPanels-BI_hJwcJ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CloudPanels-BiU1MD-4.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","CircleAlert","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_unref","_createStaticVNode","_createElementVNode","_Fragment","_renderList","_createCommentVNode","_sfc_main","_openBlock","_createBlock","TplModal","_withCtx","_createElementVNode","_createVNode","_unref","AlertTriangle","_toDisplayString","_createElementBlock","_Fragment","_renderList","_normalizeClass","_sfc_main","_openBlock","_createElementBlock","_Fragment","_createVNode","_Transition","_withCtx","CloudLoadingOverlay","CloudErrorOverlay","CloudSaveGateModal","_sfc_main","defineComponent","openBlock","withCtx","renderList","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","createBaseVNode","toDisplayString","Transition","Fragment","createVNode","createStaticVNode","CircleExclamationPoint","TriangleExclamationPoint","secondaryBtnClass","primaryBtnClass","dangerBtnClass","useCloudI18nStrict","TplModal_default","_hoisted_1$2","_hoisted_2$2","_hoisted_3$2","_hoisted_4$1","_hoisted_5$1","CloudErrorOverlay_default","__emit","emit","cloudT","getErrorMessage","error","isNotFoundError","__props","_cache","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","CloudLoadingOverlay_default","n","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","CloudSaveGateModal_default","issue","CloudPanels_default"],"sources":["../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudPanels.vue","../../../src/cloud/components/CloudPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAUA,IAAMgF,IAAOD,GAIP,EAAE,GAAGE,MAAWV,EAAmB;EAEzC,SAASW,EAAgB,GAAsB;GAU7C,OARE,oBAAoBC,KACnBA,EAAsC,iBAEhCF,EAAO,MAAM,aAElB,gBAAgBE,KAAUA,EAAkC,aACvDF,EAAO,MAAM,mBAEfA,EAAO,MAAM;EACtB;EAEA,SAASG,EAAgB,GAAuB;GAC9C,OACE,gBAAgBD,KAAS,CAAC,CAAEA,EAAkC;EAElE;E,iBAKUE,EAAA,WAAWA,EAAA,SADnBhF,EAAA,GAAAC,EAgCM,OAhCNN,GAgCM;GA3BJO,EAQM,OARNN,GAQM,CALJO,EAIEC,EAAAC,CAAA,GAAA;IAHC,MAAM;IACN,gBAAc;IACf,OAAM;;GAGVH,EASM,OATNL,GASM,CANJK,EAEK,MAFLJ,GAEKQ,EADAF,EAAAwE,CAAA,CAAM,CAAC,MAAM,KAAK,GAAA,CAAA,GAEvB1E,EAEI,KAFJH,GAEIO,EADCuE,EAAgBG,EAAA,KAAK,CAAA,GAAA,CAAA,C;GAInBD,EAAgBC,EAAA,KAAK,I,aAD9BhF,EAAA,GAAAC,EAOS,UAAA;;IALP,MAAK;IACJ,OAAKM,EAAEH,EAAA4D,CAAA,CAAe;IACtB,SAAK,AAAAiB,EAAA,QAAA,MAAEN,EAAI,OAAA;GAET,GAAArE,EAAAF,EAAAwE,CAAA,CAAM,CAAC,MAAM,KAAK,GAAA,CAAA;;;;;;;EE5D3B,IAAM,EAAE,GAAGA,MAAWV,EAAmB;E,iBAK/Bc,EAAA,WADRnE,EAAA,GAAAC,EAmFM,OAAA;;GAjFJ,MAAK;G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AAA,QAAA,MAAEN,EAAI,QAAA;IAET,GAAA7C,EAAAF,EAAAgD,CAAA,CAAM,CAAC,SAAS,MAAM,GAAA,CAAA,GAE3BlD,EAOS,UAAA;KANP,MAAK;KACL,eAAY;KACX,OAAKQ,EAAEN,EAAAqC,CAAA,CAAc;KACrB,SAAK,AAAAgB,EAAA,QAAA,MAAEN,EAAI,SAAA;IAET,GAAA7C,EAAAF,EAAAgD,CAAA,CAAM,CAAC,SAAS,OAAO,GAAA,CAAA,C;;;;;;;;;;;;;;;;GE/ClCrC,EASaC,GAAA;IARX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAAC,QAAyD,CAAzDF,EAAyDG,GAAA,EAAnC,SAASsC,EAAA,OAAO,MAAM,U;;;GAM9CzC,EAaaC,GAAA;IAZX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAAC,QAIE,CAJFF,EAIEI,GAAA;KAHC,OAAOqC,EAAA,MAAM,aAAa;KAC1B,SAAO,CAAA,CAAIA,EAAA,MAAM,aAAa;KAC9B,SAAOA,EAAA,MAAM;;;;;;;;GAIlBzC,EAKEK,GAAA;IAJC,MAAMoC,EAAA,MAAM,SAAS,UAAU;IAC/B,QAAQA,EAAA,MAAM,SAAS,eAAe;IACtC,UAAQA,EAAA,MAAM,SAAS;IACvB,WAASA,EAAA,MAAM,SAAS"}
1
+ {"version":3,"file":"CloudPanels-BI_hJwcJ.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","CircleAlert","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createElementBlock","_unref","_createStaticVNode","_createElementVNode","_Fragment","_renderList","_createCommentVNode","_sfc_main","_openBlock","_createBlock","TplModal","_withCtx","_createElementVNode","_createVNode","_unref","AlertTriangle","_toDisplayString","_createElementBlock","_Fragment","_renderList","_normalizeClass","_sfc_main","_openBlock","_createElementBlock","_Fragment","_createVNode","_Transition","_withCtx","CloudLoadingOverlay","CloudErrorOverlay","CloudSaveGateModal","_sfc_main","defineComponent","openBlock","withCtx","renderList","createElementBlock","unref","normalizeClass","createCommentVNode","createBlock","createBaseVNode","toDisplayString","Transition","Fragment","createVNode","createStaticVNode","CircleExclamationPoint","TriangleExclamationPoint","secondaryBtnClass","primaryBtnClass","dangerBtnClass","useCloudI18nStrict","TplModal_default","_hoisted_1$2","_hoisted_2$2","_hoisted_3$2","_hoisted_4$1","_hoisted_5$1","CloudErrorOverlay_default","__emit","emit","cloudT","getErrorMessage","error","isNotFoundError","__props","_cache","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","CloudLoadingOverlay_default","n","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","CloudSaveGateModal_default","issue","CloudPanels_default"],"sources":["../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudErrorOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudLoadingOverlay.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudSaveGateModal.vue","../../../src/cloud/components/CloudPanels.vue","../../../src/cloud/components/CloudPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { CircleAlert } from \"@lucide/vue\";\nimport { primaryBtnClass } from \"../../constants/styleConstants\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n error: Error | null;\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"retry\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n\nfunction getErrorMessage(error: Error): string {\n if (\n \"isUnauthorized\" in error &&\n (error as { isUnauthorized: boolean }).isUnauthorized\n ) {\n return cloudT.error.authFailed;\n }\n if (\"isNotFound\" in error && (error as { isNotFound: boolean }).isNotFound) {\n return cloudT.error.templateNotFound;\n }\n return cloudT.error.defaultMessage;\n}\n\nfunction isNotFoundError(error: Error): boolean {\n return (\n \"isNotFound\" in error && !!(error as { isNotFound: boolean }).isNotFound\n );\n}\n</script>\n\n<template>\n <div\n v-if=\"visible && error\"\n role=\"alert\"\n class=\"tpl-error tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]\"\n >\n <div\n class=\"tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]\"\n >\n <CircleAlert\n :size=\"32\"\n :stroke-width=\"1.5\"\n class=\"tpl:text-[var(--tpl-danger)]\"\n />\n </div>\n <div\n class=\"tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center\"\n >\n <h2 class=\"tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]\">\n {{ cloudT.error.title }}\n </h2>\n <p class=\"tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]\">\n {{ getErrorMessage(error) }}\n </p>\n </div>\n <button\n v-if=\"!isNotFoundError(error)\"\n type=\"button\"\n :class=\"primaryBtnClass\"\n @click=\"emit('retry')\"\n >\n {{ cloudT.error.retry }}\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\n\ndefineProps<{\n visible: boolean;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n role=\"status\"\n aria-live=\"polite\"\n aria-busy=\"true\"\n :aria-label=\"cloudT.loading.initializing\"\n class=\"tpl-loading tpl:absolute tpl:inset-0 tpl:z-[100] tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]\"\n >\n <!-- Skeleton header -->\n <div\n class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl:flex tpl:gap-3\">\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n </div>\n <!-- Skeleton body -->\n <div class=\"tpl:flex tpl:flex-1 tpl:overflow-hidden\">\n <!-- Left sidebar rail -->\n <div\n class=\"tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]\"\n >\n <div\n v-for=\"n in 5\"\n :key=\"n\"\n class=\"tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <!-- Canvas area -->\n <div\n class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"\n >\n <div\n class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"\n >\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div>\n <div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div>\n </div>\n <div class=\"tpl:flex tpl:justify-center tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n </div>\n <div class=\"tpl:space-y-2 tpl:py-4\">\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"\n ></div>\n <div\n class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"\n ></div>\n </div>\n </div>\n </div>\n <!-- Right panel -->\n <div\n class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"\n >\n <div\n class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"\n ></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n <div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div>\n </div>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport { AlertTriangle } from \"@lucide/vue\";\nimport {\n dangerBtnClass,\n secondaryBtnClass,\n} from \"../../constants/styleConstants\";\nimport TplModal from \"../../components/TplModal.vue\";\nimport { useCloudI18nStrict } from \"../../composables/useCloudI18n\";\nimport type { LintIssue } from \"../../composables/useTemplateLint\";\n\ndefineProps<{\n open: boolean;\n issues: LintIssue[];\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t: cloudT } = useCloudI18nStrict();\n</script>\n\n<template>\n <TplModal :visible=\"open\" @close=\"emit('cancel')\">\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"tpl-save-gate-title\"\n aria-describedby=\"tpl-save-gate-body\"\n data-testid=\"cloud-save-gate-dialog\"\n class=\"tpl:flex tpl:max-h-[80%] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius-lg)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]\"\n >\n <header class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <AlertTriangle\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-warning)]\"\n />\n <h2\n id=\"tpl-save-gate-title\"\n class=\"tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]\"\n >\n {{ cloudT.saveGate.title }}\n </h2>\n </header>\n\n <p\n id=\"tpl-save-gate-body\"\n class=\"tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ cloudT.saveGate.body }}\n </p>\n\n <ul\n class=\"tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-2\"\n >\n <li\n v-for=\"issue in issues\"\n :key=\"`${issue.ruleId}-${issue.blockId ?? 'template'}`\"\n class=\"tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5\"\n >\n <span class=\"tpl:text-xs tpl:text-[var(--tpl-text)]\">\n {{ issue.message }}\n </span>\n <span\n class=\"tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]\"\n >\n {{ issue.ruleId }}\n </span>\n </li>\n </ul>\n\n <footer class=\"tpl:flex tpl:justify-end tpl:gap-2\">\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-cancel\"\n :class=\"secondaryBtnClass\"\n @click=\"emit('cancel')\"\n >\n {{ cloudT.saveGate.cancel }}\n </button>\n <button\n type=\"button\"\n data-testid=\"cloud-save-gate-confirm\"\n :class=\"dangerBtnClass\"\n @click=\"emit('confirm')\"\n >\n {{ cloudT.saveGate.confirm }}\n </button>\n </footer>\n </div>\n </TplModal>\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n","<script setup lang=\"ts\">\nimport type { UseEditorReturn } from \"@templatical/core\";\n\nimport type { UseEditorCoreReturn } from \"../../composables/useEditorCore\";\nimport type { CloudAttachment, CloudReady, CloudRuntime } from \"../runtime\";\n\nimport CloudErrorOverlay from \"./CloudErrorOverlay.vue\";\nimport CloudLoadingOverlay from \"./CloudLoadingOverlay.vue\";\nimport CloudSaveGateModal from \"./CloudSaveGateModal.vue\";\n\n/**\n * Every piece of Cloud chrome that renders outside the header.\n *\n * `Editor.vue` mounts this behind one lazy `defineAsyncComponent` gated on a\n * cloud runtime being present, so an OSS consumer downloads none of it — the\n * `SavedBlocksPanels` / `TestEmailPanel` pattern.\n *\n * The overlays live here rather than in the shared editor deliberately: `init()`\n * cannot fail after it mounts, and OSS should not grow the ability.\n *\n * The comments sidebar is deliberately not here: it is shared, as `CommentsPanel`\n * in `Editor.vue` over a `CommentsProvider`. Its filter target lives on the shared\n * feature rather than being relayed through this component, so it survives the\n * lazy panel's mount without a runtime hop.\n *\n * The media library is not here either: it is shared, as `MediaPanels` in\n * `Editor.vue` over a `MediaProvider`. Cloud supplies that provider; it does\n * not mount a second modal.\n */\ndefineProps<{\n editor: UseEditorReturn;\n core: UseEditorCoreReturn;\n runtime: CloudRuntime;\n cloud: CloudAttachment;\n ready: CloudReady;\n}>();\n</script>\n\n<template>\n <!-- A template create / load in flight. Cloud reads its content from the\n server, so there is a real gap where the canvas shows the wrong thing. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-100\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudLoadingOverlay :visible=\"editor.state.isLoading\" />\n </Transition>\n\n <!-- Session failure — an auth refresh that could not renew the token. The\n *bootstrap* has no overlay any more: it runs before the mount, so a\n failure there rejects `initCloud()` instead of mounting a dead editor. -->\n <Transition\n enter-active-class=\"tpl:transition-opacity tpl:duration-200\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition-opacity tpl:duration-300\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <CloudErrorOverlay\n :error=\"ready.sessionError.value\"\n :visible=\"!!ready.sessionError.value\"\n @retry=\"ready.retry\"\n />\n </Transition>\n\n <CloudSaveGateModal\n :open=\"ready.saveGate.modalOpen.value\"\n :issues=\"ready.saveGate.blockingIssues.value\"\n @cancel=\"ready.saveGate.cancel\"\n @confirm=\"ready.saveGate.confirmAndSave\"\n />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAUA,IAAMgF,IAAOD,GAIP,EAAE,GAAGE,MAAWV,EAAmB;EAEzC,SAASW,EAAgB,GAAsB;GAU7C,OARE,oBAAoBC,KACnBA,EAAsC,iBAEhCF,EAAO,MAAM,aAElB,gBAAgBE,KAAUA,EAAkC,aACvDF,EAAO,MAAM,mBAEfA,EAAO,MAAM;EACtB;EAEA,SAASG,EAAgB,GAAuB;GAC9C,OACE,gBAAgBD,KAAS,CAAC,CAAEA,EAAkC;EAElE;E,iBAKUE,EAAA,WAAWA,EAAA,SADnBhF,EAAA,GAAAC,EAgCM,OAhCNN,GAgCM;GA3BJO,EAQM,OARNN,GAQM,CALJO,EAIEC,EAAAC,CAAA,GAAA;IAHC,MAAM;IACN,gBAAc;IACf,OAAM;;GAGVH,EASM,OATNL,GASM,CANJK,EAEK,MAFLJ,GAEKQ,EADAF,EAAAwE,CAAA,CAAM,CAAC,MAAM,KAAK,GAAA,CAAA,GAEvB1E,EAEI,KAFJH,GAEIO,EADCuE,EAAgBG,EAAA,KAAK,CAAA,GAAA,CAAA,C;GAInBD,EAAgBC,EAAA,KAAK,I,aAD9BhF,EAAA,GAAAC,EAOS,UAAA;;IALP,MAAK;IACJ,OAAKM,EAAEH,EAAA4D,CAAA,CAAe;IACtB,SAAK,AAAAiB,EAAA,QAAA,MAAEN,EAAI,OAAA;GAET,GAAArE,EAAAF,EAAAwE,CAAA,CAAM,CAAC,MAAM,KAAK,GAAA,CAAA;;;;;;;EE5D3B,I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PpE,EAOS,UAAA;KANP,MAAK;KACL,eAAY;KACX,OAAKQ,EAAEN,EAAAmC,CAAA,CAAiB;KACxB,SAAK,AAAAkB,EAAA,QAAA,MAAEN,EAAI,QAAA;IAET,GAAA7C,EAAAF,EAAAgD,CAAA,CAAM,CAAC,SAAS,MAAM,GAAA,CAAA,GAE3BlD,EAOS,UAAA;KANP,MAAK;KACL,eAAY;KACX,OAAKQ,EAAEN,EAAAqC,CAAA,CAAc;KACrB,SAAK,AAAAgB,EAAA,QAAA,MAAEN,EAAI,SAAA;IAET,GAAA7C,EAAAF,EAAAgD,CAAA,CAAM,CAAC,SAAS,OAAO,GAAA,CAAA,C;;;;;;;;;;;;;;;;GE/ClCrC,EASaC,GAAA;IARX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAAC,QAAyD,CAAzDF,EAAyDG,GAAA,EAAnC,SAASsC,EAAA,OAAO,MAAM,U;;;GAM9CzC,EAaaC,GAAA;IAZX,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;IACf,sBAAmB;IACnB,oBAAiB;IACjB,kBAAe;;IAEf,SAAAC,QAIE,CAJFF,EAIEI,GAAA;KAHC,OAAOqC,EAAA,MAAM,aAAa;KAC1B,SAAO,CAAA,CAAIA,EAAA,MAAM,aAAa;KAC9B,SAAOA,EAAA,MAAM;;;;;;;;GAIlBzC,EAKEK,GAAA;IAJC,MAAMoC,EAAA,MAAM,SAAS,UAAU;IAC/B,QAAQA,EAAA,MAAM,SAAS,eAAe;IACtC,UAAQA,EAAA,MAAM,SAAS;IACvB,WAASA,EAAA,MAAM,SAAS"}
@@ -1,5 +1,5 @@
1
1
  import { C as e, F as t, _ as n, ct as r, g as i, m as a, mt as o, p as s, pt as c, u as l, x as u } from "./draggable-IRVFEZ-b.js";
2
- import { t as d } from "./icons-Cl4oR2mf.js";
2
+ import { t as d } from "./icons-C7vjUBLn.js";
3
3
  import { t as f } from "./noticeTones-D7BPu-Le.js";
4
4
  import { t as p } from "./useI18n-CSf-ZpcM.js";
5
5
  // src/components/collaboration/CollaborationNotices.vue?vue&type=script&setup=true&lang.ts
@@ -64,4 +64,4 @@ var m = ["data-kind", "data-tone"], h = ["aria-label", "title"], g = /* @__PURE_
64
64
  });
65
65
  export { g as default };
66
66
 
67
- //# sourceMappingURL=CollaborationNotices-DGA8XRZJ.js.map
67
+ //# sourceMappingURL=CollaborationNotices-yKOt4o7B.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationNotices-DGA8XRZJ.js","names":["_openBlock","_createElementBlock","_Fragment","_normalizeStyle","_unref","_toDisplayString","_createCommentVNode","_createElementVNode","_createVNode","_sfc_main","defineComponent","openBlock","createElementBlock","unref","createCommentVNode","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","createVNode","X","TONE_STYLES","useI18n","_hoisted_1","_hoisted_2","CollaborationNotices_default","props","__props","notice","isReconnecting","tone","nameOf","person","t","agentMessage","values","view","format","message","_cache"],"sources":["../../../src/components/collaboration/CollaborationNotices.vue","../../../src/components/collaboration/CollaborationNotices.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNotice(notice.id)\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNotice(notice.id)\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n</template>\n"],"mappings":";;;;;;;;;EAUA,IAAM2B,IAAQC,GAIR,EAAE,MAAG,cAAWL,EAAQ,GAExBM,IAASZ,QAAeU,EAAM,QAAQ,QAAQ,MAAM,GAAG,EAAE,KAAK,IAAI,GAGlEG,IAAiBb,QAEnBU,EAAM,QAAQ,WAAW,UAAU,kBACnCA,EAAM,QAAQ,WAAW,UAAU,SACvC,GAMMI,IAAOd,QACXY,EAAO,OAAO,SAAS,iBAAiBA,EAAO,OAAO,SAAS,aAC3D,SACA,SACN;EAEA,SAASG,EAAO,GAAsD;GACpE,OAAOC,EAAO,WAAW,CAAC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GACV,aAAU;GACV,MAAK;GACL,aAAU;GACV,OAAM;GACL,OAAKE,EAAEC,EAAAkB,CAAA,CAAW,CAAC,OAAO;EAExB,GAAAjB,EAAAD,EAAA8B,CAAA,CAAC,CAAC,cAAc,kBAAkB,GAAA,CAAA,K,WAK/BL,EAAA,SADR7B,EAAA,GAAAC,EAqBM,OAAA;GAnBH,KAAK4B,EAAA,MAAO;GACb,eAAY;GACX,aAAWA,EAAA,MAAO;GAClB,aAAWE,EAAA;GACZ,MAAK;GACL,aAAU;GACV,OAAM;GACL,OAAK5B,EAAEC,EAAAkB,CAAA,CAAW,CAACS,EAAA,MAAI;E,IAExBxB,EAAkC,QAAA,MAAAF,EAAzBkC,EAAQV,EAAA,KAAM,CAAA,GAAA,CAAA,GACvBtB,EAQS,UAAA;GAPP,MAAK;GACL,OAAM;GACL,cAAYH,EAAA8B,CAAA,CAAC,CAAC,cAAc;GAC5B,OAAO9B,EAAA8B,CAAA,CAAC,CAAC,cAAc;GACvB,SAAK,AAAAM,EAAA,QAAA,MAAEZ,EAAA,QAAQ,cAAcC,EAAA,MAAO,EAAE;E,IAEvCrB,EAAqDJ,EAAAiB,CAAA,GAAA;GAAjD,MAAM;GAAK,gBAAc;GAAG,eAAY"}
1
+ {"version":3,"file":"CollaborationNotices-yKOt4o7B.js","names":["_openBlock","_createElementBlock","_Fragment","_normalizeStyle","_unref","_toDisplayString","_createCommentVNode","_createElementVNode","_createVNode","_sfc_main","defineComponent","openBlock","createElementBlock","unref","createCommentVNode","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","createVNode","X","TONE_STYLES","useI18n","_hoisted_1","_hoisted_2","CollaborationNotices_default","props","__props","notice","isReconnecting","tone","nameOf","person","t","agentMessage","values","view","format","message","_cache"],"sources":["../../../src/components/collaboration/CollaborationNotices.vue","../../../src/components/collaboration/CollaborationNotices.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNotice(notice.id)\"\n >\n <X :size=\"14\" :stroke-width=\"2\" aria-hidden=\"true\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { X } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type {\n CollaborationNoticeView,\n UseCollaborationFeatureReturn,\n} from \"../../composables/useCollaborationFeature\";\nimport { TONE_STYLES } from \"../../constants/noticeTones\";\nimport { useI18n } from \"../../composables/useI18n\";\n\nconst props = defineProps<{\n feature: UseCollaborationFeatureReturn;\n}>();\n\nconst { t, format } = useI18n();\n\nconst notice = computed(() => props.feature.notices.value.at(-1) ?? null);\n\n/** Shown for as long as the socket is down; edits keep going over HTTP. */\nconst isReconnecting = computed(\n () =>\n props.feature.connection.value === \"reconnecting\" ||\n props.feature.connection.value === \"offline\",\n);\n\n/**\n * Refusals warn; an agent's or the AI's edit is information, so it takes\n * Compositor Teal. Amber stays for selection and intent.\n */\nconst tone = computed(() =>\n notice.value?.kind === \"agentEdited\" || notice.value?.kind === \"aiEdited\"\n ? \"info\"\n : \"warning\",\n);\n\nfunction nameOf(person: { name?: string; isGuest?: boolean }): string {\n return person.isGuest || !person.name ? t.collaboration.guest : person.name;\n}\n\n/**\n * \"{who} changed …\", where `who` is \"Claude for Ada\" or \"AI (for Ada)\": an\n * updated template wins, then blocks with settings.\n */\nfunction agentMessage(\n view: Extract<CollaborationNoticeView, { kind: \"agentEdited\" | \"aiEdited\" }>,\n): string {\n const who =\n view.kind === \"aiEdited\"\n ? format(t.collaboration.aiFor, { name: nameOf(view) })\n : format(t.collaboration.agentFor, {\n client: view.client ?? t.collaboration.anAgent,\n name: nameOf(view),\n });\n const values = { who, count: view.blocks };\n if (view.templateUpdated)\n return format(t.collaboration.agentUpdatedTemplate, values);\n if (view.settings && view.blocks > 1)\n return format(t.collaboration.agentChangedBlocksAndSettings, values);\n if (view.settings && view.blocks === 1)\n return format(t.collaboration.agentChangedBlockAndSettings, values);\n if (view.settings)\n return format(t.collaboration.agentChangedSettings, values);\n if (view.blocks === 1)\n return format(t.collaboration.agentChangedBlock, values);\n return format(t.collaboration.agentChangedBlocks, values);\n}\n\nfunction message(view: CollaborationNoticeView): string {\n switch (view.kind) {\n case \"selectionRefused\":\n return format(t.collaboration.selectionRefused, { name: nameOf(view) });\n case \"editRefused\":\n if (view.code === \"content_too_large\")\n return t.collaboration.editTooLarge;\n return view.code === \"lock_held\" && (view.name || view.isGuest)\n ? format(t.collaboration.editRefusedLocked, { name: nameOf(view) })\n : t.collaboration.editRefused;\n case \"undoSkipped\":\n return t.collaboration.undoSkipped;\n case \"replaceRefused\":\n return format(t.collaboration.replaceRefused, {\n names: view.holders.map(nameOf).join(\", \"),\n });\n case \"agentEdited\":\n case \"aiEdited\":\n return agentMessage(view);\n }\n}\n</script>\n\n<template>\n <div\n v-if=\"isReconnecting\"\n data-testid=\"collaboration-notice\"\n data-kind=\"reconnecting\"\n data-tone=\"warning\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES.warning\"\n >\n {{ t.collaboration.reconnectingNotice }}\n </div>\n <!-- `message()` is interpolated, never `v-html`: an agent's name comes\n from its own registration and is untrusted text. -->\n <div\n v-if=\"notice\"\n :key=\"notice.id\"\n data-testid=\"collaboration-notice\"\n :data-kind=\"notice.kind\"\n :data-tone=\"tone\"\n role=\"status\"\n aria-live=\"polite\"\n class=\"tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:shadow-[var(--tpl-shadow-lg)]\"\n :style=\"TONE_STYLES[tone]\"\n >\n <span>{{ message(notice) }}</span>\n <button\n type=\"button\"\n class=\"tpl:flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)]\"\n :aria-label=\"t.collaboration.dismiss\"\n :title=\"t.collaboration.dismiss\"\n @click=\"feature.dismissNot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+1,5 @@
1
1
  import { C as e, F as t, L as n, _ as r, ct as i, g as a, h as o, m as s, mt as c, p as l, pt as u, u as d } from "./draggable-IRVFEZ-b.js";
2
- import { i as f, r as p } from "./icons-Cl4oR2mf.js";
2
+ import { i as f, r as p } from "./icons-C7vjUBLn.js";
3
3
  import { t as m } from "./useI18n-CSf-ZpcM.js";
4
4
  import { t as h } from "./readableTextColor-BfZUGnVj.js";
5
5
  // src/components/collaboration/CollaboratorBar.vue?vue&type=script&setup=true&lang.ts
@@ -68,4 +68,4 @@ var g = ["aria-label"], _ = ["data-state", "title"], v = { class: "tpl:sr-only"
68
68
  });
69
69
  export { E as default };
70
70
 
71
- //# sourceMappingURL=CollaboratorBar-BWL1Shc1.js.map
71
+ //# sourceMappingURL=CollaboratorBar-D5fycyLP.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollaboratorBar-BWL1Shc1.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_normalizeStyle","_createBlock","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_sfc_main","defineComponent","openBlock","renderList","createElementBlock","unref","createCommentVNode","createBlock","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","WifiOff","Wifi","useI18n","readableTextColor","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","MAX_VISIBLE","CollaboratorBar_default","props","__props","visiblePeople","overflowPeople","overflowNames","displayName","isConnected","connectionLabel","t","person","initials","parts"],"sources":["../../../src/components/collaboration/CollaboratorBar.vue","../../../src/components/collaboration/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;A,gDAiBMoC,IAAc,G;;;;;;;EATpB,IAAME,IAAQC,GAOR,EAAE,SAAMd,EAAQ,GAIhBe,IAAgBpB,QAAekB,EAAM,OAAO,MAAM,GAAGF,CAAW,CAAC,GACjEK,IAAiBrB,QAAekB,EAAM,OAAO,MAAMF,CAAW,CAAC,GAC/DM,IAAgBtB,QACpBqB,EAAe,MAAM,IAAIE,CAAW,CAAC,CAAC,KAAK,IAAI,CACjD,GAEMC,IAAcxB,QAAekB,EAAM,eAAe,WAAW,GAC7DO,IAAkBzB,QAClBkB,EAAM,eAAe,cAAoBQ,EAAE,cAAc,YACzDR,EAAM,eAAe,iBAAuBQ,EAAE,cAAc,eACzDA,EAAE,cAAc,OACxB;EAGD,SAASH,EAAY,GAAqC;GACxD,OAAOI,EAAO,SAAS,WAAWA,EAAO,KAAK,KAAK,MAAM,KACrDD,EAAE,cAAc,QAChBC,EAAO;EACb;EAEA,SAASC,EAAS,GAAqC;GACrD,IAAMC,IAAQN,EAAYI,CAAM,CAAC,CAAC,KAAK,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C,EAASD,CAAM,CAAA,GAAA,CAAA,IAClD5C,EAA0D,QAA1D+B,GAA0D5B,EAA7BqC,EAAYI,CAAM,CAAA,GAAA,CAAA,C,oBAGzCN,EAAA,MAAe,SAAM,KAD7BzC,EAAA,GAAAC,EAOO,QAAA;;GALL,eAAY;GACZ,OAAM;GACL,OAAOyC,EAAA;EACT,GAAA,OACEpC,EAAGmC,EAAA,MAAe,MAAM,GAAA,GAAAN,CAAA,K"}
1
+ {"version":3,"file":"CollaboratorBar-D5fycyLP.js","names":["_openBlock","_createElementBlock","_unref","_createElementVNode","_normalizeStyle","_createBlock","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_sfc_main","defineComponent","openBlock","renderList","createElementBlock","unref","createCommentVNode","createBlock","createBaseVNode","toDisplayString","computed","normalizeStyle","Fragment","WifiOff","Wifi","useI18n","readableTextColor","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","MAX_VISIBLE","CollaboratorBar_default","props","__props","visiblePeople","overflowPeople","overflowNames","displayName","isConnected","connectionLabel","t","person","initials","parts"],"sources":["../../../src/components/collaboration/CollaboratorBar.vue","../../../src/components/collaboration/CollaboratorBar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { CollaborationConnectionState } from \"@templatical/types\";\nimport { Wifi, WifiOff } from \"@lucide/vue\";\nimport { computed } from \"vue\";\nimport type { CollaborationPerson } from \"../../composables/useCollaborationFeature\";\nimport { useI18n } from \"../../composables/useI18n\";\nimport { readableTextColor } from \"../../utils/readableTextColor\";\n\nconst props = defineProps<{\n /** Everyone else with the template open, one entry per person. */\n people: CollaborationPerson[];\n /** `null` while no realtime join has happened. */\n connection: CollaborationConnectionState | null;\n}>();\n\nconst { t } = useI18n();\n\nconst MAX_VISIBLE = 3;\n\nconst visiblePeople = computed(() => props.people.slice(0, MAX_VISIBLE));\nconst overflowPeople = computed(() => props.people.slice(MAX_VISIBLE));\nconst overflowNames = computed(() =>\n overflowPeople.value.map(displayName).join(\"\\n\"),\n);\n\nconst isConnected = computed(() => props.connection === \"connected\");\nconst connectionLabel = computed(() => {\n if (props.connection === \"connected\") return t.collaboration.connected;\n if (props.connection === \"reconnecting\") return t.collaboration.reconnecting;\n return t.collaboration.offline;\n});\n\n/** A guest's name comes from the server in English; the bar uses its own word. */\nfunction displayName(person: CollaborationPerson): string {\n return person.type === \"guest\" || person.name.trim() === \"\"\n ? t.collaboration.guest\n : person.name;\n}\n\nfunction initials(person: CollaborationPerson): string {\n const parts = displayName(person).trim().split(/\\s+/);\n const first = parts[0]?.charAt(0) ?? \"\";\n const last = parts.length > 1 ? parts[parts.length - 1].charAt(0) : \"\";\n return (first + last).toUpperCase();\n}\n</script>\n\n<template>\n <div\n data-testid=\"collaborator-bar\"\n role=\"group\"\n :aria-label=\"t.collaboration.people\"\n class=\"tpl-collaborator-bar tpl:flex tpl:items-center tpl:gap-2\"\n >\n <span\n data-testid=\"collaborator-connection\"\n :data-state=\"connection ?? 'none'\"\n class=\"tpl:flex tpl:items-center tpl:text-xs\"\n :style=\"{\n color: isConnected ? 'var(--tpl-success)' : 'var(--tpl-text-muted)',\n }\"\n :title=\"connectionLabel\"\n >\n <Wifi\n v-if=\"isConnected\"\n :size=\"12\"\n :stroke-width=\"2\"\n aria-hidden=\"true\"\n />\n <WifiOff v-else :size=\"12\" :stroke-width=\"2\" aria-hidden=\"true\" />\n <span class=\"tpl:sr-only\">{{ connectionLabel }}</span>\n </span>\n\n <div class=\"tpl:flex tpl:items-center tpl:-space-x-1.5\">\n <span\n v-for=\"person in visiblePeople\"\n :key=\"person.key\"\n data-testid=\"collaborator-avatar\"\n :data-person-type=\"person.type\"\n class=\"tpl-collaborator-avatar tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:overflow-hidden tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:text-[10px] tpl:font-bold tpl:transition-transform tpl:hover:z-10 tpl:hover:scale-110\"\n :style=\"{\n backgroundColor: person.color,\n color: readableTextColor(person.color),\n boxShadow: `0 0 0 1px ${person.color}`,\n }\"\n :title=\"displayName(person)\"\n >\n <img\n v-if=\"person.avatarUrl\"\n :src=\"person.avatarUrl\"\n alt=\"\"\n class=\"tpl:size-full tpl:object-cover\"\n />\n <span v-else aria-hidden=\"true\">{{ initials(person) }}</span>\n <span class=\"tpl:sr-only\">{{ displayName(person) }}</span>\n </span>\n <span\n v-if=\"overflowPeople.length > 0\"\n data-testid=\"collaborator-overflow\"\n class=\"tpl:relative tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-2 tpl:border-[var(--tpl-bg)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[10px] tpl:font-bold tpl:text-[var(--tpl-text-muted)]\"\n :title=\"overflowNames\"\n >\n +{{ overflowPeople.length }}\n </span>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;A,gDAiBMoC,IAAc,G;;;;;;;EATpB,IAAME,IAAQC,GAOR,EAAE,SAAMd,EAAQ,GAIhBe,IAAgBpB,QAAekB,EAAM,OAAO,MAAM,GAAGF,CAAW,CAAC,GACjEK,IAAiBrB,QAAekB,EAAM,OAAO,MAAMF,CAAW,CAAC,GAC/DM,IAAgBtB,QACpBqB,EAAe,MAAM,IAAIE,CAAW,CAAC,CAAC,KAAK,IAAI,CACjD,GAEMC,IAAcxB,QAAekB,EAAM,eAAe,WAAW,GAC7DO,IAAkBzB,QAClBkB,EAAM,eAAe,cAAoBQ,EAAE,cAAc,YACzDR,EAAM,eAAe,iBAAuBQ,EAAE,cAAc,eACzDA,EAAE,cAAc,OACxB;EAGD,SAASH,EAAY,GAAqC;GACxD,OAAOI,EAAO,SAAS,WAAWA,EAAO,KAAK,KAAK,MAAM,KACrDD,EAAE,cAAc,QAChBC,EAAO;EACb;EAEA,SAASC,EAAS,GAAqC;GACrD,IAAMC,IAAQN,EAAYI,CAAM,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK;GAGpD,SAFcE,EAAM,EAAE,EAAE,OAAO,CAAC,KAAK,OACxBA,EAAM,SAAS,IAAIA,EAAMA,EAAM,SAAS,EAAE,CAAC,OAAO,CAAC,IAAI,IAAA,CAC9C,YAAY;EACpC;E,kBAIEjD,EAAA,GAAAC,EAyDM,OAAA;GAxDJ,eAAY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