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