@templatical/editor 0.57.0 → 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-BjClNscQ.js → AiAltTextPopover-B4cg0jQG.js} +1 -1
  2. package/dist/{AiAltTextReview-DeMdVbtT.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-BSzj1dKC.js → AiRewriteMenu-B25gpnip.js} +8 -8
  6. package/dist/{BlockIssueBadge-i2cZy5PB.js → BlockIssueBadge-Ri7dQhuz.js} +2 -2
  7. package/dist/{BlockPreviewCanvas-D-If_vd_.js → BlockPreviewCanvas-yr5MmQql.js} +4 -4
  8. package/dist/{CloudPanels-DPeK_siQ.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-DBu2ZqC6.js → CountdownToolbar-BtP0n0yZ.js} +4 -4
  14. package/dist/{IssuesPanel-BnUut-p-.js → IssuesPanel-CarJYQFu.js} +9 -9
  15. package/dist/{LanguageMenu-DfTxrbvp.js → LanguageMenu-confz89v.js} +10 -10
  16. package/dist/{LocaleNotices-D6zk-QCL.js → LocaleNotices-D8aE167E.js} +2 -2
  17. package/dist/{LogicTagInsertButton-CJ1Jk6jv.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-CV-z85s9.js → MergeTagInput-BuGJeeyA.js} +1 -1
  21. package/dist/{MergeTagModeToggle-CixgX5C_.js → MergeTagModeToggle-D7482NZf.js} +4 -4
  22. package/dist/{MergeTagTextarea-B1zOC_Nr.js → MergeTagTextarea-Qt9_NeY4.js} +3 -3
  23. package/dist/{ParagraphEditor-C9UhWvRB.js → ParagraphEditor-Cd-CBE_l.js} +45 -45
  24. package/dist/{RestoreVersionDialog-Do7fZWpT.js → RestoreVersionDialog-Clh4l0Bn.js} +3 -3
  25. package/dist/{RichTextEditorContent-wW_SMun2.js → RichTextEditorContent-Dw_Z9zhi.js} +4 -4
  26. package/dist/{SaveBlockDialog-CCHIUfR-.js → SaveBlockDialog-kboYvk_a.js} +7 -7
  27. package/dist/{SavedBlocksBrowserModal-DtPHhfw9.js → SavedBlocksBrowserModal-wVGMC6My.js} +9 -9
  28. package/dist/{SavedBlocksPanels-CYIby5pR.js → SavedBlocksPanels-C9AHYfYR.js} +1 -1
  29. package/dist/{SavedBlocksPickBar-CCwBugqN.js → SavedBlocksPickBar-CVbV5MVL.js} +2 -2
  30. package/dist/{TemplateSettings-B8IVy5q9.js → TemplateSettings-ChCm5_2b.js} +8 -8
  31. package/dist/{TestEmailModal-CS5JoKRH.js → TestEmailModal-CYq9Ec7x.js} +7 -7
  32. package/dist/{TestEmailPanel-sOIZfKzc.js → TestEmailPanel-7Ua54CYL.js} +1 -1
  33. package/dist/{TitleEditor-ZlBcq9_P.js → TitleEditor-DXMOgW-9.js} +9 -9
  34. package/dist/{Toolbar-c4_rLLJT.js → Toolbar-CVHJl6i4.js} +30 -30
  35. package/dist/{TplModal-DnFFEulp.js → TplModal-BErE8I3p.js} +1 -1
  36. package/dist/{VersionHistoryMenu-Cd2IaHgT.js → VersionHistoryMenu-P3P00KqQ.js} +5 -5
  37. package/dist/{VersionHistoryPanels-TdGaMaa_.js → VersionHistoryPanels-DES1b1Pq.js} +1 -1
  38. package/dist/{VersionPreviewBanner-lkAf7tc8.js → VersionPreviewBanner-D2TtR9I5.js} +1 -1
  39. package/dist/{WrapperBlock-BiW4ye3w.js → WrapperBlock-B1zI7POT.js} +3 -3
  40. package/dist/{blockTypeIcons-D1aYMC1M.js → blockTypeIcons-Dp540i74.js} +3 -3
  41. package/dist/bundle-stats.json +6 -6
  42. package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js → AiAltTextPopover-sx3bmRiV.js} +2 -2
  43. package/dist/cdn/chunks/{AiAltTextPopover-CfGJNBOb.js.map → AiAltTextPopover-sx3bmRiV.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.js → AiAltTextReview-Cj3PKInZ.js} +2 -2
  45. package/dist/cdn/chunks/{AiAltTextReview-PKe31R_g.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-ZDBwReuU.js → AiRewriteMenu-BbZ9NRoe.js} +6 -6
  51. package/dist/cdn/chunks/{AiRewriteMenu-ZDBwReuU.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-D7U6nQ7t.js → BlockPreviewCanvas-BDZ6pMHq.js} +5 -5
  55. package/dist/cdn/chunks/{BlockPreviewCanvas-D7U6nQ7t.js.map → BlockPreviewCanvas-BDZ6pMHq.js.map} +1 -1
  56. package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.js → CloudPanels-BI_hJwcJ.js} +3 -3
  57. package/dist/cdn/chunks/{CloudPanels-EXXNMLbs.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-BN2_zvRj.js → CountdownToolbar-D5_QBuhO.js} +5 -5
  67. package/dist/cdn/chunks/{CountdownToolbar-BN2_zvRj.js.map → CountdownToolbar-D5_QBuhO.js.map} +1 -1
  68. package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js → IssuesPanel-BzVpxRkq.js} +4 -4
  69. package/dist/cdn/chunks/{IssuesPanel-BDwegn0s.js.map → IssuesPanel-BzVpxRkq.js.map} +1 -1
  70. package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.js → LanguageMenu-GEbUX5Oe.js} +5 -5
  71. package/dist/cdn/chunks/{LanguageMenu-DXq9cXUd.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-BEArlbra.js → LogicTagInsertButton-CrkAz1t_.js} +5 -5
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BEArlbra.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-B3SLXXzL.js → MergeTagInput-DkCATtfE.js} +2 -2
  81. package/dist/cdn/chunks/{MergeTagInput-B3SLXXzL.js.map → MergeTagInput-DkCATtfE.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js → MergeTagModeToggle-DYAFxyoB.js} +3 -3
  83. package/dist/cdn/chunks/{MergeTagModeToggle-Dywp9ntA.js.map → MergeTagModeToggle-DYAFxyoB.js.map} +1 -1
  84. package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js → MergeTagTextarea-DRS6pXSE.js} +4 -4
  85. package/dist/cdn/chunks/{MergeTagTextarea-B9TM7FgM.js.map → MergeTagTextarea-DRS6pXSE.js.map} +1 -1
  86. package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js → ParagraphEditor-rEdKBett.js} +25 -25
  87. package/dist/cdn/chunks/{ParagraphEditor-CVGtTYta.js.map → ParagraphEditor-rEdKBett.js.map} +1 -1
  88. package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js → RestoreVersionDialog-B7eTijWD.js} +3 -3
  89. package/dist/cdn/chunks/{RestoreVersionDialog-Dt_0qOOW.js.map → RestoreVersionDialog-B7eTijWD.js.map} +1 -1
  90. package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js → RichTextEditorContent-EtUIYzHB.js} +4 -4
  91. package/dist/cdn/chunks/{RichTextEditorContent-BjN4mnzL.js.map → RichTextEditorContent-EtUIYzHB.js.map} +1 -1
  92. package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js → SaveBlockDialog-BquE_Brz.js} +6 -6
  93. package/dist/cdn/chunks/{SaveBlockDialog-D9eBjE99.js.map → SaveBlockDialog-BquE_Brz.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js → SavedBlocksBrowserModal--fNlId5y.js} +6 -6
  95. package/dist/cdn/chunks/{SavedBlocksBrowserModal-ClsTpkdk.js.map → SavedBlocksBrowserModal--fNlId5y.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js → SavedBlocksPanels-0Z0dELDm.js} +2 -2
  97. package/dist/cdn/chunks/{SavedBlocksPanels-CxlNHhUs.js.map → SavedBlocksPanels-0Z0dELDm.js.map} +1 -1
  98. package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js → SavedBlocksPickBar-yezZxZeP.js} +3 -3
  99. package/dist/cdn/chunks/{SavedBlocksPickBar-C7_Z8phX.js.map → SavedBlocksPickBar-yezZxZeP.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js → TemplateSettings-DFetnT9P.js} +6 -6
  101. package/dist/cdn/chunks/{TemplateSettings-B6zDtjSs.js.map → TemplateSettings-DFetnT9P.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js → TestEmailModal-DJpwpEZs.js} +7 -7
  103. package/dist/cdn/chunks/{TestEmailModal-CJ_QYFua.js.map → TestEmailModal-DJpwpEZs.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js → TestEmailPanel-C2dxmmoW.js} +2 -2
  105. package/dist/cdn/chunks/{TestEmailPanel-CsFrTq_a.js.map → TestEmailPanel-C2dxmmoW.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js → TitleEditor-Bq62I2SC.js} +8 -8
  107. package/dist/cdn/chunks/{TitleEditor-CuKJptyw.js.map → TitleEditor-Bq62I2SC.js.map} +1 -1
  108. package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js → Toolbar-CwmW8wAI.js} +19 -19
  109. package/dist/cdn/chunks/{Toolbar-TS2WwlPW.js.map → Toolbar-CwmW8wAI.js.map} +1 -1
  110. package/dist/cdn/chunks/{TplModal-CsadClrH.js → TplModal-DE6BniBg.js} +2 -2
  111. package/dist/cdn/chunks/{TplModal-CsadClrH.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-CieY91f0.js → VersionHistoryPanels-mMMqnf3O.js} +2 -2
  115. package/dist/cdn/chunks/{VersionHistoryPanels-CieY91f0.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-DtnRuKWE.js → WrapperBlock-B9XxtFql.js} +4 -4
  119. package/dist/cdn/chunks/{WrapperBlock-DtnRuKWE.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-CUIiW9OD.js → composables-CkthyXi9.js} +12 -12
  123. package/dist/cdn/chunks/{composables-CUIiW9OD.js.map → composables-CkthyXi9.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.js → createCloudRuntime-k12jYbXP.js} +3 -3
  125. package/dist/cdn/chunks/{createCloudRuntime-B7D04wKf.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-Cbvk9i08.js → extensions-Djyg5slk.js} +5 -5
  130. package/dist/cdn/chunks/{extensions-Cbvk9i08.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-BJ-MnCqF.js → normalizeMergeTagMarkup-nDyYIXvL.js} +2 -2
  134. package/dist/cdn/chunks/{normalizeMergeTagMarkup-BJ-MnCqF.js.map → normalizeMergeTagMarkup-nDyYIXvL.js.map} +1 -1
  135. package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js → preRenderCustomBlocks-CxwYcAQe.js} +2 -2
  136. package/dist/cdn/chunks/{preRenderCustomBlocks-D2wISRHq.js.map → preRenderCustomBlocks-CxwYcAQe.js.map} +1 -1
  137. package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js → sanitizeHtml-5T_KaDcp.js} +2 -2
  138. package/dist/cdn/chunks/{sanitizeHtml-CB7fjHFs.js.map → sanitizeHtml-5T_KaDcp.js.map} +1 -1
  139. package/dist/cdn/chunks/{socialIcons-C_yggK1_.js → socialIcons-CkgQUpim.js} +3 -3
  140. package/dist/cdn/chunks/{socialIcons-C_yggK1_.js.map → socialIcons-CkgQUpim.js.map} +1 -1
  141. package/dist/cdn/chunks/{src-Bp7bZcuD.js → src-BRyzUujm.js} +2 -2
  142. package/dist/cdn/chunks/{src-Bp7bZcuD.js.map → src-BRyzUujm.js.map} +1 -1
  143. package/dist/cdn/chunks/{src-CdVAke9t.js → src-CVHGPKSW.js} +553 -547
  144. package/dist/cdn/chunks/src-CVHGPKSW.js.map +1 -0
  145. package/dist/cdn/chunks/{src-D-URHI0Z.js → src-CpUX1Mhb.js} +3 -3
  146. package/dist/cdn/chunks/{src-D-URHI0Z.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-slFOCPrh.js → useLocalizedDisplay-7iwZ1UhB.js} +2 -2
  150. package/dist/cdn/chunks/{useLocalizedDisplay-slFOCPrh.js.map → useLocalizedDisplay-7iwZ1UhB.js.map} +1 -1
  151. package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js → useLogicTag-YXRBcfgG.js} +2 -2
  152. package/dist/cdn/chunks/{useLogicTag-lPjCGeGC.js.map → useLogicTag-YXRBcfgG.js.map} +1 -1
  153. package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js → useMergeTag-lb-Wrw-B.js} +2 -2
  154. package/dist/cdn/chunks/{useMergeTag-BKNBwIry.js.map → useMergeTag-lb-Wrw-B.js.map} +1 -1
  155. package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.js → withCurrentFont-BaeBoPQZ.js} +2 -2
  156. package/dist/cdn/chunks/{withCurrentFont-CzTFFaJA.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-DbjgUQlV.js → composables-BrzGZQkd.js} +17 -17
  166. package/dist/{createCloudRuntime-Cnh2M6iT.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-CAvsz9cW.js → dist-BTjObRcv.js} +349 -343
  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-7fb-XtNJ.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-GrXJfXsQ.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-DuXtzD-F.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-eV4_BpI6.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-brRkK9Om.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-DoaT7nWk.js → useLocalizedDisplay-9RqT2y_Y.js} +1 -1
  211. package/dist/{useLogicTag-cTC2KbWd.js → useLogicTag-BTCtn-uG.js} +1 -1
  212. package/dist/{useMergeTag-D2YDZ8vR.js → useMergeTag-QlXUjCWT.js} +1 -1
  213. package/dist/{useScrollToBlock-vf_KD0FM.js → useScrollToBlock-DruzlN2h.js} +1 -1
  214. package/dist/{withCurrentFont-DAmED4fN.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-CdVAke9t.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,5 +1,5 @@
1
1
  import { C as e, F as t, G as n, O as r, R as i, _ as a, ct as o, f as s, g as c, h as l, l as u, m as d, n as f, p, pt as m, tt as h, x as g } from "./draggable-IRVFEZ-b.js";
2
- import { H as _ } from "./composables-CUIiW9OD.js";
2
+ import { H as _ } from "./composables-CkthyXi9.js";
3
3
  import { n as v } from "./usePopoverPosition-BJFFi8x6.js";
4
4
  import { nt as y, ot as b } from "./keys-BQqbBUag.js";
5
5
  // src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
@@ -48,4 +48,4 @@ var x = ["data-tpl-theme"], S = /* @__PURE__ */ e({
48
48
  });
49
49
  export { S as t };
50
50
 
51
- //# sourceMappingURL=TplModal-CsadClrH.js.map
51
+ //# sourceMappingURL=TplModal-DE6BniBg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TplModal-CsadClrH.js","names":["_unref","_openBlock","_createBlock","_Teleport","_createVNode","_Transition","_withCtx","_createElementBlock","_normalizeStyle","_withModifiers","_createElementVNode","_renderSlot","_createCommentVNode","_sfc_main","defineComponent","openBlock","withCtx","inject","renderSlot","createElementBlock","unref","Teleport","createCommentVNode","createBlock","withModifiers","createBaseVNode","Transition","normalizeStyle","ref","createVNode","useFocusTrap","usePopoverRoot","THEME_STYLES_KEY","UI_THEME_KEY","_hoisted_1","TplModal_default","__emit","props","__props","emit","dialogRef","isVisible","computed","tplUiTheme","themeStyles","popoverRoot","handleKeydown","event","_cache","_ctx"],"sources":["../../../src/components/TplModal.vue","../../../src/components/TplModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). The backdrop is `h-full` too,\n through the bare `tpl` class, so it is `box-border`: the gutter then\n shrinks its content box instead of making it 32px taller than the\n box it covers. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:box-border tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). The backdrop is `h-full` too,\n through the bare `tpl` class, so it is `box-border`: the gutter then\n shrinks its content box instead of making it 32px taller than the\n box it covers. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:box-border tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;EAMA,IAAMqC,IAAQC,GAIRC,IAAOH,GAKPI,IAAYZ,EAAwB,IAAI,GACxCa,IAAYC,QAAeL,EAAM,OAAO;EAC9C,EAAaG,GAAWC,CAAS;EAEjC,IAAME,IAAa1B,EAAOgB,CAAY,GAWhCW,IAAc3B,EAAOe,GAAkB,IAAI,GAC3Ca,IAAcd,EAAe;EAEnC,SAASe,EAAc,GAA4B;GAIjD,AAHIC,EAAM,QAAQ,YAChBR,EAAK,OAAO,GAEdA,EAAK,WAAWQ,CAAK;EACvB;E,iBAIkB/C,EAAA6C,CAAA,KAAhB5C,EAAA,GAAAC,EAiFWC,GAAA;;GAjFmB,IAAIH,EAAA6C,CAAA;E,IAChCzC,EA+EaC,GAAA;GA9EX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAwCf,SAAAC,QAgCM,CA/BEgC,EAAA,WADRrC,EAAA,GAAAM,EAgCM,OAAA;;IA9BH,kBAAgBP,EAAA2C,CAAA;IACjB,OAAM;IACN,OAICnC,EAAA,CAJD;KAAA,oBAAA;KAAA,mBAAA;KAAA,2BAAA;IAAA,GAKQR,EAAA4C,CAAA,CAAW,CAAA;IAClB,SAAK,AAAAI,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;IAChB,WAASO;G,IAcVpC,EAMM,OAAA;IALA,SAAA;IAAJ,KAAI8B;IACJ,OAAM;IACL,SAAK,AAAAQ,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;G,IAEjB5B,EAAQsC,EAAA,QAAA,SAAA,C"}
1
+ {"version":3,"file":"TplModal-DE6BniBg.js","names":["_unref","_openBlock","_createBlock","_Teleport","_createVNode","_Transition","_withCtx","_createElementBlock","_normalizeStyle","_withModifiers","_createElementVNode","_renderSlot","_createCommentVNode","_sfc_main","defineComponent","openBlock","withCtx","inject","renderSlot","createElementBlock","unref","Teleport","createCommentVNode","createBlock","withModifiers","createBaseVNode","Transition","normalizeStyle","ref","createVNode","useFocusTrap","usePopoverRoot","THEME_STYLES_KEY","UI_THEME_KEY","_hoisted_1","TplModal_default","__emit","props","__props","emit","dialogRef","isVisible","computed","tplUiTheme","themeStyles","popoverRoot","handleKeydown","event","_cache","_ctx"],"sources":["../../../src/components/TplModal.vue","../../../src/components/TplModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). The backdrop is `h-full` too,\n through the bare `tpl` class, so it is `box-border`: the gutter then\n shrinks its content box instead of making it 32px taller than the\n box it covers. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:box-border tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n","<script setup lang=\"ts\">\nimport { useFocusTrap } from \"../composables\";\nimport { usePopoverRoot } from \"../composables/usePopoverRoot\";\nimport { THEME_STYLES_KEY, UI_THEME_KEY } from \"../keys\";\nimport { computed, inject, ref } from \"vue\";\n\nconst props = defineProps<{\n visible: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"close\"): void;\n (e: \"keydown\", event: KeyboardEvent): void;\n}>();\n\nconst dialogRef = ref<HTMLElement | null>(null);\nconst isVisible = computed(() => props.visible);\nuseFocusTrap(dialogRef, isVisible);\n\nconst tplUiTheme = inject(UI_THEME_KEY);\n\n// The backdrop below carries the bare `tpl` class, which re-declares every\n// `--tpl-*` token from the base `.tpl` rule. A custom property declared on an\n// element beats one inherited from an ancestor, so that re-declaration shadows\n// the consumer's `theme` config — which lives as inline styles on the editor\n// root — for this whole teleported subtree. Re-applying `themeStyles` here is\n// what restores it, and doing it on the backdrop covers every dialog rendered\n// through this wrapper rather than each one remembering to. `data-tpl-theme`\n// does the same job for the dark token block. See the invariant in\n// `tests/theme-token-scope.test.ts` (issue #487).\nconst themeStyles = inject(THEME_STYLES_KEY, null);\nconst popoverRoot = usePopoverRoot();\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Escape\") {\n emit(\"close\");\n }\n emit(\"keydown\", event);\n}\n</script>\n\n<template>\n <Teleport v-if=\"popoverRoot\" :to=\"popoverRoot\">\n <Transition\n enter-active-class=\"tpl:transition\"\n enter-from-class=\"tpl:opacity-0\"\n enter-to-class=\"tpl:opacity-100\"\n leave-active-class=\"tpl:transition tpl:duration-100\"\n leave-from-class=\"tpl:opacity-100\"\n leave-to-class=\"tpl:opacity-0\"\n >\n <!-- The backdrop is the reference box every slotted panel caps against,\n which is why it owns the gutter (`p-4`) rather than each panel\n carrying its own margin. `inset-0` gives it a definite height; the\n wrapper below spans that height so a panel's percentage cap\n (`max-h-[90%]` / `max-h-[80%]`) has an unbroken chain to resolve\n through. Those numbers are the `vh` values they replaced, so an\n untrapped editor renders exactly as before.\n\n Panels must never cap in `vh`. `fixed` covers the viewport only while\n nothing traps it, and an ancestor with `transform`, `filter`,\n `backdrop-filter`, `will-change: transform`, `contain: paint`,\n `container-type` or a transform animation becomes the containing\n block for fixed descendants. The editor is embedded in someone\n else's page, so any of those can sit above it: `inset-0` then\n resolves to that ancestor's box while a `vh` cap still resolves to\n the viewport, and the panel overflows a container that usually also\n has `overflow: hidden`. That is issue #575 — in a 420px host inside a\n 720px viewport, a 648px panel clipped ~113px off both the top and the\n bottom, with no scrollbar to reach the buttons. Capping against the\n backdrop is self-correcting whether or not the trap is present.\n Locked by `tests/overlay-height-scope.test.ts`.\n\n The padding belongs here and not on the wrapper: preflight is\n omitted, so non-form elements keep `content-box` and padding on an\n `h-full` element would add to 100% and overflow by exactly the\n padding (the trap behind issue #115). The backdrop is `h-full` too,\n through the bare `tpl` class, so it is `box-border`: the gutter then\n shrinks its content box instead of making it 32px taller than the\n box it covers. -->\n <!-- `z-10` is the one z-index inside `.tpl-popover-root` that has to be\n real. The root is a single stacking context, so its residents\n otherwise paint in teleport-anchor order — and this modal's anchor is\n established when the editor mounts, while a link dialog's is\n established later, when a paragraph enters edit mode. Without a\n number, a picker opened FROM that dialog renders behind it. Any\n positive value beats the `auto` siblings; 10 stays far below the\n suggestion popup (9999) and `SmallScreenNotice` (10001), and cannot\n escape the root's own 10000 either way. -->\n <div\n v-if=\"visible\"\n :data-tpl-theme=\"tplUiTheme\"\n class=\"tpl tpl:fixed tpl:inset-0 tpl:z-10 tpl:box-border tpl:flex tpl:items-center tpl:justify-center tpl:p-4\"\n style=\"\n background-color: var(--tpl-overlay);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n \"\n :style=\"themeStyles\"\n @click.self=\"emit('close')\"\n @keydown=\"handleKeydown\"\n >\n <!-- `h-full` only, deliberately no `w-full`: height is what has to\n become definite, and widening this element would change what\n `w-full` on a panel resolves against. Panels are shrink-to-fit\n horizontally — the test-email dialog stays compact until its\n preview opens, and the saved-blocks browser pins an explicit width\n precisely because this wrapper is shrink-to-fit. Constraining one\n axis leaves all of that intact.\n\n It repeats `@click.self` because it now covers the backdrop's full\n height: clicks in the gap above or below the panel land here, so\n without it click-outside-to-close would only work on the padding\n ring and the columns either side. -->\n <div\n ref=\"dialogRef\"\n class=\"tpl:flex tpl:h-full tpl:items-center tpl:justify-center\"\n @click.self=\"emit('close')\"\n >\n <slot />\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n"],"mappings":";;;;;;;;;;EAMA,IAAMqC,IAAQC,GAIRC,IAAOH,GAKPI,IAAYZ,EAAwB,IAAI,GACxCa,IAAYC,QAAeL,EAAM,OAAO;EAC9C,EAAaG,GAAWC,CAAS;EAEjC,IAAME,IAAa1B,EAAOgB,CAAY,GAWhCW,IAAc3B,EAAOe,GAAkB,IAAI,GAC3Ca,IAAcd,EAAe;EAEnC,SAASe,EAAc,GAA4B;GAIjD,AAHIC,EAAM,QAAQ,YAChBR,EAAK,OAAO,GAEdA,EAAK,WAAWQ,CAAK;EACvB;E,iBAIkB/C,EAAA6C,CAAA,KAAhB5C,EAAA,GAAAC,EAiFWC,GAAA;;GAjFmB,IAAIH,EAAA6C,CAAA;E,IAChCzC,EA+EaC,GAAA;GA9EX,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;GACf,sBAAmB;GACnB,oBAAiB;GACjB,kBAAe;;GAwCf,SAAAC,QAgCM,CA/BEgC,EAAA,WADRrC,EAAA,GAAAM,EAgCM,OAAA;;IA9BH,kBAAgBP,EAAA2C,CAAA;IACjB,OAAM;IACN,OAICnC,EAAA,CAJD;KAAA,oBAAA;KAAA,mBAAA;KAAA,2BAAA;IAAA,GAKQR,EAAA4C,CAAA,CAAW,CAAA;IAClB,SAAK,AAAAI,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;IAChB,WAASO;G,IAcVpC,EAMM,OAAA;IALA,SAAA;IAAJ,KAAI8B;IACJ,OAAM;IACL,SAAK,AAAAQ,EAAA,OAAAvC,GAAA,MAAO8B,EAAI,OAAA,GAAA,CAAA,MAAA,CAAA;G,IAEjB5B,EAAQsC,EAAA,QAAA,SAAA,C"}
@@ -1,6 +1,6 @@
1
1
  import { C as e, F as t, G as n, L as r, O as i, _ as a, b as o, ct as s, dt as c, g as l, l as u, m as d, mt as f, n as p, p as m, tt as h, u as g, x as _ } from "./draggable-IRVFEZ-b.js";
2
2
  import { t as v } from "./dist-zu1jwYIS.js";
3
- import { Bt as y, Nt as b, Rt as x, at as S, zt as C } from "./icons-Cl4oR2mf.js";
3
+ import { Bt as y, Nt as b, Rt as x, at as S, zt as C } from "./icons-C7vjUBLn.js";
4
4
  import { t as w } from "./useI18n-CSf-ZpcM.js";
5
5
  import { t as ee } from "./formatAbsoluteDateTime-Ck2_zXra.js";
6
6
  import { t as T } from "./formatRelativeTime-BTD8Ktt-.js";
@@ -146,4 +146,4 @@ var D = [
146
146
  });
147
147
  export { B as default };
148
148
 
149
- //# sourceMappingURL=VersionHistoryMenu-BNPxnWiO.js.map
149
+ //# sourceMappingURL=VersionHistoryMenu-BBYU71Ua.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionHistoryMenu-BNPxnWiO.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_withModifiers","_createVNode","_normalizeClass","_Transition","_withCtx","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_sfc_main","defineComponent","openBlock","withCtx","renderList","inject","createElementBlock","createTextVNode","unref","normalizeClass","createCommentVNode","withModifiers","createBaseVNode","toDisplayString","Transition","computed","ref","Fragment","createVNode","onClickOutside","ChevronDown","Clock","ChevronRight","LoaderCircle","ChevronLeft","useI18n","formatAbsoluteDateTime","formatRelativeTime","UI_LOCALE_KEY","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","VersionHistoryMenu_default","__emit","props","__props","emit","uiLocale","isOpen","dropdownRef","currentIndex","v","canGoNewer","canGoOlder","goNewer","goOlder","toggleDropdown","selectVersion","version","formatDate","result","dateString","t","format"],"sources":["../../../src/components/VersionHistoryMenu.vue","../../../src/components/VersionHistoryMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"VersionHistoryMenu-BBYU71Ua.js","names":["_openBlock","_createElementBlock","_createElementVNode","_unref","_withModifiers","_createVNode","_normalizeClass","_Transition","_withCtx","_toDisplayString","_Fragment","_renderList","_createCommentVNode","_createTextVNode","_sfc_main","defineComponent","openBlock","withCtx","renderList","inject","createElementBlock","createTextVNode","unref","normalizeClass","createCommentVNode","withModifiers","createBaseVNode","toDisplayString","Transition","computed","ref","Fragment","createVNode","onClickOutside","ChevronDown","Clock","ChevronRight","LoaderCircle","ChevronLeft","useI18n","formatAbsoluteDateTime","formatRelativeTime","UI_LOCALE_KEY","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","VersionHistoryMenu_default","__emit","props","__props","emit","uiLocale","isOpen","dropdownRef","currentIndex","v","canGoNewer","canGoOlder","goNewer","goOlder","toggleDropdown","selectVersion","version","formatDate","result","dateString","t","format"],"sources":["../../../src/components/VersionHistoryMenu.vue","../../../src/components/VersionHistoryMenu.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * The header's version-history control: step older / newer through the list, or\n * open the dropdown and jump straight to one.\n *\n * Shared by both editors. Reads the `TemplateVersion` contract, so any\n * provider drives it.\n */\nimport { computed, inject, ref } from \"vue\";\nimport { onClickOutside } from \"@vueuse/core\";\nimport {\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Clock,\n LoaderCircle,\n} from \"@lucide/vue\";\nimport type { TemplateVersion } from \"@templatical/types\";\nimport { useI18n } from \"../composables/useI18n\";\nimport { formatAbsoluteDateTime } from \"../utils/formatAbsoluteDateTime\";\nimport { formatRelativeTime } from \"../utils/formatRelativeTime\";\nimport { UI_LOCALE_KEY } from \"../keys\";\n\nconst props = defineProps<{\n versions: TemplateVersion[];\n isLoading: boolean;\n isRestoring: boolean;\n /** Which version is on the canvas, or `null` while editing normally. */\n previewingId: string | null;\n}>();\n\nconst emit = defineEmits<{\n (e: \"open\"): void;\n (e: \"navigate\", version: TemplateVersion): void;\n}>();\n\nconst { t, format } = useI18n();\nconst uiLocale = inject(UI_LOCALE_KEY, undefined);\n\nconst isOpen = ref(false);\nconst dropdownRef = ref<HTMLElement | null>(null);\n\n/**\n * Position in the list (0 = newest), derived from what is actually previewed\n * rather than tracked locally. A local index went stale the moment the user\n * cancelled a preview — the arrows then stepped from wherever they had left off\n * instead of from the top.\n */\nconst currentIndex = computed(() =>\n props.previewingId === null\n ? -1\n : props.versions.findIndex((v) => v.id === props.previewingId),\n);\n\nconst canGoNewer = computed(\n () => currentIndex.value > 0 && !props.isRestoring && !props.isLoading,\n);\n\nconst canGoOlder = computed(\n () =>\n currentIndex.value < props.versions.length - 1 &&\n props.versions.length > 0 &&\n !props.isRestoring &&\n !props.isLoading,\n);\n\nfunction goNewer(): void {\n if (!canGoNewer.value) return;\n emit(\"navigate\", props.versions[currentIndex.value - 1]);\n}\n\nfunction goOlder(): void {\n if (!canGoOlder.value) return;\n emit(\"navigate\", props.versions[currentIndex.value + 1]);\n}\n\nfunction toggleDropdown(): void {\n isOpen.value = !isOpen.value;\n // Always on open, never only when empty: history grows behind the user's back\n // (every save may record one), so a list fetched once would go stale silently.\n if (isOpen.value) emit(\"open\");\n}\n\nfunction selectVersion(version: TemplateVersion): void {\n emit(\"navigate\", version);\n isOpen.value = false;\n}\n\nfunction formatDate(dateString: string): string {\n const result = formatRelativeTime(dateString, t.time, format, 7);\n if (result !== null) return result;\n\n // Past the relative window, `Intl` builds the label — in the EDITOR's locale,\n // not the browser's, which is what put \"Mar 4\" in a German menu.\n return formatAbsoluteDateTime(dateString, uiLocale, {\n month: \"short\",\n day: \"numeric\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n}\n\nonClickOutside(dropdownRef, () => {\n isOpen.value = false;\n});\n</script>\n\n<template>\n <div\n ref=\"dropdownRef\"\n class=\"tpl:relative tpl:flex tpl:items-center tpl:gap-0.5\"\n data-testid=\"version-history\"\n >\n <!-- Step to an older version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-older\"\n :disabled=\"!canGoOlder\"\n :title=\"t.versionHistory.olderVersion\"\n :aria-label=\"t.versionHistory.olderVersion\"\n @click.stop=\"goOlder\"\n >\n <ChevronLeft :size=\"14\" :stroke-width=\"2\" />\n </button>\n\n <!-- History dropdown toggle -->\n <button\n class=\"tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-toggle\"\n :aria-expanded=\"isOpen\"\n :title=\"t.versionHistory.tooltip\"\n :aria-label=\"t.versionHistory.tooltip\"\n @click.stop=\"toggleDropdown\"\n >\n <Clock :size=\"16\" :stroke-width=\"1.5\" />\n <ChevronDown\n class=\"tpl:transition-transform\"\n :class=\"{ 'tpl:rotate-180': isOpen }\"\n :size=\"10\"\n :stroke-width=\"2\"\n />\n </button>\n\n <Transition name=\"tpl-dropdown\">\n <div\n v-if=\"isOpen\"\n class=\"tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]\"\n data-testid=\"version-history-dropdown\"\n >\n <div\n class=\"tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]\"\n >\n {{ t.versionHistory.dropdownTitle }}\n </div>\n\n <div\n v-if=\"isLoading && versions.length === 0\"\n class=\"tpl:flex tpl:items-center tpl:justify-center tpl:py-8\"\n role=\"status\"\n aria-busy=\"true\"\n >\n <LoaderCircle\n class=\"tpl:animate-spin tpl:text-[var(--tpl-primary)]\"\n :size=\"20\"\n :stroke-width=\"2\"\n />\n </div>\n\n <div\n v-else-if=\"versions.length === 0\"\n class=\"tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-empty\"\n >\n {{ t.versionHistory.empty }}\n </div>\n\n <div v-else class=\"tpl:max-h-64 tpl:overflow-y-auto\">\n <button\n v-for=\"version in versions\"\n :key=\"version.id\"\n class=\"tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-l-2 tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:hover:border-l-[var(--tpl-primary)] tpl:hover:bg-[var(--tpl-bg-hover)]\"\n :class=\"\n version.id === previewingId\n ? 'tpl:border-l-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg-active)]'\n : 'tpl:border-l-transparent'\n \"\n style=\"background-color: transparent\"\n data-testid=\"version-history-entry\"\n :data-version-id=\"version.id\"\n :disabled=\"isRestoring\"\n @click=\"selectVersion(version)\"\n >\n <div class=\"tpl:flex tpl:flex-col tpl:gap-0.5\">\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]\"\n >\n <span>{{\n version.label ?? formatDate(version.createdAt)\n }}</span>\n <span\n v-if=\"version.isAutomatic\"\n class=\"tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-xs tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]\"\n >\n {{ t.versionHistory.auto }}\n </span>\n </div>\n <!-- A labelled version still shows when it was taken, and by whom\n if the store tracks that; an unlabelled one already leads with\n the date, so the line would repeat it. -->\n <div\n v-if=\"version.label || version.author?.name\"\n class=\"tpl:text-xs tpl:text-[var(--tpl-text-muted)]\"\n >\n <template v-if=\"version.label\">{{\n formatDate(version.createdAt)\n }}</template>\n <template v-if=\"version.label && version.author?.name\">\n ·\n </template>\n <template v-if=\"version.author?.name\">{{\n version.author.name\n }}</template>\n </div>\n </div>\n </button>\n </div>\n </div>\n </Transition>\n\n <!-- Step to a newer version -->\n <button\n class=\"tpl:flex tpl:size-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-30 tpl:disabled:hover:bg-transparent tpl:text-[var(--tpl-text-muted)]\"\n data-testid=\"version-history-newer\"\n :disabled=\"!canGoNewer\"\n :title=\"t.versionHistory.newerVersion\"\n :aria-label=\"t.versionHistory.newerVersion\"\n @click.stop=\"goNewer\"\n >\n <ChevronRight :size=\"14\" :stroke-width=\"2\" />\n </button>\n </div>\n</template>\n"],"mappings":"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"}
@@ -4,7 +4,7 @@ var c = /* @__PURE__ */ e({
4
4
  __name: "VersionHistoryPanels",
5
5
  props: { feature: {} },
6
6
  setup(e) {
7
- let c = e, l = n(() => import("./VersionPreviewBanner-BldFvgxJ.js")), u = n(() => import("./RestoreVersionDialog-Dt_0qOOW.js"));
7
+ let c = e, l = n(() => import("./VersionPreviewBanner-tBz-3lGg.js")), u = n(() => import("./RestoreVersionDialog-B7eTijWD.js"));
8
8
  async function d() {
9
9
  try {
10
10
  await c.feature.requestRestore();
@@ -43,4 +43,4 @@ var c = /* @__PURE__ */ e({
43
43
  });
44
44
  export { c as default };
45
45
 
46
- //# sourceMappingURL=VersionHistoryPanels-CieY91f0.js.map
46
+ //# sourceMappingURL=VersionHistoryPanels-mMMqnf3O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionHistoryPanels-CieY91f0.js","names":["_openBlock","_createElementBlock","_Fragment","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","defineAsyncComponent","createElementBlock","unref","createCommentVNode","createBlock","Fragment","VersionHistoryPanels_default","props","__props","VersionPreviewBanner","RestoreVersionDialog","handleRequestRestore","handleSaveAndRestore","handleDiscardAndRestore","_cache"],"sources":["../../../src/components/VersionHistoryPanels.vue","../../../src/components/VersionHistoryPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n"],"mappings":";;;;;;EAkBA,IAAMgB,IAAQC,GAIRC,IAAuBT,QACrB,OAAO,qCACf,GAGMU,IAAuBV,QACrB,OAAO,qCACf;EAOA,eAAeW,IAAsC;GACnD,IAAI;IACF,MAAMJ,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeK,IAAsC;GACnD,IAAI;IACF,MAAML,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeM,IAAyC;GACtD,IAAI;IACF,MAAMN,EAAM,QAAQ,kBAAkB;GACxC,QAAQ,CAER;EACF;E,mCAKUC,EAAA,QAAQ,aAAa,SAD7BjB,EAAA,GAAAG,EAMEC,EAAAc,CAAA,GAAA;;GAJC,SAASD,EAAA,QAAQ,aAAa;GAC9B,eAAaA,EAAA,QAAQ,WAAW;GAChC,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,cAAa;GAC7B,WAASG;E,sDAIJH,EAAA,QAAQ,oBAAoB,SADpCjB,EAAA,GAAAG,EAQEC,EAAAe,CAAA,GAAA;;GANC,SAASF,EAAA,QAAQ,oBAAoB;GACrC,YAAUA,EAAA,QAAQ,qBAAqB;GACvC,WAASA,EAAA,QAAQ,cAAc;GAC/B,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,qBAAoB;GACpC,kBAAkBI;GAClB,qBAAqBC"}
1
+ {"version":3,"file":"VersionHistoryPanels-mMMqnf3O.js","names":["_openBlock","_createElementBlock","_Fragment","_createBlock","_unref","_createCommentVNode","_sfc_main","defineComponent","openBlock","defineAsyncComponent","createElementBlock","unref","createCommentVNode","createBlock","Fragment","VersionHistoryPanels_default","props","__props","VersionPreviewBanner","RestoreVersionDialog","handleRequestRestore","handleSaveAndRestore","handleDiscardAndRestore","_cache"],"sources":["../../../src/components/VersionHistoryPanels.vue","../../../src/components/VersionHistoryPanels.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n","<script setup lang=\"ts\">\n/**\n * Mount point for the version-history chrome that sits outside the header,\n * shared by the OSS and Cloud editors.\n *\n * Same shape as `SavedBlocksPanels.vue` / `TestEmailPanel.vue`: everything here\n * is `defineAsyncComponent` behind a `v-if` on its own state, and the editors in\n * turn lazy-load *this* wrapper and render it only when a\n * `VersionHistoryProvider` is configured — so a consumer without one downloads\n * none of it.\n *\n * The header's dropdown control is not here for one reason only: it has to sit\n * in the header's centre column. It is lazily imported at those two sites\n * instead, and covered by the same CDN chunk guard.\n */\nimport { defineAsyncComponent } from \"vue\";\nimport type { UseVersionHistoryFeatureReturn } from \"../composables/useVersionHistoryFeature\";\n\nconst props = defineProps<{\n feature: UseVersionHistoryFeatureReturn;\n}>();\n\nconst VersionPreviewBanner = defineAsyncComponent(\n () => import(\"./VersionPreviewBanner.vue\"),\n);\n// Its own chunk, fetched only if a restore is attempted with unsaved work —\n// which for a Cloud session (autosave on) is the uncommon case.\nconst RestoreVersionDialog = defineAsyncComponent(\n () => import(\"./RestoreVersionDialog.vue\"),\n);\n\n/**\n * Every action here swallows its rejection: the feature already reported it\n * through `onError` and rolled the canvas back, and an unhandled rejection out\n * of a DOM event binding helps nobody.\n */\nasync function handleRequestRestore(): Promise<void> {\n try {\n await props.feature.requestRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleSaveAndRestore(): Promise<void> {\n try {\n await props.feature.saveAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n\nasync function handleDiscardAndRestore(): Promise<void> {\n try {\n await props.feature.discardAndRestore();\n } catch {\n /* reported through onError */\n }\n}\n</script>\n\n<template>\n <VersionPreviewBanner\n v-if=\"feature.isPreviewing.value\"\n :visible=\"feature.isPreviewing.value\"\n :can-restore=\"feature.canRestore.value\"\n @cancel=\"feature.cancelPreview()\"\n @confirm=\"handleRequestRestore\"\n />\n\n <RestoreVersionDialog\n v-if=\"feature.isConfirmingRestore.value\"\n :visible=\"feature.isConfirmingRestore.value\"\n :can-save=\"feature.canSaveBeforeRestore.value\"\n :is-busy=\"feature.isConfirmBusy.value\"\n @cancel=\"feature.cancelRestoreConfirm()\"\n @save-and-restore=\"handleSaveAndRestore\"\n @discard-and-restore=\"handleDiscardAndRestore\"\n />\n</template>\n"],"mappings":";;;;;;EAkBA,IAAMgB,IAAQC,GAIRC,IAAuBT,QACrB,OAAO,qCACf,GAGMU,IAAuBV,QACrB,OAAO,qCACf;EAOA,eAAeW,IAAsC;GACnD,IAAI;IACF,MAAMJ,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeK,IAAsC;GACnD,IAAI;IACF,MAAML,EAAM,QAAQ,eAAe;GACrC,QAAQ,CAER;EACF;EAEA,eAAeM,IAAyC;GACtD,IAAI;IACF,MAAMN,EAAM,QAAQ,kBAAkB;GACxC,QAAQ,CAER;EACF;E,mCAKUC,EAAA,QAAQ,aAAa,SAD7BjB,EAAA,GAAAG,EAMEC,EAAAc,CAAA,GAAA;;GAJC,SAASD,EAAA,QAAQ,aAAa;GAC9B,eAAaA,EAAA,QAAQ,WAAW;GAChC,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,cAAa;GAC7B,WAASG;E,sDAIJH,EAAA,QAAQ,oBAAoB,SADpCjB,EAAA,GAAAG,EAQEC,EAAAe,CAAA,GAAA;;GANC,SAASF,EAAA,QAAQ,oBAAoB;GACrC,YAAUA,EAAA,QAAQ,qBAAqB;GACvC,WAASA,EAAA,QAAQ,cAAc;GAC/B,UAAM,AAAAM,EAAA,QAAA,MAAEN,EAAA,QAAQ,qBAAoB;GACpC,kBAAkBI;GAClB,qBAAqBC"}
@@ -1,6 +1,6 @@
1
1
  import { C as e, F as t, _ as n, ct as r, dt as i, g as a, m as o, mt as s, x as c } from "./draggable-IRVFEZ-b.js";
2
2
  import { b as l, p as u } from "./styleConstants-CgiNKdnc.js";
3
- import { Nt as d } from "./icons-Cl4oR2mf.js";
3
+ import { Nt as d } from "./icons-C7vjUBLn.js";
4
4
  import { t as f } from "./useI18n-CSf-ZpcM.js";
5
5
  // src/components/VersionPreviewBanner.vue?vue&type=script&setup=true&lang.ts
6
6
  var p = {
@@ -36,4 +36,4 @@ var p = {
36
36
  });
37
37
  export { g as default };
38
38
 
39
- //# sourceMappingURL=VersionPreviewBanner-BldFvgxJ.js.map
39
+ //# sourceMappingURL=VersionPreviewBanner-tBz-3lGg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPreviewBanner-BldFvgxJ.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","defineComponent","openBlock","createElementBlock","unref","normalizeClass","createCommentVNode","createBaseVNode","toDisplayString","createVNode","primaryBtnClass","ghostBtnClass","Clock","useI18n","_hoisted_1","_hoisted_2","_hoisted_3","VersionPreviewBanner_default","__emit","emit","__props","t","_cache"],"sources":["../../../src/components/VersionPreviewBanner.vue","../../../src/components/VersionPreviewBanner.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuBA,IAAM2B,IAAOD,GAKP,EAAE,SAAML,EAAQ;E,iBAKZO,EAAA,WADR5B,EAAA,GAAAC,EAkCM,OAlCNqB,GAkCM,CA5BJpB,EASM,OATNqB,GASM,CANJpB,EAIEC,EAAAgB,CAAA,GAAA;GAHC,MAAM;GACN,gBAAc;GACf,OAAM;E,IAERlB,EAA2C,QAAA,MAAAG,EAAlCD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,C,IAEnC3B,EAiBM,OAjBNsB,GAiBM,CAhBJtB,EAOS,UAAA;GANN,OAAKI,EAAEF,EAAAe,CAAA,CAAa;GACrB,OAAA,EAAA,oBAAA,cAAA;GACA,eAAY;GACX,SAAK,AAAAW,EAAA,QAAA,MAAEH,EAAI,QAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,MAAM,GAAA,CAAA,GAGpBD,EAAA,cADR5B,EAAA,GAAAC,EAOS,UAAA;;GALN,OAAKK,EAAEF,EAAAc,CAAA,CAAe;GACvB,eAAY;GACX,SAAK,AAAAY,EAAA,QAAA,MAAEH,EAAI,SAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,K"}
1
+ {"version":3,"file":"VersionPreviewBanner-tBz-3lGg.js","names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_toDisplayString","_normalizeClass","_createCommentVNode","_sfc_main","defineComponent","openBlock","createElementBlock","unref","normalizeClass","createCommentVNode","createBaseVNode","toDisplayString","createVNode","primaryBtnClass","ghostBtnClass","Clock","useI18n","_hoisted_1","_hoisted_2","_hoisted_3","VersionPreviewBanner_default","__emit","emit","__props","t","_cache"],"sources":["../../../src/components/VersionPreviewBanner.vue","../../../src/components/VersionPreviewBanner.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport { ghostBtnClass, primaryBtnClass } from \"../constants/styleConstants\";\n/**\n * Shown while a past version is on the canvas instead of the user's own work.\n * Cancel puts the pre-preview content back; Restore makes the version current.\n *\n * Lives outside `src/cloud/` because version history is a BYO provider, not a\n * Cloud feature — a consumer's own `versionHistory` provider drives this banner\n * with no Cloud involved.\n */\nimport { Clock } from \"@lucide/vue\";\nimport { useI18n } from \"../composables/useI18n\";\n\ndefineProps<{\n visible: boolean;\n /**\n * Whether the provider supplied `restore`. When it didn't, history is\n * browse-and-preview only, so the confirm action does not render at all\n * rather than rendering disabled — the same discipline saved blocks uses.\n */\n canRestore: boolean;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n (e: \"confirm\"): void;\n}>();\n\nconst { t } = useI18n();\n</script>\n\n<template>\n <div\n v-if=\"visible\"\n class=\"tpl-preview-banner tpl:flex tpl:flex-wrap tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]\"\n data-testid=\"version-preview-banner\"\n role=\"status\"\n >\n <div\n class=\"tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]\"\n >\n <Clock\n :size=\"18\"\n :stroke-width=\"2\"\n class=\"tpl:text-[var(--tpl-primary)]\"\n />\n <span>{{ t.versionPreview.message }}</span>\n </div>\n <div class=\"tpl:flex tpl:items-center tpl:gap-2\">\n <button\n :class=\"ghostBtnClass\"\n style=\"background-color: transparent\"\n data-testid=\"version-preview-cancel\"\n @click=\"emit('cancel')\"\n >\n {{ t.versionPreview.cancel }}\n </button>\n <button\n v-if=\"canRestore\"\n :class=\"primaryBtnClass\"\n data-testid=\"version-preview-restore\"\n @click=\"emit('confirm')\"\n >\n {{ t.versionPreview.restore }}\n </button>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuBA,IAAM2B,IAAOD,GAKP,EAAE,SAAML,EAAQ;E,iBAKZO,EAAA,WADR5B,EAAA,GAAAC,EAkCM,OAlCNqB,GAkCM,CA5BJpB,EASM,OATNqB,GASM,CANJpB,EAIEC,EAAAgB,CAAA,GAAA;GAHC,MAAM;GACN,gBAAc;GACf,OAAM;E,IAERlB,EAA2C,QAAA,MAAAG,EAAlCD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,C,IAEnC3B,EAiBM,OAjBNsB,GAiBM,CAhBJtB,EAOS,UAAA;GANN,OAAKI,EAAEF,EAAAe,CAAA,CAAa;GACrB,OAAA,EAAA,oBAAA,cAAA;GACA,eAAY;GACX,SAAK,AAAAW,EAAA,QAAA,MAAEH,EAAI,QAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,MAAM,GAAA,CAAA,GAGpBD,EAAA,cADR5B,EAAA,GAAAC,EAOS,UAAA;;GALN,OAAKK,EAAEF,EAAAc,CAAA,CAAe;GACvB,eAAY;GACX,SAAK,AAAAY,EAAA,QAAA,MAAEH,EAAI,SAAA;EAET,GAAAtB,EAAAD,EAAAyB,CAAA,CAAC,CAAC,eAAe,OAAO,GAAA,CAAA,K"}
@@ -1,8 +1,8 @@
1
1
  import { B as e, C as t, F as n, H as r, L as i, O as a, _ as o, ct as s, dt as c, h as l, p as u, pt as d, u as f } from "./draggable-IRVFEZ-b.js";
2
- import { C as p, D as m, O as h, S as g, T as _ } from "./composables-CUIiW9OD.js";
3
- import { H as v } from "./src-CdVAke9t.js";
2
+ import { C as p, D as m, O as h, S as g, T as _ } from "./composables-CkthyXi9.js";
3
+ import { H as v } from "./src-CVHGPKSW.js";
4
4
  import { B as y, C as b, T as x, l as S, v as C } from "./keys-BQqbBUag.js";
5
- import { S as w, o as T, w as E } from "./socialIcons-C_yggK1_.js";
5
+ import { S as w, o as T, w as E } from "./socialIcons-CkgQUpim.js";
6
6
  // src/components/blocks/WrapperBlock.vue?vue&type=script&setup=true&lang.ts
7
7
  var D = ["data-block-id"], O = ["data-block-id"], k = /* @__PURE__ */ t({
8
8
  name: "WrapperBlock",
@@ -55,4 +55,4 @@ var D = ["data-block-id"], O = ["data-block-id"], k = /* @__PURE__ */ t({
55
55
  });
56
56
  export { k as t };
57
57
 
58
- //# sourceMappingURL=WrapperBlock-DtnRuKWE.js.map
58
+ //# sourceMappingURL=WrapperBlock-B9XxtFql.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WrapperBlock-DtnRuKWE.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_sfc_main","resolveDynamicComponent","defineComponent","openBlock","watch","renderList","inject","createElementBlock","unref","normalizeClass","createBlock","computed","normalizeStyle","Fragment","fullWidthFrameStyle","getWrapperStyle","resolveBlockComponent","backgroundImageHostClass","getCachedBlockWrapperStyle","SYNTAX_PRESETS","MERGE_TAG_SYNTAX_KEY","IMAGE_URL_RESOLVER_KEY","LAYOUT_KEY","BLOCK_REGISTRY_KEY","EDITOR_KEY","getBackgroundLookupUrl","matchImageBoxWidth","useResolvedBackgroundUrl","_hoisted_1","_hoisted_2","WrapperBlock_default","props","__props","blockRegistry","imageUrlResolver","syntax","editor","layout","bandBackgroundUrl","wrapperStyle","bandFrameStyle","childBackgroundUrls","url","child","urls","childBoxes","getBlockComponent","block","style"],"sources":["../../../src/components/blocks/WrapperBlock.vue","../../../src/components/blocks/WrapperBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n backgroundImageHostClass,\n fullWidthFrameStyle,\n getCachedBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { SYNTAX_PRESETS } from \"@templatical/types\";\nimport { computed, inject, watch } from \"vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n EDITOR_KEY,\n IMAGE_URL_RESOLVER_KEY,\n LAYOUT_KEY,\n MERGE_TAG_SYNTAX_KEY,\n} from \"../../keys\";\nimport { matchImageBoxWidth } from \"../../utils/imageRoom\";\nimport {\n getBackgroundLookupUrl,\n useResolvedBackgroundUrl,\n} from \"../../composables/useImageUrlResolver\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst bandBackgroundUrl = useResolvedBackgroundUrl(\n () => props.block.backgroundImage,\n);\n\nconst wrapperStyle = computed(\n () =>\n getWrapperStyle(props.block, {\n backgroundImageUrl: bandBackgroundUrl.value,\n }) ?? {},\n);\n\n// Same split as a section wrapper: the root is the bled band, this column is\n// the email width and carries the band's padding. Bound only while fullWidth\n// is on, so the frame is absent when the band is the email width.\nconst bandFrameStyle = computed(() =>\n fullWidthFrameStyle(props.block.styles.padding),\n);\n\n// A child section sits in a plain box here, not a BlockWrapper, so nothing else\n// resolves its background image. The lookups start from this band; each box\n// then paints the cached result (`getCachedBlockWrapperStyle`). Layout content\n// is configuration rather than typed input, so there is no debounce.\nconst childBackgroundUrls = computed(() =>\n props.block.children.flatMap((child) => {\n const url =\n child.type === \"section\"\n ? getBackgroundLookupUrl(child.backgroundImage, syntax)\n : undefined;\n return url ? [url] : [];\n }),\n);\nif (imageUrlResolver) {\n watch(\n childBackgroundUrls,\n (urls) => {\n for (const url of urls) imageUrlResolver.lookup(url);\n },\n { immediate: true },\n );\n}\n\nconst childBoxes = computed(() =>\n props.block.children.map((child) => ({\n child,\n style: getCachedBlockWrapperStyle(\n child,\n imageUrlResolver,\n syntax,\n matchImageBoxWidth(\n child,\n editor?.content.value,\n layout,\n editor?.activeLocale?.value ?? undefined,\n ),\n ),\n })),\n);\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div\n data-testid=\"layout-wrapper\"\n class=\"tpl-email-surface tpl:w-full\"\n :style=\"wrapperStyle\"\n :class=\"backgroundImageHostClass(wrapperStyle)\"\n >\n <div v-if=\"block.fullWidth\" class=\"tpl-band-frame\" :style=\"bandFrameStyle\">\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n <template v-else>\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n backgroundImageHostClass,\n fullWidthFrameStyle,\n getCachedBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { SYNTAX_PRESETS } from \"@templatical/types\";\nimport { computed, inject, watch } from \"vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n EDITOR_KEY,\n IMAGE_URL_RESOLVER_KEY,\n LAYOUT_KEY,\n MERGE_TAG_SYNTAX_KEY,\n} from \"../../keys\";\nimport { matchImageBoxWidth } from \"../../utils/imageRoom\";\nimport {\n getBackgroundLookupUrl,\n useResolvedBackgroundUrl,\n} from \"../../composables/useImageUrlResolver\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst bandBackgroundUrl = useResolvedBackgroundUrl(\n () => props.block.backgroundImage,\n);\n\nconst wrapperStyle = computed(\n () =>\n getWrapperStyle(props.block, {\n backgroundImageUrl: bandBackgroundUrl.value,\n }) ?? {},\n);\n\n// Same split as a section wrapper: the root is the bled band, this column is\n// the email width and carries the band's padding. Bound only while fullWidth\n// is on, so the frame is absent when the band is the email width.\nconst bandFrameStyle = computed(() =>\n fullWidthFrameStyle(props.block.styles.padding),\n);\n\n// A child section sits in a plain box here, not a BlockWrapper, so nothing else\n// resolves its background image. The lookups start from this band; each box\n// then paints the cached result (`getCachedBlockWrapperStyle`). Layout content\n// is configuration rather than typed input, so there is no debounce.\nconst childBackgroundUrls = computed(() =>\n props.block.children.flatMap((child) => {\n const url =\n child.type === \"section\"\n ? getBackgroundLookupUrl(child.backgroundImage, syntax)\n : undefined;\n return url ? [url] : [];\n }),\n);\nif (imageUrlResolver) {\n watch(\n childBackgroundUrls,\n (urls) => {\n for (const url of urls) imageUrlResolver.lookup(url);\n },\n { immediate: true },\n );\n}\n\nconst childBoxes = computed(() =>\n props.block.children.map((child) => ({\n child,\n style: getCachedBlockWrapperStyle(\n child,\n imageUrlResolver,\n syntax,\n matchImageBoxWidth(\n child,\n editor?.content.value,\n layout,\n editor?.activeLocale?.value ?? undefined,\n ),\n ),\n })),\n);\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div\n data-testid=\"layout-wrapper\"\n class=\"tpl-email-surface tpl:w-full\"\n :style=\"wrapperStyle\"\n :class=\"backgroundImageHostClass(wrapperStyle)\"\n >\n <div v-if=\"block.fullWidth\" class=\"tpl-band-frame\" :style=\"bandFrameStyle\">\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n <template v-else>\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EA8BA,IAAMwC,IAAQC,GAKRC,IAAgB3B,EAAOiB,GAAoB,IAAI,GAC/CW,IAAmB5B,EAAOe,GAAwB,IAAI,GACtDc,IAAS7B,EAAOc,GAAsBD,EAAe,MAAM,GAC3DiB,IAAS9B,EAAOkB,GAAY,IAAI,GAChCa,IAAS/B,EAAOgB,GAAY,KAAA,CAAS,GAErCgB,IAAoBX,QAClBI,EAAM,MAAM,eACpB,GAEMQ,IAAe5B,QAEjBI,EAAgBgB,EAAM,OAAO,EAC3B,oBAAoBO,EAAkB,MACxC,CAAC,KAAK,CAAC,CACX,GAKME,IAAiB7B,QACrBG,EAAoBiB,EAAM,MAAM,OAAO,OAAO,CAChD,GAMMU,IAAsB9B,QAC1BoB,EAAM,MAAM,SAAS,SAAS,MAAU;GACtC,IAAMW,IACJC,EAAM,SAAS,YACXlB,EAAuBkB,EAAM,iBAAiBR,CAAM,IACpD,KAAA;GACN,OAAOO,IAAM,CAACA,CAAG,IAAI,CAAC;EACxB,CAAC,CACH;EACA,AAAIR,KACF9B,EACEqC,IACC,MAAS;GACR,KAAK,IAAMC,KAAOE,GAAM,EAAiB,OAAOF,CAAG;EACrD,GACA,EAAE,WAAW,GAAK,CACpB;EAGF,IAAMG,IAAalC,QACjBoB,EAAM,MAAM,SAAS,KAAK,OAAW;GACnC;GACA,OAAOb,EACLyB,GACAT,GACAC,GACAT,EACEiB,GACAP,GAAQ,QAAQ,OAChBC,GACAD,GAAQ,cAAc,SAAS,KAAA,CACjC,CACF;EACF,EAAE,CACJ;EAEA,SAASU,EAAkB,GAAc;GAIvC,OAAO9B,EAAsB+B,GAAOd,GAAe,CAAC,CAAC;EACvD;E,kBAIE1C,EAAA,GAAAC,EAoCM,OAAA;GAnCJ,eAAY;GACZ,OAAKC,EAAA,CAAC,gCAEEC,EAAAuB,CAAA,CAAwB,CAACsB,EAAA,KAAY,CAAA,CAAA;GAD5C,OAAK5C,EAAE4C,EAAA,KAAY;E,IAGTP,EAAA,MAAM,aAAjBzC,EAAA,GAAAC,EAcM,OAAA;;GAdsB,OAAM;GAAkB,OAAKG,EAAE6C,EAAA,KAAc;E,KACvEjD,EAAA,EAAA,GAAAC,EAYMI,GAAA,MAAAC,EAXuBgD,EAAA,QAAU,EAA5B,UAAO,gBADlBtD,EAAA,GAAAC,EAYM,OAAA;GAVH,KAAKmD,EAAM;GACX,iBAAeA,EAAM;GACrB,OAAKhD,EAAEqD,CAAK;GACZ,OAAKvD,EAAEC,EAAAuB,CAAA,CAAwB,CAAC+B,CAAK,CAAA;E,KAEtCzD,EAAA,GAAAO,EAIEC,EAHK+C,EAAkBH,CAAK,CAAA,GAAA;GAC3B,OAAOA;GACP,UAAUX,EAAA;E,+DAKfzC,EAAA,EAAA,GAAAC,EAYMI,GAAA,EAAA,KAAA,EAAA,GAAAC,EAXuBgD,EAAA,QAAU,EAA5B,UAAO,gBADlBtD,EAAA,GAAAC,EAYM,OAAA;GAVH,KAAKmD,EAAM;GACX,iBAAeA,EAAM;GACrB,OAAKhD,EAAEqD,CAAK;GACZ,OAAKvD,EAAEC,EAAAuB,CAAA,CAAwB,CAAC+B,CAAK,CAAA;E,KAEtCzD,EAAA,GAAAO,EAIEC,EAHK+C,EAAkBH,CAAK,CAAA,GAAA;GAC3B,OAAOA;GACP,UAAUX,EAAA"}
1
+ {"version":3,"file":"WrapperBlock-B9XxtFql.js","names":["_openBlock","_createElementBlock","_normalizeClass","_unref","_normalizeStyle","_Fragment","_renderList","_createBlock","_resolveDynamicComponent","_sfc_main","resolveDynamicComponent","defineComponent","openBlock","watch","renderList","inject","createElementBlock","unref","normalizeClass","createBlock","computed","normalizeStyle","Fragment","fullWidthFrameStyle","getWrapperStyle","resolveBlockComponent","backgroundImageHostClass","getCachedBlockWrapperStyle","SYNTAX_PRESETS","MERGE_TAG_SYNTAX_KEY","IMAGE_URL_RESOLVER_KEY","LAYOUT_KEY","BLOCK_REGISTRY_KEY","EDITOR_KEY","getBackgroundLookupUrl","matchImageBoxWidth","useResolvedBackgroundUrl","_hoisted_1","_hoisted_2","WrapperBlock_default","props","__props","blockRegistry","imageUrlResolver","syntax","editor","layout","bandBackgroundUrl","wrapperStyle","bandFrameStyle","childBackgroundUrls","url","child","urls","childBoxes","getBlockComponent","block","style"],"sources":["../../../src/components/blocks/WrapperBlock.vue","../../../src/components/blocks/WrapperBlock.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n backgroundImageHostClass,\n fullWidthFrameStyle,\n getCachedBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { SYNTAX_PRESETS } from \"@templatical/types\";\nimport { computed, inject, watch } from \"vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n EDITOR_KEY,\n IMAGE_URL_RESOLVER_KEY,\n LAYOUT_KEY,\n MERGE_TAG_SYNTAX_KEY,\n} from \"../../keys\";\nimport { matchImageBoxWidth } from \"../../utils/imageRoom\";\nimport {\n getBackgroundLookupUrl,\n useResolvedBackgroundUrl,\n} from \"../../composables/useImageUrlResolver\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst bandBackgroundUrl = useResolvedBackgroundUrl(\n () => props.block.backgroundImage,\n);\n\nconst wrapperStyle = computed(\n () =>\n getWrapperStyle(props.block, {\n backgroundImageUrl: bandBackgroundUrl.value,\n }) ?? {},\n);\n\n// Same split as a section wrapper: the root is the bled band, this column is\n// the email width and carries the band's padding. Bound only while fullWidth\n// is on, so the frame is absent when the band is the email width.\nconst bandFrameStyle = computed(() =>\n fullWidthFrameStyle(props.block.styles.padding),\n);\n\n// A child section sits in a plain box here, not a BlockWrapper, so nothing else\n// resolves its background image. The lookups start from this band; each box\n// then paints the cached result (`getCachedBlockWrapperStyle`). Layout content\n// is configuration rather than typed input, so there is no debounce.\nconst childBackgroundUrls = computed(() =>\n props.block.children.flatMap((child) => {\n const url =\n child.type === \"section\"\n ? getBackgroundLookupUrl(child.backgroundImage, syntax)\n : undefined;\n return url ? [url] : [];\n }),\n);\nif (imageUrlResolver) {\n watch(\n childBackgroundUrls,\n (urls) => {\n for (const url of urls) imageUrlResolver.lookup(url);\n },\n { immediate: true },\n );\n}\n\nconst childBoxes = computed(() =>\n props.block.children.map((child) => ({\n child,\n style: getCachedBlockWrapperStyle(\n child,\n imageUrlResolver,\n syntax,\n matchImageBoxWidth(\n child,\n editor?.content.value,\n layout,\n editor?.activeLocale?.value ?? undefined,\n ),\n ),\n })),\n);\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div\n data-testid=\"layout-wrapper\"\n class=\"tpl-email-surface tpl:w-full\"\n :style=\"wrapperStyle\"\n :class=\"backgroundImageHostClass(wrapperStyle)\"\n >\n <div v-if=\"block.fullWidth\" class=\"tpl-band-frame\" :style=\"bandFrameStyle\">\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n <template v-else>\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </template>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport {\n backgroundImageHostClass,\n fullWidthFrameStyle,\n getCachedBlockWrapperStyle,\n getWrapperStyle,\n resolveBlockComponent,\n} from \"../../utils/blockComponentResolver\";\nimport type {\n Block,\n ViewportSize,\n WrapperBlock as WrapperBlockType,\n} from \"@templatical/types\";\nimport { SYNTAX_PRESETS } from \"@templatical/types\";\nimport { computed, inject, watch } from \"vue\";\nimport {\n BLOCK_REGISTRY_KEY,\n EDITOR_KEY,\n IMAGE_URL_RESOLVER_KEY,\n LAYOUT_KEY,\n MERGE_TAG_SYNTAX_KEY,\n} from \"../../keys\";\nimport { matchImageBoxWidth } from \"../../utils/imageRoom\";\nimport {\n getBackgroundLookupUrl,\n useResolvedBackgroundUrl,\n} from \"../../composables/useImageUrlResolver\";\n\ndefineOptions({ name: \"WrapperBlock\" });\n\nconst props = defineProps<{\n block: WrapperBlockType;\n viewport: ViewportSize;\n}>();\n\nconst blockRegistry = inject(BLOCK_REGISTRY_KEY, null);\nconst imageUrlResolver = inject(IMAGE_URL_RESOLVER_KEY, null);\nconst syntax = inject(MERGE_TAG_SYNTAX_KEY, SYNTAX_PRESETS.liquid);\nconst editor = inject(EDITOR_KEY, null);\nconst layout = inject(LAYOUT_KEY, undefined);\n\nconst bandBackgroundUrl = useResolvedBackgroundUrl(\n () => props.block.backgroundImage,\n);\n\nconst wrapperStyle = computed(\n () =>\n getWrapperStyle(props.block, {\n backgroundImageUrl: bandBackgroundUrl.value,\n }) ?? {},\n);\n\n// Same split as a section wrapper: the root is the bled band, this column is\n// the email width and carries the band's padding. Bound only while fullWidth\n// is on, so the frame is absent when the band is the email width.\nconst bandFrameStyle = computed(() =>\n fullWidthFrameStyle(props.block.styles.padding),\n);\n\n// A child section sits in a plain box here, not a BlockWrapper, so nothing else\n// resolves its background image. The lookups start from this band; each box\n// then paints the cached result (`getCachedBlockWrapperStyle`). Layout content\n// is configuration rather than typed input, so there is no debounce.\nconst childBackgroundUrls = computed(() =>\n props.block.children.flatMap((child) => {\n const url =\n child.type === \"section\"\n ? getBackgroundLookupUrl(child.backgroundImage, syntax)\n : undefined;\n return url ? [url] : [];\n }),\n);\nif (imageUrlResolver) {\n watch(\n childBackgroundUrls,\n (urls) => {\n for (const url of urls) imageUrlResolver.lookup(url);\n },\n { immediate: true },\n );\n}\n\nconst childBoxes = computed(() =>\n props.block.children.map((child) => ({\n child,\n style: getCachedBlockWrapperStyle(\n child,\n imageUrlResolver,\n syntax,\n matchImageBoxWidth(\n child,\n editor?.content.value,\n layout,\n editor?.activeLocale?.value ?? undefined,\n ),\n ),\n })),\n);\n\nfunction getBlockComponent(block: Block) {\n // Children resolve through the registry (title, section, …). No local\n // fallback map: a Canvas import of PreviewSectionBlock (or a preview import\n // of SectionBlock) would pull the other surface's tree into this band.\n return resolveBlockComponent(block, blockRegistry, {});\n}\n</script>\n\n<template>\n <div\n data-testid=\"layout-wrapper\"\n class=\"tpl-email-surface tpl:w-full\"\n :style=\"wrapperStyle\"\n :class=\"backgroundImageHostClass(wrapperStyle)\"\n >\n <div v-if=\"block.fullWidth\" class=\"tpl-band-frame\" :style=\"bandFrameStyle\">\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </div>\n <template v-else>\n <div\n v-for=\"{ child, style } in childBoxes\"\n :key=\"child.id\"\n :data-block-id=\"child.id\"\n :style=\"style\"\n :class=\"backgroundImageHostClass(style)\"\n >\n <component\n :is=\"getBlockComponent(child)\"\n :block=\"child\"\n :viewport=\"viewport\"\n />\n </div>\n </template>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EA8BA,IAAMwC,IAAQC,GAKRC,IAAgB3B,EAAOiB,GAAoB,IAAI,GAC/CW,IAAmB5B,EAAOe,GAAwB,IAAI,GACtDc,IAAS7B,EAAOc,GAAsBD,EAAe,MAAM,GAC3DiB,IAAS9B,EAAOkB,GAAY,IAAI,GAChCa,IAAS/B,EAAOgB,GAAY,KAAA,CAAS,GAErCgB,IAAoBX,QAClBI,EAAM,MAAM,eACpB,GAEMQ,IAAe5B,QAEjBI,EAAgBgB,EAAM,OAAO,EAC3B,oBAAoBO,EAAkB,MACxC,CAAC,KAAK,CAAC,CACX,GAKME,IAAiB7B,QACrBG,EAAoBiB,EAAM,MAAM,OAAO,OAAO,CAChD,GAMMU,IAAsB9B,QAC1BoB,EAAM,MAAM,SAAS,SAAS,MAAU;GACtC,IAAMW,IACJC,EAAM,SAAS,YACXlB,EAAuBkB,EAAM,iBAAiBR,CAAM,IACpD,KAAA;GACN,OAAOO,IAAM,CAACA,CAAG,IAAI,CAAC;EACxB,CAAC,CACH;EACA,AAAIR,KACF9B,EACEqC,IACC,MAAS;GACR,KAAK,IAAMC,KAAOE,GAAM,EAAiB,OAAOF,CAAG;EACrD,GACA,EAAE,WAAW,GAAK,CACpB;EAGF,IAAMG,IAAalC,QACjBoB,EAAM,MAAM,SAAS,KAAK,OAAW;GACnC;GACA,OAAOb,EACLyB,GACAT,GACAC,GACAT,EACEiB,GACAP,GAAQ,QAAQ,OAChBC,GACAD,GAAQ,cAAc,SAAS,KAAA,CACjC,CACF;EACF,EAAE,CACJ;EAEA,SAASU,EAAkB,GAAc;GAIvC,OAAO9B,EAAsB+B,GAAOd,GAAe,CAAC,CAAC;EACvD;E,kBAIE1C,EAAA,GAAAC,EAoCM,OAAA;GAnCJ,eAAY;GACZ,OAAKC,EAAA,CAAC,gCAEEC,EAAAuB,CAAA,CAAwB,CAACsB,EAAA,KAAY,CAAA,CAAA;GAD5C,OAAK5C,EAAE4C,EAAA,KAAY;E,IAGTP,EAAA,MAAM,aAAjBzC,EAAA,GAAAC,EAcM,OAAA;;GAdsB,OAAM;GAAkB,OAAKG,EAAE6C,EAAA,KAAc;E,KACvEjD,EAAA,EAAA,GAAAC,EAYMI,GAAA,MAAAC,EAXuBgD,EAAA,QAAU,EAA5B,UAAO,gBADlBtD,EAAA,GAAAC,EAYM,OAAA;GAVH,KAAKmD,EAAM;GACX,iBAAeA,EAAM;GACrB,OAAKhD,EAAEqD,CAAK;GACZ,OAAKvD,EAAEC,EAAAuB,CAAA,CAAwB,CAAC+B,CAAK,CAAA;E,KAEtCzD,EAAA,GAAAO,EAIEC,EAHK+C,EAAkBH,CAAK,CAAA,GAAA;GAC3B,OAAOA;GACP,UAAUX,EAAA;E,+DAKfzC,EAAA,EAAA,GAAAC,EAYMI,GAAA,EAAA,KAAA,EAAA,GAAAC,EAXuBgD,EAAA,QAAU,EAA5B,UAAO,gBADlBtD,EAAA,GAAAC,EAYM,OAAA;GAVH,KAAKmD,EAAM;GACX,iBAAeA,EAAM;GACrB,OAAKhD,EAAEqD,CAAK;GACZ,OAAKvD,EAAEC,EAAAuB,CAAA,CAAwB,CAAC+B,CAAK,CAAA;E,KAEtCzD,EAAA,GAAAO,EAIEC,EAHK+C,EAAkBH,CAAK,CAAA,GAAA;GAC3B,OAAOA;GACP,UAAUX,EAAA"}
@@ -1,21 +1,21 @@
1
- import { B as e, Mt as t, U as n, W as r, X as i, Z as a, _t as o, et as s, ft as c, jt as l, k as u, p as d, ut as f, y as p } from "./icons-Cl4oR2mf.js";
1
+ import { B as e, Mt as t, U as n, W as r, X as i, Z as a, _t as o, et as s, jt as c, k as l, p as u, pt as d, ut as f, y as p } from "./icons-C7vjUBLn.js";
2
2
  // src/utils/blockTypeIcons.ts
3
3
  var m = {
4
- section: l,
5
- hero: c,
4
+ section: c,
5
+ hero: d,
6
6
  title: f,
7
7
  paragraph: r,
8
8
  image: o,
9
9
  button: e,
10
10
  divider: s,
11
11
  video: n,
12
- social: u,
12
+ social: l,
13
13
  menu: i,
14
14
  table: p,
15
15
  spacer: a,
16
- countdown: d,
16
+ countdown: u,
17
17
  html: t
18
18
  };
19
19
  export { m as t };
20
20
 
21
- //# sourceMappingURL=blockTypeIcons-19xd5ZPi.js.map
21
+ //# sourceMappingURL=blockTypeIcons-CGxNYHVA.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"blockTypeIcons-19xd5ZPi.js","names":["Heading","RectangleHorizontal","Code","Play","Pilcrow","Navigation","MoveVertical","Image","Minus","LayoutPanelTop","Columns3","Share2","Timer","LetterH","Table","blockTypeIcons"],"sources":["../../../src/utils/blockTypeIcons.ts"],"sourcesContent":["import {\n Code,\n Columns3,\n Heading,\n Image,\n LayoutPanelTop,\n Minus,\n MoveVertical,\n Navigation,\n Pilcrow,\n Play,\n RectangleHorizontal,\n Share2,\n Table,\n Timer,\n} from \"@lucide/vue\";\nimport type { Component } from \"vue\";\n\nexport const blockTypeIcons: Record<string, Component> = {\n section: Columns3,\n hero: LayoutPanelTop,\n title: Heading,\n paragraph: Pilcrow,\n image: Image,\n button: RectangleHorizontal,\n divider: Minus,\n video: Play,\n social: Share2,\n menu: Navigation,\n table: Table,\n spacer: MoveVertical,\n countdown: Timer,\n html: Code,\n};\n"],"mappings":";;AAkBA,IAAae,IAA4C;CACvD,SAASL;CACT,MAAMD;CACN,OAAOT;CACP,WAAWI;CACX,OAAOG;CACP,QAAQN;CACR,SAASO;CACT,OAAOL;CACP,QAAQQ;CACR,MAAMN;CACN,OAAOS;CACP,QAAQR;CACR,WAAWM;CACX,MAAMV;AACR"}
1
+ {"version":3,"file":"blockTypeIcons-CGxNYHVA.js","names":["Heading","RectangleHorizontal","Code","Play","Pilcrow","Navigation","MoveVertical","Image","Minus","Columns3","Share2","Timer","LayoutPanelTop","LetterH","Table","blockTypeIcons"],"sources":["../../../src/utils/blockTypeIcons.ts"],"sourcesContent":["import {\n Code,\n Columns3,\n Heading,\n Image,\n LayoutPanelTop,\n Minus,\n MoveVertical,\n Navigation,\n Pilcrow,\n Play,\n RectangleHorizontal,\n Share2,\n Table,\n Timer,\n} from \"@lucide/vue\";\nimport type { Component } from \"vue\";\n\nexport const blockTypeIcons: Record<string, Component> = {\n section: Columns3,\n hero: LayoutPanelTop,\n title: Heading,\n paragraph: Pilcrow,\n image: Image,\n button: RectangleHorizontal,\n divider: Minus,\n video: Play,\n social: Share2,\n menu: Navigation,\n table: Table,\n spacer: MoveVertical,\n countdown: Timer,\n html: Code,\n};\n"],"mappings":";;AAkBA,IAAae,IAA4C;CACvD,SAASN;CACT,MAAMG;CACN,OAAOZ;CACP,WAAWI;CACX,OAAOG;CACP,QAAQN;CACR,SAASO;CACT,OAAOL;CACP,QAAQO;CACR,MAAML;CACN,OAAOS;CACP,QAAQR;CACR,WAAWK;CACX,MAAMT;AACR"}
@@ -3,18 +3,18 @@ import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f,
3
3
  import { t as te } from "./useEditorRoot-B_kf_k-g.js";
4
4
  import { t as G } from "./useI18n-CSf-ZpcM.js";
5
5
  import "./useCloudI18n-Dr4S2TRW.js";
6
- import { t as K } from "./useMergeTag-BKNBwIry.js";
6
+ import { t as K } from "./useMergeTag-lb-Wrw-B.js";
7
7
  import { _ as ne, h as q, v as J, y as re } from "./dist-BtWMy7UQ.js";
8
- import { $ as ie, $t as ae, A as Y, B as X, C as Z, Cn as Q, D as oe, E as se, G as ce, H as le, I as ue, K as de, L as fe, M as pe, N as me, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, Tn as Ce, W as we, X as Te, Y as Ee, Z as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dn as Fe, dt as Ie, et as Le, gn as Re, hn as ze, ht as Be, i as Ve, in as He, it as Ue, j as We, jt as Ge, ln as Ke, lt as qe, mt as Je, nt as Ye, p as Xe, pt as Ze, q as Qe, qt as $e, rt as et, sn as tt, st as nt, t as rt, tt as it, u as at, vt as ot, w as st, wn as ct, x as lt, xn as ut, y as dt, yn as ft } from "./src-CdVAke9t.js";
8
+ import { $ as ie, $t as ae, A as Y, B as X, C as Z, Cn as Q, D as oe, E as se, G as ce, H as le, I as ue, K as de, L as fe, M as pe, N as me, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, Tn as Ce, W as we, X as Te, Y as Ee, Z as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dn as Fe, dt as Ie, et as Le, gn as Re, hn as ze, ht as Be, i as Ve, in as He, it as Ue, j as We, jt as Ge, ln as Ke, lt as qe, mt as Je, nt as Ye, p as Xe, pt as Ze, q as Qe, qt as $e, rt as et, sn as tt, st as nt, t as rt, tt as it, u as at, vt as ot, w as st, wn as ct, x as lt, xn as ut, y as dt, yn as ft } from "./src-CVHGPKSW.js";
9
9
  import { t as $ } from "./logger-CqQTfJGx.js";
10
10
  import { a as pt, c as mt, i as ht, n as gt, o as _t, t as vt } from "./usePopoverPosition-BJFFi8x6.js";
11
- import { n as yt } from "./useLocalizedDisplay-slFOCPrh.js";
11
+ import { n as yt } from "./useLocalizedDisplay-7iwZ1UhB.js";
12
12
  import { A as bt, B as xt, C as St, D as Ct, F as wt, G as Tt, H as Et, I as Dt, J as Ot, K as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, Q as Ft, R as It, S as Lt, T as Rt, U as zt, V as Bt, W as Vt, X as Ht, Y as Ut, _ as Wt, a as Gt, at as Kt, b as qt, c as Jt, ct as Yt, d as Xt, et as Zt, g as Qt, h as $t, i as en, it as tn, j as nn, k as rn, l as an, m as on, nt as sn, ot as cn, p as ln, q as un, r as dn, rt as fn, s as pn, st as mn, tt as hn, u as gn, v as _n, w as vn, x as yn, y as bn, z as xn } from "./keys-BQqbBUag.js";
13
- import { t as Sn } from "./useLogicTag-lPjCGeGC.js";
14
- import { B as Cn, C as wn, F as Tn, I as En, P as Dn, R as On, T as kn, _ as An, a as jn, f as Mn, h as Nn, n as Pn, o as Fn, t as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./socialIcons-C_yggK1_.js";
13
+ import { t as Sn } from "./useLogicTag-YXRBcfgG.js";
14
+ import { B as Cn, C as wn, F as Tn, I as En, P as Dn, R as On, T as kn, _ as An, a as jn, f as Mn, h as Nn, n as Pn, o as Fn, t as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./socialIcons-CkgQUpim.js";
15
15
  import { r as Un, t as Wn } from "./templateSettingsFields-cjlP-jdw.js";
16
- import { r as Gn, t as Kn } from "./sanitizeHtml-CB7fjHFs.js";
17
- import { At as qn, G as Jn, Mt as Yn, Nt as Xn, Ot as Zn, St as Qn, Ut as $n, V as er, Wt as tr, X as nr, _t as rr, d as ir, f as ar, k as or, mt as sr, nt as cr, o as lr, y as ur, yt as dr } from "./icons-Cl4oR2mf.js";
16
+ import { r as Gn, t as Kn } from "./sanitizeHtml-5T_KaDcp.js";
17
+ import { At as qn, G as Jn, Mt as Yn, Nt as Xn, Ot as Zn, St as Qn, Ut as $n, V as er, Wt as tr, X as nr, _t as rr, d as ir, f as ar, k as or, mt as sr, nt as cr, o as lr, y as ur, yt as dr } from "./icons-C7vjUBLn.js";
18
18
  import { t as fr } from "./LoadingTrack-o-89hApJ.js";
19
19
  import { t as pr } from "./languageName-DEEOhDWI.js";
20
20
  import { t as mr } from "./plural-CyxrJXL1.js";
@@ -638,7 +638,7 @@ function Jr(e) {
638
638
  c || f();
639
639
  async function f() {
640
640
  try {
641
- let t = await import("./src-Bp7bZcuD.js");
641
+ let t = await import("./src-BRyzUujm.js");
642
642
  if (d) return;
643
643
  s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = re(n, p, { debounce: e.debounce ?? 500 });
644
644
  } catch {
@@ -1658,7 +1658,7 @@ var Pa = ["innerHTML"], Fa = /* @__PURE__ */ o({
1658
1658
  viewport: {}
1659
1659
  },
1660
1660
  setup(e) {
1661
- let t = e, n = b(() => import("./ParagraphEditor-CVGtTYta.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Na(() => t.block.content);
1661
+ let t = e, n = b(() => import("./ParagraphEditor-rEdKBett.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Na(() => t.block.content);
1662
1662
  return (t, u) => (c(), w("div", {
1663
1663
  ref_key: "blockRef",
1664
1664
  ref: i,
@@ -2114,7 +2114,7 @@ var za = [
2114
2114
  },
2115
2115
  emits: ["select"],
2116
2116
  setup(t, { emit: n }) {
2117
- let i = b(() => import("./BlockIssueBadge-DIlFDDwh.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = G(), f = g(vn, null), p = H(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
2117
+ let i = b(() => import("./BlockIssueBadge-BWIth1y6.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = G(), f = g(vn, null), p = H(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
2118
2118
  async function _() {
2119
2119
  await j(), p.value?.focus();
2120
2120
  }
@@ -2355,7 +2355,7 @@ var yo = /* @__PURE__ */ o({
2355
2355
  viewport: {}
2356
2356
  },
2357
2357
  setup(e) {
2358
- let t = e, n = b(() => import("./TitleEditor-CuKJptyw.js")), r = Yt(qt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Na(() => t.block.content), f = I(() => {
2358
+ let t = e, n = b(() => import("./TitleEditor-Bq62I2SC.js")), r = Yt(qt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Na(() => t.block.content), f = I(() => {
2359
2359
  let e = {
2360
2360
  fontSize: `${je[t.block.level]}px`,
2361
2361
  lineHeight: String(xe),
@@ -3118,4 +3118,4 @@ function ss(e) {
3118
3118
  }
3119
3119
  export { xi as A, Dr as B, Wi as C, Ki as D, ki as E, gi as F, xr as H, Ur as I, Vr as L, yi as M, vi as N, Ai as O, _i as P, Ir as R, Fi as S, Bi as T, Sr as V, ua as _, Vo as a, Xi as b, bo as c, _o as d, Ia as f, ga as g, Oa as h, qo as i, bi as j, pi as k, Co as l, Ma as m, as as n, Ro as o, Fa as p, rs as r, Ao as s, ss as t, yo as u, ca as v, zi as w, Mi as x, $i as y, Pr as z };
3120
3120
 
3121
- //# sourceMappingURL=composables-CUIiW9OD.js.map
3121
+ //# sourceMappingURL=composables-CkthyXi9.js.map