@templatical/editor 0.8.1 → 0.8.3

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 (147) hide show
  1. package/dist/{AiChatSidebar-B74X6tIx.js → AiChatSidebar-CXpsSTbt.js} +13 -13
  2. package/dist/{AiFeatureMenu-BPOVM_Ou.js → AiFeatureMenu-De9ow6Ej.js} +7 -7
  3. package/dist/{BlockIssueBadge-DJTiT1eF.js → BlockIssueBadge-FEuyG1p0.js} +5 -5
  4. package/dist/{CloudEditor-wAkx8TH_.js → CloudEditor-Ccoru8Up.js} +19 -19
  5. package/dist/{CollaboratorBar-DIr5ZUv9.js → CollaboratorBar-CmHq6XiL.js} +4 -4
  6. package/dist/{CommentsSidebar-Qvppl-DR.js → CommentsSidebar-DaWP5ZGl.js} +12 -12
  7. package/dist/{CountdownBlock-D0IiMliC.js → CountdownBlock-C51M6s-J.js} +3 -3
  8. package/dist/{CountdownToolbar-BVVT8U5C.js → CountdownToolbar-C2QkG8S0.js} +3 -3
  9. package/dist/{DesignReferenceSidebar-ucgtoDll.js → DesignReferenceSidebar-BwIRFmpA.js} +9 -9
  10. package/dist/{IssuesPanel-XVdvrgmq.js → IssuesPanel-B6ukjc1i.js} +8 -8
  11. package/dist/{LoadingTrack-CFkDkjBb.js → LoadingTrack-CZ6tO326.js} +1 -1
  12. package/dist/{ModuleBrowserModal-VqGNisDp.js → ModuleBrowserModal-0n6DoZtA.js} +11 -11
  13. package/dist/{ModulePreviewCanvas-DmzW6I_9.js → ModulePreviewCanvas-DEtTEvMM.js} +3 -3
  14. package/dist/{NumberWithSuffix-n-cr7lpU.js → NumberWithSuffix-wOM0319c.js} +3 -3
  15. package/dist/{ParagraphEditor-BQTPI8j8.js → ParagraphEditor-PQZp1plL.js} +25 -25
  16. package/dist/{RichTextEditorContent-Cu9NEkKd.js → RichTextEditorContent-C02UzFoS.js} +6 -6
  17. package/dist/{SaveModuleDialog-DhgHOGgX.js → SaveModuleDialog-WWMn87Oi.js} +7 -7
  18. package/dist/{SnapshotHistory-DJOsWv4i.js → SnapshotHistory-Dy_Iy7VG.js} +9 -9
  19. package/dist/{TemplateScoringPanel-BzDVdfOx.js → TemplateScoringPanel-BpQgtaDl.js} +14 -14
  20. package/dist/{TestEmailModal-Dqj50aHe.js → TestEmailModal--4EVFj1A.js} +5 -5
  21. package/dist/{TitleEditor-PQYXfY6W.js → TitleEditor-C6z6Jzeg.js} +12 -12
  22. package/dist/{TplModal-Dy6RXBV_.js → TplModal-D5xlYbls.js} +4 -4
  23. package/dist/{blockTypeIcons-qnUeTls5.js → blockTypeIcons-jZR-IBPY.js} +2 -2
  24. package/dist/bundle-stats.json +6 -6
  25. package/dist/cdn/chunks/{AiFeatureMenu-Cr6_Q9Zv.js → AiFeatureMenu-8gbvVwXD.js} +3 -3
  26. package/dist/cdn/chunks/{AiFeatureMenu-Cr6_Q9Zv.js.map → AiFeatureMenu-8gbvVwXD.js.map} +1 -1
  27. package/dist/cdn/chunks/{BlockIssueBadge-D0_mYpkl.js → BlockIssueBadge-CYoY-wyI.js} +3 -3
  28. package/dist/cdn/chunks/{BlockIssueBadge-D0_mYpkl.js.map → BlockIssueBadge-CYoY-wyI.js.map} +1 -1
  29. package/dist/cdn/chunks/{CloudEditor-BtAkuQB4.js → CloudEditor-DGAV0qxk.js} +8 -8
  30. package/dist/cdn/chunks/{CloudEditor-BtAkuQB4.js.map → CloudEditor-DGAV0qxk.js.map} +1 -1
  31. package/dist/cdn/chunks/{CollaboratorBar-C-P00I9l.js → CollaboratorBar-BrzkrQJM.js} +4 -4
  32. package/dist/cdn/chunks/{CollaboratorBar-C-P00I9l.js.map → CollaboratorBar-BrzkrQJM.js.map} +1 -1
  33. package/dist/cdn/chunks/{CountdownBlock-BEWsiqgw.js → CountdownBlock-BSEKrpZY.js} +3 -3
  34. package/dist/cdn/chunks/{CountdownBlock-BEWsiqgw.js.map → CountdownBlock-BSEKrpZY.js.map} +1 -1
  35. package/dist/cdn/chunks/{CountdownToolbar-CdjFGEI7.js → CountdownToolbar-DME9toD5.js} +4 -4
  36. package/dist/cdn/chunks/{CountdownToolbar-CdjFGEI7.js.map → CountdownToolbar-DME9toD5.js.map} +1 -1
  37. package/dist/cdn/chunks/{IssuesPanel-DJOLYNAJ.js → IssuesPanel-BqGOXisb.js} +4 -4
  38. package/dist/cdn/chunks/{IssuesPanel-DJOLYNAJ.js.map → IssuesPanel-BqGOXisb.js.map} +1 -1
  39. package/dist/cdn/chunks/{ModuleBrowserModal-hnbUUl8w.js → ModuleBrowserModal-Bz2oCRS9.js} +6 -6
  40. package/dist/cdn/chunks/{ModuleBrowserModal-hnbUUl8w.js.map → ModuleBrowserModal-Bz2oCRS9.js.map} +1 -1
  41. package/dist/cdn/chunks/{ModulePreviewCanvas-_DoUZGQh.js → ModulePreviewCanvas-8i2U3rd6.js} +3 -3
  42. package/dist/cdn/chunks/{ModulePreviewCanvas-_DoUZGQh.js.map → ModulePreviewCanvas-8i2U3rd6.js.map} +1 -1
  43. package/dist/cdn/chunks/{NumberWithSuffix-ryhWFnCJ.js → NumberWithSuffix-C6HZCvvh.js} +3 -3
  44. package/dist/cdn/chunks/{NumberWithSuffix-ryhWFnCJ.js.map → NumberWithSuffix-C6HZCvvh.js.map} +1 -1
  45. package/dist/cdn/chunks/{ParagraphEditor-BtzinrI_.js → ParagraphEditor-DfKVmv1W.js} +19 -19
  46. package/dist/cdn/chunks/{ParagraphEditor-BtzinrI_.js.map → ParagraphEditor-DfKVmv1W.js.map} +1 -1
  47. package/dist/cdn/chunks/{RichTextEditorContent-CRlcjuMH.js → RichTextEditorContent-B-HY9asd.js} +3 -3
  48. package/dist/cdn/chunks/{RichTextEditorContent-CRlcjuMH.js.map → RichTextEditorContent-B-HY9asd.js.map} +1 -1
  49. package/dist/cdn/chunks/{SaveModuleDialog-D-g-nYuL.js → SaveModuleDialog-BgwBxW_S.js} +3 -3
  50. package/dist/cdn/chunks/{SaveModuleDialog-D-g-nYuL.js.map → SaveModuleDialog-BgwBxW_S.js.map} +1 -1
  51. package/dist/cdn/chunks/{TitleEditor-Bzsbpajt.js → TitleEditor-C2p3SosJ.js} +9 -9
  52. package/dist/cdn/chunks/{TitleEditor-Bzsbpajt.js.map → TitleEditor-C2p3SosJ.js.map} +1 -1
  53. package/dist/cdn/chunks/{blockTypeIcons-B_klsmQ1.js → blockTypeIcons-Bck6aYVw.js} +3 -3
  54. package/dist/cdn/chunks/{blockTypeIcons-B_klsmQ1.js.map → blockTypeIcons-Bck6aYVw.js.map} +1 -1
  55. package/dist/cdn/chunks/de-BBEGQDsd.js.map +1 -1
  56. package/dist/cdn/chunks/de-DG1WWVXM.js.map +1 -1
  57. package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -1
  58. package/dist/cdn/chunks/{draggable-P6QWzy4g.js → draggable-CLpL3kf8.js} +6 -6
  59. package/dist/cdn/chunks/draggable-CLpL3kf8.js.map +1 -0
  60. package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -1
  61. package/dist/cdn/chunks/en-BE6OV83-.js.map +1 -1
  62. package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -1
  63. package/dist/cdn/chunks/en-CHha-_ta.js.map +1 -1
  64. package/dist/cdn/chunks/{extensions-DIHxPVrP.js → extensions-DdH6DxVo.js} +4 -4
  65. package/dist/cdn/chunks/{extensions-DIHxPVrP.js.map → extensions-DdH6DxVo.js.map} +1 -1
  66. package/dist/cdn/chunks/{features-BsW4aFcn.js → features-BOcQhi9B.js} +69 -48
  67. package/dist/cdn/chunks/features-BOcQhi9B.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-BgPk6tUq.js → icons-BVyDCkxF.js} +12 -12
  69. package/dist/cdn/chunks/{icons-BgPk6tUq.js.map → icons-BVyDCkxF.js.map} +1 -1
  70. package/dist/cdn/chunks/{liquid.browser-lQbkge2E.js → liquid.browser-cpFt-Vmw.js} +674 -612
  71. package/dist/cdn/chunks/liquid.browser-cpFt-Vmw.js.map +1 -0
  72. package/dist/cdn/chunks/{media-library-C1Ue4At9.js → media-library-CPZI4Yxq.js} +6 -5
  73. package/dist/cdn/chunks/{media-library-C1Ue4At9.js.map → media-library-CPZI4Yxq.js.map} +1 -1
  74. package/dist/cdn/chunks/pt-BR-BYRTP5Ww.js.map +1 -1
  75. package/dist/cdn/chunks/pt-BR-CFomv2R8.js.map +1 -1
  76. package/dist/cdn/chunks/pt-BR-CQl2JxRp.js.map +1 -1
  77. package/dist/cdn/chunks/pusher-bjpcqCZG.js.map +1 -1
  78. package/dist/cdn/chunks/quality-Cytz80Z5.js +2140 -0
  79. package/dist/cdn/chunks/quality-Cytz80Z5.js.map +1 -0
  80. package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -1
  81. package/dist/cdn/chunks/{renderer-BdjvKDwC.js → renderer-Bsqzjvsr.js} +11 -5
  82. package/dist/cdn/chunks/{renderer-BdjvKDwC.js.map → renderer-Bsqzjvsr.js.map} +1 -1
  83. package/dist/cdn/chunks/{src-BI22RLP6.js → src-BRhJ_W0W.js} +5 -5
  84. package/dist/cdn/chunks/{src-BI22RLP6.js.map → src-BRhJ_W0W.js.map} +1 -1
  85. package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -1
  86. package/dist/cdn/chunks/{styles-BkubbXy8.js → styles-MrOGXwzJ.js} +17 -17
  87. package/dist/cdn/chunks/{styles-BkubbXy8.js.map → styles-MrOGXwzJ.js.map} +1 -1
  88. package/dist/cdn/chunks/{tiptap-BwTCLVWl.js → tiptap-BCvhHXDe.js} +711 -692
  89. package/dist/cdn/chunks/tiptap-BCvhHXDe.js.map +1 -0
  90. package/dist/cdn/editor.js +6 -6
  91. package/dist/cdn/editor.js.map +1 -1
  92. package/dist/{check-BF4bEbCU.js → check-DwVS7v3N.js} +1 -1
  93. package/dist/{chevron-down-4NzWtv6Y.js → chevron-down-CytfFjil.js} +1 -1
  94. package/dist/{circle-alert-CPIth9bC.js → circle-alert-9J8Q4fwU.js} +1 -1
  95. package/dist/{clock-B9-ct9r_.js → clock-CL2fYWmc.js} +1 -1
  96. package/dist/{cloud-k0DgeCo2.js → cloud-DHsOqOnH.js} +1 -1
  97. package/dist/{createLucideIcon-Di4mqmGn.js → createLucideIcon-DTECxBv6.js} +4 -4
  98. package/dist/{dist-DVwOAodp.js → dist-3RAjjDZq.js} +2 -2
  99. package/dist/{dist-hfu7I2rO.js → dist-B5FKze93.js} +375 -353
  100. package/dist/dist-BWVK8w_m.js +5 -0
  101. package/dist/{dist-CISFttkF.js → dist-BjSjVZRA.js} +2 -2
  102. package/dist/{dist-DD-9hatO.js → dist-BoGj0ys1.js} +8 -8
  103. package/dist/{dist-BzRLLpfq.js → dist-CkhqaMca.js} +6 -5
  104. package/dist/{dist-U5guDm2w.js → dist-D8IxYzaU.js} +125 -125
  105. package/dist/{dist-B2jcQhv8.js → dist-DPiqL9q5.js} +17 -17
  106. package/dist/{dist-v8h02hhE.js → dist-DgD8K8y0.js} +2 -2
  107. package/dist/{dist-DxD1kSdH.js → dist-DiYYRj9J.js} +22 -48
  108. package/dist/{dist-CQQS9SRN.js → dist-DpF3BN6Y.js} +85 -62
  109. package/dist/dist-UekZXGFH.js +5 -0
  110. package/dist/{dist-DUvhjQ2-.js → dist-qFGe50Kc.js} +2 -2
  111. package/dist/{extensions-C-FpnfJn.js → extensions-BTheidN4.js} +19 -19
  112. package/dist/{image-up-CubAveUO.js → image-up-YgXg9o1y.js} +1 -1
  113. package/dist/index.d.ts +39 -92
  114. package/dist/{info-DiINxXfZ.js → info-W-213KLD.js} +1 -1
  115. package/dist/{keys-CY3tkCsv.js → keys-XS_XrjqL.js} +1 -1
  116. package/dist/{liquid.browser-DX8ZHRdq.js → liquid.browser-Dc30h4PN.js} +673 -611
  117. package/dist/{list-checks-CMtEXe9l.js → list-checks-BQrZlWzC.js} +1 -1
  118. package/dist/{loader-circle-_9bP23op.js → loader-circle-BQPHssrF.js} +1 -1
  119. package/dist/{message-circle-gzy2ZGJ3.js → message-circle-iMgHXBeH.js} +1 -1
  120. package/dist/{refresh-cw-C9_M6yB3.js → refresh-cw-DFozdLYp.js} +1 -1
  121. package/dist/{scan-line-DUEg6DoT.js → scan-line-D3NN0Gre.js} +1 -1
  122. package/dist/{send-BatIZC9a.js → send-DBhq0GU2.js} +1 -1
  123. package/dist/{shield-check-C5Gv2cM1.js → shield-check-DquM3-E5.js} +1 -1
  124. package/dist/{sparkles-D1IGi_cC.js → sparkles-CTGknLJy.js} +1 -1
  125. package/dist/{styles-BEhOSxt5.js → styles-DfdDKEGV.js} +33 -33
  126. package/dist/templatical-editor.js +4 -4
  127. package/dist/{text-align-start-DG3aAH7Y.js → text-align-end-BPOHCD7K.js} +11 -11
  128. package/dist/{trash-2-424iqbpN.js → trash-2-VyX2kcG0.js} +1 -1
  129. package/dist/{triangle-alert-DWQySIE2.js → triangle-alert-HIqW9Hwv.js} +1 -1
  130. package/dist/{useAliveFlag-D8GoB4VE.js → useAliveFlag-t3e0dokQ.js} +1 -1
  131. package/dist/{useCloudI18n-BPUHj2CZ.js → useCloudI18n-oETj4WiF.js} +2 -2
  132. package/dist/{useEditorCore-DnCOsekL.js → useEditorCore-YaOoz7QB.js} +37 -31
  133. package/dist/{useI18n-CWX9ZTCW.js → useI18n-tMHqPsE4.js} +2 -2
  134. package/dist/{useMergeTag-B3F9VR04.js → useMergeTag-Bv8ASt6n.js} +2 -2
  135. package/dist/usePopoverRoot-Bs6kLsI3.js +8 -0
  136. package/dist/{vue.runtime.esm-bundler-Bxqkjqhc.js → vue.runtime.esm-bundler-xiAB6UTz.js} +15 -12
  137. package/dist/{x-Dlaenqta.js → x-C1j-AamY.js} +1 -1
  138. package/package.json +33 -34
  139. package/dist/cdn/chunks/draggable-P6QWzy4g.js.map +0 -1
  140. package/dist/cdn/chunks/features-BsW4aFcn.js.map +0 -1
  141. package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
  142. package/dist/cdn/chunks/quality-BDr54nMA.js +0 -1878
  143. package/dist/cdn/chunks/quality-BDr54nMA.js.map +0 -1
  144. package/dist/cdn/chunks/tiptap-BwTCLVWl.js.map +0 -1
  145. package/dist/dist-BYt3jdCR.js +0 -5
  146. package/dist/dist-CfQPBf15.js +0 -5
  147. package/dist/usePopoverRoot-BKJcxsst.js +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"emojiData-EMFlj6FJ.js","names":[],"sources":["../../../src/composables/emojiData.ts"],"sourcesContent":["export type EmojiCategoryKey = \"smileys\" | \"gestures\" | \"objects\";\n\nexport interface EmojiCategory {\n key: EmojiCategoryKey;\n emojis: string[];\n}\n\nexport const emojiCategories: EmojiCategory[] = [\n {\n key: \"smileys\",\n emojis: [\n \"\\u{1F600}\",\n \"\\u{1F603}\",\n \"\\u{1F604}\",\n \"\\u{1F601}\",\n \"\\u{1F605}\",\n \"\\u{1F602}\",\n \"\\u{1F923}\",\n \"\\u{1F60A}\",\n \"\\u{1F607}\",\n \"\\u{1F642}\",\n \"\\u{1F609}\",\n \"\\u{1F60D}\",\n \"\\u{1F970}\",\n \"\\u{1F618}\",\n \"\\u{1F60B}\",\n \"\\u{1F60E}\",\n \"\\u{1F929}\",\n \"\\u{1F973}\",\n \"\\u{1F60F}\",\n \"\\u{1F622}\",\n \"\\u{1F62D}\",\n \"\\u{1F624}\",\n \"\\u{1F621}\",\n \"\\u{1F92F}\",\n \"\\u{1F631}\",\n \"\\u{1F914}\",\n \"\\u{1F92B}\",\n \"\\u{1F917}\",\n \"\\u{1FAE1}\",\n \"\\u{1F44B}\",\n ],\n },\n {\n key: \"gestures\",\n emojis: [\n \"\\u{1F44D}\",\n \"\\u{1F44E}\",\n \"\\u{1F44F}\",\n \"\\u{1F64C}\",\n \"\\u{1F91D}\",\n \"\\u270C\\uFE0F\",\n \"\\u{1F91E}\",\n \"\\u{1FAF6}\",\n \"\\u2764\\uFE0F\",\n \"\\u{1F9E1}\",\n \"\\u{1F49B}\",\n \"\\u{1F49A}\",\n \"\\u{1F499}\",\n \"\\u{1F49C}\",\n \"\\u{1F5A4}\",\n \"\\u{1F4AF}\",\n \"\\u2728\",\n \"\\u2B50\",\n \"\\u{1F31F}\",\n \"\\u{1F4AB}\",\n \"\\u{1F525}\",\n \"\\u{1F4A5}\",\n \"\\u{1F4AA}\",\n \"\\u{1F440}\",\n \"\\u{1F441}\\uFE0F\",\n \"\\u{1F389}\",\n \"\\u{1F38A}\",\n \"\\u{1F381}\",\n \"\\u{1F3C6}\",\n \"\\u{1F947}\",\n ],\n },\n {\n key: \"objects\",\n emojis: [\n \"\\u{1F4E7}\",\n \"\\u2709\\uFE0F\",\n \"\\u{1F4E8}\",\n \"\\u{1F4E9}\",\n \"\\u{1F4EC}\",\n \"\\u{1F4F1}\",\n \"\\u{1F4BB}\",\n \"\\u{1F5A5}\\uFE0F\",\n \"\\u{1F4CA}\",\n \"\\u{1F4C8}\",\n \"\\u{1F4C9}\",\n \"\\u{1F4C5}\",\n \"\\u{1F5D3}\\uFE0F\",\n \"\\u23F0\",\n \"\\u23F3\",\n \"\\u{1F4A1}\",\n \"\\u{1F514}\",\n \"\\u{1F4E2}\",\n \"\\u{1F3AF}\",\n \"\\u2705\",\n \"\\u274C\",\n \"\\u26A0\\uFE0F\",\n \"\\u{1F4B2}\",\n \"\\u{1F4B5}\",\n \"\\u{1F4B0}\",\n \"\\u{1F6D2}\",\n \"\\u{1F6CD}\\uFE0F\",\n \"\\u{1F4E6}\",\n \"\\u{1F680}\",\n \"\\u2708\\uFE0F\",\n ],\n },\n];\n"],"mappings":";AAOA,IAAa,IAAmC;CAC9C;EACE,KAAK;EACL,QAAQ,sHA+BP;EACF;CACD;EACE,KAAK;EACL,QAAQ,qHA+BP;EACF;CACD;EACE,KAAK;EACL,QAAQ,qHA+BP;EACF;CACF"}
1
+ {"version":3,"file":"emojiData-EMFlj6FJ.js","names":[],"sources":["../../../src/composables/emojiData.ts"],"sourcesContent":["export type EmojiCategoryKey = \"smileys\" | \"gestures\" | \"objects\";\n\nexport interface EmojiCategory {\n key: EmojiCategoryKey;\n emojis: string[];\n}\n\nexport const emojiCategories: EmojiCategory[] = [\n {\n key: \"smileys\",\n emojis: [\n \"\\u{1F600}\",\n \"\\u{1F603}\",\n \"\\u{1F604}\",\n \"\\u{1F601}\",\n \"\\u{1F605}\",\n \"\\u{1F602}\",\n \"\\u{1F923}\",\n \"\\u{1F60A}\",\n \"\\u{1F607}\",\n \"\\u{1F642}\",\n \"\\u{1F609}\",\n \"\\u{1F60D}\",\n \"\\u{1F970}\",\n \"\\u{1F618}\",\n \"\\u{1F60B}\",\n \"\\u{1F60E}\",\n \"\\u{1F929}\",\n \"\\u{1F973}\",\n \"\\u{1F60F}\",\n \"\\u{1F622}\",\n \"\\u{1F62D}\",\n \"\\u{1F624}\",\n \"\\u{1F621}\",\n \"\\u{1F92F}\",\n \"\\u{1F631}\",\n \"\\u{1F914}\",\n \"\\u{1F92B}\",\n \"\\u{1F917}\",\n \"\\u{1FAE1}\",\n \"\\u{1F44B}\",\n ],\n },\n {\n key: \"gestures\",\n emojis: [\n \"\\u{1F44D}\",\n \"\\u{1F44E}\",\n \"\\u{1F44F}\",\n \"\\u{1F64C}\",\n \"\\u{1F91D}\",\n \"\\u270C\\uFE0F\",\n \"\\u{1F91E}\",\n \"\\u{1FAF6}\",\n \"\\u2764\\uFE0F\",\n \"\\u{1F9E1}\",\n \"\\u{1F49B}\",\n \"\\u{1F49A}\",\n \"\\u{1F499}\",\n \"\\u{1F49C}\",\n \"\\u{1F5A4}\",\n \"\\u{1F4AF}\",\n \"\\u2728\",\n \"\\u2B50\",\n \"\\u{1F31F}\",\n \"\\u{1F4AB}\",\n \"\\u{1F525}\",\n \"\\u{1F4A5}\",\n \"\\u{1F4AA}\",\n \"\\u{1F440}\",\n \"\\u{1F441}\\uFE0F\",\n \"\\u{1F389}\",\n \"\\u{1F38A}\",\n \"\\u{1F381}\",\n \"\\u{1F3C6}\",\n \"\\u{1F947}\",\n ],\n },\n {\n key: \"objects\",\n emojis: [\n \"\\u{1F4E7}\",\n \"\\u2709\\uFE0F\",\n \"\\u{1F4E8}\",\n \"\\u{1F4E9}\",\n \"\\u{1F4EC}\",\n \"\\u{1F4F1}\",\n \"\\u{1F4BB}\",\n \"\\u{1F5A5}\\uFE0F\",\n \"\\u{1F4CA}\",\n \"\\u{1F4C8}\",\n \"\\u{1F4C9}\",\n \"\\u{1F4C5}\",\n \"\\u{1F5D3}\\uFE0F\",\n \"\\u23F0\",\n \"\\u23F3\",\n \"\\u{1F4A1}\",\n \"\\u{1F514}\",\n \"\\u{1F4E2}\",\n \"\\u{1F3AF}\",\n \"\\u2705\",\n \"\\u274C\",\n \"\\u26A0\\uFE0F\",\n \"\\u{1F4B2}\",\n \"\\u{1F4B5}\",\n \"\\u{1F4B0}\",\n \"\\u{1F6D2}\",\n \"\\u{1F6CD}\\uFE0F\",\n \"\\u{1F4E6}\",\n \"\\u{1F680}\",\n \"\\u2708\\uFE0F\",\n ],\n },\n];\n"],"mappings":";AAOA,IAAa,IAAmC;CAC9C;EACE,KAAK;EACL,QAAQ,qHA+BR;CACF;CACA;EACE,KAAK;EACL,QAAQ,oHA+BR;CACF;CACA;EACE,KAAK;EACL,QAAQ,oHA+BR;CACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"en-BE6OV83-.js","names":[],"sources":["../../../../media-library/src/i18n/locales/en.ts"],"sourcesContent":["const en = {\n mediaLibrary: {\n title: \"Media Library\",\n searchPlaceholder: \"Search files...\",\n allFiles: \"All Files\",\n filterAll: \"All Types\",\n filterImages: \"Images\",\n filterDocuments: \"Documents\",\n filterVideos: \"Videos\",\n filterAudio: \"Audio\",\n newFolder: \"New Folder\",\n folderName: \"Folder name\",\n noFiles: \"No files found\",\n dropOrClick: \"Drop files here or click to upload\",\n acceptedFormats: \"Images, PDF, Video, Audio, Documents (max 10MB)\",\n uploading: \"Uploading...\",\n uploadingProgress: \"Uploading {current} of {total}...\",\n selectImage: \"Select Image\",\n selectFile: \"Select File\",\n deleteSelected: \"Delete\",\n copyUrl: \"Copy URL\",\n copied: \"Copied!\",\n browseMedia: \"Browse Media Library\",\n renameFolder: \"Rename folder\",\n addSubfolder: \"Add subfolder\",\n subfolderName: \"Subfolder name\",\n sortNewest: \"Newest First\",\n sortOldest: \"Oldest First\",\n sortNameAsc: \"Name A-Z\",\n sortNameDesc: \"Name Z-A\",\n sortSizeAsc: \"Smallest First\",\n sortSizeDesc: \"Largest First\",\n moveSelected: \"Move\",\n moveToRoot: \"All Files\",\n currentFolder: \"(current)\",\n confirmDelete: \"Confirm?\",\n renameFile: \"Rename\",\n editFile: \"Edit File\",\n fileName: \"Filename\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Describe this image for accessibility\",\n saveChanges: \"Save\",\n cancel: \"Cancel\",\n frequentlyUsed: \"Frequently Used\",\n deleteWarningTitle: \"Delete File\",\n deleteWarningMessage: \"Are you sure? This action is irreversible.\",\n deleteWarningUsageNote:\n \"The following files are used in templates. Deleting them may break those templates.\",\n deleteAnyway: \"Delete\",\n usedInTemplates: \"Used in {count} template(s)\",\n viewGrid: \"Grid view\",\n viewList: \"List view\",\n showFolders: \"Show folders\",\n hideFolders: \"Hide folders\",\n importFromUrl: \"Import from URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Import\",\n importing: \"Importing...\",\n importError: \"Failed to import from URL\",\n conversionLabel: \"Size\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Small (150px)\",\n conversionMedium: \"Medium (600px)\",\n conversionLarge: \"Large (1200px)\",\n replaceFile: \"Replace File\",\n replaceWarningTitle: \"Replace File\",\n replaceWarningMessage:\n \"You are about to replace this file. The replacement must have the same file extension ({extension}).\",\n replaceWarningUsageNote:\n \"This file is used in {count} template(s). Replacing it will update all references.\",\n replaceSelectFile: \"Select replacement file\",\n replace: \"Replace\",\n replacing: \"Replacing...\",\n replaceError: \"Failed to replace file\",\n saving: \"Saving...\",\n cropAspectRatio: \"Aspect Ratio\",\n cropFree: \"Free\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Max Width\",\n cropMaxHeight: \"Max Height\",\n cropOutputSize: \"Output Size\",\n cropPixels: \"px\",\n cropOptional: \"(optional)\",\n storageTooltip: \"{used} of {total} used ({remaining} remaining)\",\n },\n};\n\nexport default en;\n"],"mappings":";AAAA,IAAM,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,aAAa;CACb,iBAAiB;CACjB,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,iBAAiB;CACjB,oBAAoB;CACpB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,gBAAgB;CACjB,EACF"}
1
+ {"version":3,"file":"en-BE6OV83-.js","names":[],"sources":["../../../../media-library/src/i18n/locales/en.ts"],"sourcesContent":["const en = {\n mediaLibrary: {\n title: \"Media Library\",\n searchPlaceholder: \"Search files...\",\n allFiles: \"All Files\",\n filterAll: \"All Types\",\n filterImages: \"Images\",\n filterDocuments: \"Documents\",\n filterVideos: \"Videos\",\n filterAudio: \"Audio\",\n newFolder: \"New Folder\",\n folderName: \"Folder name\",\n noFiles: \"No files found\",\n dropOrClick: \"Drop files here or click to upload\",\n acceptedFormats: \"Images, PDF, Video, Audio, Documents (max 10MB)\",\n uploading: \"Uploading...\",\n uploadingProgress: \"Uploading {current} of {total}...\",\n selectImage: \"Select Image\",\n selectFile: \"Select File\",\n deleteSelected: \"Delete\",\n copyUrl: \"Copy URL\",\n copied: \"Copied!\",\n browseMedia: \"Browse Media Library\",\n renameFolder: \"Rename folder\",\n addSubfolder: \"Add subfolder\",\n subfolderName: \"Subfolder name\",\n sortNewest: \"Newest First\",\n sortOldest: \"Oldest First\",\n sortNameAsc: \"Name A-Z\",\n sortNameDesc: \"Name Z-A\",\n sortSizeAsc: \"Smallest First\",\n sortSizeDesc: \"Largest First\",\n moveSelected: \"Move\",\n moveToRoot: \"All Files\",\n currentFolder: \"(current)\",\n confirmDelete: \"Confirm?\",\n renameFile: \"Rename\",\n editFile: \"Edit File\",\n fileName: \"Filename\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Describe this image for accessibility\",\n saveChanges: \"Save\",\n cancel: \"Cancel\",\n frequentlyUsed: \"Frequently Used\",\n deleteWarningTitle: \"Delete File\",\n deleteWarningMessage: \"Are you sure? This action is irreversible.\",\n deleteWarningUsageNote:\n \"The following files are used in templates. Deleting them may break those templates.\",\n deleteAnyway: \"Delete\",\n usedInTemplates: \"Used in {count} template(s)\",\n viewGrid: \"Grid view\",\n viewList: \"List view\",\n showFolders: \"Show folders\",\n hideFolders: \"Hide folders\",\n importFromUrl: \"Import from URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Import\",\n importing: \"Importing...\",\n importError: \"Failed to import from URL\",\n conversionLabel: \"Size\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Small (150px)\",\n conversionMedium: \"Medium (600px)\",\n conversionLarge: \"Large (1200px)\",\n replaceFile: \"Replace File\",\n replaceWarningTitle: \"Replace File\",\n replaceWarningMessage:\n \"You are about to replace this file. The replacement must have the same file extension ({extension}).\",\n replaceWarningUsageNote:\n \"This file is used in {count} template(s). Replacing it will update all references.\",\n replaceSelectFile: \"Select replacement file\",\n replace: \"Replace\",\n replacing: \"Replacing...\",\n replaceError: \"Failed to replace file\",\n saving: \"Saving...\",\n cropAspectRatio: \"Aspect Ratio\",\n cropFree: \"Free\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Max Width\",\n cropMaxHeight: \"Max Height\",\n cropOutputSize: \"Output Size\",\n cropPixels: \"px\",\n cropOptional: \"(optional)\",\n storageTooltip: \"{used} of {total} used ({remaining} remaining)\",\n },\n};\n\nexport default en;\n"],"mappings":";AAAA,IAAM,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,aAAa;CACb,iBAAiB;CACjB,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,iBAAiB;CACjB,oBAAoB;CACpB,iBAAiB;CACjB,kBAAkB;CAClB,iBAAiB;CACjB,aAAa;CACb,qBAAqB;CACrB,uBACE;CACF,yBACE;CACF,mBAAmB;CACnB,SAAS;CACT,WAAW;CACX,cAAc;CACd,QAAQ;CACR,iBAAiB;CACjB,UAAU;CACV,YAAY;CACZ,iBAAiB;CACjB,kBAAkB;CAClB,cAAc;CACd,cAAc;CACd,eAAe;CACf,gBAAgB;CAChB,YAAY;CACZ,cAAc;CACd,gBAAgB;AAClB,EACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"en-Bl1ecfRF.js","names":[],"sources":["../../../src/i18n/locales/cloud/en.ts"],"sourcesContent":["const en = {\n loading: {\n initializing: \"Initializing...\",\n },\n error: {\n title: \"Something went wrong\",\n defaultMessage:\n \"The editor could not connect to Templatical. Check your network connection and try again.\",\n authFailed: \"Authentication failed. Please check your credentials.\",\n templateNotFound:\n \"The requested template could not be found. Please verify the template ID is correct.\",\n retry: \"Try Again\",\n },\n header: {\n title: \"Templatical\",\n unsaved: \"Unsaved\",\n saving: \"Saving...\",\n saved: \"Saved\",\n saveFailed: \"Save failed\",\n save: \"Save\",\n templatesUsed: \"{used}/{max} templates used\",\n },\n snapshotPreview: {\n message: \"You are previewing a previous snapshot of this template.\",\n cancel: \"Cancel\",\n restore: \"Restore this snapshot\",\n },\n snapshotHistory: {\n tooltip: \"Version history\",\n dropdownTitle: \"Version History\",\n noSnapshots: \"No versions yet\",\n auto: \"auto\",\n justNow: \"Just now\",\n minutesAgo: \"{minutes}m ago\",\n hoursAgo: \"{hours}h ago\",\n daysAgo: \"{days}d ago\",\n olderSnapshot: \"Older version\",\n newerSnapshot: \"Newer version\",\n },\n testEmail: {\n title: \"Send Test Email\",\n recipientLabel: \"Recipient\",\n send: \"Send\",\n sending: \"Sending...\",\n cancel: \"Cancel\",\n success: \"Test email sent successfully\",\n button: \"Test\",\n },\n aiRewrite: {\n title: \"AI Rewrite\",\n tone: \"Tone\",\n length: \"Length\",\n clarity: \"Clarity\",\n professional: \"Professional\",\n casual: \"Casual\",\n friendly: \"Friendly\",\n urgent: \"Urgent\",\n persuasive: \"Persuasive\",\n shorter: \"Shorter\",\n longer: \"Longer\",\n summarize: \"Summarize\",\n simplify: \"Simplify\",\n fixGrammar: \"Fix grammar\",\n improveReadability: \"Improve readability\",\n customInstruction: \"Custom instruction\",\n customPlaceholder: \"Describe how to rewrite...\",\n rewrite: \"Rewrite\",\n rewriting: \"Rewriting...\",\n undo: \"Undo\",\n redo: \"Redo\",\n refine: \"Refine further\",\n error: \"Failed to rewrite text\",\n },\n aiChat: {\n title: \"AI Assistant\",\n button: \"AI\",\n inputPlaceholder: \"Describe your email template...\",\n send: \"Send\",\n generating: \"Generating...\",\n applied: \"Changes applied to template.\",\n applyFailed: \"Could not apply changes to template. Please try again.\",\n revert: \"Revert changes\",\n reapply: \"Re-apply changes\",\n error: \"Failed to generate template\",\n clear: \"Clear chat\",\n placeholder:\n \"Describe the email template you want to create, or ask to modify the current one.\",\n loadingHistory: \"Loading conversation...\",\n },\n scoring: {\n button: \"Score\",\n title: \"Template Score\",\n rescore: \"Re-score\",\n scoring: \"Analyzing template...\",\n overallScore: \"Overall Score\",\n categories: {\n spam: \"Spam Risk\",\n readability: \"Readability\",\n accessibility: \"Accessibility\",\n bestPractices: \"Best Practices\",\n },\n severity: {\n high: \"High\",\n medium: \"Medium\",\n low: \"Low\",\n },\n fix: \"Fix with AI\",\n fixing: \"Fixing...\",\n fixed: \"Fixed\",\n findings: \"findings\",\n noFindings: \"No issues found\",\n error: \"Failed to analyze template\",\n fixError: \"Failed to apply fix\",\n emptyState:\n \"Score your template to get actionable feedback on spam risk, readability, accessibility, and best practices.\",\n },\n aiMenu: {\n aiAssistant: \"AI Assistant\",\n aiAssistantDesc: \"Chat with AI to create or modify your template\",\n designToTemplate: \"Design to Template\",\n designToTemplateDesc: \"Generate a template from an image or PDF\",\n templateScore: \"Template Score\",\n templateScoreDesc: \"Analyze quality, spam risk, and accessibility\",\n disclaimer: \"AI can make mistakes. Please verify before approving.\",\n },\n comments: {\n title: \"Comments\",\n placeholder: \"Write a comment...\",\n replyPlaceholder: \"Write a reply...\",\n reply: \"Reply\",\n resolve: \"Resolve\",\n unresolve: \"Unresolve\",\n resolved: \"Resolved\",\n delete: \"Delete\",\n edit: \"Edit\",\n cancel: \"Cancel\",\n save: \"Save\",\n noComments: \"No comments yet\",\n noCommentsHint:\n \"Start a conversation by adding a comment to the template or a specific block.\",\n addComment: \"Add comment\",\n deleteConfirm: \"Delete this comment?\",\n filterAll: \"All\",\n filterUnresolved: \"Unresolved\",\n filterBlock: \"This block\",\n ownedByYou: \"You\",\n edited: \"edited\",\n resolvedBy: \"Resolved by {name}\",\n replyOne: \"{count} Reply\",\n replyMany: \"{count} Replies\",\n missingBlock: \"Missing block\",\n saveTemplateFirst: \"Save the template before commenting on this block.\",\n button: \"Comments\",\n },\n collaboration: {\n connected: \"Collaboration mode active\",\n disconnected: \"Collaboration disconnected\",\n reconnecting: \"Reconnecting...\",\n blockLockedBy: \"Editing by {name}\",\n usersOnline: \"{count} users online\",\n },\n modules: {\n title: \"Saved Modules\",\n saveAsModule: \"Save as Module\",\n moduleName: \"Module Name\",\n moduleNamePlaceholder: \"e.g. Header, Footer, CTA...\",\n selectBlocks: \"Select Blocks\",\n save: \"Save Module\",\n saving: \"Saving...\",\n cancel: \"Cancel\",\n noModules: \"No saved modules yet\",\n noModulesHint: \"Save blocks from your templates to reuse them later.\",\n search: \"Search modules...\",\n insert: \"Insert\",\n delete: \"Delete\",\n deleteConfirm: \"Delete this module?\",\n blockCount: \"{count} block(s)\",\n browse: \"Browse Modules\",\n selectToPreview: \"Select a module to preview\",\n insertAtBeginning: \"At beginning\",\n insertAfterBlock: \"After {block}\",\n insertAtEnd: \"At end\",\n insertPosition: \"Insert position\",\n close: \"Close\",\n },\n designReference: {\n title: \"Design Reference\",\n button: \"Design\",\n uploadImage: \"Image\",\n uploadPdf: \"PDF\",\n dropHint: \"Drop a file here or click to browse\",\n acceptedImages: \"PNG, JPG, WebP (max 10MB)\",\n acceptedPdf: \"PDF (max 10MB)\",\n promptLabel: \"Instructions (optional)\",\n promptPlaceholder:\n \"Describe any adjustments or preferences for the generated template...\",\n generate: \"Generate from design\",\n generating: \"Analyzing design and generating template...\",\n replaceWarning:\n \"Generating from a design reference will replace the existing template content.\",\n replaceConfirm: \"Replace and generate\",\n replaceCancel: \"Cancel\",\n error: \"Failed to generate template from design\",\n fileTooLarge: \"File is too large. Maximum size is 10MB.\",\n invalidFileType:\n \"This file type is not supported. Upload a PNG, JPG, WebP, or PDF.\",\n },\n\n saveGate: {\n title: \"Accessibility errors block this save\",\n body: \"Your plan blocks saves while errors remain. Fix the items below or save anyway.\",\n cancel: \"Review and fix\",\n confirm: \"Save anyway\",\n },\n};\n\nexport default en;\n"],"mappings":";AAAA,IAAM,IAAK;CACT,SAAS,EACP,cAAc,mBACf;CACD,OAAO;EACL,OAAO;EACP,gBACE;EACF,YAAY;EACZ,kBACE;EACF,OAAO;EACR;CACD,QAAQ;EACN,OAAO;EACP,SAAS;EACT,QAAQ;EACR,OAAO;EACP,YAAY;EACZ,MAAM;EACN,eAAe;EAChB;CACD,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,SAAS;EACV;CACD,iBAAiB;EACf,SAAS;EACT,eAAe;EACf,aAAa;EACb,MAAM;EACN,SAAS;EACT,YAAY;EACZ,UAAU;EACV,SAAS;EACT,eAAe;EACf,eAAe;EAChB;CACD,WAAW;EACT,OAAO;EACP,gBAAgB;EAChB,MAAM;EACN,SAAS;EACT,QAAQ;EACR,SAAS;EACT,QAAQ;EACT;CACD,WAAW;EACT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EACd,YAAY;EACZ,uBAAuB;EACvB,cAAc;EACd,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,eAAe;EACf,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;EACb,gBAAgB;EAChB,OAAO;EACR;CACD,iBAAiB;EACf,OAAO;EACP,QAAQ;EACR,aAAa;EACb,WAAW;EACX,UAAU;EACV,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,mBACE;EACF,UAAU;EACV,YAAY;EACZ,gBACE;EACF,gBAAgB;EAChB,eAAe;EACf,OAAO;EACP,cAAc;EACd,iBACE;EACH;CAED,UAAU;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACV;CACF"}
1
+ {"version":3,"file":"en-Bl1ecfRF.js","names":[],"sources":["../../../src/i18n/locales/cloud/en.ts"],"sourcesContent":["const en = {\n loading: {\n initializing: \"Initializing...\",\n },\n error: {\n title: \"Something went wrong\",\n defaultMessage:\n \"The editor could not connect to Templatical. Check your network connection and try again.\",\n authFailed: \"Authentication failed. Please check your credentials.\",\n templateNotFound:\n \"The requested template could not be found. Please verify the template ID is correct.\",\n retry: \"Try Again\",\n },\n header: {\n title: \"Templatical\",\n unsaved: \"Unsaved\",\n saving: \"Saving...\",\n saved: \"Saved\",\n saveFailed: \"Save failed\",\n save: \"Save\",\n templatesUsed: \"{used}/{max} templates used\",\n },\n snapshotPreview: {\n message: \"You are previewing a previous snapshot of this template.\",\n cancel: \"Cancel\",\n restore: \"Restore this snapshot\",\n },\n snapshotHistory: {\n tooltip: \"Version history\",\n dropdownTitle: \"Version History\",\n noSnapshots: \"No versions yet\",\n auto: \"auto\",\n justNow: \"Just now\",\n minutesAgo: \"{minutes}m ago\",\n hoursAgo: \"{hours}h ago\",\n daysAgo: \"{days}d ago\",\n olderSnapshot: \"Older version\",\n newerSnapshot: \"Newer version\",\n },\n testEmail: {\n title: \"Send Test Email\",\n recipientLabel: \"Recipient\",\n send: \"Send\",\n sending: \"Sending...\",\n cancel: \"Cancel\",\n success: \"Test email sent successfully\",\n button: \"Test\",\n },\n aiRewrite: {\n title: \"AI Rewrite\",\n tone: \"Tone\",\n length: \"Length\",\n clarity: \"Clarity\",\n professional: \"Professional\",\n casual: \"Casual\",\n friendly: \"Friendly\",\n urgent: \"Urgent\",\n persuasive: \"Persuasive\",\n shorter: \"Shorter\",\n longer: \"Longer\",\n summarize: \"Summarize\",\n simplify: \"Simplify\",\n fixGrammar: \"Fix grammar\",\n improveReadability: \"Improve readability\",\n customInstruction: \"Custom instruction\",\n customPlaceholder: \"Describe how to rewrite...\",\n rewrite: \"Rewrite\",\n rewriting: \"Rewriting...\",\n undo: \"Undo\",\n redo: \"Redo\",\n refine: \"Refine further\",\n error: \"Failed to rewrite text\",\n },\n aiChat: {\n title: \"AI Assistant\",\n button: \"AI\",\n inputPlaceholder: \"Describe your email template...\",\n send: \"Send\",\n generating: \"Generating...\",\n applied: \"Changes applied to template.\",\n applyFailed: \"Could not apply changes to template. Please try again.\",\n revert: \"Revert changes\",\n reapply: \"Re-apply changes\",\n error: \"Failed to generate template\",\n clear: \"Clear chat\",\n placeholder:\n \"Describe the email template you want to create, or ask to modify the current one.\",\n loadingHistory: \"Loading conversation...\",\n },\n scoring: {\n button: \"Score\",\n title: \"Template Score\",\n rescore: \"Re-score\",\n scoring: \"Analyzing template...\",\n overallScore: \"Overall Score\",\n categories: {\n spam: \"Spam Risk\",\n readability: \"Readability\",\n accessibility: \"Accessibility\",\n bestPractices: \"Best Practices\",\n },\n severity: {\n high: \"High\",\n medium: \"Medium\",\n low: \"Low\",\n },\n fix: \"Fix with AI\",\n fixing: \"Fixing...\",\n fixed: \"Fixed\",\n findings: \"findings\",\n noFindings: \"No issues found\",\n error: \"Failed to analyze template\",\n fixError: \"Failed to apply fix\",\n emptyState:\n \"Score your template to get actionable feedback on spam risk, readability, accessibility, and best practices.\",\n },\n aiMenu: {\n aiAssistant: \"AI Assistant\",\n aiAssistantDesc: \"Chat with AI to create or modify your template\",\n designToTemplate: \"Design to Template\",\n designToTemplateDesc: \"Generate a template from an image or PDF\",\n templateScore: \"Template Score\",\n templateScoreDesc: \"Analyze quality, spam risk, and accessibility\",\n disclaimer: \"AI can make mistakes. Please verify before approving.\",\n },\n comments: {\n title: \"Comments\",\n placeholder: \"Write a comment...\",\n replyPlaceholder: \"Write a reply...\",\n reply: \"Reply\",\n resolve: \"Resolve\",\n unresolve: \"Unresolve\",\n resolved: \"Resolved\",\n delete: \"Delete\",\n edit: \"Edit\",\n cancel: \"Cancel\",\n save: \"Save\",\n noComments: \"No comments yet\",\n noCommentsHint:\n \"Start a conversation by adding a comment to the template or a specific block.\",\n addComment: \"Add comment\",\n deleteConfirm: \"Delete this comment?\",\n filterAll: \"All\",\n filterUnresolved: \"Unresolved\",\n filterBlock: \"This block\",\n ownedByYou: \"You\",\n edited: \"edited\",\n resolvedBy: \"Resolved by {name}\",\n replyOne: \"{count} Reply\",\n replyMany: \"{count} Replies\",\n missingBlock: \"Missing block\",\n saveTemplateFirst: \"Save the template before commenting on this block.\",\n button: \"Comments\",\n },\n collaboration: {\n connected: \"Collaboration mode active\",\n disconnected: \"Collaboration disconnected\",\n reconnecting: \"Reconnecting...\",\n blockLockedBy: \"Editing by {name}\",\n usersOnline: \"{count} users online\",\n },\n modules: {\n title: \"Saved Modules\",\n saveAsModule: \"Save as Module\",\n moduleName: \"Module Name\",\n moduleNamePlaceholder: \"e.g. Header, Footer, CTA...\",\n selectBlocks: \"Select Blocks\",\n save: \"Save Module\",\n saving: \"Saving...\",\n cancel: \"Cancel\",\n noModules: \"No saved modules yet\",\n noModulesHint: \"Save blocks from your templates to reuse them later.\",\n search: \"Search modules...\",\n insert: \"Insert\",\n delete: \"Delete\",\n deleteConfirm: \"Delete this module?\",\n blockCount: \"{count} block(s)\",\n browse: \"Browse Modules\",\n selectToPreview: \"Select a module to preview\",\n insertAtBeginning: \"At beginning\",\n insertAfterBlock: \"After {block}\",\n insertAtEnd: \"At end\",\n insertPosition: \"Insert position\",\n close: \"Close\",\n },\n designReference: {\n title: \"Design Reference\",\n button: \"Design\",\n uploadImage: \"Image\",\n uploadPdf: \"PDF\",\n dropHint: \"Drop a file here or click to browse\",\n acceptedImages: \"PNG, JPG, WebP (max 10MB)\",\n acceptedPdf: \"PDF (max 10MB)\",\n promptLabel: \"Instructions (optional)\",\n promptPlaceholder:\n \"Describe any adjustments or preferences for the generated template...\",\n generate: \"Generate from design\",\n generating: \"Analyzing design and generating template...\",\n replaceWarning:\n \"Generating from a design reference will replace the existing template content.\",\n replaceConfirm: \"Replace and generate\",\n replaceCancel: \"Cancel\",\n error: \"Failed to generate template from design\",\n fileTooLarge: \"File is too large. Maximum size is 10MB.\",\n invalidFileType:\n \"This file type is not supported. Upload a PNG, JPG, WebP, or PDF.\",\n },\n\n saveGate: {\n title: \"Accessibility errors block this save\",\n body: \"Your plan blocks saves while errors remain. Fix the items below or save anyway.\",\n cancel: \"Review and fix\",\n confirm: \"Save anyway\",\n },\n};\n\nexport default en;\n"],"mappings":";AAAA,IAAM,IAAK;CACT,SAAS,EACP,cAAc,kBAChB;CACA,OAAO;EACL,OAAO;EACP,gBACE;EACF,YAAY;EACZ,kBACE;EACF,OAAO;CACT;CACA,QAAQ;EACN,OAAO;EACP,SAAS;EACT,QAAQ;EACR,OAAO;EACP,YAAY;EACZ,MAAM;EACN,eAAe;CACjB;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,SAAS;CACX;CACA,iBAAiB;EACf,SAAS;EACT,eAAe;EACf,aAAa;EACb,MAAM;EACN,SAAS;EACT,YAAY;EACZ,UAAU;EACV,SAAS;EACT,eAAe;EACf,eAAe;CACjB;CACA,WAAW;EACT,OAAO;EACP,gBAAgB;EAChB,MAAM;EACN,SAAS;EACT,QAAQ;EACR,SAAS;EACT,QAAQ;CACV;CACA,WAAW;EACT,OAAO;EACP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;EACZ,uBAAuB;EACvB,cAAc;EACd,MAAM;EACN,QAAQ;EACR,QAAQ;EACR,WAAW;EACX,eAAe;EACf,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,eAAe;EACf,YAAY;EACZ,QAAQ;EACR,iBAAiB;EACjB,mBAAmB;EACnB,kBAAkB;EAClB,aAAa;EACb,gBAAgB;EAChB,OAAO;CACT;CACA,iBAAiB;EACf,OAAO;EACP,QAAQ;EACR,aAAa;EACb,WAAW;EACX,UAAU;EACV,gBAAgB;EAChB,aAAa;EACb,aAAa;EACb,mBACE;EACF,UAAU;EACV,YAAY;EACZ,gBACE;EACF,gBAAgB;EAChB,eAAe;EACf,OAAO;EACP,cAAc;EACd,iBACE;CACJ;CAEA,UAAU;EACR,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;CACX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"en-CHha-_ta.js","names":[],"sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\n // Footer (OSS only)\n footer: {\n poweredBy: \"Powered by\",\n openSource: \"Open Source\",\n },\n\n // History (undo/redo)\n history: {\n undo: \"Undo\",\n redo: \"Redo\",\n collabWarning: \"Undo may affect collaborators' recent changes\",\n },\n\n // Viewport toggle\n viewport: {\n label: \"Viewport\",\n desktop: \"Desktop\",\n tablet: \"Tablet\",\n mobile: \"Mobile\",\n },\n\n // Dark mode preview\n darkMode: {\n enable: \"Dark Mode Preview\",\n disable: \"Light Mode Preview\",\n },\n\n // Preview mode\n previewMode: {\n enable: \"Preview Mode\",\n disable: \"Exit Preview\",\n },\n\n // Sidebar - Block types\n blocks: {\n section: \"Section\",\n image: \"Image\",\n title: \"Title\",\n paragraph: \"Paragraph\",\n button: \"Button\",\n divider: \"Divider\",\n video: \"Video\",\n social: \"Social\",\n spacer: \"Spacer\",\n html: \"HTML\",\n menu: \"Menu\",\n table: \"Table\",\n countdown: \"Countdown\",\n },\n\n // Right sidebar\n sidebar: {\n content: \"Content\",\n settings: \"Settings\",\n noSelection: \"No element selected\",\n noSelectionHint: \"Select a block on the canvas to edit it\",\n },\n\n // Toolbar - Common\n toolbar: {\n duplicate: \"Duplicate\",\n delete: \"Delete\",\n },\n\n // Title editor toolbar\n titleEditor: {\n toolbar: \"Title formatting\",\n bold: \"Bold (Ctrl+B)\",\n italic: \"Italic (Ctrl+I)\",\n addLink: \"Add Link\",\n },\n\n // Paragraph editor toolbar\n paragraphEditor: {\n toolbar: \"Text formatting\",\n bold: \"Bold (Ctrl+B)\",\n italic: \"Italic (Ctrl+I)\",\n underline: \"Underline (Ctrl+U)\",\n strikethrough: \"Strikethrough\",\n subscript: \"Subscript\",\n superscript: \"Superscript\",\n addLink: \"Add Link\",\n bulletList: \"Bullet List\",\n numberedList: \"Numbered List\",\n alignLeft: \"Align Left\",\n alignCenter: \"Align Center\",\n alignRight: \"Align Right\",\n clearFormatting: \"Clear Formatting\",\n insertEmoji: \"Insert Emoji\",\n fontFamily: \"Font Family\",\n defaultFont: \"Default\",\n fontSize: \"Font Size\",\n defaultSize: \"Default\",\n textColor: \"Text Color\",\n highlightColor: \"Highlight Color\",\n lineHeight: \"Line Height\",\n letterSpacing: \"Letter Spacing\",\n emojiItemLabel: \"Insert emoji {emoji}\",\n closeEmojiPicker: \"Close emoji picker\",\n },\n\n // Block actions (BlockWrapper)\n blockActions: {\n drag: \"Drag to reorder, or press Space to move with keyboard\",\n dragLifted:\n \"Moving {block}. Use up and down arrow keys to reposition, Space or Enter to drop, Escape to cancel.\",\n duplicate: \"Duplicate block\",\n delete: \"Delete block\",\n hiddenOnViewport: \"Hidden on {viewport}\",\n saveAsModule: \"Save as Module\",\n conditionToggle: \"Toggle display condition\",\n comments: \"Comments ({count})\",\n lifted: \"{block} lifted. Position {position} of {total}.\",\n moved: \"{block} moved to position {position} of {total}.\",\n dropped: \"{block} dropped at position {position} of {total}.\",\n cancelled: \"Move cancelled. {block} returned to position {position}.\",\n },\n\n // Toolbar - Section\n section: {\n dropHere: \"Drop blocks here\",\n columns: \"Columns\",\n column1: \"1 Column\",\n column2: \"2 Columns\",\n column3: \"3 Columns\",\n ratio12: \"1:2 Ratio\",\n ratio21: \"2:1 Ratio\",\n },\n\n // Text editor link dialog\n linkDialog: {\n editLink: \"Edit Link\",\n insertLink: \"Insert Link\",\n updateLink: \"Update Link\",\n removeLink: \"Remove Link\",\n cancel: \"Cancel\",\n urlPlaceholder: \"https://example.com\",\n urlLabel: \"URL\",\n },\n\n // Toolbar - Title\n title: {\n level: \"Heading Level\",\n heading1: \"Heading 1 (36px)\",\n heading2: \"Heading 2 (28px)\",\n heading3: \"Heading 3 (22px)\",\n heading4: \"Heading 4 (18px)\",\n fontFamily: \"Font Family\",\n inheritFont: \"Use template font\",\n color: \"Color\",\n align: \"Align\",\n alignLeft: \"Left\",\n alignCenter: \"Center\",\n alignRight: \"Right\",\n },\n\n // Emoji picker\n emoji: {\n smileys: \"Smileys\",\n gestures: \"Gestures\",\n objects: \"Objects\",\n },\n\n // Toolbar - Image\n image: {\n imageUrl: \"Image URL\",\n imageUrlPlaceholder: \"https://...\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Image description\",\n width: \"Width\",\n fullWidth: \"Full Width\",\n linkUrl: \"Link URL\",\n openInNewTab: \"Open in new tab\",\n placeholderUrl: \"Placeholder Image\",\n placeholderUrlPlaceholder: \"https://... (design-time only)\",\n placeholderUrlTooltip:\n \"Since the image URL uses a merge tag, you can provide a real image here to preview the layout while designing. This is not included in the final output.\",\n clickToAdd: \"Click to add image URL\",\n browseMedia: \"Browse Media\",\n decorative: \"Decorative image\",\n decorativeHint:\n \"Hidden from screen readers. Use only for spacers and visual flourishes.\",\n },\n\n // Toolbar - Video\n video: {\n videoUrl: \"Video URL\",\n videoUrlPlaceholder: \"https://youtube.com/...\",\n youtube: \"YouTube\",\n vimeo: \"Vimeo\",\n detected: \"Video detected — thumbnail will be generated automatically\",\n openInNewTab: \"Open in new tab\",\n customThumbnail: \"Custom Thumbnail\",\n optional: \"(optional)\",\n thumbnailPlaceholder: \"Auto-generated from video URL\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Video description\",\n width: \"Width\",\n fullWidth: \"Full Width\",\n placeholderUrl: \"Placeholder Thumbnail\",\n placeholderUrlPlaceholder: \"https://... (design-time only)\",\n placeholderUrlTooltip:\n \"Since the video URL uses a merge tag, you can provide a real thumbnail here to preview the layout while designing. This is not included in the final output.\",\n addVideo: \"Add a video URL\",\n },\n\n // Toolbar - Button\n button: {\n fontFamily: \"Font Family\",\n inheritFont: \"Use template font\",\n text: \"Text\",\n url: \"URL\",\n urlPlaceholder: \"https://...\",\n openInNewTab: \"Open in new tab\",\n background: \"Background\",\n textColor: \"Text Color\",\n borderRadius: \"Border Radius\",\n fontSize: \"Font Size\",\n },\n\n // Toolbar - Divider\n divider: {\n style: \"Style\",\n solid: \"Solid\",\n dashed: \"Dashed\",\n dotted: \"Dotted\",\n color: \"Color\",\n thickness: \"Thickness\",\n },\n\n // Toolbar - Social Icons\n social: {\n icons: \"Icons\",\n addIcon: \"Add Icon\",\n addIcons: \"Add social icons\",\n removeIcon: \"Remove\",\n platform: \"Platform\",\n url: \"URL\",\n urlPlaceholder: \"https://...\",\n style: \"Style\",\n styleSolid: \"Solid\",\n styleOutlined: \"Outlined\",\n styleRounded: \"Rounded\",\n styleSquare: \"Square\",\n styleCircle: \"Circle\",\n size: \"Size\",\n sizeSmall: \"S\",\n sizeMedium: \"M\",\n sizeLarge: \"L\",\n spacing: \"Spacing\",\n align: \"Alignment\",\n platforms: {\n facebook: \"Facebook\",\n twitter: \"X (Twitter)\",\n instagram: \"Instagram\",\n linkedin: \"LinkedIn\",\n youtube: \"YouTube\",\n tiktok: \"TikTok\",\n pinterest: \"Pinterest\",\n email: \"Email\",\n whatsapp: \"WhatsApp\",\n telegram: \"Telegram\",\n discord: \"Discord\",\n snapchat: \"Snapchat\",\n reddit: \"Reddit\",\n github: \"GitHub\",\n dribbble: \"Dribbble\",\n behance: \"Behance\",\n },\n },\n\n // Toolbar - Menu\n menu: {\n items: \"Menu Items\",\n addItem: \"Add Item\",\n removeItem: \"Remove\",\n text: \"Text\",\n url: \"URL\",\n urlPlaceholder: \"https://example.com\",\n openInNewTab: \"Open in new tab\",\n bold: \"Bold\",\n underline: \"Underline\",\n color: \"Color\",\n linkColor: \"Link Color\",\n fontSize: \"Font Size\",\n fontFamily: \"Font Family\",\n separator: \"Separator\",\n separatorColor: \"Separator Color\",\n spacing: \"Spacing\",\n textAlign: \"Alignment\",\n addLinks: \"Add menu links\",\n },\n\n // Toolbar - Table\n table: {\n dimensions: \"Dimensions\",\n rows: \"Rows\",\n columns: \"Columns\",\n addRow: \"Add Row\",\n removeRow: \"Remove Row\",\n addColumn: \"Add Column\",\n removeColumn: \"Remove Column\",\n hasHeaderRow: \"Header row\",\n headerBackgroundColor: \"Header Background\",\n noHeaderBg: \"No background\",\n borderColor: \"Border Color\",\n borderWidth: \"Border Width\",\n cellPadding: \"Cell Padding\",\n fontFamily: \"Font Family\",\n fontSize: \"Font Size\",\n color: \"Text Color\",\n textAlign: \"Alignment\",\n cellPlaceholder: \"Enter text...\",\n empty: \"Add a table\",\n },\n\n // Toolbar - Spacer\n spacer: {\n height: \"Height\",\n },\n\n // Toolbar - Countdown\n countdown: {\n targetDate: \"Target Date\",\n timezone: \"Timezone\",\n display: \"Display\",\n days: \"Days\",\n hours: \"Hours\",\n minutes: \"Minutes\",\n seconds: \"Seconds\",\n separator: \"Separator\",\n fontFamily: \"Font Family\",\n inheritFont: \"Default\",\n digitFontSize: \"Digit Size\",\n digitColor: \"Digit Color\",\n labelColor: \"Label Color\",\n labelFontSize: \"Label Size\",\n background: \"Background\",\n labels: \"Labels\",\n expiry: \"Expired Message\",\n expiredMessagePlaceholder: \"This offer has expired\",\n expiredImageUrl: \"Expired Image URL\",\n hideOnExpiry: \"Hide when expired\",\n setDate: \"Set a target date in the settings panel\",\n hidden: \"Hidden (expired)\",\n },\n\n // Custom Blocks\n customBlocks: {\n definitionNotFound: \"Unknown block type — this block is not registered\",\n renderError:\n \"This block could not be rendered. Check the block template for errors.\",\n fields: {\n required: \"Required\",\n addItem: \"Add item\",\n removeItem: \"Remove\",\n maxItemsReached: \"Maximum items reached\",\n minItemsRequired: \"Minimum {count} items required\",\n },\n toolbar: {\n noDefinition:\n \"Register this block type in your SDK configuration to edit its properties\",\n },\n dataSource: {\n fetchButton: \"Load content\",\n changeButton: \"Change\",\n fetching: \"Loading...\",\n readOnlyTooltip: \"This value is loaded from your data source\",\n fetchError: \"Failed to load content\",\n },\n },\n\n // Toolbar - HTML\n html: {\n content: \"HTML Content\",\n preview: \"Custom HTML block\",\n empty: \"Add HTML content in the panel\",\n sanitizationHint: \"Scripts and unsafe elements are removed on export.\",\n },\n\n // Toolbar - Common block settings\n blockSettings: {\n spacing: \"Spacing\",\n padding: \"Padding\",\n margin: \"Margin\",\n background: \"Background\",\n color: \"Color\",\n display: \"Display\",\n showOnDesktop: \"Show on desktop\",\n showOnTablet: \"Show on tablet\",\n showOnMobile: \"Show on mobile\",\n hiddenOnDevice: \"Hidden on {device}\",\n customCss: \"Custom CSS\",\n css: \"CSS\",\n cssPlaceholder: \"/* Custom styles */\",\n displayCondition: \"Display Condition\",\n selectCondition: \"Select condition\",\n removeCondition: \"Remove condition\",\n noCondition: \"Always visible\",\n conditionApplied: \"Condition applied\",\n customCondition: \"Custom condition\",\n customConditionLabel: \"Condition name\",\n customConditionBefore: \"Before (opening logic)\",\n customConditionAfter: \"After (closing logic)\",\n applyCondition: \"Apply\",\n cancelCondition: \"Cancel\",\n customBadge: \"Custom\",\n restoreHiddenBlocks: \"Show all hidden blocks\",\n },\n\n // Template settings\n templateSettings: {\n layout: \"Layout\",\n widthPreset: \"Width Preset\",\n customWidth: \"Custom Width\",\n appearance: \"Appearance\",\n backgroundColor: \"Background Color\",\n fontFamily: \"Font Family\",\n preheaderText: \"Preheader Text\",\n preheaderTextPlaceholder:\n \"Preview text shown after subject line in inbox...\",\n preheaderTextHint:\n \"This text appears after the subject line in email client previews. Supports merge tags.\",\n language: \"Language\",\n contentLocale: \"Content language\",\n contentLocaleHint:\n \"BCP 47 code (e.g. en, de, pt-BR). Sets the rendered email's lang attribute so screen readers pronounce content correctly.\",\n tips: \"Tips\",\n tip1: \"600px is the standard width for email templates\",\n tip2: \"Use web-safe fonts for best compatibility\",\n tip3: \"Light backgrounds work best for readability\",\n },\n\n // Spacing control\n spacingControl: {\n lockAll: \"Lock all sides\",\n unlock: \"Unlock sides\",\n top: \"Top\",\n right: \"Right\",\n bottom: \"Bottom\",\n left: \"Left\",\n decreaseTop: \"Decrease top\",\n increaseTop: \"Increase top\",\n decreaseLeft: \"Decrease left\",\n increaseLeft: \"Increase left\",\n decreaseRight: \"Decrease right\",\n increaseRight: \"Increase right\",\n decreaseBottom: \"Decrease bottom\",\n increaseBottom: \"Increase bottom\",\n },\n\n // Color Picker\n colorPicker: {\n pickColor: \"Pick a color\",\n hexValue: \"Hex color value\",\n },\n\n // Merge Tag\n mergeTag: {\n clickToEdit: \"Click to edit\",\n remove: \"Remove merge tag\",\n insert: \"Insert merge tag\",\n add: \"Add merge tag\",\n editValue: \"Edit merge tag value\",\n deleteMergeTag: \"Delete merge tag\",\n suggestionEmpty: \"No matching merge tags\",\n },\n\n // Canvas\n canvas: {\n noBlocks: \"No blocks yet\",\n dragHint: \"Start from scratch by dragging blocks from the sidebar\",\n dropHere: \"Drop here\",\n aiHintChat: \"or let\",\n aiHintChatSuffix: \"generate a complete template for you in seconds\",\n aiHintDesign:\n \"Have an existing design? Upload a screenshot, image, or PDF and\",\n aiHintDesignSuffix: \"will instantly recreate it\",\n },\n\n // Media Library (cloud)\n mediaLibrary: {\n title: \"Media Library\",\n searchPlaceholder: \"Search files...\",\n allFiles: \"All Files\",\n filterAll: \"All Types\",\n filterImages: \"Images\",\n filterDocuments: \"Documents\",\n filterVideos: \"Videos\",\n filterAudio: \"Audio\",\n newFolder: \"New Folder\",\n folderName: \"Folder name\",\n noFiles: \"No files found\",\n dropOrClick: \"Drop files here or click to upload\",\n acceptedFormats: \"Images, PDF, Video, Audio, Documents (max 10MB)\",\n uploading: \"Uploading...\",\n uploadingProgress: \"Uploading {current} of {total}...\",\n selectImage: \"Select Image\",\n selectFile: \"Select File\",\n deleteSelected: \"Delete\",\n copyUrl: \"Copy URL\",\n copied: \"Copied!\",\n browseMedia: \"Browse Media Library\",\n renameFolder: \"Rename folder\",\n addSubfolder: \"Add subfolder\",\n subfolderName: \"Subfolder name\",\n sortNewest: \"Newest First\",\n sortOldest: \"Oldest First\",\n sortNameAsc: \"Name A-Z\",\n sortNameDesc: \"Name Z-A\",\n sortSizeAsc: \"Smallest First\",\n sortSizeDesc: \"Largest First\",\n moveSelected: \"Move\",\n moveToRoot: \"All Files\",\n currentFolder: \"(current)\",\n confirmDelete: \"Delete this file?\",\n renameFile: \"Rename\",\n editFile: \"Edit File\",\n fileName: \"Filename\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Describe this image for accessibility\",\n saveChanges: \"Save\",\n cancel: \"Cancel\",\n frequentlyUsed: \"Frequently Used\",\n deleteWarningTitle: \"Delete File\",\n deleteWarningMessage:\n \"This file will be permanently deleted and cannot be recovered.\",\n deleteWarningUsageNote:\n \"The following files are used in templates. Deleting them may break those templates.\",\n deleteAnyway: \"Delete file\",\n usedInTemplates: \"Used in {count} template(s)\",\n viewGrid: \"Grid view\",\n viewList: \"List view\",\n showFolders: \"Show folders\",\n hideFolders: \"Hide folders\",\n importFromUrl: \"Import from URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Import\",\n importing: \"Importing...\",\n importError: \"Failed to import from URL\",\n conversionLabel: \"Size\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Small (150px)\",\n conversionMedium: \"Medium (600px)\",\n conversionLarge: \"Large (1200px)\",\n replaceFile: \"Replace File\",\n replaceWarningTitle: \"Replace File\",\n replaceWarningMessage:\n \"You are about to replace this file. The replacement must have the same file extension ({extension}).\",\n replaceWarningUsageNote:\n \"This file is used in {count} template(s). Replacing it will update all references.\",\n replaceSelectFile: \"Select replacement file\",\n replace: \"Replace\",\n replacing: \"Replacing...\",\n replaceError: \"Failed to replace file\",\n saving: \"Saving...\",\n cropAspectRatio: \"Aspect Ratio\",\n cropFree: \"Free\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Max Width\",\n cropMaxHeight: \"Max Height\",\n cropOutputSize: \"Output Size\",\n cropPixels: \"px\",\n cropOptional: \"(optional)\",\n storageTooltip: \"{used} of {total} used ({remaining} remaining)\",\n },\n\n // Sidebar\n sidebarNav: {\n browseModules: \"Browse saved modules\",\n expandSidebar: \"Expand block sidebar\",\n palette: \"Block palette\",\n insertBlock: \"Insert {block} block\",\n },\n\n // Landmark region labels for assistive technology\n landmarks: {\n canvas: \"Email canvas\",\n blockToolbar: \"Block properties\",\n rightSidebar: \"Block properties and template settings\",\n reorderAnnouncements: \"Block reorder announcements\",\n },\n\n // Design Reference (cloud)\n errors: {\n editorLoading: \"Loading editor...\",\n editorLoadFailed: \"Failed to load editor.\",\n retry: \"Retry\",\n },\n\n issues: {\n panelTitle: \"Issues\",\n panelTabLabel: \"Issues\",\n groupErrors: \"Errors\",\n groupWarnings: \"Warnings\",\n groupInfo: \"Info\",\n jump: \"Jump to block\",\n fix: \"Fix\",\n emptyState: \"No issues — looking good.\",\n badgeError: \"Has errors\",\n badgeWarning: \"Has warnings\",\n issueCountTooltip: \"{count} issue(s)\",\n },\n};\n"],"mappings":";AAAA,IAAA,IAAe;CAEb,QAAQ;EACN,WAAW;EACX,YAAY;EACb;CAGD,SAAS;EACP,MAAM;EACN,MAAM;EACN,eAAe;EAChB;CAGD,UAAU;EACR,OAAO;EACP,SAAS;EACT,QAAQ;EACR,QAAQ;EACT;CAGD,UAAU;EACR,QAAQ;EACR,SAAS;EACV;CAGD,aAAa;EACX,QAAQ;EACR,SAAS;EACV;CAGD,QAAQ;EACN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B;EACjB,oBAAoB;EACpB,iBAAiB;EACjB,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;EACb,qBAAqB;EACrB,uBACE;EACF,yBACE;EACF,mBAAmB;EACnB,SAAS;EACT,WAAW;EACX,cAAc;EACd,QAAQ;EACR,iBAAiB;EACjB,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;EAClB,cAAc;EACd,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,cAAc;EACd,gBAAgB;EACjB;CAGD,YAAY;EACV,eAAe;EACf,eAAe;EACf,SAAS;EACT,aAAa;EACd;CAGD,WAAW;EACT,QAAQ;EACR,cAAc;EACd,cAAc;EACd,sBAAsB;EACvB;CAGD,QAAQ;EACN,eAAe;EACf,kBAAkB;EAClB,OAAO;EACR;CAED,QAAQ;EACN,YAAY;EACZ,eAAe;EACf,aAAa;EACb,eAAe;EACf,WAAW;EACX,MAAM;EACN,KAAK;EACL,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,mBAAmB;EACpB;CACF"}
1
+ {"version":3,"file":"en-CHha-_ta.js","names":[],"sources":["../../../src/i18n/locales/en.ts"],"sourcesContent":["export default {\n // Footer (OSS only)\n footer: {\n poweredBy: \"Powered by\",\n openSource: \"Open Source\",\n },\n\n // History (undo/redo)\n history: {\n undo: \"Undo\",\n redo: \"Redo\",\n collabWarning: \"Undo may affect collaborators' recent changes\",\n },\n\n // Viewport toggle\n viewport: {\n label: \"Viewport\",\n desktop: \"Desktop\",\n tablet: \"Tablet\",\n mobile: \"Mobile\",\n },\n\n // Dark mode preview\n darkMode: {\n enable: \"Dark Mode Preview\",\n disable: \"Light Mode Preview\",\n },\n\n // Preview mode\n previewMode: {\n enable: \"Preview Mode\",\n disable: \"Exit Preview\",\n },\n\n // Sidebar - Block types\n blocks: {\n section: \"Section\",\n image: \"Image\",\n title: \"Title\",\n paragraph: \"Paragraph\",\n button: \"Button\",\n divider: \"Divider\",\n video: \"Video\",\n social: \"Social\",\n spacer: \"Spacer\",\n html: \"HTML\",\n menu: \"Menu\",\n table: \"Table\",\n countdown: \"Countdown\",\n },\n\n // Right sidebar\n sidebar: {\n content: \"Content\",\n settings: \"Settings\",\n noSelection: \"No element selected\",\n noSelectionHint: \"Select a block on the canvas to edit it\",\n },\n\n // Toolbar - Common\n toolbar: {\n duplicate: \"Duplicate\",\n delete: \"Delete\",\n },\n\n // Title editor toolbar\n titleEditor: {\n toolbar: \"Title formatting\",\n bold: \"Bold (Ctrl+B)\",\n italic: \"Italic (Ctrl+I)\",\n addLink: \"Add Link\",\n },\n\n // Paragraph editor toolbar\n paragraphEditor: {\n toolbar: \"Text formatting\",\n bold: \"Bold (Ctrl+B)\",\n italic: \"Italic (Ctrl+I)\",\n underline: \"Underline (Ctrl+U)\",\n strikethrough: \"Strikethrough\",\n subscript: \"Subscript\",\n superscript: \"Superscript\",\n addLink: \"Add Link\",\n bulletList: \"Bullet List\",\n numberedList: \"Numbered List\",\n alignLeft: \"Align Left\",\n alignCenter: \"Align Center\",\n alignRight: \"Align Right\",\n clearFormatting: \"Clear Formatting\",\n insertEmoji: \"Insert Emoji\",\n fontFamily: \"Font Family\",\n defaultFont: \"Default\",\n fontSize: \"Font Size\",\n defaultSize: \"Default\",\n textColor: \"Text Color\",\n highlightColor: \"Highlight Color\",\n lineHeight: \"Line Height\",\n letterSpacing: \"Letter Spacing\",\n emojiItemLabel: \"Insert emoji {emoji}\",\n closeEmojiPicker: \"Close emoji picker\",\n },\n\n // Block actions (BlockWrapper)\n blockActions: {\n drag: \"Drag to reorder, or press Space to move with keyboard\",\n dragLifted:\n \"Moving {block}. Use up and down arrow keys to reposition, Space or Enter to drop, Escape to cancel.\",\n duplicate: \"Duplicate block\",\n delete: \"Delete block\",\n hiddenOnViewport: \"Hidden on {viewport}\",\n saveAsModule: \"Save as Module\",\n conditionToggle: \"Toggle display condition\",\n comments: \"Comments ({count})\",\n lifted: \"{block} lifted. Position {position} of {total}.\",\n moved: \"{block} moved to position {position} of {total}.\",\n dropped: \"{block} dropped at position {position} of {total}.\",\n cancelled: \"Move cancelled. {block} returned to position {position}.\",\n },\n\n // Toolbar - Section\n section: {\n dropHere: \"Drop blocks here\",\n columns: \"Columns\",\n column1: \"1 Column\",\n column2: \"2 Columns\",\n column3: \"3 Columns\",\n ratio12: \"1:2 Ratio\",\n ratio21: \"2:1 Ratio\",\n },\n\n // Text editor link dialog\n linkDialog: {\n editLink: \"Edit Link\",\n insertLink: \"Insert Link\",\n updateLink: \"Update Link\",\n removeLink: \"Remove Link\",\n cancel: \"Cancel\",\n urlPlaceholder: \"https://example.com\",\n urlLabel: \"URL\",\n },\n\n // Toolbar - Title\n title: {\n level: \"Heading Level\",\n heading1: \"Heading 1 (36px)\",\n heading2: \"Heading 2 (28px)\",\n heading3: \"Heading 3 (22px)\",\n heading4: \"Heading 4 (18px)\",\n fontFamily: \"Font Family\",\n inheritFont: \"Use template font\",\n color: \"Color\",\n align: \"Align\",\n alignLeft: \"Left\",\n alignCenter: \"Center\",\n alignRight: \"Right\",\n },\n\n // Emoji picker\n emoji: {\n smileys: \"Smileys\",\n gestures: \"Gestures\",\n objects: \"Objects\",\n },\n\n // Toolbar - Image\n image: {\n imageUrl: \"Image URL\",\n imageUrlPlaceholder: \"https://...\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Image description\",\n width: \"Width\",\n fullWidth: \"Full Width\",\n linkUrl: \"Link URL\",\n openInNewTab: \"Open in new tab\",\n placeholderUrl: \"Placeholder Image\",\n placeholderUrlPlaceholder: \"https://... (design-time only)\",\n placeholderUrlTooltip:\n \"Since the image URL uses a merge tag, you can provide a real image here to preview the layout while designing. This is not included in the final output.\",\n clickToAdd: \"Click to add image URL\",\n browseMedia: \"Browse Media\",\n decorative: \"Decorative image\",\n decorativeHint:\n \"Hidden from screen readers. Use only for spacers and visual flourishes.\",\n },\n\n // Toolbar - Video\n video: {\n videoUrl: \"Video URL\",\n videoUrlPlaceholder: \"https://youtube.com/...\",\n youtube: \"YouTube\",\n vimeo: \"Vimeo\",\n detected: \"Video detected — thumbnail will be generated automatically\",\n openInNewTab: \"Open in new tab\",\n customThumbnail: \"Custom Thumbnail\",\n optional: \"(optional)\",\n thumbnailPlaceholder: \"Auto-generated from video URL\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Video description\",\n width: \"Width\",\n fullWidth: \"Full Width\",\n placeholderUrl: \"Placeholder Thumbnail\",\n placeholderUrlPlaceholder: \"https://... (design-time only)\",\n placeholderUrlTooltip:\n \"Since the video URL uses a merge tag, you can provide a real thumbnail here to preview the layout while designing. This is not included in the final output.\",\n addVideo: \"Add a video URL\",\n },\n\n // Toolbar - Button\n button: {\n fontFamily: \"Font Family\",\n inheritFont: \"Use template font\",\n text: \"Text\",\n url: \"URL\",\n urlPlaceholder: \"https://...\",\n openInNewTab: \"Open in new tab\",\n background: \"Background\",\n textColor: \"Text Color\",\n borderRadius: \"Border Radius\",\n fontSize: \"Font Size\",\n },\n\n // Toolbar - Divider\n divider: {\n style: \"Style\",\n solid: \"Solid\",\n dashed: \"Dashed\",\n dotted: \"Dotted\",\n color: \"Color\",\n thickness: \"Thickness\",\n },\n\n // Toolbar - Social Icons\n social: {\n icons: \"Icons\",\n addIcon: \"Add Icon\",\n addIcons: \"Add social icons\",\n removeIcon: \"Remove\",\n platform: \"Platform\",\n url: \"URL\",\n urlPlaceholder: \"https://...\",\n style: \"Style\",\n styleSolid: \"Solid\",\n styleOutlined: \"Outlined\",\n styleRounded: \"Rounded\",\n styleSquare: \"Square\",\n styleCircle: \"Circle\",\n size: \"Size\",\n sizeSmall: \"S\",\n sizeMedium: \"M\",\n sizeLarge: \"L\",\n spacing: \"Spacing\",\n align: \"Alignment\",\n platforms: {\n facebook: \"Facebook\",\n twitter: \"X (Twitter)\",\n instagram: \"Instagram\",\n linkedin: \"LinkedIn\",\n youtube: \"YouTube\",\n tiktok: \"TikTok\",\n pinterest: \"Pinterest\",\n email: \"Email\",\n whatsapp: \"WhatsApp\",\n telegram: \"Telegram\",\n discord: \"Discord\",\n snapchat: \"Snapchat\",\n reddit: \"Reddit\",\n github: \"GitHub\",\n dribbble: \"Dribbble\",\n behance: \"Behance\",\n },\n },\n\n // Toolbar - Menu\n menu: {\n items: \"Menu Items\",\n addItem: \"Add Item\",\n removeItem: \"Remove\",\n text: \"Text\",\n url: \"URL\",\n urlPlaceholder: \"https://example.com\",\n openInNewTab: \"Open in new tab\",\n bold: \"Bold\",\n underline: \"Underline\",\n color: \"Color\",\n linkColor: \"Link Color\",\n fontSize: \"Font Size\",\n fontFamily: \"Font Family\",\n separator: \"Separator\",\n separatorColor: \"Separator Color\",\n spacing: \"Spacing\",\n textAlign: \"Alignment\",\n addLinks: \"Add menu links\",\n },\n\n // Toolbar - Table\n table: {\n dimensions: \"Dimensions\",\n rows: \"Rows\",\n columns: \"Columns\",\n addRow: \"Add Row\",\n removeRow: \"Remove Row\",\n addColumn: \"Add Column\",\n removeColumn: \"Remove Column\",\n hasHeaderRow: \"Header row\",\n headerBackgroundColor: \"Header Background\",\n noHeaderBg: \"No background\",\n borderColor: \"Border Color\",\n borderWidth: \"Border Width\",\n cellPadding: \"Cell Padding\",\n fontFamily: \"Font Family\",\n fontSize: \"Font Size\",\n color: \"Text Color\",\n textAlign: \"Alignment\",\n cellPlaceholder: \"Enter text...\",\n empty: \"Add a table\",\n },\n\n // Toolbar - Spacer\n spacer: {\n height: \"Height\",\n },\n\n // Toolbar - Countdown\n countdown: {\n targetDate: \"Target Date\",\n timezone: \"Timezone\",\n display: \"Display\",\n days: \"Days\",\n hours: \"Hours\",\n minutes: \"Minutes\",\n seconds: \"Seconds\",\n separator: \"Separator\",\n fontFamily: \"Font Family\",\n inheritFont: \"Default\",\n digitFontSize: \"Digit Size\",\n digitColor: \"Digit Color\",\n labelColor: \"Label Color\",\n labelFontSize: \"Label Size\",\n background: \"Background\",\n labels: \"Labels\",\n expiry: \"Expired Message\",\n expiredMessagePlaceholder: \"This offer has expired\",\n expiredImageUrl: \"Expired Image URL\",\n hideOnExpiry: \"Hide when expired\",\n setDate: \"Set a target date in the settings panel\",\n hidden: \"Hidden (expired)\",\n },\n\n // Custom Blocks\n customBlocks: {\n definitionNotFound: \"Unknown block type — this block is not registered\",\n renderError:\n \"This block could not be rendered. Check the block template for errors.\",\n fields: {\n required: \"Required\",\n addItem: \"Add item\",\n removeItem: \"Remove\",\n maxItemsReached: \"Maximum items reached\",\n minItemsRequired: \"Minimum {count} items required\",\n },\n toolbar: {\n noDefinition:\n \"Register this block type in your SDK configuration to edit its properties\",\n },\n dataSource: {\n fetchButton: \"Load content\",\n changeButton: \"Change\",\n fetching: \"Loading...\",\n readOnlyTooltip: \"This value is loaded from your data source\",\n fetchError: \"Failed to load content\",\n },\n },\n\n // Toolbar - HTML\n html: {\n content: \"HTML Content\",\n preview: \"Custom HTML block\",\n empty: \"Add HTML content in the panel\",\n sanitizationHint: \"Scripts and unsafe elements are removed on export.\",\n },\n\n // Toolbar - Common block settings\n blockSettings: {\n spacing: \"Spacing\",\n padding: \"Padding\",\n margin: \"Margin\",\n background: \"Background\",\n color: \"Color\",\n display: \"Display\",\n showOnDesktop: \"Show on desktop\",\n showOnTablet: \"Show on tablet\",\n showOnMobile: \"Show on mobile\",\n hiddenOnDevice: \"Hidden on {device}\",\n customCss: \"Custom CSS\",\n css: \"CSS\",\n cssPlaceholder: \"/* Custom styles */\",\n displayCondition: \"Display Condition\",\n selectCondition: \"Select condition\",\n removeCondition: \"Remove condition\",\n noCondition: \"Always visible\",\n conditionApplied: \"Condition applied\",\n customCondition: \"Custom condition\",\n customConditionLabel: \"Condition name\",\n customConditionBefore: \"Before (opening logic)\",\n customConditionAfter: \"After (closing logic)\",\n applyCondition: \"Apply\",\n cancelCondition: \"Cancel\",\n customBadge: \"Custom\",\n restoreHiddenBlocks: \"Show all hidden blocks\",\n },\n\n // Template settings\n templateSettings: {\n layout: \"Layout\",\n widthPreset: \"Width Preset\",\n customWidth: \"Custom Width\",\n appearance: \"Appearance\",\n backgroundColor: \"Background Color\",\n fontFamily: \"Font Family\",\n preheaderText: \"Preheader Text\",\n preheaderTextPlaceholder:\n \"Preview text shown after subject line in inbox...\",\n preheaderTextHint:\n \"This text appears after the subject line in email client previews. Supports merge tags.\",\n language: \"Language\",\n contentLocale: \"Content language\",\n contentLocaleHint:\n \"BCP 47 code (e.g. en, de, pt-BR). Sets the rendered email's lang attribute so screen readers pronounce content correctly.\",\n tips: \"Tips\",\n tip1: \"600px is the standard width for email templates\",\n tip2: \"Use web-safe fonts for best compatibility\",\n tip3: \"Light backgrounds work best for readability\",\n },\n\n // Spacing control\n spacingControl: {\n lockAll: \"Lock all sides\",\n unlock: \"Unlock sides\",\n top: \"Top\",\n right: \"Right\",\n bottom: \"Bottom\",\n left: \"Left\",\n decreaseTop: \"Decrease top\",\n increaseTop: \"Increase top\",\n decreaseLeft: \"Decrease left\",\n increaseLeft: \"Increase left\",\n decreaseRight: \"Decrease right\",\n increaseRight: \"Increase right\",\n decreaseBottom: \"Decrease bottom\",\n increaseBottom: \"Increase bottom\",\n },\n\n // Color Picker\n colorPicker: {\n pickColor: \"Pick a color\",\n hexValue: \"Hex color value\",\n },\n\n // Merge Tag\n mergeTag: {\n clickToEdit: \"Click to edit\",\n remove: \"Remove merge tag\",\n insert: \"Insert merge tag\",\n add: \"Add merge tag\",\n editValue: \"Edit merge tag value\",\n deleteMergeTag: \"Delete merge tag\",\n suggestionEmpty: \"No matching merge tags\",\n },\n\n // Canvas\n canvas: {\n noBlocks: \"No blocks yet\",\n dragHint: \"Start from scratch by dragging blocks from the sidebar\",\n dropHere: \"Drop here\",\n aiHintChat: \"or let\",\n aiHintChatSuffix: \"generate a complete template for you in seconds\",\n aiHintDesign:\n \"Have an existing design? Upload a screenshot, image, or PDF and\",\n aiHintDesignSuffix: \"will instantly recreate it\",\n },\n\n // Media Library (cloud)\n mediaLibrary: {\n title: \"Media Library\",\n searchPlaceholder: \"Search files...\",\n allFiles: \"All Files\",\n filterAll: \"All Types\",\n filterImages: \"Images\",\n filterDocuments: \"Documents\",\n filterVideos: \"Videos\",\n filterAudio: \"Audio\",\n newFolder: \"New Folder\",\n folderName: \"Folder name\",\n noFiles: \"No files found\",\n dropOrClick: \"Drop files here or click to upload\",\n acceptedFormats: \"Images, PDF, Video, Audio, Documents (max 10MB)\",\n uploading: \"Uploading...\",\n uploadingProgress: \"Uploading {current} of {total}...\",\n selectImage: \"Select Image\",\n selectFile: \"Select File\",\n deleteSelected: \"Delete\",\n copyUrl: \"Copy URL\",\n copied: \"Copied!\",\n browseMedia: \"Browse Media Library\",\n renameFolder: \"Rename folder\",\n addSubfolder: \"Add subfolder\",\n subfolderName: \"Subfolder name\",\n sortNewest: \"Newest First\",\n sortOldest: \"Oldest First\",\n sortNameAsc: \"Name A-Z\",\n sortNameDesc: \"Name Z-A\",\n sortSizeAsc: \"Smallest First\",\n sortSizeDesc: \"Largest First\",\n moveSelected: \"Move\",\n moveToRoot: \"All Files\",\n currentFolder: \"(current)\",\n confirmDelete: \"Delete this file?\",\n renameFile: \"Rename\",\n editFile: \"Edit File\",\n fileName: \"Filename\",\n altText: \"Alt Text\",\n altTextPlaceholder: \"Describe this image for accessibility\",\n saveChanges: \"Save\",\n cancel: \"Cancel\",\n frequentlyUsed: \"Frequently Used\",\n deleteWarningTitle: \"Delete File\",\n deleteWarningMessage:\n \"This file will be permanently deleted and cannot be recovered.\",\n deleteWarningUsageNote:\n \"The following files are used in templates. Deleting them may break those templates.\",\n deleteAnyway: \"Delete file\",\n usedInTemplates: \"Used in {count} template(s)\",\n viewGrid: \"Grid view\",\n viewList: \"List view\",\n showFolders: \"Show folders\",\n hideFolders: \"Hide folders\",\n importFromUrl: \"Import from URL\",\n importUrlPlaceholder: \"https://example.com/image.jpg\",\n import: \"Import\",\n importing: \"Importing...\",\n importError: \"Failed to import from URL\",\n conversionLabel: \"Size\",\n conversionOriginal: \"Original\",\n conversionSmall: \"Small (150px)\",\n conversionMedium: \"Medium (600px)\",\n conversionLarge: \"Large (1200px)\",\n replaceFile: \"Replace File\",\n replaceWarningTitle: \"Replace File\",\n replaceWarningMessage:\n \"You are about to replace this file. The replacement must have the same file extension ({extension}).\",\n replaceWarningUsageNote:\n \"This file is used in {count} template(s). Replacing it will update all references.\",\n replaceSelectFile: \"Select replacement file\",\n replace: \"Replace\",\n replacing: \"Replacing...\",\n replaceError: \"Failed to replace file\",\n saving: \"Saving...\",\n cropAspectRatio: \"Aspect Ratio\",\n cropFree: \"Free\",\n cropSquare: \"1:1\",\n cropLandscape43: \"4:3\",\n cropLandscape169: \"16:9\",\n cropOriginal: \"Original\",\n cropMaxWidth: \"Max Width\",\n cropMaxHeight: \"Max Height\",\n cropOutputSize: \"Output Size\",\n cropPixels: \"px\",\n cropOptional: \"(optional)\",\n storageTooltip: \"{used} of {total} used ({remaining} remaining)\",\n },\n\n // Sidebar\n sidebarNav: {\n browseModules: \"Browse saved modules\",\n expandSidebar: \"Expand block sidebar\",\n palette: \"Block palette\",\n insertBlock: \"Insert {block} block\",\n },\n\n // Landmark region labels for assistive technology\n landmarks: {\n canvas: \"Email canvas\",\n blockToolbar: \"Block properties\",\n rightSidebar: \"Block properties and template settings\",\n reorderAnnouncements: \"Block reorder announcements\",\n },\n\n // Design Reference (cloud)\n errors: {\n editorLoading: \"Loading editor...\",\n editorLoadFailed: \"Failed to load editor.\",\n retry: \"Retry\",\n },\n\n issues: {\n panelTitle: \"Issues\",\n panelTabLabel: \"Issues\",\n groupErrors: \"Errors\",\n groupWarnings: \"Warnings\",\n groupInfo: \"Info\",\n jump: \"Jump to block\",\n fix: \"Fix\",\n emptyState: \"No issues — looking good.\",\n badgeError: \"Has errors\",\n badgeWarning: \"Has warnings\",\n issueCountTooltip: \"{count} issue(s)\",\n },\n};\n"],"mappings":";AAAA,IAAA,IAAe;CAEb,QAAQ;EACN,WAAW;EACX,YAAY;CACd;CAGA,SAAS;EACP,MAAM;EACN,MAAM;EACN,eAAe;CACjB;CAGA,UAAU;EACR,OAAO;EACP,SAAS;EACT,QA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iBAAiB;EACjB,UAAU;EACV,UAAU;EACV,aAAa;EACb,aAAa;EACb,eAAe;EACf,sBAAsB;EACtB,QAAQ;EACR,WAAW;EACX,aAAa;EACb,iBAAiB;EACjB,oBAAoB;EACpB,iBAAiB;EACjB,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;EACb,qBAAqB;EACrB,uBACE;EACF,yBACE;EACF,mBAAmB;EACnB,SAAS;EACT,WAAW;EACX,cAAc;EACd,QAAQ;EACR,iBAAiB;EACjB,UAAU;EACV,YAAY;EACZ,iBAAiB;EACjB,kBAAkB;EAClB,cAAc;EACd,cAAc;EACd,eAAe;EACf,gBAAgB;EAChB,YAAY;EACZ,cAAc;EACd,gBAAgB;CAClB;CAGA,YAAY;EACV,eAAe;EACf,eAAe;EACf,SAAS;EACT,aAAa;CACf;CAGA,WAAW;EACT,QAAQ;EACR,cAAc;EACd,cAAc;EACd,sBAAsB;CACxB;CAGA,QAAQ;EACN,eAAe;EACf,kBAAkB;EAClB,OAAO;CACT;CAEA,QAAQ;EACN,YAAY;EACZ,eAAe;EACf,aAAa;EACb,eAAe;EACf,WAAW;EACX,MAAM;EACN,KAAK;EACL,YAAY;EACZ,YAAY;EACZ,cAAc;EACd,mBAAmB;CACrB;AACF"}
@@ -1,6 +1,6 @@
1
- import { C as e, H as t, M as n, O as r, P as i, V as a, Z as o, c as s, ct as c, f as l, g as u, h as d, it as f, l as p, m, o as h, ot as g, p as _, r as v, st as y, u as b, x } from "./draggable-P6QWzy4g.js";
2
- import { $ as S, Ft as C, _n as w, gn as T, mn as E, vn as D } from "./features-BsW4aFcn.js";
3
- import { _ as O, g as k, h as A, n as j, r as M, t as N, v as P, y as F } from "./tiptap-BwTCLVWl.js";
1
+ import { C as e, H as t, M as n, O as r, P as i, V as a, Z as o, c as s, ct as c, f as l, g as u, h as d, it as f, l as p, m, o as h, ot as g, p as _, r as v, st as y, u as b, x } from "./draggable-CLpL3kf8.js";
2
+ import { $ as S, Ft as C, _n as w, gn as T, mn as E, vn as D } from "./features-BOcQhi9B.js";
3
+ import { _ as O, g as k, h as A, n as j, r as M, t as N, v as P, y as F } from "./tiptap-BCvhHXDe.js";
4
4
  //#region src/extensions/FontSize.ts
5
5
  var I = A.create({
6
6
  name: "fontSize",
@@ -596,4 +596,4 @@ var oe = A.create({
596
596
  //#endregion
597
597
  export { I as FontSize, L as LetterSpacing, R as LineHeight, H as LogicMergeTagNode, K as MergeTagNode, oe as MergeTagSuggestion, Q as filterMergeTags, $ as handleSuggestionKeyDown };
598
598
 
599
- //# sourceMappingURL=extensions-DIHxPVrP.js.map
599
+ //# sourceMappingURL=extensions-DdH6DxVo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"extensions-DIHxPVrP.js","names":["$emit"],"sources":["../../../src/extensions/FontSize.ts","../../../src/extensions/LetterSpacing.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/components/MergeTagSuggestionList.vue","../../../src/components/MergeTagSuggestionList.vue","../../../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\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 hover:tpl: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 hover:tpl: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 value: {\n default: \"\",\n parseHTML: (element) =>\n element.getAttribute(\"data-logic-merge-tag\") || \"\",\n },\n keyword: {\n default: \"\",\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, 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 { getMergeTagLabel } = useMergeTag();\nconst { t } = useI18n();\n\nconst displayLabel = computed(() => getMergeTagLabel(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\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\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n if (newValue && newValue !== props.node.attrs.value) {\n // Update with new value and derive label from it\n props.updateAttributes({\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 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 class=\"tpl:w-32 tpl:rounded tpl:border-none 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 @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\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 {{ 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 hover:tpl: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, 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 { getMergeTagLabel } = useMergeTag();\nconst { t } = useI18n();\n\nconst displayLabel = computed(() => getMergeTagLabel(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\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\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n if (newValue && newValue !== props.node.attrs.value) {\n // Update with new value and derive label from it\n props.updateAttributes({\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 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 class=\"tpl:w-32 tpl:rounded tpl:border-none 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 @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\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 {{ 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 hover:tpl: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 mergeTags: MergeTag[];\n syntax: SyntaxPreset;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n mergeTagNode: {\n insertMergeTag: (attrs: MergeTag) => 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 label: {\n default: \"\",\n parseHTML: (element) =>\n element.getAttribute(\"data-label\") || element.textContent || \"\",\n },\n value: {\n default: \"\",\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: MergeTag) =>\n ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs,\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","<script setup lang=\"ts\">\nimport type { MergeTag } from \"@templatical/types\";\n\nconst props = defineProps<{\n items: MergeTag[];\n selectedIndex: number;\n emptyText: string;\n /** Stable id used for aria-controls + per-option id derivation. */\n listId?: string;\n}>();\n\ndefineEmits<{\n (e: \"select\", item: MergeTag): void;\n (e: \"hover\", index: number): void;\n}>();\n\nfunction optionId(index: number): string | undefined {\n return props.listId ? `${props.listId}-opt-${index}` : undefined;\n}\n</script>\n\n<template>\n <div\n :id=\"listId\"\n class=\"tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg\"\n role=\"listbox\"\n data-testid=\"merge-tag-suggestion-list\"\n >\n <div\n v-if=\"items.length === 0\"\n class=\"tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n data-testid=\"merge-tag-suggestion-empty\"\n >\n {{ emptyText }}\n </div>\n <button\n v-for=\"(item, index) in items\"\n :key=\"item.value\"\n :id=\"optionId(index)\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"index === selectedIndex\"\n :data-selected=\"index === selectedIndex ? 'true' : 'false'\"\n :data-merge-tag-value=\"item.value\"\n class=\"tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors\"\n :class=\"\n index === selectedIndex\n ? 'tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]'\n : 'tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]'\n \"\n @mousedown.prevent.stop=\"$emit('select', item)\"\n @mousemove=\"index !== selectedIndex && $emit('hover', index)\"\n >\n <span class=\"tpl:font-medium\">{{ item.label }}</span>\n <span class=\"tpl:text-[var(--tpl-text-dim)] tpl:font-mono\">{{\n item.value\n }}</span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { MergeTag } from \"@templatical/types\";\n\nconst props = defineProps<{\n items: MergeTag[];\n selectedIndex: number;\n emptyText: string;\n /** Stable id used for aria-controls + per-option id derivation. */\n listId?: string;\n}>();\n\ndefineEmits<{\n (e: \"select\", item: MergeTag): void;\n (e: \"hover\", index: number): void;\n}>();\n\nfunction optionId(index: number): string | undefined {\n return props.listId ? `${props.listId}-opt-${index}` : undefined;\n}\n</script>\n\n<template>\n <div\n :id=\"listId\"\n class=\"tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg\"\n role=\"listbox\"\n data-testid=\"merge-tag-suggestion-list\"\n >\n <div\n v-if=\"items.length === 0\"\n class=\"tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n data-testid=\"merge-tag-suggestion-empty\"\n >\n {{ emptyText }}\n </div>\n <button\n v-for=\"(item, index) in items\"\n :key=\"item.value\"\n :id=\"optionId(index)\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"index === selectedIndex\"\n :data-selected=\"index === selectedIndex ? 'true' : 'false'\"\n :data-merge-tag-value=\"item.value\"\n class=\"tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors\"\n :class=\"\n index === selectedIndex\n ? 'tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]'\n : 'tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]'\n \"\n @mousedown.prevent.stop=\"$emit('select', item)\"\n @mousemove=\"index !== selectedIndex && $emit('hover', index)\"\n >\n <span class=\"tpl:font-medium\">{{ item.label }}</span>\n <span class=\"tpl:text-[var(--tpl-text-dim)] tpl:font-mono\">{{\n item.value\n }}</span>\n </button>\n </div>\n</template>\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 App, createApp, h, ref, type Ref } from \"vue\";\nimport MergeTagSuggestionList from \"../components/MergeTagSuggestionList.vue\";\n\nconst MAX_RESULTS = 10;\n\n// Monotonic counter for unique listbox IDs across multiple popup instances.\nlet POPUP_ID_SEQ = 0;\n\nexport interface MergeTagSuggestionOptions {\n /** Available merge tags */\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 * Filter merge tags by query against label and value (case-insensitive).\n * Capped at MAX_RESULTS. Exported for testing.\n */\nexport function filterMergeTags(tags: MergeTag[], query: string): MergeTag[] {\n const trimmed = query.trim().toLowerCase();\n if (trimmed === \"\") {\n return tags.slice(0, MAX_RESULTS);\n }\n return tags\n .filter((tag) => {\n const label = tag.label.toLowerCase();\n const value = tag.value.toLowerCase();\n return label.includes(trimmed) || value.includes(trimmed);\n })\n .slice(0, MAX_RESULTS);\n}\n\n/**\n * Handle a keydown event against a list of items. Returns whether the\n * event was handled (so the suggestion plugin can stop propagation).\n * Exported for testing.\n */\nexport function handleSuggestionKeyDown(\n event: KeyboardEvent,\n items: MergeTag[],\n selectedIndex: Ref<number>,\n onSelect: (item: MergeTag) => void,\n): boolean {\n if (items.length === 0) {\n if (event.key === \"Enter\" || event.key === \"Tab\") return true;\n return false;\n }\n\n if (event.key === \"ArrowDown\") {\n selectedIndex.value = (selectedIndex.value + 1) % items.length;\n return true;\n }\n if (event.key === \"ArrowUp\") {\n selectedIndex.value =\n (selectedIndex.value - 1 + items.length) % items.length;\n return true;\n }\n if (event.key === \"Enter\" || event.key === \"Tab\") {\n onSelect(items[selectedIndex.value]);\n return true;\n }\n return false;\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: () => {\n let app: App | null = null;\n let container: HTMLElement | null = null;\n let editableEl: HTMLElement | null = null;\n const itemsRef = ref<MergeTag[]>([]);\n const selectedIndex = ref(0);\n let currentCommand: ((item: MergeTag) => void) | null = null;\n const listId = `tpl-merge-tag-suggestion-${++POPUP_ID_SEQ}`;\n let latestClientRect: (() => DOMRect | null) | null = null;\n let scrollTargets: Array<EventTarget> = [];\n let pendingRaf: number | null = null;\n\n function reposition(): void {\n position(latestClientRect?.() ?? null);\n }\n\n /**\n * Reposition immediately and on the next animation frame.\n * After a keystroke triggers the suggestion, TipTap may run its\n * own `scrollIntoView` to keep the caret visible. That scroll\n * lands AFTER the current task's `position()` call but BEFORE\n * the browser's next paint, so we re-measure on rAF to catch\n * the post-scroll caret rect. Without this, the popup pins to\n * the pre-scroll caret position and ends up offset on slower\n * runners.\n */\n function repositionAfterPaint(): void {\n reposition();\n if (pendingRaf !== null) cancelAnimationFrame(pendingRaf);\n pendingRaf = requestAnimationFrame(() => {\n pendingRaf = null;\n reposition();\n });\n }\n\n function collectScrollAncestors(el: HTMLElement | null): HTMLElement[] {\n // Walk up the DOM finding scrollable ancestors. ProseMirror's\n // scrollIntoView fires on whichever ancestor scrolls — listening\n // to all of them ensures we reposition regardless of which one\n // moves.\n const result: HTMLElement[] = [];\n let node: HTMLElement | null = el?.parentElement ?? null;\n while (\n node &&\n // shadow-ok: ancestor walk terminator; not a mount target\n node !== document.body &&\n node !== document.documentElement\n ) {\n const style = window.getComputedStyle(node);\n const overflow = style.overflow + style.overflowX + style.overflowY;\n if (/(auto|scroll|overlay)/.test(overflow)) {\n result.push(node);\n }\n node = node.parentElement;\n }\n return result;\n }\n\n function attachScrollListeners(viewDom: HTMLElement | null): void {\n scrollTargets = [window, ...collectScrollAncestors(viewDom)];\n for (const target of scrollTargets) {\n target.addEventListener(\"scroll\", reposition, {\n passive: true,\n capture: true,\n });\n }\n window.addEventListener(\"resize\", reposition, { passive: true });\n }\n\n function detachScrollListeners(): void {\n for (const target of scrollTargets) {\n target.removeEventListener(\"scroll\", reposition, {\n capture: true,\n } as EventListenerOptions);\n }\n window.removeEventListener(\"resize\", reposition);\n scrollTargets = [];\n }\n\n function position(rect: DOMRect | null): void {\n if (!container || !rect) return;\n // If the caret has scrolled out of the viewport, freeze the\n // popup at its last on-screen position. Following the caret\n // off-screen produces an invisible popup the user can't reach,\n // and lets pathological scroll loops drag the popup further\n // each tick.\n if (rect.bottom < 0 || rect.top > window.innerHeight) return;\n container.style.position = \"fixed\";\n container.style.left = `${rect.left}px`;\n container.style.zIndex = \"9999\";\n // Place below caret first; offsetHeight is sync-readable after\n // the Vue app has mounted (or after onUpdate's reactive flush).\n container.style.top = `${rect.bottom}px`;\n const popupHeight = container.offsetHeight;\n if (popupHeight === 0) return;\n const spaceBelow = window.innerHeight - rect.bottom;\n if (spaceBelow < popupHeight) {\n // Not enough room below — flip above. Clamp to 0 so the\n // popup never positions off the top of the viewport.\n const flippedTop = Math.max(0, rect.top - popupHeight);\n container.style.top = `${flippedTop}px`;\n }\n }\n\n function applyThemeContext(\n target: HTMLElement,\n editorEl: HTMLElement | null | undefined,\n ): void {\n // When the popup mounts to document.body its `position: fixed`\n // resolves against the viewport — any transform/filter on a\n // consumer-page ancestor (route transitions, reveal animations,\n // dark canvas inversion) creates a containing block and moves\n // fixed descendants with it. Body ancestors don't transform.\n //\n // When mounting inside the editor's popover root, the popup is a\n // descendant of the `.tpl[data-tpl-theme]` root so CSS vars + font\n // would inherit — but the snapshot below is still emitted inline\n // because inline declarations win and the cost is negligible. This\n // keeps a single behavior across both mount paths.\n //\n // CSS vars (--tpl-bg-elevated, --tpl-border, etc.) are scoped to\n // `.tpl` and `.tpl[data-tpl-theme=\"dark\"]` in the editor's\n // stylesheet, so the popup wouldn't inherit them at body root.\n // Adding `class=\"tpl\"` would also pull base rules (min-height,\n // flex, full-page bg) we don't want on a popup. Instead, snapshot\n // every --tpl-* custom property from the editor's theme root and\n // re-emit them inline on the popup wrapper.\n const themeRoot = editorEl?.closest<HTMLElement>(\"[data-tpl-theme]\");\n if (!themeRoot) return;\n const themeValue = themeRoot.getAttribute(\"data-tpl-theme\");\n if (themeValue) target.setAttribute(\"data-tpl-theme\", themeValue);\n const computed = window.getComputedStyle(themeRoot);\n for (let i = 0; i < computed.length; i++) {\n const prop = computed[i];\n if (prop.startsWith(\"--tpl-\")) {\n target.style.setProperty(prop, computed.getPropertyValue(prop));\n }\n }\n // The popup no longer inherits font from the editor wrapper, so\n // its content would render in the page's default font and end up\n // at a different height — which changes the flip-above decision\n // and shifts the popup off the caret. Copy typography too.\n target.style.fontFamily = computed.fontFamily;\n target.style.fontSize = computed.fontSize;\n target.style.lineHeight = computed.lineHeight;\n }\n\n function setEditableAria(active: boolean): void {\n if (!editableEl) return;\n if (active) {\n editableEl.setAttribute(\"role\", \"combobox\");\n editableEl.setAttribute(\"aria-haspopup\", \"listbox\");\n editableEl.setAttribute(\"aria-expanded\", \"true\");\n editableEl.setAttribute(\"aria-controls\", listId);\n } else {\n editableEl.removeAttribute(\"aria-expanded\");\n editableEl.removeAttribute(\"aria-controls\");\n editableEl.removeAttribute(\"aria-activedescendant\");\n editableEl.removeAttribute(\"aria-haspopup\");\n editableEl.removeAttribute(\"role\");\n }\n }\n\n function setActiveDescendant(): void {\n if (!editableEl) return;\n if (itemsRef.value.length === 0) {\n editableEl.removeAttribute(\"aria-activedescendant\");\n return;\n }\n editableEl.setAttribute(\n \"aria-activedescendant\",\n `${listId}-opt-${selectedIndex.value}`,\n );\n }\n\n function select(item: MergeTag): void {\n currentCommand?.(item);\n }\n\n return {\n onStart: (props: SuggestionProps<MergeTag>) => {\n itemsRef.value = props.items;\n selectedIndex.value = 0;\n currentCommand = (item) => props.command(item);\n\n container = document.createElement(\"div\");\n container.setAttribute(\"data-testid\", \"merge-tag-suggestion-popup\");\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 editableEl = viewDom ?? null;\n applyThemeContext(container, viewDom ?? null);\n // Prefer the editor's popover root (shadow-aware) when wired by\n // the consumer. Falls back to document.body for headless callers\n // that don't pass `popoverRoot` to configure().\n // shadow-ok: fallback when popoverRoot wasn't provided (e.g., headless caller); editor mounts pass the shadow-aware root\n const mountTarget = popoverRootRef?.value ?? document.body;\n mountTarget.appendChild(container);\n\n app = createApp({\n render() {\n return h(MergeTagSuggestionList, {\n items: itemsRef.value,\n selectedIndex: selectedIndex.value,\n emptyText,\n listId,\n onSelect: (item: MergeTag) => select(item),\n onHover: (index: number) => {\n selectedIndex.value = index;\n setActiveDescendant();\n },\n });\n },\n });\n app.mount(container);\n setEditableAria(true);\n setActiveDescendant();\n latestClientRect = props.clientRect ?? null;\n repositionAfterPaint();\n attachScrollListeners(viewDom ?? null);\n },\n onUpdate: (props: SuggestionProps<MergeTag>) => {\n itemsRef.value = props.items;\n // Reset selection when item set changes (query changed).\n if (selectedIndex.value >= props.items.length) {\n selectedIndex.value = 0;\n }\n currentCommand = (item) => props.command(item);\n setActiveDescendant();\n latestClientRect = props.clientRect ?? null;\n repositionAfterPaint();\n },\n onKeyDown: (props: SuggestionKeyDownProps): boolean => {\n if (props.event.key === \"Escape\") {\n return true;\n }\n const handled = handleSuggestionKeyDown(\n props.event,\n itemsRef.value,\n selectedIndex,\n select,\n );\n if (handled) setActiveDescendant();\n return handled;\n },\n onExit: () => {\n if (pendingRaf !== null) {\n cancelAnimationFrame(pendingRaf);\n pendingRaf = null;\n }\n detachScrollListeners();\n setEditableAria(false);\n app?.unmount();\n container?.remove();\n app = null;\n container = null;\n editableEl = null;\n currentCommand = null;\n latestClientRect = null;\n },\n };\n },\n };\n\n return [\n Suggestion({\n editor: this.editor,\n ...config,\n }),\n ];\n },\n});\n"],"mappings":";;;;AAeA,IAAa,IAAW,EAAU,OAAwB;CACxD,MAAM;CAEN,aAAa;AACX,SAAO,EACL,OAAO,CAAC,YAAY,EACrB;;CAGH,sBAAsB;AACpB,SAAO,CACL;GACE,OAAO,KAAK,QAAQ;GACpB,YAAY,EACV,UAAU;IACR,SAAS;IACT,YAAY,MACV,EAAQ,MAAM,UAAU,QAAQ,UAAU,GAAG,IAAI;IACnD,aAAa,MACN,EAAW,WAGT,EACL,OAAO,cAAc,EAAW,YACjC,GAJQ,EAAE;IAMd,EACF;GACF,CACF;;CAGH,cAAc;AACZ,SAAO;GACL,cACG,OACA,EAAE,eACM,GAAO,CAAC,QAAQ,aAAa,EAAE,UAAU,GAAM,CAAC,CAAC,KAAK;GAEjE,sBAEG,EAAE,eACM,GAAO,CACX,QAAQ,aAAa,EAAE,UAAU,MAAM,CAAC,CACxC,sBAAsB,CACtB,KAAK;GAEb;;CAEJ,CAAC,ECjDW,IAAgB,EAAU,OAA6B;CAClE,MAAM;CAEN,aAAa;AACX,SAAO,EACL,OAAO,CAAC,YAAY,EACrB;;CAGH,sBAAsB;AACpB,SAAO,CACL;GACE,OAAO,KAAK,QAAQ;GACpB,YAAY,EACV,eAAe;IACb,SAAS;IACT,YAAY,MACV,EAAQ,MAAM,eAAe,QAAQ,UAAU,GAAG,IAAI;IACxD,aAAa,MACN,EAAW,gBAGT,EACL,OAAO,mBAAmB,EAAW,iBACtC,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,GACtB,GAAqB;;QAExB,CAAC;SAEL,CAAC,EACF,EAAI,MAAM,EAAU,EACpB,EAAgB,GAAK,EACrB,GAAqB,EACrB,IAAmB,EAAM,cAAc,MACvC,GAAsB,EACtB,EAAsB,KAAW,KAAK;;KAExC,WAAW,MAAqC;AAS9C,MARA,EAAS,QAAQ,EAAM,OAEnB,EAAc,SAAS,EAAM,MAAM,WACrC,EAAc,QAAQ,IAExB,KAAkB,MAAS,EAAM,QAAQ,EAAK,EAC9C,GAAqB,EACrB,IAAmB,EAAM,cAAc,MACvC,GAAsB;;KAExB,YAAY,MAA2C;AACrD,UAAI,EAAM,MAAM,QAAQ,SACtB,QAAO;MAET,IAAM,IAAU,EACd,EAAM,OACN,EAAS,OACT,GACA,EACD;AAED,aADI,KAAS,GAAqB,EAC3B;;KAET,cAAc;AAaZ,MAZI,MAAe,SACjB,qBAAqB,EAAW,EAChC,IAAa,OAEf,GAAuB,EACvB,EAAgB,GAAM,EACtB,GAAK,SAAS,EACd,GAAW,QAAQ,EACnB,IAAM,MACN,IAAY,MACZ,IAAa,MACb,IAAiB,MACjB,IAAmB;;KAEtB;;GAEJ;AAED,SAAO,CACL,EAAW;GACT,QAAQ,KAAK;GACb,GAAG;GACJ,CAAC,CACH;;CAEJ,CAAC"}
1
+ {"version":3,"file":"extensions-DdH6DxVo.js","names":["$emit"],"sources":["../../../src/extensions/FontSize.ts","../../../src/extensions/LetterSpacing.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/components/MergeTagSuggestionList.vue","../../../src/components/MergeTagSuggestionList.vue","../../../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\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 hover:tpl: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 hover:tpl: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 value: {\n default: \"\",\n parseHTML: (element) =>\n element.getAttribute(\"data-logic-merge-tag\") || \"\",\n },\n keyword: {\n default: \"\",\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, 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 { getMergeTagLabel } = useMergeTag();\nconst { t } = useI18n();\n\nconst displayLabel = computed(() => getMergeTagLabel(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\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\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n if (newValue && newValue !== props.node.attrs.value) {\n // Update with new value and derive label from it\n props.updateAttributes({\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 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 class=\"tpl:w-32 tpl:rounded tpl:border-none 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 @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\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 {{ 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 hover:tpl: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, 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 { getMergeTagLabel } = useMergeTag();\nconst { t } = useI18n();\n\nconst displayLabel = computed(() => getMergeTagLabel(props.node.attrs.value));\n\nconst isEditing = ref(false);\nconst editValue = ref(\"\");\nconst inputRef = ref<HTMLInputElement | null>(null);\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\nfunction finishEditing(): void {\n const newValue = editValue.value.trim();\n if (newValue && newValue !== props.node.attrs.value) {\n // Update with new value and derive label from it\n props.updateAttributes({\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 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 class=\"tpl:w-32 tpl:rounded tpl:border-none 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 @blur=\"finishEditing\"\n @keydown=\"handleKeydown\"\n />\n <!-- Display mode -->\n <span\n v-else\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 {{ 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 hover:tpl: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 mergeTags: MergeTag[];\n syntax: SyntaxPreset;\n}\n\ndeclare module \"@tiptap/core\" {\n interface Commands<ReturnType> {\n mergeTagNode: {\n insertMergeTag: (attrs: MergeTag) => 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 label: {\n default: \"\",\n parseHTML: (element) =>\n element.getAttribute(\"data-label\") || element.textContent || \"\",\n },\n value: {\n default: \"\",\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: MergeTag) =>\n ({ commands }) => {\n return commands.insertContent({\n type: this.name,\n attrs,\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","<script setup lang=\"ts\">\nimport type { MergeTag } from \"@templatical/types\";\n\nconst props = defineProps<{\n items: MergeTag[];\n selectedIndex: number;\n emptyText: string;\n /** Stable id used for aria-controls + per-option id derivation. */\n listId?: string;\n}>();\n\ndefineEmits<{\n (e: \"select\", item: MergeTag): void;\n (e: \"hover\", index: number): void;\n}>();\n\nfunction optionId(index: number): string | undefined {\n return props.listId ? `${props.listId}-opt-${index}` : undefined;\n}\n</script>\n\n<template>\n <div\n :id=\"listId\"\n class=\"tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg\"\n role=\"listbox\"\n data-testid=\"merge-tag-suggestion-list\"\n >\n <div\n v-if=\"items.length === 0\"\n class=\"tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n data-testid=\"merge-tag-suggestion-empty\"\n >\n {{ emptyText }}\n </div>\n <button\n v-for=\"(item, index) in items\"\n :key=\"item.value\"\n :id=\"optionId(index)\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"index === selectedIndex\"\n :data-selected=\"index === selectedIndex ? 'true' : 'false'\"\n :data-merge-tag-value=\"item.value\"\n class=\"tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors\"\n :class=\"\n index === selectedIndex\n ? 'tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]'\n : 'tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]'\n \"\n @mousedown.prevent.stop=\"$emit('select', item)\"\n @mousemove=\"index !== selectedIndex && $emit('hover', index)\"\n >\n <span class=\"tpl:font-medium\">{{ item.label }}</span>\n <span class=\"tpl:text-[var(--tpl-text-dim)] tpl:font-mono\">{{\n item.value\n }}</span>\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\nimport type { MergeTag } from \"@templatical/types\";\n\nconst props = defineProps<{\n items: MergeTag[];\n selectedIndex: number;\n emptyText: string;\n /** Stable id used for aria-controls + per-option id derivation. */\n listId?: string;\n}>();\n\ndefineEmits<{\n (e: \"select\", item: MergeTag): void;\n (e: \"hover\", index: number): void;\n}>();\n\nfunction optionId(index: number): string | undefined {\n return props.listId ? `${props.listId}-opt-${index}` : undefined;\n}\n</script>\n\n<template>\n <div\n :id=\"listId\"\n class=\"tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg\"\n role=\"listbox\"\n data-testid=\"merge-tag-suggestion-list\"\n >\n <div\n v-if=\"items.length === 0\"\n class=\"tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]\"\n data-testid=\"merge-tag-suggestion-empty\"\n >\n {{ emptyText }}\n </div>\n <button\n v-for=\"(item, index) in items\"\n :key=\"item.value\"\n :id=\"optionId(index)\"\n type=\"button\"\n role=\"option\"\n :aria-selected=\"index === selectedIndex\"\n :data-selected=\"index === selectedIndex ? 'true' : 'false'\"\n :data-merge-tag-value=\"item.value\"\n class=\"tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors\"\n :class=\"\n index === selectedIndex\n ? 'tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]'\n : 'tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]'\n \"\n @mousedown.prevent.stop=\"$emit('select', item)\"\n @mousemove=\"index !== selectedIndex && $emit('hover', index)\"\n >\n <span class=\"tpl:font-medium\">{{ item.label }}</span>\n <span class=\"tpl:text-[var(--tpl-text-dim)] tpl:font-mono\">{{\n item.value\n }}</span>\n </button>\n </div>\n</template>\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 App, createApp, h, ref, type Ref } from \"vue\";\nimport MergeTagSuggestionList from \"../components/MergeTagSuggestionList.vue\";\n\nconst MAX_RESULTS = 10;\n\n// Monotonic counter for unique listbox IDs across multiple popup instances.\nlet POPUP_ID_SEQ = 0;\n\nexport interface MergeTagSuggestionOptions {\n /** Available merge tags */\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 * Filter merge tags by query against label and value (case-insensitive).\n * Capped at MAX_RESULTS. Exported for testing.\n */\nexport function filterMergeTags(tags: MergeTag[], query: string): MergeTag[] {\n const trimmed = query.trim().toLowerCase();\n if (trimmed === \"\") {\n return tags.slice(0, MAX_RESULTS);\n }\n return tags\n .filter((tag) => {\n const label = tag.label.toLowerCase();\n const value = tag.value.toLowerCase();\n return label.includes(trimmed) || value.includes(trimmed);\n })\n .slice(0, MAX_RESULTS);\n}\n\n/**\n * Handle a keydown event against a list of items. Returns whether the\n * event was handled (so the suggestion plugin can stop propagation).\n * Exported for testing.\n */\nexport function handleSuggestionKeyDown(\n event: KeyboardEvent,\n items: MergeTag[],\n selectedIndex: Ref<number>,\n onSelect: (item: MergeTag) => void,\n): boolean {\n if (items.length === 0) {\n if (event.key === \"Enter\" || event.key === \"Tab\") return true;\n return false;\n }\n\n if (event.key === \"ArrowDown\") {\n selectedIndex.value = (selectedIndex.value + 1) % items.length;\n return true;\n }\n if (event.key === \"ArrowUp\") {\n selectedIndex.value =\n (selectedIndex.value - 1 + items.length) % items.length;\n return true;\n }\n if (event.key === \"Enter\" || event.key === \"Tab\") {\n onSelect(items[selectedIndex.value]);\n return true;\n }\n return false;\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: () => {\n let app: App | null = null;\n let container: HTMLElement | null = null;\n let editableEl: HTMLElement | null = null;\n const itemsRef = ref<MergeTag[]>([]);\n const selectedIndex = ref(0);\n let currentCommand: ((item: MergeTag) => void) | null = null;\n const listId = `tpl-merge-tag-suggestion-${++POPUP_ID_SEQ}`;\n let latestClientRect: (() => DOMRect | null) | null = null;\n let scrollTargets: Array<EventTarget> = [];\n let pendingRaf: number | null = null;\n\n function reposition(): void {\n position(latestClientRect?.() ?? null);\n }\n\n /**\n * Reposition immediately and on the next animation frame.\n * After a keystroke triggers the suggestion, TipTap may run its\n * own `scrollIntoView` to keep the caret visible. That scroll\n * lands AFTER the current task's `position()` call but BEFORE\n * the browser's next paint, so we re-measure on rAF to catch\n * the post-scroll caret rect. Without this, the popup pins to\n * the pre-scroll caret position and ends up offset on slower\n * runners.\n */\n function repositionAfterPaint(): void {\n reposition();\n if (pendingRaf !== null) cancelAnimationFrame(pendingRaf);\n pendingRaf = requestAnimationFrame(() => {\n pendingRaf = null;\n reposition();\n });\n }\n\n function collectScrollAncestors(el: HTMLElement | null): HTMLElement[] {\n // Walk up the DOM finding scrollable ancestors. ProseMirror's\n // scrollIntoView fires on whichever ancestor scrolls — listening\n // to all of them ensures we reposition regardless of which one\n // moves.\n const result: HTMLElement[] = [];\n let node: HTMLElement | null = el?.parentElement ?? null;\n while (\n node &&\n // shadow-ok: ancestor walk terminator; not a mount target\n node !== document.body &&\n node !== document.documentElement\n ) {\n const style = window.getComputedStyle(node);\n const overflow = style.overflow + style.overflowX + style.overflowY;\n if (/(auto|scroll|overlay)/.test(overflow)) {\n result.push(node);\n }\n node = node.parentElement;\n }\n return result;\n }\n\n function attachScrollListeners(viewDom: HTMLElement | null): void {\n scrollTargets = [window, ...collectScrollAncestors(viewDom)];\n for (const target of scrollTargets) {\n target.addEventListener(\"scroll\", reposition, {\n passive: true,\n capture: true,\n });\n }\n window.addEventListener(\"resize\", reposition, { passive: true });\n }\n\n function detachScrollListeners(): void {\n for (const target of scrollTargets) {\n target.removeEventListener(\"scroll\", reposition, {\n capture: true,\n } as EventListenerOptions);\n }\n window.removeEventListener(\"resize\", reposition);\n scrollTargets = [];\n }\n\n function position(rect: DOMRect | null): void {\n if (!container || !rect) return;\n // If the caret has scrolled out of the viewport, freeze the\n // popup at its last on-screen position. Following the caret\n // off-screen produces an invisible popup the user can't reach,\n // and lets pathological scroll loops drag the popup further\n // each tick.\n if (rect.bottom < 0 || rect.top > window.innerHeight) return;\n container.style.position = \"fixed\";\n container.style.left = `${rect.left}px`;\n container.style.zIndex = \"9999\";\n // Place below caret first; offsetHeight is sync-readable after\n // the Vue app has mounted (or after onUpdate's reactive flush).\n container.style.top = `${rect.bottom}px`;\n const popupHeight = container.offsetHeight;\n if (popupHeight === 0) return;\n const spaceBelow = window.innerHeight - rect.bottom;\n if (spaceBelow < popupHeight) {\n // Not enough room below — flip above. Clamp to 0 so the\n // popup never positions off the top of the viewport.\n const flippedTop = Math.max(0, rect.top - popupHeight);\n container.style.top = `${flippedTop}px`;\n }\n }\n\n function applyThemeContext(\n target: HTMLElement,\n editorEl: HTMLElement | null | undefined,\n ): void {\n // When the popup mounts to document.body its `position: fixed`\n // resolves against the viewport — any transform/filter on a\n // consumer-page ancestor (route transitions, reveal animations,\n // dark canvas inversion) creates a containing block and moves\n // fixed descendants with it. Body ancestors don't transform.\n //\n // When mounting inside the editor's popover root, the popup is a\n // descendant of the `.tpl[data-tpl-theme]` root so CSS vars + font\n // would inherit — but the snapshot below is still emitted inline\n // because inline declarations win and the cost is negligible. This\n // keeps a single behavior across both mount paths.\n //\n // CSS vars (--tpl-bg-elevated, --tpl-border, etc.) are scoped to\n // `.tpl` and `.tpl[data-tpl-theme=\"dark\"]` in the editor's\n // stylesheet, so the popup wouldn't inherit them at body root.\n // Adding `class=\"tpl\"` would also pull base rules (min-height,\n // flex, full-page bg) we don't want on a popup. Instead, snapshot\n // every --tpl-* custom property from the editor's theme root and\n // re-emit them inline on the popup wrapper.\n const themeRoot = editorEl?.closest<HTMLElement>(\"[data-tpl-theme]\");\n if (!themeRoot) return;\n const themeValue = themeRoot.getAttribute(\"data-tpl-theme\");\n if (themeValue) target.setAttribute(\"data-tpl-theme\", themeValue);\n const computed = window.getComputedStyle(themeRoot);\n for (let i = 0; i < computed.length; i++) {\n const prop = computed[i];\n if (prop.startsWith(\"--tpl-\")) {\n target.style.setProperty(prop, computed.getPropertyValue(prop));\n }\n }\n // The popup no longer inherits font from the editor wrapper, so\n // its content would render in the page's default font and end up\n // at a different height — which changes the flip-above decision\n // and shifts the popup off the caret. Copy typography too.\n target.style.fontFamily = computed.fontFamily;\n target.style.fontSize = computed.fontSize;\n target.style.lineHeight = computed.lineHeight;\n }\n\n function setEditableAria(active: boolean): void {\n if (!editableEl) return;\n if (active) {\n editableEl.setAttribute(\"role\", \"combobox\");\n editableEl.setAttribute(\"aria-haspopup\", \"listbox\");\n editableEl.setAttribute(\"aria-expanded\", \"true\");\n editableEl.setAttribute(\"aria-controls\", listId);\n } else {\n editableEl.removeAttribute(\"aria-expanded\");\n editableEl.removeAttribute(\"aria-controls\");\n editableEl.removeAttribute(\"aria-activedescendant\");\n editableEl.removeAttribute(\"aria-haspopup\");\n editableEl.removeAttribute(\"role\");\n }\n }\n\n function setActiveDescendant(): void {\n if (!editableEl) return;\n if (itemsRef.value.length === 0) {\n editableEl.removeAttribute(\"aria-activedescendant\");\n return;\n }\n editableEl.setAttribute(\n \"aria-activedescendant\",\n `${listId}-opt-${selectedIndex.value}`,\n );\n }\n\n function select(item: MergeTag): void {\n currentCommand?.(item);\n }\n\n return {\n onStart: (props: SuggestionProps<MergeTag>) => {\n itemsRef.value = props.items;\n selectedIndex.value = 0;\n currentCommand = (item) => props.command(item);\n\n container = document.createElement(\"div\");\n container.setAttribute(\"data-testid\", \"merge-tag-suggestion-popup\");\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 editableEl = viewDom ?? null;\n applyThemeContext(container, viewDom ?? null);\n // Prefer the editor's popover root (shadow-aware) when wired by\n // the consumer. Falls back to document.body for headless callers\n // that don't pass `popoverRoot` to configure().\n // shadow-ok: fallback when popoverRoot wasn't provided (e.g., headless caller); editor mounts pass the shadow-aware root\n const mountTarget = popoverRootRef?.value ?? document.body;\n mountTarget.appendChild(container);\n\n app = createApp({\n render() {\n return h(MergeTagSuggestionList, {\n items: itemsRef.value,\n selectedIndex: selectedIndex.value,\n emptyText,\n listId,\n onSelect: (item: MergeTag) => select(item),\n onHover: (index: number) => {\n selectedIndex.value = index;\n setActiveDescendant();\n },\n });\n },\n });\n app.mount(container);\n setEditableAria(true);\n setActiveDescendant();\n latestClientRect = props.clientRect ?? null;\n repositionAfterPaint();\n attachScrollListeners(viewDom ?? null);\n },\n onUpdate: (props: SuggestionProps<MergeTag>) => {\n itemsRef.value = props.items;\n // Reset selection when item set changes (query changed).\n if (selectedIndex.value >= props.items.length) {\n selectedIndex.value = 0;\n }\n currentCommand = (item) => props.command(item);\n setActiveDescendant();\n latestClientRect = props.clientRect ?? null;\n repositionAfterPaint();\n },\n onKeyDown: (props: SuggestionKeyDownProps): boolean => {\n if (props.event.key === \"Escape\") {\n return true;\n }\n const handled = handleSuggestionKeyDown(\n props.event,\n itemsRef.value,\n selectedIndex,\n select,\n );\n if (handled) setActiveDescendant();\n return handled;\n },\n onExit: () => {\n if (pendingRaf !== null) {\n cancelAnimationFrame(pendingRaf);\n pendingRaf = null;\n }\n detachScrollListeners();\n setEditableAria(false);\n app?.unmount();\n container?.remove();\n app = null;\n container = null;\n editableEl = null;\n currentCommand = null;\n latestClientRect = null;\n },\n };\n },\n };\n\n return [\n Suggestion({\n editor: this.editor,\n ...config,\n }),\n ];\n },\n});\n"],"mappings":";;;;AAeA,IAAa,IAAW,EAAU,OAAwB;CACxD,MAAM;CAEN,aAAa;EACX,OAAO,EACL,OAAO,CAAC,WAAW,EACrB;CACF;CAEA,sBAAsB;EACpB,OAAO,CACL;GACE,OAAO,KAAK,QAAQ;GACpB,YAAY,EACV,UAAU;IACR,SAAS;IACT,YAAY,MACV,EAAQ,MAAM,UAAU,QAAQ,UAAU,EAAE,KAAK;IACnD,aAAa,MACN,EAAW,WAGT,EACL,OAAO,cAAc,EAAW,WAClC,IAJS,CAAC;GAMd,EACF;EACF,CACF;CACF;CAEA,cAAc;EACZ,OAAO;GACL,cACG,OACA,EAAE,eACM,EAAM,EAAE,QAAQ,aAAa,EAAE,UAAU,EAAK,CAAC,EAAE,IAAI;GAEhE,sBAEG,EAAE,eACM,EAAM,EACV,QAAQ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