@templatical/editor 0.48.0 → 0.50.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 (396) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/CloudPanels-B4F5m7vy.js +168 -0
  12. package/dist/CollaborationNotices-CNuDp7Y2.js +76 -0
  13. package/dist/CollaboratorBar-BtHPiuHq.js +123 -0
  14. package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-Dasj191h.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CEIMPojJ.js} +56 -56
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CqfU52CO.js} +272 -267
  21. package/dist/{cdn/chunks/MediaEditModal-zXfcArr4.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-YnEkorTZ.js} +26 -26
  24. package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-Bq_IGOLJ.js} +22 -22
  28. package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-C8GngfQx.js} +88 -88
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-BjcTiV87.js} +14 -14
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/Toolbar-CZSPZYbj.js +3153 -0
  39. package/dist/{TplModal-Bz4-IZ9R.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-DUGF0tUJ.js} +10 -10
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-CbNzJM3I.js → ca-C7mTzW1r.js} +147 -8
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-D0--EQkP.js} +39 -39
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-C3jsxo_f.js} +52 -100
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js +78 -0
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js +72 -0
  73. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js.map +1 -0
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-zx39Dyby.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-Cjud2Tos.js} +71 -71
  81. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-CsL2JDOG.js} +374 -369
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-ByOvznRC.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-C8U-7LxL.js} +34 -34
  93. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-CdA5osuA.js} +26 -26
  101. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-CijargAy.js} +78 -78
  105. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-BPRaJBv3.js} +19 -19
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-DoprRgTn.js} +1097 -1101
  123. package/dist/cdn/chunks/Toolbar-DoprRgTn.js.map +1 -0
  124. package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BaGcn-b1.js} +13 -13
  131. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-CbNzJM3I.js → cdn/chunks/ca-C7mTzW1r.js} +149 -6
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js +1408 -0
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-DMquBpZM.js → cdn/chunks/de-DNuYQTmS.js} +149 -6
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-CUWI-IvA.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-DZ0gwUJ6.js} +1359 -1266
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-CI6EfeMd.js} +881 -881
  157. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-C8Mp71sO.js → cdn/chunks/en-CW71OK66.js} +149 -6
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-Byq4tthI.js → cdn/chunks/es-DdK7zQfi.js} +149 -6
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-taJTZlLK.js} +71 -71
  166. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-Dz5Bgb7-.js} +149 -6
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-DNX6StSs.js} +183 -150
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-Di-zJiT8.js} +149 -6
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-CvVuHYFL.js} +149 -6
  178. package/dist/cdn/chunks/nl-CvVuHYFL.js.map +1 -0
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-DibcXcmv.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +149 -6
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  188. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  189. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  190. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  191. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  192. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  193. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  194. package/dist/cdn/chunks/{src-DYCDeBDM.js → src-BNFnxfrA.js} +694 -329
  195. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  196. package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-BcTUmgLe.js} +181 -181
  197. package/dist/cdn/chunks/src-BcTUmgLe.js.map +1 -0
  198. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  199. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  200. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  201. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  202. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-CtVrAViq.js} +44 -44
  203. package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +1 -0
  204. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  205. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  206. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  207. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  208. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  209. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  210. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-CbVubQhM.js} +3 -3
  211. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-CbVubQhM.js.map} +1 -1
  212. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-B49Nc53Y.js} +5 -5
  213. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  214. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-B0KryMj8.js} +7 -7
  215. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  216. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-C829ps5i.js} +4 -4
  217. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  218. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  219. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  220. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-DFPXeVfG.js} +2 -2
  221. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  222. package/dist/cdn/editor.css +1 -1
  223. package/dist/cdn/editor.js +2235 -1311
  224. package/dist/cdn/editor.js.map +1 -1
  225. package/dist/{check-ClwqRMgv.js → check-yYsp5Xpk.js} +1 -1
  226. package/dist/{chevron-down-te6qn-zE.js → chevron-down-DTmD06_j.js} +1 -1
  227. package/dist/{chevron-right-W2hbH1FM.js → chevron-right-BSeYZOxc.js} +1 -1
  228. package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-BOApwrxi.js} +1 -1
  229. package/dist/{circle-alert-CIEGV5DN.js → circle-alert-BMszY8im.js} +1 -1
  230. package/dist/{clock-Y4cx0gkJ.js → clock-HADxnl6-.js} +1 -1
  231. package/dist/createCloudRuntime-DVQI_ReU.js +1379 -0
  232. package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-0lYYH3EW.js} +6 -6
  233. package/dist/de-DBOTcDj2.js +20 -0
  234. package/dist/{cdn/chunks/de-DMquBpZM.js → de-DNuYQTmS.js} +147 -8
  235. package/dist/{cdn/chunks/dist-CjL6JHML.js → dist-C7EtxNCb.js} +49 -51
  236. package/dist/{dist-DuufrR8O.js → dist-C_dV9QAx.js} +130 -130
  237. package/dist/{cdn/chunks/dist-MNQYSEWU.js → dist-DI4_YSnG.js} +111 -110
  238. package/dist/{dist-tsmnQugO.js → dist-DtOF3bDW.js} +648 -294
  239. package/dist/{editor-modal-AlVLkU91.js → editor-modal-Bzhl-PgI.js} +832 -834
  240. package/dist/en-CDhWRrF_.js +20 -0
  241. package/dist/{cdn/chunks/en-C8Mp71sO.js → en-CW71OK66.js} +147 -8
  242. package/dist/en-DwV15ltA.js +1 -0
  243. package/dist/{cdn/chunks/es-Byq4tthI.js → es-DdK7zQfi.js} +147 -8
  244. package/dist/{extensions-pjO8VGkM.js → extensions-CdyweA50.js} +54 -54
  245. package/dist/{eye-Ddnz8nnm.js → eye-DWkSvYpj.js} +1 -1
  246. package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-Dz5Bgb7-.js} +147 -8
  247. package/dist/image-DesWjcZ4.js +28 -0
  248. package/dist/index.d.ts +640 -48
  249. package/dist/{info-DXLmzoeY.js → info-ClWJGoZy.js} +1 -1
  250. package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-Di-zJiT8.js} +147 -8
  251. package/dist/keys-Zd9KWRD1.js +10 -0
  252. package/dist/{link-Cel46wgo.js → link-BqRicFTA.js} +1 -1
  253. package/dist/{list-Cl0GwiV9.js → list-bojQr9bn.js} +1 -1
  254. package/dist/{loader-circle-uAwpvfys.js → loader-circle-B2B8LbUu.js} +1 -1
  255. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  256. package/dist/{message-circle-DWU1pTM_.js → message-circle-BEuiNsyZ.js} +1 -1
  257. package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-CvVuHYFL.js} +147 -8
  258. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  259. package/dist/{package-CbyG_yU_.js → package-DCROB4aM.js} +1 -1
  260. package/dist/{pencil-BzoDcwKu.js → pencil-CEotCKbf.js} +1 -1
  261. package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-D8rr61_z.js} +3 -3
  262. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  263. package/dist/{cdn/chunks/pt-BR-DibcXcmv.js → pt-BR-ZhO4vgyq.js} +147 -8
  264. package/dist/{refresh-cw-9WinWixo.js → refresh-cw-C6M2mHNC.js} +12 -2
  265. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  266. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  267. package/dist/{search-CqgGq1gG.js → search-Cy99zPYf.js} +1 -1
  268. package/dist/{send-Ceo3c9Db.js → send-BDLJFsf3.js} +1 -1
  269. package/dist/{smartphone-CcLaCpGK.js → smartphone-CVvQaNA4.js} +1 -1
  270. package/dist/socialIcons-Dd-jRiVe.js +2086 -0
  271. package/dist/{sparkles-Do9XjAuT.js → sparkles-Ce0Qz0ox.js} +1 -1
  272. package/dist/square-BWlolnXe.js +15 -0
  273. package/dist/style.css +1 -1
  274. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  275. package/dist/templatical-editor.js +2272 -1327
  276. package/dist/{text-align-start-DvzC0HQA.js → text-align-start-D1V5gPTy.js} +1 -1
  277. package/dist/{trash-vlINTx32.js → trash-CZfiUFmw.js} +1 -1
  278. package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CFDzyFC7.js} +1 -1
  279. package/dist/upload-BJfvdIrD.js +36 -0
  280. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-Dcjua65H.js} +5 -5
  281. package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-BTLeAVlM.js} +1534 -1549
  282. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-DUy67lJu.js} +2 -2
  283. package/dist/{useI18n-CxVEpurs.js → useI18n-BdoY7xDE.js} +4 -4
  284. package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-DKLZ1T9H.js} +3 -3
  285. package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-Bhdx7AKk.js} +5 -5
  286. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-BZea45XK.js} +2 -2
  287. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  288. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1182 -1087
  289. package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-BATJHNve.js} +1 -1
  290. package/dist/{x-Cd6SFw8r.js → x-CZ0Js0hA.js} +1 -1
  291. package/package.json +17 -15
  292. package/dist/AiChatSidebar-DxPHFNoT.js +0 -230
  293. package/dist/AiFeatureMenu-C8GVqu1d.js +0 -57
  294. package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
  295. package/dist/CloudPanels-Dgw7tb4R.js +0 -216
  296. package/dist/CollaboratorBar-5rfopCPx.js +0 -103
  297. package/dist/CommentsSidebar-BOqj16Al.js +0 -500
  298. package/dist/DesignReferenceSidebar-BWAi3eQQ.js +0 -279
  299. package/dist/IssuesPanel-C-x3I012.js +0 -117
  300. package/dist/ParagraphEditor-BVjOwwHx.js +0 -797
  301. package/dist/SavedBlocksBrowserModal-DbmIS5uK.js +0 -360
  302. package/dist/TemplateScoringPanel-ynbGl-sr.js +0 -273
  303. package/dist/TemplateSettings-Bi01S3H3.js +0 -246
  304. package/dist/ToggleSwitch-Ozc7YU38.js +0 -102
  305. package/dist/Toolbar-B-2lO0I8.js +0 -3156
  306. package/dist/WrapperBlock-D0qgNqjD.js +0 -45
  307. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js +0 -205
  308. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js.map +0 -1
  309. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js +0 -57
  310. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js.map +0 -1
  311. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js +0 -60
  312. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
  313. package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
  314. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
  315. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
  316. package/dist/cdn/chunks/CommentsPanel-CbzxwsyI.js +0 -20
  317. package/dist/cdn/chunks/CommentsSidebar-DWPHZuQm.js +0 -470
  318. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js +0 -229
  319. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js.map +0 -1
  320. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js +0 -100
  321. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js.map +0 -1
  322. package/dist/cdn/chunks/LogicTagInsertButton-BMB9vShs.js.map +0 -1
  323. package/dist/cdn/chunks/MediaEditModal-zXfcArr4.js.map +0 -1
  324. package/dist/cdn/chunks/MediaPanels-Cp4XB_dH.js +0 -45
  325. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js +0 -632
  326. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +0 -1
  327. package/dist/cdn/chunks/SavedBlocksPanels-BhEOMzEQ.js +0 -38
  328. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js +0 -237
  329. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js.map +0 -1
  330. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js +0 -208
  331. package/dist/cdn/chunks/TestEmailPanel-DxrKuctP.js +0 -35
  332. package/dist/cdn/chunks/TitleEditor-CsZiG3TT.js +0 -199
  333. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js +0 -104
  334. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js.map +0 -1
  335. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
  336. package/dist/cdn/chunks/VersionHistoryPanels-DXSqmaLS.js +0 -48
  337. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +0 -47
  338. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +0 -22
  339. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
  340. package/dist/cdn/chunks/cloud-BHClP3e2.js +0 -1736
  341. package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
  342. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js +0 -400
  343. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
  344. package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
  345. package/dist/cdn/chunks/de-mMY5yQJu.js +0 -93
  346. package/dist/cdn/chunks/de-mMY5yQJu.js.map +0 -1
  347. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  348. package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
  349. package/dist/cdn/chunks/en-ChVeGQBY.js +0 -93
  350. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  351. package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
  352. package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
  353. package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
  354. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +0 -1
  355. package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
  356. package/dist/cdn/chunks/keys-HI-INbkz.js +0 -12
  357. package/dist/cdn/chunks/keys-HI-INbkz.js.map +0 -1
  358. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  359. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
  360. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js +0 -93
  361. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +0 -1
  362. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
  363. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  364. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
  365. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
  366. package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
  367. package/dist/cdn/chunks/src-DlFlC9Tt.js +0 -1272
  368. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +0 -1
  369. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
  370. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
  371. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
  372. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  373. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js +0 -12
  374. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js.map +0 -1
  375. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js +0 -2602
  376. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
  377. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  378. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js +0 -21
  379. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +0 -1
  380. package/dist/cloud-B5xwm_4X.js +0 -1689
  381. package/dist/copy-BEcsAlfB.js +0 -19
  382. package/dist/createCloudRuntime-zNPkF6T9.js +0 -398
  383. package/dist/de-mMY5yQJu.js +0 -91
  384. package/dist/dist-DAAJogrx.js +0 -407
  385. package/dist/en-B0FUfNwz.js +0 -1
  386. package/dist/en-ChVeGQBY.js +0 -91
  387. package/dist/image-up-CM_HC0Dx.js +0 -27
  388. package/dist/keys-BKFq19a2.js +0 -10
  389. package/dist/plus-8cDvoCjZ.js +0 -14
  390. package/dist/pt-BR-CoCwRUi0.js +0 -91
  391. package/dist/shield-check-uDAwur5D.js +0 -14
  392. package/dist/socialIcons-PTiwhLoC.js +0 -1359
  393. package/dist/timeouts-Cv2jvusx.js +0 -4
  394. package/dist/upload-CtNOI6J2.js +0 -21
  395. package/dist/useAliveFlag-Dd06mRxe.js +0 -10
  396. package/dist/useScrollToBlock-CXmcHQQN.js +0 -47
@@ -1,3156 +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, J as a, M as o, N as s, R as c, S as l, V as u, Y as d, Z as f, _ as p, at as m, c as h, d as g, g as _, h as v, jt as y, kt as b, l as x, r as S, s as C, u as w, v as T } from "./vue.runtime.esm-bundler-CAzmrXdD.js";
3
- import { a as E, o as D } from "./runtime-dom.esm-bundler-lFF-QG3j.js";
4
- import { J as O, V as k, Y as A, _ as j, bt as M, c as N, i as P, n as F, nt as ee, r as te, st as ne, t as re, u as ie, v as ae, yt as I } from "./dist-tsmnQugO.js";
5
- import { C as oe, L as se, O as ce, b as le, c as ue, d as de, f as fe, h as pe, i as me, l as he, m as ge, o as _e, p as L, r as R, u as ve, x as ye, y as be } from "./socialIcons-PTiwhLoC.js";
6
- import { _ as xe } from "./dist-CUWI-IvA.js";
7
- import { $ as z, C as Se, G as Ce, L as we, P as Te, d as Ee, g as De, h as Oe, n as ke, p as Ae, v as je, x as Me } from "./keys-BKFq19a2.js";
8
- import { t as B } from "./useI18n-CxVEpurs.js";
9
- import { o as Ne } from "./usePopoverPosition-CwnH1o5g.js";
10
- import { t as Pe } from "./createLucideIcon-CYHXK9hn.js";
11
- import { c as V } from "./LogicTagInsertButton-B1_Wy0AN.js";
12
- import { t as Fe } from "./chevron-down-te6qn-zE.js";
13
- import { t as Ie } from "./circle-alert-CIEGV5DN.js";
14
- import { n as Le, t as Re } from "./blockTypeIcons-CEDZytqP.js";
15
- import { t as ze } from "./copy-BEcsAlfB.js";
16
- import { t as Be } from "./info-DXLmzoeY.js";
17
- import { t as Ve } from "./link-Cel46wgo.js";
18
- import { n as He, t as Ue } from "./smartphone-CcLaCpGK.js";
19
- import { t as H } from "./plus-8cDvoCjZ.js";
20
- import { t as We } from "./refresh-cw-9WinWixo.js";
21
- import { n as Ge, r as Ke, t as qe } from "./text-align-start-DvzC0HQA.js";
22
- import { t as Je } from "./trash-vlINTx32.js";
23
- import { t as Ye } from "./x-Cd6SFw8r.js";
24
- import { t as Xe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
25
- import { t as Ze } from "./useAliveFlag-Dd06mRxe.js";
26
- import { _ as Qe, b as $e, c as et, g as U, h as W, m as G, p as K, r as tt, v as nt } from "./styleConstants-D1Jz-TFU.js";
27
- import { n as rt, t as q } from "./ToggleSwitch-Ozc7YU38.js";
28
- import { n as it, t as at } from "./withCurrentFont-CxRGeHO3.js";
29
- import { t as J } from "./MergeTagInput-fOewuF27.js";
30
- var ot = Pe({
31
- name: "lock-open",
32
- size: 24,
33
- node: [["rect", {
34
- width: "18",
35
- height: "11",
36
- x: "3",
37
- y: "11",
38
- rx: "2",
39
- ry: "2",
40
- key: "1w4ew1"
41
- }], ["path", {
42
- d: "M7 11V7a5 5 0 0 1 9.9-1",
43
- key: "1mm8w8"
44
- }]],
45
- aliases: ["unlock"]
46
- }), st = Pe({
47
- name: "lock",
48
- size: 24,
49
- node: [["rect", {
50
- width: "18",
51
- height: "11",
52
- x: "3",
53
- y: "11",
54
- rx: "2",
55
- ry: "2",
56
- key: "1w4ew1"
57
- }], ["path", {
58
- d: "M7 11V7a5 5 0 0 1 10 0v4",
59
- key: "fwvmzm"
60
- }]]
61
- }), ct = Pe({
62
- name: "unlink",
63
- size: 24,
64
- node: [
65
- ["path", {
66
- 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",
67
- key: "yqzxt4"
68
- }],
69
- ["path", {
70
- 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",
71
- key: "4qinb0"
72
- }],
73
- ["line", {
74
- x1: "8",
75
- x2: "8",
76
- y1: "2",
77
- y2: "5",
78
- key: "1041cp"
79
- }],
80
- ["line", {
81
- x1: "2",
82
- x2: "5",
83
- y1: "8",
84
- y2: "8",
85
- key: "14m1p5"
86
- }],
87
- ["line", {
88
- x1: "16",
89
- x2: "16",
90
- y1: "19",
91
- y2: "22",
92
- key: "rzdirn"
93
- }],
94
- ["line", {
95
- x1: "19",
96
- x2: "22",
97
- y1: "16",
98
- y2: "16",
99
- key: "ox905f"
100
- }]
101
- ]
102
- }), lt = [
103
- "aria-checked",
104
- "aria-label",
105
- "disabled",
106
- "aria-disabled",
107
- "title",
108
- "onClick"
109
- ], ut = { key: 1 }, Y = /* @__PURE__ */ T({
110
- __name: "SlidingPillSelect",
111
- props: {
112
- options: {},
113
- modelValue: {}
114
- },
115
- emits: ["update:modelValue"],
116
- setup(e, { emit: r }) {
117
- let a = e, s = r, c = C(() => a.options.findIndex((e) => e.value === a.modelValue)), l = C(() => `translateX(${Math.max(c.value, 0) * 100}%)`);
118
- return (r, a) => (t(), g("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(), g("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)) : w("", !0), (t(!0), g(S, null, o(e.options, (r) => (t(), g("button", {
137
- key: r.value,
138
- role: "radio",
139
- "aria-checked": e.modelValue === r.value,
140
- "aria-label": r.label,
141
- disabled: r.disabled,
142
- "aria-disabled": r.disabled ? "true" : void 0,
143
- class: "tpl:relative tpl:z-10 tpl:flex tpl:cursor-pointer tpl:disabled:cursor-not-allowed 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",
144
- style: n({
145
- color: r.disabled ? "var(--tpl-text-dim)" : e.modelValue === r.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
146
- transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
147
- }),
148
- title: r.label,
149
- onClick: (e) => r.disabled || s("update:modelValue", r.value)
150
- }, [r.icon ? (t(), x(i(r.icon), {
151
- key: 0,
152
- size: 14,
153
- "stroke-width": 2
154
- })) : (t(), g("span", ut, y(r.label), 1))], 12, lt))), 128))], 4));
155
- }
156
- }), dt = { class: "tpl:flex tpl:items-stretch" }, ft = [
157
- "data-testid",
158
- "value",
159
- "min",
160
- "max"
161
- ], X = /* @__PURE__ */ T({
162
- __name: "NumberWithSuffix",
163
- props: {
164
- modelValue: {},
165
- min: {},
166
- max: {},
167
- suffix: {},
168
- testid: {}
169
- },
170
- emits: ["update:modelValue"],
171
- setup(e, { emit: n }) {
172
- let r = n;
173
- function i(e) {
174
- let t = e.target;
175
- t.validity?.badInput || r("update:modelValue", Number(t.value));
176
- }
177
- return (n, r) => (t(), g("div", dt, [h("input", {
178
- type: "number",
179
- "data-testid": e.testid,
180
- class: b(m(G)),
181
- value: e.modelValue,
182
- min: e.min,
183
- max: e.max,
184
- onInput: i
185
- }, null, 42, ft), h("span", { class: b(m(W)) }, y(e.suffix), 3)]));
186
- }
187
- }), pt = [
188
- "aria-pressed",
189
- "aria-label",
190
- "title",
191
- "data-testid"
192
- ], mt = /* @__PURE__ */ T({
193
- __name: "LinkToggle",
194
- props: {
195
- linked: { type: Boolean },
196
- linkLabel: {},
197
- unlinkLabel: {},
198
- testid: {}
199
- },
200
- emits: ["toggle"],
201
- setup(e, { emit: n }) {
202
- let r = n;
203
- return (n, i) => (t(), g("button", {
204
- type: "button",
205
- class: b(["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)]"]),
206
- "aria-pressed": e.linked ? "true" : "false",
207
- "aria-label": e.linked ? e.unlinkLabel : e.linkLabel,
208
- title: e.linked ? e.unlinkLabel : e.linkLabel,
209
- "data-testid": e.testid,
210
- onClick: i[0] ||= (e) => r("toggle")
211
- }, [e.linked ? (t(), x(m(Ve), {
212
- key: 0,
213
- size: 14,
214
- "stroke-width": 2
215
- })) : (t(), x(m(ct), {
216
- key: 1,
217
- size: 14,
218
- "stroke-width": 2
219
- }))], 10, pt));
220
- }
221
- }), ht = { class: "tpl:mb-3.5" }, gt = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, _t = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, vt = {
222
- key: 0,
223
- class: "tpl:mb-3.5"
224
- }, yt = { class: "tpl:mb-3.5" }, bt = { class: "tpl:mb-3.5" }, xt = /* @__PURE__ */ T({
225
- __name: "BorderControl",
226
- props: {
227
- modelValue: {},
228
- testidPrefix: {}
229
- },
230
- emits: ["update:modelValue"],
231
- setup(e, { emit: n }) {
232
- let r = e, i = n, { t: a } = B(), o = {
233
- width: 0,
234
- style: "solid",
235
- color: "#000000"
236
- };
237
- function s(e, t) {
238
- return e.width === t.width && e.style === t.style && e.color === t.color;
239
- }
240
- let l = C(() => {
241
- let e = r.modelValue;
242
- return !e || P.every((t) => s(e[t], e.top));
243
- }), u = f(l.value);
244
- c(l, (e) => {
245
- !e && u.value && (u.value = !1);
246
- });
247
- let d = f("top"), p = C(() => {
248
- let e = u.value ? "top" : d.value;
249
- return r.modelValue?.[e] ?? o;
250
- }), v = (e) => !!e && e.width > 0;
251
- function x(e) {
252
- if (u.value) {
253
- i("update:modelValue", v(e) ? M(e) : void 0);
254
- return;
255
- }
256
- let t = {
257
- ...r.modelValue ?? M(o),
258
- [d.value]: e
259
- }, n = P.some((e) => v(t[e]));
260
- i("update:modelValue", n ? t : void 0);
261
- }
262
- function T(e) {
263
- x({
264
- ...p.value,
265
- width: e > 0 ? e : 0
266
- });
267
- }
268
- function E(e) {
269
- x({
270
- ...p.value,
271
- ...e
272
- });
273
- }
274
- function D() {
275
- if (u.value) {
276
- u.value = !1;
277
- return;
278
- }
279
- u.value = !0;
280
- let e = r.modelValue;
281
- if (!e) return;
282
- let t = v(e[d.value]) ? e[d.value] : P.map((t) => e[t]).find(v);
283
- i("update:modelValue", t ? M(t) : void 0);
284
- }
285
- let O = C(() => P.map((e) => ({
286
- value: e,
287
- label: a.spacingControl[e]
288
- })));
289
- return (n, r) => (t(), g("div", ht, [
290
- h("div", gt, [h("span", _t, y(m(a).blockSettings.border), 1), _(mt, {
291
- linked: u.value,
292
- "link-label": m(a).blockSettings.linkSides,
293
- "unlink-label": m(a).blockSettings.unlinkSides,
294
- testid: `${e.testidPrefix}-border-link`,
295
- onToggle: D
296
- }, null, 8, [
297
- "linked",
298
- "link-label",
299
- "unlink-label",
300
- "testid"
301
- ])]),
302
- u.value ? w("", !0) : (t(), g("div", vt, [h("label", { class: b(m(U)) }, y(m(a).blockSettings.borderSide), 3), _(Y, {
303
- options: O.value,
304
- "model-value": d.value,
305
- "onUpdate:modelValue": r[0] ||= (e) => d.value = e
306
- }, null, 8, ["options", "model-value"])])),
307
- h("div", yt, [h("label", { class: b(m(U)) }, y(m(a).blockSettings.borderWidth), 3), _(X, {
308
- "model-value": p.value.width,
309
- min: 0,
310
- suffix: "px",
311
- testid: `${e.testidPrefix}-border-width-input`,
312
- "onUpdate:modelValue": T
313
- }, null, 8, ["model-value", "testid"])]),
314
- p.value.width > 0 ? (t(), g(S, { key: 1 }, [h("div", bt, [h("label", { class: b(m(U)) }, y(m(a).blockSettings.borderStyle), 3), _(Y, {
315
- options: [
316
- {
317
- value: "solid",
318
- label: m(a).divider.solid
319
- },
320
- {
321
- value: "dashed",
322
- label: m(a).divider.dashed
323
- },
324
- {
325
- value: "dotted",
326
- label: m(a).divider.dotted
327
- }
328
- ],
329
- "model-value": p.value.style,
330
- "onUpdate:modelValue": r[1] ||= (e) => E({ style: e })
331
- }, null, 8, ["options", "model-value"])]), h("div", null, [h("label", { class: b(m(U)) }, y(m(a).blockSettings.borderColor), 3), _(V, {
332
- "model-value": p.value.color,
333
- "onUpdate:modelValue": r[2] ||= (e) => E({ color: e })
334
- }, null, 8, ["model-value"])])], 64)) : w("", !0)
335
- ]));
336
- }
337
- }), St = { class: "tpl:mb-3.5" }, Ct = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, wt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Tt = {
338
- key: 1,
339
- class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
340
- }, Et = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Dt = /* @__PURE__ */ T({
341
- __name: "RadiusControl",
342
- props: {
343
- modelValue: {},
344
- label: {},
345
- testidPrefix: {},
346
- max: {}
347
- },
348
- emits: ["update:modelValue"],
349
- setup(e, { emit: n }) {
350
- let r = e, i = n, { t: a } = B(), s = {
351
- topLeft: "cornerTopLeft",
352
- topRight: "cornerTopRight",
353
- bottomRight: "cornerBottomRight",
354
- bottomLeft: "cornerBottomLeft"
355
- }, l = [
356
- "topLeft",
357
- "topRight",
358
- "bottomLeft",
359
- "bottomRight"
360
- ], u = C(() => {
361
- let e = r.modelValue ?? 0;
362
- return typeof e == "number" ? {
363
- topLeft: e,
364
- topRight: e,
365
- bottomRight: e,
366
- bottomLeft: e
367
- } : e;
368
- }), d = C(() => te.every((e) => u.value[e] === u.value.topLeft)), p = f(d.value);
369
- c(d, (e) => {
370
- !e && p.value && (p.value = !1);
371
- });
372
- function v(e) {
373
- return Number.isFinite(e) && e >= 0;
374
- }
375
- function b(e) {
376
- v(e) && i("update:modelValue", e);
377
- }
378
- function w(e, t) {
379
- v(t) && i("update:modelValue", {
380
- ...u.value,
381
- [e]: t
382
- });
383
- }
384
- function T() {
385
- p.value = !p.value, p.value && i("update:modelValue", u.value.topLeft);
386
- }
387
- return (n, r) => (t(), g("div", St, [h("div", Ct, [h("span", wt, y(e.label), 1), _(mt, {
388
- linked: p.value,
389
- "link-label": m(a).blockSettings.linkCorners,
390
- "unlink-label": m(a).blockSettings.unlinkCorners,
391
- testid: `${e.testidPrefix}-border-radius-link`,
392
- onToggle: T
393
- }, null, 8, [
394
- "linked",
395
- "link-label",
396
- "unlink-label",
397
- "testid"
398
- ])]), p.value ? (t(), x(X, {
399
- key: 0,
400
- "model-value": u.value.topLeft,
401
- min: 0,
402
- max: e.max,
403
- suffix: "px",
404
- testid: `${e.testidPrefix}-border-radius-input`,
405
- "onUpdate:modelValue": b
406
- }, null, 8, [
407
- "model-value",
408
- "max",
409
- "testid"
410
- ])) : (t(), g("div", Tt, [(t(), g(S, null, o(l, (t) => h("div", { key: t }, [h("label", Et, y(m(a).blockSettings[s[t]]), 1), _(X, {
411
- "model-value": u.value[t],
412
- min: 0,
413
- max: e.max,
414
- suffix: "px",
415
- testid: `${e.testidPrefix}-border-radius-${t}-input`,
416
- "onUpdate:modelValue": (e) => w(t, e)
417
- }, null, 8, [
418
- "model-value",
419
- "max",
420
- "testid",
421
- "onUpdate:modelValue"
422
- ])])), 64))]))]));
423
- }
424
- }), Ot = { class: "tpl:mb-3.5" }, kt = ["value"], At = { value: "" }, jt = ["value"], Mt = { class: "tpl:mb-3.5" }, Nt = { class: "tpl:mb-3.5" }, Pt = { class: "tpl:mb-3.5" }, Ft = { class: "tpl:mb-3.5" }, It = { class: "tpl:mb-3.5" }, Lt = { class: "tpl:flex tpl:items-stretch" }, Rt = ["value"], zt = { class: "tpl:mb-3.5" }, Bt = ["value"], Vt = { value: "auto" }, Ht = { value: "full" }, Ut = { value: "custom" }, Wt = {
425
- key: 0,
426
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
427
- }, Gt = ["value"], Kt = { class: "tpl:mb-3.5" }, qt = 200, Jt = /* @__PURE__ */ T({
428
- __name: "ButtonToolbar",
429
- props: {
430
- block: {},
431
- fontFamilies: {}
432
- },
433
- emits: ["update"],
434
- setup(e, { emit: n }) {
435
- let r = e, i = n, { t: a } = B(), s = C(() => r.block.width === "full" ? "full" : typeof r.block.width == "number" ? "custom" : "auto");
436
- function c(e, t) {
437
- i("update", { [e]: t });
438
- }
439
- function l(e) {
440
- e === "full" ? c("width", "full") : e === "custom" ? c("width", typeof r.block.width == "number" ? r.block.width : qt) : c("width", void 0);
441
- }
442
- function u(e) {
443
- let t = Number(e);
444
- !Number.isFinite(t) || t <= 0 || c("width", t);
445
- }
446
- return (n, r) => (t(), g(S, null, [
447
- h("div", Ot, [h("label", { class: b(m(U)) }, y(m(a).button.fontFamily), 3), h("select", {
448
- class: b(m(K)),
449
- value: m(at)(e.block.fontFamily),
450
- onChange: r[0] ||= (e) => c("fontFamily", e.target.value || void 0)
451
- }, [h("option", At, y(m(a).button.inheritFont), 1), (t(!0), g(S, null, o(e.fontFamilies, (e) => (t(), g("option", {
452
- key: e.value,
453
- value: e.value
454
- }, y(e.label), 9, jt))), 128))], 42, kt)]),
455
- h("div", Mt, [h("label", { class: b(m(U)) }, y(m(a).button.text), 3), _(J, {
456
- "model-value": e.block.text,
457
- type: "text",
458
- "onUpdate:modelValue": r[1] ||= (e) => c("text", e)
459
- }, null, 8, ["model-value"])]),
460
- h("div", Nt, [
461
- h("label", { class: b(m(U)) }, y(m(a).button.url), 3),
462
- _(J, {
463
- "model-value": e.block.url,
464
- type: "url",
465
- placeholder: m(a).button.urlPlaceholder,
466
- "onUpdate:modelValue": r[2] ||= (e) => c("url", e)
467
- }, null, 8, ["model-value", "placeholder"]),
468
- e.block.url ? (t(), x(q, {
469
- key: 0,
470
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
471
- "model-value": e.block.openInNewTab ?? !1,
472
- label: m(a).button.openInNewTab,
473
- "onUpdate:modelValue": r[3] ||= (e) => c("openInNewTab", e)
474
- }, null, 8, ["model-value", "label"])) : w("", !0)
475
- ]),
476
- h("div", Pt, [h("label", { class: b(m(U)) }, y(m(a).button.background), 3), _(V, {
477
- "model-value": e.block.backgroundColor,
478
- "allow-transparent": "",
479
- "onUpdate:modelValue": r[4] ||= (e) => c("backgroundColor", e)
480
- }, null, 8, ["model-value"])]),
481
- h("div", Ft, [h("label", { class: b(m(U)) }, y(m(a).button.textColor), 3), _(V, {
482
- "model-value": e.block.textColor,
483
- "onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
484
- }, null, 8, ["model-value"])]),
485
- _(xt, {
486
- "model-value": e.block.border,
487
- "testid-prefix": "button",
488
- "onUpdate:modelValue": r[6] ||= (e) => c("border", e)
489
- }, null, 8, ["model-value"]),
490
- _(Dt, {
491
- "model-value": e.block.borderRadius,
492
- label: m(a).button.borderRadius,
493
- max: 50,
494
- "testid-prefix": "button",
495
- "onUpdate:modelValue": r[7] ||= (e) => c("borderRadius", e)
496
- }, null, 8, ["model-value", "label"]),
497
- h("div", It, [h("label", { class: b(m(U)) }, y(m(a).button.fontSize), 3), h("div", Lt, [h("input", {
498
- type: "number",
499
- class: b(m(G)),
500
- value: e.block.fontSize,
501
- min: "10",
502
- max: "36",
503
- onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
504
- }, null, 42, Rt), h("span", { class: b(m(W)) }, "px", 2)])]),
505
- h("div", zt, [
506
- h("label", { class: b(m(U)) }, y(m(a).button.width), 3),
507
- h("select", {
508
- class: b(m(K)),
509
- value: s.value,
510
- onChange: r[9] ||= (e) => l(e.target.value)
511
- }, [
512
- h("option", Vt, y(m(a).button.widthAuto), 1),
513
- h("option", Ht, y(m(a).button.fullWidth), 1),
514
- h("option", Ut, y(m(a).button.widthCustom), 1)
515
- ], 42, Bt),
516
- s.value === "custom" ? (t(), g("div", Wt, [h("input", {
517
- type: "number",
518
- class: b(m(G)),
519
- value: typeof e.block.width == "number" ? e.block.width : qt,
520
- min: "20",
521
- onInput: r[10] ||= (e) => u(e.target.value)
522
- }, null, 42, Gt), h("span", { class: b(m(W)) }, "px", 2)])) : w("", !0)
523
- ]),
524
- h("div", Kt, [h("label", { class: b(m(U)) }, y(m(a).title.align), 3), _(Y, {
525
- options: [
526
- {
527
- value: "left",
528
- label: m(a).title.alignLeft
529
- },
530
- {
531
- value: "center",
532
- label: m(a).title.alignCenter
533
- },
534
- {
535
- value: "right",
536
- label: m(a).title.alignRight
537
- }
538
- ],
539
- "model-value": e.block.align ?? "center",
540
- "onUpdate:modelValue": r[11] ||= (e) => c("align", e)
541
- }, null, 8, ["options", "model-value"])])
542
- ], 64));
543
- }
544
- }), Yt = { class: "spacing-control" }, Xt = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Zt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Qt = { class: "tpl:flex tpl:items-center" }, $t = ["aria-label"], en = ["value", "aria-label"], tn = ["aria-label"], nn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, rn = { class: "tpl:flex tpl:items-center" }, an = ["aria-label"], on = ["value", "aria-label"], sn = ["aria-label"], cn = ["aria-label", "title"], ln = { class: "tpl:flex tpl:items-center" }, un = ["aria-label"], dn = ["value", "aria-label"], fn = ["aria-label"], pn = { class: "tpl:flex tpl:items-center" }, mn = ["aria-label"], hn = ["value", "aria-label"], gn = ["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)]", _n = "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)]", vn = /*#__PURE__*/ Xe(/* @__PURE__ */ T({
545
- __name: "SpacingControl",
546
- props: {
547
- modelValue: {},
548
- label: {}
549
- },
550
- emits: ["update:modelValue"],
551
- setup(e, { emit: n }) {
552
- let r = e, i = n, { t: a } = B(), o = C(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), s = f(o.value);
553
- c(o, (e) => {
554
- !e && s.value && (s.value = !1);
555
- });
556
- function l(e, t) {
557
- let n = r.modelValue[e], a = Math.max(0, n + t);
558
- s.value ? i("update:modelValue", {
559
- top: a,
560
- right: a,
561
- bottom: a,
562
- left: a
563
- }) : i("update:modelValue", {
564
- ...r.modelValue,
565
- [e]: a
566
- });
567
- }
568
- function u(e, t) {
569
- let n = Math.max(0, t);
570
- s.value ? i("update:modelValue", {
571
- top: n,
572
- right: n,
573
- bottom: n,
574
- left: n
575
- }) : i("update:modelValue", {
576
- ...r.modelValue,
577
- [e]: n
578
- });
579
- }
580
- function d() {
581
- if (s.value = !s.value, s.value) {
582
- let e = r.modelValue.top;
583
- i("update:modelValue", {
584
- top: e,
585
- right: e,
586
- bottom: e,
587
- left: e
588
- });
589
- }
590
- }
591
- return (n, r) => (t(), g("div", Yt, [h("label", Xt, y(e.label), 1), h("div", Zt, [
592
- h("div", Qt, [
593
- h("button", {
594
- "aria-label": m(a).spacingControl.decreaseTop,
595
- class: b([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
596
- onClick: r[0] ||= (e) => l("top", -1)
597
- }, [_(m(Le), {
598
- size: 12,
599
- "stroke-width": 2
600
- })], 10, $t),
601
- h("input", {
602
- type: "number",
603
- class: b(_n),
604
- value: e.modelValue.top,
605
- "aria-label": m(a).spacingControl.top,
606
- min: "0",
607
- onInput: r[1] ||= (e) => u("top", Number(e.target.value))
608
- }, null, 40, en),
609
- h("button", {
610
- "aria-label": m(a).spacingControl.increaseTop,
611
- class: b([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
612
- onClick: r[2] ||= (e) => l("top", 1)
613
- }, [_(m(H), {
614
- size: 12,
615
- "stroke-width": 2
616
- })], 10, tn)
617
- ]),
618
- h("div", nn, [
619
- h("div", rn, [
620
- h("button", {
621
- "aria-label": m(a).spacingControl.decreaseLeft,
622
- class: b([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
623
- onClick: r[3] ||= (e) => l("left", -1)
624
- }, [_(m(Le), {
625
- size: 12,
626
- "stroke-width": 2
627
- })], 10, an),
628
- h("input", {
629
- type: "number",
630
- class: b(_n),
631
- value: e.modelValue.left,
632
- "aria-label": m(a).spacingControl.left,
633
- min: "0",
634
- onInput: r[4] ||= (e) => u("left", Number(e.target.value))
635
- }, null, 40, on),
636
- h("button", {
637
- "aria-label": m(a).spacingControl.increaseLeft,
638
- class: b([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
639
- onClick: r[5] ||= (e) => l("left", 1)
640
- }, [_(m(H), {
641
- size: 12,
642
- "stroke-width": 2
643
- })], 10, sn)
644
- ]),
645
- h("button", {
646
- class: b(["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)]", s.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)]"]),
647
- "aria-label": s.value ? m(a).spacingControl.unlock : m(a).spacingControl.lockAll,
648
- title: s.value ? m(a).spacingControl.unlock : m(a).spacingControl.lockAll,
649
- onClick: d
650
- }, [s.value ? (t(), x(m(st), {
651
- key: 0,
652
- size: 14,
653
- "stroke-width": 2
654
- })) : (t(), x(m(ot), {
655
- key: 1,
656
- size: 14,
657
- "stroke-width": 2
658
- }))], 10, cn),
659
- h("div", ln, [
660
- h("button", {
661
- "aria-label": m(a).spacingControl.decreaseRight,
662
- class: b([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
663
- onClick: r[6] ||= (e) => l("right", -1)
664
- }, [_(m(Le), {
665
- size: 12,
666
- "stroke-width": 2
667
- })], 10, un),
668
- h("input", {
669
- type: "number",
670
- class: b(_n),
671
- value: e.modelValue.right,
672
- "aria-label": m(a).spacingControl.right,
673
- min: "0",
674
- onInput: r[7] ||= (e) => u("right", Number(e.target.value))
675
- }, null, 40, dn),
676
- h("button", {
677
- "aria-label": m(a).spacingControl.increaseRight,
678
- class: b([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
679
- onClick: r[8] ||= (e) => l("right", 1)
680
- }, [_(m(H), {
681
- size: 12,
682
- "stroke-width": 2
683
- })], 10, fn)
684
- ])
685
- ]),
686
- h("div", pn, [
687
- h("button", {
688
- "aria-label": m(a).spacingControl.decreaseBottom,
689
- class: b([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
690
- onClick: r[9] ||= (e) => l("bottom", -1)
691
- }, [_(m(Le), {
692
- size: 12,
693
- "stroke-width": 2
694
- })], 10, mn),
695
- h("input", {
696
- type: "number",
697
- class: b(_n),
698
- value: e.modelValue.bottom,
699
- "aria-label": m(a).spacingControl.bottom,
700
- min: "0",
701
- onInput: r[10] ||= (e) => u("bottom", Number(e.target.value))
702
- }, null, 40, hn),
703
- h("button", {
704
- "aria-label": m(a).spacingControl.increaseBottom,
705
- class: b([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
706
- onClick: r[11] ||= (e) => l("bottom", 1)
707
- }, [_(m(H), {
708
- size: 12,
709
- "stroke-width": 2
710
- })], 10, gn)
711
- ])
712
- ])]));
713
- }
714
- }), [["__scopeId", "data-v-69591c1e"]]);
715
- //#endregion
716
- //#region src/composables/useNaturalImageSize.ts
717
- function yn(e) {
718
- let t = f(null), n = () => {};
719
- return c(e, (e) => {
720
- n(), t.value = null, e && (n = de(e, (e) => {
721
- t.value = e;
722
- }));
723
- }, { immediate: !0 }), t;
724
- }
725
- function bn() {
726
- let e = l(Me, null);
727
- return async (t) => fe(e ? await xn(e, t) : t);
728
- }
729
- function xn(e, t) {
730
- let n = (e) => typeof e == "string" && e.length > 0 ? e : t;
731
- e.lookup(t);
732
- let r = e.get(t);
733
- return r === void 0 ? new Promise((r) => {
734
- let i = c(() => e.get(t), (e) => {
735
- e !== void 0 && (i(), r(n(e)));
736
- });
737
- }) : Promise.resolve(n(r));
738
- }
739
- //#endregion
740
- //#region src/components/toolbar/BackgroundImageControl.vue?vue&type=script&setup=true&lang.ts
741
- var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"], Tn = ["data-testid"], En = ["aria-label", "data-testid"], Dn = [
742
- "aria-label",
743
- "title",
744
- "aria-pressed",
745
- "data-testid",
746
- "onClick"
747
- ], On = ["data-testid"], kn = /* @__PURE__ */ T({
748
- __name: "BackgroundImageControl",
749
- props: {
750
- modelValue: {},
751
- testidPrefix: {},
752
- measure: { type: Boolean },
753
- heroMode: { type: Boolean }
754
- },
755
- emits: ["update:modelValue"],
756
- setup(e, { emit: n }) {
757
- let r = e, i = n, { t: s } = B(), c = l(Te, ie.liquid), u = C(() => typeof r.modelValue?.url == "string" ? r.modelValue.url : ""), d = C(() => u.value.trim() !== ""), p = bn(), T;
758
- a(() => clearTimeout(T));
759
- function E(e) {
760
- r.measure && !j(e, c) && (T = setTimeout(async () => {
761
- let t = await p(e), n = r.modelValue;
762
- t && n?.url === e && i("update:modelValue", {
763
- ...n,
764
- ...L(t)
765
- });
766
- }, 300));
767
- }
768
- function D(e, t = null) {
769
- if (clearTimeout(T), e.trim() === "") {
770
- i("update:modelValue", void 0);
771
- return;
772
- }
773
- let { naturalWidth: n, naturalHeight: a, ...o } = r.modelValue ?? ae(e), s = r.measure ? t : null;
774
- i("update:modelValue", {
775
- ...o,
776
- url: e,
777
- ...s ? L(s) : {}
778
- }), s || E(e);
779
- }
780
- function O(e) {
781
- r.modelValue && i("update:modelValue", {
782
- ...r.modelValue,
783
- ...e
784
- });
785
- }
786
- let k = C(() => [
787
- {
788
- value: "cover",
789
- label: s.blockSettings.backgroundSizeCover
790
- },
791
- {
792
- value: "contain",
793
- label: s.blockSettings.backgroundSizeContain
794
- },
795
- {
796
- value: "auto",
797
- label: s.blockSettings.backgroundSizeAuto
798
- }
799
- ]), A = C(() => ({
800
- "top-left": s.blockSettings.backgroundPositionTopLeft,
801
- "top-center": s.blockSettings.backgroundPositionTopCenter,
802
- "top-right": s.blockSettings.backgroundPositionTopRight,
803
- "center-left": s.blockSettings.backgroundPositionCenterLeft,
804
- "center-center": s.blockSettings.backgroundPositionCenter,
805
- "center-right": s.blockSettings.backgroundPositionCenterRight,
806
- "bottom-left": s.blockSettings.backgroundPositionBottomLeft,
807
- "bottom-center": s.blockSettings.backgroundPositionBottomCenter,
808
- "bottom-right": s.blockSettings.backgroundPositionBottomRight
809
- })), M = C(() => F.flatMap((e) => re.map((t) => ({
810
- x: t,
811
- y: e,
812
- label: A.value[`${e}-${t}`]
813
- }))));
814
- function N(e) {
815
- return r.modelValue?.position?.x === e.x && r.modelValue?.position?.y === e.y;
816
- }
817
- let P = f(), { canBrowse: ee, isUploading: te, showOverlay: ne, openMediaBrowser: I } = he({
818
- target: P,
819
- blocked: () => j(u.value, c),
820
- apply: (e) => D(e.url, pe(e.width, e.height))
821
- });
822
- return (n, r) => (t(), g("div", Sn, [h("div", null, [h("label", { class: b(m(U)) }, y(m(s).blockSettings.backgroundImage), 3), h("div", {
823
- ref_key: "dropZoneRef",
824
- ref: P,
825
- class: "tpl:relative",
826
- "data-testid": `${e.testidPrefix}-bg-url`
827
- }, [
828
- m(ne) ? (t(), x(ve, {
829
- key: 0,
830
- uploading: m(te)
831
- }, null, 8, ["uploading"])) : w("", !0),
832
- _(J, {
833
- "model-value": u.value,
834
- type: "url",
835
- placeholder: m(s).blockSettings.backgroundImagePlaceholder,
836
- "onUpdate:modelValue": D
837
- }, null, 8, ["model-value", "placeholder"]),
838
- m(ee) ? (t(), g("button", {
839
- key: 1,
840
- type: "button",
841
- "data-testid": `${e.testidPrefix}-bg-browse`,
842
- 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",
843
- style: {
844
- "border-color": "var(--tpl-border)",
845
- color: "var(--tpl-primary)",
846
- "background-color": "var(--tpl-bg)"
847
- },
848
- onClick: r[0] ||= (...e) => m(I) && m(I)(...e)
849
- }, [_(m(be), {
850
- size: 14,
851
- "stroke-width": 1.5
852
- }), v(" " + y(m(s).image.browseMedia), 1)], 8, wn)) : w("", !0)
853
- ], 8, Cn)]), d.value && e.modelValue ? (t(), g(S, { key: 0 }, [
854
- e.heroMode ? w("", !0) : (t(), g("div", {
855
- key: 0,
856
- "data-testid": `${e.testidPrefix}-bg-size`
857
- }, [h("label", { class: b(m(U)) }, y(m(s).blockSettings.backgroundSize), 3), _(Y, {
858
- options: k.value,
859
- "model-value": e.modelValue.size,
860
- "onUpdate:modelValue": r[1] ||= (e) => O({ size: e })
861
- }, null, 8, ["options", "model-value"])], 8, Tn)),
862
- h("div", null, [h("label", { class: b(m(U)) }, y(m(s).blockSettings.backgroundPosition), 3), h("div", {
863
- role: "group",
864
- "aria-label": m(s).blockSettings.backgroundPosition,
865
- "data-testid": `${e.testidPrefix}-bg-position`,
866
- class: "tpl:grid tpl:w-24 tpl:grid-cols-3 tpl:gap-1"
867
- }, [(t(!0), g(S, null, o(M.value, (n) => (t(), g("button", {
868
- key: `${n.y}-${n.x}`,
869
- type: "button",
870
- "aria-label": n.label,
871
- title: n.label,
872
- "aria-pressed": N(n),
873
- "data-testid": `${e.testidPrefix}-bg-position-${n.y}-${n.x}`,
874
- class: b(["tpl:flex tpl:h-6 tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:transition-colors", N(n) ? "tpl:border-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:hover:border-[var(--tpl-text-dim)]"]),
875
- onClick: (e) => O({ position: {
876
- x: n.x,
877
- y: n.y
878
- } })
879
- }, [h("span", { class: b(["tpl:block tpl:h-1.5 tpl:w-1.5 tpl:rounded-full", N(n) ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-text-dim)]"]) }, null, 2)], 10, Dn))), 128))], 8, En)]),
880
- e.heroMode ? w("", !0) : (t(), g("div", {
881
- key: 1,
882
- "data-testid": `${e.testidPrefix}-bg-repeat`
883
- }, [_(q, {
884
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
885
- "model-value": e.modelValue.repeat,
886
- label: m(s).blockSettings.backgroundRepeat,
887
- "onUpdate:modelValue": r[2] ||= (e) => O({ repeat: e })
888
- }, null, 8, ["model-value", "label"])], 8, On))
889
- ], 64)) : w("", !0)]));
890
- }
891
- }), An = ["data-testid"], jn = { class: "tpl:mt-3" }, Mn = /* @__PURE__ */ T({
892
- __name: "CollapsibleSection",
893
- props: {
894
- title: {},
895
- open: { type: Boolean },
896
- noBorder: { type: Boolean },
897
- headerTestId: {}
898
- },
899
- emits: ["toggle"],
900
- setup(e) {
901
- return (n, r) => (t(), g("div", { class: b(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [h("button", {
902
- type: "button",
903
- "data-testid": e.headerTestId,
904
- 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)]",
905
- onClick: r[0] ||= (e) => n.$emit("toggle")
906
- }, [_(m(Fe), {
907
- class: b(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
908
- size: 12,
909
- "stroke-width": 2
910
- }, null, 8, ["class"]), h("span", null, y(e.title), 1)], 8, An), u(h("div", jn, [s(n.$slots, "default")], 512), [[D, e.open]])], 2));
911
- }
912
- }), Nn = {
913
- key: 0,
914
- "data-testid": "section-hero-columns-note",
915
- class: "tpl:mt-3.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
916
- }, Pn = {
917
- key: 1,
918
- "data-testid": "section-hero",
919
- class: "tpl:mt-3.5 tpl:space-y-3.5"
920
- }, Fn = { "data-testid": "section-hero-height" }, In = {
921
- key: 0,
922
- class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
923
- }, Ln = {
924
- key: 1,
925
- class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
926
- }, Rn = {
927
- key: 1,
928
- "data-testid": "section-hero-align"
929
- }, zn = 300, Bn = /* @__PURE__ */ T({
930
- __name: "HeroControl",
931
- props: { section: {} },
932
- emits: ["update"],
933
- setup(e, { emit: n }) {
934
- function r(e) {
935
- return typeof e == "number" && Number.isFinite(e) && e >= 1;
936
- }
937
- let i = e, a = n, { t: o } = B(), s = l(Te, ie.liquid), c = l(De, null), u = l(Se, void 0), d = bn(), f = C(() => typeof i.section.backgroundImage?.url == "string" ? i.section.backgroundImage.url : ""), p = C(() => f.value.trim() !== ""), v = C(() => j(f.value, s)), S = C(() => i.section.hero), T = C(() => i.section.columns === "1"), E = C(() => S.value ? r(S.value.height) ? "fixed" : "image" : "fit"), D = C(() => r(S.value?.height) ? S.value.height : zn), k = C(() => [
938
- {
939
- value: "fit",
940
- label: o.blockSettings.heroHeightFit
941
- },
942
- {
943
- value: "image",
944
- label: o.blockSettings.heroHeightImage,
945
- disabled: v.value
946
- },
947
- {
948
- value: "fixed",
949
- label: o.blockSettings.heroHeightFixed
950
- }
951
- ]), A = C(() => [
952
- {
953
- value: "top",
954
- label: o.blockSettings.heroAlignTop
955
- },
956
- {
957
- value: "middle",
958
- label: o.blockSettings.heroAlignMiddle
959
- },
960
- {
961
- value: "bottom",
962
- label: o.blockSettings.heroAlignBottom
963
- }
964
- ]), M = C(() => E.value === "image" && p.value && !v.value && O(i.section.backgroundImage) === null);
965
- function N() {
966
- return (c ? _e(c.content.value, i.section.id, u) : null) ?? ue(c?.state.content.settings);
967
- }
968
- function P(e) {
969
- let t = S.value?.verticalAlign ?? "middle";
970
- if (e === "image") {
971
- E.value !== "image" && a("update", { hero: {
972
- height: "image",
973
- verticalAlign: t
974
- } }), F();
975
- return;
976
- }
977
- if (e === E.value) return;
978
- if (e === "fit") {
979
- a("update", { hero: void 0 });
980
- return;
981
- }
982
- let n = O(i.section.backgroundImage), r = n === null ? zn : Math.round(N() * n);
983
- a("update", { hero: {
984
- height: r,
985
- verticalAlign: t
986
- } });
987
- }
988
- async function F() {
989
- let e = i.section.backgroundImage;
990
- if (!e || !p.value || v.value || O(e) !== null) return;
991
- let t = e.url, n = await d(t), r = i.section.backgroundImage;
992
- n && r && r.url === t && a("update", { backgroundImage: {
993
- ...r,
994
- ...L(n)
995
- } });
996
- }
997
- function ee(e) {
998
- !S.value || !Number.isFinite(e) || e < 1 || a("update", { hero: {
999
- ...S.value,
1000
- height: Math.round(e)
1001
- } });
1002
- }
1003
- function te(e) {
1004
- S.value && a("update", { hero: {
1005
- ...S.value,
1006
- verticalAlign: e
1007
- } });
1008
- }
1009
- return (e, n) => !T.value && S.value ? (t(), g("p", Nn, y(m(o).section.heroNeedsOneColumn), 1)) : T.value && (p.value || S.value) ? (t(), g("div", Pn, [
1010
- h("div", Fn, [
1011
- h("label", { class: b(m(U)) }, y(m(o).blockSettings.heroHeight), 3),
1012
- _(Y, {
1013
- options: k.value,
1014
- "model-value": E.value,
1015
- "onUpdate:modelValue": P
1016
- }, null, 8, ["options", "model-value"]),
1017
- v.value ? (t(), g("p", In, y(m(o).blockSettings.heroMatchImageMergeTag), 1)) : M.value ? (t(), g("p", Ln, y(m(o).blockSettings.heroSizeUnknown), 1)) : w("", !0)
1018
- ]),
1019
- E.value === "fixed" ? (t(), x(X, {
1020
- key: 0,
1021
- "model-value": D.value,
1022
- min: 1,
1023
- suffix: "px",
1024
- testid: "section-hero-height-px",
1025
- "onUpdate:modelValue": ee
1026
- }, null, 8, ["model-value"])) : w("", !0),
1027
- S.value ? (t(), g("div", Rn, [h("label", { class: b(m(U)) }, y(m(o).blockSettings.heroAlign), 3), _(Y, {
1028
- options: A.value,
1029
- "model-value": S.value.verticalAlign,
1030
- "onUpdate:modelValue": te
1031
- }, null, 8, ["options", "model-value"])])) : w("", !0)
1032
- ])) : w("", !0);
1033
- }
1034
- }), Vn = { class: "tpl:space-y-2" }, Hn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Un = { class: "tpl:space-y-2" }, Wn = ["value"], Gn = { value: "" }, Kn = ["label"], qn = ["value"], Jn = ["value"], Yn = {
1035
- key: 0,
1036
- value: "__custom__"
1037
- }, Xn = {
1038
- key: 0,
1039
- class: "tpl:space-y-2"
1040
- }, Zn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, $n = { class: "tpl:flex tpl:justify-end" }, er = ["disabled"], tr = {
1041
- key: 0,
1042
- class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
1043
- }, nr = { class: "tpl:space-y-1" }, rr = { 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)]" }, ir = {
1044
- key: 0,
1045
- 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)]"
1046
- }, ar = /* @__PURE__ */ T({
1047
- __name: "CommonBlockSettings",
1048
- props: {
1049
- block: {},
1050
- isFirstSection: { type: Boolean }
1051
- },
1052
- emits: ["update"],
1053
- setup(e, { emit: n }) {
1054
- let a = e, s = n, { t: p } = B(), T = l(Oe, []), D = l(ke, !1), O = d(/* @__PURE__ */ new Set()), k = f(!1), A = f(""), j = f(""), M = [{
1055
- key: "desktop",
1056
- icon: He,
1057
- labelKey: "showOnDesktop"
1058
- }, {
1059
- key: "mobile",
1060
- icon: Ue,
1061
- labelKey: "showOnMobile"
1062
- }];
1063
- function N(e) {
1064
- O.has(e) ? O.delete(e) : O.add(e);
1065
- }
1066
- let P = C(() => T.length > 0 || D), F = C(() => a.block.displayCondition ? !T.some((e) => e.label === a.block.displayCondition?.label) : !1);
1067
- function ee() {
1068
- k.value = !0, F.value && a.block.displayCondition ? (A.value = a.block.displayCondition.before, j.value = a.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
1069
- }
1070
- function te() {
1071
- A.value.trim() && (s("update", { displayCondition: {
1072
- label: p.blockSettings.customCondition,
1073
- before: A.value.trim(),
1074
- after: j.value.trim()
1075
- } }), k.value = !1, A.value = "", j.value = "");
1076
- }
1077
- c(() => a.block.displayCondition, (e) => {
1078
- e ? F.value && (A.value = e.before, j.value = e.after ?? "") : (k.value = !1, A.value = "", j.value = "");
1079
- }, { immediate: !0 });
1080
- let re = C(() => {
1081
- let e = {};
1082
- for (let t of T) {
1083
- let n = t.group ?? "";
1084
- e[n] || (e[n] = []), e[n].push(t);
1085
- }
1086
- return e;
1087
- }), ie = C(() => a.block.type === "section" && ne(a.block)?.applied === !0);
1088
- function ae(e, t) {
1089
- s("update", { styles: {
1090
- ...a.block.styles,
1091
- [e]: t
1092
- } });
1093
- }
1094
- function I(e) {
1095
- return a.block.visibility?.[e] !== !1;
1096
- }
1097
- function oe(e) {
1098
- let t = {
1099
- desktop: I("desktop"),
1100
- mobile: I("mobile")
1101
- };
1102
- t[e] = !t[e], s("update", { visibility: t });
1103
- }
1104
- return (n, a) => (t(), g("div", { class: b(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
1105
- _(Mn, {
1106
- title: m(p).blockSettings.spacing,
1107
- open: O.has("spacing"),
1108
- "no-border": e.isFirstSection,
1109
- onToggle: a[1] ||= (e) => N("spacing")
1110
- }, {
1111
- default: r(() => [_(vn, {
1112
- label: m(p).blockSettings.padding,
1113
- "model-value": e.block.styles.padding,
1114
- "onUpdate:modelValue": a[0] ||= (e) => ae("padding", e)
1115
- }, null, 8, ["label", "model-value"])]),
1116
- _: 1
1117
- }, 8, [
1118
- "title",
1119
- "open",
1120
- "no-border"
1121
- ]),
1122
- _(Mn, {
1123
- title: m(p).blockSettings.background,
1124
- open: O.has("bg"),
1125
- "header-test-id": "block-settings-background",
1126
- onToggle: a[5] ||= (e) => N("bg")
1127
- }, {
1128
- default: r(() => [
1129
- h("label", { class: b(m(U)) }, y(m(p).blockSettings.color), 3),
1130
- _(V, {
1131
- "model-value": e.block.styles.backgroundColor ?? "",
1132
- "allow-transparent": "",
1133
- "onUpdate:modelValue": a[2] ||= (e) => ae("backgroundColor", e)
1134
- }, null, 8, ["model-value"]),
1135
- e.block.type === "section" ? (t(), x(kn, {
1136
- key: 0,
1137
- class: "tpl:mt-3.5",
1138
- "model-value": e.block.backgroundImage,
1139
- "testid-prefix": "section",
1140
- measure: "",
1141
- "hero-mode": ie.value,
1142
- "onUpdate:modelValue": a[3] ||= (e) => s("update", { backgroundImage: e })
1143
- }, null, 8, ["model-value", "hero-mode"])) : w("", !0),
1144
- e.block.type === "section" ? (t(), x(Bn, {
1145
- key: 1,
1146
- section: e.block,
1147
- onUpdate: a[4] ||= (e) => s("update", e)
1148
- }, null, 8, ["section"])) : w("", !0)
1149
- ]),
1150
- _: 1
1151
- }, 8, ["title", "open"]),
1152
- _(Mn, {
1153
- title: m(p).blockSettings.display,
1154
- open: O.has("display"),
1155
- onToggle: a[6] ||= (e) => N("display")
1156
- }, {
1157
- default: r(() => [h("div", Vn, [(t(), g(S, null, o(M, (e) => _(q, {
1158
- key: e.key,
1159
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
1160
- "model-value": I(e.key),
1161
- label: m(p).blockSettings[e.labelKey],
1162
- "onUpdate:modelValue": (t) => oe(e.key)
1163
- }, {
1164
- default: r(() => [h("span", Hn, [(t(), x(i(e.icon), {
1165
- size: 14,
1166
- "stroke-width": 1.5
1167
- })), v(" " + y(m(p).blockSettings[e.labelKey]), 1)])]),
1168
- _: 2
1169
- }, 1032, [
1170
- "model-value",
1171
- "label",
1172
- "onUpdate:modelValue"
1173
- ])), 64))])]),
1174
- _: 1
1175
- }, 8, ["title", "open"]),
1176
- P.value ? (t(), x(Mn, {
1177
- key: 0,
1178
- "header-test-id": "display-condition-section",
1179
- title: m(p).blockSettings.displayCondition,
1180
- open: O.has("condition"),
1181
- onToggle: a[10] ||= (e) => N("condition")
1182
- }, {
1183
- default: r(() => [h("div", Un, [h("select", {
1184
- "data-testid": "display-condition-select",
1185
- class: b(["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)]"]),
1186
- value: k.value || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
1187
- onChange: a[7] ||= (e) => {
1188
- let t = e.target.value;
1189
- if (t === "__custom__") {
1190
- ee();
1191
- return;
1192
- }
1193
- if (k.value = !1, !t) {
1194
- s("update", { displayCondition: void 0 });
1195
- return;
1196
- }
1197
- let n = m(T).find((e) => e.label === t);
1198
- n && s("update", { displayCondition: n });
1199
- }
1200
- }, [
1201
- h("option", Gn, y(m(p).blockSettings.noCondition), 1),
1202
- (t(!0), g(S, null, o(re.value, (e, n) => (t(), g(S, { key: n }, [n ? (t(), g("optgroup", {
1203
- key: 0,
1204
- label: String(n)
1205
- }, [(t(!0), g(S, null, o(e, (e) => (t(), g("option", {
1206
- key: e.label,
1207
- value: e.label
1208
- }, y(e.label), 9, qn))), 128))], 8, Kn)) : (t(!0), g(S, { key: 1 }, o(e, (e) => (t(), g("option", {
1209
- key: e.label,
1210
- value: e.label
1211
- }, y(e.label), 9, Jn))), 128))], 64))), 128)),
1212
- m(D) ? (t(), g("option", Yn, y(m(p).blockSettings.customCondition), 1)) : w("", !0)
1213
- ], 42, Wn), k.value || F.value ? (t(), g("div", Xn, [
1214
- h("div", null, [h("label", Zn, y(m(p).blockSettings.customConditionBefore), 1), u(h("textarea", {
1215
- "onUpdate:modelValue": a[8] ||= (e) => A.value = e,
1216
- rows: "2",
1217
- class: b(m(Qe))
1218
- }, null, 2), [[E, A.value]])]),
1219
- h("div", null, [h("label", Qn, y(m(p).blockSettings.customConditionAfter), 1), u(h("textarea", {
1220
- "onUpdate:modelValue": a[9] ||= (e) => j.value = e,
1221
- rows: "2",
1222
- class: b(m(Qe))
1223
- }, null, 2), [[E, j.value]])]),
1224
- h("div", $n, [h("button", {
1225
- type: "button",
1226
- class: b(m(nt)),
1227
- disabled: !A.value.trim(),
1228
- onClick: te
1229
- }, y(m(p).blockSettings.applyCondition), 11, er)])
1230
- ])) : e.block.displayCondition && !F.value ? (t(), g(S, { key: 1 }, [e.block.displayCondition.description ? (t(), g("p", tr, y(e.block.displayCondition.description), 1)) : w("", !0), h("div", nr, [h("pre", rr, y(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (t(), g("pre", ir, y(e.block.displayCondition.after), 1)) : w("", !0)])], 64)) : w("", !0)])]),
1231
- _: 1
1232
- }, 8, ["title", "open"])) : w("", !0)
1233
- ], 2));
1234
- }
1235
- }), or = ["title"], sr = /* @__PURE__ */ T({
1236
- __name: "BooleanField",
1237
- props: {
1238
- field: {},
1239
- modelValue: { type: Boolean },
1240
- readOnly: { type: Boolean }
1241
- },
1242
- emits: ["update:modelValue"],
1243
- setup(e, { emit: n }) {
1244
- let i = n, { t: a } = B();
1245
- return (n, o) => (t(), g("div", {
1246
- class: "tpl:mb-3.5",
1247
- title: e.readOnly ? m(a).customBlocks.dataSource.readOnlyTooltip : void 0
1248
- }, [_(q, {
1249
- class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
1250
- "model-value": e.modelValue,
1251
- label: e.field.label,
1252
- required: e.field.required,
1253
- disabled: e.readOnly,
1254
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1255
- }, {
1256
- default: r(() => [v(y(e.field.label) + " ", 1), e.readOnly ? (t(), x(m(st), {
1257
- key: 0,
1258
- size: 12,
1259
- class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
1260
- })) : w("", !0)]),
1261
- _: 1
1262
- }, 8, [
1263
- "model-value",
1264
- "label",
1265
- "required",
1266
- "disabled"
1267
- ])], 8, or));
1268
- }
1269
- }), cr = { class: "tpl:mb-3.5" }, lr = ["title"], ur = { class: "tpl-sr-only" }, dr = ["title"], fr = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ T({
1270
- __name: "FieldWrapper",
1271
- props: {
1272
- label: {},
1273
- required: { type: Boolean },
1274
- readOnly: { type: Boolean }
1275
- },
1276
- setup(e) {
1277
- let { t: n } = B();
1278
- return (r, i) => (t(), g("div", cr, [h("label", { class: b(m(U)) }, [
1279
- v(y(e.label) + " ", 1),
1280
- e.readOnly ? (t(), g("span", {
1281
- key: 0,
1282
- title: m(n).customBlocks.dataSource.readOnlyTooltip
1283
- }, [_(m(st), {
1284
- size: 12,
1285
- class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
1286
- "aria-hidden": "true"
1287
- }), h("span", ur, y(m(n).customBlocks.dataSource.readOnlyTooltip), 1)], 8, lr)) : w("", !0),
1288
- e.required ? (t(), g("span", {
1289
- key: 1,
1290
- class: "tpl:text-[var(--tpl-danger)]",
1291
- title: m(n).customBlocks.fields.required
1292
- }, [i[0] ||= h("span", { "aria-hidden": "true" }, "*", -1), h("span", fr, y(m(n).customBlocks.fields.required), 1)], 8, dr)) : w("", !0)
1293
- ], 2), s(r.$slots, "default")]));
1294
- }
1295
- }), pr = /* @__PURE__ */ T({
1296
- __name: "ColorField",
1297
- props: {
1298
- field: {},
1299
- modelValue: {},
1300
- readOnly: { type: Boolean }
1301
- },
1302
- emits: ["update:modelValue"],
1303
- setup(e, { emit: n }) {
1304
- let i = e, a = n, { t: o } = B(), s = l(Ee, Ne), c = C(() => ye(i.field, s));
1305
- return (n, i) => (t(), x(Q, {
1306
- label: e.field.label,
1307
- required: e.field.required,
1308
- "read-only": e.readOnly
1309
- }, {
1310
- default: r(() => [_(V, {
1311
- "model-value": e.modelValue,
1312
- placeholder: e.field.placeholder,
1313
- disabled: e.readOnly,
1314
- presets: c.value.presets,
1315
- "allow-custom": c.value.allowCustom,
1316
- title: e.readOnly ? m(o).customBlocks.dataSource.readOnlyTooltip : void 0,
1317
- "onUpdate:modelValue": i[0] ||= (e) => a("update:modelValue", e)
1318
- }, null, 8, [
1319
- "model-value",
1320
- "placeholder",
1321
- "disabled",
1322
- "presets",
1323
- "allow-custom",
1324
- "title"
1325
- ])]),
1326
- _: 1
1327
- }, 8, [
1328
- "label",
1329
- "required",
1330
- "read-only"
1331
- ]));
1332
- }
1333
- }), mr = [
1334
- "value",
1335
- "placeholder",
1336
- "title"
1337
- ], hr = ["value", "placeholder"], gr = /* @__PURE__ */ T({
1338
- __name: "ImageField",
1339
- props: {
1340
- field: {},
1341
- modelValue: {},
1342
- readOnly: { type: Boolean }
1343
- },
1344
- emits: ["update:modelValue"],
1345
- setup(e, { emit: n }) {
1346
- let i = e, a = n, { t: o } = B(), s = f(), { canBrowse: c, isUploading: l, showOverlay: u, openMediaBrowser: d } = he({
1347
- target: s,
1348
- blocked: () => !!i.readOnly,
1349
- apply: (e) => a("update:modelValue", e.url)
1350
- });
1351
- return (n, i) => (t(), x(Q, {
1352
- label: e.field.label,
1353
- required: e.field.required,
1354
- "read-only": e.readOnly
1355
- }, {
1356
- default: r(() => [h("div", {
1357
- ref_key: "dropZoneRef",
1358
- ref: s,
1359
- class: "tpl:relative"
1360
- }, [
1361
- m(u) ? (t(), x(ve, {
1362
- key: 0,
1363
- uploading: m(l)
1364
- }, null, 8, ["uploading"])) : w("", !0),
1365
- e.readOnly ? (t(), g("input", {
1366
- key: 1,
1367
- type: "url",
1368
- class: b([m(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1369
- value: e.modelValue,
1370
- placeholder: e.field.placeholder || "https://...",
1371
- disabled: "",
1372
- title: m(o).customBlocks.dataSource.readOnlyTooltip
1373
- }, null, 10, mr)) : (t(), g("input", {
1374
- key: 2,
1375
- type: "url",
1376
- class: b(m(K)),
1377
- value: e.modelValue,
1378
- placeholder: e.field.placeholder || "https://...",
1379
- onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
1380
- }, null, 42, hr)),
1381
- m(c) && !e.readOnly ? (t(), g("button", {
1382
- key: 3,
1383
- 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)]",
1384
- onClick: i[1] ||= (e) => m(d)()
1385
- }, [_(m(be), {
1386
- size: 14,
1387
- "stroke-width": 1.5
1388
- }), v(" " + y(m(o).image.browseMedia), 1)])) : w("", !0)
1389
- ], 512)]),
1390
- _: 1
1391
- }, 8, [
1392
- "label",
1393
- "required",
1394
- "read-only"
1395
- ]));
1396
- }
1397
- }), _r = [
1398
- "value",
1399
- "placeholder",
1400
- "min",
1401
- "max",
1402
- "step",
1403
- "disabled",
1404
- "title"
1405
- ], vr = /* @__PURE__ */ T({
1406
- __name: "NumberField",
1407
- props: {
1408
- field: {},
1409
- modelValue: {},
1410
- readOnly: { type: Boolean }
1411
- },
1412
- emits: ["update:modelValue"],
1413
- setup(e, { emit: n }) {
1414
- let i = n, { t: a } = B();
1415
- return (n, o) => (t(), x(Q, {
1416
- label: e.field.label,
1417
- required: e.field.required,
1418
- "read-only": e.readOnly
1419
- }, {
1420
- default: r(() => [h("input", {
1421
- type: "number",
1422
- class: b([m(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1423
- value: e.modelValue,
1424
- placeholder: e.field.placeholder,
1425
- min: e.field.min,
1426
- max: e.field.max,
1427
- step: e.field.step,
1428
- disabled: e.readOnly,
1429
- title: e.readOnly ? m(a).customBlocks.dataSource.readOnlyTooltip : void 0,
1430
- onInput: o[0] ||= (t) => !e.readOnly && i("update:modelValue", Number(t.target.value))
1431
- }, null, 42, _r)]),
1432
- _: 1
1433
- }, 8, [
1434
- "label",
1435
- "required",
1436
- "read-only"
1437
- ]));
1438
- }
1439
- }), yr = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, br = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, xr = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Sr = ["title", "onClick"], Cr = {
1440
- key: 1,
1441
- class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1442
- }, wr = {
1443
- key: 2,
1444
- class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1445
- }, Tr = /* @__PURE__ */ T({
1446
- __name: "RepeatableField",
1447
- props: {
1448
- field: {},
1449
- modelValue: {},
1450
- readOnly: { type: Boolean }
1451
- },
1452
- emits: ["update:modelValue"],
1453
- setup(e, { emit: n }) {
1454
- let a = e, s = n, { t: c, format: l } = B(), u = C(() => a.modelValue || []), d = C(() => !a.field.maxItems || u.value.length < a.field.maxItems), f = C(() => !a.field.minItems || u.value.length > a.field.minItems);
1455
- function p() {
1456
- if (!d.value || a.readOnly) return;
1457
- let e = {};
1458
- for (let t of a.field.fields) e[t.key] = t.default ?? "";
1459
- s("update:modelValue", [...u.value, e]);
1460
- }
1461
- function T(e) {
1462
- if (!f.value || a.readOnly) return;
1463
- let t = [...u.value];
1464
- t.splice(e, 1), s("update:modelValue", t);
1465
- }
1466
- function E(e, t, n) {
1467
- let r = u.value.map((r, i) => i === e ? {
1468
- ...r,
1469
- [t]: n
1470
- } : r);
1471
- s("update:modelValue", r);
1472
- }
1473
- return (n, a) => (t(), x(Q, {
1474
- label: e.field.label,
1475
- required: e.field.required,
1476
- "read-only": e.readOnly
1477
- }, {
1478
- default: r(() => [h("div", yr, [
1479
- (t(!0), g(S, null, o(u.value, (n, r) => (t(), g("div", {
1480
- key: `${e.field.key}-${r}`,
1481
- class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
1482
- }, [h("div", br, [h("span", xr, " #" + y(r + 1), 1), f.value && !e.readOnly ? (t(), g("button", {
1483
- key: 0,
1484
- type: "button",
1485
- 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)]",
1486
- title: m(c).customBlocks.fields.removeItem,
1487
- onClick: (e) => T(r)
1488
- }, [_(m(Je), {
1489
- size: 12,
1490
- "stroke-width": 2
1491
- })], 8, Sr)) : w("", !0)]), (t(!0), g(S, null, o(e.field.fields, (a) => (t(), x(i(m(Pr)(a.type)), {
1492
- key: a.key,
1493
- field: a,
1494
- "model-value": n[a.key],
1495
- "read-only": e.readOnly,
1496
- "onUpdate:modelValue": (e) => E(r, a.key, e)
1497
- }, null, 8, [
1498
- "field",
1499
- "model-value",
1500
- "read-only",
1501
- "onUpdate:modelValue"
1502
- ]))), 128))]))), 128)),
1503
- d.value && !e.readOnly ? (t(), g("button", {
1504
- key: 0,
1505
- type: "button",
1506
- class: b(m(et)),
1507
- onClick: p
1508
- }, [_(m(H), {
1509
- size: 14,
1510
- "stroke-width": 2
1511
- }), v(" " + y(m(c).customBlocks.fields.addItem), 1)], 2)) : w("", !0),
1512
- !d.value && !e.readOnly ? (t(), g("p", Cr, y(m(c).customBlocks.fields.maxItemsReached), 1)) : w("", !0),
1513
- !f.value && !e.readOnly ? (t(), g("p", wr, y(m(l)(m(c).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : w("", !0)
1514
- ])]),
1515
- _: 1
1516
- }, 8, [
1517
- "label",
1518
- "required",
1519
- "read-only"
1520
- ]));
1521
- }
1522
- }), Er = [
1523
- "value",
1524
- "disabled",
1525
- "title"
1526
- ], Dr = ["value"], Or = /* @__PURE__ */ T({
1527
- __name: "SelectField",
1528
- props: {
1529
- field: {},
1530
- modelValue: {},
1531
- readOnly: { type: Boolean }
1532
- },
1533
- emits: ["update:modelValue"],
1534
- setup(e, { emit: n }) {
1535
- let i = n, { t: a } = B();
1536
- return (n, s) => (t(), x(Q, {
1537
- label: e.field.label,
1538
- required: e.field.required,
1539
- "read-only": e.readOnly
1540
- }, {
1541
- default: r(() => [h("select", {
1542
- class: b([m(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
1543
- value: e.modelValue,
1544
- disabled: e.readOnly,
1545
- title: e.readOnly ? m(a).customBlocks.dataSource.readOnlyTooltip : void 0,
1546
- onChange: s[0] ||= (t) => !e.readOnly && i("update:modelValue", t.target.value)
1547
- }, [(t(!0), g(S, null, o(e.field.options, (e) => (t(), g("option", {
1548
- key: e.value,
1549
- value: e.value
1550
- }, y(e.label), 9, Dr))), 128))], 42, Er)]),
1551
- _: 1
1552
- }, 8, [
1553
- "label",
1554
- "required",
1555
- "read-only"
1556
- ]));
1557
- }
1558
- }), kr = [
1559
- "value",
1560
- "placeholder",
1561
- "title"
1562
- ], Ar = /* @__PURE__ */ T({
1563
- __name: "TextField",
1564
- props: {
1565
- field: {},
1566
- modelValue: {},
1567
- readOnly: { type: Boolean }
1568
- },
1569
- emits: ["update:modelValue"],
1570
- setup(e, { emit: n }) {
1571
- let i = n, { t: a } = B();
1572
- return (n, o) => (t(), x(Q, {
1573
- label: e.field.label,
1574
- required: e.field.required,
1575
- "read-only": e.readOnly
1576
- }, {
1577
- default: r(() => [e.readOnly ? (t(), g("input", {
1578
- key: 0,
1579
- type: "text",
1580
- class: b([m(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
1581
- value: e.modelValue,
1582
- placeholder: e.field.placeholder,
1583
- disabled: "",
1584
- title: m(a).customBlocks.dataSource.readOnlyTooltip
1585
- }, null, 10, kr)) : (t(), x(J, {
1586
- key: 1,
1587
- "model-value": e.modelValue,
1588
- placeholder: e.field.placeholder,
1589
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1590
- }, null, 8, ["model-value", "placeholder"]))]),
1591
- _: 1
1592
- }, 8, [
1593
- "label",
1594
- "required",
1595
- "read-only"
1596
- ]));
1597
- }
1598
- }), jr = [
1599
- "value",
1600
- "placeholder",
1601
- "title"
1602
- ], Mr = "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", Nr = {
1603
- text: Ar,
1604
- textarea: /* @__PURE__ */ T({
1605
- __name: "TextareaField",
1606
- props: {
1607
- field: {},
1608
- modelValue: {},
1609
- readOnly: { type: Boolean }
1610
- },
1611
- emits: ["update:modelValue"],
1612
- setup(e, { emit: n }) {
1613
- let i = n, { t: a } = B();
1614
- return (n, o) => (t(), x(Q, {
1615
- label: e.field.label,
1616
- required: e.field.required,
1617
- "read-only": e.readOnly
1618
- }, {
1619
- default: r(() => [e.readOnly ? (t(), g("textarea", {
1620
- key: 0,
1621
- value: e.modelValue,
1622
- placeholder: e.field.placeholder,
1623
- rows: "3",
1624
- disabled: "",
1625
- title: m(a).customBlocks.dataSource.readOnlyTooltip,
1626
- class: b(Mr)
1627
- }, null, 8, jr)) : (t(), x(rt, {
1628
- key: 1,
1629
- "model-value": e.modelValue,
1630
- placeholder: e.field.placeholder,
1631
- "onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
1632
- }, null, 8, ["model-value", "placeholder"]))]),
1633
- _: 1
1634
- }, 8, [
1635
- "label",
1636
- "required",
1637
- "read-only"
1638
- ]));
1639
- }
1640
- }),
1641
- image: gr,
1642
- color: pr,
1643
- number: vr,
1644
- select: Or,
1645
- boolean: sr,
1646
- repeatable: Tr
1647
- };
1648
- function Pr(e) {
1649
- return Nr[e] ?? Ar;
1650
- }
1651
- //#endregion
1652
- //#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
1653
- var Fr = {
1654
- key: 0,
1655
- class: "tpl:p-4"
1656
- }, Ir = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Lr = { key: 1 }, Rr = {
1657
- key: 0,
1658
- class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
1659
- }, zr = {
1660
- key: 1,
1661
- class: "tpl:mb-4"
1662
- }, Br = {
1663
- key: 1,
1664
- class: "tpl:flex tpl:h-[32px] tpl:items-center"
1665
- }, Vr = {
1666
- key: 0,
1667
- class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
1668
- }, Hr = {
1669
- key: 2,
1670
- class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
1671
- }, Ur = /* @__PURE__ */ T({
1672
- __name: "CustomBlockToolbar",
1673
- props: { block: {} },
1674
- emits: ["updateFieldValues", "updateDataSourceFetched"],
1675
- setup(e, { emit: n }) {
1676
- let r = e, a = n, { t: s } = B(), c = l(Ae, []), u = C(() => c.find((e) => e.type === r.block.customType)), d = C(() => r.block), { isFetching: f, fetchError: p, fetch: b, hasDataSource: T, needsFetch: E } = se({
1677
- definition: u,
1678
- block: d,
1679
- onUpdate: (e, t) => {
1680
- a("updateFieldValues", e), a("updateDataSourceFetched", t);
1681
- }
1682
- });
1683
- function D(e) {
1684
- return e.readOnly === !0 && T.value && !!r.block.dataSourceFetched;
1685
- }
1686
- function O(e, t) {
1687
- a("updateFieldValues", {
1688
- ...r.block.fieldValues,
1689
- [e]: t
1690
- });
1691
- }
1692
- return (n, r) => u.value ? (t(), g("div", Lr, [
1693
- u.value.description ? (t(), g("p", Rr, y(u.value.description), 1)) : w("", !0),
1694
- m(T) ? (t(), g("div", zr, [m(E) && !m(f) ? (t(), g("button", {
1695
- key: 0,
1696
- type: "button",
1697
- 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)]",
1698
- onClick: r[0] ||= (...e) => m(b) && m(b)(...e)
1699
- }, y(u.value?.dataSource?.label || m(s).customBlocks.dataSource.fetchButton), 1)) : (t(), g("div", Br, [m(f) ? (t(), g("div", Vr, y(m(s).customBlocks.dataSource.fetching), 1)) : (t(), g("button", {
1700
- key: 1,
1701
- type: "button",
1702
- 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)]",
1703
- onClick: r[1] ||= (...e) => m(b) && m(b)(...e)
1704
- }, [_(m(We), { size: 12 }), v(" " + y(m(s).customBlocks.dataSource.changeButton), 1)]))])), m(p) ? (t(), g("p", Hr, [_(m(Ie), {
1705
- size: 14,
1706
- class: "tpl:shrink-0"
1707
- }), v(" " + y(m(s).customBlocks.dataSource.fetchError), 1)])) : w("", !0)])) : w("", !0),
1708
- (t(!0), g(S, null, o(u.value.fields, (n) => (t(), x(i(m(Pr)(n.type)), {
1709
- key: n.key,
1710
- field: n,
1711
- "model-value": e.block.fieldValues[n.key],
1712
- "read-only": D(n),
1713
- "onUpdate:modelValue": (e) => O(n.key, e)
1714
- }, null, 8, [
1715
- "field",
1716
- "model-value",
1717
- "read-only",
1718
- "onUpdate:modelValue"
1719
- ]))), 128))
1720
- ])) : (t(), g("div", Fr, [h("p", Ir, y(m(s).customBlocks.toolbar.noDefinition), 1)]));
1721
- }
1722
- }), Wr = { class: "tpl:mb-3.5" }, Gr = { class: "tpl:mb-3.5" }, Kr = { class: "tpl:mb-3.5" }, qr = { class: "tpl:flex tpl:items-stretch" }, Jr = ["value"], Yr = /* @__PURE__ */ T({
1723
- __name: "DividerToolbar",
1724
- props: { block: {} },
1725
- emits: ["update"],
1726
- setup(e, { emit: n }) {
1727
- let r = n, { t: i } = B();
1728
- function a(e, t) {
1729
- r("update", { [e]: t });
1730
- }
1731
- return (n, r) => (t(), g(S, null, [
1732
- h("div", Wr, [h("label", { class: b(m(U)) }, y(m(i).divider.style), 3), _(Y, {
1733
- options: [
1734
- {
1735
- value: "solid",
1736
- label: m(i).divider.solid
1737
- },
1738
- {
1739
- value: "dashed",
1740
- label: m(i).divider.dashed
1741
- },
1742
- {
1743
- value: "dotted",
1744
- label: m(i).divider.dotted
1745
- }
1746
- ],
1747
- "model-value": e.block.lineStyle,
1748
- "onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
1749
- }, null, 8, ["options", "model-value"])]),
1750
- h("div", Gr, [h("label", { class: b(m(U)) }, y(m(i).divider.color), 3), _(V, {
1751
- "model-value": e.block.color,
1752
- "onUpdate:modelValue": r[1] ||= (e) => a("color", e)
1753
- }, null, 8, ["model-value"])]),
1754
- h("div", Kr, [h("label", { class: b(m(U)) }, y(m(i).divider.thickness), 3), h("div", qr, [h("input", {
1755
- type: "number",
1756
- class: b(m(G)),
1757
- value: e.block.thickness,
1758
- min: "1",
1759
- max: "10",
1760
- onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
1761
- }, null, 42, Jr), h("span", { class: b(m(W)) }, "px", 2)])])
1762
- ], 64));
1763
- }
1764
- }), Xr = { class: "tpl:mb-3.5" }, Zr = ["value"], Qr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $r = /* @__PURE__ */ T({
1765
- __name: "HtmlToolbar",
1766
- props: { block: {} },
1767
- emits: ["update"],
1768
- setup(e, { emit: n }) {
1769
- let r = n, { t: i } = B();
1770
- return (n, a) => (t(), g("div", Xr, [
1771
- h("label", { class: b(m(U)) }, y(m(i).html.content), 3),
1772
- h("textarea", {
1773
- value: e.block.content,
1774
- placeholder: "<div>...</div>",
1775
- rows: "10",
1776
- class: b(m(Qe)),
1777
- onInput: a[0] ||= (e) => r("update", { content: e.target.value })
1778
- }, null, 42, Zr),
1779
- h("p", Qr, [_(m(Be), {
1780
- size: 12,
1781
- class: "tpl:mt-0.5 tpl:shrink-0"
1782
- }), v(" " + y(m(i).html.sanitizationHint), 1)])
1783
- ]));
1784
- }
1785
- });
1786
- //#endregion
1787
- //#region src/composables/useImageAspectLock.ts
1788
- function ei(e) {
1789
- let t = f(!1), n = f(null);
1790
- c(() => e.block().id, () => {
1791
- t.value = !1, n.value = null;
1792
- });
1793
- let r = C(() => ge(e.block()) ?? e.measured()), i = C(() => {
1794
- let t = e.block().width;
1795
- return t === "full" ? e.room() : t;
1796
- }), a = C(() => {
1797
- let e = r.value, t = i.value;
1798
- return !e || t === null ? null : Math.round(t * e.height / e.width);
1799
- }), o = C(() => r.value !== null), s = C(() => {
1800
- let t = e.block().height;
1801
- return t === void 0 || a.value !== null && Math.abs(a.value - t) <= 1;
1802
- }), l = C(() => o.value && !t.value && s.value);
1803
- function u() {
1804
- if (ge(e.block())) return {};
1805
- let t = e.measured();
1806
- return t ? L(t) : {};
1807
- }
1808
- function d(r) {
1809
- if (n.value = null, !r) return t.value = !0, null;
1810
- if (t.value = !1, !o.value) return null;
1811
- let i = { ...u() };
1812
- return e.block().height !== void 0 && (i.height = void 0), Object.keys(i).length > 0 ? i : null;
1813
- }
1814
- function p(e) {
1815
- return n.value = null, l.value ? {
1816
- width: e,
1817
- height: void 0,
1818
- ...u()
1819
- } : { width: e };
1820
- }
1821
- function m(t) {
1822
- let i = r.value;
1823
- if (!l.value || !i || !Number.isFinite(t) || t <= 0) return null;
1824
- let a = Math.round(t * i.width / i.height);
1825
- if (a < 1) return null;
1826
- let o = e.room();
1827
- return o !== null && a >= o ? (n.value = Math.round(o * i.height / i.width), {
1828
- width: "full",
1829
- height: void 0,
1830
- ...u()
1831
- }) : (n.value = null, {
1832
- width: a,
1833
- height: void 0,
1834
- ...u()
1835
- });
1836
- }
1837
- return {
1838
- available: o,
1839
- locked: l,
1840
- derivedHeight: a,
1841
- cappedHeight: n,
1842
- setLocked: d,
1843
- widthUpdates: p,
1844
- heightUpdates: m
1845
- };
1846
- }
1847
- //#endregion
1848
- //#region src/components/toolbar/ImageToolbar.vue?vue&type=script&setup=true&lang.ts
1849
- var ti = { class: "tpl:mb-3.5" }, ni = {
1850
- key: 0,
1851
- class: "tpl:mb-3.5"
1852
- }, ri = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ii = [
1853
- "value",
1854
- "placeholder",
1855
- "title"
1856
- ], ai = { class: "tpl:mb-3.5" }, oi = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, si = { class: "tpl:mb-3.5" }, ci = ["value"], li = { value: "full" }, ui = { value: "custom" }, di = {
1857
- key: 0,
1858
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1859
- }, fi = ["value"], pi = { class: "tpl:mb-3.5" }, mi = {
1860
- key: 0,
1861
- class: "tpl:mb-1.5 tpl:flex tpl:items-center tpl:justify-between"
1862
- }, hi = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, gi = { class: "tpl:flex tpl:items-stretch" }, _i = ["value"], vi = {
1863
- key: 0,
1864
- class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
1865
- role: "status",
1866
- "data-testid": "image-height-capped"
1867
- }, yi = ["value"], bi = { value: "auto" }, xi = { value: "custom" }, Si = {
1868
- key: 4,
1869
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
1870
- }, Ci = ["value"], wi = { class: "tpl:mb-3.5" }, Ti = { class: "tpl:mb-3.5" }, Ei = 350, Di = 200, Oi = /* @__PURE__ */ T({
1871
- __name: "ImageToolbar",
1872
- props: { block: {} },
1873
- emits: ["update"],
1874
- setup(e, { emit: n }) {
1875
- let i = e, a = n, { t: o, format: s } = B(), c = l(Te, ie.liquid), u = l(De, null), d = l(Se, void 0), p = f(!1), T = f(!1), { start: E } = xe(() => {
1876
- p.value = !1, T.value = !1;
1877
- }, 1e3, { immediate: !1 }), D = [
1878
- 300,
1879
- 400,
1880
- 500
1881
- ], O = C(() => {
1882
- let e = i.block.width;
1883
- return e === "full" ? "full" : D.includes(e) ? String(e) : "custom";
1884
- }), k = C(() => typeof i.block.height == "number" ? "custom" : "auto");
1885
- function A(e, t) {
1886
- a("update", { [e]: t });
1887
- }
1888
- function M(e) {
1889
- if (e === "custom") {
1890
- let e = i.block.width;
1891
- (typeof e != "number" || D.includes(e)) && a("update", R.widthUpdates(Ei));
1892
- } else a("update", R.widthUpdates(e === "full" ? "full" : Number(e)));
1893
- }
1894
- function N(e) {
1895
- A("height", e === "custom" ? Di : void 0);
1896
- }
1897
- function P(e) {
1898
- let t = Number(e);
1899
- !Number.isFinite(t) || t <= 0 || A("height", t);
1900
- }
1901
- function F(e) {
1902
- A("borderRadius", I(e) === null ? void 0 : e);
1903
- }
1904
- function ee(e) {
1905
- let t = Number(e);
1906
- !Number.isFinite(t) || t <= 0 || a("update", R.widthUpdates(t));
1907
- }
1908
- function te(e) {
1909
- e !== i.block.src && a("update", {
1910
- src: e,
1911
- ...L(null)
1912
- });
1913
- }
1914
- function ne(e) {
1915
- a("update", {
1916
- src: e.url,
1917
- ...L(pe(e.width, e.height))
1918
- }), e.alt && (A("alt", e.alt), T.value = !0), p.value = !0, E();
1919
- }
1920
- let re = f(), ae = C(() => j(i.block.src, c)), { canBrowse: oe, isUploading: se, showOverlay: le, openMediaBrowser: ue } = he({
1921
- target: re,
1922
- blocked: ae,
1923
- apply: ne
1924
- }), de = ce(() => ae.value || !i.block.src || ge(i.block) ? void 0 : i.block.src), fe = yn(() => de.value), _e = C(() => u ? me(u.content.value, i.block.id, d) : null), R = ei({
1925
- block: () => i.block,
1926
- room: () => _e.value,
1927
- measured: () => fe.value
1928
- }), { available: ye, locked: z, derivedHeight: Ce, cappedHeight: we } = R;
1929
- function Ee() {
1930
- let e = R.setLocked(!z.value);
1931
- e && a("update", e);
1932
- }
1933
- let Oe = f(null);
1934
- function ke(e) {
1935
- Oe.value = e;
1936
- let t = R.heightUpdates(Number(e));
1937
- t && a("update", t);
1938
- }
1939
- return (n, i) => (t(), g(S, null, [
1940
- h("div", ti, [h("label", { class: b(m(U)) }, y(m(o).image.imageUrl), 3), h("div", {
1941
- ref_key: "dropZoneRef",
1942
- ref: re,
1943
- class: "tpl:relative"
1944
- }, [
1945
- m(le) ? (t(), x(ve, {
1946
- key: 0,
1947
- uploading: m(se)
1948
- }, null, 8, ["uploading"])) : w("", !0),
1949
- _(J, {
1950
- "model-value": e.block.src,
1951
- type: "url",
1952
- placeholder: m(o).image.imageUrlPlaceholder,
1953
- pulse: p.value,
1954
- "onUpdate:modelValue": i[0] ||= (e) => te(e)
1955
- }, null, 8, [
1956
- "model-value",
1957
- "placeholder",
1958
- "pulse"
1959
- ]),
1960
- m(oe) ? (t(), g("button", {
1961
- key: 1,
1962
- 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",
1963
- style: {
1964
- "border-color": "var(--tpl-border)",
1965
- color: "var(--tpl-primary)",
1966
- "background-color": "var(--tpl-bg)"
1967
- },
1968
- onClick: i[1] ||= (...e) => m(ue) && m(ue)(...e)
1969
- }, [_(m(be), {
1970
- size: 14,
1971
- "stroke-width": 1.5
1972
- }), v(" " + y(m(o).image.browseMedia), 1)])) : w("", !0)
1973
- ], 512)]),
1974
- m(j)(e.block.src, m(c)) ? (t(), g("div", ni, [h("label", { class: b(m(U)) }, [v(y(m(o).image.placeholderUrl) + " ", 1), h("span", ri, y(m(o).image.optional), 1)], 2), h("input", {
1975
- type: "url",
1976
- class: b(m(K)),
1977
- value: e.block.placeholderUrl || "",
1978
- placeholder: m(o).image.placeholderUrlPlaceholder,
1979
- title: m(o).image.placeholderUrlTooltip,
1980
- onInput: i[2] ||= (e) => A("placeholderUrl", e.target.value)
1981
- }, null, 42, ii)])) : w("", !0),
1982
- h("div", ai, [
1983
- h("label", { class: b(m(U)) }, y(m(o).image.altText), 3),
1984
- _(J, {
1985
- "model-value": e.block.alt,
1986
- type: "text",
1987
- placeholder: m(o).image.altTextPlaceholder,
1988
- pulse: T.value,
1989
- disabled: e.block.decorative === !0,
1990
- "onUpdate:modelValue": i[3] ||= (e) => A("alt", e)
1991
- }, null, 8, [
1992
- "model-value",
1993
- "placeholder",
1994
- "pulse",
1995
- "disabled"
1996
- ]),
1997
- _(q, {
1998
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
1999
- "model-value": e.block.decorative === !0,
2000
- label: m(o).image.decorative,
2001
- "onUpdate:modelValue": i[4] ||= (e) => A("decorative", e)
2002
- }, {
2003
- default: r(() => [h("span", null, [v(y(m(o).image.decorative) + " ", 1), h("span", oi, y(m(o).image.decorativeHint), 1)])]),
2004
- _: 1
2005
- }, 8, ["model-value", "label"])
2006
- ]),
2007
- h("div", si, [
2008
- h("label", { class: b(m(U)) }, y(m(o).image.width), 3),
2009
- h("select", {
2010
- class: b(m(K)),
2011
- "data-testid": "image-width-mode",
2012
- value: O.value,
2013
- onChange: i[5] ||= (e) => M(e.target.value)
2014
- }, [
2015
- h("option", li, y(m(o).image.fullWidth), 1),
2016
- i[15] ||= h("option", { value: "300" }, "300px", -1),
2017
- i[16] ||= h("option", { value: "400" }, "400px", -1),
2018
- i[17] ||= h("option", { value: "500" }, "500px", -1),
2019
- h("option", ui, y(m(o).image.widthCustom), 1)
2020
- ], 42, ci),
2021
- O.value === "custom" ? (t(), g("div", di, [h("input", {
2022
- type: "number",
2023
- "data-testid": "image-width-input",
2024
- class: b(m(G)),
2025
- value: typeof e.block.width == "number" ? e.block.width : Ei,
2026
- min: "20",
2027
- onInput: i[6] ||= (e) => ee(e.target.value)
2028
- }, null, 42, fi), h("span", { class: b(m(W)) }, "px", 2)])) : w("", !0)
2029
- ]),
2030
- h("div", pi, [
2031
- m(ye) ? (t(), g("div", mi, [h("span", hi, y(m(o).image.height), 1), _(mt, {
2032
- linked: m(z),
2033
- "link-label": m(o).image.lockAspectRatio,
2034
- "unlink-label": m(o).image.unlockAspectRatio,
2035
- testid: "image-aspect-lock",
2036
- onToggle: Ee
2037
- }, null, 8, [
2038
- "linked",
2039
- "link-label",
2040
- "unlink-label"
2041
- ])])) : (t(), g("label", {
2042
- key: 1,
2043
- class: b(m(U))
2044
- }, y(m(o).image.height), 3)),
2045
- m(z) ? (t(), g(S, { key: 2 }, [h("div", gi, [h("input", {
2046
- type: "number",
2047
- "data-testid": "image-locked-height-input",
2048
- class: b(m(G)),
2049
- value: Oe.value ?? m(Ce) ?? "",
2050
- min: "1",
2051
- onInput: i[7] ||= (e) => ke(e.target.value),
2052
- onBlur: i[8] ||= (e) => Oe.value = null
2053
- }, null, 42, _i), h("span", { class: b(m(W)) }, "px", 2)]), m(we) === null ? w("", !0) : (t(), g("p", vi, y(m(s)(m(o).image.heightCapped, { height: m(we) })), 1))], 64)) : w("", !0),
2054
- m(z) ? w("", !0) : (t(), g("select", {
2055
- key: 3,
2056
- class: b(m(K)),
2057
- "data-testid": "image-height-mode",
2058
- value: k.value,
2059
- onChange: i[9] ||= (e) => N(e.target.value)
2060
- }, [h("option", bi, y(m(o).image.heightAuto), 1), h("option", xi, y(m(o).image.heightCustom), 1)], 42, yi)),
2061
- !m(z) && k.value === "custom" ? (t(), g("div", Si, [h("input", {
2062
- type: "number",
2063
- "data-testid": "image-height-input",
2064
- class: b(m(G)),
2065
- value: e.block.height,
2066
- min: "20",
2067
- onInput: i[10] ||= (e) => P(e.target.value)
2068
- }, null, 42, Ci), h("span", { class: b(m(W)) }, "px", 2)])) : w("", !0)
2069
- ]),
2070
- _(Dt, {
2071
- "model-value": e.block.borderRadius,
2072
- label: m(o).image.borderRadius,
2073
- "testid-prefix": "image",
2074
- "onUpdate:modelValue": F
2075
- }, null, 8, ["model-value", "label"]),
2076
- _(xt, {
2077
- "model-value": e.block.border,
2078
- "testid-prefix": "image",
2079
- "onUpdate:modelValue": i[11] ||= (e) => A("border", e)
2080
- }, null, 8, ["model-value"]),
2081
- h("div", wi, [h("label", { class: b(m(U)) }, y(m(o).title.align), 3), _(Y, {
2082
- options: [
2083
- {
2084
- value: "left",
2085
- label: m(o).title.alignLeft
2086
- },
2087
- {
2088
- value: "center",
2089
- label: m(o).title.alignCenter
2090
- },
2091
- {
2092
- value: "right",
2093
- label: m(o).title.alignRight
2094
- }
2095
- ],
2096
- "model-value": e.block.align,
2097
- "onUpdate:modelValue": i[12] ||= (e) => A("align", e)
2098
- }, null, 8, ["options", "model-value"])]),
2099
- h("div", Ti, [
2100
- h("label", { class: b(m(U)) }, y(m(o).image.linkUrl), 3),
2101
- _(J, {
2102
- "model-value": e.block.linkUrl || "",
2103
- type: "url",
2104
- placeholder: m(o).image.imageUrlPlaceholder,
2105
- "onUpdate:modelValue": i[13] ||= (e) => A("linkUrl", e)
2106
- }, null, 8, ["model-value", "placeholder"]),
2107
- e.block.linkUrl ? (t(), x(q, {
2108
- key: 0,
2109
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2110
- "model-value": e.block.linkOpenInNewTab ?? !1,
2111
- label: m(o).image.openInNewTab,
2112
- "onUpdate:modelValue": i[14] ||= (e) => A("linkOpenInNewTab", e)
2113
- }, null, 8, ["model-value", "label"])) : w("", !0)
2114
- ])
2115
- ], 64));
2116
- }
2117
- }), ki = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ T({
2118
- __name: "FieldRow",
2119
- props: { label: {} },
2120
- setup(e) {
2121
- return (n, r) => (t(), g("div", ki, [e.label ? (t(), g("label", {
2122
- key: 0,
2123
- class: b(m(U))
2124
- }, y(e.label), 3)) : w("", !0), s(n.$slots, "default")]));
2125
- }
2126
- }), Ai = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ji = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Mi = [
2127
- "value",
2128
- "placeholder",
2129
- "onInput"
2130
- ], Ni = ["title", "onClick"], Pi = { 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)]" }, Fi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ii = ["value"], Li = { value: "" }, Ri = ["value"], zi = ["value"], Bi = /* @__PURE__ */ T({
2131
- __name: "MenuToolbar",
2132
- props: {
2133
- block: {},
2134
- fontFamilies: {}
2135
- },
2136
- emits: ["update"],
2137
- setup(e, { emit: n }) {
2138
- let i = e, a = n, { t: s } = B(), c = C(() => [
2139
- {
2140
- key: "openInNewTab",
2141
- label: s.menu.openInNewTab
2142
- },
2143
- {
2144
- key: "bold",
2145
- label: s.menu.bold
2146
- },
2147
- {
2148
- key: "underline",
2149
- label: s.menu.underline
2150
- }
2151
- ]), l = C(() => [
2152
- {
2153
- value: "left",
2154
- label: s.title.alignLeft,
2155
- icon: qe
2156
- },
2157
- {
2158
- value: "center",
2159
- label: s.title.alignCenter,
2160
- icon: Ke
2161
- },
2162
- {
2163
- value: "right",
2164
- label: s.title.alignRight,
2165
- icon: Ge
2166
- }
2167
- ]);
2168
- function u(e, t) {
2169
- a("update", { [e]: t });
2170
- }
2171
- function d() {
2172
- let e = {
2173
- id: k(),
2174
- text: "",
2175
- url: "",
2176
- openInNewTab: !1,
2177
- bold: !1,
2178
- underline: !1
2179
- };
2180
- a("update", { items: [...i.block.items, e] });
2181
- }
2182
- function f(e, t, n) {
2183
- let r = i.block.items.map((r) => r.id === e ? {
2184
- ...r,
2185
- [t]: n
2186
- } : r);
2187
- a("update", { items: r });
2188
- }
2189
- function p(e) {
2190
- a("update", { items: i.block.items.filter((t) => t.id !== e) });
2191
- }
2192
- return (n, i) => (t(), g(S, null, [
2193
- _($, { label: m(s).menu.items }, {
2194
- default: r(() => [h("div", Ai, [(t(!0), g(S, null, o(e.block.items, (n) => (t(), g("div", {
2195
- key: n.id,
2196
- 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"
2197
- }, [
2198
- h("div", ji, [h("input", {
2199
- type: "text",
2200
- class: b([m(K), "tpl:flex-1"]),
2201
- value: n.text,
2202
- placeholder: m(s).menu.text,
2203
- onInput: (e) => f(n.id, "text", e.target.value)
2204
- }, null, 42, Mi), h("button", {
2205
- class: b(m($e)),
2206
- title: m(s).menu.removeItem,
2207
- onClick: (e) => p(n.id)
2208
- }, [_(m(Ye), {
2209
- size: 14,
2210
- "stroke-width": 2
2211
- })], 10, Ni)]),
2212
- _(J, {
2213
- "model-value": n.url,
2214
- type: "url",
2215
- placeholder: m(s).menu.urlPlaceholder,
2216
- "onUpdate:modelValue": (e) => f(n.id, "url", e)
2217
- }, null, 8, [
2218
- "model-value",
2219
- "placeholder",
2220
- "onUpdate:modelValue"
2221
- ]),
2222
- h("div", Pi, [(t(!0), g(S, null, o(c.value, (e) => (t(), x(q, {
2223
- key: e.key,
2224
- "model-value": n[e.key],
2225
- label: e.label,
2226
- "onUpdate:modelValue": (t) => f(n.id, e.key, t)
2227
- }, null, 8, [
2228
- "model-value",
2229
- "label",
2230
- "onUpdate:modelValue"
2231
- ]))), 128))]),
2232
- h("div", Fi, [h("label", { class: b([m(U), "tpl:!mb-0"]) }, y(m(s).menu.color), 3), _(V, {
2233
- "swatch-only": "",
2234
- "model-value": n.color || e.block.linkColor || e.block.color || "",
2235
- "onUpdate:modelValue": (e) => f(n.id, "color", e)
2236
- }, null, 8, ["model-value", "onUpdate:modelValue"])])
2237
- ]))), 128)), h("button", {
2238
- class: b(m(et)),
2239
- onClick: d
2240
- }, [_(m(H), {
2241
- size: 14,
2242
- "stroke-width": 2
2243
- }), v(" " + y(m(s).menu.addItem), 1)], 2)])]),
2244
- _: 1
2245
- }, 8, ["label"]),
2246
- _($, { label: m(s).menu.fontFamily }, {
2247
- default: r(() => [h("select", {
2248
- class: b(m(K)),
2249
- value: m(at)(e.block.fontFamily),
2250
- onChange: i[0] ||= (e) => u("fontFamily", e.target.value || void 0)
2251
- }, [h("option", Li, y(m(s).title.inheritFont), 1), (t(!0), g(S, null, o(e.fontFamilies, (e) => (t(), g("option", {
2252
- key: e.value,
2253
- value: e.value
2254
- }, y(e.label), 9, Ri))), 128))], 42, Ii)]),
2255
- _: 1
2256
- }, 8, ["label"]),
2257
- _($, { label: m(s).menu.fontSize }, {
2258
- default: r(() => [_(X, {
2259
- "model-value": e.block.fontSize,
2260
- min: 8,
2261
- max: 48,
2262
- suffix: "px",
2263
- "onUpdate:modelValue": i[1] ||= (e) => u("fontSize", e)
2264
- }, null, 8, ["model-value"])]),
2265
- _: 1
2266
- }, 8, ["label"]),
2267
- _($, { label: m(s).menu.color }, {
2268
- default: r(() => [_(V, {
2269
- "model-value": e.block.color ?? "",
2270
- "onUpdate:modelValue": i[2] ||= (e) => u("color", e || void 0)
2271
- }, null, 8, ["model-value"])]),
2272
- _: 1
2273
- }, 8, ["label"]),
2274
- _($, { label: m(s).menu.linkColor }, {
2275
- default: r(() => [_(V, {
2276
- "model-value": e.block.linkColor || e.block.color || "",
2277
- "onUpdate:modelValue": i[3] ||= (e) => u("linkColor", e || void 0)
2278
- }, null, 8, ["model-value"])]),
2279
- _: 1
2280
- }, 8, ["label"]),
2281
- _($, { label: m(s).menu.textAlign }, {
2282
- default: r(() => [_(Y, {
2283
- options: l.value,
2284
- "model-value": e.block.textAlign,
2285
- "onUpdate:modelValue": i[4] ||= (e) => u("textAlign", e)
2286
- }, null, 8, ["options", "model-value"])]),
2287
- _: 1
2288
- }, 8, ["label"]),
2289
- _($, { label: m(s).menu.separator }, {
2290
- default: r(() => [h("input", {
2291
- type: "text",
2292
- class: b(m(K)),
2293
- value: e.block.separator,
2294
- onInput: i[5] ||= (e) => u("separator", e.target.value)
2295
- }, null, 42, zi)]),
2296
- _: 1
2297
- }, 8, ["label"]),
2298
- _($, { label: m(s).menu.separatorColor }, {
2299
- default: r(() => [_(V, {
2300
- "model-value": e.block.separatorColor,
2301
- "onUpdate:modelValue": i[6] ||= (e) => u("separatorColor", e)
2302
- }, null, 8, ["model-value"])]),
2303
- _: 1
2304
- }, 8, ["label"]),
2305
- _($, { label: m(s).menu.spacing }, {
2306
- default: r(() => [_(X, {
2307
- "model-value": e.block.spacing,
2308
- min: 0,
2309
- max: 50,
2310
- suffix: "px",
2311
- "onUpdate:modelValue": i[7] ||= (e) => u("spacing", e)
2312
- }, null, 8, ["model-value"])]),
2313
- _: 1
2314
- }, 8, ["label"])
2315
- ], 64));
2316
- }
2317
- }), Vi = {
2318
- class: "tpl:mb-3.5",
2319
- "data-testid": "paragraph-spacing"
2320
- }, Hi = { class: "tpl:flex tpl:items-stretch" }, Ui = ["value"], Wi = /* @__PURE__ */ T({
2321
- __name: "ParagraphToolbar",
2322
- props: { block: {} },
2323
- emits: ["update"],
2324
- setup(e, { emit: n }) {
2325
- let r = n, { t: i } = B();
2326
- return (n, a) => (t(), g("div", Vi, [h("label", { class: b(m(U)) }, y(m(i).paragraph.paragraphSpacing), 3), h("div", Hi, [h("input", {
2327
- type: "number",
2328
- class: b(m(G)),
2329
- value: e.block.paragraphSpacing ?? m(N).paragraphGap,
2330
- min: "0",
2331
- max: "64",
2332
- onInput: a[0] ||= (e) => r("update", { paragraphSpacing: Number(e.target.value) })
2333
- }, null, 42, Ui), h("span", { class: b(m(W)) }, "px", 2)])]));
2334
- }
2335
- });
2336
- //#endregion
2337
- //#region src/utils/rebalanceColumnChildren.ts
2338
- function Gi(e) {
2339
- return e === "1" ? 1 : e === "3" ? 3 : 2;
2340
- }
2341
- function Ki(e, t) {
2342
- let n = Gi(t);
2343
- if (e.length === n) return e;
2344
- if (e.length < n) {
2345
- let t = Array.from({ length: n - e.length }, () => []);
2346
- return [...e, ...t];
2347
- }
2348
- let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
2349
- return [...r.slice(0, n - 1), a];
2350
- }
2351
- //#endregion
2352
- //#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
2353
- var qi = { class: "tpl:mb-3.5" }, Ji = ["value"], Yi = ["value"], Xi = {
2354
- key: 0,
2355
- class: "tpl:mb-3.5"
2356
- }, Zi = {
2357
- key: 2,
2358
- class: "tpl:mb-3.5"
2359
- }, Qi = {
2360
- key: 0,
2361
- class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
2362
- }, $i = {
2363
- key: 1,
2364
- class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
2365
- }, ea = /* @__PURE__ */ T({
2366
- __name: "SectionToolbar",
2367
- props: { block: {} },
2368
- emits: ["update"],
2369
- setup(e, { emit: n }) {
2370
- let r = e, i = n, { t: a } = B(), s = l(Se, void 0), c = l(Ce, void 0), u = s !== void 0 && ee(s), d = C(() => c !== !1 || !!r.block.wrapper), f = C(() => u && !r.block.wrapper), p = C(() => u && d.value), v = C(() => ne(r.block)?.applied === !0), T = C(() => [
2371
- {
2372
- value: "1",
2373
- label: a.section.column1
2374
- },
2375
- {
2376
- value: "2",
2377
- label: a.section.column2
2378
- },
2379
- {
2380
- value: "3",
2381
- label: a.section.column3
2382
- },
2383
- {
2384
- value: "1-2",
2385
- label: a.section.ratio12
2386
- },
2387
- {
2388
- value: "2-1",
2389
- label: a.section.ratio21
2390
- }
2391
- ]);
2392
- function E(e) {
2393
- let t = e.target.value, n = Ki(r.block.children, t);
2394
- i("update", {
2395
- columns: t,
2396
- children: n
2397
- });
2398
- }
2399
- function D(e) {
2400
- i("update", { stackOnMobile: e });
2401
- }
2402
- function O(e) {
2403
- i("update", { borderRadius: e });
2404
- }
2405
- function k(e) {
2406
- i("update", { wrapper: e ? { padding: {
2407
- top: 20,
2408
- right: 20,
2409
- bottom: 20,
2410
- left: 20
2411
- } } : void 0 });
2412
- }
2413
- function A(e) {
2414
- i("update", { wrapper: {
2415
- ...r.block.wrapper,
2416
- ...e
2417
- } });
2418
- }
2419
- function j(e) {
2420
- A({ padding: e });
2421
- }
2422
- function M(e) {
2423
- A({ borderRadius: e });
2424
- }
2425
- return (n, r) => (t(), g(S, null, [
2426
- h("div", qi, [h("label", { class: b(m(U)) }, y(m(a).section.columns), 3), h("select", {
2427
- class: b(m(K)),
2428
- value: e.block.columns,
2429
- onChange: E
2430
- }, [(t(!0), g(S, null, o(T.value, (e) => (t(), g("option", {
2431
- key: e.value,
2432
- value: e.value
2433
- }, y(e.label), 9, Yi))), 128))], 42, Ji)]),
2434
- e.block.columns === "1" ? w("", !0) : (t(), g("div", Xi, [_(q, {
2435
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2436
- "model-value": e.block.stackOnMobile !== !1,
2437
- label: m(a).section.stackOnMobile,
2438
- "onUpdate:modelValue": r[0] ||= (e) => D(e)
2439
- }, null, 8, ["model-value", "label"])])),
2440
- _(Dt, {
2441
- "model-value": e.block.borderRadius,
2442
- label: m(a).section.borderRadius,
2443
- max: 50,
2444
- "testid-prefix": "section",
2445
- "onUpdate:modelValue": O
2446
- }, null, 8, ["model-value", "label"]),
2447
- v.value ? w("", !0) : (t(), x(xt, {
2448
- key: 1,
2449
- "model-value": e.block.border,
2450
- "testid-prefix": "section",
2451
- "onUpdate:modelValue": r[1] ||= (e) => i("update", { border: e })
2452
- }, null, 8, ["model-value"])),
2453
- d.value ? (t(), g("div", Zi, [
2454
- _(q, {
2455
- class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
2456
- "model-value": !!e.block.wrapper,
2457
- label: m(a).section.wrapperEnable,
2458
- disabled: f.value,
2459
- "onUpdate:modelValue": r[2] ||= (e) => k(e)
2460
- }, null, 8, [
2461
- "model-value",
2462
- "label",
2463
- "disabled"
2464
- ]),
2465
- p.value ? (t(), g("p", Qi, y(m(a).section.wrapperLayoutConflict), 1)) : w("", !0),
2466
- e.block.wrapper ? (t(), g("div", $i, [
2467
- h("div", null, [h("label", { class: b(m(U)) }, y(m(a).blockSettings.color), 3), _(V, {
2468
- "model-value": e.block.wrapper.backgroundColor ?? "",
2469
- "allow-transparent": "",
2470
- "onUpdate:modelValue": r[3] ||= (e) => A({ backgroundColor: e })
2471
- }, null, 8, ["model-value"])]),
2472
- _(kn, {
2473
- "model-value": e.block.wrapper.backgroundImage,
2474
- "testid-prefix": "section-wrapper",
2475
- "onUpdate:modelValue": r[4] ||= (e) => A({ backgroundImage: e })
2476
- }, null, 8, ["model-value"]),
2477
- _(vn, {
2478
- label: m(a).blockSettings.padding,
2479
- "model-value": e.block.wrapper.padding ?? {
2480
- top: 0,
2481
- right: 0,
2482
- bottom: 0,
2483
- left: 0
2484
- },
2485
- "onUpdate:modelValue": j
2486
- }, null, 8, ["label", "model-value"]),
2487
- _(Dt, {
2488
- "model-value": e.block.wrapper.borderRadius,
2489
- label: m(a).section.borderRadius,
2490
- max: 50,
2491
- "testid-prefix": "section-wrapper",
2492
- "onUpdate:modelValue": M
2493
- }, null, 8, ["model-value", "label"])
2494
- ])) : w("", !0)
2495
- ])) : w("", !0)
2496
- ], 64));
2497
- }
2498
- }), ta = { class: "tpl:mb-3.5" }, na = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ra = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ia = ["value", "onChange"], aa = ["value"], oa = ["title", "onClick"], sa = { class: "tpl:mb-3.5" }, ca = ["value"], la = { value: "solid" }, ua = { value: "outlined" }, da = { value: "rounded" }, fa = { value: "square" }, pa = { value: "circle" }, ma = { value: "plain" }, ha = { class: "tpl:mb-3.5" }, ga = ["value"], _a = { value: "brand" }, va = { value: "dark" }, ya = { value: "light" }, ba = { class: "tpl:mb-3.5" }, xa = { class: "tpl:mb-3.5" }, Sa = { class: "tpl:flex tpl:items-stretch" }, Ca = ["value"], wa = { class: "tpl:mb-3.5" }, Ta = /* @__PURE__ */ T({
2499
- __name: "SocialToolbar",
2500
- props: { block: {} },
2501
- emits: ["update"],
2502
- setup(e, { emit: n }) {
2503
- let r = e, i = n, { t: a } = B();
2504
- function s(e, t) {
2505
- i("update", { [e]: t });
2506
- }
2507
- function c() {
2508
- let e = {
2509
- id: k(),
2510
- platform: "facebook",
2511
- url: ""
2512
- };
2513
- i("update", { icons: [...r.block.icons, e] });
2514
- }
2515
- function l(e, t, n) {
2516
- let a = r.block.icons.map((r) => r.id === e ? {
2517
- ...r,
2518
- [t]: n
2519
- } : r);
2520
- i("update", { icons: a });
2521
- }
2522
- function u(e) {
2523
- i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
2524
- }
2525
- return (n, r) => (t(), g(S, null, [
2526
- h("div", ta, [h("label", { class: b(m(U)) }, y(m(a).social.icons), 3), h("div", na, [(t(!0), g(S, null, o(e.block.icons, (e) => (t(), g("div", {
2527
- key: e.id,
2528
- 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"
2529
- }, [h("div", ra, [h("select", {
2530
- "data-testid": "social-platform-select",
2531
- class: b([m(K), "tpl:flex-1"]),
2532
- value: e.platform,
2533
- onChange: (t) => l(e.id, "platform", t.target.value)
2534
- }, [(t(!0), g(S, null, o(m(R), (e) => (t(), g("option", {
2535
- key: e,
2536
- value: e
2537
- }, y(m(a).social.platforms[e]), 9, aa))), 128))], 42, ia), h("button", {
2538
- class: b(m($e)),
2539
- title: m(a).social.removeIcon,
2540
- onClick: (t) => u(e.id)
2541
- }, [_(m(Ye), {
2542
- size: 14,
2543
- "stroke-width": 2
2544
- })], 10, oa)]), _(J, {
2545
- "model-value": e.url,
2546
- type: "url",
2547
- placeholder: m(a).social.urlPlaceholder,
2548
- "onUpdate:modelValue": (t) => l(e.id, "url", t)
2549
- }, null, 8, [
2550
- "model-value",
2551
- "placeholder",
2552
- "onUpdate:modelValue"
2553
- ])]))), 128)), h("button", {
2554
- class: b(m(et)),
2555
- onClick: c
2556
- }, [_(m(H), {
2557
- size: 14,
2558
- "stroke-width": 2
2559
- }), v(" " + y(m(a).social.addIcon), 1)], 2)])]),
2560
- h("div", sa, [h("label", { class: b(m(U)) }, y(m(a).social.style), 3), h("select", {
2561
- class: b(m(K)),
2562
- value: e.block.iconStyle,
2563
- onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
2564
- }, [
2565
- h("option", la, y(m(a).social.styleSolid), 1),
2566
- h("option", ua, y(m(a).social.styleOutlined), 1),
2567
- h("option", da, y(m(a).social.styleRounded), 1),
2568
- h("option", fa, y(m(a).social.styleSquare), 1),
2569
- h("option", pa, y(m(a).social.styleCircle), 1),
2570
- h("option", ma, y(m(a).social.stylePlain), 1)
2571
- ], 42, ca)]),
2572
- h("div", ha, [h("label", { class: b(m(U)) }, y(m(a).social.color), 3), h("select", {
2573
- "data-testid": "social-tone-select",
2574
- class: b(m(K)),
2575
- value: e.block.iconTone ?? "brand",
2576
- onChange: r[1] ||= (e) => s("iconTone", e.target.value)
2577
- }, [
2578
- h("option", _a, y(m(a).social.colorBrand), 1),
2579
- h("option", va, y(m(a).social.colorDark), 1),
2580
- h("option", ya, y(m(a).social.colorLight), 1)
2581
- ], 42, ga)]),
2582
- h("div", ba, [h("label", { class: b(m(U)) }, y(m(a).social.size), 3), _(Y, {
2583
- options: [
2584
- {
2585
- value: "small",
2586
- label: m(a).social.sizeSmall
2587
- },
2588
- {
2589
- value: "medium",
2590
- label: m(a).social.sizeMedium
2591
- },
2592
- {
2593
- value: "large",
2594
- label: m(a).social.sizeLarge
2595
- }
2596
- ],
2597
- "model-value": e.block.iconSize,
2598
- "onUpdate:modelValue": r[2] ||= (e) => s("iconSize", e)
2599
- }, null, 8, ["options", "model-value"])]),
2600
- h("div", xa, [h("label", { class: b(m(U)) }, y(m(a).social.spacing), 3), h("div", Sa, [h("input", {
2601
- type: "number",
2602
- class: b(m(G)),
2603
- value: e.block.spacing,
2604
- min: "0",
2605
- max: "50",
2606
- onInput: r[3] ||= (e) => s("spacing", Number(e.target.value))
2607
- }, null, 42, Ca), h("span", { class: b(m(W)) }, "px", 2)])]),
2608
- h("div", wa, [h("label", { class: b(m(U)) }, y(m(a).social.align), 3), _(Y, {
2609
- options: [
2610
- {
2611
- value: "left",
2612
- label: m(a).title.alignLeft,
2613
- icon: m(qe)
2614
- },
2615
- {
2616
- value: "center",
2617
- label: m(a).title.alignCenter,
2618
- icon: m(Ke)
2619
- },
2620
- {
2621
- value: "right",
2622
- label: m(a).title.alignRight,
2623
- icon: m(Ge)
2624
- }
2625
- ],
2626
- "model-value": e.block.align,
2627
- "onUpdate:modelValue": r[4] ||= (e) => s("align", e)
2628
- }, null, 8, ["options", "model-value"])])
2629
- ], 64));
2630
- }
2631
- }), Ea = { class: "tpl:mb-3.5" }, Da = { class: "tpl:flex tpl:items-stretch" }, Oa = ["value"], ka = ["value"], Aa = /* @__PURE__ */ T({
2632
- __name: "SpacerToolbar",
2633
- props: { block: {} },
2634
- emits: ["update"],
2635
- setup(e, { emit: n }) {
2636
- let r = n, { t: i } = B();
2637
- return (n, a) => (t(), g("div", Ea, [
2638
- h("label", { class: b(m(U)) }, y(m(i).spacer.height), 3),
2639
- h("div", Da, [h("input", {
2640
- type: "number",
2641
- class: b(m(G)),
2642
- value: e.block.height,
2643
- min: "10",
2644
- max: "100",
2645
- onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
2646
- }, null, 42, Oa), h("span", { class: b(m(W)) }, "px", 2)]),
2647
- h("input", {
2648
- type: "range",
2649
- class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
2650
- value: e.block.height,
2651
- min: "10",
2652
- max: "100",
2653
- onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
2654
- }, null, 40, ka)
2655
- ]));
2656
- }
2657
- }), ja = { class: "tpl:mb-3.5" }, Ma = { class: "tpl:flex tpl:items-center tpl:gap-3" }, Na = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, Pa = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Fa = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ia = ["disabled"], La = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ra = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, za = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ba = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Va = ["disabled"], Ha = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ua = { class: "tpl:mb-3.5" }, Wa = {
2658
- key: 0,
2659
- class: "tpl:mb-3.5"
2660
- }, Ga = { class: "tpl:mb-3.5" }, Ka = { class: "tpl:mb-3.5" }, qa = { class: "tpl:flex tpl:items-stretch" }, Ja = ["value"], Ya = { class: "tpl:mb-3.5" }, Xa = { class: "tpl:flex tpl:items-stretch" }, Za = ["value"], Qa = { class: "tpl:mb-3.5" }, $a = ["value"], eo = { value: "" }, to = ["value"], no = { class: "tpl:mb-3.5" }, ro = { class: "tpl:flex tpl:items-stretch" }, io = ["value"], ao = { class: "tpl:mb-3.5" }, oo = { class: "tpl:mb-3.5" }, so = /* @__PURE__ */ T({
2661
- __name: "TableToolbar",
2662
- props: {
2663
- block: {},
2664
- fontFamilies: {}
2665
- },
2666
- emits: ["update"],
2667
- setup(e, { emit: n }) {
2668
- let r = e, i = n, { t: a } = B(), s = C(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
2669
- function c(e, t) {
2670
- i("update", { [e]: t });
2671
- }
2672
- function l() {
2673
- let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
2674
- id: k(),
2675
- cells: Array.from({ length: e }, () => ({
2676
- id: k(),
2677
- content: ""
2678
- }))
2679
- };
2680
- i("update", { rows: [...r.block.rows, t] });
2681
- }
2682
- function u(e) {
2683
- i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
2684
- }
2685
- function d() {
2686
- let e = r.block.rows.map((e) => ({
2687
- ...e,
2688
- cells: [...e.cells, {
2689
- id: k(),
2690
- content: ""
2691
- }]
2692
- }));
2693
- i("update", { rows: e });
2694
- }
2695
- function f(e) {
2696
- let t = r.block.rows.map((t) => ({
2697
- ...t,
2698
- cells: t.cells.filter((t, n) => n !== e)
2699
- }));
2700
- i("update", { rows: t });
2701
- }
2702
- return (n, r) => (t(), g(S, null, [
2703
- h("div", ja, [h("label", { class: b(m(U)) }, y(m(a).table.dimensions), 3), h("div", Ma, [h("div", Na, [h("span", Pa, y(m(a).table.rows), 1), h("div", Fa, [
2704
- h("button", {
2705
- 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",
2706
- disabled: e.block.rows.length <= 1,
2707
- onClick: r[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
2708
- }, [_(m(Le), {
2709
- size: 12,
2710
- "stroke-width": 2
2711
- })], 8, Ia),
2712
- h("span", La, y(e.block.rows.length), 1),
2713
- h("button", {
2714
- 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)]",
2715
- onClick: l
2716
- }, [_(m(H), {
2717
- size: 12,
2718
- "stroke-width": 2
2719
- })])
2720
- ])]), h("div", Ra, [h("span", za, y(m(a).table.columns), 1), h("div", Ba, [
2721
- h("button", {
2722
- 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",
2723
- disabled: s.value <= 1,
2724
- onClick: r[1] ||= (e) => f(s.value - 1)
2725
- }, [_(m(Le), {
2726
- size: 12,
2727
- "stroke-width": 2
2728
- })], 8, Va),
2729
- h("span", Ha, y(s.value), 1),
2730
- h("button", {
2731
- 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)]",
2732
- onClick: d
2733
- }, [_(m(H), {
2734
- size: 12,
2735
- "stroke-width": 2
2736
- })])
2737
- ])])])]),
2738
- h("div", Ua, [_(q, {
2739
- class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
2740
- "model-value": e.block.hasHeaderRow,
2741
- label: m(a).table.hasHeaderRow,
2742
- "onUpdate:modelValue": r[2] ||= (e) => c("hasHeaderRow", e)
2743
- }, null, 8, ["model-value", "label"])]),
2744
- e.block.hasHeaderRow ? (t(), g("div", Wa, [h("label", { class: b(m(U)) }, y(m(a).table.headerBackgroundColor), 3), _(V, {
2745
- "model-value": e.block.headerBackgroundColor ?? "",
2746
- "seed-color": m(tt),
2747
- placeholder: m(a).table.noHeaderBg,
2748
- "onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
2749
- }, null, 8, [
2750
- "model-value",
2751
- "seed-color",
2752
- "placeholder"
2753
- ])])) : w("", !0),
2754
- h("div", Ga, [h("label", { class: b(m(U)) }, y(m(a).table.borderColor), 3), _(V, {
2755
- "model-value": e.block.borderColor,
2756
- "onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
2757
- }, null, 8, ["model-value"])]),
2758
- h("div", Ka, [h("label", { class: b(m(U)) }, y(m(a).table.borderWidth), 3), h("div", qa, [h("input", {
2759
- type: "number",
2760
- class: b(m(G)),
2761
- value: e.block.borderWidth,
2762
- min: "0",
2763
- max: "10",
2764
- onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
2765
- }, null, 42, Ja), h("span", { class: b(m(W)) }, "px", 2)])]),
2766
- h("div", Ya, [h("label", { class: b(m(U)) }, y(m(a).table.cellPadding), 3), h("div", Xa, [h("input", {
2767
- type: "number",
2768
- class: b(m(G)),
2769
- value: e.block.cellPadding,
2770
- min: "0",
2771
- max: "30",
2772
- onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
2773
- }, null, 42, Za), h("span", { class: b(m(W)) }, "px", 2)])]),
2774
- h("div", Qa, [h("label", { class: b(m(U)) }, y(m(a).table.fontFamily), 3), h("select", {
2775
- class: b(m(K)),
2776
- value: m(at)(e.block.fontFamily),
2777
- onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
2778
- }, [h("option", eo, y(m(a).title.inheritFont), 1), (t(!0), g(S, null, o(e.fontFamilies, (e) => (t(), g("option", {
2779
- key: e.value,
2780
- value: e.value
2781
- }, y(e.label), 9, to))), 128))], 42, $a)]),
2782
- h("div", no, [h("label", { class: b(m(U)) }, y(m(a).table.fontSize), 3), h("div", ro, [h("input", {
2783
- type: "number",
2784
- class: b(m(G)),
2785
- value: e.block.fontSize,
2786
- min: "10",
2787
- max: "32",
2788
- onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
2789
- }, null, 42, io), h("span", { class: b(m(W)) }, "px", 2)])]),
2790
- h("div", ao, [h("label", { class: b(m(U)) }, y(m(a).table.color), 3), _(V, {
2791
- "model-value": e.block.color ?? "",
2792
- "onUpdate:modelValue": r[9] ||= (e) => c("color", e || void 0)
2793
- }, null, 8, ["model-value"])]),
2794
- h("div", oo, [h("label", { class: b(m(U)) }, y(m(a).table.textAlign), 3), _(Y, {
2795
- options: [
2796
- {
2797
- value: "left",
2798
- label: m(a).title.alignLeft,
2799
- icon: m(qe)
2800
- },
2801
- {
2802
- value: "center",
2803
- label: m(a).title.alignCenter,
2804
- icon: m(Ke)
2805
- },
2806
- {
2807
- value: "right",
2808
- label: m(a).title.alignRight,
2809
- icon: m(Ge)
2810
- }
2811
- ],
2812
- "model-value": e.block.textAlign,
2813
- "onUpdate:modelValue": r[10] ||= (e) => c("textAlign", e)
2814
- }, null, 8, ["options", "model-value"])])
2815
- ], 64));
2816
- }
2817
- }), co = { class: "tpl:mb-3.5" }, lo = ["value"], uo = { value: 1 }, fo = { value: 2 }, po = { value: 3 }, mo = { value: 4 }, ho = { class: "tpl:mb-3.5" }, go = ["value"], _o = { value: "" }, vo = ["value"], yo = { class: "tpl:mb-3.5" }, bo = { class: "tpl:mb-3.5" }, xo = /* @__PURE__ */ T({
2818
- __name: "TitleToolbar",
2819
- props: {
2820
- block: {},
2821
- fontFamilies: {}
2822
- },
2823
- emits: ["update"],
2824
- setup(e, { emit: n }) {
2825
- let r = n, { t: i } = B();
2826
- function a(e, t) {
2827
- r("update", { [e]: t });
2828
- }
2829
- return (n, r) => (t(), g(S, null, [
2830
- h("div", co, [h("label", { class: b(m(U)) }, y(m(i).title.level), 3), h("select", {
2831
- class: b(m(K)),
2832
- value: e.block.level,
2833
- onChange: r[0] ||= (e) => a("level", Number(e.target.value))
2834
- }, [
2835
- h("option", uo, y(m(i).title.heading1), 1),
2836
- h("option", fo, y(m(i).title.heading2), 1),
2837
- h("option", po, y(m(i).title.heading3), 1),
2838
- h("option", mo, y(m(i).title.heading4), 1)
2839
- ], 42, lo)]),
2840
- h("div", ho, [h("label", { class: b(m(U)) }, y(m(i).title.fontFamily), 3), h("select", {
2841
- class: b(m(K)),
2842
- value: m(at)(e.block.fontFamily),
2843
- onChange: r[1] ||= (e) => a("fontFamily", e.target.value || void 0)
2844
- }, [h("option", _o, y(m(i).title.inheritFont), 1), (t(!0), g(S, null, o(e.fontFamilies, (e) => (t(), g("option", {
2845
- key: e.value,
2846
- value: e.value
2847
- }, y(e.label), 9, vo))), 128))], 42, go)]),
2848
- h("div", yo, [h("label", { class: b(m(U)) }, y(m(i).title.color), 3), _(V, {
2849
- "model-value": e.block.color ?? "",
2850
- "onUpdate:modelValue": r[2] ||= (e) => a("color", e || void 0)
2851
- }, null, 8, ["model-value"])]),
2852
- h("div", bo, [h("label", { class: b(m(U)) }, y(m(i).title.align), 3), _(Y, {
2853
- options: [
2854
- {
2855
- value: "left",
2856
- label: m(i).title.alignLeft,
2857
- icon: m(qe)
2858
- },
2859
- {
2860
- value: "center",
2861
- label: m(i).title.alignCenter,
2862
- icon: m(Ke)
2863
- },
2864
- {
2865
- value: "right",
2866
- label: m(i).title.alignRight,
2867
- icon: m(Ge)
2868
- }
2869
- ],
2870
- "model-value": e.block.textAlign,
2871
- "onUpdate:modelValue": r[3] ||= (e) => a("textAlign", e)
2872
- }, null, 8, ["options", "model-value"])])
2873
- ], 64));
2874
- }
2875
- }), So = { class: "tpl:mb-3.5" }, Co = {
2876
- key: 0,
2877
- class: "tpl:mb-3.5"
2878
- }, wo = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, To = [
2879
- "value",
2880
- "placeholder",
2881
- "title"
2882
- ], Eo = { class: "tpl:mb-3.5" }, Do = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Oo = { class: "tpl:mb-3.5" }, ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = { value: "full" }, Mo = { value: "custom" }, No = {
2883
- key: 0,
2884
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2885
- }, Po = ["value"], Fo = { class: "tpl:mb-3.5" }, Io = ["value"], Lo = { value: "auto" }, Ro = { value: "custom" }, zo = {
2886
- key: 0,
2887
- class: "tpl:mt-2 tpl:flex tpl:items-stretch"
2888
- }, Bo = ["value"], Vo = { class: "tpl:mb-3.5" }, Ho = 350, Uo = 200, Wo = /* @__PURE__ */ T({
2889
- __name: "VideoToolbar",
2890
- props: { block: {} },
2891
- emits: ["update"],
2892
- setup(e, { emit: n }) {
2893
- let r = e, i = n, { t: a } = B(), o = l(we, null), s = l(Te, ie.liquid), c = Ze(), u = [
2894
- 300,
2895
- 400,
2896
- 500
2897
- ], d = C(() => !!o), p = C(() => j(r.block.url, s)), T = C(() => {
2898
- let e = r.block.width;
2899
- return e === "full" ? "full" : u.includes(e) ? String(e) : "custom";
2900
- }), E = C(() => typeof r.block.height == "number" ? "custom" : "auto"), D = f(!1), { start: O } = xe(() => {
2901
- D.value = !1;
2902
- }, 1e3, { immediate: !1 });
2903
- function k(e, t) {
2904
- i("update", { [e]: t });
2905
- }
2906
- function A(e) {
2907
- if (e === "custom") {
2908
- let e = r.block.width;
2909
- (typeof e != "number" || u.includes(e)) && k("width", Ho);
2910
- } else k("width", e === "full" ? "full" : Number(e));
2911
- }
2912
- function M(e) {
2913
- let t = Number(e);
2914
- !Number.isFinite(t) || t <= 0 || k("width", t);
2915
- }
2916
- function N(e) {
2917
- k("height", e === "custom" ? Uo : void 0);
2918
- }
2919
- function P(e) {
2920
- let t = Number(e);
2921
- !Number.isFinite(t) || t <= 0 || k("height", t);
2922
- }
2923
- async function F() {
2924
- let e = await o?.({ accept: ["images"] });
2925
- c.alive && e && (k("thumbnailUrl", e.url), D.value = !0, O());
2926
- }
2927
- return (n, r) => (t(), g(S, null, [
2928
- h("div", So, [
2929
- h("label", { class: b(m(U)) }, y(m(a).video.videoUrl), 3),
2930
- _(J, {
2931
- "model-value": e.block.url,
2932
- type: "url",
2933
- placeholder: m(a).video.videoUrlPlaceholder,
2934
- "onUpdate:modelValue": r[0] ||= (e) => k("url", e)
2935
- }, null, 8, ["model-value", "placeholder"]),
2936
- e.block.url ? (t(), x(q, {
2937
- key: 0,
2938
- class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
2939
- "model-value": e.block.openInNewTab ?? !1,
2940
- label: m(a).video.openInNewTab,
2941
- "onUpdate:modelValue": r[1] ||= (e) => k("openInNewTab", e)
2942
- }, null, 8, ["model-value", "label"])) : w("", !0)
2943
- ]),
2944
- p.value ? (t(), g("div", Co, [h("label", { class: b(m(U)) }, [v(y(m(a).video.placeholderUrl) + " ", 1), h("span", wo, y(m(a).video.optional), 1)], 2), h("input", {
2945
- type: "url",
2946
- class: b(m(K)),
2947
- value: e.block.placeholderUrl || "",
2948
- placeholder: m(a).video.placeholderUrlPlaceholder,
2949
- title: m(a).video.placeholderUrlTooltip,
2950
- onInput: r[2] ||= (e) => k("placeholderUrl", e.target.value)
2951
- }, null, 42, To)])) : w("", !0),
2952
- h("div", Eo, [
2953
- h("label", { class: b(m(U)) }, [v(y(m(a).video.customThumbnail) + " ", 1), h("span", Do, y(m(a).video.optional), 1)], 2),
2954
- _(J, {
2955
- "model-value": e.block.thumbnailUrl,
2956
- type: "url",
2957
- placeholder: m(a).video.thumbnailPlaceholder,
2958
- pulse: D.value,
2959
- "onUpdate:modelValue": r[3] ||= (e) => k("thumbnailUrl", e)
2960
- }, null, 8, [
2961
- "model-value",
2962
- "placeholder",
2963
- "pulse"
2964
- ]),
2965
- d.value ? (t(), g("button", {
2966
- key: 0,
2967
- 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",
2968
- style: {
2969
- "border-color": "var(--tpl-border)",
2970
- color: "var(--tpl-primary)",
2971
- "background-color": "var(--tpl-bg)"
2972
- },
2973
- onClick: F
2974
- }, [_(m(be), {
2975
- size: 14,
2976
- "stroke-width": 1.5
2977
- }), v(" " + y(m(a).image.browseMedia), 1)])) : w("", !0)
2978
- ]),
2979
- h("div", Oo, [h("label", { class: b(m(U)) }, y(m(a).video.altText), 3), _(J, {
2980
- "model-value": e.block.alt,
2981
- type: "text",
2982
- placeholder: m(a).video.altTextPlaceholder,
2983
- "onUpdate:modelValue": r[4] ||= (e) => k("alt", e)
2984
- }, null, 8, ["model-value", "placeholder"])]),
2985
- h("div", ko, [
2986
- h("label", { class: b(m(U)) }, y(m(a).video.width), 3),
2987
- h("select", {
2988
- class: b(m(K)),
2989
- "data-testid": "video-width-mode",
2990
- value: T.value,
2991
- onChange: r[5] ||= (e) => A(e.target.value)
2992
- }, [
2993
- h("option", jo, y(m(a).video.fullWidth), 1),
2994
- r[10] ||= h("option", { value: "300" }, "300px", -1),
2995
- r[11] ||= h("option", { value: "400" }, "400px", -1),
2996
- r[12] ||= h("option", { value: "500" }, "500px", -1),
2997
- h("option", Mo, y(m(a).video.widthCustom), 1)
2998
- ], 42, Ao),
2999
- T.value === "custom" ? (t(), g("div", No, [h("input", {
3000
- type: "number",
3001
- "data-testid": "video-width-input",
3002
- class: b(m(G)),
3003
- value: e.block.width,
3004
- min: "20",
3005
- onInput: r[6] ||= (e) => M(e.target.value)
3006
- }, null, 42, Po), h("span", { class: b(m(W)) }, "px", 2)])) : w("", !0)
3007
- ]),
3008
- h("div", Fo, [
3009
- h("label", { class: b(m(U)) }, y(m(a).video.height), 3),
3010
- h("select", {
3011
- class: b(m(K)),
3012
- "data-testid": "video-height-mode",
3013
- value: E.value,
3014
- onChange: r[7] ||= (e) => N(e.target.value)
3015
- }, [h("option", Lo, y(m(a).video.heightAuto), 1), h("option", Ro, y(m(a).video.heightCustom), 1)], 42, Io),
3016
- E.value === "custom" ? (t(), g("div", zo, [h("input", {
3017
- type: "number",
3018
- "data-testid": "video-height-input",
3019
- class: b(m(G)),
3020
- value: e.block.height,
3021
- min: "20",
3022
- onInput: r[8] ||= (e) => P(e.target.value)
3023
- }, null, 42, Bo), h("span", { class: b(m(W)) }, "px", 2)])) : w("", !0)
3024
- ]),
3025
- h("div", Vo, [h("label", { class: b(m(U)) }, y(m(a).title.align), 3), _(Y, {
3026
- options: [
3027
- {
3028
- value: "left",
3029
- label: m(a).title.alignLeft
3030
- },
3031
- {
3032
- value: "center",
3033
- label: m(a).title.alignCenter
3034
- },
3035
- {
3036
- value: "right",
3037
- label: m(a).title.alignRight
3038
- }
3039
- ],
3040
- "model-value": e.block.align,
3041
- "onUpdate:modelValue": r[9] ||= (e) => k("align", e)
3042
- }, null, 8, ["options", "model-value"])])
3043
- ], 64));
3044
- }
3045
- }), Go = ["aria-label"], Ko = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, qo = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, Jo = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Yo = { class: "tpl:flex tpl:gap-1" }, Xo = ["title"], Zo = ["title"], Qo = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, $o = /*@__PURE__*/ T({
3046
- __name: "Toolbar",
3047
- props: { block: {} },
3048
- emits: [
3049
- "update",
3050
- "delete",
3051
- "duplicate"
3052
- ],
3053
- setup(e, { emit: n }) {
3054
- let r = p(() => import("./CountdownToolbar-C4y3Ft7H.js")), a = e, o = n, { t: s } = B(), c = z(je, "Toolbar"), u = l(Ae, []), d = C(() => a.block.type), f = C(() => A(a.block)), v = C(() => {
3055
- if (f.value) return u.find((e) => e.type === a.block.customType);
3056
- }), b = C(() => f.value ? v.value?.name ?? a.block.customType : oe(d.value, s)), S = C(() => it(c.fonts.value, "fontFamily" in a.block ? a.block.fontFamily : void 0));
3057
- function T(e) {
3058
- o("update", e);
3059
- }
3060
- return (n, a) => (t(), g("aside", {
3061
- "data-testid": "block-toolbar",
3062
- "aria-label": m(s).landmarks.blockToolbar,
3063
- class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
3064
- }, [h("div", Ko, [h("div", qo, [m(Re)[d.value] ? (t(), x(i(m(Re)[d.value]), {
3065
- key: 0,
3066
- size: 16,
3067
- "stroke-width": 1.5
3068
- })) : f.value ? (t(), x(m(le), {
3069
- key: 1,
3070
- size: 16,
3071
- "stroke-width": 1.5
3072
- })) : w("", !0), h("h3", Jo, y(b.value), 1)]), h("div", Yo, [h("button", {
3073
- 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)]",
3074
- title: m(s).toolbar.duplicate,
3075
- onClick: a[0] ||= (e) => o("duplicate")
3076
- }, [_(m(ze), {
3077
- size: 14,
3078
- "stroke-width": 2
3079
- })], 8, Xo), h("button", {
3080
- 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)]",
3081
- title: m(s).toolbar.delete,
3082
- onClick: a[1] ||= (e) => o("delete")
3083
- }, [_(m(Je), {
3084
- size: 14,
3085
- "stroke-width": 2
3086
- })], 8, Zo)])]), h("div", Qo, [f.value ? (t(), x(Ur, {
3087
- key: 0,
3088
- block: e.block,
3089
- onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
3090
- onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
3091
- }, null, 8, ["block"])) : d.value === "section" ? (t(), x(ea, {
3092
- key: 1,
3093
- block: e.block,
3094
- onUpdate: T
3095
- }, null, 8, ["block"])) : d.value === "title" ? (t(), x(xo, {
3096
- key: 2,
3097
- block: e.block,
3098
- "font-families": S.value,
3099
- onUpdate: T
3100
- }, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (t(), x(Wi, {
3101
- key: 3,
3102
- block: e.block,
3103
- onUpdate: T
3104
- }, null, 8, ["block"])) : d.value === "image" ? (t(), x(Oi, {
3105
- key: 4,
3106
- block: e.block,
3107
- onUpdate: T
3108
- }, null, 8, ["block"])) : d.value === "video" ? (t(), x(Wo, {
3109
- key: 5,
3110
- block: e.block,
3111
- onUpdate: T
3112
- }, null, 8, ["block"])) : d.value === "button" ? (t(), x(Jt, {
3113
- key: 6,
3114
- block: e.block,
3115
- "font-families": S.value,
3116
- onUpdate: T
3117
- }, null, 8, ["block", "font-families"])) : d.value === "divider" ? (t(), x(Yr, {
3118
- key: 7,
3119
- block: e.block,
3120
- onUpdate: T
3121
- }, null, 8, ["block"])) : d.value === "social" ? (t(), x(Ta, {
3122
- key: 8,
3123
- block: e.block,
3124
- onUpdate: T
3125
- }, null, 8, ["block"])) : d.value === "menu" ? (t(), x(Bi, {
3126
- key: 9,
3127
- block: e.block,
3128
- "font-families": S.value,
3129
- onUpdate: T
3130
- }, null, 8, ["block", "font-families"])) : d.value === "table" ? (t(), x(so, {
3131
- key: 10,
3132
- block: e.block,
3133
- "font-families": S.value,
3134
- onUpdate: T
3135
- }, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (t(), x(Aa, {
3136
- key: 11,
3137
- block: e.block,
3138
- onUpdate: T
3139
- }, null, 8, ["block"])) : d.value === "html" ? (t(), x($r, {
3140
- key: 12,
3141
- block: e.block,
3142
- onUpdate: T
3143
- }, null, 8, ["block"])) : d.value === "countdown" ? (t(), x(m(r), {
3144
- key: 13,
3145
- block: e.block,
3146
- "font-families": S.value,
3147
- onUpdate: T
3148
- }, null, 8, ["block", "font-families"])) : w("", !0), _(ar, {
3149
- block: e.block,
3150
- "is-first-section": d.value === "paragraph",
3151
- onUpdate: T
3152
- }, null, 8, ["block", "is-first-section"])])], 8, Go));
3153
- }
3154
- }), es = /* @__PURE__ */ e({ default: () => ts }), ts = /*#__PURE__*/ Xe($o, [["__scopeId", "data-v-e2d2c22f"]]);
3155
- //#endregion
3156
- export { ts as default, Y as i, $ as n, X as r, es as t };