@templatical/editor 0.49.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-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
- package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
- package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
- package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
- package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
- package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
- package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
- package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
- 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-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
- 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-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.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-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.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-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-C_wxoUMG.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-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.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-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.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-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.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-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
- 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-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.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-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
- package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
- 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-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
- package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.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-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- 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/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/{src-B77z1iw4.js → src-BcTUmgLe.js} +113 -113
- package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-BcTUmgLe.js.map} +1 -1
- 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/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.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-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.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-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2151 -1480
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
- package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
- package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
- package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
- package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
- package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
- package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +361 -24
- package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
- package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
- package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2114 -1422
- package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
- package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
- package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
- package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +14 -12
- package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
- package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
- package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
- package/dist/CommentsSidebar-J65znlrH.js +0 -500
- package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
- package/dist/IssuesPanel-DeeVsfG7.js +0 -117
- package/dist/ParagraphEditor-zLV44z-R.js +0 -797
- package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
- package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
- package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
- package/dist/ToggleSwitch-DHweVJOr.js +0 -102
- package/dist/WrapperBlock-DiiaxpMb.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
- package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
- package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
- package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
- package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
- package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
- package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
- package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
- package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
- package/dist/copy-CUC43md_.js +0 -19
- package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
- package/dist/de-D_atmUVB.js +0 -87
- package/dist/dist-CCqn-RqE.js +0 -407
- package/dist/en-BHCMzqib.js +0 -1
- package/dist/en-DhJLnaBx.js +0 -87
- package/dist/image-up-BqiO7KCO.js +0 -27
- package/dist/keys-BymCnLHD.js +0 -10
- package/dist/plus-BDd0gTEm.js +0 -14
- package/dist/pt-BR-BphMoUTw.js +0 -87
- package/dist/shield-check-YhsbXfQc.js +0 -14
- package/dist/socialIcons-Bwv-49EB.js +0 -2167
- package/dist/timeouts-o5Y9BuqI.js +0 -4
- package/dist/upload-uU2cK0Ce.js +0 -21
- package/dist/useAliveFlag-BjP0Gxza.js +0 -10
- package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { n as e } from "./rolldown-runtime-Y_bBpyJl.js";
|
|
2
|
-
import {
|
|
3
|
-
import { At as O,
|
|
4
|
-
import {
|
|
5
|
-
import { _ as
|
|
6
|
-
import { $ as
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as Qe } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
12
|
-
import { t as $e } from "./useAliveFlag-PuXh83UK.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";
|
|
13
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";
|
|
14
|
-
import { t as at } from "./blockTypeIcons-
|
|
15
|
-
import { c as K } from "./LogicTagInsertButton-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { t as
|
|
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
19
|
var lt = [
|
|
21
20
|
"aria-checked",
|
|
@@ -24,7 +23,7 @@ var lt = [
|
|
|
24
23
|
"aria-disabled",
|
|
25
24
|
"title",
|
|
26
25
|
"onClick"
|
|
27
|
-
], ut = { key: 1 }, Y = /* @__PURE__ */
|
|
26
|
+
], ut = { key: 1 }, Y = /* @__PURE__ */ n({
|
|
28
27
|
__name: "SlidingPillSelect",
|
|
29
28
|
props: {
|
|
30
29
|
options: {},
|
|
@@ -32,18 +31,18 @@ var lt = [
|
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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, ft),
|
|
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
|
-
], mt = /* @__PURE__ */
|
|
109
|
+
], mt = /* @__PURE__ */ n({
|
|
111
110
|
__name: "LinkToggle",
|
|
112
111
|
props: {
|
|
113
112
|
linked: { type: Boolean },
|
|
@@ -118,19 +117,19 @@ var lt = [
|
|
|
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
|
|
@@ -139,7 +138,7 @@ var lt = [
|
|
|
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
|
-
}, yt = { class: "tpl:mb-3.5" }, bt = { class: "tpl:mb-3.5" }, xt = /* @__PURE__ */
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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
|
-
}, Et = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Dt = /* @__PURE__ */
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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",
|
|
@@ -339,7 +338,7 @@ var lt = [
|
|
|
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
|
-
}, Gt = ["value"], Kt = { class: "tpl:mb-3.5" }, qt = 200, Jt = /* @__PURE__ */
|
|
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,9 +346,9 @@ var lt = [
|
|
|
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
354
|
e === "full" ? c("width", "full") : e === "custom" ? c("width", typeof n.block.width == "number" ? n.block.width : qt) : c("width", void 0);
|
|
@@ -358,97 +357,97 @@ var lt = [
|
|
|
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, Rt),
|
|
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
|
-
|
|
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)
|
|
430
429
|
], 42, Bt),
|
|
431
|
-
s.value === "custom" ? (o(),
|
|
430
|
+
s.value === "custom" ? (o(), p("div", Wt, [y("input", {
|
|
432
431
|
type: "number",
|
|
433
|
-
class:
|
|
432
|
+
class: v(x(W)),
|
|
434
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, Gt),
|
|
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 lt = [
|
|
|
456
455
|
}, null, 8, ["options", "model-value"])])
|
|
457
456
|
], 64));
|
|
458
457
|
}
|
|
459
|
-
}), 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__*/
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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 lt = [
|
|
|
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,123 +502,123 @@ var lt = [
|
|
|
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
514
|
})], 10, $t),
|
|
516
|
-
|
|
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
522
|
}, null, 40, en),
|
|
524
|
-
|
|
525
|
-
"aria-label":
|
|
526
|
-
class:
|
|
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
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
541
|
})], 10, an),
|
|
543
|
-
|
|
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
549
|
}, null, 40, on),
|
|
551
|
-
|
|
552
|
-
"aria-label":
|
|
553
|
-
class:
|
|
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
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
572
|
}))], 10, cn),
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
"aria-label":
|
|
577
|
-
class:
|
|
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
581
|
})], 10, un),
|
|
583
|
-
|
|
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
589
|
}, null, 40, dn),
|
|
591
|
-
|
|
592
|
-
"aria-label":
|
|
593
|
-
class:
|
|
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
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
608
|
})], 10, mn),
|
|
610
|
-
|
|
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
616
|
}, null, 40, hn),
|
|
618
|
-
|
|
619
|
-
"aria-label":
|
|
620
|
-
class:
|
|
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
624
|
})], 10, gn)
|
|
@@ -630,26 +629,26 @@ var lt = [
|
|
|
630
629
|
//#endregion
|
|
631
630
|
//#region src/composables/useNaturalImageSize.ts
|
|
632
631
|
function yn(e) {
|
|
633
|
-
let n =
|
|
634
|
-
return
|
|
632
|
+
let n = t(null), r = () => {};
|
|
633
|
+
return l(e, (e) => {
|
|
635
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
639
|
function bn() {
|
|
641
|
-
let e =
|
|
642
|
-
return async (t) =>
|
|
640
|
+
let e = r(Me, null);
|
|
641
|
+
return async (t) => ge(e ? await xn(e, t) : t);
|
|
643
642
|
}
|
|
644
|
-
function xn(e,
|
|
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
|
|
@@ -659,7 +658,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
659
658
|
"aria-pressed",
|
|
660
659
|
"data-testid",
|
|
661
660
|
"onClick"
|
|
662
|
-
], On = ["data-testid"], kn = /* @__PURE__ */
|
|
661
|
+
], On = ["data-testid"], kn = /* @__PURE__ */ n({
|
|
663
662
|
__name: "BackgroundImageControl",
|
|
664
663
|
props: {
|
|
665
664
|
modelValue: {},
|
|
@@ -668,37 +667,37 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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
728
|
function N(e) {
|
|
730
|
-
return
|
|
729
|
+
return a.modelValue?.position?.x === e.x && a.modelValue?.position?.y === e.y;
|
|
731
730
|
}
|
|
732
|
-
let P =
|
|
731
|
+
let P = t(), { canBrowse: te, isUploading: I, showOverlay: re, openMediaBrowser: R } = pe({
|
|
733
732
|
target: P,
|
|
734
733
|
blocked: () => L(u.value, l),
|
|
735
|
-
apply: (e) =>
|
|
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
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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, Cn)]),
|
|
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) =>
|
|
774
|
+
"onUpdate:modelValue": n[1] ||= (e) => O({ size: e })
|
|
776
775
|
}, null, 8, ["options", "model-value"])], 8, Tn)),
|
|
777
|
-
|
|
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
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) =>
|
|
800
|
+
label: x(c).blockSettings.backgroundRepeat,
|
|
801
|
+
"onUpdate:modelValue": n[2] ||= (e) => O({ repeat: e })
|
|
803
802
|
}, null, 8, ["model-value", "label"])], 8, On))
|
|
804
|
-
], 64)) :
|
|
803
|
+
], 64)) : g("", !0)]));
|
|
805
804
|
}
|
|
806
|
-
}), An = ["data-testid"], jn = { class: "tpl:mt-3" }, Mn = /* @__PURE__ */
|
|
805
|
+
}), An = ["data-testid"], jn = { class: "tpl:mt-3" }, Mn = /* @__PURE__ */ n({
|
|
807
806
|
__name: "CollapsibleSection",
|
|
808
807
|
props: {
|
|
809
808
|
title: {},
|
|
@@ -813,16 +812,16 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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,
|
|
@@ -841,15 +840,15 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
841
840
|
}, Rn = {
|
|
842
841
|
key: 1,
|
|
843
842
|
"data-testid": "section-hero-align"
|
|
844
|
-
}, zn = 300, Bn = /* @__PURE__ */
|
|
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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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,75 +875,75 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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
|
-
function
|
|
911
|
+
function N(e) {
|
|
913
912
|
!C.value || !Number.isFinite(e) || e < 1 || a("update", { hero: {
|
|
914
913
|
...C.value,
|
|
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
|
-
"onUpdate:modelValue":
|
|
941
|
-
}, null, 8, ["model-value"])) :
|
|
942
|
-
C.value ? (o(),
|
|
939
|
+
"onUpdate:modelValue": N
|
|
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,
|
|
@@ -958,75 +957,75 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
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
|
-
}, ar = /* @__PURE__ */
|
|
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
|
-
|
|
977
|
+
function N(e) {
|
|
978
|
+
k.has(e) ? k.delete(e) : k.add(e);
|
|
980
979
|
}
|
|
981
|
-
let
|
|
980
|
+
let P = S(() => C.length > 0 || T), F = S(() => a.block.displayCondition ? !C.some((e) => e.label === a.block.displayCondition?.label) : !1);
|
|
982
981
|
function te() {
|
|
983
|
-
|
|
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 = "");
|
|
984
983
|
}
|
|
985
984
|
function ne() {
|
|
986
|
-
|
|
987
|
-
label:
|
|
988
|
-
before:
|
|
985
|
+
j.value.trim() && (s("update", { displayCondition: {
|
|
986
|
+
label: d.blockSettings.customCondition,
|
|
987
|
+
before: j.value.trim(),
|
|
989
988
|
after: M.value.trim()
|
|
990
|
-
} }),
|
|
989
|
+
} }), A.value = !1, j.value = "", M.value = "");
|
|
991
990
|
}
|
|
992
|
-
|
|
993
|
-
e ? F.value && (
|
|
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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, Wn),
|
|
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
|
-
|
|
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", {
|
|
1135
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: !
|
|
1140
|
+
class: v(x(it)),
|
|
1141
|
+
disabled: !j.value.trim(),
|
|
1143
1142
|
onClick: ne
|
|
1144
|
-
},
|
|
1145
|
-
])) : e.block.displayCondition && !F.value ? (o(),
|
|
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
|
-
}), or = ["title"], sr = /* @__PURE__ */
|
|
1149
|
+
}), or = ["title"], sr = /* @__PURE__ */ n({
|
|
1151
1150
|
__name: "BooleanField",
|
|
1152
1151
|
props: {
|
|
1153
1152
|
field: {},
|
|
@@ -1157,22 +1156,22 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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",
|
|
@@ -1181,7 +1180,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1181
1180
|
"disabled"
|
|
1182
1181
|
])], 8, or));
|
|
1183
1182
|
}
|
|
1184
|
-
}), cr = { class: "tpl:mb-3.5" }, lr = ["title"], ur = { class: "tpl-sr-only" }, dr = ["title"], fr = { class: "tpl-sr-only" }, Q = /* @__PURE__ */
|
|
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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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
|
-
}), pr = /* @__PURE__ */
|
|
1209
|
+
}), pr = /* @__PURE__ */ n({
|
|
1211
1210
|
__name: "ColorField",
|
|
1212
1211
|
props: {
|
|
1213
1212
|
field: {},
|
|
@@ -1216,20 +1215,20 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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",
|
|
@@ -1249,7 +1248,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1249
1248
|
"value",
|
|
1250
1249
|
"placeholder",
|
|
1251
1250
|
"title"
|
|
1252
|
-
], hr = ["value", "placeholder"], gr = /* @__PURE__ */
|
|
1251
|
+
], hr = ["value", "placeholder"], gr = /* @__PURE__ */ n({
|
|
1253
1252
|
__name: "ImageField",
|
|
1254
1253
|
props: {
|
|
1255
1254
|
field: {},
|
|
@@ -1257,50 +1256,50 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, mr)) : (o(),
|
|
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) =>
|
|
1293
|
+
onInput: n[0] ||= (e) => i("update:modelValue", e.target.value)
|
|
1295
1294
|
}, null, 42, hr)),
|
|
1296
|
-
|
|
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, [
|
|
@@ -1317,7 +1316,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1317
1316
|
"step",
|
|
1318
1317
|
"disabled",
|
|
1319
1318
|
"title"
|
|
1320
|
-
], vr = /* @__PURE__ */
|
|
1319
|
+
], vr = /* @__PURE__ */ n({
|
|
1321
1320
|
__name: "NumberField",
|
|
1322
1321
|
props: {
|
|
1323
1322
|
field: {},
|
|
@@ -1327,22 +1326,22 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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:
|
|
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))
|
|
1346
1345
|
}, null, 42, _r)]),
|
|
1347
1346
|
_: 1
|
|
1348
1347
|
}, 8, [
|
|
@@ -1357,7 +1356,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
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
|
-
}, Tr = /* @__PURE__ */
|
|
1359
|
+
}, Tr = /* @__PURE__ */ n({
|
|
1361
1360
|
__name: "RepeatableField",
|
|
1362
1361
|
props: {
|
|
1363
1362
|
field: {},
|
|
@@ -1366,44 +1365,44 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, Sr)) :
|
|
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 Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, [
|
|
@@ -1438,7 +1437,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1438
1437
|
"value",
|
|
1439
1438
|
"disabled",
|
|
1440
1439
|
"title"
|
|
1441
|
-
], Dr = ["value"], Or = /* @__PURE__ */
|
|
1440
|
+
], Dr = ["value"], Or = /* @__PURE__ */ n({
|
|
1442
1441
|
__name: "SelectField",
|
|
1443
1442
|
props: {
|
|
1444
1443
|
field: {},
|
|
@@ -1447,22 +1446,22 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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",
|
|
@@ -1474,7 +1473,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1474
1473
|
"value",
|
|
1475
1474
|
"placeholder",
|
|
1476
1475
|
"title"
|
|
1477
|
-
], Ar = /* @__PURE__ */
|
|
1476
|
+
], Ar = /* @__PURE__ */ n({
|
|
1478
1477
|
__name: "TextField",
|
|
1479
1478
|
props: {
|
|
1480
1479
|
field: {},
|
|
@@ -1484,24 +1483,24 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, kr)) : (o(),
|
|
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, [
|
|
@@ -1516,7 +1515,7 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["data-testid"
|
|
|
1516
1515
|
"title"
|
|
1517
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 = {
|
|
1518
1517
|
text: Ar,
|
|
1519
|
-
textarea: /* @__PURE__ */
|
|
1518
|
+
textarea: /* @__PURE__ */ n({
|
|
1520
1519
|
__name: "TextareaField",
|
|
1521
1520
|
props: {
|
|
1522
1521
|
field: {},
|
|
@@ -1526,24 +1525,24 @@ var Sn = { class: "tpl:space-y-3.5" }, Cn = ["data-testid"], wn = ["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, jr)) : (o(),
|
|
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, [
|
|
@@ -1583,48 +1582,48 @@ var Fr = {
|
|
|
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
|
-
}, Ur = /* @__PURE__ */
|
|
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 Fr = {
|
|
|
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
|
-
}), 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__ */
|
|
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 Fr = {
|
|
|
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, Jr),
|
|
1675
|
+
}, null, 42, Jr), y("span", { class: v(x(U)) }, "px", 2)])])
|
|
1677
1676
|
], 64));
|
|
1678
1677
|
}
|
|
1679
|
-
}), 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__ */
|
|
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
1692
|
}, null, 42, Zr),
|
|
1694
|
-
|
|
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
1702
|
function ei(e) {
|
|
1704
|
-
let n =
|
|
1705
|
-
|
|
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 ei(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,
|
|
@@ -1782,97 +1781,97 @@ var ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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
|
-
}, Ci = ["value"], wi = { class: "tpl:mb-3.5" }, Ti = { class: "tpl:mb-3.5" }, Ei = 350, Di = 200, Oi = /* @__PURE__ */
|
|
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" ||
|
|
1804
|
+
let e = i.block.width;
|
|
1805
|
+
(typeof e != "number" || D.includes(e)) && a("update", z.widthUpdates(Ei));
|
|
1807
1806
|
} else a("update", z.widthUpdates(e === "full" ? "full" : Number(e)));
|
|
1808
1807
|
}
|
|
1809
|
-
function
|
|
1810
|
-
|
|
1808
|
+
function M(e) {
|
|
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
1818
|
function F(e) {
|
|
1820
1819
|
let t = Number(e);
|
|
1821
1820
|
!Number.isFinite(t) || t <= 0 || a("update", z.widthUpdates(t));
|
|
1822
1821
|
}
|
|
1823
1822
|
function te(e) {
|
|
1824
|
-
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 && (
|
|
1831
|
+
...me(ue(e.width, e.height))
|
|
1832
|
+
}), e.alt && (A("alt", e.alt), C.value = !0), b.value = !0, T();
|
|
1834
1833
|
}
|
|
1835
|
-
let re =
|
|
1834
|
+
let re = t(), R = S(() => L(i.block.src, u)), { canBrowse: ie, isUploading: ae, showOverlay: oe, openMediaBrowser: se } = pe({
|
|
1836
1835
|
target: re,
|
|
1837
|
-
blocked:
|
|
1838
|
-
apply:
|
|
1839
|
-
}),
|
|
1840
|
-
block: () =>
|
|
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,
|
|
1841
1840
|
room: () => ge.value,
|
|
1842
|
-
measured: () =>
|
|
1843
|
-
}), { available:
|
|
1841
|
+
measured: () => he.value
|
|
1842
|
+
}), { available: _e, locked: ye, derivedHeight: xe, cappedHeight: Ce } = z;
|
|
1844
1843
|
function Te() {
|
|
1845
|
-
let e = z.setLocked(!
|
|
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
|
-
|
|
1849
|
+
Ee.value = e;
|
|
1851
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
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:
|
|
1866
|
+
placeholder: x(s).image.imageUrlPlaceholder,
|
|
1867
|
+
pulse: b.value,
|
|
1869
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 ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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, ii)])) :
|
|
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
|
-
|
|
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)
|
|
1935
1934
|
], 42, ci),
|
|
1936
|
-
O.value === "custom" ? (o(),
|
|
1935
|
+
O.value === "custom" ? (o(), p("div", di, [y("input", {
|
|
1937
1936
|
type: "number",
|
|
1938
1937
|
"data-testid": "image-width-input",
|
|
1939
|
-
class:
|
|
1938
|
+
class: v(x(W)),
|
|
1940
1939
|
value: typeof e.block.width == "number" ? e.block.width : Ei,
|
|
1941
1940
|
min: "20",
|
|
1942
1941
|
onInput: n[6] ||= (e) => F(e.target.value)
|
|
1943
|
-
}, null, 42, fi),
|
|
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
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, _i),
|
|
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:
|
|
1974
|
-
onChange: n[9] ||= (e) =>
|
|
1975
|
-
}, [
|
|
1976
|
-
!
|
|
1972
|
+
value: k.value,
|
|
1973
|
+
onChange: n[9] ||= (e) => M(e.target.value)
|
|
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, Ci),
|
|
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
|
-
}), ki = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */
|
|
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
|
-
], 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__ */
|
|
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,38 +2049,38 @@ var ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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 = {
|
|
@@ -2092,49 +2091,49 @@ var ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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, Mi),
|
|
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
2125
|
})], 10, Ni)]),
|
|
2127
|
-
|
|
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 ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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 ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
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
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,
|
|
@@ -2232,26 +2231,26 @@ var ti = { class: "tpl:mb-3.5" }, ni = {
|
|
|
2232
2231
|
}), Vi = {
|
|
2233
2232
|
class: "tpl:mb-3.5",
|
|
2234
2233
|
"data-testid": "paragraph-spacing"
|
|
2235
|
-
}, Hi = { class: "tpl:flex tpl:items-stretch" }, Ui = ["value"], Wi = /* @__PURE__ */
|
|
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, Ui),
|
|
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
2252
|
function Gi(e, t) {
|
|
2254
|
-
let n =
|
|
2253
|
+
let n = R(t);
|
|
2255
2254
|
if (e.length === n) return e;
|
|
2256
2255
|
if (e.length < n) {
|
|
2257
2256
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2274,12 +2273,12 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2274
2273
|
}, Qi = {
|
|
2275
2274
|
key: 1,
|
|
2276
2275
|
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2277
|
-
}, $i = /* @__PURE__ */
|
|
2276
|
+
}, $i = /* @__PURE__ */ n({
|
|
2278
2277
|
__name: "SectionToolbar",
|
|
2279
2278
|
props: { block: {} },
|
|
2280
2279
|
emits: ["update"],
|
|
2281
2280
|
setup(e, { emit: t }) {
|
|
2282
|
-
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(() => [
|
|
2283
2282
|
{
|
|
2284
2283
|
value: "1",
|
|
2285
2284
|
label: s.section.column1
|
|
@@ -2301,20 +2300,20 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2301
2300
|
label: s.section.ratio21
|
|
2302
2301
|
}
|
|
2303
2302
|
]);
|
|
2304
|
-
function
|
|
2305
|
-
let t = e.target.value,
|
|
2303
|
+
function T(e) {
|
|
2304
|
+
let t = e.target.value, r = Gi(n.block.children, t);
|
|
2306
2305
|
a("update", {
|
|
2307
2306
|
columns: t,
|
|
2308
|
-
children:
|
|
2307
|
+
children: r
|
|
2309
2308
|
});
|
|
2310
2309
|
}
|
|
2311
2310
|
function D(e) {
|
|
2312
2311
|
a("update", { stackOnMobile: e });
|
|
2313
2312
|
}
|
|
2314
|
-
function
|
|
2313
|
+
function A(e) {
|
|
2315
2314
|
a("update", { borderRadius: e });
|
|
2316
2315
|
}
|
|
2317
|
-
function
|
|
2316
|
+
function j(e) {
|
|
2318
2317
|
a("update", { wrapper: e ? { padding: {
|
|
2319
2318
|
top: 20,
|
|
2320
2319
|
right: 20,
|
|
@@ -2324,97 +2323,97 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2324
2323
|
}
|
|
2325
2324
|
function M(e) {
|
|
2326
2325
|
a("update", { wrapper: {
|
|
2327
|
-
...
|
|
2326
|
+
...n.block.wrapper,
|
|
2328
2327
|
...e
|
|
2329
2328
|
} });
|
|
2330
2329
|
}
|
|
2331
|
-
function
|
|
2330
|
+
function ee(e) {
|
|
2332
2331
|
M({ padding: e });
|
|
2333
2332
|
}
|
|
2334
|
-
function
|
|
2333
|
+
function N(e) {
|
|
2335
2334
|
M({ borderRadius: e });
|
|
2336
2335
|
}
|
|
2337
|
-
return (t, n) => (o(),
|
|
2338
|
-
|
|
2339
|
-
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)),
|
|
2340
2339
|
value: e.block.columns,
|
|
2341
|
-
onChange:
|
|
2342
|
-
}, [(o(!0),
|
|
2340
|
+
onChange: T
|
|
2341
|
+
}, [(o(!0), p(w, null, i(C.value, (e) => (o(), p("option", {
|
|
2343
2342
|
key: e.value,
|
|
2344
2343
|
value: e.value
|
|
2345
|
-
},
|
|
2346
|
-
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, {
|
|
2347
2346
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2348
2347
|
"model-value": e.block.stackOnMobile !== !1,
|
|
2349
|
-
label:
|
|
2348
|
+
label: x(s).section.stackOnMobile,
|
|
2350
2349
|
"onUpdate:modelValue": n[0] ||= (e) => D(e)
|
|
2351
2350
|
}, null, 8, ["model-value", "label"])])),
|
|
2352
|
-
|
|
2351
|
+
E(Dt, {
|
|
2353
2352
|
"model-value": e.block.borderRadius,
|
|
2354
|
-
label:
|
|
2353
|
+
label: x(s).section.borderRadius,
|
|
2355
2354
|
max: 50,
|
|
2356
2355
|
"testid-prefix": "section",
|
|
2357
|
-
"onUpdate:modelValue":
|
|
2356
|
+
"onUpdate:modelValue": A
|
|
2358
2357
|
}, null, 8, ["model-value", "label"]),
|
|
2359
|
-
|
|
2358
|
+
b.value ? g("", !0) : (o(), _(xt, {
|
|
2360
2359
|
key: 1,
|
|
2361
2360
|
"model-value": e.block.border,
|
|
2362
2361
|
"testid-prefix": "section",
|
|
2363
2362
|
"onUpdate:modelValue": n[1] ||= (e) => a("update", { border: e })
|
|
2364
2363
|
}, null, 8, ["model-value"])),
|
|
2365
|
-
d.value ? (o(),
|
|
2366
|
-
|
|
2364
|
+
d.value ? (o(), p("div", Xi, [
|
|
2365
|
+
E(q, {
|
|
2367
2366
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2368
2367
|
"model-value": !!e.block.wrapper,
|
|
2369
|
-
label:
|
|
2368
|
+
label: x(s).section.wrapperEnable,
|
|
2370
2369
|
disabled: f.value,
|
|
2371
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
2370
|
+
"onUpdate:modelValue": n[2] ||= (e) => j(e)
|
|
2372
2371
|
}, null, 8, [
|
|
2373
2372
|
"model-value",
|
|
2374
2373
|
"label",
|
|
2375
2374
|
"disabled"
|
|
2376
2375
|
]),
|
|
2377
|
-
|
|
2378
|
-
e.block.wrapper ? (o(),
|
|
2379
|
-
|
|
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, {
|
|
2380
2379
|
"model-value": e.block.wrapper.backgroundColor ?? "",
|
|
2381
2380
|
"allow-transparent": "",
|
|
2382
2381
|
"onUpdate:modelValue": n[3] ||= (e) => M({ backgroundColor: e })
|
|
2383
2382
|
}, null, 8, ["model-value"])]),
|
|
2384
|
-
|
|
2383
|
+
E(kn, {
|
|
2385
2384
|
"model-value": e.block.wrapper.backgroundImage,
|
|
2386
2385
|
"testid-prefix": "section-wrapper",
|
|
2387
2386
|
"onUpdate:modelValue": n[4] ||= (e) => M({ backgroundImage: e })
|
|
2388
2387
|
}, null, 8, ["model-value"]),
|
|
2389
|
-
|
|
2390
|
-
label:
|
|
2388
|
+
E(vn, {
|
|
2389
|
+
label: x(s).blockSettings.padding,
|
|
2391
2390
|
"model-value": e.block.wrapper.padding ?? {
|
|
2392
2391
|
top: 0,
|
|
2393
2392
|
right: 0,
|
|
2394
2393
|
bottom: 0,
|
|
2395
2394
|
left: 0
|
|
2396
2395
|
},
|
|
2397
|
-
"onUpdate:modelValue":
|
|
2396
|
+
"onUpdate:modelValue": ee
|
|
2398
2397
|
}, null, 8, ["label", "model-value"]),
|
|
2399
|
-
|
|
2398
|
+
E(Dt, {
|
|
2400
2399
|
"model-value": e.block.wrapper.borderRadius,
|
|
2401
|
-
label:
|
|
2400
|
+
label: x(s).section.borderRadius,
|
|
2402
2401
|
max: 50,
|
|
2403
2402
|
"testid-prefix": "section-wrapper",
|
|
2404
|
-
"onUpdate:modelValue":
|
|
2403
|
+
"onUpdate:modelValue": N
|
|
2405
2404
|
}, null, 8, ["model-value", "label"])
|
|
2406
|
-
])) :
|
|
2407
|
-
])) :
|
|
2405
|
+
])) : g("", !0)
|
|
2406
|
+
])) : g("", !0)
|
|
2408
2407
|
], 64));
|
|
2409
2408
|
}
|
|
2410
|
-
}), 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({
|
|
2411
2410
|
__name: "SocialToolbar",
|
|
2412
2411
|
props: { block: {} },
|
|
2413
2412
|
emits: ["update"],
|
|
2414
2413
|
setup(e, { emit: t }) {
|
|
2415
|
-
let n = e,
|
|
2414
|
+
let n = e, r = t, { t: a } = B();
|
|
2416
2415
|
function s(e, t) {
|
|
2417
|
-
|
|
2416
|
+
r("update", { [e]: t });
|
|
2418
2417
|
}
|
|
2419
2418
|
function c() {
|
|
2420
2419
|
let e = {
|
|
@@ -2422,117 +2421,117 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2422
2421
|
platform: "facebook",
|
|
2423
2422
|
url: ""
|
|
2424
2423
|
};
|
|
2425
|
-
|
|
2424
|
+
r("update", { icons: [...n.block.icons, e] });
|
|
2426
2425
|
}
|
|
2427
|
-
function l(e, t,
|
|
2426
|
+
function l(e, t, i) {
|
|
2428
2427
|
let a = n.block.icons.map((n) => n.id === e ? {
|
|
2429
2428
|
...n,
|
|
2430
|
-
[t]:
|
|
2429
|
+
[t]: i
|
|
2431
2430
|
} : n);
|
|
2432
|
-
|
|
2431
|
+
r("update", { icons: a });
|
|
2433
2432
|
}
|
|
2434
2433
|
function u(e) {
|
|
2435
|
-
|
|
2434
|
+
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2436
2435
|
}
|
|
2437
|
-
return (t, n) => (o(),
|
|
2438
|
-
|
|
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", {
|
|
2439
2438
|
key: e.id,
|
|
2440
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"
|
|
2441
|
-
}, [
|
|
2440
|
+
}, [y("div", na, [y("select", {
|
|
2442
2441
|
"data-testid": "social-platform-select",
|
|
2443
|
-
class:
|
|
2442
|
+
class: v([x(G), "tpl:flex-1"]),
|
|
2444
2443
|
value: e.platform,
|
|
2445
2444
|
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2446
|
-
}, [(o(!0),
|
|
2445
|
+
}, [(o(!0), p(w, null, i(x(z), (e) => (o(), p("option", {
|
|
2447
2446
|
key: e,
|
|
2448
2447
|
value: e
|
|
2449
|
-
},
|
|
2450
|
-
class:
|
|
2451
|
-
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,
|
|
2452
2451
|
onClick: (t) => u(e.id)
|
|
2453
|
-
}, [
|
|
2452
|
+
}, [E(x(Ze), {
|
|
2454
2453
|
size: 14,
|
|
2455
2454
|
"stroke-width": 2
|
|
2456
|
-
})], 10, aa)]),
|
|
2455
|
+
})], 10, aa)]), E(J, {
|
|
2457
2456
|
"model-value": e.url,
|
|
2458
2457
|
type: "url",
|
|
2459
|
-
placeholder:
|
|
2458
|
+
placeholder: x(a).social.urlPlaceholder,
|
|
2460
2459
|
"onUpdate:modelValue": (t) => l(e.id, "url", t)
|
|
2461
2460
|
}, null, 8, [
|
|
2462
2461
|
"model-value",
|
|
2463
2462
|
"placeholder",
|
|
2464
2463
|
"onUpdate:modelValue"
|
|
2465
|
-
])]))), 128)),
|
|
2466
|
-
class:
|
|
2464
|
+
])]))), 128)), y("button", {
|
|
2465
|
+
class: v(x(nt)),
|
|
2467
2466
|
onClick: c
|
|
2468
|
-
}, [
|
|
2467
|
+
}, [E(x(V), {
|
|
2469
2468
|
size: 14,
|
|
2470
2469
|
"stroke-width": 2
|
|
2471
|
-
}),
|
|
2472
|
-
|
|
2473
|
-
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)),
|
|
2474
2473
|
value: e.block.iconStyle,
|
|
2475
2474
|
onChange: n[0] ||= (e) => s("iconStyle", e.target.value)
|
|
2476
2475
|
}, [
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
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)
|
|
2483
2482
|
], 42, sa)]),
|
|
2484
|
-
|
|
2483
|
+
y("div", ma, [y("label", { class: v(x(H)) }, h(x(a).social.color), 3), y("select", {
|
|
2485
2484
|
"data-testid": "social-tone-select",
|
|
2486
|
-
class:
|
|
2485
|
+
class: v(x(G)),
|
|
2487
2486
|
value: e.block.iconTone ?? "brand",
|
|
2488
2487
|
onChange: n[1] ||= (e) => s("iconTone", e.target.value)
|
|
2489
2488
|
}, [
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
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)
|
|
2493
2492
|
], 42, ha)]),
|
|
2494
|
-
|
|
2493
|
+
y("div", ya, [y("label", { class: v(x(H)) }, h(x(a).social.size), 3), E(Y, {
|
|
2495
2494
|
options: [
|
|
2496
2495
|
{
|
|
2497
2496
|
value: "small",
|
|
2498
|
-
label:
|
|
2497
|
+
label: x(a).social.sizeSmall
|
|
2499
2498
|
},
|
|
2500
2499
|
{
|
|
2501
2500
|
value: "medium",
|
|
2502
|
-
label:
|
|
2501
|
+
label: x(a).social.sizeMedium
|
|
2503
2502
|
},
|
|
2504
2503
|
{
|
|
2505
2504
|
value: "large",
|
|
2506
|
-
label:
|
|
2505
|
+
label: x(a).social.sizeLarge
|
|
2507
2506
|
}
|
|
2508
2507
|
],
|
|
2509
2508
|
"model-value": e.block.iconSize,
|
|
2510
2509
|
"onUpdate:modelValue": n[2] ||= (e) => s("iconSize", e)
|
|
2511
2510
|
}, null, 8, ["options", "model-value"])]),
|
|
2512
|
-
|
|
2511
|
+
y("div", ba, [y("label", { class: v(x(H)) }, h(x(a).social.spacing), 3), y("div", xa, [y("input", {
|
|
2513
2512
|
type: "number",
|
|
2514
|
-
class:
|
|
2513
|
+
class: v(x(W)),
|
|
2515
2514
|
value: e.block.spacing,
|
|
2516
2515
|
min: "0",
|
|
2517
2516
|
max: "50",
|
|
2518
2517
|
onInput: n[3] ||= (e) => s("spacing", Number(e.target.value))
|
|
2519
|
-
}, null, 42, Sa),
|
|
2520
|
-
|
|
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, {
|
|
2521
2520
|
options: [
|
|
2522
2521
|
{
|
|
2523
2522
|
value: "left",
|
|
2524
|
-
label:
|
|
2525
|
-
icon:
|
|
2523
|
+
label: x(a).title.alignLeft,
|
|
2524
|
+
icon: x(Ge)
|
|
2526
2525
|
},
|
|
2527
2526
|
{
|
|
2528
2527
|
value: "center",
|
|
2529
|
-
label:
|
|
2530
|
-
icon:
|
|
2528
|
+
label: x(a).title.alignCenter,
|
|
2529
|
+
icon: x(Qe)
|
|
2531
2530
|
},
|
|
2532
2531
|
{
|
|
2533
2532
|
value: "right",
|
|
2534
|
-
label:
|
|
2535
|
-
icon:
|
|
2533
|
+
label: x(a).title.alignRight,
|
|
2534
|
+
icon: x(Ve)
|
|
2536
2535
|
}
|
|
2537
2536
|
],
|
|
2538
2537
|
"model-value": e.block.align,
|
|
@@ -2540,23 +2539,23 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2540
2539
|
}, null, 8, ["options", "model-value"])])
|
|
2541
2540
|
], 64));
|
|
2542
2541
|
}
|
|
2543
|
-
}), 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({
|
|
2544
2543
|
__name: "SpacerToolbar",
|
|
2545
2544
|
props: { block: {} },
|
|
2546
2545
|
emits: ["update"],
|
|
2547
2546
|
setup(e, { emit: t }) {
|
|
2548
2547
|
let n = t, { t: r } = B();
|
|
2549
|
-
return (t, i) => (o(),
|
|
2550
|
-
|
|
2551
|
-
|
|
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", {
|
|
2552
2551
|
type: "number",
|
|
2553
|
-
class:
|
|
2552
|
+
class: v(x(W)),
|
|
2554
2553
|
value: e.block.height,
|
|
2555
2554
|
min: "10",
|
|
2556
2555
|
max: "100",
|
|
2557
2556
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2558
|
-
}, null, 42, Da),
|
|
2559
|
-
|
|
2557
|
+
}, null, 42, Da), y("span", { class: v(x(U)) }, "px", 2)]),
|
|
2558
|
+
y("input", {
|
|
2560
2559
|
type: "range",
|
|
2561
2560
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
2562
2561
|
value: e.block.height,
|
|
@@ -2569,7 +2568,7 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2569
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 = {
|
|
2570
2569
|
key: 0,
|
|
2571
2570
|
class: "tpl:mb-3.5"
|
|
2572
|
-
}, 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({
|
|
2573
2572
|
__name: "TableToolbar",
|
|
2574
2573
|
props: {
|
|
2575
2574
|
block: {},
|
|
@@ -2577,9 +2576,9 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2577
2576
|
},
|
|
2578
2577
|
emits: ["update"],
|
|
2579
2578
|
setup(e, { emit: t }) {
|
|
2580
|
-
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);
|
|
2581
2580
|
function c(e, t) {
|
|
2582
|
-
|
|
2581
|
+
r("update", { [e]: t });
|
|
2583
2582
|
}
|
|
2584
2583
|
function l() {
|
|
2585
2584
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
@@ -2589,10 +2588,10 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2589
2588
|
content: ""
|
|
2590
2589
|
}))
|
|
2591
2590
|
};
|
|
2592
|
-
|
|
2591
|
+
r("update", { rows: [...n.block.rows, t] });
|
|
2593
2592
|
}
|
|
2594
2593
|
function u(e) {
|
|
2595
|
-
|
|
2594
|
+
r("update", { rows: n.block.rows.filter((t) => t.id !== e) });
|
|
2596
2595
|
}
|
|
2597
2596
|
function d() {
|
|
2598
2597
|
let e = n.block.rows.map((e) => ({
|
|
@@ -2602,123 +2601,123 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2602
2601
|
content: ""
|
|
2603
2602
|
}]
|
|
2604
2603
|
}));
|
|
2605
|
-
|
|
2604
|
+
r("update", { rows: e });
|
|
2606
2605
|
}
|
|
2607
2606
|
function f(e) {
|
|
2608
2607
|
let t = n.block.rows.map((t) => ({
|
|
2609
2608
|
...t,
|
|
2610
2609
|
cells: t.cells.filter((t, n) => n !== e)
|
|
2611
2610
|
}));
|
|
2612
|
-
|
|
2611
|
+
r("update", { rows: t });
|
|
2613
2612
|
}
|
|
2614
|
-
return (t, n) => (o(),
|
|
2615
|
-
|
|
2616
|
-
|
|
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", {
|
|
2617
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",
|
|
2618
2617
|
disabled: e.block.rows.length <= 1,
|
|
2619
2618
|
onClick: n[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2620
|
-
}, [
|
|
2619
|
+
}, [E(x(Ue), {
|
|
2621
2620
|
size: 12,
|
|
2622
2621
|
"stroke-width": 2
|
|
2623
2622
|
})], 8, Fa),
|
|
2624
|
-
|
|
2625
|
-
|
|
2623
|
+
y("span", Ia, h(e.block.rows.length), 1),
|
|
2624
|
+
y("button", {
|
|
2626
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)]",
|
|
2627
2626
|
onClick: l
|
|
2628
|
-
}, [
|
|
2627
|
+
}, [E(x(V), {
|
|
2629
2628
|
size: 12,
|
|
2630
2629
|
"stroke-width": 2
|
|
2631
2630
|
})])
|
|
2632
|
-
])]),
|
|
2633
|
-
|
|
2631
|
+
])]), y("div", La, [y("span", Ra, h(x(a).table.columns), 1), y("div", za, [
|
|
2632
|
+
y("button", {
|
|
2634
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",
|
|
2635
2634
|
disabled: s.value <= 1,
|
|
2636
2635
|
onClick: n[1] ||= (e) => f(s.value - 1)
|
|
2637
|
-
}, [
|
|
2636
|
+
}, [E(x(Ue), {
|
|
2638
2637
|
size: 12,
|
|
2639
2638
|
"stroke-width": 2
|
|
2640
2639
|
})], 8, Ba),
|
|
2641
|
-
|
|
2642
|
-
|
|
2640
|
+
y("span", Va, h(s.value), 1),
|
|
2641
|
+
y("button", {
|
|
2643
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)]",
|
|
2644
2643
|
onClick: d
|
|
2645
|
-
}, [
|
|
2644
|
+
}, [E(x(V), {
|
|
2646
2645
|
size: 12,
|
|
2647
2646
|
"stroke-width": 2
|
|
2648
2647
|
})])
|
|
2649
2648
|
])])])]),
|
|
2650
|
-
|
|
2649
|
+
y("div", Ha, [E(q, {
|
|
2651
2650
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
2652
2651
|
"model-value": e.block.hasHeaderRow,
|
|
2653
|
-
label:
|
|
2652
|
+
label: x(a).table.hasHeaderRow,
|
|
2654
2653
|
"onUpdate:modelValue": n[2] ||= (e) => c("hasHeaderRow", e)
|
|
2655
2654
|
}, null, 8, ["model-value", "label"])]),
|
|
2656
|
-
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, {
|
|
2657
2656
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2658
|
-
"seed-color":
|
|
2659
|
-
placeholder:
|
|
2657
|
+
"seed-color": x(rt),
|
|
2658
|
+
placeholder: x(a).table.noHeaderBg,
|
|
2660
2659
|
"onUpdate:modelValue": n[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2661
2660
|
}, null, 8, [
|
|
2662
2661
|
"model-value",
|
|
2663
2662
|
"seed-color",
|
|
2664
2663
|
"placeholder"
|
|
2665
|
-
])])) :
|
|
2666
|
-
|
|
2664
|
+
])])) : g("", !0),
|
|
2665
|
+
y("div", Wa, [y("label", { class: v(x(H)) }, h(x(a).table.borderColor), 3), E(K, {
|
|
2667
2666
|
"model-value": e.block.borderColor,
|
|
2668
2667
|
"onUpdate:modelValue": n[4] ||= (e) => c("borderColor", e)
|
|
2669
2668
|
}, null, 8, ["model-value"])]),
|
|
2670
|
-
|
|
2669
|
+
y("div", Ga, [y("label", { class: v(x(H)) }, h(x(a).table.borderWidth), 3), y("div", Ka, [y("input", {
|
|
2671
2670
|
type: "number",
|
|
2672
|
-
class:
|
|
2671
|
+
class: v(x(W)),
|
|
2673
2672
|
value: e.block.borderWidth,
|
|
2674
2673
|
min: "0",
|
|
2675
2674
|
max: "10",
|
|
2676
2675
|
onInput: n[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2677
|
-
}, null, 42, qa),
|
|
2678
|
-
|
|
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", {
|
|
2679
2678
|
type: "number",
|
|
2680
|
-
class:
|
|
2679
|
+
class: v(x(W)),
|
|
2681
2680
|
value: e.block.cellPadding,
|
|
2682
2681
|
min: "0",
|
|
2683
2682
|
max: "30",
|
|
2684
2683
|
onInput: n[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2685
|
-
}, null, 42, Xa),
|
|
2686
|
-
|
|
2687
|
-
class:
|
|
2688
|
-
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),
|
|
2689
2688
|
onChange: n[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2690
|
-
}, [
|
|
2689
|
+
}, [y("option", $a, h(x(a).title.inheritFont), 1), (o(!0), p(w, null, i(e.fontFamilies, (e) => (o(), p("option", {
|
|
2691
2690
|
key: e.value,
|
|
2692
2691
|
value: e.value
|
|
2693
|
-
},
|
|
2694
|
-
|
|
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", {
|
|
2695
2694
|
type: "number",
|
|
2696
|
-
class:
|
|
2695
|
+
class: v(x(W)),
|
|
2697
2696
|
value: e.block.fontSize,
|
|
2698
2697
|
min: "10",
|
|
2699
2698
|
max: "32",
|
|
2700
2699
|
onInput: n[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2701
|
-
}, null, 42, ro),
|
|
2702
|
-
|
|
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, {
|
|
2703
2702
|
"model-value": e.block.color ?? "",
|
|
2704
2703
|
"onUpdate:modelValue": n[9] ||= (e) => c("color", e || void 0)
|
|
2705
2704
|
}, null, 8, ["model-value"])]),
|
|
2706
|
-
|
|
2705
|
+
y("div", ao, [y("label", { class: v(x(H)) }, h(x(a).table.textAlign), 3), E(Y, {
|
|
2707
2706
|
options: [
|
|
2708
2707
|
{
|
|
2709
2708
|
value: "left",
|
|
2710
|
-
label:
|
|
2711
|
-
icon:
|
|
2709
|
+
label: x(a).title.alignLeft,
|
|
2710
|
+
icon: x(Ge)
|
|
2712
2711
|
},
|
|
2713
2712
|
{
|
|
2714
2713
|
value: "center",
|
|
2715
|
-
label:
|
|
2716
|
-
icon:
|
|
2714
|
+
label: x(a).title.alignCenter,
|
|
2715
|
+
icon: x(Qe)
|
|
2717
2716
|
},
|
|
2718
2717
|
{
|
|
2719
2718
|
value: "right",
|
|
2720
|
-
label:
|
|
2721
|
-
icon:
|
|
2719
|
+
label: x(a).title.alignRight,
|
|
2720
|
+
icon: x(Ve)
|
|
2722
2721
|
}
|
|
2723
2722
|
],
|
|
2724
2723
|
"model-value": e.block.textAlign,
|
|
@@ -2726,7 +2725,7 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2726
2725
|
}, null, 8, ["options", "model-value"])])
|
|
2727
2726
|
], 64));
|
|
2728
2727
|
}
|
|
2729
|
-
}), 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({
|
|
2730
2729
|
__name: "TitleToolbar",
|
|
2731
2730
|
props: {
|
|
2732
2731
|
block: {},
|
|
@@ -2734,49 +2733,49 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2734
2733
|
},
|
|
2735
2734
|
emits: ["update"],
|
|
2736
2735
|
setup(e, { emit: t }) {
|
|
2737
|
-
let n = t, { t:
|
|
2736
|
+
let n = t, { t: r } = B();
|
|
2738
2737
|
function a(e, t) {
|
|
2739
2738
|
n("update", { [e]: t });
|
|
2740
2739
|
}
|
|
2741
|
-
return (t, n) => (o(),
|
|
2742
|
-
|
|
2743
|
-
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)),
|
|
2744
2743
|
value: e.block.level,
|
|
2745
2744
|
onChange: n[0] ||= (e) => a("level", Number(e.target.value))
|
|
2746
2745
|
}, [
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
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)
|
|
2751
2750
|
], 42, co)]),
|
|
2752
|
-
|
|
2753
|
-
class:
|
|
2754
|
-
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),
|
|
2755
2754
|
onChange: n[1] ||= (e) => a("fontFamily", e.target.value || void 0)
|
|
2756
|
-
}, [
|
|
2755
|
+
}, [y("option", go, h(x(r).title.inheritFont), 1), (o(!0), p(w, null, i(e.fontFamilies, (e) => (o(), p("option", {
|
|
2757
2756
|
key: e.value,
|
|
2758
2757
|
value: e.value
|
|
2759
|
-
},
|
|
2760
|
-
|
|
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, {
|
|
2761
2760
|
"model-value": e.block.color ?? "",
|
|
2762
2761
|
"onUpdate:modelValue": n[2] ||= (e) => a("color", e || void 0)
|
|
2763
2762
|
}, null, 8, ["model-value"])]),
|
|
2764
|
-
|
|
2763
|
+
y("div", yo, [y("label", { class: v(x(H)) }, h(x(r).title.align), 3), E(Y, {
|
|
2765
2764
|
options: [
|
|
2766
2765
|
{
|
|
2767
2766
|
value: "left",
|
|
2768
|
-
label:
|
|
2769
|
-
icon:
|
|
2767
|
+
label: x(r).title.alignLeft,
|
|
2768
|
+
icon: x(Ge)
|
|
2770
2769
|
},
|
|
2771
2770
|
{
|
|
2772
2771
|
value: "center",
|
|
2773
|
-
label:
|
|
2774
|
-
icon:
|
|
2772
|
+
label: x(r).title.alignCenter,
|
|
2773
|
+
icon: x(Qe)
|
|
2775
2774
|
},
|
|
2776
2775
|
{
|
|
2777
2776
|
value: "right",
|
|
2778
|
-
label:
|
|
2779
|
-
icon:
|
|
2777
|
+
label: x(r).title.alignRight,
|
|
2778
|
+
icon: x(Ve)
|
|
2780
2779
|
}
|
|
2781
2780
|
],
|
|
2782
2781
|
"model-value": e.block.textAlign,
|
|
@@ -2797,27 +2796,27 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2797
2796
|
}, No = ["value"], Po = { class: "tpl:mb-3.5" }, Fo = ["value"], Io = { value: "auto" }, Lo = { value: "custom" }, Ro = {
|
|
2798
2797
|
key: 0,
|
|
2799
2798
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2800
|
-
}, 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({
|
|
2801
2800
|
__name: "VideoToolbar",
|
|
2802
2801
|
props: { block: {} },
|
|
2803
2802
|
emits: ["update"],
|
|
2804
|
-
setup(e, { emit:
|
|
2805
|
-
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 = [
|
|
2806
2805
|
300,
|
|
2807
2806
|
400,
|
|
2808
2807
|
500
|
|
2809
|
-
], f =
|
|
2810
|
-
let e =
|
|
2808
|
+
], f = S(() => !!c), b = S(() => L(i.block.url, l)), C = S(() => {
|
|
2809
|
+
let e = i.block.width;
|
|
2811
2810
|
return e === "full" ? "full" : d.includes(e) ? String(e) : "custom";
|
|
2812
|
-
}),
|
|
2813
|
-
|
|
2811
|
+
}), T = S(() => typeof i.block.height == "number" ? "custom" : "auto"), D = t(!1), { start: O } = be(() => {
|
|
2812
|
+
D.value = !1;
|
|
2814
2813
|
}, 1e3, { immediate: !1 });
|
|
2815
2814
|
function k(e, t) {
|
|
2816
|
-
|
|
2815
|
+
a("update", { [e]: t });
|
|
2817
2816
|
}
|
|
2818
2817
|
function A(e) {
|
|
2819
2818
|
if (e === "custom") {
|
|
2820
|
-
let e =
|
|
2819
|
+
let e = i.block.width;
|
|
2821
2820
|
(typeof e != "number" || d.includes(e)) && k("width", Vo);
|
|
2822
2821
|
} else k("width", e === "full" ? "full" : Number(e));
|
|
2823
2822
|
}
|
|
@@ -2828,53 +2827,53 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2828
2827
|
function M(e) {
|
|
2829
2828
|
k("height", e === "custom" ? Ho : void 0);
|
|
2830
2829
|
}
|
|
2831
|
-
function
|
|
2830
|
+
function ee(e) {
|
|
2832
2831
|
let t = Number(e);
|
|
2833
2832
|
!Number.isFinite(t) || t <= 0 || k("height", t);
|
|
2834
2833
|
}
|
|
2835
|
-
async function
|
|
2834
|
+
async function N() {
|
|
2836
2835
|
let e = await c?.({ accept: ["images"] });
|
|
2837
|
-
u.alive && e && (k("thumbnailUrl", e.url),
|
|
2836
|
+
u.alive && e && (k("thumbnailUrl", e.url), D.value = !0, O());
|
|
2838
2837
|
}
|
|
2839
|
-
return (t, n) => (o(),
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
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, {
|
|
2843
2842
|
"model-value": e.block.url,
|
|
2844
2843
|
type: "url",
|
|
2845
|
-
placeholder:
|
|
2844
|
+
placeholder: x(s).video.videoUrlPlaceholder,
|
|
2846
2845
|
"onUpdate:modelValue": n[0] ||= (e) => k("url", e)
|
|
2847
2846
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2848
|
-
e.block.url ? (o(),
|
|
2847
|
+
e.block.url ? (o(), _(q, {
|
|
2849
2848
|
key: 0,
|
|
2850
2849
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2851
2850
|
"model-value": e.block.openInNewTab ?? !1,
|
|
2852
|
-
label:
|
|
2851
|
+
label: x(s).video.openInNewTab,
|
|
2853
2852
|
"onUpdate:modelValue": n[1] ||= (e) => k("openInNewTab", e)
|
|
2854
|
-
}, null, 8, ["model-value", "label"])) :
|
|
2853
|
+
}, null, 8, ["model-value", "label"])) : g("", !0)
|
|
2855
2854
|
]),
|
|
2856
|
-
|
|
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", {
|
|
2857
2856
|
type: "url",
|
|
2858
|
-
class:
|
|
2857
|
+
class: v(x(G)),
|
|
2859
2858
|
value: e.block.placeholderUrl || "",
|
|
2860
|
-
placeholder:
|
|
2861
|
-
title:
|
|
2859
|
+
placeholder: x(s).video.placeholderUrlPlaceholder,
|
|
2860
|
+
title: x(s).video.placeholderUrlTooltip,
|
|
2862
2861
|
onInput: n[2] ||= (e) => k("placeholderUrl", e.target.value)
|
|
2863
|
-
}, null, 42, wo)])) :
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
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, {
|
|
2867
2866
|
"model-value": e.block.thumbnailUrl,
|
|
2868
2867
|
type: "url",
|
|
2869
|
-
placeholder:
|
|
2870
|
-
pulse:
|
|
2868
|
+
placeholder: x(s).video.thumbnailPlaceholder,
|
|
2869
|
+
pulse: D.value,
|
|
2871
2870
|
"onUpdate:modelValue": n[3] ||= (e) => k("thumbnailUrl", e)
|
|
2872
2871
|
}, null, 8, [
|
|
2873
2872
|
"model-value",
|
|
2874
2873
|
"placeholder",
|
|
2875
2874
|
"pulse"
|
|
2876
2875
|
]),
|
|
2877
|
-
f.value ? (o(),
|
|
2876
|
+
f.value ? (o(), p("button", {
|
|
2878
2877
|
key: 0,
|
|
2879
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",
|
|
2880
2879
|
style: {
|
|
@@ -2882,71 +2881,71 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2882
2881
|
color: "var(--tpl-primary)",
|
|
2883
2882
|
"background-color": "var(--tpl-bg)"
|
|
2884
2883
|
},
|
|
2885
|
-
onClick:
|
|
2886
|
-
}, [
|
|
2884
|
+
onClick: N
|
|
2885
|
+
}, [E(x(Ke), {
|
|
2887
2886
|
size: 14,
|
|
2888
2887
|
"stroke-width": 1.5
|
|
2889
|
-
}),
|
|
2888
|
+
}), m(" " + h(x(s).image.browseMedia), 1)])) : g("", !0)
|
|
2890
2889
|
]),
|
|
2891
|
-
|
|
2890
|
+
y("div", Do, [y("label", { class: v(x(H)) }, h(x(s).video.altText), 3), E(J, {
|
|
2892
2891
|
"model-value": e.block.alt,
|
|
2893
2892
|
type: "text",
|
|
2894
|
-
placeholder:
|
|
2893
|
+
placeholder: x(s).video.altTextPlaceholder,
|
|
2895
2894
|
"onUpdate:modelValue": n[4] ||= (e) => k("alt", e)
|
|
2896
2895
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
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)),
|
|
2901
2900
|
"data-testid": "video-width-mode",
|
|
2902
|
-
value:
|
|
2901
|
+
value: C.value,
|
|
2903
2902
|
onChange: n[5] ||= (e) => A(e.target.value)
|
|
2904
2903
|
}, [
|
|
2905
|
-
|
|
2906
|
-
n[10] ||=
|
|
2907
|
-
n[11] ||=
|
|
2908
|
-
n[12] ||=
|
|
2909
|
-
|
|
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)
|
|
2910
2909
|
], 42, ko),
|
|
2911
|
-
|
|
2910
|
+
C.value === "custom" ? (o(), p("div", Mo, [y("input", {
|
|
2912
2911
|
type: "number",
|
|
2913
2912
|
"data-testid": "video-width-input",
|
|
2914
|
-
class:
|
|
2913
|
+
class: v(x(W)),
|
|
2915
2914
|
value: e.block.width,
|
|
2916
2915
|
min: "20",
|
|
2917
2916
|
onInput: n[6] ||= (e) => j(e.target.value)
|
|
2918
|
-
}, null, 42, No),
|
|
2917
|
+
}, null, 42, No), y("span", { class: v(x(U)) }, "px", 2)])) : g("", !0)
|
|
2919
2918
|
]),
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
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)),
|
|
2924
2923
|
"data-testid": "video-height-mode",
|
|
2925
|
-
value:
|
|
2924
|
+
value: T.value,
|
|
2926
2925
|
onChange: n[7] ||= (e) => M(e.target.value)
|
|
2927
|
-
}, [
|
|
2928
|
-
|
|
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", {
|
|
2929
2928
|
type: "number",
|
|
2930
2929
|
"data-testid": "video-height-input",
|
|
2931
|
-
class:
|
|
2930
|
+
class: v(x(W)),
|
|
2932
2931
|
value: e.block.height,
|
|
2933
2932
|
min: "20",
|
|
2934
|
-
onInput: n[8] ||= (e) =>
|
|
2935
|
-
}, 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)
|
|
2936
2935
|
]),
|
|
2937
|
-
|
|
2936
|
+
y("div", Bo, [y("label", { class: v(x(H)) }, h(x(s).title.align), 3), E(Y, {
|
|
2938
2937
|
options: [
|
|
2939
2938
|
{
|
|
2940
2939
|
value: "left",
|
|
2941
|
-
label:
|
|
2940
|
+
label: x(s).title.alignLeft
|
|
2942
2941
|
},
|
|
2943
2942
|
{
|
|
2944
2943
|
value: "center",
|
|
2945
|
-
label:
|
|
2944
|
+
label: x(s).title.alignCenter
|
|
2946
2945
|
},
|
|
2947
2946
|
{
|
|
2948
2947
|
value: "right",
|
|
2949
|
-
label:
|
|
2948
|
+
label: x(s).title.alignRight
|
|
2950
2949
|
}
|
|
2951
2950
|
],
|
|
2952
2951
|
"model-value": e.block.align,
|
|
@@ -2954,7 +2953,7 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2954
2953
|
}, null, 8, ["options", "model-value"])])
|
|
2955
2954
|
], 64));
|
|
2956
2955
|
}
|
|
2957
|
-
}), 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({
|
|
2958
2957
|
__name: "Toolbar",
|
|
2959
2958
|
props: { block: {} },
|
|
2960
2959
|
emits: [
|
|
@@ -2963,108 +2962,108 @@ var Ki = { class: "tpl:mb-3.5" }, qi = ["value"], Ji = ["value"], Yi = {
|
|
|
2963
2962
|
"duplicate"
|
|
2964
2963
|
],
|
|
2965
2964
|
setup(e, { emit: t }) {
|
|
2966
|
-
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(() => {
|
|
2967
2966
|
if (f.value) return u.find((e) => e.type === i.block.customType);
|
|
2968
|
-
}),
|
|
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));
|
|
2969
2968
|
function C(e) {
|
|
2970
2969
|
a("update", e);
|
|
2971
2970
|
}
|
|
2972
|
-
return (t,
|
|
2971
|
+
return (t, r) => (o(), p("aside", {
|
|
2973
2972
|
"data-testid": "block-toolbar",
|
|
2974
|
-
"aria-label":
|
|
2973
|
+
"aria-label": x(c).landmarks.blockToolbar,
|
|
2975
2974
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2976
|
-
}, [
|
|
2975
|
+
}, [y("div", Go, [y("div", Ko, [x(at)[d.value] ? (o(), _(D(x(at)[d.value]), {
|
|
2977
2976
|
key: 0,
|
|
2978
2977
|
size: 16,
|
|
2979
2978
|
"stroke-width": 1.5
|
|
2980
|
-
})) : f.value ? (o(),
|
|
2979
|
+
})) : f.value ? (o(), _(x(Fe), {
|
|
2981
2980
|
key: 1,
|
|
2982
2981
|
size: 16,
|
|
2983
2982
|
"stroke-width": 1.5
|
|
2984
|
-
})) :
|
|
2983
|
+
})) : g("", !0), y("h3", qo, h(v.value), 1)]), y("div", Jo, [y("button", {
|
|
2985
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)]",
|
|
2986
|
-
title:
|
|
2987
|
-
onClick:
|
|
2988
|
-
}, [
|
|
2985
|
+
title: x(c).toolbar.duplicate,
|
|
2986
|
+
onClick: r[0] ||= (e) => a("duplicate")
|
|
2987
|
+
}, [E(x(Le), {
|
|
2989
2988
|
size: 14,
|
|
2990
2989
|
"stroke-width": 2
|
|
2991
|
-
})], 8, Yo),
|
|
2990
|
+
})], 8, Yo), y("button", {
|
|
2992
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)]",
|
|
2993
|
-
title:
|
|
2994
|
-
onClick:
|
|
2995
|
-
}, [
|
|
2992
|
+
title: x(c).toolbar.delete,
|
|
2993
|
+
onClick: r[1] ||= (e) => a("delete")
|
|
2994
|
+
}, [E(x(We), {
|
|
2996
2995
|
size: 14,
|
|
2997
2996
|
"stroke-width": 2
|
|
2998
|
-
})], 8, Xo)])]),
|
|
2997
|
+
})], 8, Xo)])]), y("div", Zo, [f.value ? (o(), _(Ur, {
|
|
2999
2998
|
key: 0,
|
|
3000
2999
|
block: e.block,
|
|
3001
|
-
onUpdateFieldValues:
|
|
3002
|
-
onUpdateDataSourceFetched:
|
|
3003
|
-
}, 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, {
|
|
3004
3003
|
key: 1,
|
|
3005
3004
|
block: e.block,
|
|
3006
3005
|
onUpdate: C
|
|
3007
|
-
}, null, 8, ["block"])) : d.value === "title" ? (o(),
|
|
3006
|
+
}, null, 8, ["block"])) : d.value === "title" ? (o(), _(bo, {
|
|
3008
3007
|
key: 2,
|
|
3009
3008
|
block: e.block,
|
|
3010
|
-
"font-families":
|
|
3009
|
+
"font-families": b.value,
|
|
3011
3010
|
onUpdate: C
|
|
3012
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(),
|
|
3011
|
+
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (o(), _(Wi, {
|
|
3013
3012
|
key: 3,
|
|
3014
3013
|
block: e.block,
|
|
3015
3014
|
onUpdate: C
|
|
3016
|
-
}, null, 8, ["block"])) : d.value === "image" ? (o(),
|
|
3015
|
+
}, null, 8, ["block"])) : d.value === "image" ? (o(), _(Oi, {
|
|
3017
3016
|
key: 4,
|
|
3018
3017
|
block: e.block,
|
|
3019
3018
|
onUpdate: C
|
|
3020
|
-
}, null, 8, ["block"])) : d.value === "video" ? (o(),
|
|
3019
|
+
}, null, 8, ["block"])) : d.value === "video" ? (o(), _(Uo, {
|
|
3021
3020
|
key: 5,
|
|
3022
3021
|
block: e.block,
|
|
3023
3022
|
onUpdate: C
|
|
3024
|
-
}, null, 8, ["block"])) : d.value === "button" ? (o(),
|
|
3023
|
+
}, null, 8, ["block"])) : d.value === "button" ? (o(), _(Jt, {
|
|
3025
3024
|
key: 6,
|
|
3026
3025
|
block: e.block,
|
|
3027
|
-
"font-families":
|
|
3026
|
+
"font-families": b.value,
|
|
3028
3027
|
onUpdate: C
|
|
3029
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(),
|
|
3028
|
+
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (o(), _(Yr, {
|
|
3030
3029
|
key: 7,
|
|
3031
3030
|
block: e.block,
|
|
3032
3031
|
onUpdate: C
|
|
3033
|
-
}, null, 8, ["block"])) : d.value === "social" ? (o(),
|
|
3032
|
+
}, null, 8, ["block"])) : d.value === "social" ? (o(), _(wa, {
|
|
3034
3033
|
key: 8,
|
|
3035
3034
|
block: e.block,
|
|
3036
3035
|
onUpdate: C
|
|
3037
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (o(),
|
|
3036
|
+
}, null, 8, ["block"])) : d.value === "menu" ? (o(), _(Bi, {
|
|
3038
3037
|
key: 9,
|
|
3039
3038
|
block: e.block,
|
|
3040
|
-
"font-families":
|
|
3039
|
+
"font-families": b.value,
|
|
3041
3040
|
onUpdate: C
|
|
3042
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(),
|
|
3041
|
+
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (o(), _(oo, {
|
|
3043
3042
|
key: 10,
|
|
3044
3043
|
block: e.block,
|
|
3045
|
-
"font-families":
|
|
3044
|
+
"font-families": b.value,
|
|
3046
3045
|
onUpdate: C
|
|
3047
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(),
|
|
3046
|
+
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (o(), _(ka, {
|
|
3048
3047
|
key: 11,
|
|
3049
3048
|
block: e.block,
|
|
3050
3049
|
onUpdate: C
|
|
3051
|
-
}, null, 8, ["block"])) : d.value === "html" ? (o(),
|
|
3050
|
+
}, null, 8, ["block"])) : d.value === "html" ? (o(), _($r, {
|
|
3052
3051
|
key: 12,
|
|
3053
3052
|
block: e.block,
|
|
3054
3053
|
onUpdate: C
|
|
3055
|
-
}, null, 8, ["block"])) : d.value === "countdown" ? (o(),
|
|
3054
|
+
}, null, 8, ["block"])) : d.value === "countdown" ? (o(), _(x(n), {
|
|
3056
3055
|
key: 13,
|
|
3057
3056
|
block: e.block,
|
|
3058
|
-
"font-families":
|
|
3057
|
+
"font-families": b.value,
|
|
3059
3058
|
onUpdate: C
|
|
3060
|
-
}, null, 8, ["block", "font-families"])) :
|
|
3059
|
+
}, null, 8, ["block", "font-families"])) : g("", !0), E(ar, {
|
|
3061
3060
|
block: e.block,
|
|
3062
3061
|
"is-first-section": d.value === "paragraph",
|
|
3063
3062
|
onUpdate: C
|
|
3064
3063
|
}, null, 8, ["block", "is-first-section"])])], 8, Wo));
|
|
3065
3064
|
}
|
|
3066
|
-
}), $o = /* @__PURE__ */ e({ default: () => es }), es = /*#__PURE__*/
|
|
3065
|
+
}), $o = /* @__PURE__ */ e({ default: () => es }), es = /*#__PURE__*/ $e(Qo, [["__scopeId", "data-v-e2d2c22f"]]);
|
|
3067
3066
|
//#endregion
|
|
3068
3067
|
export { es as default, Y as i, $ as n, X as r, $o as t };
|
|
3069
3068
|
|
|
3070
|
-
//# sourceMappingURL=Toolbar-
|
|
3069
|
+
//# sourceMappingURL=Toolbar-DoprRgTn.js.map
|