@templatical/editor 0.43.0 → 0.43.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 (195) hide show
  1. package/dist/{AiChatSidebar-DOCvzGBe.js → AiChatSidebar-DTtMEXNR.js} +7 -7
  2. package/dist/{AiFeatureMenu-xCJeD07B.js → AiFeatureMenu-DFj-_S9b.js} +4 -4
  3. package/dist/{BlockIssueBadge-BJ3A6mqh.js → BlockIssueBadge-CyLmqjLl.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-BQXfqhzu.js → BlockPreviewCanvas-C6F66f3k.js} +2 -2
  5. package/dist/{CloudHeaderExtras-TFmBJ0Ry.js → CloudHeaderExtras-Z4K6OMn0.js} +2 -2
  6. package/dist/{CloudPanels-BnSBbYnw.js → CloudPanels-DOJ2Vske.js} +4 -4
  7. package/dist/{CollaboratorBar-7ry8EdUh.js → CollaboratorBar-BCkl3dKY.js} +2 -2
  8. package/dist/{CommentsPanel-CGEhbjx0.js → CommentsPanel-DPMi6-rb.js} +1 -1
  9. package/dist/{CommentsSidebar-CUpst9ou.js → CommentsSidebar-C1mQcyh3.js} +10 -10
  10. package/dist/{CountdownToolbar-B1a_UIuB.js → CountdownToolbar-DKmzpk__.js} +3 -3
  11. package/dist/{DesignReferenceSidebar-DkAmsBgM.js → DesignReferenceSidebar-CGRzOOb8.js} +5 -5
  12. package/dist/{IssuesPanel-lTpsCV4a.js → IssuesPanel-CsdxjjRm.js} +5 -5
  13. package/dist/{LogicTagInsertButton-B5YymR4U.js → LogicTagInsertButton-BX4jOUQy.js} +3 -3
  14. package/dist/{MediaEditModal-B1X8qtJb.js → MediaEditModal-Bm8uOKBx.js} +270 -230
  15. package/dist/{MediaPanels-DO30L1KS.js → MediaPanels-BNWtEntu.js} +1 -1
  16. package/dist/{MergeTagInput-B0M_-X0K.js → MergeTagInput-Mj8CFfX1.js} +1 -1
  17. package/dist/{MergeTagModeToggle-B-8W1tK7.js → MergeTagModeToggle-CinojvpV.js} +3 -3
  18. package/dist/{ParagraphEditor-DVGeU0Am.js → ParagraphEditor-DdOteRjD.js} +9 -9
  19. package/dist/{RestoreVersionDialog-DOhgYkiA.js → RestoreVersionDialog-B-i0wPjh.js} +3 -3
  20. package/dist/{RichTextEditorContent-AaLAArA0.js → RichTextEditorContent-CDtKOWsh.js} +4 -4
  21. package/dist/{SaveBlockDialog-36MzPD2S.js → SaveBlockDialog-DTcGPDMT.js} +8 -8
  22. package/dist/{SavedBlocksBrowserModal-B5nFKszf.js → SavedBlocksBrowserModal-BA5yXQi0.js} +9 -9
  23. package/dist/{SavedBlocksPanels-BZkbP7eB.js → SavedBlocksPanels-mfSALJqB.js} +1 -1
  24. package/dist/{SavedBlocksPickBar-ChoCMdu7.js → SavedBlocksPickBar-BOjduGI4.js} +2 -2
  25. package/dist/{TemplateScoringPanel-C6ellAcs.js → TemplateScoringPanel-Byz-ajjf.js} +11 -11
  26. package/dist/{TemplateSettings-C_0qK-zs.js → TemplateSettings-Bf5rfsU8.js} +5 -5
  27. package/dist/{TestEmailModal-CKW-VArm.js → TestEmailModal-DJo2yFLh.js} +6 -6
  28. package/dist/{TestEmailPanel-BylYzjyM.js → TestEmailPanel-CXIFWfDm.js} +1 -1
  29. package/dist/{TitleEditor-DoQ286_n.js → TitleEditor-BDtokkQF.js} +6 -6
  30. package/dist/{ToggleSwitch-CtZ6adlX.js → ToggleSwitch-BCYZvP1e.js} +1 -1
  31. package/dist/{Toolbar-B6dG5_IP.js → Toolbar-XOtJ_N58.js} +20 -20
  32. package/dist/{TplModal-DHwQXySQ.js → TplModal-C3mzMXof.js} +1 -1
  33. package/dist/{VersionHistoryMenu-DdspCRSA.js → VersionHistoryMenu-DRoFz15y.js} +5 -5
  34. package/dist/{VersionHistoryPanels-C6QxmRUH.js → VersionHistoryPanels-CeF0JnXI.js} +1 -1
  35. package/dist/{VersionPreviewBanner-XUuLe36h.js → VersionPreviewBanner-DQvIEKUU.js} +1 -1
  36. package/dist/{WrapperBlock-BumDudbj.js → WrapperBlock-DZwp4G7P.js} +1 -1
  37. package/dist/{blockTypeIcons-Sg8SY1NQ.js → blockTypeIcons-CAPoy6X7.js} +2 -2
  38. package/dist/bundle-stats.json +6 -6
  39. package/dist/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +6 -2
  40. package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js → AiChatSidebar-DW1uRkKE.js} +2 -2
  41. package/dist/cdn/chunks/{AiChatSidebar-DiG-EQ-E.js.map → AiChatSidebar-DW1uRkKE.js.map} +1 -1
  42. package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js → AiFeatureMenu-CHsgD78N.js} +3 -3
  43. package/dist/cdn/chunks/{AiFeatureMenu-4TgzmLb3.js.map → AiFeatureMenu-CHsgD78N.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js → BlockIssueBadge-CIqu8JnG.js} +2 -2
  45. package/dist/cdn/chunks/{BlockIssueBadge-ChQ0mPf5.js.map → BlockIssueBadge-CIqu8JnG.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js → BlockPreviewCanvas-Dtea66SI.js} +3 -3
  47. package/dist/cdn/chunks/{BlockPreviewCanvas-BpvK3Sh9.js.map → BlockPreviewCanvas-Dtea66SI.js.map} +1 -1
  48. package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js → CloudHeaderExtras-Kjj78__m.js} +3 -3
  49. package/dist/cdn/chunks/{CloudHeaderExtras-DqgOaWym.js.map → CloudHeaderExtras-Kjj78__m.js.map} +1 -1
  50. package/dist/cdn/chunks/{CloudPanels-INOiwkET.js → CloudPanels-DARXXD0q.js} +4 -4
  51. package/dist/cdn/chunks/{CloudPanels-INOiwkET.js.map → CloudPanels-DARXXD0q.js.map} +1 -1
  52. package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js → CollaboratorBar-C7O9mQJ_.js} +3 -3
  53. package/dist/cdn/chunks/{CollaboratorBar-CQ9EpYKQ.js.map → CollaboratorBar-C7O9mQJ_.js.map} +1 -1
  54. package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js → CommentsPanel-KH5_JS7_.js} +2 -2
  55. package/dist/cdn/chunks/{CommentsPanel-CjhxGMjL.js.map → CommentsPanel-KH5_JS7_.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js → CommentsSidebar-ucrNvgAQ.js} +2 -2
  57. package/dist/cdn/chunks/{CommentsSidebar-D9bqMnlt.js.map → CommentsSidebar-ucrNvgAQ.js.map} +1 -1
  58. package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js → CountdownToolbar-DVInzkj9.js} +4 -4
  59. package/dist/cdn/chunks/{CountdownToolbar-CIRx5w1U.js.map → CountdownToolbar-DVInzkj9.js.map} +1 -1
  60. package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js → DesignReferenceSidebar-pleljkEJ.js} +2 -2
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-C1-SbE_R.js.map → DesignReferenceSidebar-pleljkEJ.js.map} +1 -1
  62. package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js → IssuesPanel-CPcQIUni.js} +2 -2
  63. package/dist/cdn/chunks/{IssuesPanel-qKY6UDd-.js.map → IssuesPanel-CPcQIUni.js.map} +1 -1
  64. package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js → LogicTagInsertButton-DSrW9v0x.js} +2 -2
  65. package/dist/cdn/chunks/{LogicTagInsertButton-CItDS_U1.js.map → LogicTagInsertButton-DSrW9v0x.js.map} +1 -1
  66. package/dist/cdn/chunks/{MediaEditModal-CzUtXkpk.js → MediaEditModal-BHp7euCZ.js} +272 -232
  67. package/dist/cdn/chunks/MediaEditModal-BHp7euCZ.js.map +1 -0
  68. package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js → MediaPanels-CGIRlO48.js} +2 -2
  69. package/dist/cdn/chunks/{MediaPanels-DOLsh7WC.js.map → MediaPanels-CGIRlO48.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js → MergeTagInput-BSFofWuc.js} +2 -2
  71. package/dist/cdn/chunks/{MergeTagInput-B33u3nxj.js.map → MergeTagInput-BSFofWuc.js.map} +1 -1
  72. package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js → MergeTagModeToggle-D7KlTFZV.js} +2 -2
  73. package/dist/cdn/chunks/{MergeTagModeToggle-Bz1CH3NT.js.map → MergeTagModeToggle-D7KlTFZV.js.map} +1 -1
  74. package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js → ParagraphEditor-CokXagL1.js} +6 -6
  75. package/dist/cdn/chunks/{ParagraphEditor-B6A4yQ0A.js.map → ParagraphEditor-CokXagL1.js.map} +1 -1
  76. package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js → RestoreVersionDialog-C-XEncAM.js} +3 -3
  77. package/dist/cdn/chunks/{RestoreVersionDialog-B9rujl9w.js.map → RestoreVersionDialog-C-XEncAM.js.map} +1 -1
  78. package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js → RichTextEditorContent-DS_2UsJX.js} +4 -4
  79. package/dist/cdn/chunks/{RichTextEditorContent-dOg1xFqv.js.map → RichTextEditorContent-DS_2UsJX.js.map} +1 -1
  80. package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js → SaveBlockDialog-D8OAKF_k.js} +6 -6
  81. package/dist/cdn/chunks/{SaveBlockDialog-BNAeb6--.js.map → SaveBlockDialog-D8OAKF_k.js.map} +1 -1
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js → SavedBlocksBrowserModal-B6GN_llD.js} +6 -6
  83. package/dist/cdn/chunks/{SavedBlocksBrowserModal--FoVqEnT.js.map → SavedBlocksBrowserModal-B6GN_llD.js.map} +1 -1
  84. package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js → SavedBlocksPanels-hRCREVxS.js} +2 -2
  85. package/dist/cdn/chunks/{SavedBlocksPanels-qKyPnVgk.js.map → SavedBlocksPanels-hRCREVxS.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js → SavedBlocksPickBar-C5YrK0iB.js} +3 -3
  87. package/dist/cdn/chunks/{SavedBlocksPickBar-BvLwca4B.js.map → SavedBlocksPickBar-C5YrK0iB.js.map} +1 -1
  88. package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js → TemplateScoringPanel-DXyQjcdU.js} +2 -2
  89. package/dist/cdn/chunks/{TemplateScoringPanel-ebsrVge3.js.map → TemplateScoringPanel-DXyQjcdU.js.map} +1 -1
  90. package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js → TemplateSettings-da14bXlk.js} +4 -4
  91. package/dist/cdn/chunks/{TemplateSettings-BaEVdUTM.js.map → TemplateSettings-da14bXlk.js.map} +1 -1
  92. package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js → TestEmailModal-Dl_cAyj-.js} +6 -6
  93. package/dist/cdn/chunks/{TestEmailModal-DpYirvEL.js.map → TestEmailModal-Dl_cAyj-.js.map} +1 -1
  94. package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js → TestEmailPanel-CVZGOKaQ.js} +2 -2
  95. package/dist/cdn/chunks/{TestEmailPanel-PAT70a2g.js.map → TestEmailPanel-CVZGOKaQ.js.map} +1 -1
  96. package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js → TitleEditor-DO8OdG_w.js} +5 -5
  97. package/dist/cdn/chunks/{TitleEditor-Dc7YB6Uy.js.map → TitleEditor-DO8OdG_w.js.map} +1 -1
  98. package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js → ToggleSwitch-D5Wi6Env.js} +2 -2
  99. package/dist/cdn/chunks/{ToggleSwitch-D-8dCEbI.js.map → ToggleSwitch-D5Wi6Env.js.map} +1 -1
  100. package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js → Toolbar-CXDE8xM-.js} +7 -7
  101. package/dist/cdn/chunks/{Toolbar-BDzhrmGV.js.map → Toolbar-CXDE8xM-.js.map} +1 -1
  102. package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js → TplModal-CFi-Psf7.js} +2 -2
  103. package/dist/cdn/chunks/{TplModal-BbHRUc1Y.js.map → TplModal-CFi-Psf7.js.map} +1 -1
  104. package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js → VersionHistoryMenu-1bfCr14E.js} +2 -2
  105. package/dist/cdn/chunks/{VersionHistoryMenu-C_bBKOYU.js.map → VersionHistoryMenu-1bfCr14E.js.map} +1 -1
  106. package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js → VersionHistoryPanels-DbgbyAdW.js} +2 -2
  107. package/dist/cdn/chunks/{VersionHistoryPanels-BoJsPIKa.js.map → VersionHistoryPanels-DbgbyAdW.js.map} +1 -1
  108. package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js → VersionPreviewBanner-BaOTRIrm.js} +2 -2
  109. package/dist/cdn/chunks/{VersionPreviewBanner-CKyrcgxJ.js.map → VersionPreviewBanner-BaOTRIrm.js.map} +1 -1
  110. package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js → WrapperBlock-BYNfYvl3.js} +2 -2
  111. package/dist/cdn/chunks/{WrapperBlock-CGg6rBnx.js.map → WrapperBlock-BYNfYvl3.js.map} +1 -1
  112. package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js → blockTypeIcons-B_IAjnTD.js} +2 -2
  113. package/dist/cdn/chunks/{blockTypeIcons-CdfCfqHE.js.map → blockTypeIcons-B_IAjnTD.js.map} +1 -1
  114. package/dist/cdn/chunks/{ca-BTf1Zbqb.js → ca-CYQH3J0b.js} +7 -3
  115. package/dist/cdn/chunks/ca-CYQH3J0b.js.map +1 -0
  116. package/dist/cdn/chunks/{de-xzrh9PA3.js → de-JvCTMJPy.js} +7 -3
  117. package/dist/cdn/chunks/de-JvCTMJPy.js.map +1 -0
  118. package/dist/cdn/chunks/{editor-modal-CZQArGNj.js → editor-modal-BDOfw3l0.js} +472 -428
  119. package/dist/cdn/chunks/editor-modal-BDOfw3l0.js.map +1 -0
  120. package/dist/cdn/chunks/en-DxpXHoxJ.js +2 -0
  121. package/dist/cdn/chunks/{es-BT4LSpE2.js → es-CAv-Vldw.js} +7 -3
  122. package/dist/cdn/chunks/es-CAv-Vldw.js.map +1 -0
  123. package/dist/cdn/chunks/{extensions-Dy251lPd.js → extensions-1hJBHnGv.js} +2 -2
  124. package/dist/cdn/chunks/{extensions-Dy251lPd.js.map → extensions-1hJBHnGv.js.map} +1 -1
  125. package/dist/{fr-CI7OJoql.js → cdn/chunks/fr-DVPtxpR6.js} +8 -2
  126. package/dist/cdn/chunks/fr-DVPtxpR6.js.map +1 -0
  127. package/dist/cdn/chunks/{icons-CQnjugjy.js → icons-BrAyaJ0T.js} +6 -6
  128. package/dist/cdn/chunks/{icons-CQnjugjy.js.map → icons-BrAyaJ0T.js.map} +1 -1
  129. package/dist/{ja-DhlWUfke.js → cdn/chunks/ja-dcWzjStz.js} +8 -2
  130. package/dist/cdn/chunks/ja-dcWzjStz.js.map +1 -0
  131. package/dist/{nl-D8y5OWGB.js → cdn/chunks/nl-LZNqQgE4.js} +8 -2
  132. package/dist/cdn/chunks/nl-LZNqQgE4.js.map +1 -0
  133. package/dist/cdn/chunks/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +7 -3
  134. package/dist/cdn/chunks/pt-BR-D6P_mNwA.js.map +1 -0
  135. package/dist/cdn/chunks/{src-CG5WUNg7.js → src-D5ceT_Y4.js} +2 -2
  136. package/dist/cdn/chunks/{src-CG5WUNg7.js.map → src-D5ceT_Y4.js.map} +1 -1
  137. package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js → useEditorCore-BTKqlRIg.js} +5 -5
  138. package/dist/cdn/chunks/{useEditorCore-DoX2RgTl.js.map → useEditorCore-BTKqlRIg.js.map} +1 -1
  139. package/dist/cdn/editor.css +1 -1
  140. package/dist/cdn/editor.js +14 -14
  141. package/dist/{check-BMx_TLAS.js → check-CA6fvSIp.js} +1 -1
  142. package/dist/{chevron-down-KZf5mh9_.js → chevron-down-DYGJgpqJ.js} +1 -1
  143. package/dist/{chevron-right-BLZ60Vxw.js → chevron-right-Dm5_X4j6.js} +1 -1
  144. package/dist/{chevron-up-B9ynB8eU.js → chevron-up-Ds9ormyq.js} +1 -1
  145. package/dist/{circle-alert-pjvFFDrF.js → circle-alert-BYXE0olE.js} +1 -1
  146. package/dist/{clock-CiiTBfF3.js → clock-Ch1-h0sb.js} +1 -1
  147. package/dist/{copy-BF0_pQjH.js → copy-DLNyaPza.js} +1 -1
  148. package/dist/{createLucideIcon-C2YOVVWx.js → createLucideIcon-BrPnbRQT.js} +5 -5
  149. package/dist/{de-xzrh9PA3.js → de-JvCTMJPy.js} +6 -2
  150. package/dist/{editor-modal-99FB40dl.js → editor-modal-Cl5GFWTQ.js} +484 -440
  151. package/dist/en-CdCFaV2V.js +2 -0
  152. package/dist/{es-BT4LSpE2.js → es-CAv-Vldw.js} +6 -2
  153. package/dist/{extensions-DqQXxrvP.js → extensions-AKHJ0lax.js} +1 -1
  154. package/dist/{eye-RdXYgrQZ.js → eye-_7xKFxQh.js} +1 -1
  155. package/dist/{cdn/chunks/fr-CI7OJoql.js → fr-DVPtxpR6.js} +6 -4
  156. package/dist/{image-up-BwdoReQt.js → image-up-Ck-xPOGS.js} +1 -1
  157. package/dist/{info-zFMSGrL1.js → info-CBBNLK_i.js} +1 -1
  158. package/dist/{cdn/chunks/ja-DhlWUfke.js → ja-dcWzjStz.js} +6 -4
  159. package/dist/{link-D7orqFBT.js → link-BA_V9Nns.js} +1 -1
  160. package/dist/{list-BGt4Pgxc.js → list-BTujzSSo.js} +1 -1
  161. package/dist/{loader-circle-BVBgkRGz.js → loader-circle-B5OQFRUF.js} +1 -1
  162. package/dist/{message-circle-D8YLsarv.js → message-circle-DWXr27lZ.js} +1 -1
  163. package/dist/{cdn/chunks/nl-D8y5OWGB.js → nl-LZNqQgE4.js} +6 -4
  164. package/dist/{package-CuFvk0L5.js → package-DXW9QTU3.js} +1 -1
  165. package/dist/{pencil-DRYbmZW7.js → pencil-QmONZtjF.js} +1 -1
  166. package/dist/{plus-Dv0b3kh0.js → plus-XxHKE_GT.js} +1 -1
  167. package/dist/{pt-BR-DMCbUBvJ.js → pt-BR-D6P_mNwA.js} +6 -2
  168. package/dist/{refresh-cw-gYTIS5bJ.js → refresh-cw-DhXU8dCo.js} +1 -1
  169. package/dist/{search-D84_Ki_a.js → search-CpFaMrnL.js} +1 -1
  170. package/dist/{send-Cn-8_H_U.js → send-CFK3e6tQ.js} +1 -1
  171. package/dist/{shield-check-BOoVWJtD.js → shield-check-ndwpOTik.js} +1 -1
  172. package/dist/{smartphone-4Ej3PBw5.js → smartphone-DndMh9W6.js} +1 -1
  173. package/dist/{socialIcons-CzRJskEk.js → socialIcons-D43BLoTu.js} +1 -1
  174. package/dist/{sparkles-D3vnNe7O.js → sparkles-c1M5lwAQ.js} +1 -1
  175. package/dist/style.css +1 -1
  176. package/dist/templatical-editor.js +28 -28
  177. package/dist/{text-align-start-Ci2h_Xly.js → text-align-start-DOtBufPq.js} +1 -1
  178. package/dist/{trash-wmi4UKvv.js → trash-DmaPdiUk.js} +1 -1
  179. package/dist/{triangle-alert-DJ0r2wmQ.js → triangle-alert-DqvxsSNL.js} +1 -1
  180. package/dist/{upload-XMde-TXf.js → upload-CO_hogFv.js} +1 -1
  181. package/dist/{useEditorCore-CAhRAya8.js → useEditorCore-0K8joh4X.js} +11 -11
  182. package/dist/{useScrollToBlock-B4F7KCrf.js → useScrollToBlock-BU5A9eS9.js} +1 -1
  183. package/dist/{x-BWrtpVl-.js → x-BCop_VsL.js} +1 -1
  184. package/package.json +8 -8
  185. package/dist/cdn/chunks/MediaEditModal-CzUtXkpk.js.map +0 -1
  186. package/dist/cdn/chunks/ca-BTf1Zbqb.js.map +0 -1
  187. package/dist/cdn/chunks/de-xzrh9PA3.js.map +0 -1
  188. package/dist/cdn/chunks/editor-modal-CZQArGNj.js.map +0 -1
  189. package/dist/cdn/chunks/en-9unxBjV8.js +0 -2
  190. package/dist/cdn/chunks/es-BT4LSpE2.js.map +0 -1
  191. package/dist/cdn/chunks/fr-CI7OJoql.js.map +0 -1
  192. package/dist/cdn/chunks/ja-DhlWUfke.js.map +0 -1
  193. package/dist/cdn/chunks/nl-D8y5OWGB.js.map +0 -1
  194. package/dist/cdn/chunks/pt-BR-DMCbUBvJ.js.map +0 -1
  195. package/dist/en-BvOjRLiw.js +0 -2
@@ -0,0 +1,2 @@
1
+ import { i as e } from "./editor-modal-BDOfw3l0.js";
2
+ export { e as default };
@@ -13,7 +13,9 @@ var e = { mediaLibrary: {
13
13
  noFiles: "No se han encontrado archivos",
14
14
  noSearchResults: "Ningún archivo coincide con tu búsqueda",
15
15
  dropOrClick: "Suelta los archivos aquí o haz clic para subirlos",
16
- acceptedFormats: "Imágenes, PDF, vídeo, audio y documentos (máx. 10 MB)",
16
+ acceptedAnyType: "Cualquier tipo de archivo",
17
+ acceptedFormatsMaxSize: "{formats} (máx. {size})",
18
+ uploadRejected: "No se ha subido, tipo o tamaño no admitido: {files}",
17
19
  uploading: "Subiendo...",
18
20
  uploadingProgress: "Subiendo {current} de {total}...",
19
21
  selectImage: "Seleccionar imagen",
@@ -60,12 +62,14 @@ var e = { mediaLibrary: {
60
62
  replaceFile: "Reemplazar archivo",
61
63
  replaceWarningTitle: "Reemplazar archivo",
62
64
  replaceWarningMessage: "Estás a punto de reemplazar este archivo. El archivo de reemplazo debe tener la misma extensión ({extension}).",
63
- replaceWarningUsageNote: "Este archivo se utiliza en {count} plantilla(s). Al reemplazarlo, se actualizarán todas las referencias.",
65
+ replaceWarningUsageNote: "Este archivo se utiliza en {count} plantilla(s). Revísalas después de reemplazarlo.",
64
66
  replaceSelectFile: "Seleccionar archivo de reemplazo",
65
67
  replace: "Reemplazar",
66
68
  replacing: "Reemplazando...",
67
69
  replaceError: "No se ha podido reemplazar el archivo",
68
70
  saving: "Guardando...",
71
+ editSaveError: "No se han podido guardar los cambios. Inténtalo de nuevo.",
72
+ editCropError: "No se ha podido procesar la imagen editada. Inténtalo de nuevo.",
69
73
  cropAspectRatio: "Relación de aspecto",
70
74
  cropFree: "Libre",
71
75
  cropSquare: "1:1",
@@ -91,4 +95,4 @@ var e = { mediaLibrary: {
91
95
  //#endregion
92
96
  export { e as default };
93
97
 
94
- //# sourceMappingURL=es-BT4LSpE2.js.map
98
+ //# sourceMappingURL=es-CAv-Vldw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-CAv-Vldw.js","names":["es"],"sources":["../../../../media-library/src/i18n/locales/es.ts"],"sourcesContent":["const es = {\n mediaLibrary: {\n title: \"Biblioteca multimedia\",\n searchPlaceholder: \"Buscar archivos...\",\n allFiles: \"Todos los archivos\",\n filterAll: \"Todos los tipos\",\n filterImages: \"Imágenes\",\n filterDocuments: \"Documentos\",\n filterVideos: \"Vídeos\",\n filterAudio: \"Audio\",\n newFolder: \"Nueva carpeta\",\n folderName: \"Nombre de la carpeta\",\n noFiles: \"No se han encontrado archivos\",\n noSearchResults: \"Ningún archivo coincide con tu búsqueda\",\n dropOrClick: \"Suelta los archivos aquí o haz clic para subirlos\",\n acceptedAnyType: \"Cualquier tipo de archivo\",\n acceptedFormatsMaxSize: \"{formats} (máx. {size})\",\n uploadRejected: \"No se ha subido, tipo o tamaño no admitido: {files}\",\n uploading: \"Subiendo...\",\n uploadingProgress: \"Subiendo {current} de {total}...\",\n selectImage: \"Seleccionar imagen\",\n selectFile: \"Seleccionar archivo\",\n deleteSelected: \"Eliminar\",\n copyUrl: \"Copiar URL\",\n copied: \"¡Copiada!\",\n browseMedia: \"Explorar la biblioteca multimedia\",\n renameFolder: \"Cambiar nombre de la carpeta\",\n addSubfolder: \"Añadir subcarpeta\",\n subfolderName: \"Nombre de la subcarpeta\",\n sortNewest: \"Más recientes primero\",\n sortOldest: \"Más antiguos primero\",\n sortNameAsc: \"Nombre de A a Z\",\n sortNameDesc: \"Nombre de Z a A\",\n sortSizeAsc: \"Más pequeños primero\",\n sortSizeDesc: \"Más grandes primero\",\n moveSelected: \"Mover\",\n moveToRoot: \"Todos los archivos\",\n currentFolder: \"(actual)\",\n confirmDelete: \"¿Confirmar?\",\n renameFile: \"Cambiar nombre\",\n editFile: \"Editar archivo\",\n fileName: \"Nombre del archivo\",\n altText: \"Texto alternativo\",\n altTextPlaceholder: \"Describe esta imagen para mejorar la accesibilidad\",\n saveChanges: \"Guardar\",\n cancel: \"Cancelar\",\n frequentlyUsed: \"Usados frecuentemente\",\n deleteWarningTitle: \"Eliminar archivo\",\n deleteWarningMessage: \"¿Estás seguro? Esta acción es irreversible.\",\n deleteWarningUsageNote:\n \"Los siguientes archivos se utilizan en plantillas. Si los eliminas, es posible que esas plantillas dejen de funcionar correctamente.\",\n deleteAnyway: \"Eliminar\",\n usedInTemplates: \"Usado en {count} plantilla(s)\",\n viewGrid: \"Vista de cuadrícula\",\n viewList: \"Vista de lista\",\n showFolders: \"Mostrar carpetas\",\n hideFolders: \"Ocultar carpetas\",\n importFromUrl: \"Importar desde URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Importar\",\n importing: \"Importando...\",\n importError: \"No se ha podido importar desde la URL\",\n replaceFile: \"Reemplazar archivo\",\n replaceWarningTitle: \"Reemplazar archivo\",\n replaceWarningMessage:\n \"Estás a punto de reemplazar este archivo. El archivo de reemplazo debe tener la misma extensión ({extension}).\",\n replaceWarningUsageNote:\n \"Este archivo se utiliza en {count} plantilla(s). Revísalas después de reemplazarlo.\",\n replaceSelectFile: \"Seleccionar archivo de reemplazo\",\n replace: \"Reemplazar\",\n replacing: \"Reemplazando...\",\n replaceError: \"No se ha podido reemplazar el archivo\",\n saving: \"Guardando...\",\n editSaveError: \"No se han podido guardar los cambios. Inténtalo de nuevo.\",\n editCropError:\n \"No se ha podido procesar la imagen editada. Inténtalo de nuevo.\",\n cropAspectRatio: \"Relación de aspecto\",\n cropFree: \"Libre\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Anchura máxima\",\n cropMaxHeight: \"Altura máxima\",\n cropOutputSize: \"Tamaño de salida\",\n cropPixels: \"px\",\n cropOptional: \"(opcional)\",\n close: \"Cerrar\",\n searchAriaLabel: \"Buscar archivos\",\n filterAriaLabel: \"Filtrar por tipo\",\n filesListAriaLabel: \"Archivos\",\n loading: \"Cargando\",\n expandFolder: \"Expandir carpeta\",\n collapseFolder: \"Contraer carpeta\",\n deleteFolder: \"Eliminar carpeta\",\n deleteFolderConfirm: \"Confirmar eliminación\",\n storageTooltip: \"{used} de {total} usados ({remaining} restantes)\",\n },\n};\n\nexport default es;\n"],"mappings":";AAAA,IAAMA,IAAK,EACT,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,iBAAiB;CACjB,aAAa;CACb,iBAAiB;CACjB,wBAAwB;CACxB,gBAAgB;CAChB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,eAAe;CACf,eACE;CACF,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,OAAO;CACP,iBAAiB;CACjB,iBAAiB;CACjB,oBAAoB;CACpB,SAAS;CACT,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,qBAAqB;CACrB,gBAAgB;AAClB,EACF"}
@@ -3,7 +3,7 @@ import { a as y, d as b, o as x, r as S } from "./src-BR3I3gOW.js";
3
3
  import { t as C } from "./useI18n-CyO_Nmca.js";
4
4
  import { t as w } from "./useMergeTag-C5MyHYxJ.js";
5
5
  import { _ as T, g as E, h as D, n as O, r as k, t as A, v as j, y as M } from "./tiptap-D1u8JIUW.js";
6
- import { a as N, o as P, s as F } from "./LogicTagInsertButton-CItDS_U1.js";
6
+ import { a as N, o as P, s as F } from "./LogicTagInsertButton-DSrW9v0x.js";
7
7
  //#region src/extensions/FontSize.ts
8
8
  var I = D.create({
9
9
  name: "fontSize",
@@ -527,4 +527,4 @@ var $ = D.create({
527
527
  //#endregion
528
528
  export { I as FontSize, L as LetterSpacing, R as LineBoundaryKeys, z as LineHeight, K as LogicMergeTagNode, Z as MergeTagNode, $ as MergeTagSuggestion, P as filterMergeTags, F as handleSuggestionKeyDown };
529
529
 
530
- //# sourceMappingURL=extensions-Dy251lPd.js.map
530
+ //# sourceMappingURL=extensions-1hJBHnGv.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extensions-Dy251lPd.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createBlock","_unref","_normalizeClass","_normalizeStyle","_withCtx","_withDirectives","_createElementBlock","_vModelText","_withModifiers","_withKeys","_toDisplayString","_createElementVNode","_createCommentVNode","_sfc_main","LogicMergeTagNodeView","_openBlock","_createBlock","_unref","_withCtx","_withDirectives","_createElementBlock","_normalizeClass","_vModelText","_withModifiers","_withKeys","_toDisplayString","_createElementVNode","_sfc_main","MergeTagNodeView","Suggestion","withCtx","openBlock","ref","defineComponent","withDirectives","onScopeDispose","unref","withKeys","normalizeClass","computed","createElementBlock","createCommentVNode","nextTick","withModifiers","normalizeStyle","createBlock","vModelText","createBaseVNode","toDisplayString","getLogicMergeTagKeyword","isLogicMergeTagValue","getMergeTagLabel","SYNTAX_PRESETS","useI18n","useMergeTag","Node","InputRule","Extension","NodeViewWrapper","VueNodeViewRenderer","src_default","PasteRule","mergeAttributes","createMergeTagPopup","filterMergeTags","handleSuggestionKeyDown","FontSize","element","attributes","chain","size","LetterSpacing","spacing","LineBoundaryKeys","moveToLineBoundary","view","editor","selection","direction","LineHeight","commands","type","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","LogicMergeTagNodeView_default","props","__props","isValid","syntax","displayKeyword","isEditing","editValue","inputRef","handled","startEditing","finishEditing","newValue","handleKeydown","event","_cache","$event","t","args","isNodeSelected","$from","$to","nodeTypeName","renderVueNodeView","component","LogicMergeTagNode","node","keyword","HTMLAttributes","inputRegex","fullValue","match","range","pasteRegex","_hoisted_1","_hoisted_2","_hoisted_3","MergeTagNodeView_default","displayLabel","getMergeTagDisplayLabel","canRepick","canRepickMergeTag","disposed","isEditValueValid","isMergeTagValue","repick","replacement","requestMergeTag","findMergeTag","activate","format","showRawValue","MergeTagNode","label","attrs","createMergeTagSuggestionRenderer","popup","emptyText","popoverRootRef","item","MergeTagSuggestion","tags","config","query"],"sources":["../../../src/extensions/FontSize.ts","../../../src/extensions/LetterSpacing.ts","../../../src/extensions/LineBoundaryKeys.ts","../../../src/extensions/LineHeight.ts","../../../src/extensions/LogicMergeTagNodeView.vue","../../../src/extensions/LogicMergeTagNodeView.vue","../../../src/extensions/isNodeSelected.ts","../../../src/extensions/renderVueNodeView.ts","../../../src/extensions/LogicMergeTagNode.ts","../../../src/extensions/MergeTagNodeView.vue","../../../src/extensions/MergeTagNodeView.vue","../../../src/extensions/MergeTagNode.ts","../../../src/extensions/MergeTagSuggestion.ts"],"sourcesContent":["import { Extension } from \"@tiptap/core\";\n\nexport interface FontSizeOptions {\n types: string[];\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n fontSize: {\n setFontSize: (size: string) => ReturnType;\n unsetFontSize: () => ReturnType;\n };\n }\n}\n\nexport const FontSize = Extension.create<FontSizeOptions>({\n name: \"fontSize\",\n\n addOptions() {\n return {\n types: [\"textStyle\"],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontSize: {\n default: null,\n parseHTML: (element) =>\n element.style.fontSize?.replace(/['\"]+/g, \"\") || null,\n renderHTML: (attributes) => {\n if (!attributes.fontSize) {\n return {};\n }\n return {\n style: `font-size: ${attributes.fontSize}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setFontSize:\n (size: string) =>\n ({ chain }) => {\n return chain().setMark(\"textStyle\", { fontSize: size }).run();\n },\n unsetFontSize:\n () =>\n ({ chain }) => {\n return chain()\n .setMark(\"textStyle\", { fontSize: null })\n .removeEmptyTextStyle()\n .run();\n },\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\nexport interface LetterSpacingOptions {\n types: string[];\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n letterSpacing: {\n setLetterSpacing: (spacing: string) => ReturnType;\n unsetLetterSpacing: () => ReturnType;\n };\n }\n}\n\nexport const LetterSpacing = Extension.create<LetterSpacingOptions>({\n name: \"letterSpacing\",\n\n addOptions() {\n return {\n types: [\"textStyle\"],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n letterSpacing: {\n default: null,\n parseHTML: (element) =>\n element.style.letterSpacing?.replace(/['\"]+/g, \"\") || null,\n renderHTML: (attributes) => {\n if (!attributes.letterSpacing) {\n return {};\n }\n return {\n style: `letter-spacing: ${attributes.letterSpacing}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setLetterSpacing:\n (spacing: string) =>\n ({ chain }) => {\n return chain().setMark(\"textStyle\", { letterSpacing: spacing }).run();\n },\n unsetLetterSpacing:\n () =>\n ({ chain }) => {\n return chain()\n .setMark(\"textStyle\", { letterSpacing: null })\n .removeEmptyTextStyle()\n .run();\n },\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\n/**\n * Routes plain End/Home through `Selection.modify` instead of the browser's\n * native caret movement.\n *\n * Chromium (verified 140–151, including stable Chrome) has a bug where a\n * native End or Home pressed while a triple-click selection is active puts\n * Blink's selection state into a mode where the next typed character\n * natively smooth-scrolls the nearest scrollable ancestor (the editor's\n * canvas, `.tpl-body`) to its very bottom (End) or top (Home), dragging the\n * caret out of view. The state cannot be repaired after the fact — clearing\n * or re-setting the DOM selection, blur/refocus, and preventDefault on the\n * clicks all fail — but a programmatic caret move never arms it.\n *\n * `Selection.modify(\"move\", direction, \"lineboundary\")` is the exact\n * equivalent of the native key (visual line boundary, bidi-aware via the\n * logical forward/backward directions), so behavior is unchanged for users.\n * Shift+End / Shift+Home extend selections natively and do not trigger the\n * bug, so only the plain keys are bound — a keymap entry without modifiers\n * never matches the shifted keys.\n */\nexport const LineBoundaryKeys = Extension.create({\n name: \"lineBoundaryKeys\",\n\n addKeyboardShortcuts() {\n const moveToLineBoundary =\n (direction: \"forward\" | \"backward\") =>\n ({ editor }: { editor: { view: unknown } }): boolean => {\n const view = editor.view as {\n composing: boolean;\n root: DocumentOrShadowRoot & {\n getSelection?: () => Selection | null;\n };\n dom: HTMLElement;\n };\n // During IME composition End/Home commit the composition; leave\n // that to the browser.\n if (!view || view.composing) return false;\n // `view.root` is the editable's Document or ShadowRoot, so the\n // selection resolves correctly in both mount modes. ShadowRoot's\n // getSelection is Chromium-only; elsewhere fall back to the owner\n // document (Chromium is also the only engine with the bug).\n const selection =\n typeof view.root?.getSelection === \"function\"\n ? view.root.getSelection()\n : (view.dom?.ownerDocument?.getSelection?.() ?? null);\n // `modify` is non-standard; without it, or with a selection that\n // is not ours, native handling is the safer default.\n if (!selection || typeof selection.modify !== \"function\") return false;\n if (!selection.anchorNode || !view.dom.contains(selection.anchorNode)) {\n return false;\n }\n selection.modify(\"move\", direction, \"lineboundary\");\n return true;\n };\n\n return {\n End: moveToLineBoundary(\"forward\"),\n Home: moveToLineBoundary(\"backward\"),\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\nexport interface LineHeightOptions {\n types: string[];\n defaultLineHeight: string;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n lineHeight: {\n setLineHeight: (lineHeight: string) => ReturnType;\n unsetLineHeight: () => ReturnType;\n };\n }\n}\n\nexport const LineHeight = Extension.create<LineHeightOptions>({\n name: \"lineHeight\",\n\n addOptions() {\n return {\n types: [\"paragraph\"],\n defaultLineHeight: \"1.5\",\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) => element.style.lineHeight || null,\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setLineHeight:\n (lineHeight: string) =>\n ({ commands }) => {\n return this.options.types.every((type) =>\n commands.updateAttributes(type, { lineHeight }),\n );\n },\n unsetLineHeight:\n () =>\n ({ commands }) => {\n return this.options.types.every((type) =>\n commands.resetAttributes(type, \"lineHeight\"),\n );\n },\n };\n },\n});\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n} from \"@templatical/types\";\nimport type { Editor } from \"@tiptap/core\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n value: string;\n keyword: string;\n };\n };\n editor: Editor;\n getPos: () => number;\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst { syntax } = useMergeTag();\nconst { t } = useI18n();\n\nconst isValid = computed(() =>\n isLogicMergeTagValue(props.node.attrs.value, syntax),\n);\nconst displayKeyword = computed(() =>\n getLogicMergeTagKeyword(props.node.attrs.value, syntax),\n);\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\nlet handled = false;\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n handled = false;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\nfunction finishEditing(): void {\n if (handled) {\n return;\n }\n handled = true;\n\n const newValue = editValue.value.trim();\n if (!newValue) {\n isEditing.value = false;\n return;\n }\n\n if (newValue !== props.node.attrs.value) {\n props.updateAttributes({\n value: newValue,\n keyword: isLogicMergeTagValue(newValue, syntax)\n ? getLogicMergeTagKeyword(newValue, syntax)\n : \"\",\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n :class=\"\n isValid\n ? 'tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none'\n : ''\n \"\n :style=\"\n isValid\n ? 'background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);'\n : ''\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n class=\"tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode: valid merge tag -->\n <span\n v-else-if=\"isValid\"\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n class=\"tpl-tooltip tpl:cursor-pointer\"\n :data-tooltip=\"node.attrs.value\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ displayKeyword }}\n </span>\n <!-- Display mode: invalid (plain text) -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ node.attrs.value }}\n </span>\n <button\n v-if=\"isValid\"\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n} from \"@templatical/types\";\nimport type { Editor } from \"@tiptap/core\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n value: string;\n keyword: string;\n };\n };\n editor: Editor;\n getPos: () => number;\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst { syntax } = useMergeTag();\nconst { t } = useI18n();\n\nconst isValid = computed(() =>\n isLogicMergeTagValue(props.node.attrs.value, syntax),\n);\nconst displayKeyword = computed(() =>\n getLogicMergeTagKeyword(props.node.attrs.value, syntax),\n);\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\nlet handled = false;\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n handled = false;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\nfunction finishEditing(): void {\n if (handled) {\n return;\n }\n handled = true;\n\n const newValue = editValue.value.trim();\n if (!newValue) {\n isEditing.value = false;\n return;\n }\n\n if (newValue !== props.node.attrs.value) {\n props.updateAttributes({\n value: newValue,\n keyword: isLogicMergeTagValue(newValue, syntax)\n ? getLogicMergeTagKeyword(newValue, syntax)\n : \"\",\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n :class=\"\n isValid\n ? 'tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none'\n : ''\n \"\n :style=\"\n isValid\n ? 'background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);'\n : ''\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n class=\"tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode: valid merge tag -->\n <span\n v-else-if=\"isValid\"\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n class=\"tpl-tooltip tpl:cursor-pointer\"\n :data-tooltip=\"node.attrs.value\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ displayKeyword }}\n </span>\n <!-- Display mode: invalid (plain text) -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ node.attrs.value }}\n </span>\n <button\n v-if=\"isValid\"\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","import type { Editor } from \"@tiptap/core\";\n\n/**\n * Decides whether MergeTagNode / LogicMergeTagNode should swallow a\n * Backspace/Delete keystroke (returning `true` from a TipTap keymap\n * suppresses the default behavior).\n *\n * Only suppresses in the cursor-adjacent case so the \"first press\n * selects the atom, second press deletes it\" UX works. Range selections\n * (Cmd+A, drag-select, double-click-word) explicitly fall through —\n * default `replaceSelection` then deletes the entire range including\n * any merge-tag atoms inside it.\n *\n * Earlier revisions also returned `true` whenever `nodesBetween($from,\n * $to)` found a merge tag anywhere in the selection range — which\n * silently broke Cmd+A + Backspace for any paragraph containing a\n * merge tag (entire deletion was cancelled, nothing happened). The\n * cursor-adjacent protection is the only piece that should survive.\n */\nexport function isNodeSelected(editor: Editor, nodeTypeName: string): boolean {\n const { $from, $to } = editor.state.selection;\n\n // Range selection: let TipTap's default range-delete run. Even when\n // the range contains atom nodes, ProseMirror's replaceSelection\n // handles atomic deletion correctly.\n if ($from.pos !== $to.pos) return false;\n\n // Cursor-adjacent atom: protect from single-keystroke deletion.\n // (`$from.pos > 0` guards against reading `nodeBefore` at doc start\n // where ProseMirror's index would be undefined for nodeBefore.)\n if ($from.pos > 0 && $from.nodeBefore?.type.name === nodeTypeName) {\n return true;\n }\n if ($from.nodeAfter?.type.name === nodeTypeName) {\n return true;\n }\n\n return false;\n}\n","import type { Component } from \"vue\";\nimport { VueNodeViewRenderer } from \"@tiptap/vue-3\";\n\n/**\n * Typed wrapper for VueNodeViewRenderer that handles the known type mismatch\n * between Vue SFC default exports and TipTap's expected component type.\n */\nexport function renderVueNodeView(component: Component) {\n return VueNodeViewRenderer(\n component as Parameters<typeof VueNodeViewRenderer>[0],\n );\n}\n","import LogicMergeTagNodeView from \"./LogicMergeTagNodeView.vue\";\nimport type { SyntaxPreset } from \"@templatical/types\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n SYNTAX_PRESETS,\n} from \"@templatical/types\";\nimport { InputRule, mergeAttributes, Node, PasteRule } from \"@tiptap/core\";\nimport { isNodeSelected } from \"./isNodeSelected\";\nimport { renderVueNodeView } from \"./renderVueNodeView\";\n\nexport interface LogicMergeTagNodeOptions {\n syntax: SyntaxPreset;\n}\n\nexport const LogicMergeTagNode = Node.create<LogicMergeTagNodeOptions>({\n name: \"logicMergeTagNode\",\n\n group: \"inline\",\n\n inline: true,\n\n atom: true,\n\n addOptions() {\n return {\n syntax: SYNTAX_PRESETS.liquid,\n };\n },\n\n addAttributes() {\n return {\n // Both attributes are state, not markup, same as `MergeTagNode`:\n // `renderHTML()` emits the canonical `data-logic-merge-tag` /\n // `data-keyword` pair and `parseHTML` reads only those. `rendered: false`\n // keeps TipTap from also serializing each attribute under its own name,\n // which would put a write-only duplicate of the same data on every tag.\n value: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-logic-merge-tag\") || \"\",\n },\n keyword: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-keyword\") || element.textContent || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span[data-logic-merge-tag]\",\n },\n ];\n },\n\n renderHTML({ node, HTMLAttributes }) {\n if (!isLogicMergeTagValue(node.attrs.value, this.options.syntax)) {\n return [\"span\", {}, node.attrs.value];\n }\n\n const keyword = getLogicMergeTagKeyword(\n node.attrs.value,\n this.options.syntax,\n );\n\n return [\n \"span\",\n mergeAttributes(HTMLAttributes, {\n \"data-logic-merge-tag\": node.attrs.value,\n \"data-keyword\": keyword,\n }),\n keyword,\n ];\n },\n\n addNodeView() {\n return renderVueNodeView(LogicMergeTagNodeView);\n },\n\n addKeyboardShortcuts() {\n return {\n Backspace: () => isNodeSelected(this.editor, this.name),\n Delete: () => isNodeSelected(this.editor, this.name),\n };\n },\n\n addInputRules() {\n const inputRegex = new RegExp(this.options.syntax.logic.source + \"$\", \"\");\n\n return [\n new InputRule({\n find: inputRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n if (!isLogicMergeTagValue(fullValue, this.options.syntax)) {\n return;\n }\n\n const keyword = getLogicMergeTagKeyword(\n fullValue,\n this.options.syntax,\n );\n\n const node = this.type.create({\n value: fullValue,\n keyword,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n\n addPasteRules() {\n const pasteRegex = new RegExp(this.options.syntax.logic.source, \"g\");\n\n return [\n new PasteRule({\n find: pasteRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n if (!isLogicMergeTagValue(fullValue, this.options.syntax)) {\n return;\n }\n\n const keyword = getLogicMergeTagKeyword(\n fullValue,\n this.options.syntax,\n );\n\n const node = this.type.create({\n value: fullValue,\n keyword,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n});\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, onScopeDispose, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n label: string;\n value: string;\n };\n };\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst {\n getMergeTagLabel,\n getMergeTagDisplayLabel,\n findMergeTag,\n canRepickMergeTag,\n showRawValue,\n isMergeTagValue,\n requestMergeTag,\n} = useMergeTag();\nconst { t, format } = useI18n();\n\n// `node.attrs.label` is the label captured when the tag was inserted. It is\n// only ever a fallback — the configured tags win, which is what keeps a\n// relabelled tag from rendering its stale stored copy.\nconst displayLabel = computed(() =>\n getMergeTagDisplayLabel(props.node.attrs.value, props.node.attrs.label),\n);\nconst canRepick = computed(() => canRepickMergeTag(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// The chooser mounts in the popover root, outside this node view, so the node\n// can be torn down while it is open — a collaborator edit, a block change, the\n// editor unmounting. Writing attributes onto a destroyed node view throws.\nlet disposed = false;\nonScopeDispose(() => {\n disposed = true;\n});\n\n/** Whether the text currently in the raw input is a usable merge tag. */\nconst isEditValueValid = computed(\n () =>\n editValue.value.trim() === \"\" || isMergeTagValue(editValue.value.trim()),\n);\n\n/**\n * Swap this tag for another one, chosen through the same chooser insertion\n * uses. `requestMergeTag` sets the editor-wide requesting flag for the whole\n * await, which is what stops `useRichTextEditor`'s click-outside handler\n * finishing the block when the user clicks a row in the chooser — that would\n * dispose this node view and silently drop the update.\n */\nasync function repick(): Promise<void> {\n const replacement = await requestMergeTag({\n reason: \"edit\",\n current: findMergeTag(props.node.attrs.value),\n });\n if (disposed || !replacement) return;\n props.updateAttributes({\n value: replacement.value,\n label: replacement.label,\n });\n}\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\n/**\n * Activating the chip opens the chooser when one can resolve this token, and\n * the raw input only when none can. Editing a token as free text is how a\n * chip ends up holding something that is not a merge tag at all, which the\n * renderer then emits verbatim into the sent email.\n */\nfunction activate(): void {\n if (canRepick.value) {\n void repick();\n return;\n }\n startEditing();\n}\n\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n // Never commit something that isn't a merge tag: `renderHTML` writes the\n // value straight into `data-merge-tag`, and the renderer drops that into the\n // MJML unchanged, so a typo would ship as literal text in the email.\n if (\n newValue &&\n newValue !== props.node.attrs.value &&\n isMergeTagValue(newValue)\n ) {\n props.updateAttributes({\n // The honest resolution, not the display chain: this is written into the\n // document as `data-label`, so a placeholder would be persisted as if it\n // were the tag's name.\n value: newValue,\n label: getMergeTagLabel(newValue),\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n // Enter on an invalid value keeps the input open rather than discarding\n // what was typed — the border and `aria-invalid` already say why.\n if (!isEditValueValid.value) return;\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n class=\"tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-primary) 20%, transparent);\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n :aria-invalid=\"isEditValueValid ? undefined : 'true'\"\n class=\"tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n :class=\"\n isEditValueValid\n ? 'tpl:border-none'\n : 'tpl:border tpl:border-[var(--tpl-danger)]'\n \"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"\n canRepick\n ? format(t.mergeTag.changeTag, { label: displayLabel })\n : t.mergeTag.editValue\n \"\n class=\"tpl:cursor-pointer\"\n :class=\"showRawValue ? 'tpl-tooltip' : ''\"\n :data-tooltip=\"showRawValue ? node.attrs.value : undefined\"\n @click.stop=\"activate\"\n @keydown.enter.stop=\"activate\"\n @keydown.space.prevent.stop=\"activate\"\n >\n {{ displayLabel }}\n </span>\n <button\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, onScopeDispose, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n label: string;\n value: string;\n };\n };\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst {\n getMergeTagLabel,\n getMergeTagDisplayLabel,\n findMergeTag,\n canRepickMergeTag,\n showRawValue,\n isMergeTagValue,\n requestMergeTag,\n} = useMergeTag();\nconst { t, format } = useI18n();\n\n// `node.attrs.label` is the label captured when the tag was inserted. It is\n// only ever a fallback — the configured tags win, which is what keeps a\n// relabelled tag from rendering its stale stored copy.\nconst displayLabel = computed(() =>\n getMergeTagDisplayLabel(props.node.attrs.value, props.node.attrs.label),\n);\nconst canRepick = computed(() => canRepickMergeTag(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// The chooser mounts in the popover root, outside this node view, so the node\n// can be torn down while it is open — a collaborator edit, a block change, the\n// editor unmounting. Writing attributes onto a destroyed node view throws.\nlet disposed = false;\nonScopeDispose(() => {\n disposed = true;\n});\n\n/** Whether the text currently in the raw input is a usable merge tag. */\nconst isEditValueValid = computed(\n () =>\n editValue.value.trim() === \"\" || isMergeTagValue(editValue.value.trim()),\n);\n\n/**\n * Swap this tag for another one, chosen through the same chooser insertion\n * uses. `requestMergeTag` sets the editor-wide requesting flag for the whole\n * await, which is what stops `useRichTextEditor`'s click-outside handler\n * finishing the block when the user clicks a row in the chooser — that would\n * dispose this node view and silently drop the update.\n */\nasync function repick(): Promise<void> {\n const replacement = await requestMergeTag({\n reason: \"edit\",\n current: findMergeTag(props.node.attrs.value),\n });\n if (disposed || !replacement) return;\n props.updateAttributes({\n value: replacement.value,\n label: replacement.label,\n });\n}\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\n/**\n * Activating the chip opens the chooser when one can resolve this token, and\n * the raw input only when none can. Editing a token as free text is how a\n * chip ends up holding something that is not a merge tag at all, which the\n * renderer then emits verbatim into the sent email.\n */\nfunction activate(): void {\n if (canRepick.value) {\n void repick();\n return;\n }\n startEditing();\n}\n\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n // Never commit something that isn't a merge tag: `renderHTML` writes the\n // value straight into `data-merge-tag`, and the renderer drops that into the\n // MJML unchanged, so a typo would ship as literal text in the email.\n if (\n newValue &&\n newValue !== props.node.attrs.value &&\n isMergeTagValue(newValue)\n ) {\n props.updateAttributes({\n // The honest resolution, not the display chain: this is written into the\n // document as `data-label`, so a placeholder would be persisted as if it\n // were the tag's name.\n value: newValue,\n label: getMergeTagLabel(newValue),\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n // Enter on an invalid value keeps the input open rather than discarding\n // what was typed — the border and `aria-invalid` already say why.\n if (!isEditValueValid.value) return;\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n class=\"tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-primary) 20%, transparent);\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n :aria-invalid=\"isEditValueValid ? undefined : 'true'\"\n class=\"tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n :class=\"\n isEditValueValid\n ? 'tpl:border-none'\n : 'tpl:border tpl:border-[var(--tpl-danger)]'\n \"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"\n canRepick\n ? format(t.mergeTag.changeTag, { label: displayLabel })\n : t.mergeTag.editValue\n \"\n class=\"tpl:cursor-pointer\"\n :class=\"showRawValue ? 'tpl-tooltip' : ''\"\n :data-tooltip=\"showRawValue ? node.attrs.value : undefined\"\n @click.stop=\"activate\"\n @keydown.enter.stop=\"activate\"\n @keydown.space.prevent.stop=\"activate\"\n >\n {{ displayLabel }}\n </span>\n <button\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","import MergeTagNodeView from \"./MergeTagNodeView.vue\";\nimport type { MergeTag, SyntaxPreset } from \"@templatical/types\";\nimport { getMergeTagLabel, SYNTAX_PRESETS } from \"@templatical/types\";\nimport { InputRule, mergeAttributes, Node, PasteRule } from \"@tiptap/core\";\nimport { isNodeSelected } from \"./isNodeSelected\";\nimport { renderVueNodeView } from \"./renderVueNodeView\";\n\nexport interface MergeTagNodeOptions {\n /**\n * Read live, not captured. `renderHTML` and the input/paste rules resolve a\n * label every time they run, and `editor.setMergeTags` can replace the list\n * while a block is open for editing.\n */\n mergeTags: () => MergeTag[];\n syntax: SyntaxPreset;\n}\n\n/**\n * Inserted-node attrs are intentionally limited to `label` + `value`. The\n * `MergeTag` interface also carries optional `group` / `description` for\n * the built-in picker, but those are display-only and must NOT leak into\n * the document JSON — they would bloat templates and pollute serialized\n * state. `Pick<>` makes the constraint explicit at the type level.\n */\nexport type InsertMergeTagAttrs = Pick<MergeTag, \"label\" | \"value\">;\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n mergeTagNode: {\n insertMergeTag: (attrs: InsertMergeTagAttrs) => ReturnType;\n };\n }\n}\n\nexport const MergeTagNode = Node.create<MergeTagNodeOptions>({\n name: \"mergeTagNode\",\n\n group: \"inline\",\n\n inline: true,\n\n atom: true,\n\n addOptions() {\n return {\n mergeTags: () => [],\n syntax: SYNTAX_PRESETS.liquid,\n };\n },\n\n addAttributes() {\n return {\n // Both attributes are state, not markup: `renderHTML()` below emits the\n // canonical `data-merge-tag` / `data-label` pair and `parseHTML` reads\n // only those. `rendered: false` keeps TipTap from also serializing each\n // attribute under its own name, which would put a write-only duplicate\n // of the same data on every tag — invalid on a `<span>`, and paid again\n // through storage, autosave, snapshots and version history.\n label: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-label\") || element.textContent || \"\",\n },\n value: {\n default: \"\",\n rendered: false,\n parseHTML: (element) => element.getAttribute(\"data-merge-tag\") || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span[data-merge-tag]\",\n },\n ];\n },\n\n renderHTML({ node, HTMLAttributes }) {\n const label = getMergeTagLabel(node.attrs.value, this.options.mergeTags());\n\n return [\n \"span\",\n mergeAttributes(HTMLAttributes, {\n \"data-merge-tag\": node.attrs.value,\n \"data-label\": label,\n }),\n label,\n ];\n },\n\n addNodeView() {\n return renderVueNodeView(MergeTagNodeView);\n },\n\n addCommands() {\n return {\n insertMergeTag:\n (attrs: InsertMergeTagAttrs) =>\n ({ commands }) => {\n // Whitelist explicitly — even if a caller smuggles extra keys via\n // a wider type assertion, only label/value reach the node attrs.\n return commands.insertContent({\n type: this.name,\n attrs: { label: attrs.label, value: attrs.value },\n });\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Backspace: () => isNodeSelected(this.editor, this.name),\n Delete: () => isNodeSelected(this.editor, this.name),\n };\n },\n\n addInputRules() {\n const inputRegex = new RegExp(this.options.syntax.value.source + \"$\", \"\");\n\n return [\n new InputRule({\n find: inputRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n const label = getMergeTagLabel(fullValue, this.options.mergeTags());\n\n const node = this.type.create({\n label,\n value: fullValue,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n\n addPasteRules() {\n const pasteRegex = new RegExp(this.options.syntax.value.source, \"g\");\n\n return [\n new PasteRule({\n find: pasteRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n const label = getMergeTagLabel(fullValue, this.options.mergeTags());\n\n const node = this.type.create({\n label,\n value: fullValue,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n});\n","import type { MergeTag } from \"@templatical/types\";\nimport { Extension } from \"@tiptap/core\";\nimport Suggestion, {\n type SuggestionOptions,\n type SuggestionProps,\n type SuggestionKeyDownProps,\n} from \"@tiptap/suggestion\";\nimport type { Ref } from \"vue\";\nimport { createMergeTagPopup, filterMergeTags } from \"../utils/mergeTagPopup\";\n\nexport interface MergeTagSuggestionOptions {\n /** Available merge tags */\n /**\n * Read live, not captured: the list can be replaced while a block is being\n * edited (`editor.setMergeTags`), and a snapshot taken when the extension\n * was configured would keep suggesting the old tags.\n */\n mergeTags: () => MergeTag[];\n /** Trigger string (e.g. \"{{\", \"*|\", \"%%=\") */\n char: string;\n /** Localized empty-state label */\n emptyText: string;\n /**\n * Mount target for the suggestion popup. When provided with a non-null\n * `.value`, the popup attaches into that element instead of\n * `document.body` — keeping it inside the editor's effective DOM root\n * (shadow-aware). Pass the ref returned by `usePopoverRoot()`.\n *\n * Falls back to `document.body` when omitted or when the ref's value is\n * null at popup-open time (e.g. headless/test editors without an editor\n * shell). Preserves pre-Phase-3 behavior for callers that don't migrate.\n */\n popoverRoot?: Ref<HTMLElement | null> | null;\n}\n\n/**\n * Builds the `@tiptap/suggestion` `render` factory for the merge-tag popup.\n * A thin adapter over {@link createMergeTagPopup}: it maps ProseMirror's\n * `SuggestionProps` (items, `clientRect`, `view.dom`, `command`) onto the\n * controller. Exported as a standalone function so that mapping can be\n * unit-tested with mocked `SuggestionProps` instead of a full editor.\n */\nexport function createMergeTagSuggestionRenderer(\n emptyText: string,\n popoverRootRef?: Ref<HTMLElement | null> | null,\n): NonNullable<SuggestionOptions<MergeTag>[\"render\"]> {\n return () => {\n const popup = createMergeTagPopup(emptyText, popoverRootRef);\n\n return {\n onStart: (props: SuggestionProps<MergeTag>) => {\n // Use view.dom (ProseMirror contenteditable, actually\n // attached to the DOM) rather than options.element, which may\n // be a detached div when no `element` is passed to the editor\n // constructor (as is the case with @tiptap/vue-3 EditorContent).\n const viewDom = props.editor.view?.dom as HTMLElement | undefined;\n popup.open({\n items: props.items,\n getRect: props.clientRect ?? null,\n anchorEl: viewDom ?? null,\n onCommand: (item) => props.command(item),\n });\n },\n onUpdate: (props: SuggestionProps<MergeTag>) => {\n popup.update({\n items: props.items,\n getRect: props.clientRect ?? null,\n onCommand: (item) => props.command(item),\n });\n },\n onKeyDown: (props: SuggestionKeyDownProps): boolean => {\n // Escape closes via TipTap's suggestion plugin (→ onExit); report it\n // handled without selecting.\n if (props.event.key === \"Escape\") {\n return true;\n }\n return popup.handleKeyDown(props.event);\n },\n onExit: () => popup.close(),\n };\n };\n}\n\nexport const MergeTagSuggestion = Extension.create<MergeTagSuggestionOptions>({\n name: \"mergeTagSuggestion\",\n\n addOptions() {\n return {\n mergeTags: () => [],\n char: \"{{\",\n emptyText: \"No matching merge tags\",\n popoverRoot: null,\n };\n },\n\n addProseMirrorPlugins() {\n const tags = this.options.mergeTags();\n const emptyText = this.options.emptyText;\n const popoverRootRef = this.options.popoverRoot;\n\n const config: Omit<SuggestionOptions<MergeTag>, \"editor\"> = {\n char: this.options.char,\n allowSpaces: false,\n startOfLine: false,\n // Default is [\" \"] which requires whitespace/line-start before the\n // trigger char — so `.{{` would not fire. Allow any preceding char.\n allowedPrefixes: null,\n items: ({ query }: { query: string }) => filterMergeTags(tags, query),\n command: ({\n editor,\n range,\n props,\n }: {\n editor: SuggestionProps<MergeTag>[\"editor\"];\n range: { from: number; to: number };\n props: MergeTag;\n }) => {\n // Use insertContentAt for atomic replace (matches the canonical\n // @tiptap/suggestion + Mention pattern). Avoids edge cases where\n // chained deleteRange + insertMergeTag fails to insert when the\n // selection state shifts mid-chain.\n editor\n .chain()\n .focus()\n .insertContentAt(range, {\n type: \"mergeTagNode\",\n attrs: { label: props.label, value: props.value },\n })\n .run();\n },\n render: createMergeTagSuggestionRenderer(emptyText, popoverRootRef),\n };\n\n return [\n Suggestion({\n editor: this.editor,\n ...config,\n }),\n ];\n },\n});\n"],"mappings":";;;;;;;AAeA,IAAasE,IAAWT,EAAU,OAAwB;CACxD,MAAM;CAEN,aAAa;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ASA,EAAM,cAAc;KAC7B,UAJcA,EAAM,OAAO,MAAM,OAIZ;KACrB,YAAY,MAASA,EAAM,QAAQ0D,CAAI;IACzC,CAAC;GACH;GACA,WAAW,MAAqC;IAC9C,EAAM,OAAO;KACX,OAAO1D,EAAM;KACb,SAASA,EAAM,cAAc;KAC7B,YAAY,MAASA,EAAM,QAAQ0D,CAAI;IACzC,CAAC;GACH;GACA,YAAY,MAGN1D,EAAM,MAAM,QAAQ,YAGjBuD,EAAM,cAAcvD,EAAM,KAAK;GAExC,cAAcuD,EAAM,MAAM;EAC5B;CACF;AACF;AAEA,IAAaI,IAAqBxF,EAAU,OAAkC;CAC5E,MAAM;CAEN,aAAa;EACX,OAAO;GACL,iBAAiB,CAAC;GAClB,MAAM;GACN,WAAW;GACX,aAAa;EACf;CACF;CAEA,wBAAwB;EACtB,IAAMyF,IAAO,KAAK,QAAQ,UAAU,GAC9BJ,IAAY,KAAK,QAAQ,WACzBC,IAAiB,KAAK,QAAQ,aAE9BI,IAAsD;GAC1D,MAAM,KAAK,QAAQ;GACnB,aAAa;GACb,aAAa;GAGb,iBAAiB;GACjB,QAAQ,EAAE,eAA+BnF,EAAgBkF,GAAME,CAAK;GACpE,UAAU,EACR,WACA,UACA,eAKI;IAKJ,EACG,MAAM,CAAC,CACP,MAAM,CAAC,CACP,gBAAgB/B,GAAO;KACtB,MAAM;KACN,OAAO;MAAE,OAAO/B,EAAM;MAAO,OAAOA,EAAM;KAAM;IAClD,CAAC,CAAC,CACD,IAAI;GACT;GACA,QAAQsD,EAAiCE,GAAWC,CAAc;EACpE;EAEA,OAAO,CACLlH,EAAW;GACT,QAAQ,KAAK;GACb,GAAGsH;EACL,CAAC,CACH;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"extensions-1hJBHnGv.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createBlock","_unref","_normalizeClass","_normalizeStyle","_withCtx","_withDirectives","_createElementBlock","_vModelText","_withModifiers","_withKeys","_toDisplayString","_createElementVNode","_createCommentVNode","_sfc_main","LogicMergeTagNodeView","_openBlock","_createBlock","_unref","_withCtx","_withDirectives","_createElementBlock","_normalizeClass","_vModelText","_withModifiers","_withKeys","_toDisplayString","_createElementVNode","_sfc_main","MergeTagNodeView","Suggestion","withCtx","openBlock","ref","defineComponent","withDirectives","onScopeDispose","unref","withKeys","normalizeClass","computed","createElementBlock","createCommentVNode","nextTick","withModifiers","normalizeStyle","createBlock","vModelText","createBaseVNode","toDisplayString","getLogicMergeTagKeyword","isLogicMergeTagValue","getMergeTagLabel","SYNTAX_PRESETS","useI18n","useMergeTag","Node","InputRule","Extension","NodeViewWrapper","VueNodeViewRenderer","src_default","PasteRule","mergeAttributes","createMergeTagPopup","filterMergeTags","handleSuggestionKeyDown","FontSize","element","attributes","chain","size","LetterSpacing","spacing","LineBoundaryKeys","moveToLineBoundary","view","editor","selection","direction","LineHeight","commands","type","_hoisted_1$1","_hoisted_2$1","_hoisted_3$1","LogicMergeTagNodeView_default","props","__props","isValid","syntax","displayKeyword","isEditing","editValue","inputRef","handled","startEditing","finishEditing","newValue","handleKeydown","event","_cache","$event","t","args","isNodeSelected","$from","$to","nodeTypeName","renderVueNodeView","component","LogicMergeTagNode","node","keyword","HTMLAttributes","inputRegex","fullValue","match","range","pasteRegex","_hoisted_1","_hoisted_2","_hoisted_3","MergeTagNodeView_default","displayLabel","getMergeTagDisplayLabel","canRepick","canRepickMergeTag","disposed","isEditValueValid","isMergeTagValue","repick","replacement","requestMergeTag","findMergeTag","activate","format","showRawValue","MergeTagNode","label","attrs","createMergeTagSuggestionRenderer","popup","emptyText","popoverRootRef","item","MergeTagSuggestion","tags","config","query"],"sources":["../../../src/extensions/FontSize.ts","../../../src/extensions/LetterSpacing.ts","../../../src/extensions/LineBoundaryKeys.ts","../../../src/extensions/LineHeight.ts","../../../src/extensions/LogicMergeTagNodeView.vue","../../../src/extensions/LogicMergeTagNodeView.vue","../../../src/extensions/isNodeSelected.ts","../../../src/extensions/renderVueNodeView.ts","../../../src/extensions/LogicMergeTagNode.ts","../../../src/extensions/MergeTagNodeView.vue","../../../src/extensions/MergeTagNodeView.vue","../../../src/extensions/MergeTagNode.ts","../../../src/extensions/MergeTagSuggestion.ts"],"sourcesContent":["import { Extension } from \"@tiptap/core\";\n\nexport interface FontSizeOptions {\n types: string[];\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n fontSize: {\n setFontSize: (size: string) => ReturnType;\n unsetFontSize: () => ReturnType;\n };\n }\n}\n\nexport const FontSize = Extension.create<FontSizeOptions>({\n name: \"fontSize\",\n\n addOptions() {\n return {\n types: [\"textStyle\"],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n fontSize: {\n default: null,\n parseHTML: (element) =>\n element.style.fontSize?.replace(/['\"]+/g, \"\") || null,\n renderHTML: (attributes) => {\n if (!attributes.fontSize) {\n return {};\n }\n return {\n style: `font-size: ${attributes.fontSize}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setFontSize:\n (size: string) =>\n ({ chain }) => {\n return chain().setMark(\"textStyle\", { fontSize: size }).run();\n },\n unsetFontSize:\n () =>\n ({ chain }) => {\n return chain()\n .setMark(\"textStyle\", { fontSize: null })\n .removeEmptyTextStyle()\n .run();\n },\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\nexport interface LetterSpacingOptions {\n types: string[];\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n letterSpacing: {\n setLetterSpacing: (spacing: string) => ReturnType;\n unsetLetterSpacing: () => ReturnType;\n };\n }\n}\n\nexport const LetterSpacing = Extension.create<LetterSpacingOptions>({\n name: \"letterSpacing\",\n\n addOptions() {\n return {\n types: [\"textStyle\"],\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n letterSpacing: {\n default: null,\n parseHTML: (element) =>\n element.style.letterSpacing?.replace(/['\"]+/g, \"\") || null,\n renderHTML: (attributes) => {\n if (!attributes.letterSpacing) {\n return {};\n }\n return {\n style: `letter-spacing: ${attributes.letterSpacing}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setLetterSpacing:\n (spacing: string) =>\n ({ chain }) => {\n return chain().setMark(\"textStyle\", { letterSpacing: spacing }).run();\n },\n unsetLetterSpacing:\n () =>\n ({ chain }) => {\n return chain()\n .setMark(\"textStyle\", { letterSpacing: null })\n .removeEmptyTextStyle()\n .run();\n },\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\n/**\n * Routes plain End/Home through `Selection.modify` instead of the browser's\n * native caret movement.\n *\n * Chromium (verified 140–151, including stable Chrome) has a bug where a\n * native End or Home pressed while a triple-click selection is active puts\n * Blink's selection state into a mode where the next typed character\n * natively smooth-scrolls the nearest scrollable ancestor (the editor's\n * canvas, `.tpl-body`) to its very bottom (End) or top (Home), dragging the\n * caret out of view. The state cannot be repaired after the fact — clearing\n * or re-setting the DOM selection, blur/refocus, and preventDefault on the\n * clicks all fail — but a programmatic caret move never arms it.\n *\n * `Selection.modify(\"move\", direction, \"lineboundary\")` is the exact\n * equivalent of the native key (visual line boundary, bidi-aware via the\n * logical forward/backward directions), so behavior is unchanged for users.\n * Shift+End / Shift+Home extend selections natively and do not trigger the\n * bug, so only the plain keys are bound — a keymap entry without modifiers\n * never matches the shifted keys.\n */\nexport const LineBoundaryKeys = Extension.create({\n name: \"lineBoundaryKeys\",\n\n addKeyboardShortcuts() {\n const moveToLineBoundary =\n (direction: \"forward\" | \"backward\") =>\n ({ editor }: { editor: { view: unknown } }): boolean => {\n const view = editor.view as {\n composing: boolean;\n root: DocumentOrShadowRoot & {\n getSelection?: () => Selection | null;\n };\n dom: HTMLElement;\n };\n // During IME composition End/Home commit the composition; leave\n // that to the browser.\n if (!view || view.composing) return false;\n // `view.root` is the editable's Document or ShadowRoot, so the\n // selection resolves correctly in both mount modes. ShadowRoot's\n // getSelection is Chromium-only; elsewhere fall back to the owner\n // document (Chromium is also the only engine with the bug).\n const selection =\n typeof view.root?.getSelection === \"function\"\n ? view.root.getSelection()\n : (view.dom?.ownerDocument?.getSelection?.() ?? null);\n // `modify` is non-standard; without it, or with a selection that\n // is not ours, native handling is the safer default.\n if (!selection || typeof selection.modify !== \"function\") return false;\n if (!selection.anchorNode || !view.dom.contains(selection.anchorNode)) {\n return false;\n }\n selection.modify(\"move\", direction, \"lineboundary\");\n return true;\n };\n\n return {\n End: moveToLineBoundary(\"forward\"),\n Home: moveToLineBoundary(\"backward\"),\n };\n },\n});\n","import { Extension } from \"@tiptap/core\";\n\nexport interface LineHeightOptions {\n types: string[];\n defaultLineHeight: string;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n lineHeight: {\n setLineHeight: (lineHeight: string) => ReturnType;\n unsetLineHeight: () => ReturnType;\n };\n }\n}\n\nexport const LineHeight = Extension.create<LineHeightOptions>({\n name: \"lineHeight\",\n\n addOptions() {\n return {\n types: [\"paragraph\"],\n defaultLineHeight: \"1.5\",\n };\n },\n\n addGlobalAttributes() {\n return [\n {\n types: this.options.types,\n attributes: {\n lineHeight: {\n default: null,\n parseHTML: (element) => element.style.lineHeight || null,\n renderHTML: (attributes) => {\n if (!attributes.lineHeight) {\n return {};\n }\n return {\n style: `line-height: ${attributes.lineHeight}`,\n };\n },\n },\n },\n },\n ];\n },\n\n addCommands() {\n return {\n setLineHeight:\n (lineHeight: string) =>\n ({ commands }) => {\n return this.options.types.every((type) =>\n commands.updateAttributes(type, { lineHeight }),\n );\n },\n unsetLineHeight:\n () =>\n ({ commands }) => {\n return this.options.types.every((type) =>\n commands.resetAttributes(type, \"lineHeight\"),\n );\n },\n };\n },\n});\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n} from \"@templatical/types\";\nimport type { Editor } from \"@tiptap/core\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n value: string;\n keyword: string;\n };\n };\n editor: Editor;\n getPos: () => number;\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst { syntax } = useMergeTag();\nconst { t } = useI18n();\n\nconst isValid = computed(() =>\n isLogicMergeTagValue(props.node.attrs.value, syntax),\n);\nconst displayKeyword = computed(() =>\n getLogicMergeTagKeyword(props.node.attrs.value, syntax),\n);\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\nlet handled = false;\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n handled = false;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\nfunction finishEditing(): void {\n if (handled) {\n return;\n }\n handled = true;\n\n const newValue = editValue.value.trim();\n if (!newValue) {\n isEditing.value = false;\n return;\n }\n\n if (newValue !== props.node.attrs.value) {\n props.updateAttributes({\n value: newValue,\n keyword: isLogicMergeTagValue(newValue, syntax)\n ? getLogicMergeTagKeyword(newValue, syntax)\n : \"\",\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n :class=\"\n isValid\n ? 'tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none'\n : ''\n \"\n :style=\"\n isValid\n ? 'background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);'\n : ''\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n class=\"tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode: valid merge tag -->\n <span\n v-else-if=\"isValid\"\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n class=\"tpl-tooltip tpl:cursor-pointer\"\n :data-tooltip=\"node.attrs.value\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ displayKeyword }}\n </span>\n <!-- Display mode: invalid (plain text) -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ node.attrs.value }}\n </span>\n <button\n v-if=\"isValid\"\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n} from \"@templatical/types\";\nimport type { Editor } from \"@tiptap/core\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n value: string;\n keyword: string;\n };\n };\n editor: Editor;\n getPos: () => number;\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst { syntax } = useMergeTag();\nconst { t } = useI18n();\n\nconst isValid = computed(() =>\n isLogicMergeTagValue(props.node.attrs.value, syntax),\n);\nconst displayKeyword = computed(() =>\n getLogicMergeTagKeyword(props.node.attrs.value, syntax),\n);\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\nlet handled = false;\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n handled = false;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\nfunction finishEditing(): void {\n if (handled) {\n return;\n }\n handled = true;\n\n const newValue = editValue.value.trim();\n if (!newValue) {\n isEditing.value = false;\n return;\n }\n\n if (newValue !== props.node.attrs.value) {\n props.updateAttributes({\n value: newValue,\n keyword: isLogicMergeTagValue(newValue, syntax)\n ? getLogicMergeTagKeyword(newValue, syntax)\n : \"\",\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n :class=\"\n isValid\n ? 'tpl-logic-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase tpl:select-none'\n : ''\n \"\n :style=\"\n isValid\n ? 'background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);'\n : ''\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n class=\"tpl:w-40 tpl:rounded tpl:border-none tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:normal-case tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode: valid merge tag -->\n <span\n v-else-if=\"isValid\"\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n class=\"tpl-tooltip tpl:cursor-pointer\"\n :data-tooltip=\"node.attrs.value\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ displayKeyword }}\n </span>\n <!-- Display mode: invalid (plain text) -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"t.mergeTag.editValue\"\n @click.stop=\"startEditing\"\n @keydown.enter.stop=\"startEditing\"\n @keydown.space.prevent.stop=\"startEditing\"\n >\n {{ node.attrs.value }}\n </span>\n <button\n v-if=\"isValid\"\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","import type { Editor } from \"@tiptap/core\";\n\n/**\n * Decides whether MergeTagNode / LogicMergeTagNode should swallow a\n * Backspace/Delete keystroke (returning `true` from a TipTap keymap\n * suppresses the default behavior).\n *\n * Only suppresses in the cursor-adjacent case so the \"first press\n * selects the atom, second press deletes it\" UX works. Range selections\n * (Cmd+A, drag-select, double-click-word) explicitly fall through —\n * default `replaceSelection` then deletes the entire range including\n * any merge-tag atoms inside it.\n *\n * Earlier revisions also returned `true` whenever `nodesBetween($from,\n * $to)` found a merge tag anywhere in the selection range — which\n * silently broke Cmd+A + Backspace for any paragraph containing a\n * merge tag (entire deletion was cancelled, nothing happened). The\n * cursor-adjacent protection is the only piece that should survive.\n */\nexport function isNodeSelected(editor: Editor, nodeTypeName: string): boolean {\n const { $from, $to } = editor.state.selection;\n\n // Range selection: let TipTap's default range-delete run. Even when\n // the range contains atom nodes, ProseMirror's replaceSelection\n // handles atomic deletion correctly.\n if ($from.pos !== $to.pos) return false;\n\n // Cursor-adjacent atom: protect from single-keystroke deletion.\n // (`$from.pos > 0` guards against reading `nodeBefore` at doc start\n // where ProseMirror's index would be undefined for nodeBefore.)\n if ($from.pos > 0 && $from.nodeBefore?.type.name === nodeTypeName) {\n return true;\n }\n if ($from.nodeAfter?.type.name === nodeTypeName) {\n return true;\n }\n\n return false;\n}\n","import type { Component } from \"vue\";\nimport { VueNodeViewRenderer } from \"@tiptap/vue-3\";\n\n/**\n * Typed wrapper for VueNodeViewRenderer that handles the known type mismatch\n * between Vue SFC default exports and TipTap's expected component type.\n */\nexport function renderVueNodeView(component: Component) {\n return VueNodeViewRenderer(\n component as Parameters<typeof VueNodeViewRenderer>[0],\n );\n}\n","import LogicMergeTagNodeView from \"./LogicMergeTagNodeView.vue\";\nimport type { SyntaxPreset } from \"@templatical/types\";\nimport {\n getLogicMergeTagKeyword,\n isLogicMergeTagValue,\n SYNTAX_PRESETS,\n} from \"@templatical/types\";\nimport { InputRule, mergeAttributes, Node, PasteRule } from \"@tiptap/core\";\nimport { isNodeSelected } from \"./isNodeSelected\";\nimport { renderVueNodeView } from \"./renderVueNodeView\";\n\nexport interface LogicMergeTagNodeOptions {\n syntax: SyntaxPreset;\n}\n\nexport const LogicMergeTagNode = Node.create<LogicMergeTagNodeOptions>({\n name: \"logicMergeTagNode\",\n\n group: \"inline\",\n\n inline: true,\n\n atom: true,\n\n addOptions() {\n return {\n syntax: SYNTAX_PRESETS.liquid,\n };\n },\n\n addAttributes() {\n return {\n // Both attributes are state, not markup, same as `MergeTagNode`:\n // `renderHTML()` emits the canonical `data-logic-merge-tag` /\n // `data-keyword` pair and `parseHTML` reads only those. `rendered: false`\n // keeps TipTap from also serializing each attribute under its own name,\n // which would put a write-only duplicate of the same data on every tag.\n value: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-logic-merge-tag\") || \"\",\n },\n keyword: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-keyword\") || element.textContent || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span[data-logic-merge-tag]\",\n },\n ];\n },\n\n renderHTML({ node, HTMLAttributes }) {\n if (!isLogicMergeTagValue(node.attrs.value, this.options.syntax)) {\n return [\"span\", {}, node.attrs.value];\n }\n\n const keyword = getLogicMergeTagKeyword(\n node.attrs.value,\n this.options.syntax,\n );\n\n return [\n \"span\",\n mergeAttributes(HTMLAttributes, {\n \"data-logic-merge-tag\": node.attrs.value,\n \"data-keyword\": keyword,\n }),\n keyword,\n ];\n },\n\n addNodeView() {\n return renderVueNodeView(LogicMergeTagNodeView);\n },\n\n addKeyboardShortcuts() {\n return {\n Backspace: () => isNodeSelected(this.editor, this.name),\n Delete: () => isNodeSelected(this.editor, this.name),\n };\n },\n\n addInputRules() {\n const inputRegex = new RegExp(this.options.syntax.logic.source + \"$\", \"\");\n\n return [\n new InputRule({\n find: inputRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n if (!isLogicMergeTagValue(fullValue, this.options.syntax)) {\n return;\n }\n\n const keyword = getLogicMergeTagKeyword(\n fullValue,\n this.options.syntax,\n );\n\n const node = this.type.create({\n value: fullValue,\n keyword,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n\n addPasteRules() {\n const pasteRegex = new RegExp(this.options.syntax.logic.source, \"g\");\n\n return [\n new PasteRule({\n find: pasteRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n if (!isLogicMergeTagValue(fullValue, this.options.syntax)) {\n return;\n }\n\n const keyword = getLogicMergeTagKeyword(\n fullValue,\n this.options.syntax,\n );\n\n const node = this.type.create({\n value: fullValue,\n keyword,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n});\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, onScopeDispose, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n label: string;\n value: string;\n };\n };\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst {\n getMergeTagLabel,\n getMergeTagDisplayLabel,\n findMergeTag,\n canRepickMergeTag,\n showRawValue,\n isMergeTagValue,\n requestMergeTag,\n} = useMergeTag();\nconst { t, format } = useI18n();\n\n// `node.attrs.label` is the label captured when the tag was inserted. It is\n// only ever a fallback — the configured tags win, which is what keeps a\n// relabelled tag from rendering its stale stored copy.\nconst displayLabel = computed(() =>\n getMergeTagDisplayLabel(props.node.attrs.value, props.node.attrs.label),\n);\nconst canRepick = computed(() => canRepickMergeTag(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// The chooser mounts in the popover root, outside this node view, so the node\n// can be torn down while it is open — a collaborator edit, a block change, the\n// editor unmounting. Writing attributes onto a destroyed node view throws.\nlet disposed = false;\nonScopeDispose(() => {\n disposed = true;\n});\n\n/** Whether the text currently in the raw input is a usable merge tag. */\nconst isEditValueValid = computed(\n () =>\n editValue.value.trim() === \"\" || isMergeTagValue(editValue.value.trim()),\n);\n\n/**\n * Swap this tag for another one, chosen through the same chooser insertion\n * uses. `requestMergeTag` sets the editor-wide requesting flag for the whole\n * await, which is what stops `useRichTextEditor`'s click-outside handler\n * finishing the block when the user clicks a row in the chooser — that would\n * dispose this node view and silently drop the update.\n */\nasync function repick(): Promise<void> {\n const replacement = await requestMergeTag({\n reason: \"edit\",\n current: findMergeTag(props.node.attrs.value),\n });\n if (disposed || !replacement) return;\n props.updateAttributes({\n value: replacement.value,\n label: replacement.label,\n });\n}\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\n/**\n * Activating the chip opens the chooser when one can resolve this token, and\n * the raw input only when none can. Editing a token as free text is how a\n * chip ends up holding something that is not a merge tag at all, which the\n * renderer then emits verbatim into the sent email.\n */\nfunction activate(): void {\n if (canRepick.value) {\n void repick();\n return;\n }\n startEditing();\n}\n\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n // Never commit something that isn't a merge tag: `renderHTML` writes the\n // value straight into `data-merge-tag`, and the renderer drops that into the\n // MJML unchanged, so a typo would ship as literal text in the email.\n if (\n newValue &&\n newValue !== props.node.attrs.value &&\n isMergeTagValue(newValue)\n ) {\n props.updateAttributes({\n // The honest resolution, not the display chain: this is written into the\n // document as `data-label`, so a placeholder would be persisted as if it\n // were the tag's name.\n value: newValue,\n label: getMergeTagLabel(newValue),\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n // Enter on an invalid value keeps the input open rather than discarding\n // what was typed — the border and `aria-invalid` already say why.\n if (!isEditValueValid.value) return;\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n class=\"tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-primary) 20%, transparent);\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n :aria-invalid=\"isEditValueValid ? undefined : 'true'\"\n class=\"tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n :class=\"\n isEditValueValid\n ? 'tpl:border-none'\n : 'tpl:border tpl:border-[var(--tpl-danger)]'\n \"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"\n canRepick\n ? format(t.mergeTag.changeTag, { label: displayLabel })\n : t.mergeTag.editValue\n \"\n class=\"tpl:cursor-pointer\"\n :class=\"showRawValue ? 'tpl-tooltip' : ''\"\n :data-tooltip=\"showRawValue ? node.attrs.value : undefined\"\n @click.stop=\"activate\"\n @keydown.enter.stop=\"activate\"\n @keydown.space.prevent.stop=\"activate\"\n >\n {{ displayLabel }}\n </span>\n <button\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","<script setup lang=\"ts\">\nimport { useI18n } from \"../composables/useI18n\";\nimport { useMergeTag } from \"../composables/useMergeTag\";\nimport { NodeViewWrapper } from \"@tiptap/vue-3\";\nimport { computed, nextTick, onScopeDispose, ref } from \"vue\";\n\nconst props = defineProps<{\n node: {\n attrs: {\n label: string;\n value: string;\n };\n };\n deleteNode: () => void;\n updateAttributes: (attrs: Record<string, unknown>) => void;\n}>();\n\nconst {\n getMergeTagLabel,\n getMergeTagDisplayLabel,\n findMergeTag,\n canRepickMergeTag,\n showRawValue,\n isMergeTagValue,\n requestMergeTag,\n} = useMergeTag();\nconst { t, format } = useI18n();\n\n// `node.attrs.label` is the label captured when the tag was inserted. It is\n// only ever a fallback — the configured tags win, which is what keeps a\n// relabelled tag from rendering its stale stored copy.\nconst displayLabel = computed(() =>\n getMergeTagDisplayLabel(props.node.attrs.value, props.node.attrs.label),\n);\nconst canRepick = computed(() => canRepickMergeTag(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\n\n// The chooser mounts in the popover root, outside this node view, so the node\n// can be torn down while it is open — a collaborator edit, a block change, the\n// editor unmounting. Writing attributes onto a destroyed node view throws.\nlet disposed = false;\nonScopeDispose(() => {\n disposed = true;\n});\n\n/** Whether the text currently in the raw input is a usable merge tag. */\nconst isEditValueValid = computed(\n () =>\n editValue.value.trim() === \"\" || isMergeTagValue(editValue.value.trim()),\n);\n\n/**\n * Swap this tag for another one, chosen through the same chooser insertion\n * uses. `requestMergeTag` sets the editor-wide requesting flag for the whole\n * await, which is what stops `useRichTextEditor`'s click-outside handler\n * finishing the block when the user clicks a row in the chooser — that would\n * dispose this node view and silently drop the update.\n */\nasync function repick(): Promise<void> {\n const replacement = await requestMergeTag({\n reason: \"edit\",\n current: findMergeTag(props.node.attrs.value),\n });\n if (disposed || !replacement) return;\n props.updateAttributes({\n value: replacement.value,\n label: replacement.label,\n });\n}\n\nfunction startEditing(): void {\n editValue.value = props.node.attrs.value;\n isEditing.value = true;\n nextTick(() => {\n inputRef.value?.focus();\n inputRef.value?.select();\n });\n}\n\n/**\n * Activating the chip opens the chooser when one can resolve this token, and\n * the raw input only when none can. Editing a token as free text is how a\n * chip ends up holding something that is not a merge tag at all, which the\n * renderer then emits verbatim into the sent email.\n */\nfunction activate(): void {\n if (canRepick.value) {\n void repick();\n return;\n }\n startEditing();\n}\n\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n // Never commit something that isn't a merge tag: `renderHTML` writes the\n // value straight into `data-merge-tag`, and the renderer drops that into the\n // MJML unchanged, so a typo would ship as literal text in the email.\n if (\n newValue &&\n newValue !== props.node.attrs.value &&\n isMergeTagValue(newValue)\n ) {\n props.updateAttributes({\n // The honest resolution, not the display chain: this is written into the\n // document as `data-label`, so a placeholder would be persisted as if it\n // were the tag's name.\n value: newValue,\n label: getMergeTagLabel(newValue),\n });\n }\n isEditing.value = false;\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n if (event.key === \"Enter\") {\n event.preventDefault();\n // Enter on an invalid value keeps the input open rather than discarding\n // what was typed — the border and `aria-invalid` already say why.\n if (!isEditValueValid.value) return;\n finishEditing();\n } else if (event.key === \"Escape\") {\n isEditing.value = false;\n }\n}\n</script>\n\n<template>\n <NodeViewWrapper\n as=\"span\"\n class=\"tpl-merge-tag-node tpl:group tpl:mx-0.5 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium tpl:select-none tpl:text-[var(--tpl-primary)]\"\n style=\"\n background-color: color-mix(in srgb, var(--tpl-primary) 20%, transparent);\n \"\n contenteditable=\"false\"\n >\n <!-- Edit mode -->\n <input\n v-if=\"isEditing\"\n ref=\"inputRef\"\n v-model=\"editValue\"\n type=\"text\"\n :aria-invalid=\"isEditValueValid ? undefined : 'true'\"\n class=\"tpl:w-32 tpl:rounded tpl:bg-transparent tpl:px-0.5 tpl:py-0 tpl:text-[1em] tpl:font-medium tpl:outline-none tpl:text-[var(--tpl-primary)]\"\n :class=\"\n isEditValueValid\n ? 'tpl:border-none'\n : 'tpl:border tpl:border-[var(--tpl-danger)]'\n \"\n @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\n role=\"button\"\n tabindex=\"0\"\n :aria-label=\"\n canRepick\n ? format(t.mergeTag.changeTag, { label: displayLabel })\n : t.mergeTag.editValue\n \"\n class=\"tpl:cursor-pointer\"\n :class=\"showRawValue ? 'tpl-tooltip' : ''\"\n :data-tooltip=\"showRawValue ? node.attrs.value : undefined\"\n @click.stop=\"activate\"\n @keydown.enter.stop=\"activate\"\n @keydown.space.prevent.stop=\"activate\"\n >\n {{ displayLabel }}\n </span>\n <button\n type=\"button\"\n :aria-label=\"t.mergeTag.deleteMergeTag\"\n class=\"tpl-merge-tag-delete tpl:flex tpl:size-5 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:opacity-60 tpl:transition-all tpl:hover:opacity-100 tpl:text-[var(--tpl-primary)]\"\n contenteditable=\"false\"\n @click.stop.prevent=\"deleteNode\"\n >\n <svg\n width=\"10\"\n height=\"10\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n aria-hidden=\"true\"\n >\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </NodeViewWrapper>\n</template>\n","import MergeTagNodeView from \"./MergeTagNodeView.vue\";\nimport type { MergeTag, SyntaxPreset } from \"@templatical/types\";\nimport { getMergeTagLabel, SYNTAX_PRESETS } from \"@templatical/types\";\nimport { InputRule, mergeAttributes, Node, PasteRule } from \"@tiptap/core\";\nimport { isNodeSelected } from \"./isNodeSelected\";\nimport { renderVueNodeView } from \"./renderVueNodeView\";\n\nexport interface MergeTagNodeOptions {\n /**\n * Read live, not captured. `renderHTML` and the input/paste rules resolve a\n * label every time they run, and `editor.setMergeTags` can replace the list\n * while a block is open for editing.\n */\n mergeTags: () => MergeTag[];\n syntax: SyntaxPreset;\n}\n\n/**\n * Inserted-node attrs are intentionally limited to `label` + `value`. The\n * `MergeTag` interface also carries optional `group` / `description` for\n * the built-in picker, but those are display-only and must NOT leak into\n * the document JSON — they would bloat templates and pollute serialized\n * state. `Pick<>` makes the constraint explicit at the type level.\n */\nexport type InsertMergeTagAttrs = Pick<MergeTag, \"label\" | \"value\">;\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n mergeTagNode: {\n insertMergeTag: (attrs: InsertMergeTagAttrs) => ReturnType;\n };\n }\n}\n\nexport const MergeTagNode = Node.create<MergeTagNodeOptions>({\n name: \"mergeTagNode\",\n\n group: \"inline\",\n\n inline: true,\n\n atom: true,\n\n addOptions() {\n return {\n mergeTags: () => [],\n syntax: SYNTAX_PRESETS.liquid,\n };\n },\n\n addAttributes() {\n return {\n // Both attributes are state, not markup: `renderHTML()` below emits the\n // canonical `data-merge-tag` / `data-label` pair and `parseHTML` reads\n // only those. `rendered: false` keeps TipTap from also serializing each\n // attribute under its own name, which would put a write-only duplicate\n // of the same data on every tag — invalid on a `<span>`, and paid again\n // through storage, autosave, snapshots and version history.\n label: {\n default: \"\",\n rendered: false,\n parseHTML: (element) =>\n element.getAttribute(\"data-label\") || element.textContent || \"\",\n },\n value: {\n default: \"\",\n rendered: false,\n parseHTML: (element) => element.getAttribute(\"data-merge-tag\") || \"\",\n },\n };\n },\n\n parseHTML() {\n return [\n {\n tag: \"span[data-merge-tag]\",\n },\n ];\n },\n\n renderHTML({ node, HTMLAttributes }) {\n const label = getMergeTagLabel(node.attrs.value, this.options.mergeTags());\n\n return [\n \"span\",\n mergeAttributes(HTMLAttributes, {\n \"data-merge-tag\": node.attrs.value,\n \"data-label\": label,\n }),\n label,\n ];\n },\n\n addNodeView() {\n return renderVueNodeView(MergeTagNodeView);\n },\n\n addCommands() {\n return {\n insertMergeTag:\n (attrs: InsertMergeTagAttrs) =>\n ({ commands }) => {\n // Whitelist explicitly — even if a caller smuggles extra keys via\n // a wider type assertion, only label/value reach the node attrs.\n return commands.insertContent({\n type: this.name,\n attrs: { label: attrs.label, value: attrs.value },\n });\n },\n };\n },\n\n addKeyboardShortcuts() {\n return {\n Backspace: () => isNodeSelected(this.editor, this.name),\n Delete: () => isNodeSelected(this.editor, this.name),\n };\n },\n\n addInputRules() {\n const inputRegex = new RegExp(this.options.syntax.value.source + \"$\", \"\");\n\n return [\n new InputRule({\n find: inputRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n const label = getMergeTagLabel(fullValue, this.options.mergeTags());\n\n const node = this.type.create({\n label,\n value: fullValue,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n\n addPasteRules() {\n const pasteRegex = new RegExp(this.options.syntax.value.source, \"g\");\n\n return [\n new PasteRule({\n find: pasteRegex,\n handler: ({ state, range, match }) => {\n const fullValue = match[0];\n const label = getMergeTagLabel(fullValue, this.options.mergeTags());\n\n const node = this.type.create({\n label,\n value: fullValue,\n });\n\n state.tr.replaceWith(range.from, range.to, node);\n },\n }),\n ];\n },\n});\n","import type { MergeTag } from \"@templatical/types\";\nimport { Extension } from \"@tiptap/core\";\nimport Suggestion, {\n type SuggestionOptions,\n type SuggestionProps,\n type SuggestionKeyDownProps,\n} from \"@tiptap/suggestion\";\nimport type { Ref } from \"vue\";\nimport { createMergeTagPopup, filterMergeTags } from \"../utils/mergeTagPopup\";\n\nexport interface MergeTagSuggestionOptions {\n /** Available merge tags */\n /**\n * Read live, not captured: the list can be replaced while a block is being\n * edited (`editor.setMergeTags`), and a snapshot taken when the extension\n * was configured would keep suggesting the old tags.\n */\n mergeTags: () => MergeTag[];\n /** Trigger string (e.g. \"{{\", \"*|\", \"%%=\") */\n char: string;\n /** Localized empty-state label */\n emptyText: string;\n /**\n * Mount target for the suggestion popup. When provided with a non-null\n * `.value`, the popup attaches into that element instead of\n * `document.body` — keeping it inside the editor's effective DOM root\n * (shadow-aware). Pass the ref returned by `usePopoverRoot()`.\n *\n * Falls back to `document.body` when omitted or when the ref's value is\n * null at popup-open time (e.g. headless/test editors without an editor\n * shell). Preserves pre-Phase-3 behavior for callers that don't migrate.\n */\n popoverRoot?: Ref<HTMLElement | null> | null;\n}\n\n/**\n * Builds the `@tiptap/suggestion` `render` factory for the merge-tag popup.\n * A thin adapter over {@link createMergeTagPopup}: it maps ProseMirror's\n * `SuggestionProps` (items, `clientRect`, `view.dom`, `command`) onto the\n * controller. Exported as a standalone function so that mapping can be\n * unit-tested with mocked `SuggestionProps` instead of a full editor.\n */\nexport function createMergeTagSuggestionRenderer(\n emptyText: string,\n popoverRootRef?: Ref<HTMLElement | null> | null,\n): NonNullable<SuggestionOptions<MergeTag>[\"render\"]> {\n return () => {\n const popup = createMergeTagPopup(emptyText, popoverRootRef);\n\n return {\n onStart: (props: SuggestionProps<MergeTag>) => {\n // Use view.dom (ProseMirror contenteditable, actually\n // attached to the DOM) rather than options.element, which may\n // be a detached div when no `element` is passed to the editor\n // constructor (as is the case with @tiptap/vue-3 EditorContent).\n const viewDom = props.editor.view?.dom as HTMLElement | undefined;\n popup.open({\n items: props.items,\n getRect: props.clientRect ?? null,\n anchorEl: viewDom ?? null,\n onCommand: (item) => props.command(item),\n });\n },\n onUpdate: (props: SuggestionProps<MergeTag>) => {\n popup.update({\n items: props.items,\n getRect: props.clientRect ?? null,\n onCommand: (item) => props.command(item),\n });\n },\n onKeyDown: (props: SuggestionKeyDownProps): boolean => {\n // Escape closes via TipTap's suggestion plugin (→ onExit); report it\n // handled without selecting.\n if (props.event.key === \"Escape\") {\n return true;\n }\n return popup.handleKeyDown(props.event);\n },\n onExit: () => popup.close(),\n };\n };\n}\n\nexport const MergeTagSuggestion = Extension.create<MergeTagSuggestionOptions>({\n name: \"mergeTagSuggestion\",\n\n addOptions() {\n return {\n mergeTags: () => [],\n char: \"{{\",\n emptyText: \"No matching merge tags\",\n popoverRoot: null,\n };\n },\n\n addProseMirrorPlugins() {\n const tags = this.options.mergeTags();\n const emptyText = this.options.emptyText;\n const popoverRootRef = this.options.popoverRoot;\n\n const config: Omit<SuggestionOptions<MergeTag>, \"editor\"> = {\n char: this.options.char,\n allowSpaces: false,\n startOfLine: false,\n // Default is [\" \"] which requires whitespace/line-start before the\n // trigger char — so `.{{` would not fire. Allow any preceding char.\n allowedPrefixes: null,\n items: ({ query }: { query: string }) => filterMergeTags(tags, query),\n command: ({\n editor,\n range,\n props,\n }: {\n editor: SuggestionProps<MergeTag>[\"editor\"];\n range: { from: number; to: number };\n props: MergeTag;\n }) => {\n // Use insertContentAt for atomic replace (matches the canonical\n // @tiptap/suggestion + Mention pattern). Avoids edge cases where\n // chained deleteRange + insertMergeTag fails to insert when the\n // selection state shifts mid-chain.\n editor\n .chain()\n .focus()\n .insertContentAt(range, {\n type: \"mergeTagNode\",\n attrs: { label: props.label, value: props.value },\n })\n .run();\n },\n render: createMergeTagSuggestionRenderer(emptyText, popoverRootRef),\n };\n\n return [\n Suggestion({\n editor: this.editor,\n ...config,\n }),\n ];\n },\n});\n"],"mappings":";;;;;;;AAeA,IAAasE,IAAWT,EAAU,OAAwB;CACxD,MAAM;CAEN,aAAa;EACX,OAAO,EACL,OAAO,CAAC,WAAW,EACrB;CACF;CAEA,sBAA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KACrB,YAAY,MAASA,EAAM,QAAQ0D,CAAI;IACzC,CAAC;GACH;GACA,WAAW,MAAqC;IAC9C,EAAM,OAAO;KACX,OAAO1D,EAAM;KACb,SAASA,EAAM,cAAc;KAC7B,YAAY,MAASA,EAAM,QAAQ0D,CAAI;IACzC,CAAC;GACH;GACA,YAAY,MAGN1D,EAAM,MAAM,QAAQ,YAGjBuD,EAAM,cAAcvD,EAAM,KAAK;GAExC,cAAcuD,EAAM,MAAM;EAC5B;CACF;AACF;AAEA,IAAaI,IAAqBxF,EAAU,OAAkC;CAC5E,MAAM;CAEN,aAAa;EACX,OAAO;GACL,iBAAiB,CAAC;GAClB,MAAM;GACN,WAAW;GACX,aAAa;EACf;CACF;CAEA,wBAAwB;EACtB,IAAMyF,IAAO,KAAK,QAAQ,UAAU,GAC9BJ,IAAY,KAAK,QAAQ,WACzBC,IAAiB,KAAK,QAAQ,aAE9BI,IAAsD;GAC1D,MAAM,KAAK,QAAQ;GACnB,aAAa;GACb,aAAa;GAGb,iBAAiB;GACjB,QAAQ,EAAE,eAA+BnF,EAAgBkF,GAAME,CAAK;GACpE,UAAU,EACR,WACA,UACA,eAKI;IAKJ,EACG,MAAM,CAAC,CACP,MAAM,CAAC,CACP,gBAAgB/B,GAAO;KACtB,MAAM;KACN,OAAO;MAAE,OAAO/B,EAAM;MAAO,OAAOA,EAAM;KAAM;IAClD,CAAC,CAAC,CACD,IAAI;GACT;GACA,QAAQsD,EAAiCE,GAAWC,CAAc;EACpE;EAEA,OAAO,CACLlH,EAAW;GACT,QAAQ,KAAK;GACb,GAAGsH;EACL,CAAC,CACH;CACF;AACF,CAAC"}
@@ -13,7 +13,9 @@ var e = { mediaLibrary: {
13
13
  noFiles: "Aucun fichier trouvé",
14
14
  noSearchResults: "Aucun fichier ne correspond à votre recherche",
15
15
  dropOrClick: "Déposez des fichiers ici ou cliquez pour téléverser",
16
- acceptedFormats: "Images, PDF, vidéo, audio, documents (max 10 Mo)",
16
+ acceptedAnyType: "Tous types de fichiers",
17
+ acceptedFormatsMaxSize: "{formats} (max {size})",
18
+ uploadRejected: "Non téléversé, type ou taille non accepté : {files}",
17
19
  uploading: "Téléversement...",
18
20
  uploadingProgress: "Téléversement de {current} sur {total}...",
19
21
  selectImage: "Sélectionner l'image",
@@ -60,12 +62,14 @@ var e = { mediaLibrary: {
60
62
  replaceFile: "Remplacer le fichier",
61
63
  replaceWarningTitle: "Remplacer le fichier",
62
64
  replaceWarningMessage: "Vous êtes sur le point de remplacer ce fichier. Le remplacement doit avoir la même extension ({extension}).",
63
- replaceWarningUsageNote: "Ce fichier est utilisé dans {count} modèle(s). Le remplacer mettra à jour toutes les références.",
65
+ replaceWarningUsageNote: "Ce fichier est utilisé dans {count} modèle(s). Vérifiez-les après l'avoir remplacé.",
64
66
  replaceSelectFile: "Sélectionner le fichier de remplacement",
65
67
  replace: "Remplacer",
66
68
  replacing: "Remplacement...",
67
69
  replaceError: "Échec du remplacement du fichier",
68
70
  saving: "Enregistrement...",
71
+ editSaveError: "Impossible d'enregistrer vos modifications. Veuillez réessayer.",
72
+ editCropError: "Impossible de traiter l'image modifiée. Veuillez réessayer.",
69
73
  cropAspectRatio: "Proportions",
70
74
  cropFree: "Libre",
71
75
  cropSquare: "1:1",
@@ -90,3 +94,5 @@ var e = { mediaLibrary: {
90
94
  } };
91
95
  //#endregion
92
96
  export { e as default };
97
+
98
+ //# sourceMappingURL=fr-DVPtxpR6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-DVPtxpR6.js","names":["fr"],"sources":["../../../../media-library/src/i18n/locales/fr.ts"],"sourcesContent":["const fr = {\n mediaLibrary: {\n title: \"Médiathèque\",\n searchPlaceholder: \"Rechercher des fichiers...\",\n allFiles: \"Tous les fichiers\",\n filterAll: \"Tous les types\",\n filterImages: \"Images\",\n filterDocuments: \"Documents\",\n filterVideos: \"Vidéos\",\n filterAudio: \"Audio\",\n newFolder: \"Nouveau dossier\",\n folderName: \"Nom du dossier\",\n noFiles: \"Aucun fichier trouvé\",\n noSearchResults: \"Aucun fichier ne correspond à votre recherche\",\n dropOrClick: \"Déposez des fichiers ici ou cliquez pour téléverser\",\n acceptedAnyType: \"Tous types de fichiers\",\n acceptedFormatsMaxSize: \"{formats} (max {size})\",\n uploadRejected: \"Non téléversé, type ou taille non accepté : {files}\",\n uploading: \"Téléversement...\",\n uploadingProgress: \"Téléversement de {current} sur {total}...\",\n selectImage: \"Sélectionner l'image\",\n selectFile: \"Sélectionner le fichier\",\n deleteSelected: \"Supprimer\",\n copyUrl: \"Copier l'URL\",\n copied: \"Copié !\",\n browseMedia: \"Parcourir la médiathèque\",\n renameFolder: \"Renommer le dossier\",\n addSubfolder: \"Ajouter un sous-dossier\",\n subfolderName: \"Nom du sous-dossier\",\n sortNewest: \"Plus récents d'abord\",\n sortOldest: \"Plus anciens d'abord\",\n sortNameAsc: \"Nom A-Z\",\n sortNameDesc: \"Nom Z-A\",\n sortSizeAsc: \"Plus petits d'abord\",\n sortSizeDesc: \"Plus grands d'abord\",\n moveSelected: \"Déplacer\",\n moveToRoot: \"Tous les fichiers\",\n currentFolder: \"(actuel)\",\n confirmDelete: \"Confirmer ?\",\n renameFile: \"Renommer\",\n editFile: \"Modifier le fichier\",\n fileName: \"Nom de fichier\",\n altText: \"Texte alternatif\",\n altTextPlaceholder: \"Décrivez cette image pour l'accessibilité\",\n saveChanges: \"Enregistrer\",\n cancel: \"Annuler\",\n frequentlyUsed: \"Fréquemment utilisés\",\n deleteWarningTitle: \"Supprimer le fichier\",\n deleteWarningMessage: \"Êtes-vous sûr ? Cette action est irréversible.\",\n deleteWarningUsageNote:\n \"Les fichiers suivants sont utilisés dans des modèles. Les supprimer peut casser ces modèles.\",\n deleteAnyway: \"Supprimer\",\n usedInTemplates: \"Utilisé dans {count} modèle(s)\",\n viewGrid: \"Vue en grille\",\n viewList: \"Vue en liste\",\n showFolders: \"Afficher les dossiers\",\n hideFolders: \"Masquer les dossiers\",\n importFromUrl: \"Importer depuis une URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Importer\",\n importing: \"Importation...\",\n importError: \"Échec de l'importation depuis l'URL\",\n replaceFile: \"Remplacer le fichier\",\n replaceWarningTitle: \"Remplacer le fichier\",\n replaceWarningMessage:\n \"Vous êtes sur le point de remplacer ce fichier. Le remplacement doit avoir la même extension ({extension}).\",\n replaceWarningUsageNote:\n \"Ce fichier est utilisé dans {count} modèle(s). Vérifiez-les après l'avoir remplacé.\",\n replaceSelectFile: \"Sélectionner le fichier de remplacement\",\n replace: \"Remplacer\",\n replacing: \"Remplacement...\",\n replaceError: \"Échec du remplacement du fichier\",\n saving: \"Enregistrement...\",\n editSaveError:\n \"Impossible d'enregistrer vos modifications. Veuillez réessayer.\",\n editCropError:\n \"Impossible de traiter l'image modifiée. Veuillez réessayer.\",\n cropAspectRatio: \"Proportions\",\n cropFree: \"Libre\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Originales\",\n cropMaxWidth: \"Largeur max\",\n cropMaxHeight: \"Hauteur max\",\n cropOutputSize: \"Taille de sortie\",\n cropPixels: \"px\",\n cropOptional: \"(facultatif)\",\n close: \"Fermer\",\n searchAriaLabel: \"Rechercher des fichiers\",\n filterAriaLabel: \"Filtrer par type\",\n filesListAriaLabel: \"Fichiers\",\n loading: \"Chargement\",\n expandFolder: \"Développer le dossier\",\n collapseFolder: \"Réduire le dossier\",\n deleteFolder: \"Supprimer le dossier\",\n deleteFolderConfirm: \"Confirmer la suppression\",\n storageTooltip: \"{used} sur {total} utilisés ({remaining} restants)\",\n },\n};\n\nexport default fr;\n"],"mappings":";AAAA,IAAMA,IAAK,EACT,cAAc;CACZ,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,WAAW;CACX,cAAc;CACd,iBAAiB;CACjB,cAAc;CACd,aAAa;CACb,WAAW;CACX,YAAY;CACZ,SAAS;CACT,iBAAiB;CACjB,aAAa;CACb,iBAAiB;CACjB,wBAAwB;CACxB,gBAAgB;CAChB,WAAW;CACX,mBAAmB;CACnB,aAAa;CACb,YAAY;CACZ,gBAAgB;CAChB,SAAS;CACT,QAAQ;CACR,aAAa;CACb,cAAc;CACd,cAAc;CACd,eAAe;CACf,YAAY;CACZ,YAAY;CACZ,aAAa;CACb,cAAc;CACd,aAAa;CACb,cAAc;CACd,cAAc;CACd,YAAY;CACZ,eAAe;CACf,eAAe;CACf,YAAY;CACZ,UAAU;CACV,UAAU;CACV,SAAS;CACT,oBAAoB;CACpB,aAAa;CACb,QAAQ;CACR,gBAAgB;CAChB,oBAAoB;CACpB,sBAAsB;CACtB,wBACE;CACF,cAAc;CACd,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,aAAa;CACb,aAAa;CACb,eAAe;CACf,sBAAsB;CACtB,QAAQ;CACR,WAAW;CACX,aAAa;CACb,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,eACE;CACF,eACE;CACF,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,OAAO;CACP,iBAAiB;CACjB,iBAAiB;CACjB,oBAAoB;CACpB,SAAS;CACT,cAAc;CACd,gBAAgB;CAChB,cAAc;CACd,qBAAqB;CACrB,gBAAgB;AAClB,EACF"}
@@ -1,5 +1,5 @@
1
1
  import { E as e, w as t } from "./draggable-IB4x6w2O.js";
2
- //#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/defaultAttributes.mjs
2
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.49.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/defaultAttributes.mjs
3
3
  var n = {
4
4
  xmlns: "http://www.w3.org/2000/svg",
5
5
  width: 24,
@@ -12,7 +12,7 @@ var n = {
12
12
  "stroke-linejoin": "round"
13
13
  }, r = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim();
14
14
  //#endregion
15
- //#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/buildLucideIconNode.mjs
15
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.49.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/build/buildLucideIconNode.mjs
16
16
  function i(e) {
17
17
  return e != null;
18
18
  }
@@ -49,7 +49,7 @@ function a(e, t = {}) {
49
49
  ];
50
50
  }
51
51
  //#endregion
52
- //#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/hasA11yProp.mjs
52
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.49.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/shared/src/utils/hasA11yProp.mjs
53
53
  var o = (e) => {
54
54
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
55
55
  return !1;
@@ -58,7 +58,7 @@ function u() {
58
58
  return e(l, {});
59
59
  }
60
60
  //#endregion
61
- //#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
61
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.49.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
62
62
  var d = ({ name: e, iconNode: n, "icon-node": r, icon: i = {
63
63
  name: e && c(e),
64
64
  node: n ?? r ?? [],
@@ -81,7 +81,7 @@ var d = ({ name: e, iconNode: n, "icon-node": r, icon: i = {
81
81
  return t("svg", j, [...M.map(([e, n]) => t(e, n)), ...A ?? []]);
82
82
  };
83
83
  //#endregion
84
- //#region ../../node_modules/.pnpm/@lucide+vue@1.48.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/createLucideIcon.mjs
84
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.49.0_vue@3.5.43_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/createLucideIcon.mjs
85
85
  function f(e, n = []) {
86
86
  let r = typeof e == "string" ? {
87
87
  name: e,
@@ -1713,4 +1713,4 @@ var p = f({
1713
1713
  //#endregion
1714
1714
  export { ie as $, De as A, E as At, _e as B, g as Bt, Pe as C, ee as Ct, Ae as D, k as Dt, je as E, A as Et, Se as F, x as Ft, fe as G, he as H, m as Ht, xe as I, b as It, le as J, de as K, be as L, y as Lt, Te as M, w as Mt, we as N, C as Nt, ke as O, O as Ot, Ce as P, S as Pt, ae as Q, ye as R, v as Rt, Fe as S, te as St, Me as T, j as Tt, me as U, p as Ut, ge as V, h as Vt, pe as W, se as X, ce as Y, oe as Z, Be as _, L as _t, Ze as a, Y as at, Le as b, P as bt, Je as c, K as ct, Ge as d, U as dt, re as et, We as f, H as ft, Ve as g, R as gt, $ as h, z as ht, Qe as i, X as it, Ee as j, T as jt, Oe as k, D as kt, qe as l, G as lt, He as m, B as mt, et as n, Q as nt, Xe as o, J as ot, Ue as p, V as pt, ue as q, $e as r, Z as rt, Ye as s, q as st, tt as t, ne as tt, Ke as u, W as ut, ze as v, I as vt, Ne as w, M as wt, Ie as x, N as xt, Re as y, F as yt, ve as z, _ as zt };
1715
1715
 
1716
- //# sourceMappingURL=icons-CQnjugjy.js.map
1716
+ //# sourceMappingURL=icons-BrAyaJ0T.js.map