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