@templatical/editor 0.46.0 → 0.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/dist/{AiChatSidebar-DGcH4Lyo.js → AiChatSidebar-DxPHFNoT.js} +14 -14
  2. package/dist/{AiFeatureMenu-B4q-0g1S.js → AiFeatureMenu-C8GVqu1d.js} +7 -7
  3. package/dist/{BlockIssueBadge-CZA1XvAh.js → BlockIssueBadge-BShkuJis.js} +5 -5
  4. package/dist/BlockPreviewCanvas-tzAtDkXH.js +141 -0
  5. package/dist/{CloudHeaderExtras-ehMYJP68.js → CloudHeaderExtras-CUSftQdm.js} +5 -5
  6. package/dist/{CloudPanels-BwOaAlKz.js → CloudPanels-Dgw7tb4R.js} +9 -9
  7. package/dist/{CollaboratorBar-qOZFRNPx.js → CollaboratorBar-5rfopCPx.js} +4 -4
  8. package/dist/{CommentsPanel-Bn6P5crU.js → CommentsPanel-DiWzYtnZ.js} +2 -2
  9. package/dist/{CommentsSidebar-B8wT932T.js → CommentsSidebar-BOqj16Al.js} +14 -14
  10. package/dist/CountdownBlock-zx39Dyby.js +92 -0
  11. package/dist/{CountdownToolbar-BeF21SeB.js → CountdownToolbar-C4y3Ft7H.js} +7 -7
  12. package/dist/{DesignReferenceSidebar-zH93uB15.js → DesignReferenceSidebar-BWAi3eQQ.js} +13 -13
  13. package/dist/{IssuesPanel-Dltw9haP.js → IssuesPanel-C-x3I012.js} +8 -8
  14. package/dist/{LoadingTrack-DROqNuuD.js → LoadingTrack-6XsqodoY.js} +1 -1
  15. package/dist/{LogicTagInsertButton-CHa-UD76.js → LogicTagInsertButton-B1_Wy0AN.js} +13 -13
  16. package/dist/{MediaEditModal-EY1YYcpw.js → MediaEditModal-ByOvznRC.js} +4 -4
  17. package/dist/{MediaPanels-CRVFGFZW.js → MediaPanels-9mDBv4aL.js} +2 -2
  18. package/dist/{MergeTagInput-B3ntd4dN.js → MergeTagInput-fOewuF27.js} +3 -3
  19. package/dist/{MergeTagModeToggle-C_06ZL0Q.js → MergeTagModeToggle-BXamLcv7.js} +7 -7
  20. package/dist/{ParagraphEditor-CxuW3TV0.js → ParagraphEditor-BVjOwwHx.js} +100 -85
  21. package/dist/{RestoreVersionDialog-B1n37M1Z.js → RestoreVersionDialog-BEKXx9xk.js} +6 -6
  22. package/dist/{RichTextEditorContent-CP_uULWB.js → RichTextEditorContent-D7kp7iig.js} +12 -12
  23. package/dist/{SaveBlockDialog-BSKX_7_v.js → SaveBlockDialog-SJu0lecx.js} +34 -35
  24. package/dist/{SavedBlocksBrowserModal-CHKrH1gO.js → SavedBlocksBrowserModal-DbmIS5uK.js} +14 -14
  25. package/dist/{SavedBlocksPanels-B-xDqBcz.js → SavedBlocksPanels-Dr5Fxx9Z.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-D2J-g82g.js → SavedBlocksPickBar-DnEWBZJy.js} +5 -5
  27. package/dist/{TemplateScoringPanel-3lHzuCl0.js → TemplateScoringPanel-ynbGl-sr.js} +16 -16
  28. package/dist/{TemplateSettings-D07K_Y4m.js → TemplateSettings-Bi01S3H3.js} +12 -12
  29. package/dist/{TestEmailModal-BNPw_lID.js → TestEmailModal-CbRY8HQx.js} +14 -14
  30. package/dist/{TestEmailPanel-8klWo8hE.js → TestEmailPanel-NAOmt3xi.js} +2 -2
  31. package/dist/{TitleEditor-CmC9OuhA.js → TitleEditor-Cc3DHbuN.js} +15 -15
  32. package/dist/{ToggleSwitch-COeyWGfT.js → ToggleSwitch-Ozc7YU38.js} +2 -2
  33. package/dist/Toolbar-B-2lO0I8.js +3156 -0
  34. package/dist/{TplModal-BGFawHY9.js → TplModal-Bz4-IZ9R.js} +6 -6
  35. package/dist/{VersionHistoryMenu-D7zaTMrb.js → VersionHistoryMenu-CjV1d1zk.js} +10 -10
  36. package/dist/{VersionHistoryPanels-DdbGjEOR.js → VersionHistoryPanels-BtwxrKJn.js} +2 -2
  37. package/dist/{VersionPreviewBanner-BUKb9gc6.js → VersionPreviewBanner-BLAei1kj.js} +4 -4
  38. package/dist/WrapperBlock-D0qgNqjD.js +45 -0
  39. package/dist/{blockTypeIcons-CVKo6V_v.js → blockTypeIcons-CEDZytqP.js} +50 -20
  40. package/dist/bundle-stats.json +8 -8
  41. package/dist/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +38 -1
  42. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js → AiChatSidebar-Dk0rJBQN.js} +8 -8
  43. package/dist/cdn/chunks/{AiChatSidebar-kCK4NZM9.js.map → AiChatSidebar-Dk0rJBQN.js.map} +1 -1
  44. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js → AiFeatureMenu-B7b0w8ZS.js} +6 -6
  45. package/dist/cdn/chunks/{AiFeatureMenu-K1dLeDft.js.map → AiFeatureMenu-B7b0w8ZS.js.map} +1 -1
  46. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js → BlockIssueBadge-C7sdnkrF.js} +5 -5
  47. package/dist/cdn/chunks/{BlockIssueBadge-05Q3L4RV.js.map → BlockIssueBadge-C7sdnkrF.js.map} +1 -1
  48. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js +143 -0
  49. package/dist/cdn/chunks/BlockPreviewCanvas-vK5tBazr.js.map +1 -0
  50. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js → CloudHeaderExtras-B4fhuwc_.js} +5 -5
  51. package/dist/cdn/chunks/{CloudHeaderExtras-5ONQ1RCa.js.map → CloudHeaderExtras-B4fhuwc_.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js → CloudPanels-awqHfJqC.js} +8 -8
  53. package/dist/cdn/chunks/{CloudPanels-_irSdWbi.js.map → CloudPanels-awqHfJqC.js.map} +1 -1
  54. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js → CollaboratorBar-CS0ivqkr.js} +5 -5
  55. package/dist/cdn/chunks/{CollaboratorBar-CZufI1On.js.map → CollaboratorBar-CS0ivqkr.js.map} +1 -1
  56. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js → CommentsPanel-CbzxwsyI.js} +3 -3
  57. package/dist/cdn/chunks/{CommentsPanel-VH_NJ5HZ.js.map → CommentsPanel-CbzxwsyI.js.map} +1 -1
  58. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js → CommentsSidebar-DWPHZuQm.js} +8 -8
  59. package/dist/cdn/chunks/{CommentsSidebar-CYPH5rVi.js.map → CommentsSidebar-DWPHZuQm.js.map} +1 -1
  60. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js +94 -0
  61. package/dist/cdn/chunks/CountdownBlock-Dasj191h.js.map +1 -0
  62. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js → CountdownToolbar-Cqg8FUH-.js} +8 -8
  63. package/dist/cdn/chunks/{CountdownToolbar-BaXCefQM.js.map → CountdownToolbar-Cqg8FUH-.js.map} +1 -1
  64. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js → DesignReferenceSidebar-BW9cHnA9.js} +12 -12
  65. package/dist/cdn/chunks/{DesignReferenceSidebar-GjkpHylX.js.map → DesignReferenceSidebar-BW9cHnA9.js.map} +1 -1
  66. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js → IssuesPanel-cXf9ywA4.js} +8 -8
  67. package/dist/cdn/chunks/{IssuesPanel-C1Lv2y_O.js.map → IssuesPanel-cXf9ywA4.js.map} +1 -1
  68. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js → LoadingTrack-DbH97JR9.js} +2 -2
  69. package/dist/cdn/chunks/{LoadingTrack-Cg1HRIND.js.map → LoadingTrack-DbH97JR9.js.map} +1 -1
  70. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js → LogicTagInsertButton-BMB9vShs.js} +89 -89
  71. package/dist/cdn/chunks/{LogicTagInsertButton-BYjdrDnQ.js.map → LogicTagInsertButton-BMB9vShs.js.map} +1 -1
  72. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js → MediaEditModal-zXfcArr4.js} +4 -4
  73. package/dist/cdn/chunks/{MediaEditModal-CD3fVbWI.js.map → MediaEditModal-zXfcArr4.js.map} +1 -1
  74. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js → MediaPanels-Cp4XB_dH.js} +3 -3
  75. package/dist/cdn/chunks/{MediaPanels-B2AyUUcf.js.map → MediaPanels-Cp4XB_dH.js.map} +1 -1
  76. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js → MergeTagInput-DLqrA9co.js} +4 -4
  77. package/dist/cdn/chunks/{MergeTagInput-Cx67J_vg.js.map → MergeTagInput-DLqrA9co.js.map} +1 -1
  78. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js → MergeTagModeToggle-BRiJzzn5.js} +6 -6
  79. package/dist/cdn/chunks/{MergeTagModeToggle-DZ4EuXVp.js.map → MergeTagModeToggle-BRiJzzn5.js.map} +1 -1
  80. package/dist/cdn/chunks/{ParagraphEditor-DndEFXmR.js → ParagraphEditor-D4aq9eeC.js} +116 -101
  81. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +1 -0
  82. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js → RestoreVersionDialog-BgR6RXSb.js} +6 -6
  83. package/dist/cdn/chunks/{RestoreVersionDialog-CFYs13a4.js.map → RestoreVersionDialog-BgR6RXSb.js.map} +1 -1
  84. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js → RichTextEditorContent-C4DMAn0g.js} +11 -11
  85. package/dist/cdn/chunks/{RichTextEditorContent-DKkDQ0dc.js.map → RichTextEditorContent-C4DMAn0g.js.map} +1 -1
  86. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js → SaveBlockDialog-BaIsQd09.js} +41 -42
  87. package/dist/cdn/chunks/{SaveBlockDialog-BOA2RaC_.js.map → SaveBlockDialog-BaIsQd09.js.map} +1 -1
  88. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js → SavedBlocksBrowserModal-CtnB58p_.js} +10 -10
  89. package/dist/cdn/chunks/{SavedBlocksBrowserModal-DQDVek3K.js.map → SavedBlocksBrowserModal-CtnB58p_.js.map} +1 -1
  90. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js → SavedBlocksPanels-BhEOMzEQ.js} +3 -3
  91. package/dist/cdn/chunks/{SavedBlocksPanels-Lu3tJ3QA.js.map → SavedBlocksPanels-BhEOMzEQ.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js → SavedBlocksPickBar-CcdqTEIp.js} +6 -6
  93. package/dist/cdn/chunks/{SavedBlocksPickBar-D7MtqG6r.js.map → SavedBlocksPickBar-CcdqTEIp.js.map} +1 -1
  94. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js → TemplateScoringPanel-BrWqJCSP.js} +9 -9
  95. package/dist/cdn/chunks/{TemplateScoringPanel-C_57Bfkf.js.map → TemplateScoringPanel-BrWqJCSP.js.map} +1 -1
  96. package/dist/cdn/chunks/{TemplateSettings-rZiHmq24.js → TemplateSettings-BkkWTDHD.js} +14 -14
  97. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js.map +1 -0
  98. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js → TestEmailModal-V5mwHsUV.js} +13 -13
  99. package/dist/cdn/chunks/{TestEmailModal-DWEyHXH2.js.map → TestEmailModal-V5mwHsUV.js.map} +1 -1
  100. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js → TestEmailPanel-DxrKuctP.js} +3 -3
  101. package/dist/cdn/chunks/{TestEmailPanel-XXMD-Lnr.js.map → TestEmailPanel-DxrKuctP.js.map} +1 -1
  102. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js → TitleEditor-CsZiG3TT.js} +19 -19
  103. package/dist/cdn/chunks/{TitleEditor-D1F0YoE-.js.map → TitleEditor-CsZiG3TT.js.map} +1 -1
  104. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js → ToggleSwitch-BB-bQADJ.js} +3 -3
  105. package/dist/cdn/chunks/{ToggleSwitch-B5U9cqhi.js.map → ToggleSwitch-BB-bQADJ.js.map} +1 -1
  106. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js +3073 -0
  107. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +1 -0
  108. package/dist/cdn/chunks/{TplModal-CYBbPCHL.js → TplModal-DC_eodTV.js} +6 -6
  109. package/dist/cdn/chunks/TplModal-DC_eodTV.js.map +1 -0
  110. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js → VersionHistoryMenu-DXnM5Df2.js} +11 -11
  111. package/dist/cdn/chunks/{VersionHistoryMenu-DbxuJgDO.js.map → VersionHistoryMenu-DXnM5Df2.js.map} +1 -1
  112. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js → VersionHistoryPanels-DXSqmaLS.js} +3 -3
  113. package/dist/cdn/chunks/{VersionHistoryPanels-Dq12VsTX.js.map → VersionHistoryPanels-DXSqmaLS.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js → VersionPreviewBanner-DKyN6BhO.js} +5 -5
  115. package/dist/cdn/chunks/{VersionPreviewBanner-HRERIH-v.js.map → VersionPreviewBanner-DKyN6BhO.js.map} +1 -1
  116. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +47 -0
  117. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js.map +1 -0
  118. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +22 -0
  119. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js.map +1 -0
  120. package/dist/cdn/chunks/{ca-C__Dzq--.js → ca-CbNzJM3I.js} +39 -2
  121. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +1 -0
  122. package/dist/cdn/chunks/{cloud-h1vaHp2p.js → cloud-BHClP3e2.js} +3 -3
  123. package/dist/cdn/chunks/{cloud-h1vaHp2p.js.map → cloud-BHClP3e2.js.map} +1 -1
  124. package/dist/cdn/chunks/{createCloudRuntime-bJN9EM1H.js → createCloudRuntime-Vd0N4elZ.js} +18 -9
  125. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +1 -0
  126. package/dist/cdn/chunks/{de-CGjbQ2mt.js → de-DMquBpZM.js} +39 -2
  127. package/dist/cdn/chunks/de-DMquBpZM.js.map +1 -0
  128. package/dist/cdn/chunks/{dist-B7W-Lb65.js → dist-CjL6JHML.js} +3 -3
  129. package/dist/cdn/chunks/{dist-B7W-Lb65.js.map → dist-CjL6JHML.js.map} +1 -1
  130. package/dist/cdn/chunks/{dist-C5nRd_ua.js → dist-MNQYSEWU.js} +4 -4
  131. package/dist/cdn/chunks/{dist-C5nRd_ua.js.map → dist-MNQYSEWU.js.map} +1 -1
  132. package/dist/cdn/chunks/{draggable-BUTN5vZC.js → draggable-DrsNwZuB.js} +1673 -1595
  133. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +1 -0
  134. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js → editor-modal-vEEmZ8Tu.js} +93 -93
  135. package/dist/cdn/chunks/{editor-modal-BpsbYA4_.js.map → editor-modal-vEEmZ8Tu.js.map} +1 -1
  136. package/dist/cdn/chunks/{en-BTiiAC-B.js → en-C8Mp71sO.js} +39 -2
  137. package/dist/cdn/chunks/en-C8Mp71sO.js.map +1 -0
  138. package/dist/cdn/chunks/en-eWpiXyZu.js +1 -0
  139. package/dist/cdn/chunks/{es-CdTOcSTf.js → es-Byq4tthI.js} +39 -2
  140. package/dist/cdn/chunks/es-Byq4tthI.js.map +1 -0
  141. package/dist/cdn/chunks/{extensions-CrmXF4MW.js → extensions-hJ9VqzDc.js} +7 -7
  142. package/dist/cdn/chunks/{extensions-CrmXF4MW.js.map → extensions-hJ9VqzDc.js.map} +1 -1
  143. package/dist/cdn/chunks/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +39 -2
  144. package/dist/cdn/chunks/fr-B3j35HEw.js.map +1 -0
  145. package/dist/cdn/chunks/{icons-Dr9erFGs.js → icons-aTYwH5-g.js} +107 -78
  146. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +1 -0
  147. package/dist/{ja-BhdkqENz.js → cdn/chunks/ja-D7txAuGS.js} +40 -1
  148. package/dist/cdn/chunks/ja-D7txAuGS.js.map +1 -0
  149. package/dist/cdn/chunks/{keys-BKu-LOk5.js → keys-HI-INbkz.js} +2 -2
  150. package/dist/cdn/chunks/{keys-BKu-LOk5.js.map → keys-HI-INbkz.js.map} +1 -1
  151. package/dist/{nl-CE3YItYg.js → cdn/chunks/nl-ClJ3BY3F.js} +40 -1
  152. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +1 -0
  153. package/dist/cdn/chunks/{preRenderCustomBlocks-CyGB3lZr.js → preRenderCustomBlocks-ByfuSjtL.js} +4 -2
  154. package/dist/cdn/chunks/preRenderCustomBlocks-ByfuSjtL.js.map +1 -0
  155. package/dist/{pt-BR-CUIT4rq4.js → cdn/chunks/pt-BR-DibcXcmv.js} +40 -1
  156. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +1 -0
  157. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +1279 -0
  158. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +1 -0
  159. package/dist/{dist-BI_LeQGl.js → cdn/chunks/src-DYCDeBDM.js} +437 -256
  160. package/dist/cdn/chunks/src-DYCDeBDM.js.map +1 -0
  161. package/dist/cdn/chunks/{src-B0pZeTYO.js → src-DlFlC9Tt.js} +334 -268
  162. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +1 -0
  163. package/dist/cdn/chunks/src-dZ4D_tuP.js +649 -0
  164. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +1 -0
  165. package/dist/{styleConstants-C_YAPdQS.js → cdn/chunks/styleConstants-D1Jz-TFU.js} +9 -28
  166. package/dist/cdn/chunks/{styleConstants-C_YAPdQS.js.map → styleConstants-D1Jz-TFU.js.map} +1 -1
  167. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +6 -0
  168. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +1 -0
  169. package/dist/cdn/chunks/{tiptap-CYDXLO17.js → tiptap-BPigZk5G.js} +3258 -3098
  170. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +1 -0
  171. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js → useAliveFlag-DCB96vzR.js} +2 -2
  172. package/dist/cdn/chunks/{useAliveFlag-DzyXG-8A.js.map → useAliveFlag-DCB96vzR.js.map} +1 -1
  173. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js → useCloudI18n-BBF4waXO.js} +3 -3
  174. package/dist/cdn/chunks/{useCloudI18n-Cgk0ts_F.js.map → useCloudI18n-BBF4waXO.js.map} +1 -1
  175. package/dist/cdn/chunks/{useEditorCore-DuC7kVti.js → useEditorCore-Bb2UcB20.js} +780 -764
  176. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +1 -0
  177. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +10 -0
  178. package/dist/cdn/chunks/{useEditorRoot-DDPIcEOO.js.map → useEditorRoot-CTc6O8al.js.map} +1 -1
  179. package/dist/cdn/chunks/{useI18n-DO4NTunW.js → useI18n-DUlyyIJJ.js} +3 -3
  180. package/dist/cdn/chunks/{useI18n-DO4NTunW.js.map → useI18n-DUlyyIJJ.js.map} +1 -1
  181. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js → useLogicTag-HsyUCQtl.js} +4 -4
  182. package/dist/cdn/chunks/{useLogicTag-B3uV3XHG.js.map → useLogicTag-HsyUCQtl.js.map} +1 -1
  183. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js → useMergeTag-Dg9pE85U.js} +4 -4
  184. package/dist/cdn/chunks/{useMergeTag-DJLM-7WQ.js.map → useMergeTag-Dg9pE85U.js.map} +1 -1
  185. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js → usePopoverPosition-IbaW6-Ao.js} +3 -3
  186. package/dist/cdn/chunks/{usePopoverPosition-CtVNwoHj.js.map → usePopoverPosition-IbaW6-Ao.js.map} +1 -1
  187. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js → useScrollToBlock-uUa601I4.js} +3 -3
  188. package/dist/cdn/chunks/{useScrollToBlock-CpmB5KxW.js.map → useScrollToBlock-uUa601I4.js.map} +1 -1
  189. package/dist/cdn/chunks/withCurrentFont-oLcATrQ8.js +21 -0
  190. package/dist/cdn/chunks/{withCurrentFont-isIyuezD.js.map → withCurrentFont-oLcATrQ8.js.map} +1 -1
  191. package/dist/cdn/editor.css +1 -1
  192. package/dist/cdn/editor.js +641 -631
  193. package/dist/cdn/editor.js.map +1 -1
  194. package/dist/{check-ZKvtMdpe.js → check-ClwqRMgv.js} +1 -1
  195. package/dist/{chevron-down-RrwkYMlp.js → chevron-down-te6qn-zE.js} +1 -1
  196. package/dist/{chevron-right-CklHaa1U.js → chevron-right-W2hbH1FM.js} +1 -1
  197. package/dist/{chevron-up-DjN2NTbo.js → chevron-up-Bf5Zo7o4.js} +1 -1
  198. package/dist/{circle-alert-BR1_Yfb-.js → circle-alert-CIEGV5DN.js} +1 -1
  199. package/dist/{clock-BEagNj21.js → clock-Y4cx0gkJ.js} +1 -1
  200. package/dist/{cloud-DPGjMGfv.js → cloud-B5xwm_4X.js} +2 -2
  201. package/dist/{copy-D6DNoSq1.js → copy-BEcsAlfB.js} +1 -1
  202. package/dist/{createCloudRuntime-D0RRgWab.js → createCloudRuntime-zNPkF6T9.js} +17 -8
  203. package/dist/{createLucideIcon-BAPyioGd.js → createLucideIcon-CYHXK9hn.js} +6 -6
  204. package/dist/{de-CGjbQ2mt.js → de-DMquBpZM.js} +38 -1
  205. package/dist/{dist-Bd7khQsg.js → dist-3HpYixwF.js} +2 -2
  206. package/dist/{dist-lL3nVbxV.js → dist-BC-ZEYLd.js} +2 -2
  207. package/dist/dist-BPFcLKTw.js +5 -0
  208. package/dist/{dist-C-VFTX82.js → dist-CUWI-IvA.js} +2 -2
  209. package/dist/{dist-Bc30883t.js → dist-Cr7RPxI9.js} +5 -5
  210. package/dist/{dist-DapsJxn_.js → dist-CuLwJF7H.js} +2 -2
  211. package/dist/{dist-5KNKxglR.js → dist-CyBwSiAa.js} +2 -2
  212. package/dist/dist-D7Yj7E-F.js +5 -0
  213. package/dist/{dist-B_vYjCsk.js → dist-DAAJogrx.js} +3 -3
  214. package/dist/{dist-CMcFD7gP.js → dist-DBxgrOeo.js} +1906 -1746
  215. package/dist/{dist-DHensKDY.js → dist-DPcf6XZ8.js} +2 -2
  216. package/dist/{dist-5DAb7bYT.js → dist-DVNjPKsH.js} +2 -2
  217. package/dist/{dist-C3eH9-N2.js → dist-DXyGqIDE.js} +2 -2
  218. package/dist/{dist-1H4cnaoD.js → dist-DuufrR8O.js} +4 -4
  219. package/dist/{cdn/chunks/src-Bh0MoJ67.js → dist-tsmnQugO.js} +207 -174
  220. package/dist/{editor-modal-oRmkDlUs.js → editor-modal-AlVLkU91.js} +20 -20
  221. package/dist/en-B0FUfNwz.js +1 -0
  222. package/dist/{en-BTiiAC-B.js → en-C8Mp71sO.js} +38 -1
  223. package/dist/{es-CdTOcSTf.js → es-Byq4tthI.js} +38 -1
  224. package/dist/{extensions-CYigjb1g.js → extensions-pjO8VGkM.js} +9 -9
  225. package/dist/{eye-DvsTBI57.js → eye-Ddnz8nnm.js} +1 -1
  226. package/dist/{fr-B6lcLLzC.js → fr-B3j35HEw.js} +38 -1
  227. package/dist/{image-up-BoFGZm5Q.js → image-up-CM_HC0Dx.js} +1 -1
  228. package/dist/index.d.ts +124 -11
  229. package/dist/{info-0bQQGjTV.js → info-DXLmzoeY.js} +1 -1
  230. package/dist/{cdn/chunks/ja-BhdkqENz.js → ja-D7txAuGS.js} +38 -3
  231. package/dist/{keys-injl74ob.js → keys-BKFq19a2.js} +1 -1
  232. package/dist/{link-Cstrr3Ep.js → link-Cel46wgo.js} +1 -1
  233. package/dist/{list-Dx9Rmy5s.js → list-Cl0GwiV9.js} +1 -1
  234. package/dist/{loader-circle-D8Qqs0MG.js → loader-circle-uAwpvfys.js} +1 -1
  235. package/dist/{message-circle-D78ELX6I.js → message-circle-DWU1pTM_.js} +1 -1
  236. package/dist/{cdn/chunks/nl-CE3YItYg.js → nl-ClJ3BY3F.js} +38 -3
  237. package/dist/{package-DOvM9sHE.js → package-CbyG_yU_.js} +1 -1
  238. package/dist/{pencil-B6m0OG0n.js → pencil-BzoDcwKu.js} +1 -1
  239. package/dist/{plus-D-nEKxTc.js → plus-8cDvoCjZ.js} +1 -1
  240. package/dist/{preRenderCustomBlocks-DokBGA_M.js → preRenderCustomBlocks-DMP5RuHl.js} +6 -4
  241. package/dist/{cdn/chunks/pt-BR-CUIT4rq4.js → pt-BR-DibcXcmv.js} +38 -3
  242. package/dist/{refresh-cw-CXZS-R1U.js → refresh-cw-9WinWixo.js} +1 -1
  243. package/dist/{runtime-dom.esm-bundler-CO67ema2.js → runtime-dom.esm-bundler-lFF-QG3j.js} +3 -3
  244. package/dist/{search-DSvil0jo.js → search-CqgGq1gG.js} +1 -1
  245. package/dist/{send-BBR28V94.js → send-Ceo3c9Db.js} +1 -1
  246. package/dist/{shield-check-ByxUnaU9.js → shield-check-uDAwur5D.js} +1 -1
  247. package/dist/{smartphone-CNOwGf5T.js → smartphone-CcLaCpGK.js} +1 -1
  248. package/dist/socialIcons-PTiwhLoC.js +1359 -0
  249. package/dist/{sparkles-DO1hzwzf.js → sparkles-Do9XjAuT.js} +1 -1
  250. package/dist/style.css +1 -1
  251. package/dist/{cdn/chunks/styleConstants-C_YAPdQS.js → styleConstants-D1Jz-TFU.js} +7 -30
  252. package/dist/templatical-editor.js +519 -509
  253. package/dist/{text-align-start-BKEKMheq.js → text-align-start-DvzC0HQA.js} +1 -1
  254. package/dist/timeouts-Cv2jvusx.js +4 -0
  255. package/dist/{trash-CKEQH4vH.js → trash-vlINTx32.js} +1 -1
  256. package/dist/{triangle-alert-BHnfd3fV.js → triangle-alert-MRYSJ9T2.js} +1 -1
  257. package/dist/{upload-C8uO7KsR.js → upload-CtNOI6J2.js} +1 -1
  258. package/dist/{useAliveFlag-6PtarpNZ.js → useAliveFlag-Dd06mRxe.js} +1 -1
  259. package/dist/{useCloudI18n-GvIOLziA.js → useCloudI18n-Nwqo7pI_.js} +2 -2
  260. package/dist/{useEditorCore-BJAQMvNW.js → useEditorCore-PvErWWsp.js} +1002 -991
  261. package/dist/{useEditorRoot-OWzNpDdT.js → useEditorRoot-BD3piYtD.js} +2 -2
  262. package/dist/{useI18n-uF11q85g.js → useI18n-CxVEpurs.js} +2 -2
  263. package/dist/{useLogicTag-B5gjcMzn.js → useLogicTag-BHn67tDd.js} +3 -3
  264. package/dist/{useMergeTag-BwsBIDzR.js → useMergeTag-CRkm5Ig6.js} +5 -5
  265. package/dist/{usePopoverPosition-DkBrHfCo.js → usePopoverPosition-CwnH1o5g.js} +2 -2
  266. package/dist/{useScrollToBlock-JRxhT1u_.js → useScrollToBlock-CXmcHQQN.js} +3 -3
  267. package/dist/{vue.runtime.esm-bundler-CctRY8kr.js → vue.runtime.esm-bundler-CAzmrXdD.js} +1215 -1155
  268. package/dist/{withCurrentFont-C9vqrduu.js → withCurrentFont-CxRGeHO3.js} +1 -1
  269. package/dist/{x-gEC0yMci.js → x-Cd6SFw8r.js} +1 -1
  270. package/package.json +23 -23
  271. package/dist/BlockPreviewCanvas-DIZ0KgUD.js +0 -133
  272. package/dist/CountdownBlock-RNx3hIu0.js +0 -91
  273. package/dist/Toolbar-CqhRb6EM.js +0 -2732
  274. package/dist/WrapperBlock-CTkmA887.js +0 -34
  275. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js +0 -135
  276. package/dist/cdn/chunks/BlockPreviewCanvas-Djz9YAFx.js.map +0 -1
  277. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js +0 -93
  278. package/dist/cdn/chunks/CountdownBlock-lHU3Lu7Q.js.map +0 -1
  279. package/dist/cdn/chunks/ParagraphEditor-DndEFXmR.js.map +0 -1
  280. package/dist/cdn/chunks/TemplateSettings-rZiHmq24.js.map +0 -1
  281. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js +0 -2646
  282. package/dist/cdn/chunks/Toolbar-C_5HfUQq.js.map +0 -1
  283. package/dist/cdn/chunks/TplModal-CYBbPCHL.js.map +0 -1
  284. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js +0 -36
  285. package/dist/cdn/chunks/WrapperBlock-CJ0CLqi2.js.map +0 -1
  286. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js +0 -21
  287. package/dist/cdn/chunks/blockTypeIcons-DdZP-3FM.js.map +0 -1
  288. package/dist/cdn/chunks/ca-C__Dzq--.js.map +0 -1
  289. package/dist/cdn/chunks/createCloudRuntime-bJN9EM1H.js.map +0 -1
  290. package/dist/cdn/chunks/de-CGjbQ2mt.js.map +0 -1
  291. package/dist/cdn/chunks/draggable-BUTN5vZC.js.map +0 -1
  292. package/dist/cdn/chunks/en-BTiiAC-B.js.map +0 -1
  293. package/dist/cdn/chunks/en-CAt6y87e.js +0 -1
  294. package/dist/cdn/chunks/es-CdTOcSTf.js.map +0 -1
  295. package/dist/cdn/chunks/fr-B6lcLLzC.js.map +0 -1
  296. package/dist/cdn/chunks/icons-Dr9erFGs.js.map +0 -1
  297. package/dist/cdn/chunks/ja-BhdkqENz.js.map +0 -1
  298. package/dist/cdn/chunks/nl-CE3YItYg.js.map +0 -1
  299. package/dist/cdn/chunks/preRenderCustomBlocks-CyGB3lZr.js.map +0 -1
  300. package/dist/cdn/chunks/pt-BR-CUIT4rq4.js.map +0 -1
  301. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js +0 -1031
  302. package/dist/cdn/chunks/socialIcons-ClJVDZwt.js.map +0 -1
  303. package/dist/cdn/chunks/src-B0pZeTYO.js.map +0 -1
  304. package/dist/cdn/chunks/src-BMw3u-iV.js +0 -614
  305. package/dist/cdn/chunks/src-BMw3u-iV.js.map +0 -1
  306. package/dist/cdn/chunks/src-Bh0MoJ67.js.map +0 -1
  307. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +0 -6
  308. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
  309. package/dist/cdn/chunks/tiptap-CYDXLO17.js.map +0 -1
  310. package/dist/cdn/chunks/useEditorCore-DuC7kVti.js.map +0 -1
  311. package/dist/cdn/chunks/useEditorRoot-DDPIcEOO.js +0 -10
  312. package/dist/cdn/chunks/withCurrentFont-isIyuezD.js +0 -21
  313. package/dist/dist-CFC4pg2o.js +0 -5
  314. package/dist/dist-j2FavQmU.js +0 -5
  315. package/dist/en-Bk4iCfjp.js +0 -1
  316. package/dist/socialIcons-Ct_IoqPQ.js +0 -1107
  317. package/dist/timeouts-DHPZQ0G3.js +0 -4
@@ -1,2732 +0,0 @@
1
- import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { A as t, At as n, B as r, F as i, M as a, N as o, R as s, S as c, V as l, Y as u, Z as d, _ as f, at as p, c as m, d as h, g, h as _, jt as v, kt as y, l as b, r as x, s as S, u as C, v as w } from "./vue.runtime.esm-bundler-CctRY8kr.js";
3
- import { a as T, o as E } from "./runtime-dom.esm-bundler-CO67ema2.js";
4
- import { I as D, U as O, X as k, dt as A, h as j, l as ee, n as M, s as te, t as N, ut as ne } from "./dist-BI_LeQGl.js";
5
- import { c as re, f as ie, i as ae, l as P, r as oe, u as se, x as ce } from "./socialIcons-Ct_IoqPQ.js";
6
- import { _ as le } from "./dist-C-VFTX82.js";
7
- import { $ as F, C as ue, G as de, L as fe, P as pe, c as me, d as he, h as ge, n as _e, p as ve, v as ye } from "./keys-injl74ob.js";
8
- import { t as I } from "./useI18n-uF11q85g.js";
9
- import { o as be } from "./usePopoverPosition-DkBrHfCo.js";
10
- import { t as xe } from "./createLucideIcon-BAPyioGd.js";
11
- import { c as L } from "./LogicTagInsertButton-CHa-UD76.js";
12
- import { t as Se } from "./chevron-down-RrwkYMlp.js";
13
- import { t as Ce } from "./circle-alert-BR1_Yfb-.js";
14
- import { n as R, t as we } from "./blockTypeIcons-CVKo6V_v.js";
15
- import { t as Te } from "./copy-D6DNoSq1.js";
16
- import { t as Ee } from "./info-0bQQGjTV.js";
17
- import { t as De } from "./link-Cstrr3Ep.js";
18
- import { t as Oe } from "./loader-circle-D8Qqs0MG.js";
19
- import { n as ke, t as Ae } from "./smartphone-CNOwGf5T.js";
20
- import { t as z } from "./plus-D-nEKxTc.js";
21
- import { t as je } from "./refresh-cw-CXZS-R1U.js";
22
- import { n as B, r as V, t as H } from "./text-align-start-BKEKMheq.js";
23
- import { t as Me } from "./trash-CKEQH4vH.js";
24
- import { t as Ne } from "./upload-C8uO7KsR.js";
25
- import { t as Pe } from "./x-gEC0yMci.js";
26
- import { t as Fe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
27
- import { t as Ie } from "./useAliveFlag-6PtarpNZ.js";
28
- import { _ as Le, b as Re, c as ze, g as U, h as W, m as G, p as K, r as Be, v as Ve } from "./styleConstants-C_YAPdQS.js";
29
- import { n as He, t as q } from "./ToggleSwitch-COeyWGfT.js";
30
- import { n as Ue, t as We } from "./withCurrentFont-C9vqrduu.js";
31
- import { t as J } from "./MergeTagInput-B3ntd4dN.js";
32
- var Ge = xe({
33
- name: "lock-open",
34
- size: 24,
35
- node: [["rect", {
36
- width: "18",
37
- height: "11",
38
- x: "3",
39
- y: "11",
40
- rx: "2",
41
- ry: "2",
42
- key: "1w4ew1"
43
- }], ["path", {
44
- d: "M7 11V7a5 5 0 0 1 9.9-1",
45
- key: "1mm8w8"
46
- }]],
47
- aliases: ["unlock"]
48
- }), Ke = xe({
49
- name: "lock",
50
- size: 24,
51
- node: [["rect", {
52
- width: "18",
53
- height: "11",
54
- x: "3",
55
- y: "11",
56
- rx: "2",
57
- ry: "2",
58
- key: "1w4ew1"
59
- }], ["path", {
60
- d: "M7 11V7a5 5 0 0 1 10 0v4",
61
- key: "fwvmzm"
62
- }]]
63
- }), qe = xe({
64
- name: "unlink",
65
- size: 24,
66
- node: [
67
- ["path", {
68
- d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",
69
- key: "yqzxt4"
70
- }],
71
- ["path", {
72
- d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",
73
- key: "4qinb0"
74
- }],
75
- ["line", {
76
- x1: "8",
77
- x2: "8",
78
- y1: "2",
79
- y2: "5",
80
- key: "1041cp"
81
- }],
82
- ["line", {
83
- x1: "2",
84
- x2: "5",
85
- y1: "8",
86
- y2: "8",
87
- key: "14m1p5"
88
- }],
89
- ["line", {
90
- x1: "16",
91
- x2: "16",
92
- y1: "19",
93
- y2: "22",
94
- key: "rzdirn"
95
- }],
96
- ["line", {
97
- x1: "19",
98
- x2: "22",
99
- y1: "16",
100
- y2: "16",
101
- key: "ox905f"
102
- }]
103
- ]
104
- }), Je = [
105
- "aria-checked",
106
- "aria-label",
107
- "title",
108
- "onClick"
109
- ], Ye = { key: 1 }, Y = /* @__PURE__ */ w({
110
- __name: "SlidingPillSelect",
111
- props: {
112
- options: {},
113
- modelValue: {}
114
- },
115
- emits: ["update:modelValue"],
116
- setup(e, { emit: r }) {
117
- let o = e, s = r, c = S(() => o.options.findIndex((e) => e.value === o.modelValue)), l = S(() => `translateX(${Math.max(c.value, 0) * 100}%)`);
118
- return (r, o) => (t(), h("div", {
119
- role: "radiogroup",
120
- class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
121
- style: n({
122
- gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
123
- backgroundColor: "var(--tpl-bg-hover)"
124
- })
125
- }, [c.value >= 0 ? (t(), h("div", {
126
- key: 0,
127
- class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
128
- style: n({
129
- left: "4px",
130
- width: `calc((100% - 8px) / ${e.options.length})`,
131
- transform: l.value,
132
- backgroundColor: "var(--tpl-bg)",
133
- boxShadow: "var(--tpl-shadow)",
134
- transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
135
- })
136
- }, null, 4)) : C("", !0), (t(!0), h(x, null, a(e.options, (r) => (t(), h("button", {
137
- key: r.value,
138
- role: "radio",
139
- "aria-checked": e.modelValue === r.value,
140
- "aria-label": r.label,
141
- class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-2.5 tpl:py-[5px] tpl:text-xs tpl:font-medium",
142
- style: n({
143
- color: e.modelValue === r.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
144
- transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
145
- }),
146
- title: r.label,
147
- onClick: (e) => s("update:modelValue", r.value)
148
- }, [r.icon ? (t(), b(i(r.icon), {
149
- key: 0,
150
- size: 14,
151
- "stroke-width": 2
152
- })) : (t(), h("span", Ye, v(r.label), 1))], 12, Je))), 128))], 4));
153
- }
154
- }), Xe = { class: "tpl:flex tpl:items-stretch" }, Ze = [
155
- "data-testid",
156
- "value",
157
- "min",
158
- "max"
159
- ], X = /* @__PURE__ */ w({
160
- __name: "NumberWithSuffix",
161
- props: {
162
- modelValue: {},
163
- min: {},
164
- max: {},
165
- suffix: {},
166
- testid: {}
167
- },
168
- emits: ["update:modelValue"],
169
- setup(e, { emit: n }) {
170
- let r = n;
171
- function i(e) {
172
- let t = e.target;
173
- t.validity?.badInput || r("update:modelValue", Number(t.value));
174
- }
175
- return (n, r) => (t(), h("div", Xe, [m("input", {
176
- type: "number",
177
- "data-testid": e.testid,
178
- class: y(p(G)),
179
- value: e.modelValue,
180
- min: e.min,
181
- max: e.max,
182
- onInput: i
183
- }, null, 42, Ze), m("span", { class: y(p(W)) }, v(e.suffix), 3)]));
184
- }
185
- }), Qe = [
186
- "aria-pressed",
187
- "aria-label",
188
- "title",
189
- "data-testid"
190
- ], $e = /* @__PURE__ */ w({
191
- __name: "LinkToggle",
192
- props: {
193
- linked: { type: Boolean },
194
- linkLabel: {},
195
- unlinkLabel: {},
196
- testid: {}
197
- },
198
- emits: ["toggle"],
199
- setup(e, { emit: n }) {
200
- let r = n;
201
- return (n, i) => (t(), h("button", {
202
- type: "button",
203
- class: y(["tpl:flex tpl:h-7 tpl:w-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", e.linked ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
204
- "aria-pressed": e.linked ? "true" : "false",
205
- "aria-label": e.linked ? e.unlinkLabel : e.linkLabel,
206
- title: e.linked ? e.unlinkLabel : e.linkLabel,
207
- "data-testid": e.testid,
208
- onClick: i[0] ||= (e) => r("toggle")
209
- }, [e.linked ? (t(), b(p(De), {
210
- key: 0,
211
- size: 14,
212
- "stroke-width": 2
213
- })) : (t(), b(p(qe), {
214
- key: 1,
215
- size: 14,
216
- "stroke-width": 2
217
- }))], 10, Qe));
218
- }
219
- }), et = { class: "tpl:mb-3.5" }, tt = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, nt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, rt = {
220
- key: 0,
221
- class: "tpl:mb-3.5"
222
- }, it = { class: "tpl:mb-3.5" }, at = { class: "tpl:mb-3.5" }, ot = /* @__PURE__ */ w({
223
- __name: "BorderControl",
224
- props: {
225
- modelValue: {},
226
- testidPrefix: {}
227
- },
228
- emits: ["update:modelValue"],
229
- setup(e, { emit: n }) {
230
- let r = e, i = n, { t: a } = I(), o = {
231
- width: 0,
232
- style: "solid",
233
- color: "#000000"
234
- };
235
- function c(e, t) {
236
- return e.width === t.width && e.style === t.style && e.color === t.color;
237
- }
238
- let l = S(() => {
239
- let e = r.modelValue;
240
- return !e || M.every((t) => c(e[t], e.top));
241
- }), u = d(l.value);
242
- s(l, (e) => {
243
- !e && u.value && (u.value = !1);
244
- });
245
- let f = d("top"), _ = S(() => {
246
- let e = u.value ? "top" : f.value;
247
- return r.modelValue?.[e] ?? o;
248
- }), b = (e) => !!e && e.width > 0;
249
- function w(e) {
250
- if (u.value) {
251
- i("update:modelValue", b(e) ? A(e) : void 0);
252
- return;
253
- }
254
- let t = {
255
- ...r.modelValue ?? A(o),
256
- [f.value]: e
257
- }, n = M.some((e) => b(t[e]));
258
- i("update:modelValue", n ? t : void 0);
259
- }
260
- function T(e) {
261
- w({
262
- ..._.value,
263
- width: e > 0 ? e : 0
264
- });
265
- }
266
- function E(e) {
267
- w({
268
- ..._.value,
269
- ...e
270
- });
271
- }
272
- function D() {
273
- if (u.value) {
274
- u.value = !1;
275
- return;
276
- }
277
- u.value = !0;
278
- let e = r.modelValue;
279
- if (!e) return;
280
- let t = b(e[f.value]) ? e[f.value] : M.map((t) => e[t]).find(b);
281
- i("update:modelValue", t ? A(t) : void 0);
282
- }
283
- let O = S(() => M.map((e) => ({
284
- value: e,
285
- label: a.spacingControl[e]
286
- })));
287
- return (n, r) => (t(), h("div", et, [
288
- m("div", tt, [m("span", nt, v(p(a).blockSettings.border), 1), g($e, {
289
- linked: u.value,
290
- "link-label": p(a).blockSettings.linkSides,
291
- "unlink-label": p(a).blockSettings.unlinkSides,
292
- testid: `${e.testidPrefix}-border-link`,
293
- onToggle: D
294
- }, null, 8, [
295
- "linked",
296
- "link-label",
297
- "unlink-label",
298
- "testid"
299
- ])]),
300
- u.value ? C("", !0) : (t(), h("div", rt, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderSide), 3), g(Y, {
301
- options: O.value,
302
- "model-value": f.value,
303
- "onUpdate:modelValue": r[0] ||= (e) => f.value = e
304
- }, null, 8, ["options", "model-value"])])),
305
- m("div", it, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderWidth), 3), g(X, {
306
- "model-value": _.value.width,
307
- min: 0,
308
- suffix: "px",
309
- testid: `${e.testidPrefix}-border-width-input`,
310
- "onUpdate:modelValue": T
311
- }, null, 8, ["model-value", "testid"])]),
312
- _.value.width > 0 ? (t(), h(x, { key: 1 }, [m("div", at, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderStyle), 3), g(Y, {
313
- options: [
314
- {
315
- value: "solid",
316
- label: p(a).divider.solid
317
- },
318
- {
319
- value: "dashed",
320
- label: p(a).divider.dashed
321
- },
322
- {
323
- value: "dotted",
324
- label: p(a).divider.dotted
325
- }
326
- ],
327
- "model-value": _.value.style,
328
- "onUpdate:modelValue": r[1] ||= (e) => E({ style: e })
329
- }, null, 8, ["options", "model-value"])]), m("div", null, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderColor), 3), g(L, {
330
- "model-value": _.value.color,
331
- "onUpdate:modelValue": r[2] ||= (e) => E({ color: e })
332
- }, null, 8, ["model-value"])])], 64)) : C("", !0)
333
- ]));
334
- }
335
- }), st = { class: "tpl:mb-3.5" }, ct = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, lt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ut = {
336
- key: 1,
337
- class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
338
- }, dt = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ft = /* @__PURE__ */ w({
339
- __name: "RadiusControl",
340
- props: {
341
- modelValue: {},
342
- label: {},
343
- testidPrefix: {},
344
- max: {}
345
- },
346
- emits: ["update:modelValue"],
347
- setup(e, { emit: n }) {
348
- let r = e, i = n, { t: o } = I(), c = {
349
- topLeft: "cornerTopLeft",
350
- topRight: "cornerTopRight",
351
- bottomRight: "cornerBottomRight",
352
- bottomLeft: "cornerBottomLeft"
353
- }, l = [
354
- "topLeft",
355
- "topRight",
356
- "bottomLeft",
357
- "bottomRight"
358
- ], u = S(() => {
359
- let e = r.modelValue ?? 0;
360
- return typeof e == "number" ? {
361
- topLeft: e,
362
- topRight: e,
363
- bottomRight: e,
364
- bottomLeft: e
365
- } : e;
366
- }), f = S(() => N.every((e) => u.value[e] === u.value.topLeft)), _ = d(f.value);
367
- s(f, (e) => {
368
- !e && _.value && (_.value = !1);
369
- });
370
- function y(e) {
371
- return Number.isFinite(e) && e >= 0;
372
- }
373
- function C(e) {
374
- y(e) && i("update:modelValue", e);
375
- }
376
- function w(e, t) {
377
- y(t) && i("update:modelValue", {
378
- ...u.value,
379
- [e]: t
380
- });
381
- }
382
- function T() {
383
- _.value = !_.value, _.value && i("update:modelValue", u.value.topLeft);
384
- }
385
- return (n, r) => (t(), h("div", st, [m("div", ct, [m("span", lt, v(e.label), 1), g($e, {
386
- linked: _.value,
387
- "link-label": p(o).blockSettings.linkCorners,
388
- "unlink-label": p(o).blockSettings.unlinkCorners,
389
- testid: `${e.testidPrefix}-border-radius-link`,
390
- onToggle: T
391
- }, null, 8, [
392
- "linked",
393
- "link-label",
394
- "unlink-label",
395
- "testid"
396
- ])]), _.value ? (t(), b(X, {
397
- key: 0,
398
- "model-value": u.value.topLeft,
399
- min: 0,
400
- max: e.max,
401
- suffix: "px",
402
- testid: `${e.testidPrefix}-border-radius-input`,
403
- "onUpdate:modelValue": C
404
- }, null, 8, [
405
- "model-value",
406
- "max",
407
- "testid"
408
- ])) : (t(), h("div", ut, [(t(), h(x, null, a(l, (t) => m("div", { key: t }, [m("label", dt, v(p(o).blockSettings[c[t]]), 1), g(X, {
409
- "model-value": u.value[t],
410
- min: 0,
411
- max: e.max,
412
- suffix: "px",
413
- testid: `${e.testidPrefix}-border-radius-${t}-input`,
414
- "onUpdate:modelValue": (e) => w(t, e)
415
- }, null, 8, [
416
- "model-value",
417
- "max",
418
- "testid",
419
- "onUpdate:modelValue"
420
- ])])), 64))]))]));
421
- }
422
- }), pt = { class: "tpl:mb-3.5" }, mt = ["value"], ht = { value: "" }, gt = ["value"], _t = { class: "tpl:mb-3.5" }, vt = { class: "tpl:mb-3.5" }, yt = { class: "tpl:mb-3.5" }, bt = { class: "tpl:mb-3.5" }, xt = { class: "tpl:mb-3.5" }, St = { class: "tpl:flex tpl:items-stretch" }, Ct = ["value"], wt = { class: "tpl:mb-3.5" }, Tt = ["value"], Et = { value: "auto" }, Dt = { value: "full" }, Ot = { value: "custom" }, kt = {
423
- key: 0,
424
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
425
- }, At = ["value"], jt = { class: "tpl:mb-3.5" }, Mt = 200, Nt = /* @__PURE__ */ w({
426
- __name: "ButtonToolbar",
427
- props: {
428
- block: {},
429
- fontFamilies: {}
430
- },
431
- emits: ["update"],
432
- setup(e, { emit: n }) {
433
- let r = e, i = n, { t: o } = I(), s = S(() => r.block.width === "full" ? "full" : typeof r.block.width == "number" ? "custom" : "auto");
434
- function c(e, t) {
435
- i("update", { [e]: t });
436
- }
437
- function l(e) {
438
- e === "full" ? c("width", "full") : e === "custom" ? c("width", typeof r.block.width == "number" ? r.block.width : Mt) : c("width", void 0);
439
- }
440
- function u(e) {
441
- let t = Number(e);
442
- !Number.isFinite(t) || t <= 0 || c("width", t);
443
- }
444
- return (n, r) => (t(), h(x, null, [
445
- m("div", pt, [m("label", { class: y(p(U)) }, v(p(o).button.fontFamily), 3), m("select", {
446
- class: y(p(K)),
447
- value: p(We)(e.block.fontFamily),
448
- onChange: r[0] ||= (e) => c("fontFamily", e.target.value || void 0)
449
- }, [m("option", ht, v(p(o).button.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
450
- key: e.value,
451
- value: e.value
452
- }, v(e.label), 9, gt))), 128))], 42, mt)]),
453
- m("div", _t, [m("label", { class: y(p(U)) }, v(p(o).button.text), 3), g(J, {
454
- "model-value": e.block.text,
455
- type: "text",
456
- "onUpdate:modelValue": r[1] ||= (e) => c("text", e)
457
- }, null, 8, ["model-value"])]),
458
- m("div", vt, [
459
- m("label", { class: y(p(U)) }, v(p(o).button.url), 3),
460
- g(J, {
461
- "model-value": e.block.url,
462
- type: "url",
463
- placeholder: p(o).button.urlPlaceholder,
464
- "onUpdate:modelValue": r[2] ||= (e) => c("url", e)
465
- }, null, 8, ["model-value", "placeholder"]),
466
- e.block.url ? (t(), b(q, {
467
- key: 0,
468
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
469
- "model-value": e.block.openInNewTab ?? !1,
470
- label: p(o).button.openInNewTab,
471
- "onUpdate:modelValue": r[3] ||= (e) => c("openInNewTab", e)
472
- }, null, 8, ["model-value", "label"])) : C("", !0)
473
- ]),
474
- m("div", yt, [m("label", { class: y(p(U)) }, v(p(o).button.background), 3), g(L, {
475
- "model-value": e.block.backgroundColor,
476
- "allow-transparent": "",
477
- "onUpdate:modelValue": r[4] ||= (e) => c("backgroundColor", e)
478
- }, null, 8, ["model-value"])]),
479
- m("div", bt, [m("label", { class: y(p(U)) }, v(p(o).button.textColor), 3), g(L, {
480
- "model-value": e.block.textColor,
481
- "onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
482
- }, null, 8, ["model-value"])]),
483
- g(ot, {
484
- "model-value": e.block.border,
485
- "testid-prefix": "button",
486
- "onUpdate:modelValue": r[6] ||= (e) => c("border", e)
487
- }, null, 8, ["model-value"]),
488
- g(ft, {
489
- "model-value": e.block.borderRadius,
490
- label: p(o).button.borderRadius,
491
- max: 50,
492
- "testid-prefix": "button",
493
- "onUpdate:modelValue": r[7] ||= (e) => c("borderRadius", e)
494
- }, null, 8, ["model-value", "label"]),
495
- m("div", xt, [m("label", { class: y(p(U)) }, v(p(o).button.fontSize), 3), m("div", St, [m("input", {
496
- type: "number",
497
- class: y(p(G)),
498
- value: e.block.fontSize,
499
- min: "10",
500
- max: "36",
501
- onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
502
- }, null, 42, Ct), m("span", { class: y(p(W)) }, "px", 2)])]),
503
- m("div", wt, [
504
- m("label", { class: y(p(U)) }, v(p(o).button.width), 3),
505
- m("select", {
506
- class: y(p(K)),
507
- value: s.value,
508
- onChange: r[9] ||= (e) => l(e.target.value)
509
- }, [
510
- m("option", Et, v(p(o).button.widthAuto), 1),
511
- m("option", Dt, v(p(o).button.fullWidth), 1),
512
- m("option", Ot, v(p(o).button.widthCustom), 1)
513
- ], 42, Tt),
514
- s.value === "custom" ? (t(), h("div", kt, [m("input", {
515
- type: "number",
516
- class: y(p(G)),
517
- value: typeof e.block.width == "number" ? e.block.width : Mt,
518
- min: "20",
519
- onInput: r[10] ||= (e) => u(e.target.value)
520
- }, null, 42, At), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
521
- ]),
522
- m("div", jt, [m("label", { class: y(p(U)) }, v(p(o).title.align), 3), g(Y, {
523
- options: [
524
- {
525
- value: "left",
526
- label: p(o).title.alignLeft
527
- },
528
- {
529
- value: "center",
530
- label: p(o).title.alignCenter
531
- },
532
- {
533
- value: "right",
534
- label: p(o).title.alignRight
535
- }
536
- ],
537
- "model-value": e.block.align ?? "center",
538
- "onUpdate:modelValue": r[11] ||= (e) => c("align", e)
539
- }, null, 8, ["options", "model-value"])])
540
- ], 64));
541
- }
542
- }), Pt = { class: "spacing-control" }, Ft = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, It = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Lt = { class: "tpl:flex tpl:items-center" }, Rt = ["aria-label"], zt = ["value", "aria-label"], Bt = ["aria-label"], Vt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ht = { class: "tpl:flex tpl:items-center" }, Ut = ["aria-label"], Wt = ["value", "aria-label"], Gt = ["aria-label"], Kt = ["aria-label", "title"], qt = { class: "tpl:flex tpl:items-center" }, Jt = ["aria-label"], Yt = ["value", "aria-label"], Xt = ["aria-label"], Zt = { class: "tpl:flex tpl:items-center" }, Qt = ["aria-label"], $t = ["value", "aria-label"], en = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)] tpl:active:bg-[var(--tpl-bg-active)]", tn = "tpl:w-10 tpl:h-8 tpl:text-center tpl:text-xs tpl:font-medium tpl:border-y tpl:border-x-0 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)] tpl:outline-none tpl:transition-all tpl:duration-[120ms] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", nn = /*#__PURE__*/ Fe(/* @__PURE__ */ w({
543
- __name: "SpacingControl",
544
- props: {
545
- modelValue: {},
546
- label: {}
547
- },
548
- emits: ["update:modelValue"],
549
- setup(e, { emit: n }) {
550
- let r = e, i = n, { t: a } = I(), o = S(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), c = d(o.value);
551
- s(o, (e) => {
552
- !e && c.value && (c.value = !1);
553
- });
554
- function l(e, t) {
555
- let n = r.modelValue[e], a = Math.max(0, n + t);
556
- c.value ? i("update:modelValue", {
557
- top: a,
558
- right: a,
559
- bottom: a,
560
- left: a
561
- }) : i("update:modelValue", {
562
- ...r.modelValue,
563
- [e]: a
564
- });
565
- }
566
- function u(e, t) {
567
- let n = Math.max(0, t);
568
- c.value ? i("update:modelValue", {
569
- top: n,
570
- right: n,
571
- bottom: n,
572
- left: n
573
- }) : i("update:modelValue", {
574
- ...r.modelValue,
575
- [e]: n
576
- });
577
- }
578
- function f() {
579
- if (c.value = !c.value, c.value) {
580
- let e = r.modelValue.top;
581
- i("update:modelValue", {
582
- top: e,
583
- right: e,
584
- bottom: e,
585
- left: e
586
- });
587
- }
588
- }
589
- return (n, r) => (t(), h("div", Pt, [m("label", Ft, v(e.label), 1), m("div", It, [
590
- m("div", Lt, [
591
- m("button", {
592
- "aria-label": p(a).spacingControl.decreaseTop,
593
- class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
594
- onClick: r[0] ||= (e) => l("top", -1)
595
- }, [g(p(R), {
596
- size: 12,
597
- "stroke-width": 2
598
- })], 10, Rt),
599
- m("input", {
600
- type: "number",
601
- class: y(tn),
602
- value: e.modelValue.top,
603
- "aria-label": p(a).spacingControl.top,
604
- min: "0",
605
- onInput: r[1] ||= (e) => u("top", Number(e.target.value))
606
- }, null, 40, zt),
607
- m("button", {
608
- "aria-label": p(a).spacingControl.increaseTop,
609
- class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
610
- onClick: r[2] ||= (e) => l("top", 1)
611
- }, [g(p(z), {
612
- size: 12,
613
- "stroke-width": 2
614
- })], 10, Bt)
615
- ]),
616
- m("div", Vt, [
617
- m("div", Ht, [
618
- m("button", {
619
- "aria-label": p(a).spacingControl.decreaseLeft,
620
- class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
621
- onClick: r[3] ||= (e) => l("left", -1)
622
- }, [g(p(R), {
623
- size: 12,
624
- "stroke-width": 2
625
- })], 10, Ut),
626
- m("input", {
627
- type: "number",
628
- class: y(tn),
629
- value: e.modelValue.left,
630
- "aria-label": p(a).spacingControl.left,
631
- min: "0",
632
- onInput: r[4] ||= (e) => u("left", Number(e.target.value))
633
- }, null, 40, Wt),
634
- m("button", {
635
- "aria-label": p(a).spacingControl.increaseLeft,
636
- class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
637
- onClick: r[5] ||= (e) => l("left", 1)
638
- }, [g(p(z), {
639
- size: 12,
640
- "stroke-width": 2
641
- })], 10, Gt)
642
- ]),
643
- m("button", {
644
- class: y(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", c.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
645
- "aria-label": c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
646
- title: c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
647
- onClick: f
648
- }, [c.value ? (t(), b(p(Ke), {
649
- key: 0,
650
- size: 14,
651
- "stroke-width": 2
652
- })) : (t(), b(p(Ge), {
653
- key: 1,
654
- size: 14,
655
- "stroke-width": 2
656
- }))], 10, Kt),
657
- m("div", qt, [
658
- m("button", {
659
- "aria-label": p(a).spacingControl.decreaseRight,
660
- class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
661
- onClick: r[6] ||= (e) => l("right", -1)
662
- }, [g(p(R), {
663
- size: 12,
664
- "stroke-width": 2
665
- })], 10, Jt),
666
- m("input", {
667
- type: "number",
668
- class: y(tn),
669
- value: e.modelValue.right,
670
- "aria-label": p(a).spacingControl.right,
671
- min: "0",
672
- onInput: r[7] ||= (e) => u("right", Number(e.target.value))
673
- }, null, 40, Yt),
674
- m("button", {
675
- "aria-label": p(a).spacingControl.increaseRight,
676
- class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
677
- onClick: r[8] ||= (e) => l("right", 1)
678
- }, [g(p(z), {
679
- size: 12,
680
- "stroke-width": 2
681
- })], 10, Xt)
682
- ])
683
- ]),
684
- m("div", Zt, [
685
- m("button", {
686
- "aria-label": p(a).spacingControl.decreaseBottom,
687
- class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
688
- onClick: r[9] ||= (e) => l("bottom", -1)
689
- }, [g(p(R), {
690
- size: 12,
691
- "stroke-width": 2
692
- })], 10, Qt),
693
- m("input", {
694
- type: "number",
695
- class: y(tn),
696
- value: e.modelValue.bottom,
697
- "aria-label": p(a).spacingControl.bottom,
698
- min: "0",
699
- onInput: r[10] ||= (e) => u("bottom", Number(e.target.value))
700
- }, null, 40, $t),
701
- m("button", {
702
- "aria-label": p(a).spacingControl.increaseBottom,
703
- class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
704
- onClick: r[11] ||= (e) => l("bottom", 1)
705
- }, [g(p(z), {
706
- size: 12,
707
- "stroke-width": 2
708
- })], 10, en)
709
- ])
710
- ])]));
711
- }
712
- }), [["__scopeId", "data-v-69591c1e"]]), rn = ["data-testid"], an = { class: "tpl:mt-3" }, on = /* @__PURE__ */ w({
713
- __name: "CollapsibleSection",
714
- props: {
715
- title: {},
716
- open: { type: Boolean },
717
- noBorder: { type: Boolean },
718
- headerTestId: {}
719
- },
720
- emits: ["toggle"],
721
- setup(e) {
722
- return (n, r) => (t(), h("div", { class: y(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [m("button", {
723
- type: "button",
724
- "data-testid": e.headerTestId,
725
- class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
726
- onClick: r[0] ||= (e) => n.$emit("toggle")
727
- }, [g(p(Se), {
728
- class: y(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
729
- size: 12,
730
- "stroke-width": 2
731
- }, null, 8, ["class"]), m("span", null, v(e.title), 1)], 8, rn), l(m("div", an, [o(n.$slots, "default")], 512), [[E, e.open]])], 2));
732
- }
733
- }), sn = { class: "tpl:space-y-2" }, cn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ln = { class: "tpl:space-y-2" }, un = ["value"], dn = { value: "" }, fn = ["label"], pn = ["value"], mn = ["value"], hn = {
734
- key: 0,
735
- value: "__custom__"
736
- }, gn = {
737
- key: 0,
738
- class: "tpl:space-y-2"
739
- }, _n = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, vn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, yn = { class: "tpl:flex tpl:justify-end" }, bn = ["disabled"], xn = {
740
- key: 0,
741
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
742
- }, Sn = { class: "tpl:space-y-1" }, Cn = { class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]" }, wn = {
743
- key: 0,
744
- class: "tpl:m-0 tpl:overflow-x-auto tpl:rounded tpl:bg-[var(--tpl-bg)] tpl:p-2 tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
745
- }, Tn = /* @__PURE__ */ w({
746
- __name: "CommonBlockSettings",
747
- props: {
748
- block: {},
749
- isFirstSection: { type: Boolean }
750
- },
751
- emits: ["update"],
752
- setup(e, { emit: n }) {
753
- let o = e, f = n, { t: w } = I(), E = c(ge, []), D = c(_e, !1), O = u(/* @__PURE__ */ new Set()), k = d(!1), A = d(""), j = d(""), ee = [{
754
- key: "desktop",
755
- icon: ke,
756
- labelKey: "showOnDesktop"
757
- }, {
758
- key: "mobile",
759
- icon: Ae,
760
- labelKey: "showOnMobile"
761
- }];
762
- function M(e) {
763
- O.has(e) ? O.delete(e) : O.add(e);
764
- }
765
- let te = S(() => E.length > 0 || D), N = S(() => o.block.displayCondition ? !E.some((e) => e.label === o.block.displayCondition?.label) : !1);
766
- function ne() {
767
- k.value = !0, N.value && o.block.displayCondition ? (A.value = o.block.displayCondition.before, j.value = o.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
768
- }
769
- function re() {
770
- A.value.trim() && (f("update", { displayCondition: {
771
- label: w.blockSettings.customCondition,
772
- before: A.value.trim(),
773
- after: j.value.trim()
774
- } }), k.value = !1, A.value = "", j.value = "");
775
- }
776
- s(() => o.block.displayCondition, (e) => {
777
- e ? N.value && (A.value = e.before, j.value = e.after ?? "") : (k.value = !1, A.value = "", j.value = "");
778
- }, { immediate: !0 });
779
- let ie = S(() => {
780
- let e = {};
781
- for (let t of E) {
782
- let n = t.group ?? "";
783
- e[n] || (e[n] = []), e[n].push(t);
784
- }
785
- return e;
786
- });
787
- function ae(e, t) {
788
- f("update", { styles: {
789
- ...o.block.styles,
790
- [e]: t
791
- } });
792
- }
793
- function P(e) {
794
- return o.block.visibility?.[e] !== !1;
795
- }
796
- function oe(e) {
797
- let t = {
798
- desktop: P("desktop"),
799
- mobile: P("mobile")
800
- };
801
- t[e] = !t[e], f("update", { visibility: t });
802
- }
803
- return (n, o) => (t(), h("div", { class: y(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
804
- g(on, {
805
- title: p(w).blockSettings.spacing,
806
- open: O.has("spacing"),
807
- "no-border": e.isFirstSection,
808
- onToggle: o[1] ||= (e) => M("spacing")
809
- }, {
810
- default: r(() => [g(nn, {
811
- label: p(w).blockSettings.padding,
812
- "model-value": e.block.styles.padding,
813
- "onUpdate:modelValue": o[0] ||= (e) => ae("padding", e)
814
- }, null, 8, ["label", "model-value"])]),
815
- _: 1
816
- }, 8, [
817
- "title",
818
- "open",
819
- "no-border"
820
- ]),
821
- g(on, {
822
- title: p(w).blockSettings.background,
823
- open: O.has("bg"),
824
- onToggle: o[3] ||= (e) => M("bg")
825
- }, {
826
- default: r(() => [m("label", { class: y(p(U)) }, v(p(w).blockSettings.color), 3), g(L, {
827
- "model-value": e.block.styles.backgroundColor ?? "",
828
- "allow-transparent": "",
829
- "onUpdate:modelValue": o[2] ||= (e) => ae("backgroundColor", e)
830
- }, null, 8, ["model-value"])]),
831
- _: 1
832
- }, 8, ["title", "open"]),
833
- g(on, {
834
- title: p(w).blockSettings.display,
835
- open: O.has("display"),
836
- onToggle: o[4] ||= (e) => M("display")
837
- }, {
838
- default: r(() => [m("div", sn, [(t(), h(x, null, a(ee, (e) => g(q, {
839
- key: e.key,
840
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
841
- "model-value": P(e.key),
842
- label: p(w).blockSettings[e.labelKey],
843
- "onUpdate:modelValue": (t) => oe(e.key)
844
- }, {
845
- default: r(() => [m("span", cn, [(t(), b(i(e.icon), {
846
- size: 14,
847
- "stroke-width": 1.5
848
- })), _(" " + v(p(w).blockSettings[e.labelKey]), 1)])]),
849
- _: 2
850
- }, 1032, [
851
- "model-value",
852
- "label",
853
- "onUpdate:modelValue"
854
- ])), 64))])]),
855
- _: 1
856
- }, 8, ["title", "open"]),
857
- te.value ? (t(), b(on, {
858
- key: 0,
859
- "header-test-id": "display-condition-section",
860
- title: p(w).blockSettings.displayCondition,
861
- open: O.has("condition"),
862
- onToggle: o[8] ||= (e) => M("condition")
863
- }, {
864
- default: r(() => [m("div", ln, [m("select", {
865
- "data-testid": "display-condition-select",
866
- class: y(["tpl:w-full tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:outline-none tpl:transition-all tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[0_0_0_3px_var(--tpl-primary-light)]", e.block.displayCondition ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-text)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"]),
867
- value: k.value || N.value ? "__custom__" : e.block.displayCondition?.label ?? "",
868
- onChange: o[5] ||= (e) => {
869
- let t = e.target.value;
870
- if (t === "__custom__") {
871
- ne();
872
- return;
873
- }
874
- if (k.value = !1, !t) {
875
- f("update", { displayCondition: void 0 });
876
- return;
877
- }
878
- let n = p(E).find((e) => e.label === t);
879
- n && f("update", { displayCondition: n });
880
- }
881
- }, [
882
- m("option", dn, v(p(w).blockSettings.noCondition), 1),
883
- (t(!0), h(x, null, a(ie.value, (e, n) => (t(), h(x, { key: n }, [n ? (t(), h("optgroup", {
884
- key: 0,
885
- label: String(n)
886
- }, [(t(!0), h(x, null, a(e, (e) => (t(), h("option", {
887
- key: e.label,
888
- value: e.label
889
- }, v(e.label), 9, pn))), 128))], 8, fn)) : (t(!0), h(x, { key: 1 }, a(e, (e) => (t(), h("option", {
890
- key: e.label,
891
- value: e.label
892
- }, v(e.label), 9, mn))), 128))], 64))), 128)),
893
- p(D) ? (t(), h("option", hn, v(p(w).blockSettings.customCondition), 1)) : C("", !0)
894
- ], 42, un), k.value || N.value ? (t(), h("div", gn, [
895
- m("div", null, [m("label", _n, v(p(w).blockSettings.customConditionBefore), 1), l(m("textarea", {
896
- "onUpdate:modelValue": o[6] ||= (e) => A.value = e,
897
- rows: "2",
898
- class: y(p(Le))
899
- }, null, 2), [[T, A.value]])]),
900
- m("div", null, [m("label", vn, v(p(w).blockSettings.customConditionAfter), 1), l(m("textarea", {
901
- "onUpdate:modelValue": o[7] ||= (e) => j.value = e,
902
- rows: "2",
903
- class: y(p(Le))
904
- }, null, 2), [[T, j.value]])]),
905
- m("div", yn, [m("button", {
906
- type: "button",
907
- class: y(p(Ve)),
908
- disabled: !A.value.trim(),
909
- onClick: re
910
- }, v(p(w).blockSettings.applyCondition), 11, bn)])
911
- ])) : e.block.displayCondition && !N.value ? (t(), h(x, { key: 1 }, [e.block.displayCondition.description ? (t(), h("p", xn, v(e.block.displayCondition.description), 1)) : C("", !0), m("div", Sn, [m("pre", Cn, v(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (t(), h("pre", wn, v(e.block.displayCondition.after), 1)) : C("", !0)])], 64)) : C("", !0)])]),
912
- _: 1
913
- }, 8, ["title", "open"])) : C("", !0)
914
- ], 2));
915
- }
916
- }), En = ["title"], Dn = /* @__PURE__ */ w({
917
- __name: "BooleanField",
918
- props: {
919
- field: {},
920
- modelValue: { type: Boolean },
921
- readOnly: { type: Boolean }
922
- },
923
- emits: ["update:modelValue"],
924
- setup(e, { emit: n }) {
925
- let i = n, { t: a } = I();
926
- return (n, o) => (t(), h("div", {
927
- class: "tpl:mb-3.5",
928
- title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0
929
- }, [g(q, {
930
- class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
931
- "model-value": e.modelValue,
932
- label: e.field.label,
933
- required: e.field.required,
934
- disabled: e.readOnly,
935
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
936
- }, {
937
- default: r(() => [_(v(e.field.label) + " ", 1), e.readOnly ? (t(), b(p(Ke), {
938
- key: 0,
939
- size: 12,
940
- class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
941
- })) : C("", !0)]),
942
- _: 1
943
- }, 8, [
944
- "model-value",
945
- "label",
946
- "required",
947
- "disabled"
948
- ])], 8, En));
949
- }
950
- }), On = { class: "tpl:mb-3.5" }, kn = ["title"], An = { class: "tpl-sr-only" }, jn = ["title"], Mn = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ w({
951
- __name: "FieldWrapper",
952
- props: {
953
- label: {},
954
- required: { type: Boolean },
955
- readOnly: { type: Boolean }
956
- },
957
- setup(e) {
958
- let { t: n } = I();
959
- return (r, i) => (t(), h("div", On, [m("label", { class: y(p(U)) }, [
960
- _(v(e.label) + " ", 1),
961
- e.readOnly ? (t(), h("span", {
962
- key: 0,
963
- title: p(n).customBlocks.dataSource.readOnlyTooltip
964
- }, [g(p(Ke), {
965
- size: 12,
966
- class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
967
- "aria-hidden": "true"
968
- }), m("span", An, v(p(n).customBlocks.dataSource.readOnlyTooltip), 1)], 8, kn)) : C("", !0),
969
- e.required ? (t(), h("span", {
970
- key: 1,
971
- class: "tpl:text-[var(--tpl-danger)]",
972
- title: p(n).customBlocks.fields.required
973
- }, [i[0] ||= m("span", { "aria-hidden": "true" }, "*", -1), m("span", Mn, v(p(n).customBlocks.fields.required), 1)], 8, jn)) : C("", !0)
974
- ], 2), o(r.$slots, "default")]));
975
- }
976
- }), Nn = /* @__PURE__ */ w({
977
- __name: "ColorField",
978
- props: {
979
- field: {},
980
- modelValue: {},
981
- readOnly: { type: Boolean }
982
- },
983
- emits: ["update:modelValue"],
984
- setup(e, { emit: n }) {
985
- let i = e, a = n, { t: o } = I(), s = c(he, be), l = S(() => se(i.field, s));
986
- return (n, i) => (t(), b(Q, {
987
- label: e.field.label,
988
- required: e.field.required,
989
- "read-only": e.readOnly
990
- }, {
991
- default: r(() => [g(L, {
992
- "model-value": e.modelValue,
993
- placeholder: e.field.placeholder,
994
- disabled: e.readOnly,
995
- presets: l.value.presets,
996
- "allow-custom": l.value.allowCustom,
997
- title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
998
- "onUpdate:modelValue": i[0] ||= (e) => a("update:modelValue", e)
999
- }, null, 8, [
1000
- "model-value",
1001
- "placeholder",
1002
- "disabled",
1003
- "presets",
1004
- "allow-custom",
1005
- "title"
1006
- ])]),
1007
- _: 1
1008
- }, 8, [
1009
- "label",
1010
- "required",
1011
- "read-only"
1012
- ]));
1013
- }
1014
- }), Pn = {
1015
- key: 0,
1016
- class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1017
- style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
1018
- }, Fn = [
1019
- "value",
1020
- "placeholder",
1021
- "title"
1022
- ], In = ["value", "placeholder"], Ln = /* @__PURE__ */ w({
1023
- __name: "ImageField",
1024
- props: {
1025
- field: {},
1026
- modelValue: {},
1027
- readOnly: { type: Boolean }
1028
- },
1029
- emits: ["update:modelValue"],
1030
- setup(e, { emit: n }) {
1031
- let i = e, a = n, { t: o } = I(), s = c(fe, null), l = c(me, null), u = Ie(), f = S(() => !!s);
1032
- async function w() {
1033
- let e = await s?.({ accept: ["images"] });
1034
- u.alive && e && a("update:modelValue", e.url);
1035
- }
1036
- let T = d(), E = d(!1), D = S(() => (l?.value ?? !!s) && !E.value && !i.readOnly);
1037
- async function O(e) {
1038
- if (s) {
1039
- E.value = !0;
1040
- try {
1041
- let t = await s({
1042
- accept: ["images"],
1043
- files: e
1044
- });
1045
- if (!u.alive) return;
1046
- t && a("update:modelValue", t.url);
1047
- } finally {
1048
- u.alive && (E.value = !1);
1049
- }
1050
- }
1051
- }
1052
- let { isOver: k } = ae({
1053
- target: T,
1054
- enabled: D,
1055
- onFiles: O
1056
- });
1057
- return (n, i) => (t(), b(Q, {
1058
- label: e.field.label,
1059
- required: e.field.required,
1060
- "read-only": e.readOnly
1061
- }, {
1062
- default: r(() => [m("div", {
1063
- ref_key: "dropZoneRef",
1064
- ref: T,
1065
- class: "tpl:relative"
1066
- }, [
1067
- D.value && (p(k) || E.value) ? (t(), h("div", Pn, [E.value ? (t(), h(x, { key: 0 }, [g(p(Oe), {
1068
- class: "tpl-spinner",
1069
- size: 18,
1070
- "stroke-width": 2
1071
- }), _(" " + v(p(o).image.uploading), 1)], 64)) : (t(), h(x, { key: 1 }, [g(p(Ne), {
1072
- size: 18,
1073
- "stroke-width": 1.5
1074
- }), _(" " + v(p(o).image.dropToUpload), 1)], 64))])) : C("", !0),
1075
- e.readOnly ? (t(), h("input", {
1076
- key: 1,
1077
- type: "url",
1078
- class: y([p(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1079
- value: e.modelValue,
1080
- placeholder: e.field.placeholder || "https://...",
1081
- disabled: "",
1082
- title: p(o).customBlocks.dataSource.readOnlyTooltip
1083
- }, null, 10, Fn)) : (t(), h("input", {
1084
- key: 2,
1085
- type: "url",
1086
- class: y(p(K)),
1087
- value: e.modelValue,
1088
- placeholder: e.field.placeholder || "https://...",
1089
- onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
1090
- }, null, 42, In)),
1091
- f.value && !e.readOnly ? (t(), h("button", {
1092
- key: 3,
1093
- class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
1094
- onClick: i[1] ||= (e) => w()
1095
- }, [g(p(re), {
1096
- size: 14,
1097
- "stroke-width": 1.5
1098
- }), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
1099
- ], 512)]),
1100
- _: 1
1101
- }, 8, [
1102
- "label",
1103
- "required",
1104
- "read-only"
1105
- ]));
1106
- }
1107
- }), Rn = [
1108
- "value",
1109
- "placeholder",
1110
- "min",
1111
- "max",
1112
- "step",
1113
- "disabled",
1114
- "title"
1115
- ], zn = /* @__PURE__ */ w({
1116
- __name: "NumberField",
1117
- props: {
1118
- field: {},
1119
- modelValue: {},
1120
- readOnly: { type: Boolean }
1121
- },
1122
- emits: ["update:modelValue"],
1123
- setup(e, { emit: n }) {
1124
- let i = n, { t: a } = I();
1125
- return (n, o) => (t(), b(Q, {
1126
- label: e.field.label,
1127
- required: e.field.required,
1128
- "read-only": e.readOnly
1129
- }, {
1130
- default: r(() => [m("input", {
1131
- type: "number",
1132
- class: y([p(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1133
- value: e.modelValue,
1134
- placeholder: e.field.placeholder,
1135
- min: e.field.min,
1136
- max: e.field.max,
1137
- step: e.field.step,
1138
- disabled: e.readOnly,
1139
- title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0,
1140
- onInput: o[0] ||= (t) => !e.readOnly && i("update:modelValue", Number(t.target.value))
1141
- }, null, 42, Rn)]),
1142
- _: 1
1143
- }, 8, [
1144
- "label",
1145
- "required",
1146
- "read-only"
1147
- ]));
1148
- }
1149
- }), Bn = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Vn = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Hn = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Un = ["title", "onClick"], Wn = {
1150
- key: 1,
1151
- class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1152
- }, Gn = {
1153
- key: 2,
1154
- class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1155
- }, Kn = /* @__PURE__ */ w({
1156
- __name: "RepeatableField",
1157
- props: {
1158
- field: {},
1159
- modelValue: {},
1160
- readOnly: { type: Boolean }
1161
- },
1162
- emits: ["update:modelValue"],
1163
- setup(e, { emit: n }) {
1164
- let o = e, s = n, { t: c, format: l } = I(), u = S(() => o.modelValue || []), d = S(() => !o.field.maxItems || u.value.length < o.field.maxItems), f = S(() => !o.field.minItems || u.value.length > o.field.minItems);
1165
- function w() {
1166
- if (!d.value || o.readOnly) return;
1167
- let e = {};
1168
- for (let t of o.field.fields) e[t.key] = t.default ?? "";
1169
- s("update:modelValue", [...u.value, e]);
1170
- }
1171
- function T(e) {
1172
- if (!f.value || o.readOnly) return;
1173
- let t = [...u.value];
1174
- t.splice(e, 1), s("update:modelValue", t);
1175
- }
1176
- function E(e, t, n) {
1177
- let r = u.value.map((r, i) => i === e ? {
1178
- ...r,
1179
- [t]: n
1180
- } : r);
1181
- s("update:modelValue", r);
1182
- }
1183
- return (n, o) => (t(), b(Q, {
1184
- label: e.field.label,
1185
- required: e.field.required,
1186
- "read-only": e.readOnly
1187
- }, {
1188
- default: r(() => [m("div", Bn, [
1189
- (t(!0), h(x, null, a(u.value, (n, r) => (t(), h("div", {
1190
- key: `${e.field.key}-${r}`,
1191
- class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
1192
- }, [m("div", Vn, [m("span", Hn, " #" + v(r + 1), 1), f.value && !e.readOnly ? (t(), h("button", {
1193
- key: 0,
1194
- type: "button",
1195
- class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
1196
- title: p(c).customBlocks.fields.removeItem,
1197
- onClick: (e) => T(r)
1198
- }, [g(p(Me), {
1199
- size: 12,
1200
- "stroke-width": 2
1201
- })], 8, Un)) : C("", !0)]), (t(!0), h(x, null, a(e.field.fields, (a) => (t(), b(i(p(tr)(a.type)), {
1202
- key: a.key,
1203
- field: a,
1204
- "model-value": n[a.key],
1205
- "read-only": e.readOnly,
1206
- "onUpdate:modelValue": (e) => E(r, a.key, e)
1207
- }, null, 8, [
1208
- "field",
1209
- "model-value",
1210
- "read-only",
1211
- "onUpdate:modelValue"
1212
- ]))), 128))]))), 128)),
1213
- d.value && !e.readOnly ? (t(), h("button", {
1214
- key: 0,
1215
- type: "button",
1216
- class: y(p(ze)),
1217
- onClick: w
1218
- }, [g(p(z), {
1219
- size: 14,
1220
- "stroke-width": 2
1221
- }), _(" " + v(p(c).customBlocks.fields.addItem), 1)], 2)) : C("", !0),
1222
- !d.value && !e.readOnly ? (t(), h("p", Wn, v(p(c).customBlocks.fields.maxItemsReached), 1)) : C("", !0),
1223
- !f.value && !e.readOnly ? (t(), h("p", Gn, v(p(l)(p(c).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : C("", !0)
1224
- ])]),
1225
- _: 1
1226
- }, 8, [
1227
- "label",
1228
- "required",
1229
- "read-only"
1230
- ]));
1231
- }
1232
- }), qn = [
1233
- "value",
1234
- "disabled",
1235
- "title"
1236
- ], Jn = ["value"], Yn = /* @__PURE__ */ w({
1237
- __name: "SelectField",
1238
- props: {
1239
- field: {},
1240
- modelValue: {},
1241
- readOnly: { type: Boolean }
1242
- },
1243
- emits: ["update:modelValue"],
1244
- setup(e, { emit: n }) {
1245
- let i = n, { t: o } = I();
1246
- return (n, s) => (t(), b(Q, {
1247
- label: e.field.label,
1248
- required: e.field.required,
1249
- "read-only": e.readOnly
1250
- }, {
1251
- default: r(() => [m("select", {
1252
- class: y([p(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1253
- value: e.modelValue,
1254
- disabled: e.readOnly,
1255
- title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
1256
- onChange: s[0] ||= (t) => !e.readOnly && i("update:modelValue", t.target.value)
1257
- }, [(t(!0), h(x, null, a(e.field.options, (e) => (t(), h("option", {
1258
- key: e.value,
1259
- value: e.value
1260
- }, v(e.label), 9, Jn))), 128))], 42, qn)]),
1261
- _: 1
1262
- }, 8, [
1263
- "label",
1264
- "required",
1265
- "read-only"
1266
- ]));
1267
- }
1268
- }), Xn = [
1269
- "value",
1270
- "placeholder",
1271
- "title"
1272
- ], Zn = /* @__PURE__ */ w({
1273
- __name: "TextField",
1274
- props: {
1275
- field: {},
1276
- modelValue: {},
1277
- readOnly: { type: Boolean }
1278
- },
1279
- emits: ["update:modelValue"],
1280
- setup(e, { emit: n }) {
1281
- let i = n, { t: a } = I();
1282
- return (n, o) => (t(), b(Q, {
1283
- label: e.field.label,
1284
- required: e.field.required,
1285
- "read-only": e.readOnly
1286
- }, {
1287
- default: r(() => [e.readOnly ? (t(), h("input", {
1288
- key: 0,
1289
- type: "text",
1290
- class: y([p(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1291
- value: e.modelValue,
1292
- placeholder: e.field.placeholder,
1293
- disabled: "",
1294
- title: p(a).customBlocks.dataSource.readOnlyTooltip
1295
- }, null, 10, Xn)) : (t(), b(J, {
1296
- key: 1,
1297
- "model-value": e.modelValue,
1298
- placeholder: e.field.placeholder,
1299
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1300
- }, null, 8, ["model-value", "placeholder"]))]),
1301
- _: 1
1302
- }, 8, [
1303
- "label",
1304
- "required",
1305
- "read-only"
1306
- ]));
1307
- }
1308
- }), Qn = [
1309
- "value",
1310
- "placeholder",
1311
- "title"
1312
- ], $n = "tpl:w-full tpl:resize-y tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-2 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:opacity-60 tpl:cursor-not-allowed", er = {
1313
- text: Zn,
1314
- textarea: /* @__PURE__ */ w({
1315
- __name: "TextareaField",
1316
- props: {
1317
- field: {},
1318
- modelValue: {},
1319
- readOnly: { type: Boolean }
1320
- },
1321
- emits: ["update:modelValue"],
1322
- setup(e, { emit: n }) {
1323
- let i = n, { t: a } = I();
1324
- return (n, o) => (t(), b(Q, {
1325
- label: e.field.label,
1326
- required: e.field.required,
1327
- "read-only": e.readOnly
1328
- }, {
1329
- default: r(() => [e.readOnly ? (t(), h("textarea", {
1330
- key: 0,
1331
- value: e.modelValue,
1332
- placeholder: e.field.placeholder,
1333
- rows: "3",
1334
- disabled: "",
1335
- title: p(a).customBlocks.dataSource.readOnlyTooltip,
1336
- class: y($n)
1337
- }, null, 8, Qn)) : (t(), b(He, {
1338
- key: 1,
1339
- "model-value": e.modelValue,
1340
- placeholder: e.field.placeholder,
1341
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1342
- }, null, 8, ["model-value", "placeholder"]))]),
1343
- _: 1
1344
- }, 8, [
1345
- "label",
1346
- "required",
1347
- "read-only"
1348
- ]));
1349
- }
1350
- }),
1351
- image: Ln,
1352
- color: Nn,
1353
- number: zn,
1354
- select: Yn,
1355
- boolean: Dn,
1356
- repeatable: Kn
1357
- };
1358
- function tr(e) {
1359
- return er[e] ?? Zn;
1360
- }
1361
- //#endregion
1362
- //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1363
- var nr = {
1364
- key: 0,
1365
- class: "tpl:p-4"
1366
- }, rr = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ir = { key: 1 }, ar = {
1367
- key: 0,
1368
- class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1369
- }, or = {
1370
- key: 1,
1371
- class: "tpl:mb-4"
1372
- }, sr = {
1373
- key: 1,
1374
- class: "tpl:flex tpl:h-[32px] tpl:items-center"
1375
- }, cr = {
1376
- key: 0,
1377
- class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1378
- }, lr = {
1379
- key: 2,
1380
- class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1381
- }, ur = /* @__PURE__ */ w({
1382
- __name: "CustomBlockToolbar",
1383
- props: { block: {} },
1384
- emits: ["updateFieldValues", "updateDataSourceFetched"],
1385
- setup(e, { emit: n }) {
1386
- let r = e, o = n, { t: s } = I(), l = c(ve, []), u = S(() => l.find((e) => e.type === r.block.customType)), d = S(() => r.block), { isFetching: f, fetchError: y, fetch: w, hasDataSource: T, needsFetch: E } = ce({
1387
- definition: u,
1388
- block: d,
1389
- onUpdate: (e, t) => {
1390
- o("updateFieldValues", e), o("updateDataSourceFetched", t);
1391
- }
1392
- });
1393
- function D(e) {
1394
- return e.readOnly === !0 && T.value && !!r.block.dataSourceFetched;
1395
- }
1396
- function O(e, t) {
1397
- o("updateFieldValues", {
1398
- ...r.block.fieldValues,
1399
- [e]: t
1400
- });
1401
- }
1402
- return (n, r) => u.value ? (t(), h("div", ir, [
1403
- u.value.description ? (t(), h("p", ar, v(u.value.description), 1)) : C("", !0),
1404
- p(T) ? (t(), h("div", or, [p(E) && !p(f) ? (t(), h("button", {
1405
- key: 0,
1406
- type: "button",
1407
- class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-md tpl:px-3 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-on-primary)] tpl:transition-all tpl:bg-[var(--tpl-primary)]",
1408
- onClick: r[0] ||= (...e) => p(w) && p(w)(...e)
1409
- }, v(u.value?.dataSource?.label || p(s).customBlocks.dataSource.fetchButton), 1)) : (t(), h("div", sr, [p(f) ? (t(), h("div", cr, v(p(s).customBlocks.dataSource.fetching), 1)) : (t(), h("button", {
1410
- key: 1,
1411
- type: "button",
1412
- class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
1413
- onClick: r[1] ||= (...e) => p(w) && p(w)(...e)
1414
- }, [g(p(je), { size: 12 }), _(" " + v(p(s).customBlocks.dataSource.changeButton), 1)]))])), p(y) ? (t(), h("p", lr, [g(p(Ce), {
1415
- size: 14,
1416
- class: "tpl:shrink-0"
1417
- }), _(" " + v(p(s).customBlocks.dataSource.fetchError), 1)])) : C("", !0)])) : C("", !0),
1418
- (t(!0), h(x, null, a(u.value.fields, (n) => (t(), b(i(p(tr)(n.type)), {
1419
- key: n.key,
1420
- field: n,
1421
- "model-value": e.block.fieldValues[n.key],
1422
- "read-only": D(n),
1423
- "onUpdate:modelValue": (e) => O(n.key, e)
1424
- }, null, 8, [
1425
- "field",
1426
- "model-value",
1427
- "read-only",
1428
- "onUpdate:modelValue"
1429
- ]))), 128))
1430
- ])) : (t(), h("div", nr, [m("p", rr, v(p(s).customBlocks.toolbar.noDefinition), 1)]));
1431
- }
1432
- }), dr = { class: "tpl:mb-3.5" }, fr = { class: "tpl:mb-3.5" }, pr = { class: "tpl:mb-3.5" }, mr = { class: "tpl:flex tpl:items-stretch" }, hr = ["value"], gr = /* @__PURE__ */ w({
1433
- __name: "DividerToolbar",
1434
- props: { block: {} },
1435
- emits: ["update"],
1436
- setup(e, { emit: n }) {
1437
- let r = n, { t: i } = I();
1438
- function a(e, t) {
1439
- r("update", { [e]: t });
1440
- }
1441
- return (n, r) => (t(), h(x, null, [
1442
- m("div", dr, [m("label", { class: y(p(U)) }, v(p(i).divider.style), 3), g(Y, {
1443
- options: [
1444
- {
1445
- value: "solid",
1446
- label: p(i).divider.solid
1447
- },
1448
- {
1449
- value: "dashed",
1450
- label: p(i).divider.dashed
1451
- },
1452
- {
1453
- value: "dotted",
1454
- label: p(i).divider.dotted
1455
- }
1456
- ],
1457
- "model-value": e.block.lineStyle,
1458
- "onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
1459
- }, null, 8, ["options", "model-value"])]),
1460
- m("div", fr, [m("label", { class: y(p(U)) }, v(p(i).divider.color), 3), g(L, {
1461
- "model-value": e.block.color,
1462
- "onUpdate:modelValue": r[1] ||= (e) => a("color", e)
1463
- }, null, 8, ["model-value"])]),
1464
- m("div", pr, [m("label", { class: y(p(U)) }, v(p(i).divider.thickness), 3), m("div", mr, [m("input", {
1465
- type: "number",
1466
- class: y(p(G)),
1467
- value: e.block.thickness,
1468
- min: "1",
1469
- max: "10",
1470
- onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
1471
- }, null, 42, hr), m("span", { class: y(p(W)) }, "px", 2)])])
1472
- ], 64));
1473
- }
1474
- }), _r = { class: "tpl:mb-3.5" }, vr = ["value"], yr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, br = /* @__PURE__ */ w({
1475
- __name: "HtmlToolbar",
1476
- props: { block: {} },
1477
- emits: ["update"],
1478
- setup(e, { emit: n }) {
1479
- let r = n, { t: i } = I();
1480
- return (n, a) => (t(), h("div", _r, [
1481
- m("label", { class: y(p(U)) }, v(p(i).html.content), 3),
1482
- m("textarea", {
1483
- value: e.block.content,
1484
- placeholder: "<div>...</div>",
1485
- rows: "10",
1486
- class: y(p(Le)),
1487
- onInput: a[0] ||= (e) => r("update", { content: e.target.value })
1488
- }, null, 42, vr),
1489
- m("p", yr, [g(p(Ee), {
1490
- size: 12,
1491
- class: "tpl:mt-0.5 tpl:shrink-0"
1492
- }), _(" " + v(p(i).html.sanitizationHint), 1)])
1493
- ]));
1494
- }
1495
- }), xr = { class: "tpl:mb-3.5" }, Sr = {
1496
- key: 0,
1497
- class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
1498
- style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
1499
- }, Cr = {
1500
- key: 0,
1501
- class: "tpl:mb-3.5"
1502
- }, wr = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Tr = [
1503
- "value",
1504
- "placeholder",
1505
- "title"
1506
- ], Er = { class: "tpl:mb-3.5" }, Dr = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Or = { class: "tpl:mb-3.5" }, kr = ["value"], Ar = { value: "full" }, jr = { value: "custom" }, Mr = {
1507
- key: 0,
1508
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1509
- }, Nr = ["value"], Pr = { class: "tpl:mb-3.5" }, Fr = ["value"], Ir = { value: "auto" }, Lr = { value: "custom" }, Rr = {
1510
- key: 0,
1511
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1512
- }, zr = ["value"], Br = { class: "tpl:mb-3.5" }, Vr = { class: "tpl:mb-3.5" }, Hr = 350, Ur = 200, Wr = /* @__PURE__ */ w({
1513
- __name: "ImageToolbar",
1514
- props: { block: {} },
1515
- emits: ["update"],
1516
- setup(e, { emit: n }) {
1517
- let i = e, a = n, { t: o } = I(), s = c(fe, null), l = c(me, null), u = c(pe, ee.liquid), f = Ie(), w = S(() => !!s), T = d(!1), E = d(!1), { start: D } = le(() => {
1518
- T.value = !1;
1519
- }, 1e3, { immediate: !1 }), O = [
1520
- 300,
1521
- 400,
1522
- 500
1523
- ], k = S(() => {
1524
- let e = i.block.width;
1525
- return e === "full" ? "full" : O.includes(e) ? String(e) : "custom";
1526
- }), A = S(() => typeof i.block.height == "number" ? "custom" : "auto");
1527
- function M(e, t) {
1528
- a("update", { [e]: t });
1529
- }
1530
- function te(e) {
1531
- if (e === "custom") {
1532
- let e = i.block.width;
1533
- (typeof e != "number" || O.includes(e)) && M("width", Hr);
1534
- } else M("width", e === "full" ? "full" : Number(e));
1535
- }
1536
- function N(e) {
1537
- M("height", e === "custom" ? Ur : void 0);
1538
- }
1539
- function ie(e) {
1540
- let t = Number(e);
1541
- !Number.isFinite(t) || t <= 0 || M("height", t);
1542
- }
1543
- function P(e) {
1544
- M("borderRadius", ne(e) === null ? void 0 : e);
1545
- }
1546
- function oe(e) {
1547
- let t = Number(e);
1548
- !Number.isFinite(t) || t <= 0 || M("width", t);
1549
- }
1550
- async function se() {
1551
- let e = await s?.({ accept: ["images"] });
1552
- f.alive && e && (M("src", e.url), e.alt && (M("alt", e.alt), E.value = !0), T.value = !0, D());
1553
- }
1554
- let ce = d(), F = d(!1), ue = S(() => j(i.block.src, u)), de = S(() => (l?.value ?? !!s) && !F.value && !ue.value);
1555
- async function he(e) {
1556
- if (s) {
1557
- F.value = !0;
1558
- try {
1559
- let t = await s({
1560
- accept: ["images"],
1561
- files: e
1562
- });
1563
- if (!f.alive) return;
1564
- t && (M("src", t.url), t.alt && (M("alt", t.alt), E.value = !0), T.value = !0, D());
1565
- } finally {
1566
- f.alive && (F.value = !1);
1567
- }
1568
- }
1569
- }
1570
- let { isOver: ge } = ae({
1571
- target: ce,
1572
- enabled: de,
1573
- onFiles: he
1574
- });
1575
- return (n, i) => (t(), h(x, null, [
1576
- m("div", xr, [m("label", { class: y(p(U)) }, v(p(o).image.imageUrl), 3), m("div", {
1577
- ref_key: "dropZoneRef",
1578
- ref: ce,
1579
- class: "tpl:relative"
1580
- }, [
1581
- de.value && (p(ge) || F.value) ? (t(), h("div", Sr, [F.value ? (t(), h(x, { key: 0 }, [g(p(Oe), {
1582
- class: "tpl-spinner",
1583
- size: 18,
1584
- "stroke-width": 2
1585
- }), _(" " + v(p(o).image.uploading), 1)], 64)) : (t(), h(x, { key: 1 }, [g(p(Ne), {
1586
- size: 18,
1587
- "stroke-width": 1.5
1588
- }), _(" " + v(p(o).image.dropToUpload), 1)], 64))])) : C("", !0),
1589
- g(J, {
1590
- "model-value": e.block.src,
1591
- type: "url",
1592
- placeholder: p(o).image.imageUrlPlaceholder,
1593
- pulse: T.value,
1594
- "onUpdate:modelValue": i[0] ||= (e) => M("src", e)
1595
- }, null, 8, [
1596
- "model-value",
1597
- "placeholder",
1598
- "pulse"
1599
- ]),
1600
- w.value ? (t(), h("button", {
1601
- key: 1,
1602
- class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
1603
- style: {
1604
- "border-color": "var(--tpl-border)",
1605
- color: "var(--tpl-primary)",
1606
- "background-color": "var(--tpl-bg)"
1607
- },
1608
- onClick: se
1609
- }, [g(p(re), {
1610
- size: 14,
1611
- "stroke-width": 1.5
1612
- }), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
1613
- ], 512)]),
1614
- p(j)(e.block.src, p(u)) ? (t(), h("div", Cr, [m("label", { class: y(p(U)) }, [_(v(p(o).image.placeholderUrl) + " ", 1), m("span", wr, v(p(o).image.optional), 1)], 2), m("input", {
1615
- type: "url",
1616
- class: y(p(K)),
1617
- value: e.block.placeholderUrl || "",
1618
- placeholder: p(o).image.placeholderUrlPlaceholder,
1619
- title: p(o).image.placeholderUrlTooltip,
1620
- onInput: i[1] ||= (e) => M("placeholderUrl", e.target.value)
1621
- }, null, 42, Tr)])) : C("", !0),
1622
- m("div", Er, [
1623
- m("label", { class: y(p(U)) }, v(p(o).image.altText), 3),
1624
- g(J, {
1625
- "model-value": e.block.alt,
1626
- type: "text",
1627
- placeholder: p(o).image.altTextPlaceholder,
1628
- pulse: E.value,
1629
- disabled: e.block.decorative === !0,
1630
- "onUpdate:modelValue": i[2] ||= (e) => M("alt", e)
1631
- }, null, 8, [
1632
- "model-value",
1633
- "placeholder",
1634
- "pulse",
1635
- "disabled"
1636
- ]),
1637
- g(q, {
1638
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1639
- "model-value": e.block.decorative === !0,
1640
- label: p(o).image.decorative,
1641
- "onUpdate:modelValue": i[3] ||= (e) => M("decorative", e)
1642
- }, {
1643
- default: r(() => [m("span", null, [_(v(p(o).image.decorative) + " ", 1), m("span", Dr, v(p(o).image.decorativeHint), 1)])]),
1644
- _: 1
1645
- }, 8, ["model-value", "label"])
1646
- ]),
1647
- m("div", Or, [
1648
- m("label", { class: y(p(U)) }, v(p(o).image.width), 3),
1649
- m("select", {
1650
- class: y(p(K)),
1651
- value: k.value,
1652
- onChange: i[4] ||= (e) => te(e.target.value)
1653
- }, [
1654
- m("option", Ar, v(p(o).image.fullWidth), 1),
1655
- i[12] ||= m("option", { value: "300" }, "300px", -1),
1656
- i[13] ||= m("option", { value: "400" }, "400px", -1),
1657
- i[14] ||= m("option", { value: "500" }, "500px", -1),
1658
- m("option", jr, v(p(o).image.widthCustom), 1)
1659
- ], 42, kr),
1660
- k.value === "custom" ? (t(), h("div", Mr, [m("input", {
1661
- type: "number",
1662
- class: y(p(G)),
1663
- value: typeof e.block.width == "number" ? e.block.width : Hr,
1664
- min: "20",
1665
- onInput: i[5] ||= (e) => oe(e.target.value)
1666
- }, null, 42, Nr), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
1667
- ]),
1668
- m("div", Pr, [
1669
- m("label", { class: y(p(U)) }, v(p(o).image.height), 3),
1670
- m("select", {
1671
- class: y(p(K)),
1672
- "data-testid": "image-height-mode",
1673
- value: A.value,
1674
- onChange: i[6] ||= (e) => N(e.target.value)
1675
- }, [m("option", Ir, v(p(o).image.heightAuto), 1), m("option", Lr, v(p(o).image.heightCustom), 1)], 42, Fr),
1676
- A.value === "custom" ? (t(), h("div", Rr, [m("input", {
1677
- type: "number",
1678
- "data-testid": "image-height-input",
1679
- class: y(p(G)),
1680
- value: e.block.height,
1681
- min: "20",
1682
- onInput: i[7] ||= (e) => ie(e.target.value)
1683
- }, null, 42, zr), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
1684
- ]),
1685
- g(ft, {
1686
- "model-value": e.block.borderRadius,
1687
- label: p(o).image.borderRadius,
1688
- "testid-prefix": "image",
1689
- "onUpdate:modelValue": P
1690
- }, null, 8, ["model-value", "label"]),
1691
- g(ot, {
1692
- "model-value": e.block.border,
1693
- "testid-prefix": "image",
1694
- "onUpdate:modelValue": i[8] ||= (e) => M("border", e)
1695
- }, null, 8, ["model-value"]),
1696
- m("div", Br, [m("label", { class: y(p(U)) }, v(p(o).title.align), 3), g(Y, {
1697
- options: [
1698
- {
1699
- value: "left",
1700
- label: p(o).title.alignLeft
1701
- },
1702
- {
1703
- value: "center",
1704
- label: p(o).title.alignCenter
1705
- },
1706
- {
1707
- value: "right",
1708
- label: p(o).title.alignRight
1709
- }
1710
- ],
1711
- "model-value": e.block.align,
1712
- "onUpdate:modelValue": i[9] ||= (e) => M("align", e)
1713
- }, null, 8, ["options", "model-value"])]),
1714
- m("div", Vr, [
1715
- m("label", { class: y(p(U)) }, v(p(o).image.linkUrl), 3),
1716
- g(J, {
1717
- "model-value": e.block.linkUrl || "",
1718
- type: "url",
1719
- placeholder: p(o).image.imageUrlPlaceholder,
1720
- "onUpdate:modelValue": i[10] ||= (e) => M("linkUrl", e)
1721
- }, null, 8, ["model-value", "placeholder"]),
1722
- e.block.linkUrl ? (t(), b(q, {
1723
- key: 0,
1724
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1725
- "model-value": e.block.linkOpenInNewTab ?? !1,
1726
- label: p(o).image.openInNewTab,
1727
- "onUpdate:modelValue": i[11] ||= (e) => M("linkOpenInNewTab", e)
1728
- }, null, 8, ["model-value", "label"])) : C("", !0)
1729
- ])
1730
- ], 64));
1731
- }
1732
- }), Gr = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ w({
1733
- __name: "FieldRow",
1734
- props: { label: {} },
1735
- setup(e) {
1736
- return (n, r) => (t(), h("div", Gr, [e.label ? (t(), h("label", {
1737
- key: 0,
1738
- class: y(p(U))
1739
- }, v(e.label), 3)) : C("", !0), o(n.$slots, "default")]));
1740
- }
1741
- }), Kr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, qr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Jr = [
1742
- "value",
1743
- "placeholder",
1744
- "onInput"
1745
- ], Yr = ["title", "onClick"], Xr = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Zr = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Qr = ["value"], $r = { value: "" }, ei = ["value"], ti = ["value"], ni = /* @__PURE__ */ w({
1746
- __name: "MenuToolbar",
1747
- props: {
1748
- block: {},
1749
- fontFamilies: {}
1750
- },
1751
- emits: ["update"],
1752
- setup(e, { emit: n }) {
1753
- let i = e, o = n, { t: s } = I(), c = S(() => [
1754
- {
1755
- key: "openInNewTab",
1756
- label: s.menu.openInNewTab
1757
- },
1758
- {
1759
- key: "bold",
1760
- label: s.menu.bold
1761
- },
1762
- {
1763
- key: "underline",
1764
- label: s.menu.underline
1765
- }
1766
- ]), l = S(() => [
1767
- {
1768
- value: "left",
1769
- label: s.title.alignLeft,
1770
- icon: H
1771
- },
1772
- {
1773
- value: "center",
1774
- label: s.title.alignCenter,
1775
- icon: V
1776
- },
1777
- {
1778
- value: "right",
1779
- label: s.title.alignRight,
1780
- icon: B
1781
- }
1782
- ]);
1783
- function u(e, t) {
1784
- o("update", { [e]: t });
1785
- }
1786
- function d() {
1787
- let e = {
1788
- id: D(),
1789
- text: "",
1790
- url: "",
1791
- openInNewTab: !1,
1792
- bold: !1,
1793
- underline: !1
1794
- };
1795
- o("update", { items: [...i.block.items, e] });
1796
- }
1797
- function f(e, t, n) {
1798
- let r = i.block.items.map((r) => r.id === e ? {
1799
- ...r,
1800
- [t]: n
1801
- } : r);
1802
- o("update", { items: r });
1803
- }
1804
- function C(e) {
1805
- o("update", { items: i.block.items.filter((t) => t.id !== e) });
1806
- }
1807
- return (n, i) => (t(), h(x, null, [
1808
- g($, { label: p(s).menu.items }, {
1809
- default: r(() => [m("div", Kr, [(t(!0), h(x, null, a(e.block.items, (n) => (t(), h("div", {
1810
- key: n.id,
1811
- class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
1812
- }, [
1813
- m("div", qr, [m("input", {
1814
- type: "text",
1815
- class: y([p(K), "tpl:flex-1"]),
1816
- value: n.text,
1817
- placeholder: p(s).menu.text,
1818
- onInput: (e) => f(n.id, "text", e.target.value)
1819
- }, null, 42, Jr), m("button", {
1820
- class: y(p(Re)),
1821
- title: p(s).menu.removeItem,
1822
- onClick: (e) => C(n.id)
1823
- }, [g(p(Pe), {
1824
- size: 14,
1825
- "stroke-width": 2
1826
- })], 10, Yr)]),
1827
- g(J, {
1828
- "model-value": n.url,
1829
- type: "url",
1830
- placeholder: p(s).menu.urlPlaceholder,
1831
- "onUpdate:modelValue": (e) => f(n.id, "url", e)
1832
- }, null, 8, [
1833
- "model-value",
1834
- "placeholder",
1835
- "onUpdate:modelValue"
1836
- ]),
1837
- m("div", Xr, [(t(!0), h(x, null, a(c.value, (e) => (t(), b(q, {
1838
- key: e.key,
1839
- "model-value": n[e.key],
1840
- label: e.label,
1841
- "onUpdate:modelValue": (t) => f(n.id, e.key, t)
1842
- }, null, 8, [
1843
- "model-value",
1844
- "label",
1845
- "onUpdate:modelValue"
1846
- ]))), 128))]),
1847
- m("div", Zr, [m("label", { class: y([p(U), "tpl:!mb-0"]) }, v(p(s).menu.color), 3), g(L, {
1848
- "swatch-only": "",
1849
- "model-value": n.color || e.block.linkColor || e.block.color || "",
1850
- "onUpdate:modelValue": (e) => f(n.id, "color", e)
1851
- }, null, 8, ["model-value", "onUpdate:modelValue"])])
1852
- ]))), 128)), m("button", {
1853
- class: y(p(ze)),
1854
- onClick: d
1855
- }, [g(p(z), {
1856
- size: 14,
1857
- "stroke-width": 2
1858
- }), _(" " + v(p(s).menu.addItem), 1)], 2)])]),
1859
- _: 1
1860
- }, 8, ["label"]),
1861
- g($, { label: p(s).menu.fontFamily }, {
1862
- default: r(() => [m("select", {
1863
- class: y(p(K)),
1864
- value: p(We)(e.block.fontFamily),
1865
- onChange: i[0] ||= (e) => u("fontFamily", e.target.value || void 0)
1866
- }, [m("option", $r, v(p(s).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
1867
- key: e.value,
1868
- value: e.value
1869
- }, v(e.label), 9, ei))), 128))], 42, Qr)]),
1870
- _: 1
1871
- }, 8, ["label"]),
1872
- g($, { label: p(s).menu.fontSize }, {
1873
- default: r(() => [g(X, {
1874
- "model-value": e.block.fontSize,
1875
- min: 8,
1876
- max: 48,
1877
- suffix: "px",
1878
- "onUpdate:modelValue": i[1] ||= (e) => u("fontSize", e)
1879
- }, null, 8, ["model-value"])]),
1880
- _: 1
1881
- }, 8, ["label"]),
1882
- g($, { label: p(s).menu.color }, {
1883
- default: r(() => [g(L, {
1884
- "model-value": e.block.color ?? "",
1885
- "onUpdate:modelValue": i[2] ||= (e) => u("color", e || void 0)
1886
- }, null, 8, ["model-value"])]),
1887
- _: 1
1888
- }, 8, ["label"]),
1889
- g($, { label: p(s).menu.linkColor }, {
1890
- default: r(() => [g(L, {
1891
- "model-value": e.block.linkColor || e.block.color || "",
1892
- "onUpdate:modelValue": i[3] ||= (e) => u("linkColor", e || void 0)
1893
- }, null, 8, ["model-value"])]),
1894
- _: 1
1895
- }, 8, ["label"]),
1896
- g($, { label: p(s).menu.textAlign }, {
1897
- default: r(() => [g(Y, {
1898
- options: l.value,
1899
- "model-value": e.block.textAlign,
1900
- "onUpdate:modelValue": i[4] ||= (e) => u("textAlign", e)
1901
- }, null, 8, ["options", "model-value"])]),
1902
- _: 1
1903
- }, 8, ["label"]),
1904
- g($, { label: p(s).menu.separator }, {
1905
- default: r(() => [m("input", {
1906
- type: "text",
1907
- class: y(p(K)),
1908
- value: e.block.separator,
1909
- onInput: i[5] ||= (e) => u("separator", e.target.value)
1910
- }, null, 42, ti)]),
1911
- _: 1
1912
- }, 8, ["label"]),
1913
- g($, { label: p(s).menu.separatorColor }, {
1914
- default: r(() => [g(L, {
1915
- "model-value": e.block.separatorColor,
1916
- "onUpdate:modelValue": i[6] ||= (e) => u("separatorColor", e)
1917
- }, null, 8, ["model-value"])]),
1918
- _: 1
1919
- }, 8, ["label"]),
1920
- g($, { label: p(s).menu.spacing }, {
1921
- default: r(() => [g(X, {
1922
- "model-value": e.block.spacing,
1923
- min: 0,
1924
- max: 50,
1925
- suffix: "px",
1926
- "onUpdate:modelValue": i[7] ||= (e) => u("spacing", e)
1927
- }, null, 8, ["model-value"])]),
1928
- _: 1
1929
- }, 8, ["label"])
1930
- ], 64));
1931
- }
1932
- }), ri = {
1933
- class: "tpl:mb-3.5",
1934
- "data-testid": "paragraph-spacing"
1935
- }, ii = { class: "tpl:flex tpl:items-stretch" }, ai = ["value"], oi = /* @__PURE__ */ w({
1936
- __name: "ParagraphToolbar",
1937
- props: { block: {} },
1938
- emits: ["update"],
1939
- setup(e, { emit: n }) {
1940
- let r = n, { t: i } = I();
1941
- return (n, a) => (t(), h("div", ri, [m("label", { class: y(p(U)) }, v(p(i).paragraph.paragraphSpacing), 3), m("div", ii, [m("input", {
1942
- type: "number",
1943
- class: y(p(G)),
1944
- value: e.block.paragraphSpacing ?? p(te).paragraphGap,
1945
- min: "0",
1946
- max: "64",
1947
- onInput: a[0] ||= (e) => r("update", { paragraphSpacing: Number(e.target.value) })
1948
- }, null, 42, ai), m("span", { class: y(p(W)) }, "px", 2)])]));
1949
- }
1950
- });
1951
- //#endregion
1952
- //#region src/utils/rebalanceColumnChildren.ts
1953
- function si(e) {
1954
- return e === "1" ? 1 : e === "3" ? 3 : 2;
1955
- }
1956
- function ci(e, t) {
1957
- let n = si(t);
1958
- if (e.length === n) return e;
1959
- if (e.length < n) {
1960
- let t = Array.from({ length: n - e.length }, () => []);
1961
- return [...e, ...t];
1962
- }
1963
- let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
1964
- return [...r.slice(0, n - 1), a];
1965
- }
1966
- //#endregion
1967
- //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
1968
- var li = { class: "tpl:mb-3.5" }, ui = ["value"], di = ["value"], fi = {
1969
- key: 0,
1970
- class: "tpl:mb-3.5"
1971
- }, pi = {
1972
- key: 1,
1973
- class: "tpl:mb-3.5"
1974
- }, mi = {
1975
- key: 0,
1976
- class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1977
- }, hi = {
1978
- key: 1,
1979
- class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
1980
- }, gi = /* @__PURE__ */ w({
1981
- __name: "SectionToolbar",
1982
- props: { block: {} },
1983
- emits: ["update"],
1984
- setup(e, { emit: n }) {
1985
- let r = e, i = n, { t: o } = I(), s = c(ue, void 0), l = c(de, void 0), u = s !== void 0 && k(s), d = S(() => l !== !1 || !!r.block.wrapper), f = S(() => u && !r.block.wrapper), _ = S(() => u && d.value), b = S(() => [
1986
- {
1987
- value: "1",
1988
- label: o.section.column1
1989
- },
1990
- {
1991
- value: "2",
1992
- label: o.section.column2
1993
- },
1994
- {
1995
- value: "3",
1996
- label: o.section.column3
1997
- },
1998
- {
1999
- value: "1-2",
2000
- label: o.section.ratio12
2001
- },
2002
- {
2003
- value: "2-1",
2004
- label: o.section.ratio21
2005
- }
2006
- ]);
2007
- function w(e) {
2008
- let t = e.target.value, n = ci(r.block.children, t);
2009
- i("update", {
2010
- columns: t,
2011
- children: n
2012
- });
2013
- }
2014
- function T(e) {
2015
- i("update", { stackOnMobile: e });
2016
- }
2017
- function E(e) {
2018
- i("update", { borderRadius: e });
2019
- }
2020
- function D(e) {
2021
- i("update", { wrapper: e ? { padding: {
2022
- top: 20,
2023
- right: 20,
2024
- bottom: 20,
2025
- left: 20
2026
- } } : void 0 });
2027
- }
2028
- function O(e) {
2029
- i("update", { wrapper: {
2030
- ...r.block.wrapper,
2031
- ...e
2032
- } });
2033
- }
2034
- function A(e) {
2035
- O({ padding: e });
2036
- }
2037
- function j(e) {
2038
- O({ borderRadius: e });
2039
- }
2040
- return (n, r) => (t(), h(x, null, [
2041
- m("div", li, [m("label", { class: y(p(U)) }, v(p(o).section.columns), 3), m("select", {
2042
- class: y(p(K)),
2043
- value: e.block.columns,
2044
- onChange: w
2045
- }, [(t(!0), h(x, null, a(b.value, (e) => (t(), h("option", {
2046
- key: e.value,
2047
- value: e.value
2048
- }, v(e.label), 9, di))), 128))], 42, ui)]),
2049
- e.block.columns === "1" ? C("", !0) : (t(), h("div", fi, [g(q, {
2050
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2051
- "model-value": e.block.stackOnMobile !== !1,
2052
- label: p(o).section.stackOnMobile,
2053
- "onUpdate:modelValue": r[0] ||= (e) => T(e)
2054
- }, null, 8, ["model-value", "label"])])),
2055
- g(ft, {
2056
- "model-value": e.block.borderRadius,
2057
- label: p(o).section.borderRadius,
2058
- max: 50,
2059
- "testid-prefix": "section",
2060
- "onUpdate:modelValue": E
2061
- }, null, 8, ["model-value", "label"]),
2062
- g(ot, {
2063
- "model-value": e.block.border,
2064
- "testid-prefix": "section",
2065
- "onUpdate:modelValue": r[1] ||= (e) => i("update", { border: e })
2066
- }, null, 8, ["model-value"]),
2067
- d.value ? (t(), h("div", pi, [
2068
- g(q, {
2069
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2070
- "model-value": !!e.block.wrapper,
2071
- label: p(o).section.wrapperEnable,
2072
- disabled: f.value,
2073
- "onUpdate:modelValue": r[2] ||= (e) => D(e)
2074
- }, null, 8, [
2075
- "model-value",
2076
- "label",
2077
- "disabled"
2078
- ]),
2079
- _.value ? (t(), h("p", mi, v(p(o).section.wrapperLayoutConflict), 1)) : C("", !0),
2080
- e.block.wrapper ? (t(), h("div", hi, [
2081
- m("div", null, [m("label", { class: y(p(U)) }, v(p(o).blockSettings.color), 3), g(L, {
2082
- "model-value": e.block.wrapper.backgroundColor ?? "",
2083
- "allow-transparent": "",
2084
- "onUpdate:modelValue": r[3] ||= (e) => O({ backgroundColor: e })
2085
- }, null, 8, ["model-value"])]),
2086
- g(nn, {
2087
- label: p(o).blockSettings.padding,
2088
- "model-value": e.block.wrapper.padding ?? {
2089
- top: 0,
2090
- right: 0,
2091
- bottom: 0,
2092
- left: 0
2093
- },
2094
- "onUpdate:modelValue": A
2095
- }, null, 8, ["label", "model-value"]),
2096
- g(ft, {
2097
- "model-value": e.block.wrapper.borderRadius,
2098
- label: p(o).section.borderRadius,
2099
- max: 50,
2100
- "testid-prefix": "section-wrapper",
2101
- "onUpdate:modelValue": j
2102
- }, null, 8, ["model-value", "label"])
2103
- ])) : C("", !0)
2104
- ])) : C("", !0)
2105
- ], 64));
2106
- }
2107
- }), _i = { class: "tpl:mb-3.5" }, vi = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, yi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, bi = ["value", "onChange"], xi = ["value"], Si = ["title", "onClick"], Ci = { class: "tpl:mb-3.5" }, wi = ["value"], Ti = { value: "solid" }, Ei = { value: "outlined" }, Di = { value: "rounded" }, Oi = { value: "square" }, ki = { value: "circle" }, Ai = { value: "plain" }, ji = { class: "tpl:mb-3.5" }, Mi = ["value"], Ni = { value: "brand" }, Pi = { value: "dark" }, Fi = { value: "light" }, Ii = { class: "tpl:mb-3.5" }, Li = { class: "tpl:mb-3.5" }, Ri = { class: "tpl:flex tpl:items-stretch" }, zi = ["value"], Bi = { class: "tpl:mb-3.5" }, Vi = /* @__PURE__ */ w({
2108
- __name: "SocialToolbar",
2109
- props: { block: {} },
2110
- emits: ["update"],
2111
- setup(e, { emit: n }) {
2112
- let r = e, i = n, { t: o } = I();
2113
- function s(e, t) {
2114
- i("update", { [e]: t });
2115
- }
2116
- function c() {
2117
- let e = {
2118
- id: D(),
2119
- platform: "facebook",
2120
- url: ""
2121
- };
2122
- i("update", { icons: [...r.block.icons, e] });
2123
- }
2124
- function l(e, t, n) {
2125
- let a = r.block.icons.map((r) => r.id === e ? {
2126
- ...r,
2127
- [t]: n
2128
- } : r);
2129
- i("update", { icons: a });
2130
- }
2131
- function u(e) {
2132
- i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
2133
- }
2134
- return (n, r) => (t(), h(x, null, [
2135
- m("div", _i, [m("label", { class: y(p(U)) }, v(p(o).social.icons), 3), m("div", vi, [(t(!0), h(x, null, a(e.block.icons, (e) => (t(), h("div", {
2136
- key: e.id,
2137
- class: "tpl:flex tpl:flex-col tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-2"
2138
- }, [m("div", yi, [m("select", {
2139
- "data-testid": "social-platform-select",
2140
- class: y([p(K), "tpl:flex-1"]),
2141
- value: e.platform,
2142
- onChange: (t) => l(e.id, "platform", t.target.value)
2143
- }, [(t(!0), h(x, null, a(p(oe), (e) => (t(), h("option", {
2144
- key: e,
2145
- value: e
2146
- }, v(p(o).social.platforms[e]), 9, xi))), 128))], 42, bi), m("button", {
2147
- class: y(p(Re)),
2148
- title: p(o).social.removeIcon,
2149
- onClick: (t) => u(e.id)
2150
- }, [g(p(Pe), {
2151
- size: 14,
2152
- "stroke-width": 2
2153
- })], 10, Si)]), g(J, {
2154
- "model-value": e.url,
2155
- type: "url",
2156
- placeholder: p(o).social.urlPlaceholder,
2157
- "onUpdate:modelValue": (t) => l(e.id, "url", t)
2158
- }, null, 8, [
2159
- "model-value",
2160
- "placeholder",
2161
- "onUpdate:modelValue"
2162
- ])]))), 128)), m("button", {
2163
- class: y(p(ze)),
2164
- onClick: c
2165
- }, [g(p(z), {
2166
- size: 14,
2167
- "stroke-width": 2
2168
- }), _(" " + v(p(o).social.addIcon), 1)], 2)])]),
2169
- m("div", Ci, [m("label", { class: y(p(U)) }, v(p(o).social.style), 3), m("select", {
2170
- class: y(p(K)),
2171
- value: e.block.iconStyle,
2172
- onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
2173
- }, [
2174
- m("option", Ti, v(p(o).social.styleSolid), 1),
2175
- m("option", Ei, v(p(o).social.styleOutlined), 1),
2176
- m("option", Di, v(p(o).social.styleRounded), 1),
2177
- m("option", Oi, v(p(o).social.styleSquare), 1),
2178
- m("option", ki, v(p(o).social.styleCircle), 1),
2179
- m("option", Ai, v(p(o).social.stylePlain), 1)
2180
- ], 42, wi)]),
2181
- m("div", ji, [m("label", { class: y(p(U)) }, v(p(o).social.color), 3), m("select", {
2182
- "data-testid": "social-tone-select",
2183
- class: y(p(K)),
2184
- value: e.block.iconTone ?? "brand",
2185
- onChange: r[1] ||= (e) => s("iconTone", e.target.value)
2186
- }, [
2187
- m("option", Ni, v(p(o).social.colorBrand), 1),
2188
- m("option", Pi, v(p(o).social.colorDark), 1),
2189
- m("option", Fi, v(p(o).social.colorLight), 1)
2190
- ], 42, Mi)]),
2191
- m("div", Ii, [m("label", { class: y(p(U)) }, v(p(o).social.size), 3), g(Y, {
2192
- options: [
2193
- {
2194
- value: "small",
2195
- label: p(o).social.sizeSmall
2196
- },
2197
- {
2198
- value: "medium",
2199
- label: p(o).social.sizeMedium
2200
- },
2201
- {
2202
- value: "large",
2203
- label: p(o).social.sizeLarge
2204
- }
2205
- ],
2206
- "model-value": e.block.iconSize,
2207
- "onUpdate:modelValue": r[2] ||= (e) => s("iconSize", e)
2208
- }, null, 8, ["options", "model-value"])]),
2209
- m("div", Li, [m("label", { class: y(p(U)) }, v(p(o).social.spacing), 3), m("div", Ri, [m("input", {
2210
- type: "number",
2211
- class: y(p(G)),
2212
- value: e.block.spacing,
2213
- min: "0",
2214
- max: "50",
2215
- onInput: r[3] ||= (e) => s("spacing", Number(e.target.value))
2216
- }, null, 42, zi), m("span", { class: y(p(W)) }, "px", 2)])]),
2217
- m("div", Bi, [m("label", { class: y(p(U)) }, v(p(o).social.align), 3), g(Y, {
2218
- options: [
2219
- {
2220
- value: "left",
2221
- label: p(o).title.alignLeft,
2222
- icon: p(H)
2223
- },
2224
- {
2225
- value: "center",
2226
- label: p(o).title.alignCenter,
2227
- icon: p(V)
2228
- },
2229
- {
2230
- value: "right",
2231
- label: p(o).title.alignRight,
2232
- icon: p(B)
2233
- }
2234
- ],
2235
- "model-value": e.block.align,
2236
- "onUpdate:modelValue": r[4] ||= (e) => s("align", e)
2237
- }, null, 8, ["options", "model-value"])])
2238
- ], 64));
2239
- }
2240
- }), Hi = { class: "tpl:mb-3.5" }, Ui = { class: "tpl:flex tpl:items-stretch" }, Wi = ["value"], Gi = ["value"], Ki = /* @__PURE__ */ w({
2241
- __name: "SpacerToolbar",
2242
- props: { block: {} },
2243
- emits: ["update"],
2244
- setup(e, { emit: n }) {
2245
- let r = n, { t: i } = I();
2246
- return (n, a) => (t(), h("div", Hi, [
2247
- m("label", { class: y(p(U)) }, v(p(i).spacer.height), 3),
2248
- m("div", Ui, [m("input", {
2249
- type: "number",
2250
- class: y(p(G)),
2251
- value: e.block.height,
2252
- min: "10",
2253
- max: "100",
2254
- onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
2255
- }, null, 42, Wi), m("span", { class: y(p(W)) }, "px", 2)]),
2256
- m("input", {
2257
- type: "range",
2258
- class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2259
- value: e.block.height,
2260
- min: "10",
2261
- max: "100",
2262
- onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
2263
- }, null, 40, Gi)
2264
- ]));
2265
- }
2266
- }), qi = { class: "tpl:mb-3.5" }, Ji = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Yi = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Xi = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Zi = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Qi = ["disabled"], $i = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ea = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ta = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, na = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ra = ["disabled"], ia = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, aa = { class: "tpl:mb-3.5" }, oa = {
2267
- key: 0,
2268
- class: "tpl:mb-3.5"
2269
- }, sa = { class: "tpl:mb-3.5" }, ca = { class: "tpl:mb-3.5" }, la = { class: "tpl:flex tpl:items-stretch" }, ua = ["value"], da = { class: "tpl:mb-3.5" }, fa = { class: "tpl:flex tpl:items-stretch" }, pa = ["value"], ma = { class: "tpl:mb-3.5" }, ha = ["value"], ga = { value: "" }, _a = ["value"], va = { class: "tpl:mb-3.5" }, ya = { class: "tpl:flex tpl:items-stretch" }, ba = ["value"], xa = { class: "tpl:mb-3.5" }, Sa = { class: "tpl:mb-3.5" }, Ca = /* @__PURE__ */ w({
2270
- __name: "TableToolbar",
2271
- props: {
2272
- block: {},
2273
- fontFamilies: {}
2274
- },
2275
- emits: ["update"],
2276
- setup(e, { emit: n }) {
2277
- let r = e, i = n, { t: o } = I(), s = S(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
2278
- function c(e, t) {
2279
- i("update", { [e]: t });
2280
- }
2281
- function l() {
2282
- let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
2283
- id: D(),
2284
- cells: Array.from({ length: e }, () => ({
2285
- id: D(),
2286
- content: ""
2287
- }))
2288
- };
2289
- i("update", { rows: [...r.block.rows, t] });
2290
- }
2291
- function u(e) {
2292
- i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
2293
- }
2294
- function d() {
2295
- let e = r.block.rows.map((e) => ({
2296
- ...e,
2297
- cells: [...e.cells, {
2298
- id: D(),
2299
- content: ""
2300
- }]
2301
- }));
2302
- i("update", { rows: e });
2303
- }
2304
- function f(e) {
2305
- let t = r.block.rows.map((t) => ({
2306
- ...t,
2307
- cells: t.cells.filter((t, n) => n !== e)
2308
- }));
2309
- i("update", { rows: t });
2310
- }
2311
- return (n, r) => (t(), h(x, null, [
2312
- m("div", qi, [m("label", { class: y(p(U)) }, v(p(o).table.dimensions), 3), m("div", Ji, [m("div", Yi, [m("span", Xi, v(p(o).table.rows), 1), m("div", Zi, [
2313
- m("button", {
2314
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
2315
- disabled: e.block.rows.length <= 1,
2316
- onClick: r[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
2317
- }, [g(p(R), {
2318
- size: 12,
2319
- "stroke-width": 2
2320
- })], 8, Qi),
2321
- m("span", $i, v(e.block.rows.length), 1),
2322
- m("button", {
2323
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
2324
- onClick: l
2325
- }, [g(p(z), {
2326
- size: 12,
2327
- "stroke-width": 2
2328
- })])
2329
- ])]), m("div", ea, [m("span", ta, v(p(o).table.columns), 1), m("div", na, [
2330
- m("button", {
2331
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
2332
- disabled: s.value <= 1,
2333
- onClick: r[1] ||= (e) => f(s.value - 1)
2334
- }, [g(p(R), {
2335
- size: 12,
2336
- "stroke-width": 2
2337
- })], 8, ra),
2338
- m("span", ia, v(s.value), 1),
2339
- m("button", {
2340
- class: "tpl:flex tpl:items-center tpl:justify-center tpl:px-1.5 tpl:py-1 tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:text-[var(--tpl-primary)]",
2341
- onClick: d
2342
- }, [g(p(z), {
2343
- size: 12,
2344
- "stroke-width": 2
2345
- })])
2346
- ])])])]),
2347
- m("div", aa, [g(q, {
2348
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2349
- "model-value": e.block.hasHeaderRow,
2350
- label: p(o).table.hasHeaderRow,
2351
- "onUpdate:modelValue": r[2] ||= (e) => c("hasHeaderRow", e)
2352
- }, null, 8, ["model-value", "label"])]),
2353
- e.block.hasHeaderRow ? (t(), h("div", oa, [m("label", { class: y(p(U)) }, v(p(o).table.headerBackgroundColor), 3), g(L, {
2354
- "model-value": e.block.headerBackgroundColor ?? "",
2355
- "seed-color": p(Be),
2356
- placeholder: p(o).table.noHeaderBg,
2357
- "onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
2358
- }, null, 8, [
2359
- "model-value",
2360
- "seed-color",
2361
- "placeholder"
2362
- ])])) : C("", !0),
2363
- m("div", sa, [m("label", { class: y(p(U)) }, v(p(o).table.borderColor), 3), g(L, {
2364
- "model-value": e.block.borderColor,
2365
- "onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
2366
- }, null, 8, ["model-value"])]),
2367
- m("div", ca, [m("label", { class: y(p(U)) }, v(p(o).table.borderWidth), 3), m("div", la, [m("input", {
2368
- type: "number",
2369
- class: y(p(G)),
2370
- value: e.block.borderWidth,
2371
- min: "0",
2372
- max: "10",
2373
- onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
2374
- }, null, 42, ua), m("span", { class: y(p(W)) }, "px", 2)])]),
2375
- m("div", da, [m("label", { class: y(p(U)) }, v(p(o).table.cellPadding), 3), m("div", fa, [m("input", {
2376
- type: "number",
2377
- class: y(p(G)),
2378
- value: e.block.cellPadding,
2379
- min: "0",
2380
- max: "30",
2381
- onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
2382
- }, null, 42, pa), m("span", { class: y(p(W)) }, "px", 2)])]),
2383
- m("div", ma, [m("label", { class: y(p(U)) }, v(p(o).table.fontFamily), 3), m("select", {
2384
- class: y(p(K)),
2385
- value: p(We)(e.block.fontFamily),
2386
- onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2387
- }, [m("option", ga, v(p(o).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
2388
- key: e.value,
2389
- value: e.value
2390
- }, v(e.label), 9, _a))), 128))], 42, ha)]),
2391
- m("div", va, [m("label", { class: y(p(U)) }, v(p(o).table.fontSize), 3), m("div", ya, [m("input", {
2392
- type: "number",
2393
- class: y(p(G)),
2394
- value: e.block.fontSize,
2395
- min: "10",
2396
- max: "32",
2397
- onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
2398
- }, null, 42, ba), m("span", { class: y(p(W)) }, "px", 2)])]),
2399
- m("div", xa, [m("label", { class: y(p(U)) }, v(p(o).table.color), 3), g(L, {
2400
- "model-value": e.block.color ?? "",
2401
- "onUpdate:modelValue": r[9] ||= (e) => c("color", e || void 0)
2402
- }, null, 8, ["model-value"])]),
2403
- m("div", Sa, [m("label", { class: y(p(U)) }, v(p(o).table.textAlign), 3), g(Y, {
2404
- options: [
2405
- {
2406
- value: "left",
2407
- label: p(o).title.alignLeft,
2408
- icon: p(H)
2409
- },
2410
- {
2411
- value: "center",
2412
- label: p(o).title.alignCenter,
2413
- icon: p(V)
2414
- },
2415
- {
2416
- value: "right",
2417
- label: p(o).title.alignRight,
2418
- icon: p(B)
2419
- }
2420
- ],
2421
- "model-value": e.block.textAlign,
2422
- "onUpdate:modelValue": r[10] ||= (e) => c("textAlign", e)
2423
- }, null, 8, ["options", "model-value"])])
2424
- ], 64));
2425
- }
2426
- }), wa = { class: "tpl:mb-3.5" }, Ta = ["value"], Ea = { value: 1 }, Da = { value: 2 }, Oa = { value: 3 }, ka = { value: 4 }, Aa = { class: "tpl:mb-3.5" }, ja = ["value"], Ma = { value: "" }, Na = ["value"], Pa = { class: "tpl:mb-3.5" }, Fa = { class: "tpl:mb-3.5" }, Ia = /* @__PURE__ */ w({
2427
- __name: "TitleToolbar",
2428
- props: {
2429
- block: {},
2430
- fontFamilies: {}
2431
- },
2432
- emits: ["update"],
2433
- setup(e, { emit: n }) {
2434
- let r = n, { t: i } = I();
2435
- function o(e, t) {
2436
- r("update", { [e]: t });
2437
- }
2438
- return (n, r) => (t(), h(x, null, [
2439
- m("div", wa, [m("label", { class: y(p(U)) }, v(p(i).title.level), 3), m("select", {
2440
- class: y(p(K)),
2441
- value: e.block.level,
2442
- onChange: r[0] ||= (e) => o("level", Number(e.target.value))
2443
- }, [
2444
- m("option", Ea, v(p(i).title.heading1), 1),
2445
- m("option", Da, v(p(i).title.heading2), 1),
2446
- m("option", Oa, v(p(i).title.heading3), 1),
2447
- m("option", ka, v(p(i).title.heading4), 1)
2448
- ], 42, Ta)]),
2449
- m("div", Aa, [m("label", { class: y(p(U)) }, v(p(i).title.fontFamily), 3), m("select", {
2450
- class: y(p(K)),
2451
- value: p(We)(e.block.fontFamily),
2452
- onChange: r[1] ||= (e) => o("fontFamily", e.target.value || void 0)
2453
- }, [m("option", Ma, v(p(i).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
2454
- key: e.value,
2455
- value: e.value
2456
- }, v(e.label), 9, Na))), 128))], 42, ja)]),
2457
- m("div", Pa, [m("label", { class: y(p(U)) }, v(p(i).title.color), 3), g(L, {
2458
- "model-value": e.block.color ?? "",
2459
- "onUpdate:modelValue": r[2] ||= (e) => o("color", e || void 0)
2460
- }, null, 8, ["model-value"])]),
2461
- m("div", Fa, [m("label", { class: y(p(U)) }, v(p(i).title.align), 3), g(Y, {
2462
- options: [
2463
- {
2464
- value: "left",
2465
- label: p(i).title.alignLeft,
2466
- icon: p(H)
2467
- },
2468
- {
2469
- value: "center",
2470
- label: p(i).title.alignCenter,
2471
- icon: p(V)
2472
- },
2473
- {
2474
- value: "right",
2475
- label: p(i).title.alignRight,
2476
- icon: p(B)
2477
- }
2478
- ],
2479
- "model-value": e.block.textAlign,
2480
- "onUpdate:modelValue": r[3] ||= (e) => o("textAlign", e)
2481
- }, null, 8, ["options", "model-value"])])
2482
- ], 64));
2483
- }
2484
- }), La = { class: "tpl:mb-3.5" }, Ra = {
2485
- key: 0,
2486
- class: "tpl:mb-3.5"
2487
- }, za = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Ba = [
2488
- "value",
2489
- "placeholder",
2490
- "title"
2491
- ], Va = { class: "tpl:mb-3.5" }, Ha = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Ua = { class: "tpl:mb-3.5" }, Wa = { class: "tpl:mb-3.5" }, Ga = ["value"], Ka = { value: "full" }, qa = { class: "tpl:mb-3.5" }, Ja = ["value"], Ya = { value: "auto" }, Xa = { value: "custom" }, Za = {
2492
- key: 0,
2493
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2494
- }, Qa = ["value"], $a = { class: "tpl:mb-3.5" }, eo = 200, to = /* @__PURE__ */ w({
2495
- __name: "VideoToolbar",
2496
- props: { block: {} },
2497
- emits: ["update"],
2498
- setup(e, { emit: n }) {
2499
- let r = e, i = n, { t: a } = I(), o = c(fe, null), s = c(pe, ee.liquid), l = Ie(), u = S(() => !!o), f = S(() => j(r.block.url, s)), w = S(() => typeof r.block.height == "number" ? "custom" : "auto"), T = d(!1), { start: E } = le(() => {
2500
- T.value = !1;
2501
- }, 1e3, { immediate: !1 });
2502
- function D(e, t) {
2503
- i("update", { [e]: t });
2504
- }
2505
- function O(e) {
2506
- D("height", e === "custom" ? eo : void 0);
2507
- }
2508
- function k(e) {
2509
- let t = Number(e);
2510
- !Number.isFinite(t) || t <= 0 || D("height", t);
2511
- }
2512
- async function A() {
2513
- let e = await o?.({ accept: ["images"] });
2514
- l.alive && e && (D("thumbnailUrl", e.url), T.value = !0, E());
2515
- }
2516
- return (n, r) => (t(), h(x, null, [
2517
- m("div", La, [
2518
- m("label", { class: y(p(U)) }, v(p(a).video.videoUrl), 3),
2519
- g(J, {
2520
- "model-value": e.block.url,
2521
- type: "url",
2522
- placeholder: p(a).video.videoUrlPlaceholder,
2523
- "onUpdate:modelValue": r[0] ||= (e) => D("url", e)
2524
- }, null, 8, ["model-value", "placeholder"]),
2525
- e.block.url ? (t(), b(q, {
2526
- key: 0,
2527
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2528
- "model-value": e.block.openInNewTab ?? !1,
2529
- label: p(a).video.openInNewTab,
2530
- "onUpdate:modelValue": r[1] ||= (e) => D("openInNewTab", e)
2531
- }, null, 8, ["model-value", "label"])) : C("", !0)
2532
- ]),
2533
- f.value ? (t(), h("div", Ra, [m("label", { class: y(p(U)) }, [_(v(p(a).video.placeholderUrl) + " ", 1), m("span", za, v(p(a).video.optional), 1)], 2), m("input", {
2534
- type: "url",
2535
- class: y(p(K)),
2536
- value: e.block.placeholderUrl || "",
2537
- placeholder: p(a).video.placeholderUrlPlaceholder,
2538
- title: p(a).video.placeholderUrlTooltip,
2539
- onInput: r[2] ||= (e) => D("placeholderUrl", e.target.value)
2540
- }, null, 42, Ba)])) : C("", !0),
2541
- m("div", Va, [
2542
- m("label", { class: y(p(U)) }, [_(v(p(a).video.customThumbnail) + " ", 1), m("span", Ha, v(p(a).video.optional), 1)], 2),
2543
- g(J, {
2544
- "model-value": e.block.thumbnailUrl,
2545
- type: "url",
2546
- placeholder: p(a).video.thumbnailPlaceholder,
2547
- pulse: T.value,
2548
- "onUpdate:modelValue": r[3] ||= (e) => D("thumbnailUrl", e)
2549
- }, null, 8, [
2550
- "model-value",
2551
- "placeholder",
2552
- "pulse"
2553
- ]),
2554
- u.value ? (t(), h("button", {
2555
- key: 0,
2556
- class: "tpl:mt-2 tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all",
2557
- style: {
2558
- "border-color": "var(--tpl-border)",
2559
- color: "var(--tpl-primary)",
2560
- "background-color": "var(--tpl-bg)"
2561
- },
2562
- onClick: A
2563
- }, [g(p(re), {
2564
- size: 14,
2565
- "stroke-width": 1.5
2566
- }), _(" " + v(p(a).image.browseMedia), 1)])) : C("", !0)
2567
- ]),
2568
- m("div", Ua, [m("label", { class: y(p(U)) }, v(p(a).video.altText), 3), g(J, {
2569
- "model-value": e.block.alt,
2570
- type: "text",
2571
- placeholder: p(a).video.altTextPlaceholder,
2572
- "onUpdate:modelValue": r[4] ||= (e) => D("alt", e)
2573
- }, null, 8, ["model-value", "placeholder"])]),
2574
- m("div", Wa, [m("label", { class: y(p(U)) }, v(p(a).video.width), 3), m("select", {
2575
- class: y(p(K)),
2576
- value: e.block.width,
2577
- onChange: r[5] ||= (e) => D("width", e.target.value === "full" ? "full" : Number(e.target.value))
2578
- }, [
2579
- m("option", Ka, v(p(a).video.fullWidth), 1),
2580
- r[9] ||= m("option", { value: "300" }, "300px", -1),
2581
- r[10] ||= m("option", { value: "400" }, "400px", -1),
2582
- r[11] ||= m("option", { value: "500" }, "500px", -1)
2583
- ], 42, Ga)]),
2584
- m("div", qa, [
2585
- m("label", { class: y(p(U)) }, v(p(a).video.height), 3),
2586
- m("select", {
2587
- class: y(p(K)),
2588
- "data-testid": "video-height-mode",
2589
- value: w.value,
2590
- onChange: r[6] ||= (e) => O(e.target.value)
2591
- }, [m("option", Ya, v(p(a).video.heightAuto), 1), m("option", Xa, v(p(a).video.heightCustom), 1)], 42, Ja),
2592
- w.value === "custom" ? (t(), h("div", Za, [m("input", {
2593
- type: "number",
2594
- "data-testid": "video-height-input",
2595
- class: y(p(G)),
2596
- value: e.block.height,
2597
- min: "20",
2598
- onInput: r[7] ||= (e) => k(e.target.value)
2599
- }, null, 42, Qa), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
2600
- ]),
2601
- m("div", $a, [m("label", { class: y(p(U)) }, v(p(a).title.align), 3), g(Y, {
2602
- options: [
2603
- {
2604
- value: "left",
2605
- label: p(a).title.alignLeft
2606
- },
2607
- {
2608
- value: "center",
2609
- label: p(a).title.alignCenter
2610
- },
2611
- {
2612
- value: "right",
2613
- label: p(a).title.alignRight
2614
- }
2615
- ],
2616
- "model-value": e.block.align,
2617
- "onUpdate:modelValue": r[8] ||= (e) => D("align", e)
2618
- }, null, 8, ["options", "model-value"])])
2619
- ], 64));
2620
- }
2621
- }), no = ["aria-label"], ro = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, io = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, ao = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, oo = { class: "tpl:flex tpl:gap-1" }, so = ["title"], co = ["title"], lo = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, uo = /*@__PURE__*/ w({
2622
- __name: "Toolbar",
2623
- props: { block: {} },
2624
- emits: [
2625
- "update",
2626
- "delete",
2627
- "duplicate"
2628
- ],
2629
- setup(e, { emit: n }) {
2630
- let r = f(() => import("./CountdownToolbar-BeF21SeB.js")), a = e, o = n, { t: s } = I(), l = F(ye, "Toolbar"), u = c(ve, []), d = S(() => a.block.type), _ = S(() => O(a.block)), y = S(() => {
2631
- if (_.value) return u.find((e) => e.type === a.block.customType);
2632
- }), x = S(() => _.value ? y.value?.name ?? a.block.customType : ie(d.value, s)), w = S(() => Ue(l.fonts.value, "fontFamily" in a.block ? a.block.fontFamily : void 0));
2633
- function T(e) {
2634
- o("update", e);
2635
- }
2636
- return (n, a) => (t(), h("aside", {
2637
- "data-testid": "block-toolbar",
2638
- "aria-label": p(s).landmarks.blockToolbar,
2639
- class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
2640
- }, [m("div", ro, [m("div", io, [p(we)[d.value] ? (t(), b(i(p(we)[d.value]), {
2641
- key: 0,
2642
- size: 16,
2643
- "stroke-width": 1.5
2644
- })) : _.value ? (t(), b(p(P), {
2645
- key: 1,
2646
- size: 16,
2647
- "stroke-width": 1.5
2648
- })) : C("", !0), m("h3", ao, v(x.value), 1)]), m("div", oo, [m("button", {
2649
- class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
2650
- title: p(s).toolbar.duplicate,
2651
- onClick: a[0] ||= (e) => o("duplicate")
2652
- }, [g(p(Te), {
2653
- size: 14,
2654
- "stroke-width": 2
2655
- })], 8, so), m("button", {
2656
- class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
2657
- title: p(s).toolbar.delete,
2658
- onClick: a[1] ||= (e) => o("delete")
2659
- }, [g(p(Me), {
2660
- size: 14,
2661
- "stroke-width": 2
2662
- })], 8, co)])]), m("div", lo, [_.value ? (t(), b(ur, {
2663
- key: 0,
2664
- block: e.block,
2665
- onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
2666
- onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
2667
- }, null, 8, ["block"])) : d.value === "section" ? (t(), b(gi, {
2668
- key: 1,
2669
- block: e.block,
2670
- onUpdate: T
2671
- }, null, 8, ["block"])) : d.value === "title" ? (t(), b(Ia, {
2672
- key: 2,
2673
- block: e.block,
2674
- "font-families": w.value,
2675
- onUpdate: T
2676
- }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (t(), b(oi, {
2677
- key: 3,
2678
- block: e.block,
2679
- onUpdate: T
2680
- }, null, 8, ["block"])) : d.value === "image" ? (t(), b(Wr, {
2681
- key: 4,
2682
- block: e.block,
2683
- onUpdate: T
2684
- }, null, 8, ["block"])) : d.value === "video" ? (t(), b(to, {
2685
- key: 5,
2686
- block: e.block,
2687
- onUpdate: T
2688
- }, null, 8, ["block"])) : d.value === "button" ? (t(), b(Nt, {
2689
- key: 6,
2690
- block: e.block,
2691
- "font-families": w.value,
2692
- onUpdate: T
2693
- }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (t(), b(gr, {
2694
- key: 7,
2695
- block: e.block,
2696
- onUpdate: T
2697
- }, null, 8, ["block"])) : d.value === "social" ? (t(), b(Vi, {
2698
- key: 8,
2699
- block: e.block,
2700
- onUpdate: T
2701
- }, null, 8, ["block"])) : d.value === "menu" ? (t(), b(ni, {
2702
- key: 9,
2703
- block: e.block,
2704
- "font-families": w.value,
2705
- onUpdate: T
2706
- }, null, 8, ["block", "font-families"])) : d.value === "table" ? (t(), b(Ca, {
2707
- key: 10,
2708
- block: e.block,
2709
- "font-families": w.value,
2710
- onUpdate: T
2711
- }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (t(), b(Ki, {
2712
- key: 11,
2713
- block: e.block,
2714
- onUpdate: T
2715
- }, null, 8, ["block"])) : d.value === "html" ? (t(), b(br, {
2716
- key: 12,
2717
- block: e.block,
2718
- onUpdate: T
2719
- }, null, 8, ["block"])) : d.value === "countdown" ? (t(), b(p(r), {
2720
- key: 13,
2721
- block: e.block,
2722
- "font-families": w.value,
2723
- onUpdate: T
2724
- }, null, 8, ["block", "font-families"])) : C("", !0), g(Tn, {
2725
- block: e.block,
2726
- "is-first-section": d.value === "paragraph",
2727
- onUpdate: T
2728
- }, null, 8, ["block", "is-first-section"])])], 8, no));
2729
- }
2730
- }), fo = /* @__PURE__ */ e({ default: () => po }), po = /*#__PURE__*/ Fe(uo, [["__scopeId", "data-v-e2d2c22f"]]);
2731
- //#endregion
2732
- export { po as default, Y as i, $ as n, X as r, fo as t };