@templatical/editor 0.35.0 → 0.37.0

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 (223) hide show
  1. package/dist/{AiChatSidebar-DPHbCGu4.js → AiChatSidebar-tu4eLcf_.js} +57 -57
  2. package/dist/{AiFeatureMenu--8z7qvg1.js → AiFeatureMenu-BF0i0vA4.js} +17 -17
  3. package/dist/{BlockIssueBadge-BGCsJqqM.js → BlockIssueBadge-DT-FqKeC.js} +9 -9
  4. package/dist/{BlockPreviewCanvas-DKspIy8V.js → BlockPreviewCanvas-DDCmMram.js} +28 -28
  5. package/dist/CloudHeaderExtras-NPhudovT.js +59 -0
  6. package/dist/{CloudPanels-Bp5gFtaL.js → CloudPanels-Iwnky0iA.js} +78 -108
  7. package/dist/{CollaboratorBar-DvwZm5u7.js → CollaboratorBar-DAITu0hz.js} +17 -17
  8. package/dist/{ColorPicker-DtozuN75.js → ColorPicker-BqlZ_TqG.js} +193 -193
  9. package/dist/{CommentsPanel-3C-DsEjy.js → CommentsPanel-CDvgmWP1.js} +3 -3
  10. package/dist/{CommentsSidebar-go1FnjDW.js → CommentsSidebar-X_xqM3dR.js} +158 -158
  11. package/dist/{CountdownBlock-D1fsNsyS.js → CountdownBlock-ZFJIdbP6.js} +12 -12
  12. package/dist/{CountdownToolbar-SLBuij7Q.js → CountdownToolbar-DBFoG3a6.js} +67 -67
  13. package/dist/{DesignReferenceSidebar-rcE_BvUd.js → DesignReferenceSidebar--QtXjLrw.js} +57 -57
  14. package/dist/{FieldRow-BWt7ECqo.js → FieldRow-C8nOknr_.js} +39 -39
  15. package/dist/{IssuesPanel-Cig46N1i.js → IssuesPanel-BLbNFMSX.js} +38 -38
  16. package/dist/{LoadingTrack-SQXoZVf2.js → LoadingTrack-BlTL4zFv.js} +2 -2
  17. package/dist/MediaPanels-CMTAhDXB.js +43 -0
  18. package/dist/{MergeTagInput-D1hzsn2b.js → MergeTagInput-BEjzj4Iu.js} +115 -115
  19. package/dist/{MergeTagModeToggle-CH9wR5YF.js → MergeTagModeToggle-DKN6ihI5.js} +40 -40
  20. package/dist/{MergeTagSuggestion-CoCuzEmW.js → MergeTagSuggestion-DKoLEeoj.js} +21 -21
  21. package/dist/{ParagraphEditor-CT2AdMdZ.js → ParagraphEditor-1E9yzOfk.js} +231 -258
  22. package/dist/{RestoreVersionDialog-mdqgQxFR.js → RestoreVersionDialog-BMGUkcd8.js} +28 -28
  23. package/dist/{RichTextEditorContent-riOB-rKD.js → RichTextEditorContent-BnxbQUV9.js} +49 -59
  24. package/dist/{SaveBlockDialog-Cn2v4Lpj.js → SaveBlockDialog-WKASpCCT.js} +78 -78
  25. package/dist/SavedBlocksBrowserModal-AYEXTMtQ.js +323 -0
  26. package/dist/{SavedBlocksPanels-ffBnWuVU.js → SavedBlocksPanels-D_CpacTl.js} +6 -6
  27. package/dist/{SavedBlocksPickBar-BmQC2tWN.js → SavedBlocksPickBar-BHMwg-1G.js} +11 -11
  28. package/dist/{TemplateScoringPanel-CxAtdreR.js → TemplateScoringPanel-CSin43YM.js} +99 -98
  29. package/dist/{TestEmailModal-Cjn1padY.js → TestEmailModal-BxizsRCd.js} +59 -59
  30. package/dist/{TestEmailPanel-Bf3XZ1jn.js → TestEmailPanel-vd2e5HzT.js} +3 -3
  31. package/dist/TitleEditor-CLJ68Ty4.js +199 -0
  32. package/dist/TplModal-Q9fDgS1M.js +51 -0
  33. package/dist/{VersionHistoryMenu-CrNrGsaa.js → VersionHistoryMenu-eGYVhM4H.js} +41 -47
  34. package/dist/{VersionHistoryPanels-CsuQk6W3.js → VersionHistoryPanels-C7Ntrrfq.js} +4 -4
  35. package/dist/{VersionPreviewBanner-BqbO0Zss.js → VersionPreviewBanner-BbQXnR0M.js} +9 -9
  36. package/dist/{blockTypeIcons-D_4HdaY9.js → blockTypeIcons-5qD4bB76.js} +5 -17
  37. package/dist/bundle-stats.json +8 -8
  38. package/dist/ca-Jx2CDwtn.js +83 -0
  39. package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js → AiChatSidebar-dyqqHAcI.js} +4 -4
  40. package/dist/cdn/chunks/{AiChatSidebar-D0f74_nS.js.map → AiChatSidebar-dyqqHAcI.js.map} +1 -1
  41. package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js → AiFeatureMenu-BjVMwhW8.js} +5 -5
  42. package/dist/cdn/chunks/{AiFeatureMenu-DwGb3eF9.js.map → AiFeatureMenu-BjVMwhW8.js.map} +1 -1
  43. package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js → BlockIssueBadge-BJ__oEtm.js} +4 -4
  44. package/dist/cdn/chunks/{BlockIssueBadge-CosQgeJ-.js.map → BlockIssueBadge-BJ__oEtm.js.map} +1 -1
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js → BlockPreviewCanvas-B5f26eLE.js} +5 -5
  46. package/dist/cdn/chunks/{BlockPreviewCanvas-CIpZ2a6g.js.map → BlockPreviewCanvas-B5f26eLE.js.map} +1 -1
  47. package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js → CloudHeaderExtras-D5P5IEKA.js} +4 -4
  48. package/dist/cdn/chunks/{CloudHeaderExtras-CQzQwKFB.js.map → CloudHeaderExtras-D5P5IEKA.js.map} +1 -1
  49. package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js → CloudPanels-DkmR05nB.js} +15 -45
  50. package/dist/cdn/chunks/{CloudPanels-BmexuLOU.js.map → CloudPanels-DkmR05nB.js.map} +1 -1
  51. package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js → CollaboratorBar-Yn7KSpt4.js} +4 -4
  52. package/dist/cdn/chunks/{CollaboratorBar-DEICobpp.js.map → CollaboratorBar-Yn7KSpt4.js.map} +1 -1
  53. package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js → ColorPicker-LcrzgMoW.js} +7 -7
  54. package/dist/cdn/chunks/{ColorPicker-C7yC58FK.js.map → ColorPicker-LcrzgMoW.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js → CommentsPanel-CntwwocI.js} +2 -2
  56. package/dist/cdn/chunks/{CommentsPanel-OjmKxLL7.js.map → CommentsPanel-CntwwocI.js.map} +1 -1
  57. package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js → CommentsSidebar-BLDKnKy7.js} +4 -4
  58. package/dist/cdn/chunks/{CommentsSidebar-C4pWZGpy.js.map → CommentsSidebar-BLDKnKy7.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js → CountdownBlock-B4AfqJwb.js} +2 -2
  60. package/dist/cdn/chunks/{CountdownBlock-rK055jpy.js.map → CountdownBlock-B4AfqJwb.js.map} +1 -1
  61. package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js → CountdownToolbar-CA1dpuOI.js} +3 -3
  62. package/dist/cdn/chunks/{CountdownToolbar-wlJOxyAl.js.map → CountdownToolbar-CA1dpuOI.js.map} +1 -1
  63. package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js → DesignReferenceSidebar-D1Y9Hswe.js} +5 -5
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-DELhnh8h.js.map → DesignReferenceSidebar-D1Y9Hswe.js.map} +1 -1
  65. package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js → IssuesPanel-Q62LTqvd.js} +5 -5
  66. package/dist/cdn/chunks/{IssuesPanel-C9i3o8aE.js.map → IssuesPanel-Q62LTqvd.js.map} +1 -1
  67. package/dist/cdn/chunks/MediaPanels-D21M6shx.js +45 -0
  68. package/dist/cdn/chunks/MediaPanels-D21M6shx.js.map +1 -0
  69. package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js → MergeTagInput-l7paaAml.js} +7 -7
  70. package/dist/cdn/chunks/{MergeTagInput-D76Kyvgu.js.map → MergeTagInput-l7paaAml.js.map} +1 -1
  71. package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js → MergeTagModeToggle-DYxkAGtA.js} +4 -4
  72. package/dist/cdn/chunks/{MergeTagModeToggle-Dz3gxN2y.js.map → MergeTagModeToggle-DYxkAGtA.js.map} +1 -1
  73. package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js → ParagraphEditor-Bd-GQXee.js} +15 -15
  74. package/dist/cdn/chunks/{ParagraphEditor-DQn0HMfV.js.map → ParagraphEditor-Bd-GQXee.js.map} +1 -1
  75. package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js → RestoreVersionDialog-2X9RpM9A.js} +4 -4
  76. package/dist/cdn/chunks/{RestoreVersionDialog-BdjOL8Oy.js.map → RestoreVersionDialog-2X9RpM9A.js.map} +1 -1
  77. package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js → RichTextEditorContent-D_rb0rmU.js} +8 -8
  78. package/dist/cdn/chunks/{RichTextEditorContent-Drzwgh0J.js.map → RichTextEditorContent-D_rb0rmU.js.map} +1 -1
  79. package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js → SaveBlockDialog-CufdTomT.js} +15 -15
  80. package/dist/cdn/chunks/{SaveBlockDialog-B3rbmXSM.js.map → SaveBlockDialog-CufdTomT.js.map} +1 -1
  81. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js → SavedBlocksBrowserModal-CqpaNsk7.js} +8 -8
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CkUXlnd2.js.map → SavedBlocksBrowserModal-CqpaNsk7.js.map} +1 -1
  83. package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js → SavedBlocksPanels-DpxYxddo.js} +2 -2
  84. package/dist/cdn/chunks/{SavedBlocksPanels-BPi3PZKP.js.map → SavedBlocksPanels-DpxYxddo.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js → SavedBlocksPickBar-Drpoav1B.js} +4 -4
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-BvB9A5W2.js.map → SavedBlocksPickBar-Drpoav1B.js.map} +1 -1
  87. package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js → TemplateScoringPanel-DBjUNULq.js} +5 -5
  88. package/dist/cdn/chunks/{TemplateScoringPanel-BBCyLnOi.js.map → TemplateScoringPanel-DBjUNULq.js.map} +1 -1
  89. package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js → TestEmailModal-BTNlSW6f.js} +10 -10
  90. package/dist/cdn/chunks/{TestEmailModal-DAGTsBqi.js.map → TestEmailModal-BTNlSW6f.js.map} +1 -1
  91. package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js → TestEmailPanel-D0A9Zgxr.js} +2 -2
  92. package/dist/cdn/chunks/{TestEmailPanel-BfenVvfx.js.map → TestEmailPanel-D0A9Zgxr.js.map} +1 -1
  93. package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js → TitleEditor-CrnuIq62.js} +9 -9
  94. package/dist/cdn/chunks/{TitleEditor-oQ4gr6wS.js.map → TitleEditor-CrnuIq62.js.map} +1 -1
  95. package/dist/cdn/chunks/{TplModal-DxOMcVwp.js → TplModal-DYXrTz42.js} +5 -5
  96. package/dist/cdn/chunks/{TplModal-DxOMcVwp.js.map → TplModal-DYXrTz42.js.map} +1 -1
  97. package/dist/cdn/chunks/{VersionHistoryMenu-BfVUvWHT.js → VersionHistoryMenu-bDGnE4hb.js} +4 -4
  98. package/dist/cdn/chunks/VersionHistoryMenu-bDGnE4hb.js.map +1 -0
  99. package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js → VersionHistoryPanels-82P0Q0HM.js} +2 -2
  100. package/dist/cdn/chunks/{VersionHistoryPanels-NpDb641L.js.map → VersionHistoryPanels-82P0Q0HM.js.map} +1 -1
  101. package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js → VersionPreviewBanner-BJiwKkVC.js} +3 -3
  102. package/dist/cdn/chunks/{VersionPreviewBanner-Cpgt4xHc.js.map → VersionPreviewBanner-BJiwKkVC.js.map} +1 -1
  103. package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js → blockTypeIcons-CNjJSFun.js} +2 -2
  104. package/dist/cdn/chunks/{blockTypeIcons-t9vvaiuH.js.map → blockTypeIcons-CNjJSFun.js.map} +1 -1
  105. package/dist/cdn/chunks/{ca-CNRWAMHI.js → ca-Jx2CDwtn.js} +2 -6
  106. package/dist/cdn/chunks/ca-Jx2CDwtn.js.map +1 -0
  107. package/dist/cdn/chunks/{cloud-CullB76F.js → cloud-BLgCKP7Z.js} +452 -227
  108. package/dist/cdn/chunks/cloud-BLgCKP7Z.js.map +1 -0
  109. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js +385 -0
  110. package/dist/cdn/chunks/createCloudRuntime-U-qCH-dq.js.map +1 -0
  111. package/dist/cdn/chunks/{de-DFYCT4QU.js → de-Ck0pBGHu.js} +2 -6
  112. package/dist/cdn/chunks/de-Ck0pBGHu.js.map +1 -0
  113. package/dist/cdn/chunks/{src-CaXeO-gG.js → editor-modal-MXgtarMl.js} +1474 -1935
  114. package/dist/cdn/chunks/editor-modal-MXgtarMl.js.map +1 -0
  115. package/dist/cdn/chunks/en-C9U7N77n.js +2 -0
  116. package/dist/cdn/chunks/{es-OgkdMZGX.js → es-lagTvUfX.js} +2 -6
  117. package/dist/cdn/chunks/es-lagTvUfX.js.map +1 -0
  118. package/dist/cdn/chunks/{extensions-BpXY7jO5.js → extensions-B8_jnIkD.js} +3 -3
  119. package/dist/cdn/chunks/{extensions-BpXY7jO5.js.map → extensions-B8_jnIkD.js.map} +1 -1
  120. package/dist/cdn/chunks/{fr-Dswns199.js → fr-C4hVl5Lk.js} +2 -6
  121. package/dist/cdn/chunks/fr-C4hVl5Lk.js.map +1 -0
  122. package/dist/cdn/chunks/{icons-BLxcQUck.js → icons-BUlqGSgd.js} +24 -24
  123. package/dist/cdn/chunks/{icons-BLxcQUck.js.map → icons-BUlqGSgd.js.map} +1 -1
  124. package/dist/cdn/chunks/{keys-DQp8x7Nx.js → keys-DBFhDFng.js} +4 -4
  125. package/dist/cdn/chunks/{keys-DQp8x7Nx.js.map → keys-DBFhDFng.js.map} +1 -1
  126. package/dist/cdn/chunks/{nl-CbcPJlrL.js → nl-CReD7Apd.js} +2 -6
  127. package/dist/cdn/chunks/nl-CReD7Apd.js.map +1 -0
  128. package/dist/cdn/chunks/{pt-BR-BibOQm-o.js → pt-BR-BRA0-vGP.js} +2 -6
  129. package/dist/cdn/chunks/pt-BR-BRA0-vGP.js.map +1 -0
  130. package/dist/cdn/chunks/{src-BC-eolWY.js → src-Ozknnj-v.js} +2 -2
  131. package/dist/cdn/chunks/{src-BC-eolWY.js.map → src-Ozknnj-v.js.map} +1 -1
  132. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js → useCloudI18n-DSWSGj-A.js} +2 -2
  133. package/dist/cdn/chunks/{useCloudI18n-MxgHWrV6.js.map → useCloudI18n-DSWSGj-A.js.map} +1 -1
  134. package/dist/cdn/chunks/{useEditorCore-D4MytYB9.js → useEditorCore-Cs7rYVBo.js} +488 -406
  135. package/dist/cdn/chunks/useEditorCore-Cs7rYVBo.js.map +1 -0
  136. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js → useEditorRoot-B0zW2nT4.js} +2 -2
  137. package/dist/cdn/chunks/{useEditorRoot-CteADR3y.js.map → useEditorRoot-B0zW2nT4.js.map} +1 -1
  138. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js → useI18n-Dlo7R9RA.js} +2 -2
  139. package/dist/cdn/chunks/{useI18n-Ct1VIFcf.js.map → useI18n-Dlo7R9RA.js.map} +1 -1
  140. package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js → useMergeTag-BYAifvh8.js} +3 -3
  141. package/dist/cdn/chunks/{useMergeTag-CSocWpxV.js.map → useMergeTag-BYAifvh8.js.map} +1 -1
  142. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js → usePopoverPosition-ElP3ABaV.js} +2 -2
  143. package/dist/cdn/chunks/{usePopoverPosition-BxVWE5_0.js.map → usePopoverPosition-ElP3ABaV.js.map} +1 -1
  144. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js → useScrollToBlock-nTbWkgaU.js} +2 -2
  145. package/dist/cdn/chunks/{useScrollToBlock-Cz3fpgTK.js.map → useScrollToBlock-nTbWkgaU.js.map} +1 -1
  146. package/dist/cdn/editor.css +1 -1
  147. package/dist/cdn/editor.js +1094 -1005
  148. package/dist/cdn/editor.js.map +1 -1
  149. package/dist/{check-CY-Ec6FV.js → check-DWtkBzBU.js} +1 -1
  150. package/dist/{chevron-down-BghbWA9p.js → chevron-down-C-Fjxcqj.js} +1 -1
  151. package/dist/chevron-right-SOkn2d4P.js +11 -0
  152. package/dist/{chevron-up-n3qFAPS3.js → chevron-up-lntU1ypp.js} +1 -1
  153. package/dist/{circle-alert-L5uGGFRP.js → circle-alert-CjzUTwy3.js} +1 -1
  154. package/dist/{clock-Dgnwp18n.js → clock-pB2QKPsJ.js} +1 -1
  155. package/dist/{cloud-B1c4XIsn.js → cloud-DdidMW6f.js} +445 -200
  156. package/dist/copy-CId1E038.js +19 -0
  157. package/dist/createCloudRuntime-x5WZm3p8.js +383 -0
  158. package/dist/{createLucideIcon-05lB8iWe.js → createLucideIcon-Cwf_nTzE.js} +6 -6
  159. package/dist/de-Ck0pBGHu.js +83 -0
  160. package/dist/{dist-BxFbxpgW.js → dist-BVqAYoRB.js} +125 -125
  161. package/dist/dist-D8i1ixHK.js +177 -0
  162. package/dist/dist-DBirAJIs.js +410 -0
  163. package/dist/editor-modal-B_LaQf0s.js +5998 -0
  164. package/dist/en-DcmpWV53.js +2 -0
  165. package/dist/es-lagTvUfX.js +83 -0
  166. package/dist/{extensions-Bawm4BOM.js → extensions-CHOBZRab.js} +42 -42
  167. package/dist/eye-BuGtFUoJ.js +16 -0
  168. package/dist/fr-C4hVl5Lk.js +83 -0
  169. package/dist/{image-up-ovhjl9u9.js → image-up-gH4JEpU5.js} +1 -1
  170. package/dist/index.d.ts +90 -11
  171. package/dist/{info-c3KI927I.js → info-BQ60P82u.js} +1 -1
  172. package/dist/{keys-C3P1yxnr.js → keys-DQA2i1k1.js} +4 -4
  173. package/dist/link-3R8it3J7.js +14 -0
  174. package/dist/list-Ccdgj46T.js +33 -0
  175. package/dist/{loader-circle-B2Y8xZQb.js → loader-circle-B_tAD4k6.js} +1 -1
  176. package/dist/{message-circle-B7K-naUa.js → message-circle-P-KSc6V0.js} +1 -1
  177. package/dist/nl-CReD7Apd.js +83 -0
  178. package/dist/{pencil-BhWTFcp4.js → pencil-9ZiwqS4r.js} +1 -1
  179. package/dist/plus-BwJEzCaO.js +14 -0
  180. package/dist/pt-BR-BRA0-vGP.js +83 -0
  181. package/dist/{refresh-cw-BqUR5vgO.js → refresh-cw-DEgfb2FK.js} +2 -14
  182. package/dist/{runtime-dom.esm-bundler-BuG03jBM.js → runtime-dom.esm-bundler-PnoZU512.js} +106 -106
  183. package/dist/search-DqQ8Li5E.js +16 -0
  184. package/dist/{send-D1vvuW79.js → send-CE6uvqop.js} +1 -1
  185. package/dist/{shield-check-DjK54PnW.js → shield-check-DhD1Z3rd.js} +1 -1
  186. package/dist/{sparkles-DNdS9V_3.js → sparkles-R0ZQHa6F.js} +1 -1
  187. package/dist/style.css +1 -1
  188. package/dist/templatical-editor.js +2491 -2408
  189. package/dist/{text-align-start-Bcmo_VUY.js → text-align-start-DSux2UNn.js} +1 -1
  190. package/dist/{trash-C9bMXvw4.js → trash-Cf_SqsER.js} +1 -1
  191. package/dist/{triangle-alert-Bn8Bd2Yv.js → triangle-alert-C6tGa6jw.js} +1 -1
  192. package/dist/{upload-DKgg1gno.js → upload-DusKjpVr.js} +1 -1
  193. package/dist/{useAliveFlag-PVmp95MT.js → useAliveFlag-oyByIcjy.js} +1 -1
  194. package/dist/{useCloudI18n-BKoiYsWZ.js → useCloudI18n-BLyh_e2T.js} +2 -2
  195. package/dist/{useEditorCore-CYGvurZa.js → useEditorCore-DhlKOYwe.js} +1552 -1486
  196. package/dist/{useEditorRoot-DkRGTQRs.js → useEditorRoot-ds57-l6F.js} +2 -2
  197. package/dist/{useI18n-CL6RfPzK.js → useI18n-BbdxxpOE.js} +2 -2
  198. package/dist/{useMergeTag-C9GEpljB.js → useMergeTag-DlvOBW_B.js} +3 -3
  199. package/dist/{usePopoverPosition-CWxaIWd3.js → usePopoverPosition-CprM5p-c.js} +2 -2
  200. package/dist/{useScrollToBlock-oUx1HIZ2.js → useScrollToBlock-BTFw0b9O.js} +3 -3
  201. package/dist/{vue.runtime.esm-bundler-D9JUcKrV.js → vue.runtime.esm-bundler-DShF3P6k.js} +1192 -1181
  202. package/dist/{x-BPKoRPTG.js → x-D_-42Ukq.js} +1 -1
  203. package/package.json +9 -12
  204. package/dist/CloudHeaderExtras-CRUQvgSV.js +0 -59
  205. package/dist/SavedBlocksBrowserModal-BORqqASb.js +0 -322
  206. package/dist/TitleEditor-pYEUX6lR.js +0 -198
  207. package/dist/TplModal-DRx4ytx8.js +0 -51
  208. package/dist/cdn/chunks/VersionHistoryMenu-BfVUvWHT.js.map +0 -1
  209. package/dist/cdn/chunks/ca-CNRWAMHI.js.map +0 -1
  210. package/dist/cdn/chunks/cloud-CullB76F.js.map +0 -1
  211. package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js +0 -443
  212. package/dist/cdn/chunks/createCloudRuntime-Cx2JpUYU.js.map +0 -1
  213. package/dist/cdn/chunks/de-DFYCT4QU.js.map +0 -1
  214. package/dist/cdn/chunks/en-rGHphLWo.js +0 -2
  215. package/dist/cdn/chunks/es-OgkdMZGX.js.map +0 -1
  216. package/dist/cdn/chunks/fr-Dswns199.js.map +0 -1
  217. package/dist/cdn/chunks/nl-CbcPJlrL.js.map +0 -1
  218. package/dist/cdn/chunks/pt-BR-BibOQm-o.js.map +0 -1
  219. package/dist/cdn/chunks/src-CaXeO-gG.js.map +0 -1
  220. package/dist/cdn/chunks/useEditorCore-D4MytYB9.js.map +0 -1
  221. package/dist/createCloudRuntime-PevFSH74.js +0 -441
  222. package/dist/dist-dNiknO7j.js +0 -251
  223. package/dist/dist-heatwAdo.js +0 -150
@@ -1,4 +1,4 @@
1
- import { t as e } from "./createLucideIcon-05lB8iWe.js";
1
+ import { t as e } from "./createLucideIcon-Cwf_nTzE.js";
2
2
  var t = e({
3
3
  name: "x",
4
4
  size: 24,
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@templatical/editor",
3
3
  "description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
4
- "version": "0.35.0",
4
+ "version": "0.37.0",
5
5
  "bugs": "https://github.com/templatical/sdk/issues",
6
6
  "devDependencies": {
7
- "@lucide/vue": "^1.42.0",
8
- "@templatical/core": "0.35.0",
9
- "@templatical/quality": "0.35.0",
10
- "@templatical/types": "0.35.0",
7
+ "@lucide/vue": "^1.43.0",
8
+ "@templatical/core": "0.37.0",
9
+ "@templatical/media-library": "0.37.0",
10
+ "@templatical/quality": "0.37.0",
11
+ "@templatical/types": "0.37.0",
11
12
  "@tiptap/core": "^3.31.3",
12
13
  "@tiptap/extension-color": "^3.31.3",
13
14
  "@tiptap/extension-font-family": "^3.31.3",
@@ -24,7 +25,7 @@
24
25
  "@vitejs/plugin-vue": "^6.0.8",
25
26
  "@vue/test-utils": "^2.5.0",
26
27
  "@vueuse/core": "^14.4.0",
27
- "es-module-lexer": "^3.0.1",
28
+ "es-module-lexer": "^3.0.2",
28
29
  "happy-dom": "^20.14.0",
29
30
  "jsdom": "30.0.1",
30
31
  "liquidjs": "^10.29.0",
@@ -63,17 +64,13 @@
63
64
  "license": "FSL-1.1-MIT",
64
65
  "module": "./dist/templatical-editor.js",
65
66
  "peerDependencies": {
66
- "@templatical/media-library": "0.35.0",
67
- "@templatical/quality": "0.35.0",
68
- "@templatical/renderer": "0.35.0"
67
+ "@templatical/quality": "0.37.0",
68
+ "@templatical/renderer": "0.37.0"
69
69
  },
70
70
  "peerDependenciesMeta": {
71
71
  "@templatical/renderer": {
72
72
  "optional": true
73
73
  },
74
- "@templatical/media-library": {
75
- "optional": true
76
- },
77
74
  "@templatical/quality": {
78
75
  "optional": true
79
76
  }
@@ -1,59 +0,0 @@
1
- import { Dt as e, _ as t, c as n, d as r, g as i, h as a, k as o, kt as s, l as c, r as l, rt as u, u as d, v as f, z as p } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { c as m, t as h } from "./runtime-dom.esm-bundler-BuG03jBM.js";
3
- import { t as g } from "./sparkles-DNdS9V_3.js";
4
- import { n as _ } from "./useCloudI18n-BKoiYsWZ.js";
5
- //#region src/cloud/components/CloudHeaderExtras.vue?vue&type=script&setup=true&lang.ts
6
- var v = {
7
- key: 0,
8
- "data-testid": "cloud-template-usage",
9
- class: "tpl:text-xs tpl:opacity-60 tpl:text-[var(--tpl-text-muted)]"
10
- }, y = ["aria-expanded"], b = {
11
- key: 0,
12
- class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
13
- }, x = /* @__PURE__ */ f({
14
- __name: "CloudHeaderExtras",
15
- props: {
16
- part: {},
17
- cloud: {}
18
- },
19
- setup(f) {
20
- let x = t(() => import("./CollaboratorBar-DvwZm5u7.js")), S = t(() => import("./AiFeatureMenu--8z7qvg1.js")), { t: C, format: w } = _();
21
- return (t, _) => f.part === "left" ? (o(), r(l, { key: 0 }, [f.cloud.featureFlags.templateLimit.value === null ? d("", !0) : (o(), r("span", v, s(u(w)(u(C).header.templatesUsed, {
22
- used: f.cloud.featureFlags.templateCount.value,
23
- max: f.cloud.featureFlags.templateLimit.value
24
- })), 1)), f.cloud.collaboration && f.cloud.isCollaborationEnabled.value ? (o(), c(u(x), {
25
- key: 1,
26
- collaborators: f.cloud.collaboration.collaborators.value,
27
- "is-connected": f.cloud.websocket.isConnected.value
28
- }, null, 8, ["collaborators", "is-connected"])) : d("", !0)], 64)) : f.part === "right" ? (o(), r(l, { key: 1 }, [f.cloud.featureFlags.canUseAiGeneration.value && f.cloud.featureFlags.hasTemplateSaved.value ? (o(), r("div", {
29
- key: 0,
30
- ref: (e) => f.cloud.panelState.aiMenuRef.value = e,
31
- class: "tpl:relative"
32
- }, [n("button", {
33
- type: "button",
34
- "data-testid": "ai-menu-trigger",
35
- "aria-expanded": f.cloud.panelState.aiMenuOpen.value,
36
- class: e(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", f.cloud.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
37
- onClick: _[0] ||= m((...e) => f.cloud.panelState.toggleAiMenu && f.cloud.panelState.toggleAiMenu(...e), ["stop"])
38
- }, [i(u(g), {
39
- size: 16,
40
- "stroke-width": 2,
41
- class: "tpl-ai-btn-icon"
42
- }), a(" " + s(u(C).aiChat.button), 1)], 10, y), i(h, {
43
- "enter-active-class": "tpl:transition-all tpl:ease-out",
44
- "enter-from-class": "tpl:scale-95 tpl:opacity-0",
45
- "enter-to-class": "tpl:scale-100 tpl:opacity-100",
46
- "leave-active-class": "tpl:transition-all tpl:duration-100 tpl:ease-in",
47
- "leave-from-class": "tpl:scale-100 tpl:opacity-100",
48
- "leave-to-class": "tpl:scale-95 tpl:opacity-0"
49
- }, {
50
- default: p(() => [f.cloud.panelState.aiMenuOpen.value ? (o(), r("div", b, [i(u(S), {
51
- "active-feature": f.cloud.panelState.activeAiFeature.value,
52
- onSelect: f.cloud.panelState.handleAiFeatureSelect
53
- }, null, 8, ["active-feature", "onSelect"])])) : d("", !0)]),
54
- _: 1
55
- })], 512)) : d("", !0)], 64)) : d("", !0);
56
- }
57
- });
58
- //#endregion
59
- export { x as default };
@@ -1,322 +0,0 @@
1
- import { B as e, Dt as t, L as n, Ot as r, P as i, S as a, T as ee, X as o, _ as te, c as s, d as c, g as l, j as u, k as d, kt as f, l as p, r as m, rt as h, s as g, u as _, v, z as ne } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { a as y, c as b, i as x, s as S } from "./runtime-dom.esm-bundler-BuG03jBM.js";
3
- import "./useEditorCore-CYGvurZa.js";
4
- import { G as re, J as C, h as ie, z as ae } from "./keys-C3P1yxnr.js";
5
- import { t as oe } from "./useI18n-CL6RfPzK.js";
6
- import { n as se, r as w, t as T } from "./blockTypeIcons-D_4HdaY9.js";
7
- import { t as ce } from "./pencil-BhWTFcp4.js";
8
- import { t as le } from "./trash-C9bMXvw4.js";
9
- import { t as ue } from "./x-BPKoRPTG.js";
10
- import { v as de } from "./styleConstants-C_YAPdQS.js";
11
- import { t as fe } from "./formatAbsoluteDateTime-DMmop3C-.js";
12
- import { t as pe } from "./formatRelativeTime-CtUU-QZ8.js";
13
- import { t as me } from "./TplModal-DRx4ytx8.js";
14
- //#region src/components/SavedBlocksBrowserModal.vue?vue&type=script&setup=true&lang.ts
15
- var he = {
16
- role: "dialog",
17
- "aria-modal": "true",
18
- "data-testid": "saved-blocks-browser",
19
- "aria-labelledby": "tpl-saved-blocks-browser-title",
20
- class: "tpl-scale-in tpl:flex tpl:max-h-[90%] tpl:w-[1000px] tpl:max-w-full tpl:flex-col tpl:rounded-[var(--tpl-radius-lg)]",
21
- style: {
22
- "background-color": "var(--tpl-bg-elevated)",
23
- "box-shadow": "var(--tpl-shadow-xl)"
24
- }
25
- }, ge = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:px-5 tpl:py-4 tpl:border-[var(--tpl-border)]" }, _e = {
26
- id: "tpl-saved-blocks-browser-title",
27
- class: "tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
28
- }, ve = ["aria-label"], ye = { class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:overflow-hidden" }, be = { class: "tpl:flex tpl:w-[300px] tpl:shrink-0 tpl:flex-col tpl:overflow-hidden" }, xe = { class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:px-4 tpl:pt-4 tpl:pb-3" }, Se = { class: "tpl:relative" }, Ce = ["placeholder", "disabled"], we = ["aria-label"], Te = { value: "" }, E = ["value"], D = { id: "tpl-saved-block-browser-categories" }, O = ["value"], Ee = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:px-4 tpl:pb-4" }, De = ["aria-label"], Oe = {
29
- key: 1,
30
- class: "tpl:flex tpl:flex-col tpl:gap-1"
31
- }, ke = ["onFocusout"], Ae = ["aria-label", "onKeydown"], je = [
32
- "aria-label",
33
- "placeholder",
34
- "onKeydown"
35
- ], Me = ["aria-pressed", "onClick"], Ne = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Pe = { class: "tpl:flex-1 tpl:truncate tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Fe = { class: "tpl:shrink-0 tpl:rounded-full tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]" }, Ie = {
36
- key: 0,
37
- class: "tpl:mt-1 tpl:flex tpl:items-center"
38
- }, Le = {
39
- "data-testid": "saved-block-category",
40
- class: "tpl:max-w-full tpl:truncate tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]"
41
- }, Re = { class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1" }, ze = {
42
- key: 0,
43
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
44
- }, Be = ["title"], Ve = ["aria-label", "onClick"], He = [
45
- "aria-label",
46
- "title",
47
- "onClick"
48
- ], Ue = [
49
- "aria-label",
50
- "title",
51
- "onClick"
52
- ], We = {
53
- key: 2,
54
- class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:py-12"
55
- }, Ge = {
56
- key: 0,
57
- class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
58
- }, k = { class: "tpl:mt-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Ke = { class: "tpl:mt-1 tpl:max-w-[220px] tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, qe = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden tpl:border-l tpl:border-[var(--tpl-border)]" }, Je = {
59
- key: 0,
60
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-hidden"
61
- }, Ye = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Xe = {
62
- key: 1,
63
- class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:items-center tpl:justify-center tpl:px-4"
64
- }, Ze = { class: "tpl:mt-2 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, Qe = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-t tpl:px-5 tpl:py-3 tpl:border-[var(--tpl-border)]" }, $e = { class: "tpl:flex tpl:items-center tpl:gap-2" }, et = { class: "tpl:shrink-0 tpl:text-xs tpl:text-[var(--tpl-text-dim)]" }, tt = ["value"], nt = { class: "tpl:flex tpl:gap-2" }, rt = ["disabled"], A = /* @__PURE__ */ v({
65
- __name: "SavedBlocksBrowserModal",
66
- props: { visible: { type: Boolean } },
67
- emits: ["close", "insert"],
68
- setup(v, { emit: A }) {
69
- let it = v, j = A, at = te(() => import("./BlockPreviewCanvas-DKspIy8V.js").then((e) => e.n)), { t: M, format: N } = oe(), P = C(ae, "SavedBlocksBrowserModal"), F = C(ie, "SavedBlocksBrowserModal"), ot = a(re, void 0), I = o(""), L = o(""), R = o(null), z = o(null), B = o(null), V = o(""), H = o(""), U = o(null), W = o("end"), G = g(() => {
70
- let e = I.value.trim().toLowerCase(), t = L.value;
71
- return P.savedBlocks.value.filter((n) => !(e && !n.name.toLowerCase().includes(e) || t && n.category !== t));
72
- }), K = g(() => P.isLoading.value && P.savedBlocks.value.length === 0), st = g(() => I.value.trim().length > 0 || L.value !== ""), q = g(() => R.value ? P.savedBlocks.value.find((e) => e.id === R.value) ?? null : null), ct = g(() => {
73
- let e = [{
74
- value: "beginning",
75
- label: M.savedBlocks.insertAtBeginning
76
- }], t = F.content.value.blocks;
77
- for (let n = 0; n < t.length; n++) {
78
- let r = t[n], i = r.type, a = M.blocks[i] ?? r.type;
79
- e.push({
80
- value: r.id,
81
- label: N(M.savedBlocks.insertAfterBlock, { block: `${a} ${n + 1}` })
82
- });
83
- }
84
- return e.push({
85
- value: "end",
86
- label: M.savedBlocks.insertAtEnd
87
- }), e;
88
- }), lt = g(() => {
89
- if (W.value === "end") return;
90
- if (W.value === "beginning") return 0;
91
- let e = F.content.value.blocks.findIndex((e) => e.id === W.value);
92
- if (e !== -1) return e + 1;
93
- });
94
- n(() => it.visible, (e) => {
95
- if (e) {
96
- I.value = "", L.value = "", R.value = null, z.value = null, B.value = null;
97
- let e = F.state.selectedBlockId;
98
- if (e) {
99
- let t = F.content.value.blocks.findIndex((t) => t.id === e);
100
- W.value = t === -1 ? "end" : e;
101
- } else W.value = "end";
102
- }
103
- }, { immediate: !0 });
104
- function ut(e) {
105
- let t = [], n = /* @__PURE__ */ new Set();
106
- for (let r of e.content) if (!n.has(r.type) && T[r.type] && (n.add(r.type), t.push({
107
- type: r.type,
108
- icon: T[r.type]
109
- })), t.length >= 5) break;
110
- return t;
111
- }
112
- function J(e) {
113
- let t = new Set(e.content.map((e) => e.type));
114
- return Math.max(0, t.size - 5);
115
- }
116
- function Y(e) {
117
- let t = e.updatedAt ?? e.createdAt;
118
- return t ? pe(t, M.time, N) ?? "" : "";
119
- }
120
- function dt(e) {
121
- let t = e.updatedAt ?? e.createdAt;
122
- return t ? fe(t, ot) : "";
123
- }
124
- async function ft(e) {
125
- try {
126
- await P.remove(e), R.value === e && (R.value = null);
127
- } finally {
128
- z.value = null;
129
- }
130
- }
131
- async function pt(e) {
132
- P.canUpdateBlock(e) && (B.value = e.id, V.value = e.name, H.value = e.category ?? "", z.value = null, await ee(), U.value?.focus(), U.value?.select());
133
- }
134
- function X() {
135
- B.value = null, V.value = "", H.value = "";
136
- }
137
- async function Z(e) {
138
- if (B.value !== e) return;
139
- let t = V.value.trim(), n = H.value.trim(), r = P.savedBlocks.value.find((t) => t.id === e), i = {};
140
- if (t && t !== r?.name && (i.name = t), n !== (r?.category ?? "") && (i.category = n), Object.keys(i).length === 0) {
141
- X();
142
- return;
143
- }
144
- try {
145
- await P.update(e, i);
146
- } finally {
147
- X();
148
- }
149
- }
150
- function mt(e, t) {
151
- let n = e.currentTarget, r = e.relatedTarget;
152
- r && n.contains(r) || Z(t);
153
- }
154
- function Q() {
155
- q.value && j("insert", q.value, lt.value);
156
- }
157
- function $() {
158
- j("close");
159
- }
160
- function ht(e) {
161
- B.value || (e.key === "Escape" && $(), e.key === "Enter" && q.value && (e.preventDefault(), Q()));
162
- }
163
- return (n, a) => (d(), p(me, {
164
- visible: v.visible,
165
- onClose: $,
166
- onKeydown: ht
167
- }, {
168
- default: ne(() => [s("div", he, [
169
- s("div", ge, [s("h3", _e, f(h(M).savedBlocks.browse), 1), s("button", {
170
- "aria-label": h(M).savedBlocks.close,
171
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-1 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
172
- onClick: $
173
- }, [l(h(ue), {
174
- size: 16,
175
- "stroke-width": 2
176
- })], 8, ve)]),
177
- s("div", ye, [s("div", be, [
178
- s("div", xe, [s("div", Se, [l(h(se), {
179
- size: 14,
180
- "stroke-width": 2,
181
- class: "tpl:pointer-events-none tpl:absolute tpl:left-3 tpl:top-1/2 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]"
182
- }), e(s("input", {
183
- "onUpdate:modelValue": a[0] ||= (e) => I.value = e,
184
- type: "text",
185
- placeholder: h(M).savedBlocks.search,
186
- disabled: K.value,
187
- class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:pl-9 tpl:pr-3 tpl:text-sm tpl:outline-none tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
188
- }, null, 8, Ce), [[y, I.value]])]), h(P).categories.value.length > 0 ? e((d(), c("select", {
189
- key: 0,
190
- "onUpdate:modelValue": a[1] ||= (e) => L.value = e,
191
- "data-testid": "saved-blocks-category-filter",
192
- "aria-label": h(M).savedBlocks.filterByCategory,
193
- class: "tpl:h-8 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
194
- }, [s("option", Te, f(h(M).savedBlocks.allCategories), 1), (d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
195
- key: e,
196
- value: e
197
- }, f(e), 9, E))), 128))], 8, we)), [[x, L.value]]) : _("", !0)]),
198
- s("datalist", D, [(d(!0), c(m, null, u(h(P).categories.value, (e) => (d(), c("option", {
199
- key: e,
200
- value: e
201
- }, null, 8, O))), 128))]),
202
- s("div", Ee, [K.value ? (d(), c("div", {
203
- key: 0,
204
- "data-testid": "saved-blocks-loading",
205
- class: "tpl:flex tpl:flex-col tpl:gap-1",
206
- role: "status",
207
- "aria-busy": "true",
208
- "aria-label": h(M).savedBlocks.loading
209
- }, [(d(), c(m, null, u(3, (e) => s("div", {
210
- key: e,
211
- "aria-hidden": "true",
212
- class: "tpl-saved-block-skeleton tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)]"
213
- }, [...a[7] ||= [s("div", { class: "tpl:h-3 tpl:w-1/2 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1), s("div", { class: "tpl:mt-2 tpl:h-2.5 tpl:w-1/4 tpl:rounded tpl:bg-[var(--tpl-bg-hover)]" }, null, -1)]])), 64))], 8, De)) : G.value.length > 0 ? (d(), c("div", Oe, [(d(!0), c(m, null, u(G.value, (n) => (d(), c(m, { key: n.id }, [B.value === n.id ? (d(), c("div", {
214
- key: 0,
215
- class: "tpl:flex tpl:w-full tpl:flex-col tpl:gap-1 tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-primary)]",
216
- style: { "background-color": "var(--tpl-primary-light)" },
217
- onFocusout: (e) => mt(e, n.id)
218
- }, [e(s("input", {
219
- ref_for: !0,
220
- ref: (e) => U.value = e,
221
- "onUpdate:modelValue": a[2] ||= (e) => V.value = e,
222
- type: "text",
223
- "aria-label": h(M).savedBlocks.rename,
224
- class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
225
- onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[3] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
226
- }, null, 40, Ae), [[y, V.value]]), e(s("input", {
227
- "onUpdate:modelValue": a[4] ||= (e) => H.value = e,
228
- type: "text",
229
- "data-testid": "saved-blocks-edit-category",
230
- "aria-label": h(M).savedBlocks.category,
231
- placeholder: h(M).savedBlocks.categoryPlaceholder,
232
- list: "tpl-saved-block-browser-categories",
233
- class: "tpl:h-7 tpl:w-full tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
234
- onKeydown: [S(b((e) => Z(n.id), ["prevent", "stop"]), ["enter"]), a[5] ||= S(b((e) => X(), ["prevent", "stop"]), ["esc"])]
235
- }, null, 40, je), [[y, H.value]])], 40, ke)) : (d(), c("button", {
236
- key: 1,
237
- type: "button",
238
- "data-testid": "saved-block-card",
239
- "aria-pressed": R.value === n.id,
240
- class: "tpl:group/card tpl:w-full tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-md)] tpl:border tpl:bg-transparent tpl:px-3 tpl:py-2 tpl:text-left tpl:transition-all tpl:duration-[120ms]",
241
- style: r({
242
- borderColor: R.value === n.id ? "var(--tpl-primary)" : "var(--tpl-border)",
243
- backgroundColor: R.value === n.id ? "var(--tpl-primary-light)" : "transparent"
244
- }),
245
- onClick: (e) => R.value = n.id
246
- }, [
247
- s("div", Ne, [s("span", Pe, f(n.name), 1), s("span", Fe, f(h(N)(h(M).savedBlocks.blockCount, { count: n.content.length })), 1)]),
248
- n.category ? (d(), c("div", Ie, [s("span", Le, f(n.category), 1)])) : _("", !0),
249
- s("div", Re, [
250
- (d(!0), c(m, null, u(ut(n), (e) => (d(), p(i(e.icon), {
251
- key: e.type,
252
- size: 14,
253
- "stroke-width": 1.5,
254
- class: "tpl:text-[var(--tpl-text-dim)]"
255
- }))), 128)),
256
- J(n) > 0 ? (d(), c("span", ze, " +" + f(J(n)), 1)) : _("", !0),
257
- Y(n) ? (d(), c("span", {
258
- key: 1,
259
- "data-testid": "saved-block-updated",
260
- class: "tpl:ml-1 tpl:truncate tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]",
261
- title: dt(n)
262
- }, f(Y(n)), 9, Be)) : _("", !0),
263
- z.value === n.id ? (d(), c("button", {
264
- key: 2,
265
- "aria-label": h(M).savedBlocks.deleteConfirm,
266
- class: "tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:border-[var(--tpl-danger)] tpl:text-[var(--tpl-danger)]",
267
- style: { "background-color": "transparent" },
268
- onClick: b((e) => ft(n.id), ["stop"])
269
- }, f(h(M).savedBlocks.deleteConfirm), 9, Ve)) : (d(), c(m, { key: 3 }, [h(P).canUpdateBlock(n) ? (d(), c("button", {
270
- key: 0,
271
- class: "tpl-saved-block-rename-btn tpl:ml-auto tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]",
272
- "aria-label": h(M).savedBlocks.rename,
273
- title: h(M).savedBlocks.rename,
274
- onClick: b((e) => pt(n), ["stop"])
275
- }, [l(h(ce), {
276
- size: 12,
277
- "stroke-width": 1.5
278
- })], 8, He)) : _("", !0), h(P).canDeleteBlock(n) ? (d(), c("button", {
279
- key: 1,
280
- class: t(["tpl-saved-block-delete-btn tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-transparent tpl:p-0.5 tpl:transition-colors tpl:text-[var(--tpl-text-dim)]", { "tpl:ml-auto": !h(P).canUpdateBlock(n) }]),
281
- "aria-label": h(M).savedBlocks.delete,
282
- title: h(M).savedBlocks.delete,
283
- onClick: b((e) => z.value = n.id, ["stop"])
284
- }, [l(h(le), {
285
- size: 12,
286
- "stroke-width": 1.5
287
- })], 10, Ue)) : _("", !0)], 64))
288
- ])
289
- ], 12, Me))], 64))), 128))])) : (d(), c("div", We, [l(h(w), {
290
- size: 32,
291
- "stroke-width": 1,
292
- class: "tpl:text-[var(--tpl-text-dim)]"
293
- }), st.value ? (d(), c("p", Ge, f(h(M).savedBlocks.noResults), 1)) : (d(), c(m, { key: 1 }, [s("p", k, f(h(M).savedBlocks.empty), 1), s("p", Ke, f(h(M).savedBlocks.emptyHint), 1)], 64))]))])
294
- ]), s("div", qe, [q.value ? (d(), c("div", Je, [s("div", Ye, [l(h(at), { blocks: q.value.content }, null, 8, ["blocks"])])])) : (d(), c("div", Xe, [l(h(w), {
295
- size: 32,
296
- "stroke-width": 1,
297
- class: "tpl:text-[var(--tpl-text-dim)]"
298
- }), s("p", Ze, f(h(M).savedBlocks.selectToPreview), 1)]))])]),
299
- s("div", Qe, [s("div", $e, [s("label", et, f(h(M).savedBlocks.insertPosition), 1), e(s("select", {
300
- "onUpdate:modelValue": a[6] ||= (e) => W.value = e,
301
- class: "tpl:h-7 tpl:max-w-[220px] tpl:rounded-md tpl:border tpl:px-2 tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
302
- }, [(d(!0), c(m, null, u(ct.value, (e) => (d(), c("option", {
303
- key: e.value,
304
- value: e.value
305
- }, f(e.label), 9, tt))), 128))], 512), [[x, W.value]])]), s("div", nt, [s("button", {
306
- type: "button",
307
- "data-testid": "saved-blocks-browser-close",
308
- class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-[var(--tpl-shadow-sm)] tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]",
309
- onClick: $
310
- }, f(h(M).savedBlocks.close), 1), s("button", {
311
- type: "button",
312
- class: t(h(de)),
313
- disabled: !q.value,
314
- onClick: Q
315
- }, f(h(M).savedBlocks.insert), 11, rt)])])
316
- ])]),
317
- _: 1
318
- }, 8, ["visible"]));
319
- }
320
- });
321
- //#endregion
322
- export { A as default };
@@ -1,198 +0,0 @@
1
- import { Dt as e, G as t, Ot as n, S as r, c as i, d as a, g as o, h as s, i as c, k as l, kt as u, l as d, r as f, rt as p, s as m, u as h, v as g } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
2
- import { C as ee, S as te } from "./useEditorCore-CYGvurZa.js";
3
- import { K as ne, O as re, U as _, w as v } from "./keys-C3P1yxnr.js";
4
- import { t as y } from "./useI18n-CL6RfPzK.js";
5
- import { n as b } from "./usePopoverPosition-CWxaIWd3.js";
6
- import { a as ie, i as x, n as S, r as ae, t as oe } from "./RichTextEditorContent-riOB-rKD.js";
7
- import { o as se, s as ce } from "./MergeTagInput-D1hzsn2b.js";
8
- import { t as le } from "./loader-circle-B2Y8xZQb.js";
9
- //#region src/components/blocks/TitleEditor.vue?vue&type=script&setup=true&lang.ts
10
- var C = { class: "tpl-text-editor-wrapper tpl:relative" }, w = ["data-tpl-theme", "aria-label"], T = ["aria-label", "title"], E = ["aria-label", "title"], D = ["aria-label", "title"], O = {
11
- key: 0,
12
- class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]"
13
- }, k = ["aria-label", "title"], A = {
14
- key: 2,
15
- class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]"
16
- }, j = ["aria-label", "title"], M = {
17
- key: 1,
18
- class: "tpl:flex tpl:items-center tpl:gap-2 tpl:px-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
19
- }, N = /* @__PURE__ */ g({
20
- __name: "TitleEditor",
21
- props: {
22
- block: {},
23
- toolbarPosition: {}
24
- },
25
- emits: ["done"],
26
- setup(g, { emit: N }) {
27
- let P = g, F = N, I = r(_, null), L = r(ne, null), R = b(), z = r(re, null), B = r(v, null), V = m(() => (z?.isOpen.value ?? !1) || (B?.isOpen.value ?? !1)), { t: H } = y(), { editor: U, EditorContent: W, isLoading: G, initError: ue, retry: de, showLinkDialog: fe, linkUrl: K, linkColor: q, linkDialogRef: J, canRequestMergeTag: Y, canInsertLogicTag: X, openLinkDialog: Z, insertLink: pe, removeLink: me, closeLinkDialog: he, handleLinkKeydown: ge, handleAddMergeTag: Q, handleAddLogicTag: $ } = te({
28
- blockId: () => P.block.id,
29
- blockContent: () => P.block.content,
30
- onDone: () => F("done"),
31
- editorName: "TitleEditor",
32
- async loadExtensions({ mergeTags: e, syntax: t, triggerChar: n, autocompleteEnabled: r, suggestionEmptyText: i }) {
33
- let [{ Editor: a, EditorContent: o }, { default: s }, { default: c }, { MergeTagNode: l, MergeTagSuggestion: u, LogicMergeTagNode: d, LineBoundaryKeys: f }] = await Promise.all([
34
- import("./dist-BxFbxpgW.js").then((e) => e.r),
35
- import("./dist-DkcA6epL.js"),
36
- import("./dist-C1tsW_99.js"),
37
- import("./extensions-Bawm4BOM.js")
38
- ]);
39
- return {
40
- TiptapEditor: a,
41
- EC: o,
42
- extensions: [
43
- s.configure({
44
- heading: !1,
45
- codeBlock: !1,
46
- blockquote: !1,
47
- horizontalRule: !1,
48
- bulletList: !1,
49
- orderedList: !1,
50
- listItem: !1,
51
- strike: !1,
52
- link: !1
53
- }),
54
- ee(c).configure({
55
- openOnClick: !1,
56
- HTMLAttributes: {
57
- target: "_blank",
58
- rel: "noopener noreferrer"
59
- }
60
- }),
61
- l.configure({
62
- mergeTags: e,
63
- syntax: t
64
- }),
65
- d.configure({ syntax: t }),
66
- f,
67
- ...r && n && e.length > 0 ? [u.configure({
68
- mergeTags: e,
69
- char: n,
70
- emptyText: i,
71
- popoverRoot: R
72
- })] : []
73
- ]
74
- };
75
- }
76
- });
77
- return (r, m) => (l(), a("div", C, [
78
- p(R) && !V.value ? (l(), d(c, {
79
- key: 0,
80
- to: p(R)
81
- }, [i("div", {
82
- "data-tpl-theme": p(L),
83
- role: "toolbar",
84
- "aria-label": p(H).titleEditor.toolbar,
85
- class: "tpl tpl-text-toolbar tpl:absolute tpl:flex tpl:items-center tpl:gap-1 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:shadow-[var(--tpl-shadow-lg)]",
86
- style: n({
87
- ...p(I),
88
- top: `${g.toolbarPosition.top}px`,
89
- left: `${g.toolbarPosition.left}px`,
90
- transform: "translateY(-100%)"
91
- })
92
- }, [!p(G) && p(U) ? (l(), a(f, { key: 0 }, [
93
- i("button", {
94
- type: "button",
95
- class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": p(U)?.isActive("bold") }]),
96
- "aria-label": p(H).titleEditor.bold,
97
- title: p(H).titleEditor.bold,
98
- onClick: m[0] ||= (e) => p(U)?.chain().focus().toggleBold().run()
99
- }, [o(p(ie), {
100
- size: 16,
101
- "stroke-width": 2.5
102
- })], 10, T),
103
- i("button", {
104
- type: "button",
105
- class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": p(U)?.isActive("italic") }]),
106
- "aria-label": p(H).titleEditor.italic,
107
- title: p(H).titleEditor.italic,
108
- onClick: m[1] ||= (e) => p(U)?.chain().focus().toggleItalic().run()
109
- }, [o(p(x), {
110
- size: 16,
111
- "stroke-width": 2
112
- })], 10, E),
113
- m[8] ||= i("span", {
114
- class: "tpl:mx-1.5 tpl:h-6 tpl:w-px tpl:bg-[var(--tpl-border)]",
115
- "aria-hidden": "true"
116
- }, null, -1),
117
- i("button", {
118
- type: "button",
119
- class: e(["tpl-text-toolbar-btn", { "tpl-text-toolbar-btn--active": p(U)?.isActive("link") }]),
120
- "aria-label": p(H).titleEditor.addLink,
121
- title: p(H).titleEditor.addLink,
122
- onClick: m[2] ||= (...e) => p(Z) && p(Z)(...e)
123
- }, [o(p(ae), {
124
- size: 16,
125
- "stroke-width": 2
126
- })], 10, D),
127
- p(Y) ? (l(), a("span", O)) : h("", !0),
128
- p(Y) ? (l(), a("button", {
129
- key: 1,
130
- type: "button",
131
- class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]",
132
- "aria-label": p(H).mergeTag.insert,
133
- title: p(H).mergeTag.insert,
134
- onClick: m[3] ||= (...e) => p(Q) && p(Q)(...e)
135
- }, [o(p(se), {
136
- size: 16,
137
- "stroke-width": 2
138
- }), s(" " + u(p(H).mergeTag.insertShort), 1)], 8, k)) : h("", !0),
139
- p(X) ? (l(), a("span", A)) : h("", !0),
140
- p(X) ? (l(), a("button", {
141
- key: 3,
142
- type: "button",
143
- class: "tpl:flex tpl:h-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)]",
144
- "aria-label": p(H).logicTag.insert,
145
- title: p(H).logicTag.insert,
146
- "data-testid": "insert-logic-button",
147
- onClick: m[4] ||= (...e) => p($) && p($)(...e)
148
- }, [o(p(ce), {
149
- size: 16,
150
- "stroke-width": 2
151
- }), s(" " + u(p(H).logicTag.insertShort), 1)], 8, j)) : h("", !0)
152
- ], 64)) : (l(), a("div", M, [o(p(le), {
153
- class: "tpl-spinner",
154
- size: 14,
155
- "stroke-width": 2
156
- }), s(" " + u(p(H).errors.editorLoading), 1)]))], 12, w)], 8, ["to"])) : h("", !0),
157
- o(oe, {
158
- editor: p(U),
159
- "editor-content": p(W),
160
- "is-loading": p(G),
161
- "init-error": p(ue),
162
- onRetry: p(de)
163
- }, null, 8, [
164
- "editor",
165
- "editor-content",
166
- "is-loading",
167
- "init-error",
168
- "onRetry"
169
- ]),
170
- o(S, {
171
- visible: p(fe),
172
- "is-editing-link": p(U)?.isActive("link") ?? !1,
173
- "dialog-ref": p(J),
174
- "onUpdate:dialogRef": m[5] ||= (e) => t(J) ? J.value = e : null,
175
- "link-url": p(K),
176
- "onUpdate:linkUrl": m[6] ||= (e) => t(K) ? K.value = e : null,
177
- "link-color": p(q),
178
- "onUpdate:linkColor": m[7] ||= (e) => t(q) ? q.value = e : null,
179
- onClose: p(he),
180
- onInsert: p(pe),
181
- onRemove: p(me),
182
- onKeydown: p(ge)
183
- }, null, 8, [
184
- "visible",
185
- "is-editing-link",
186
- "dialog-ref",
187
- "link-url",
188
- "link-color",
189
- "onClose",
190
- "onInsert",
191
- "onRemove",
192
- "onKeydown"
193
- ])
194
- ]));
195
- }
196
- });
197
- //#endregion
198
- export { N as default };