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