@templatical/editor 0.47.0 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{AiChatSidebar-BPOv5Ra8.js → AiChatSidebar-CdjTb9ej.js} +14 -14
- package/dist/{AiFeatureMenu-H_WT4YR8.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
- package/dist/{BlockIssueBadge-AgO5abEB.js → BlockIssueBadge-BdpJwim0.js} +5 -5
- package/dist/BlockPreviewCanvas-D_sowkf0.js +141 -0
- package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
- package/dist/{CloudPanels-H_GdbOfZ.js → CloudPanels-1hwFiJ0G.js} +39 -68
- package/dist/CollaborationNotices-BWpKzueF.js +73 -0
- package/dist/CollaboratorBar-D87phJsw.js +123 -0
- package/dist/{CommentsPanel-CMgsG_yh.js → CommentsPanel-BUvUzO3T.js} +2 -2
- package/dist/{CommentsSidebar-DCh8DTP8.js → CommentsSidebar-J65znlrH.js} +14 -14
- package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
- package/dist/{CountdownToolbar-DVuucA3v.js → CountdownToolbar-CLMIwfK7.js} +7 -7
- package/dist/{DesignReferenceSidebar-DxNV4lQp.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
- package/dist/{IssuesPanel-CUpW54P4.js → IssuesPanel-DeeVsfG7.js} +8 -8
- package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
- package/dist/{LogicTagInsertButton-DDYKnqmj.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
- package/dist/{MediaEditModal-D_we0Scr.js → MediaEditModal-C_wxoUMG.js} +3 -3
- package/dist/{MediaPanels-L95BwWV1.js → MediaPanels-BVXDkqtH.js} +2 -2
- package/dist/{MergeTagInput-DAL998tx.js → MergeTagInput-BEw_r0PJ.js} +3 -3
- package/dist/{MergeTagModeToggle-CjHO26rb.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
- package/dist/{ParagraphEditor-CcEN1N6n.js → ParagraphEditor-zLV44z-R.js} +135 -135
- package/dist/{RestoreVersionDialog-B2OH5rgs.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
- package/dist/{RichTextEditorContent-BGeTg-QL.js → RichTextEditorContent-CsvniFlI.js} +9 -9
- package/dist/{SaveBlockDialog-CCVyU-7y.js → SaveBlockDialog-DzWURF_e.js} +34 -35
- package/dist/{SavedBlocksBrowserModal-_WmSeqIh.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
- package/dist/{SavedBlocksPanels-DVX_ruQ7.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
- package/dist/{SavedBlocksPickBar-DVJC28hP.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
- package/dist/{TemplateScoringPanel-U0QFiwdI.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
- package/dist/{TemplateSettings-CdhTm9JQ.js → TemplateSettings-Cu5X9DgA.js} +11 -11
- package/dist/{TestEmailModal-BqToA_ls.js → TestEmailModal-BeRYV3eg.js} +14 -14
- package/dist/{TestEmailPanel-Cn4Ptq0j.js → TestEmailPanel-B8c3fQi2.js} +2 -2
- package/dist/{TitleEditor-CZdqeltH.js → TitleEditor-CvpNUoAp.js} +13 -13
- package/dist/{ToggleSwitch-BR8Sgzib.js → ToggleSwitch-DHweVJOr.js} +2 -2
- package/dist/Toolbar-BadDSkkF.js +3153 -0
- package/dist/{TplModal-CoczSDma.js → TplModal-BZgi9Tes.js} +5 -5
- package/dist/{VersionHistoryMenu-DY5z5FZr.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
- package/dist/{VersionHistoryPanels-DowHeDAQ.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
- package/dist/{VersionPreviewBanner-Bo8NxBbh.js → VersionPreviewBanner-F-811aps.js} +4 -4
- package/dist/WrapperBlock-DiiaxpMb.js +45 -0
- package/dist/{blockTypeIcons-4E1U8f99.js → blockTypeIcons-CayLluou.js} +49 -19
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +40 -2
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js → AiChatSidebar-yXJ85Zcg.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-B72rI0be.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-BqSG9iEd.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CS7ytN-z.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js +143 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-m2tWRyWv.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-DJXLTUHc.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-D1fPLjG8.js → CloudPanels-XufhBZYF.js} +38 -67
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
- package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js → CommentsPanel-R8YLLO3v.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-CmxPylNf.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js → CommentsSidebar-96NZHVq3.js} +16 -16
- package/dist/cdn/chunks/{CommentsSidebar-CrleQTbo.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
- package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js → CountdownToolbar-tmiTPEXm.js} +8 -8
- package/dist/cdn/chunks/{CountdownToolbar-DPIOtlN0.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js → DesignReferenceSidebar-D14IIu_P.js} +40 -40
- package/dist/cdn/chunks/{DesignReferenceSidebar-BgTNqgCy.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js → IssuesPanel-BoPiCLGc.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-BGjLcNpQ.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js → LogicTagInsertButton-BJ2t2vxC.js} +98 -98
- package/dist/cdn/chunks/{LogicTagInsertButton-BEsqPhMr.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js → MediaEditModal-DD0SZ-S3.js} +3 -3
- package/dist/cdn/chunks/{MediaEditModal-C1Ao0i2c.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js → MediaPanels-CkdJ_kGp.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-1GPYiZZ0.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js → MergeTagInput-7wXX71DH.js} +4 -4
- package/dist/cdn/chunks/{MergeTagInput-Dy13_OLc.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-B2CPZOeF.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js → ParagraphEditor-CJQjRHXV.js} +52 -52
- package/dist/cdn/chunks/{ParagraphEditor-BGLIw7kg.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js → RestoreVersionDialog-C5cxBRKi.js} +8 -8
- package/dist/cdn/chunks/{RestoreVersionDialog-BhykE8En.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-B-txUvPL.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js → SaveBlockDialog-BKbjUnPM.js} +25 -26
- package/dist/cdn/chunks/{SaveBlockDialog-BHqEp7jw.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BhR6AI0f.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-YwffJtfY.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
- package/dist/cdn/chunks/{SavedBlocksPickBar-BtpFU7es.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js → TemplateScoringPanel-BBPnHILC.js} +10 -10
- package/dist/cdn/chunks/{TemplateScoringPanel-N4ySFh5w.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js → TemplateSettings-CtrzzQWl.js} +14 -14
- package/dist/cdn/chunks/{TemplateSettings-C7b5X34U.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js → TestEmailModal-DuZKYMWD.js} +15 -15
- package/dist/cdn/chunks/{TestEmailModal-DHJKI5y5.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js → TestEmailPanel-DERaCdpG.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-lYtzTXpR.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js → TitleEditor-CEgxjtUX.js} +20 -20
- package/dist/cdn/chunks/{TitleEditor-5eY01ypW.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
- package/dist/cdn/chunks/{ToggleSwitch-BN8rMC2m.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js +3070 -0
- package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js → TplModal-DDrbWJcE.js} +5 -5
- package/dist/cdn/chunks/{TplModal-WIBiBrGy.js.map → TplModal-DDrbWJcE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js → VersionHistoryMenu-MlxsUmuT.js} +11 -11
- package/dist/cdn/chunks/{VersionHistoryMenu-CZnlS9K5.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-xjLSpR1e.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
- package/dist/cdn/chunks/{VersionPreviewBanner-sARpn4hh.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +47 -0
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js.map +1 -0
- package/dist/cdn/chunks/{ca-DMoGGP9L.js → ca-DSJwJ5ov.js} +41 -3
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
- package/dist/{cloud-DwjaAdwK.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DtIZ2Lee.js → createCloudRuntime-DiYCJ21w.js} +127 -169
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
- package/dist/{de-DgAelLbM.js → cdn/chunks/de-CBE6O79z.js} +42 -2
- package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
- package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
- package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
- package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
- package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
- package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
- package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js → editor-modal-HJBy9kLj.js} +69 -69
- package/dist/cdn/chunks/{editor-modal-Bcwo0orC.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
- package/dist/cdn/chunks/{en-Dekrl7HA.js → en-CDexnk0p.js} +41 -3
- package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
- package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
- package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
- package/dist/{es-BaZzyidV.js → cdn/chunks/es-BE42B6uN.js} +42 -2
- package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js → extensions-koOuDeZS.js} +23 -23
- package/dist/cdn/chunks/{extensions-T-t8MKDb.js.map → extensions-koOuDeZS.js.map} +1 -1
- package/dist/{fr-C5ucb1HK.js → cdn/chunks/fr-DlJFPDQR.js} +42 -2
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4fX9Bwy.js → icons-CjlNV8xD.js} +121 -92
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +1 -0
- package/dist/{ja-CUgR3mV0.js → cdn/chunks/ja-CUT8gkNI.js} +42 -2
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
- package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
- package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
- package/dist/{nl-qrLY7hMS.js → cdn/chunks/nl-bXWqqRyS.js} +42 -2
- package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-Co0oi0Jf.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
- package/dist/{pt-BR-C6hMTQYi.js → cdn/chunks/pt-BR-2_H4-wlb.js} +42 -2
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
- package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
- package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
- package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
- package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
- package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
- package/dist/cdn/chunks/{src-CHlVFp7r.js → src-B1e5SSYP.js} +312 -286
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +1 -0
- package/dist/cdn/chunks/src-B77z1iw4.js +649 -0
- package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
- package/dist/cdn/chunks/{src-BnJlDuyB.js → src-CvLTYGdO.js} +555 -283
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
- package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
- package/dist/cdn/chunks/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +2 -2
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
- package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-Bf2d1DKI.js → useEditorCore-DpCFvHg_.js} +758 -732
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js → useLogicTag-X8bc5qNl.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-3S63go4E.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js → useMergeTag-DFoOexIQ.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BQtxUHq1.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js → withCurrentFont-D-f61ghC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DwJd-lKc.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1328 -1069
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B5R4zXr7.js → check-DQQzkmIC.js} +1 -1
- package/dist/{chevron-down-BKyl85NV.js → chevron-down-CIF4bdon.js} +1 -1
- package/dist/{chevron-right-BmToZ8qX.js → chevron-right-Cg7Xu-ev.js} +1 -1
- package/dist/{chevron-up-DNYdOxPC.js → chevron-up-Csu7ISD-.js} +1 -1
- package/dist/{circle-alert-Dx9ju3YZ.js → circle-alert-YUvIJAgY.js} +1 -1
- package/dist/{clock-Dv9bxsSH.js → clock-CnSIGKQW.js} +1 -1
- package/dist/{cdn/chunks/cloud-Cd7ptfhL.js → cloud-YUYDtdHt.js} +308 -569
- package/dist/{copy-BsKl4dcy.js → copy-CUC43md_.js} +1 -1
- package/dist/{createCloudRuntime-C8gpPsSi.js → createCloudRuntime-BMDRjL0k.js} +126 -168
- package/dist/{createLucideIcon-DziKp5iU.js → createLucideIcon-BcP1sjdp.js} +6 -6
- package/dist/{cdn/chunks/de-DgAelLbM.js → de-CBE6O79z.js} +40 -4
- package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
- package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
- package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
- package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
- package/dist/{dist-C8koXLhl.js → dist-DBG3nh3k.js} +550 -284
- package/dist/{editor-modal-BwyIUnV_.js → editor-modal--7_9A6j-.js} +27 -27
- package/dist/en-BHCMzqib.js +1 -0
- package/dist/{en-Dekrl7HA.js → en-CDexnk0p.js} +40 -2
- package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
- package/dist/{cdn/chunks/es-BaZzyidV.js → es-BE42B6uN.js} +40 -4
- package/dist/{extensions-DHyKjsNZ.js → extensions-zwsZlWjH.js} +23 -23
- package/dist/{eye-DQuinb9k.js → eye-B1bua-ck.js} +1 -1
- package/dist/{cdn/chunks/fr-C5ucb1HK.js → fr-DlJFPDQR.js} +40 -4
- package/dist/{image-up-yTfLjOrj.js → image-up-BqiO7KCO.js} +1 -1
- package/dist/index.d.ts +356 -38
- package/dist/{info-C7OjlS11.js → info-x26nGOo2.js} +1 -1
- package/dist/{cdn/chunks/ja-CUgR3mV0.js → ja-CUT8gkNI.js} +40 -4
- package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
- package/dist/{link-CrUFaZ0t.js → link-CezhndyR.js} +1 -1
- package/dist/{list-CLgv6M-k.js → list-DQqdptI0.js} +1 -1
- package/dist/{loader-circle-BXM5VO0K.js → loader-circle-DCEeoYoi.js} +1 -1
- package/dist/{message-circle-BisdQ8H9.js → message-circle-BLGzfv_7.js} +1 -1
- package/dist/{cdn/chunks/nl-qrLY7hMS.js → nl-bXWqqRyS.js} +40 -4
- package/dist/{package-C1T4AxV1.js → package-D_kEQCMU.js} +1 -1
- package/dist/{pencil-oo2mwf4C.js → pencil-Dct8zGLy.js} +1 -1
- package/dist/{plus-BIilXopD.js → plus-BDd0gTEm.js} +1 -1
- package/dist/{preRenderCustomBlocks-lFX0HHiV.js → preRenderCustomBlocks-CtKJecE-.js} +1 -1
- package/dist/{cdn/chunks/pt-BR-C6hMTQYi.js → pt-BR-2_H4-wlb.js} +40 -4
- package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
- package/dist/{refresh-cw-DrLlkEVC.js → refresh-cw-tGMRDxr8.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
- package/dist/{search-DNu9lImk.js → search-Bm2cCQpe.js} +1 -1
- package/dist/{send-DDNh3LoJ.js → send-sVLaKZ7f.js} +1 -1
- package/dist/{shield-check-aXM3o14f.js → shield-check-YhsbXfQc.js} +1 -1
- package/dist/{smartphone-isccgDee.js → smartphone-B2W81p02.js} +1 -1
- package/dist/socialIcons-Bwv-49EB.js +2167 -0
- package/dist/{sparkles-CIMfFxKv.js → sparkles-a1qkBZ8X.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
- package/dist/templatical-editor.js +1448 -1189
- package/dist/{text-align-start-C4JFeqsq.js → text-align-start-CTuwQ5YW.js} +1 -1
- package/dist/{timeouts-DHPZQ0G3.js → timeouts-o5Y9BuqI.js} +1 -1
- package/dist/{trash-8ZD9pK_c.js → trash-I3D2peFQ.js} +1 -1
- package/dist/{triangle-alert-pq45xEHl.js → triangle-alert-CenxmLRE.js} +1 -1
- package/dist/{upload-DrNFmVes.js → upload-uU2cK0Ce.js} +1 -1
- package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
- package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
- package/dist/{useEditorCore-BcT7UI4e.js → useEditorCore-DRbMRe8F.js} +1103 -1076
- package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
- package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
- package/dist/{useLogicTag-D-dI8H6p.js → useLogicTag-zcI6BWIf.js} +3 -3
- package/dist/{useMergeTag-5wMeDBi-.js → useMergeTag-C-iBLlp0.js} +5 -5
- package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
- package/dist/{useScrollToBlock-Do3suaqp.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
- package/dist/{withCurrentFont-B4YnsG_2.js → withCurrentFont-D62njRLu.js} +1 -1
- package/dist/{x-CBFKGLB1.js → x-KFQ4S-Kz.js} +1 -1
- package/package.json +12 -12
- package/dist/BlockPreviewCanvas-CZDBSPoG.js +0 -136
- package/dist/CloudHeaderExtras-gXsTYoGG.js +0 -59
- package/dist/CollaboratorBar-BazGNMqN.js +0 -103
- package/dist/Toolbar-OGakTBEg.js +0 -2851
- package/dist/WrapperBlock-BOABSX9W.js +0 -46
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js +0 -138
- package/dist/cdn/chunks/BlockPreviewCanvas-cOTMFRcg.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DJXLTUHc.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D1fPLjG8.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js +0 -52
- package/dist/cdn/chunks/CollaboratorBar-MeRQB1eN.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js +0 -2767
- package/dist/cdn/chunks/Toolbar-Ik54UO_-.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-fsLe7goL.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-D3g5QzdT.js.map +0 -1
- package/dist/cdn/chunks/ca-DMoGGP9L.js.map +0 -1
- package/dist/cdn/chunks/cloud-Cd7ptfhL.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DtIZ2Lee.js.map +0 -1
- package/dist/cdn/chunks/de-DgAelLbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
- package/dist/cdn/chunks/en-BANFWZdr.js +0 -1
- package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
- package/dist/cdn/chunks/en-Dekrl7HA.js.map +0 -1
- package/dist/cdn/chunks/es-BaZzyidV.js.map +0 -1
- package/dist/cdn/chunks/fr-C5ucb1HK.js.map +0 -1
- package/dist/cdn/chunks/icons-C4fX9Bwy.js.map +0 -1
- package/dist/cdn/chunks/ja-CUgR3mV0.js.map +0 -1
- package/dist/cdn/chunks/nl-qrLY7hMS.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-C6hMTQYi.js.map +0 -1
- package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js +0 -1103
- package/dist/cdn/chunks/socialIcons-DACw1wA8.js.map +0 -1
- package/dist/cdn/chunks/src-BnJlDuyB.js.map +0 -1
- package/dist/cdn/chunks/src-Bu0qBpbf.js +0 -616
- package/dist/cdn/chunks/src-Bu0qBpbf.js.map +0 -1
- package/dist/cdn/chunks/src-CHlVFp7r.js.map +0 -1
- package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-Bf2d1DKI.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
- package/dist/en-CC-57eC_.js +0 -1
- package/dist/socialIcons-BctavKBN.js +0 -1180
package/dist/Toolbar-OGakTBEg.js
DELETED
|
@@ -1,2851 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { A as t, At as n, B as r, F as i, M as a, N as o, R as s, S as c, V as l, Y as u, Z as d, _ as f, at as p, c as m, d as h, g, h as _, jt as v, kt as y, l as b, r as x, s as S, u as C, v as w } from "./vue.runtime.esm-bundler-CAzmrXdD.js";
|
|
3
|
-
import { a as T, o as E } from "./runtime-dom.esm-bundler-lFF-QG3j.js";
|
|
4
|
-
import { J as D, V as O, _ as k, _t as A, c as j, i as M, n as N, r as P, t as F, tt as I, u as ee, v as te, vt as L } from "./dist-C8koXLhl.js";
|
|
5
|
-
import { S as R, a as ne, d as re, i as ie, l as ae, p as oe, r as se, u as ce } from "./socialIcons-BctavKBN.js";
|
|
6
|
-
import { _ as le } from "./dist-CUWI-IvA.js";
|
|
7
|
-
import { $ as ue, C as de, G as fe, L as pe, P as me, d as he, h as ge, n as _e, p as ve, v as ye } from "./keys-BKFq19a2.js";
|
|
8
|
-
import { t as z } from "./useI18n-CxVEpurs.js";
|
|
9
|
-
import { o as be } from "./usePopoverPosition-CwnH1o5g.js";
|
|
10
|
-
import { t as xe } from "./createLucideIcon-DziKp5iU.js";
|
|
11
|
-
import { c as B } from "./LogicTagInsertButton-DDYKnqmj.js";
|
|
12
|
-
import { t as Se } from "./chevron-down-BKyl85NV.js";
|
|
13
|
-
import { t as Ce } from "./circle-alert-Dx9ju3YZ.js";
|
|
14
|
-
import { n as V, t as we } from "./blockTypeIcons-4E1U8f99.js";
|
|
15
|
-
import { t as Te } from "./copy-BsKl4dcy.js";
|
|
16
|
-
import { t as Ee } from "./info-C7OjlS11.js";
|
|
17
|
-
import { t as De } from "./link-CrUFaZ0t.js";
|
|
18
|
-
import { n as Oe, t as ke } from "./smartphone-isccgDee.js";
|
|
19
|
-
import { t as H } from "./plus-BIilXopD.js";
|
|
20
|
-
import { t as Ae } from "./refresh-cw-DrLlkEVC.js";
|
|
21
|
-
import { n as je, r as Me, t as Ne } from "./text-align-start-C4JFeqsq.js";
|
|
22
|
-
import { t as Pe } from "./trash-8ZD9pK_c.js";
|
|
23
|
-
import { t as Fe } from "./x-CBFKGLB1.js";
|
|
24
|
-
import { t as Ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
25
|
-
import { t as Le } from "./useAliveFlag-Dd06mRxe.js";
|
|
26
|
-
import { _ as Re, b as ze, c as Be, g as U, h as W, m as G, p as K, r as Ve, v as He } from "./styleConstants-D1Jz-TFU.js";
|
|
27
|
-
import { n as Ue, t as q } from "./ToggleSwitch-BR8Sgzib.js";
|
|
28
|
-
import { n as We, t as Ge } from "./withCurrentFont-B4YnsG_2.js";
|
|
29
|
-
import { t as J } from "./MergeTagInput-DAL998tx.js";
|
|
30
|
-
var Ke = xe({
|
|
31
|
-
name: "lock-open",
|
|
32
|
-
size: 24,
|
|
33
|
-
node: [["rect", {
|
|
34
|
-
width: "18",
|
|
35
|
-
height: "11",
|
|
36
|
-
x: "3",
|
|
37
|
-
y: "11",
|
|
38
|
-
rx: "2",
|
|
39
|
-
ry: "2",
|
|
40
|
-
key: "1w4ew1"
|
|
41
|
-
}], ["path", {
|
|
42
|
-
d: "M7 11V7a5 5 0 0 1 9.9-1",
|
|
43
|
-
key: "1mm8w8"
|
|
44
|
-
}]],
|
|
45
|
-
aliases: ["unlock"]
|
|
46
|
-
}), qe = xe({
|
|
47
|
-
name: "lock",
|
|
48
|
-
size: 24,
|
|
49
|
-
node: [["rect", {
|
|
50
|
-
width: "18",
|
|
51
|
-
height: "11",
|
|
52
|
-
x: "3",
|
|
53
|
-
y: "11",
|
|
54
|
-
rx: "2",
|
|
55
|
-
ry: "2",
|
|
56
|
-
key: "1w4ew1"
|
|
57
|
-
}], ["path", {
|
|
58
|
-
d: "M7 11V7a5 5 0 0 1 10 0v4",
|
|
59
|
-
key: "fwvmzm"
|
|
60
|
-
}]]
|
|
61
|
-
}), Je = xe({
|
|
62
|
-
name: "unlink",
|
|
63
|
-
size: 24,
|
|
64
|
-
node: [
|
|
65
|
-
["path", {
|
|
66
|
-
d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",
|
|
67
|
-
key: "yqzxt4"
|
|
68
|
-
}],
|
|
69
|
-
["path", {
|
|
70
|
-
d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",
|
|
71
|
-
key: "4qinb0"
|
|
72
|
-
}],
|
|
73
|
-
["line", {
|
|
74
|
-
x1: "8",
|
|
75
|
-
x2: "8",
|
|
76
|
-
y1: "2",
|
|
77
|
-
y2: "5",
|
|
78
|
-
key: "1041cp"
|
|
79
|
-
}],
|
|
80
|
-
["line", {
|
|
81
|
-
x1: "2",
|
|
82
|
-
x2: "5",
|
|
83
|
-
y1: "8",
|
|
84
|
-
y2: "8",
|
|
85
|
-
key: "14m1p5"
|
|
86
|
-
}],
|
|
87
|
-
["line", {
|
|
88
|
-
x1: "16",
|
|
89
|
-
x2: "16",
|
|
90
|
-
y1: "19",
|
|
91
|
-
y2: "22",
|
|
92
|
-
key: "rzdirn"
|
|
93
|
-
}],
|
|
94
|
-
["line", {
|
|
95
|
-
x1: "19",
|
|
96
|
-
x2: "22",
|
|
97
|
-
y1: "16",
|
|
98
|
-
y2: "16",
|
|
99
|
-
key: "ox905f"
|
|
100
|
-
}]
|
|
101
|
-
]
|
|
102
|
-
}), Ye = [
|
|
103
|
-
"aria-checked",
|
|
104
|
-
"aria-label",
|
|
105
|
-
"title",
|
|
106
|
-
"onClick"
|
|
107
|
-
], Xe = { key: 1 }, Y = /* @__PURE__ */ w({
|
|
108
|
-
__name: "SlidingPillSelect",
|
|
109
|
-
props: {
|
|
110
|
-
options: {},
|
|
111
|
-
modelValue: {}
|
|
112
|
-
},
|
|
113
|
-
emits: ["update:modelValue"],
|
|
114
|
-
setup(e, { emit: r }) {
|
|
115
|
-
let o = e, s = r, c = S(() => o.options.findIndex((e) => e.value === o.modelValue)), l = S(() => `translateX(${Math.max(c.value, 0) * 100}%)`);
|
|
116
|
-
return (r, o) => (t(), h("div", {
|
|
117
|
-
role: "radiogroup",
|
|
118
|
-
class: "tpl:relative tpl:grid tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1",
|
|
119
|
-
style: n({
|
|
120
|
-
gridTemplateColumns: `repeat(${e.options.length}, 1fr)`,
|
|
121
|
-
backgroundColor: "var(--tpl-bg-hover)"
|
|
122
|
-
})
|
|
123
|
-
}, [c.value >= 0 ? (t(), h("div", {
|
|
124
|
-
key: 0,
|
|
125
|
-
class: "tpl:absolute tpl:inset-y-1 tpl:rounded-[var(--tpl-radius-sm)]",
|
|
126
|
-
style: n({
|
|
127
|
-
left: "4px",
|
|
128
|
-
width: `calc((100% - 8px) / ${e.options.length})`,
|
|
129
|
-
transform: l.value,
|
|
130
|
-
backgroundColor: "var(--tpl-bg)",
|
|
131
|
-
boxShadow: "var(--tpl-shadow)",
|
|
132
|
-
transition: "transform 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
133
|
-
})
|
|
134
|
-
}, null, 4)) : C("", !0), (t(!0), h(x, null, a(e.options, (r) => (t(), h("button", {
|
|
135
|
-
key: r.value,
|
|
136
|
-
role: "radio",
|
|
137
|
-
"aria-checked": e.modelValue === r.value,
|
|
138
|
-
"aria-label": r.label,
|
|
139
|
-
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",
|
|
140
|
-
style: n({
|
|
141
|
-
color: e.modelValue === r.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
142
|
-
transition: "color 120ms cubic-bezier(0.16, 1, 0.3, 1)"
|
|
143
|
-
}),
|
|
144
|
-
title: r.label,
|
|
145
|
-
onClick: (e) => s("update:modelValue", r.value)
|
|
146
|
-
}, [r.icon ? (t(), b(i(r.icon), {
|
|
147
|
-
key: 0,
|
|
148
|
-
size: 14,
|
|
149
|
-
"stroke-width": 2
|
|
150
|
-
})) : (t(), h("span", Xe, v(r.label), 1))], 12, Ye))), 128))], 4));
|
|
151
|
-
}
|
|
152
|
-
}), Ze = { class: "tpl:flex tpl:items-stretch" }, Qe = [
|
|
153
|
-
"data-testid",
|
|
154
|
-
"value",
|
|
155
|
-
"min",
|
|
156
|
-
"max"
|
|
157
|
-
], X = /* @__PURE__ */ w({
|
|
158
|
-
__name: "NumberWithSuffix",
|
|
159
|
-
props: {
|
|
160
|
-
modelValue: {},
|
|
161
|
-
min: {},
|
|
162
|
-
max: {},
|
|
163
|
-
suffix: {},
|
|
164
|
-
testid: {}
|
|
165
|
-
},
|
|
166
|
-
emits: ["update:modelValue"],
|
|
167
|
-
setup(e, { emit: n }) {
|
|
168
|
-
let r = n;
|
|
169
|
-
function i(e) {
|
|
170
|
-
let t = e.target;
|
|
171
|
-
t.validity?.badInput || r("update:modelValue", Number(t.value));
|
|
172
|
-
}
|
|
173
|
-
return (n, r) => (t(), h("div", Ze, [m("input", {
|
|
174
|
-
type: "number",
|
|
175
|
-
"data-testid": e.testid,
|
|
176
|
-
class: y(p(G)),
|
|
177
|
-
value: e.modelValue,
|
|
178
|
-
min: e.min,
|
|
179
|
-
max: e.max,
|
|
180
|
-
onInput: i
|
|
181
|
-
}, null, 42, Qe), m("span", { class: y(p(W)) }, v(e.suffix), 3)]));
|
|
182
|
-
}
|
|
183
|
-
}), $e = [
|
|
184
|
-
"aria-pressed",
|
|
185
|
-
"aria-label",
|
|
186
|
-
"title",
|
|
187
|
-
"data-testid"
|
|
188
|
-
], et = /* @__PURE__ */ w({
|
|
189
|
-
__name: "LinkToggle",
|
|
190
|
-
props: {
|
|
191
|
-
linked: { type: Boolean },
|
|
192
|
-
linkLabel: {},
|
|
193
|
-
unlinkLabel: {},
|
|
194
|
-
testid: {}
|
|
195
|
-
},
|
|
196
|
-
emits: ["toggle"],
|
|
197
|
-
setup(e, { emit: n }) {
|
|
198
|
-
let r = n;
|
|
199
|
-
return (n, i) => (t(), h("button", {
|
|
200
|
-
type: "button",
|
|
201
|
-
class: y(["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)]"]),
|
|
202
|
-
"aria-pressed": e.linked ? "true" : "false",
|
|
203
|
-
"aria-label": e.linked ? e.unlinkLabel : e.linkLabel,
|
|
204
|
-
title: e.linked ? e.unlinkLabel : e.linkLabel,
|
|
205
|
-
"data-testid": e.testid,
|
|
206
|
-
onClick: i[0] ||= (e) => r("toggle")
|
|
207
|
-
}, [e.linked ? (t(), b(p(De), {
|
|
208
|
-
key: 0,
|
|
209
|
-
size: 14,
|
|
210
|
-
"stroke-width": 2
|
|
211
|
-
})) : (t(), b(p(Je), {
|
|
212
|
-
key: 1,
|
|
213
|
-
size: 14,
|
|
214
|
-
"stroke-width": 2
|
|
215
|
-
}))], 10, $e));
|
|
216
|
-
}
|
|
217
|
-
}), tt = { class: "tpl:mb-3.5" }, nt = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, rt = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, it = {
|
|
218
|
-
key: 0,
|
|
219
|
-
class: "tpl:mb-3.5"
|
|
220
|
-
}, at = { class: "tpl:mb-3.5" }, ot = { class: "tpl:mb-3.5" }, st = /* @__PURE__ */ w({
|
|
221
|
-
__name: "BorderControl",
|
|
222
|
-
props: {
|
|
223
|
-
modelValue: {},
|
|
224
|
-
testidPrefix: {}
|
|
225
|
-
},
|
|
226
|
-
emits: ["update:modelValue"],
|
|
227
|
-
setup(e, { emit: n }) {
|
|
228
|
-
let r = e, i = n, { t: a } = z(), o = {
|
|
229
|
-
width: 0,
|
|
230
|
-
style: "solid",
|
|
231
|
-
color: "#000000"
|
|
232
|
-
};
|
|
233
|
-
function c(e, t) {
|
|
234
|
-
return e.width === t.width && e.style === t.style && e.color === t.color;
|
|
235
|
-
}
|
|
236
|
-
let l = S(() => {
|
|
237
|
-
let e = r.modelValue;
|
|
238
|
-
return !e || M.every((t) => c(e[t], e.top));
|
|
239
|
-
}), u = d(l.value);
|
|
240
|
-
s(l, (e) => {
|
|
241
|
-
!e && u.value && (u.value = !1);
|
|
242
|
-
});
|
|
243
|
-
let f = d("top"), _ = S(() => {
|
|
244
|
-
let e = u.value ? "top" : f.value;
|
|
245
|
-
return r.modelValue?.[e] ?? o;
|
|
246
|
-
}), b = (e) => !!e && e.width > 0;
|
|
247
|
-
function w(e) {
|
|
248
|
-
if (u.value) {
|
|
249
|
-
i("update:modelValue", b(e) ? L(e) : void 0);
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
let t = {
|
|
253
|
-
...r.modelValue ?? L(o),
|
|
254
|
-
[f.value]: e
|
|
255
|
-
}, n = M.some((e) => b(t[e]));
|
|
256
|
-
i("update:modelValue", n ? t : void 0);
|
|
257
|
-
}
|
|
258
|
-
function T(e) {
|
|
259
|
-
w({
|
|
260
|
-
..._.value,
|
|
261
|
-
width: e > 0 ? e : 0
|
|
262
|
-
});
|
|
263
|
-
}
|
|
264
|
-
function E(e) {
|
|
265
|
-
w({
|
|
266
|
-
..._.value,
|
|
267
|
-
...e
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
function D() {
|
|
271
|
-
if (u.value) {
|
|
272
|
-
u.value = !1;
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
u.value = !0;
|
|
276
|
-
let e = r.modelValue;
|
|
277
|
-
if (!e) return;
|
|
278
|
-
let t = b(e[f.value]) ? e[f.value] : M.map((t) => e[t]).find(b);
|
|
279
|
-
i("update:modelValue", t ? L(t) : void 0);
|
|
280
|
-
}
|
|
281
|
-
let O = S(() => M.map((e) => ({
|
|
282
|
-
value: e,
|
|
283
|
-
label: a.spacingControl[e]
|
|
284
|
-
})));
|
|
285
|
-
return (n, r) => (t(), h("div", tt, [
|
|
286
|
-
m("div", nt, [m("span", rt, v(p(a).blockSettings.border), 1), g(et, {
|
|
287
|
-
linked: u.value,
|
|
288
|
-
"link-label": p(a).blockSettings.linkSides,
|
|
289
|
-
"unlink-label": p(a).blockSettings.unlinkSides,
|
|
290
|
-
testid: `${e.testidPrefix}-border-link`,
|
|
291
|
-
onToggle: D
|
|
292
|
-
}, null, 8, [
|
|
293
|
-
"linked",
|
|
294
|
-
"link-label",
|
|
295
|
-
"unlink-label",
|
|
296
|
-
"testid"
|
|
297
|
-
])]),
|
|
298
|
-
u.value ? C("", !0) : (t(), h("div", it, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderSide), 3), g(Y, {
|
|
299
|
-
options: O.value,
|
|
300
|
-
"model-value": f.value,
|
|
301
|
-
"onUpdate:modelValue": r[0] ||= (e) => f.value = e
|
|
302
|
-
}, null, 8, ["options", "model-value"])])),
|
|
303
|
-
m("div", at, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderWidth), 3), g(X, {
|
|
304
|
-
"model-value": _.value.width,
|
|
305
|
-
min: 0,
|
|
306
|
-
suffix: "px",
|
|
307
|
-
testid: `${e.testidPrefix}-border-width-input`,
|
|
308
|
-
"onUpdate:modelValue": T
|
|
309
|
-
}, null, 8, ["model-value", "testid"])]),
|
|
310
|
-
_.value.width > 0 ? (t(), h(x, { key: 1 }, [m("div", ot, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderStyle), 3), g(Y, {
|
|
311
|
-
options: [
|
|
312
|
-
{
|
|
313
|
-
value: "solid",
|
|
314
|
-
label: p(a).divider.solid
|
|
315
|
-
},
|
|
316
|
-
{
|
|
317
|
-
value: "dashed",
|
|
318
|
-
label: p(a).divider.dashed
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
value: "dotted",
|
|
322
|
-
label: p(a).divider.dotted
|
|
323
|
-
}
|
|
324
|
-
],
|
|
325
|
-
"model-value": _.value.style,
|
|
326
|
-
"onUpdate:modelValue": r[1] ||= (e) => E({ style: e })
|
|
327
|
-
}, null, 8, ["options", "model-value"])]), m("div", null, [m("label", { class: y(p(U)) }, v(p(a).blockSettings.borderColor), 3), g(B, {
|
|
328
|
-
"model-value": _.value.color,
|
|
329
|
-
"onUpdate:modelValue": r[2] ||= (e) => E({ color: e })
|
|
330
|
-
}, null, 8, ["model-value"])])], 64)) : C("", !0)
|
|
331
|
-
]));
|
|
332
|
-
}
|
|
333
|
-
}), ct = { class: "tpl:mb-3.5" }, lt = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, ut = { class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, dt = {
|
|
334
|
-
key: 1,
|
|
335
|
-
class: "tpl:grid tpl:grid-cols-2 tpl:gap-2"
|
|
336
|
-
}, ft = { class: "tpl:mb-1 tpl:block tpl:text-[10px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, pt = /* @__PURE__ */ w({
|
|
337
|
-
__name: "RadiusControl",
|
|
338
|
-
props: {
|
|
339
|
-
modelValue: {},
|
|
340
|
-
label: {},
|
|
341
|
-
testidPrefix: {},
|
|
342
|
-
max: {}
|
|
343
|
-
},
|
|
344
|
-
emits: ["update:modelValue"],
|
|
345
|
-
setup(e, { emit: n }) {
|
|
346
|
-
let r = e, i = n, { t: o } = z(), c = {
|
|
347
|
-
topLeft: "cornerTopLeft",
|
|
348
|
-
topRight: "cornerTopRight",
|
|
349
|
-
bottomRight: "cornerBottomRight",
|
|
350
|
-
bottomLeft: "cornerBottomLeft"
|
|
351
|
-
}, l = [
|
|
352
|
-
"topLeft",
|
|
353
|
-
"topRight",
|
|
354
|
-
"bottomLeft",
|
|
355
|
-
"bottomRight"
|
|
356
|
-
], u = S(() => {
|
|
357
|
-
let e = r.modelValue ?? 0;
|
|
358
|
-
return typeof e == "number" ? {
|
|
359
|
-
topLeft: e,
|
|
360
|
-
topRight: e,
|
|
361
|
-
bottomRight: e,
|
|
362
|
-
bottomLeft: e
|
|
363
|
-
} : e;
|
|
364
|
-
}), f = S(() => P.every((e) => u.value[e] === u.value.topLeft)), _ = d(f.value);
|
|
365
|
-
s(f, (e) => {
|
|
366
|
-
!e && _.value && (_.value = !1);
|
|
367
|
-
});
|
|
368
|
-
function y(e) {
|
|
369
|
-
return Number.isFinite(e) && e >= 0;
|
|
370
|
-
}
|
|
371
|
-
function C(e) {
|
|
372
|
-
y(e) && i("update:modelValue", e);
|
|
373
|
-
}
|
|
374
|
-
function w(e, t) {
|
|
375
|
-
y(t) && i("update:modelValue", {
|
|
376
|
-
...u.value,
|
|
377
|
-
[e]: t
|
|
378
|
-
});
|
|
379
|
-
}
|
|
380
|
-
function T() {
|
|
381
|
-
_.value = !_.value, _.value && i("update:modelValue", u.value.topLeft);
|
|
382
|
-
}
|
|
383
|
-
return (n, r) => (t(), h("div", ct, [m("div", lt, [m("span", ut, v(e.label), 1), g(et, {
|
|
384
|
-
linked: _.value,
|
|
385
|
-
"link-label": p(o).blockSettings.linkCorners,
|
|
386
|
-
"unlink-label": p(o).blockSettings.unlinkCorners,
|
|
387
|
-
testid: `${e.testidPrefix}-border-radius-link`,
|
|
388
|
-
onToggle: T
|
|
389
|
-
}, null, 8, [
|
|
390
|
-
"linked",
|
|
391
|
-
"link-label",
|
|
392
|
-
"unlink-label",
|
|
393
|
-
"testid"
|
|
394
|
-
])]), _.value ? (t(), b(X, {
|
|
395
|
-
key: 0,
|
|
396
|
-
"model-value": u.value.topLeft,
|
|
397
|
-
min: 0,
|
|
398
|
-
max: e.max,
|
|
399
|
-
suffix: "px",
|
|
400
|
-
testid: `${e.testidPrefix}-border-radius-input`,
|
|
401
|
-
"onUpdate:modelValue": C
|
|
402
|
-
}, null, 8, [
|
|
403
|
-
"model-value",
|
|
404
|
-
"max",
|
|
405
|
-
"testid"
|
|
406
|
-
])) : (t(), h("div", dt, [(t(), h(x, null, a(l, (t) => m("div", { key: t }, [m("label", ft, v(p(o).blockSettings[c[t]]), 1), g(X, {
|
|
407
|
-
"model-value": u.value[t],
|
|
408
|
-
min: 0,
|
|
409
|
-
max: e.max,
|
|
410
|
-
suffix: "px",
|
|
411
|
-
testid: `${e.testidPrefix}-border-radius-${t}-input`,
|
|
412
|
-
"onUpdate:modelValue": (e) => w(t, e)
|
|
413
|
-
}, null, 8, [
|
|
414
|
-
"model-value",
|
|
415
|
-
"max",
|
|
416
|
-
"testid",
|
|
417
|
-
"onUpdate:modelValue"
|
|
418
|
-
])])), 64))]))]));
|
|
419
|
-
}
|
|
420
|
-
}), mt = { class: "tpl:mb-3.5" }, ht = ["value"], gt = { value: "" }, _t = ["value"], 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:mb-3.5" }, Ct = { class: "tpl:flex tpl:items-stretch" }, wt = ["value"], Tt = { class: "tpl:mb-3.5" }, Et = ["value"], Dt = { value: "auto" }, Ot = { value: "full" }, kt = { value: "custom" }, At = {
|
|
421
|
-
key: 0,
|
|
422
|
-
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
423
|
-
}, jt = ["value"], Mt = { class: "tpl:mb-3.5" }, Nt = 200, Pt = /* @__PURE__ */ w({
|
|
424
|
-
__name: "ButtonToolbar",
|
|
425
|
-
props: {
|
|
426
|
-
block: {},
|
|
427
|
-
fontFamilies: {}
|
|
428
|
-
},
|
|
429
|
-
emits: ["update"],
|
|
430
|
-
setup(e, { emit: n }) {
|
|
431
|
-
let r = e, i = n, { t: o } = z(), s = S(() => r.block.width === "full" ? "full" : typeof r.block.width == "number" ? "custom" : "auto");
|
|
432
|
-
function c(e, t) {
|
|
433
|
-
i("update", { [e]: t });
|
|
434
|
-
}
|
|
435
|
-
function l(e) {
|
|
436
|
-
e === "full" ? c("width", "full") : e === "custom" ? c("width", typeof r.block.width == "number" ? r.block.width : Nt) : c("width", void 0);
|
|
437
|
-
}
|
|
438
|
-
function u(e) {
|
|
439
|
-
let t = Number(e);
|
|
440
|
-
!Number.isFinite(t) || t <= 0 || c("width", t);
|
|
441
|
-
}
|
|
442
|
-
return (n, r) => (t(), h(x, null, [
|
|
443
|
-
m("div", mt, [m("label", { class: y(p(U)) }, v(p(o).button.fontFamily), 3), m("select", {
|
|
444
|
-
class: y(p(K)),
|
|
445
|
-
value: p(Ge)(e.block.fontFamily),
|
|
446
|
-
onChange: r[0] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
447
|
-
}, [m("option", gt, v(p(o).button.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
|
|
448
|
-
key: e.value,
|
|
449
|
-
value: e.value
|
|
450
|
-
}, v(e.label), 9, _t))), 128))], 42, ht)]),
|
|
451
|
-
m("div", vt, [m("label", { class: y(p(U)) }, v(p(o).button.text), 3), g(J, {
|
|
452
|
-
"model-value": e.block.text,
|
|
453
|
-
type: "text",
|
|
454
|
-
"onUpdate:modelValue": r[1] ||= (e) => c("text", e)
|
|
455
|
-
}, null, 8, ["model-value"])]),
|
|
456
|
-
m("div", yt, [
|
|
457
|
-
m("label", { class: y(p(U)) }, v(p(o).button.url), 3),
|
|
458
|
-
g(J, {
|
|
459
|
-
"model-value": e.block.url,
|
|
460
|
-
type: "url",
|
|
461
|
-
placeholder: p(o).button.urlPlaceholder,
|
|
462
|
-
"onUpdate:modelValue": r[2] ||= (e) => c("url", e)
|
|
463
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
464
|
-
e.block.url ? (t(), b(q, {
|
|
465
|
-
key: 0,
|
|
466
|
-
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
467
|
-
"model-value": e.block.openInNewTab ?? !1,
|
|
468
|
-
label: p(o).button.openInNewTab,
|
|
469
|
-
"onUpdate:modelValue": r[3] ||= (e) => c("openInNewTab", e)
|
|
470
|
-
}, null, 8, ["model-value", "label"])) : C("", !0)
|
|
471
|
-
]),
|
|
472
|
-
m("div", bt, [m("label", { class: y(p(U)) }, v(p(o).button.background), 3), g(B, {
|
|
473
|
-
"model-value": e.block.backgroundColor,
|
|
474
|
-
"allow-transparent": "",
|
|
475
|
-
"onUpdate:modelValue": r[4] ||= (e) => c("backgroundColor", e)
|
|
476
|
-
}, null, 8, ["model-value"])]),
|
|
477
|
-
m("div", xt, [m("label", { class: y(p(U)) }, v(p(o).button.textColor), 3), g(B, {
|
|
478
|
-
"model-value": e.block.textColor,
|
|
479
|
-
"onUpdate:modelValue": r[5] ||= (e) => c("textColor", e)
|
|
480
|
-
}, null, 8, ["model-value"])]),
|
|
481
|
-
g(st, {
|
|
482
|
-
"model-value": e.block.border,
|
|
483
|
-
"testid-prefix": "button",
|
|
484
|
-
"onUpdate:modelValue": r[6] ||= (e) => c("border", e)
|
|
485
|
-
}, null, 8, ["model-value"]),
|
|
486
|
-
g(pt, {
|
|
487
|
-
"model-value": e.block.borderRadius,
|
|
488
|
-
label: p(o).button.borderRadius,
|
|
489
|
-
max: 50,
|
|
490
|
-
"testid-prefix": "button",
|
|
491
|
-
"onUpdate:modelValue": r[7] ||= (e) => c("borderRadius", e)
|
|
492
|
-
}, null, 8, ["model-value", "label"]),
|
|
493
|
-
m("div", St, [m("label", { class: y(p(U)) }, v(p(o).button.fontSize), 3), m("div", Ct, [m("input", {
|
|
494
|
-
type: "number",
|
|
495
|
-
class: y(p(G)),
|
|
496
|
-
value: e.block.fontSize,
|
|
497
|
-
min: "10",
|
|
498
|
-
max: "36",
|
|
499
|
-
onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
500
|
-
}, null, 42, wt), m("span", { class: y(p(W)) }, "px", 2)])]),
|
|
501
|
-
m("div", Tt, [
|
|
502
|
-
m("label", { class: y(p(U)) }, v(p(o).button.width), 3),
|
|
503
|
-
m("select", {
|
|
504
|
-
class: y(p(K)),
|
|
505
|
-
value: s.value,
|
|
506
|
-
onChange: r[9] ||= (e) => l(e.target.value)
|
|
507
|
-
}, [
|
|
508
|
-
m("option", Dt, v(p(o).button.widthAuto), 1),
|
|
509
|
-
m("option", Ot, v(p(o).button.fullWidth), 1),
|
|
510
|
-
m("option", kt, v(p(o).button.widthCustom), 1)
|
|
511
|
-
], 42, Et),
|
|
512
|
-
s.value === "custom" ? (t(), h("div", At, [m("input", {
|
|
513
|
-
type: "number",
|
|
514
|
-
class: y(p(G)),
|
|
515
|
-
value: typeof e.block.width == "number" ? e.block.width : Nt,
|
|
516
|
-
min: "20",
|
|
517
|
-
onInput: r[10] ||= (e) => u(e.target.value)
|
|
518
|
-
}, null, 42, jt), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
|
|
519
|
-
]),
|
|
520
|
-
m("div", Mt, [m("label", { class: y(p(U)) }, v(p(o).title.align), 3), g(Y, {
|
|
521
|
-
options: [
|
|
522
|
-
{
|
|
523
|
-
value: "left",
|
|
524
|
-
label: p(o).title.alignLeft
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
value: "center",
|
|
528
|
-
label: p(o).title.alignCenter
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
value: "right",
|
|
532
|
-
label: p(o).title.alignRight
|
|
533
|
-
}
|
|
534
|
-
],
|
|
535
|
-
"model-value": e.block.align ?? "center",
|
|
536
|
-
"onUpdate:modelValue": r[11] ||= (e) => c("align", e)
|
|
537
|
-
}, null, 8, ["options", "model-value"])])
|
|
538
|
-
], 64));
|
|
539
|
-
}
|
|
540
|
-
}), Ft = { class: "spacing-control" }, It = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Lt = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, Rt = { class: "tpl:flex tpl:items-center" }, zt = ["aria-label"], Bt = ["value", "aria-label"], Vt = ["aria-label"], Ht = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Ut = { class: "tpl:flex tpl:items-center" }, Wt = ["aria-label"], Gt = ["value", "aria-label"], Kt = ["aria-label"], qt = ["aria-label", "title"], Jt = { class: "tpl:flex tpl:items-center" }, Yt = ["aria-label"], Xt = ["value", "aria-label"], Zt = ["aria-label"], Qt = { class: "tpl:flex tpl:items-center" }, $t = ["aria-label"], en = ["value", "aria-label"], tn = ["aria-label"], Z = "tpl:flex tpl:items-center tpl:justify-center tpl:w-8 tpl:h-8 tpl:text-[var(--tpl-text-muted)] tpl:bg-[var(--tpl-bg)] tpl:border tpl:border-[var(--tpl-border)] tpl:cursor-pointer tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)] tpl:active:bg-[var(--tpl-bg-active)]", nn = "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)]", rn = /*#__PURE__*/ Ie(/* @__PURE__ */ w({
|
|
541
|
-
__name: "SpacingControl",
|
|
542
|
-
props: {
|
|
543
|
-
modelValue: {},
|
|
544
|
-
label: {}
|
|
545
|
-
},
|
|
546
|
-
emits: ["update:modelValue"],
|
|
547
|
-
setup(e, { emit: n }) {
|
|
548
|
-
let r = e, i = n, { t: a } = z(), o = S(() => r.modelValue.top === r.modelValue.right && r.modelValue.right === r.modelValue.bottom && r.modelValue.bottom === r.modelValue.left), c = d(o.value);
|
|
549
|
-
s(o, (e) => {
|
|
550
|
-
!e && c.value && (c.value = !1);
|
|
551
|
-
});
|
|
552
|
-
function l(e, t) {
|
|
553
|
-
let n = r.modelValue[e], a = Math.max(0, n + t);
|
|
554
|
-
c.value ? i("update:modelValue", {
|
|
555
|
-
top: a,
|
|
556
|
-
right: a,
|
|
557
|
-
bottom: a,
|
|
558
|
-
left: a
|
|
559
|
-
}) : i("update:modelValue", {
|
|
560
|
-
...r.modelValue,
|
|
561
|
-
[e]: a
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
function u(e, t) {
|
|
565
|
-
let n = Math.max(0, t);
|
|
566
|
-
c.value ? i("update:modelValue", {
|
|
567
|
-
top: n,
|
|
568
|
-
right: n,
|
|
569
|
-
bottom: n,
|
|
570
|
-
left: n
|
|
571
|
-
}) : i("update:modelValue", {
|
|
572
|
-
...r.modelValue,
|
|
573
|
-
[e]: n
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
function f() {
|
|
577
|
-
if (c.value = !c.value, c.value) {
|
|
578
|
-
let e = r.modelValue.top;
|
|
579
|
-
i("update:modelValue", {
|
|
580
|
-
top: e,
|
|
581
|
-
right: e,
|
|
582
|
-
bottom: e,
|
|
583
|
-
left: e
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
return (n, r) => (t(), h("div", Ft, [m("label", It, v(e.label), 1), m("div", Lt, [
|
|
588
|
-
m("div", Rt, [
|
|
589
|
-
m("button", {
|
|
590
|
-
"aria-label": p(a).spacingControl.decreaseTop,
|
|
591
|
-
class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
592
|
-
onClick: r[0] ||= (e) => l("top", -1)
|
|
593
|
-
}, [g(p(V), {
|
|
594
|
-
size: 12,
|
|
595
|
-
"stroke-width": 2
|
|
596
|
-
})], 10, zt),
|
|
597
|
-
m("input", {
|
|
598
|
-
type: "number",
|
|
599
|
-
class: y(nn),
|
|
600
|
-
value: e.modelValue.top,
|
|
601
|
-
"aria-label": p(a).spacingControl.top,
|
|
602
|
-
min: "0",
|
|
603
|
-
onInput: r[1] ||= (e) => u("top", Number(e.target.value))
|
|
604
|
-
}, null, 40, Bt),
|
|
605
|
-
m("button", {
|
|
606
|
-
"aria-label": p(a).spacingControl.increaseTop,
|
|
607
|
-
class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
608
|
-
onClick: r[2] ||= (e) => l("top", 1)
|
|
609
|
-
}, [g(p(H), {
|
|
610
|
-
size: 12,
|
|
611
|
-
"stroke-width": 2
|
|
612
|
-
})], 10, Vt)
|
|
613
|
-
]),
|
|
614
|
-
m("div", Ht, [
|
|
615
|
-
m("div", Ut, [
|
|
616
|
-
m("button", {
|
|
617
|
-
"aria-label": p(a).spacingControl.decreaseLeft,
|
|
618
|
-
class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
619
|
-
onClick: r[3] ||= (e) => l("left", -1)
|
|
620
|
-
}, [g(p(V), {
|
|
621
|
-
size: 12,
|
|
622
|
-
"stroke-width": 2
|
|
623
|
-
})], 10, Wt),
|
|
624
|
-
m("input", {
|
|
625
|
-
type: "number",
|
|
626
|
-
class: y(nn),
|
|
627
|
-
value: e.modelValue.left,
|
|
628
|
-
"aria-label": p(a).spacingControl.left,
|
|
629
|
-
min: "0",
|
|
630
|
-
onInput: r[4] ||= (e) => u("left", Number(e.target.value))
|
|
631
|
-
}, null, 40, Gt),
|
|
632
|
-
m("button", {
|
|
633
|
-
"aria-label": p(a).spacingControl.increaseLeft,
|
|
634
|
-
class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
635
|
-
onClick: r[5] ||= (e) => l("left", 1)
|
|
636
|
-
}, [g(p(H), {
|
|
637
|
-
size: 12,
|
|
638
|
-
"stroke-width": 2
|
|
639
|
-
})], 10, Kt)
|
|
640
|
-
]),
|
|
641
|
-
m("button", {
|
|
642
|
-
class: y(["tpl:flex tpl:h-8 tpl:w-8 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", c.value ? "tpl:border-[var(--tpl-primary)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
643
|
-
"aria-label": c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
|
|
644
|
-
title: c.value ? p(a).spacingControl.unlock : p(a).spacingControl.lockAll,
|
|
645
|
-
onClick: f
|
|
646
|
-
}, [c.value ? (t(), b(p(qe), {
|
|
647
|
-
key: 0,
|
|
648
|
-
size: 14,
|
|
649
|
-
"stroke-width": 2
|
|
650
|
-
})) : (t(), b(p(Ke), {
|
|
651
|
-
key: 1,
|
|
652
|
-
size: 14,
|
|
653
|
-
"stroke-width": 2
|
|
654
|
-
}))], 10, qt),
|
|
655
|
-
m("div", Jt, [
|
|
656
|
-
m("button", {
|
|
657
|
-
"aria-label": p(a).spacingControl.decreaseRight,
|
|
658
|
-
class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
659
|
-
onClick: r[6] ||= (e) => l("right", -1)
|
|
660
|
-
}, [g(p(V), {
|
|
661
|
-
size: 12,
|
|
662
|
-
"stroke-width": 2
|
|
663
|
-
})], 10, Yt),
|
|
664
|
-
m("input", {
|
|
665
|
-
type: "number",
|
|
666
|
-
class: y(nn),
|
|
667
|
-
value: e.modelValue.right,
|
|
668
|
-
"aria-label": p(a).spacingControl.right,
|
|
669
|
-
min: "0",
|
|
670
|
-
onInput: r[7] ||= (e) => u("right", Number(e.target.value))
|
|
671
|
-
}, null, 40, Xt),
|
|
672
|
-
m("button", {
|
|
673
|
-
"aria-label": p(a).spacingControl.increaseRight,
|
|
674
|
-
class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
675
|
-
onClick: r[8] ||= (e) => l("right", 1)
|
|
676
|
-
}, [g(p(H), {
|
|
677
|
-
size: 12,
|
|
678
|
-
"stroke-width": 2
|
|
679
|
-
})], 10, Zt)
|
|
680
|
-
])
|
|
681
|
-
]),
|
|
682
|
-
m("div", Qt, [
|
|
683
|
-
m("button", {
|
|
684
|
-
"aria-label": p(a).spacingControl.decreaseBottom,
|
|
685
|
-
class: y([Z, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
686
|
-
onClick: r[9] ||= (e) => l("bottom", -1)
|
|
687
|
-
}, [g(p(V), {
|
|
688
|
-
size: 12,
|
|
689
|
-
"stroke-width": 2
|
|
690
|
-
})], 10, $t),
|
|
691
|
-
m("input", {
|
|
692
|
-
type: "number",
|
|
693
|
-
class: y(nn),
|
|
694
|
-
value: e.modelValue.bottom,
|
|
695
|
-
"aria-label": p(a).spacingControl.bottom,
|
|
696
|
-
min: "0",
|
|
697
|
-
onInput: r[10] ||= (e) => u("bottom", Number(e.target.value))
|
|
698
|
-
}, null, 40, en),
|
|
699
|
-
m("button", {
|
|
700
|
-
"aria-label": p(a).spacingControl.increaseBottom,
|
|
701
|
-
class: y([Z, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
702
|
-
onClick: r[11] ||= (e) => l("bottom", 1)
|
|
703
|
-
}, [g(p(H), {
|
|
704
|
-
size: 12,
|
|
705
|
-
"stroke-width": 2
|
|
706
|
-
})], 10, tn)
|
|
707
|
-
])
|
|
708
|
-
])]));
|
|
709
|
-
}
|
|
710
|
-
}), [["__scopeId", "data-v-69591c1e"]]), an = { class: "tpl:space-y-3.5" }, on = ["data-testid"], sn = ["data-testid"], cn = ["data-testid"], ln = ["aria-label", "data-testid"], un = [
|
|
711
|
-
"aria-label",
|
|
712
|
-
"title",
|
|
713
|
-
"aria-pressed",
|
|
714
|
-
"data-testid",
|
|
715
|
-
"onClick"
|
|
716
|
-
], dn = ["data-testid"], fn = /* @__PURE__ */ w({
|
|
717
|
-
__name: "BackgroundImageControl",
|
|
718
|
-
props: {
|
|
719
|
-
modelValue: {},
|
|
720
|
-
testidPrefix: {}
|
|
721
|
-
},
|
|
722
|
-
emits: ["update:modelValue"],
|
|
723
|
-
setup(e, { emit: n }) {
|
|
724
|
-
let r = e, i = n, { t: o } = z(), s = c(me, ee.liquid), l = S(() => typeof r.modelValue?.url == "string" ? r.modelValue.url : ""), u = S(() => l.value.trim() !== "");
|
|
725
|
-
function f(e) {
|
|
726
|
-
e.trim() === "" ? i("update:modelValue", void 0) : i("update:modelValue", r.modelValue ? {
|
|
727
|
-
...r.modelValue,
|
|
728
|
-
url: e
|
|
729
|
-
} : te(e));
|
|
730
|
-
}
|
|
731
|
-
function w(e) {
|
|
732
|
-
r.modelValue && i("update:modelValue", {
|
|
733
|
-
...r.modelValue,
|
|
734
|
-
...e
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
let T = S(() => [
|
|
738
|
-
{
|
|
739
|
-
value: "cover",
|
|
740
|
-
label: o.blockSettings.backgroundSizeCover
|
|
741
|
-
},
|
|
742
|
-
{
|
|
743
|
-
value: "contain",
|
|
744
|
-
label: o.blockSettings.backgroundSizeContain
|
|
745
|
-
},
|
|
746
|
-
{
|
|
747
|
-
value: "auto",
|
|
748
|
-
label: o.blockSettings.backgroundSizeAuto
|
|
749
|
-
}
|
|
750
|
-
]), E = S(() => ({
|
|
751
|
-
"top-left": o.blockSettings.backgroundPositionTopLeft,
|
|
752
|
-
"top-center": o.blockSettings.backgroundPositionTopCenter,
|
|
753
|
-
"top-right": o.blockSettings.backgroundPositionTopRight,
|
|
754
|
-
"center-left": o.blockSettings.backgroundPositionCenterLeft,
|
|
755
|
-
"center-center": o.blockSettings.backgroundPositionCenter,
|
|
756
|
-
"center-right": o.blockSettings.backgroundPositionCenterRight,
|
|
757
|
-
"bottom-left": o.blockSettings.backgroundPositionBottomLeft,
|
|
758
|
-
"bottom-center": o.blockSettings.backgroundPositionBottomCenter,
|
|
759
|
-
"bottom-right": o.blockSettings.backgroundPositionBottomRight
|
|
760
|
-
})), D = S(() => N.flatMap((e) => F.map((t) => ({
|
|
761
|
-
x: t,
|
|
762
|
-
y: e,
|
|
763
|
-
label: E.value[`${e}-${t}`]
|
|
764
|
-
}))));
|
|
765
|
-
function O(e) {
|
|
766
|
-
return r.modelValue?.position?.x === e.x && r.modelValue?.position?.y === e.y;
|
|
767
|
-
}
|
|
768
|
-
let A = d(), { canBrowse: j, isUploading: M, showOverlay: P, openMediaBrowser: I } = ie({
|
|
769
|
-
target: A,
|
|
770
|
-
blocked: () => k(l.value, s),
|
|
771
|
-
apply: (e) => f(e.url)
|
|
772
|
-
});
|
|
773
|
-
return (n, r) => (t(), h("div", an, [m("div", null, [m("label", { class: y(p(U)) }, v(p(o).blockSettings.backgroundImage), 3), m("div", {
|
|
774
|
-
ref_key: "dropZoneRef",
|
|
775
|
-
ref: A,
|
|
776
|
-
class: "tpl:relative",
|
|
777
|
-
"data-testid": `${e.testidPrefix}-bg-url`
|
|
778
|
-
}, [
|
|
779
|
-
p(P) ? (t(), b(ne, {
|
|
780
|
-
key: 0,
|
|
781
|
-
uploading: p(M)
|
|
782
|
-
}, null, 8, ["uploading"])) : C("", !0),
|
|
783
|
-
g(J, {
|
|
784
|
-
"model-value": l.value,
|
|
785
|
-
type: "url",
|
|
786
|
-
placeholder: p(o).blockSettings.backgroundImagePlaceholder,
|
|
787
|
-
"onUpdate:modelValue": f
|
|
788
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
789
|
-
p(j) ? (t(), h("button", {
|
|
790
|
-
key: 1,
|
|
791
|
-
type: "button",
|
|
792
|
-
"data-testid": `${e.testidPrefix}-bg-browse`,
|
|
793
|
-
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",
|
|
794
|
-
style: {
|
|
795
|
-
"border-color": "var(--tpl-border)",
|
|
796
|
-
color: "var(--tpl-primary)",
|
|
797
|
-
"background-color": "var(--tpl-bg)"
|
|
798
|
-
},
|
|
799
|
-
onClick: r[0] ||= (...e) => p(I) && p(I)(...e)
|
|
800
|
-
}, [g(p(ae), {
|
|
801
|
-
size: 14,
|
|
802
|
-
"stroke-width": 1.5
|
|
803
|
-
}), _(" " + v(p(o).image.browseMedia), 1)], 8, sn)) : C("", !0)
|
|
804
|
-
], 8, on)]), u.value && e.modelValue ? (t(), h(x, { key: 0 }, [
|
|
805
|
-
m("div", { "data-testid": `${e.testidPrefix}-bg-size` }, [m("label", { class: y(p(U)) }, v(p(o).blockSettings.backgroundSize), 3), g(Y, {
|
|
806
|
-
options: T.value,
|
|
807
|
-
"model-value": e.modelValue.size,
|
|
808
|
-
"onUpdate:modelValue": r[1] ||= (e) => w({ size: e })
|
|
809
|
-
}, null, 8, ["options", "model-value"])], 8, cn),
|
|
810
|
-
m("div", null, [m("label", { class: y(p(U)) }, v(p(o).blockSettings.backgroundPosition), 3), m("div", {
|
|
811
|
-
role: "group",
|
|
812
|
-
"aria-label": p(o).blockSettings.backgroundPosition,
|
|
813
|
-
"data-testid": `${e.testidPrefix}-bg-position`,
|
|
814
|
-
class: "tpl:grid tpl:w-24 tpl:grid-cols-3 tpl:gap-1"
|
|
815
|
-
}, [(t(!0), h(x, null, a(D.value, (n) => (t(), h("button", {
|
|
816
|
-
key: `${n.y}-${n.x}`,
|
|
817
|
-
type: "button",
|
|
818
|
-
"aria-label": n.label,
|
|
819
|
-
title: n.label,
|
|
820
|
-
"aria-pressed": O(n),
|
|
821
|
-
"data-testid": `${e.testidPrefix}-bg-position-${n.y}-${n.x}`,
|
|
822
|
-
class: y(["tpl:flex tpl:h-6 tpl:items-center tpl:justify-center tpl:rounded tpl:border tpl:transition-colors", O(n) ? "tpl:border-[var(--tpl-primary)]" : "tpl:border-[var(--tpl-border)] tpl:hover:border-[var(--tpl-text-dim)]"]),
|
|
823
|
-
onClick: (e) => w({ position: {
|
|
824
|
-
x: n.x,
|
|
825
|
-
y: n.y
|
|
826
|
-
} })
|
|
827
|
-
}, [m("span", { class: y(["tpl:block tpl:h-1.5 tpl:w-1.5 tpl:rounded-full", O(n) ? "tpl:bg-[var(--tpl-primary)]" : "tpl:bg-[var(--tpl-text-dim)]"]) }, null, 2)], 10, un))), 128))], 8, ln)]),
|
|
828
|
-
m("div", { "data-testid": `${e.testidPrefix}-bg-repeat` }, [g(q, {
|
|
829
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
830
|
-
"model-value": e.modelValue.repeat,
|
|
831
|
-
label: p(o).blockSettings.backgroundRepeat,
|
|
832
|
-
"onUpdate:modelValue": r[2] ||= (e) => w({ repeat: e })
|
|
833
|
-
}, null, 8, ["model-value", "label"])], 8, dn)
|
|
834
|
-
], 64)) : C("", !0)]));
|
|
835
|
-
}
|
|
836
|
-
}), pn = ["data-testid"], mn = { class: "tpl:mt-3" }, hn = /* @__PURE__ */ w({
|
|
837
|
-
__name: "CollapsibleSection",
|
|
838
|
-
props: {
|
|
839
|
-
title: {},
|
|
840
|
-
open: { type: Boolean },
|
|
841
|
-
noBorder: { type: Boolean },
|
|
842
|
-
headerTestId: {}
|
|
843
|
-
},
|
|
844
|
-
emits: ["toggle"],
|
|
845
|
-
setup(e) {
|
|
846
|
-
return (n, r) => (t(), h("div", { class: y(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [m("button", {
|
|
847
|
-
type: "button",
|
|
848
|
-
"data-testid": e.headerTestId,
|
|
849
|
-
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)]",
|
|
850
|
-
onClick: r[0] ||= (e) => n.$emit("toggle")
|
|
851
|
-
}, [g(p(Se), {
|
|
852
|
-
class: y(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
853
|
-
size: 12,
|
|
854
|
-
"stroke-width": 2
|
|
855
|
-
}, null, 8, ["class"]), m("span", null, v(e.title), 1)], 8, pn), l(m("div", mn, [o(n.$slots, "default")], 512), [[E, e.open]])], 2));
|
|
856
|
-
}
|
|
857
|
-
}), gn = { class: "tpl:space-y-2" }, _n = { class: "tpl:flex tpl:items-center tpl:gap-2" }, vn = { class: "tpl:space-y-2" }, yn = ["value"], bn = { value: "" }, xn = ["label"], Sn = ["value"], Cn = ["value"], wn = {
|
|
858
|
-
key: 0,
|
|
859
|
-
value: "__custom__"
|
|
860
|
-
}, Tn = {
|
|
861
|
-
key: 0,
|
|
862
|
-
class: "tpl:space-y-2"
|
|
863
|
-
}, En = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Dn = { class: "tpl:mb-1 tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, On = { class: "tpl:flex tpl:justify-end" }, kn = ["disabled"], An = {
|
|
864
|
-
key: 0,
|
|
865
|
-
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
866
|
-
}, jn = { class: "tpl:space-y-1" }, Mn = { 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)]" }, Nn = {
|
|
867
|
-
key: 0,
|
|
868
|
-
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)]"
|
|
869
|
-
}, Pn = /* @__PURE__ */ w({
|
|
870
|
-
__name: "CommonBlockSettings",
|
|
871
|
-
props: {
|
|
872
|
-
block: {},
|
|
873
|
-
isFirstSection: { type: Boolean }
|
|
874
|
-
},
|
|
875
|
-
emits: ["update"],
|
|
876
|
-
setup(e, { emit: n }) {
|
|
877
|
-
let o = e, f = n, { t: w } = z(), E = c(ge, []), D = c(_e, !1), O = u(/* @__PURE__ */ new Set()), k = d(!1), A = d(""), j = d(""), M = [{
|
|
878
|
-
key: "desktop",
|
|
879
|
-
icon: Oe,
|
|
880
|
-
labelKey: "showOnDesktop"
|
|
881
|
-
}, {
|
|
882
|
-
key: "mobile",
|
|
883
|
-
icon: ke,
|
|
884
|
-
labelKey: "showOnMobile"
|
|
885
|
-
}];
|
|
886
|
-
function N(e) {
|
|
887
|
-
O.has(e) ? O.delete(e) : O.add(e);
|
|
888
|
-
}
|
|
889
|
-
let P = S(() => E.length > 0 || D), F = S(() => o.block.displayCondition ? !E.some((e) => e.label === o.block.displayCondition?.label) : !1);
|
|
890
|
-
function I() {
|
|
891
|
-
k.value = !0, F.value && o.block.displayCondition ? (A.value = o.block.displayCondition.before, j.value = o.block.displayCondition.after ?? "") : (A.value = "", j.value = "");
|
|
892
|
-
}
|
|
893
|
-
function ee() {
|
|
894
|
-
A.value.trim() && (f("update", { displayCondition: {
|
|
895
|
-
label: w.blockSettings.customCondition,
|
|
896
|
-
before: A.value.trim(),
|
|
897
|
-
after: j.value.trim()
|
|
898
|
-
} }), k.value = !1, A.value = "", j.value = "");
|
|
899
|
-
}
|
|
900
|
-
s(() => o.block.displayCondition, (e) => {
|
|
901
|
-
e ? F.value && (A.value = e.before, j.value = e.after ?? "") : (k.value = !1, A.value = "", j.value = "");
|
|
902
|
-
}, { immediate: !0 });
|
|
903
|
-
let te = S(() => {
|
|
904
|
-
let e = {};
|
|
905
|
-
for (let t of E) {
|
|
906
|
-
let n = t.group ?? "";
|
|
907
|
-
e[n] || (e[n] = []), e[n].push(t);
|
|
908
|
-
}
|
|
909
|
-
return e;
|
|
910
|
-
});
|
|
911
|
-
function L(e, t) {
|
|
912
|
-
f("update", { styles: {
|
|
913
|
-
...o.block.styles,
|
|
914
|
-
[e]: t
|
|
915
|
-
} });
|
|
916
|
-
}
|
|
917
|
-
function R(e) {
|
|
918
|
-
return o.block.visibility?.[e] !== !1;
|
|
919
|
-
}
|
|
920
|
-
function ne(e) {
|
|
921
|
-
let t = {
|
|
922
|
-
desktop: R("desktop"),
|
|
923
|
-
mobile: R("mobile")
|
|
924
|
-
};
|
|
925
|
-
t[e] = !t[e], f("update", { visibility: t });
|
|
926
|
-
}
|
|
927
|
-
return (n, o) => (t(), h("div", { class: y(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
928
|
-
g(hn, {
|
|
929
|
-
title: p(w).blockSettings.spacing,
|
|
930
|
-
open: O.has("spacing"),
|
|
931
|
-
"no-border": e.isFirstSection,
|
|
932
|
-
onToggle: o[1] ||= (e) => N("spacing")
|
|
933
|
-
}, {
|
|
934
|
-
default: r(() => [g(rn, {
|
|
935
|
-
label: p(w).blockSettings.padding,
|
|
936
|
-
"model-value": e.block.styles.padding,
|
|
937
|
-
"onUpdate:modelValue": o[0] ||= (e) => L("padding", e)
|
|
938
|
-
}, null, 8, ["label", "model-value"])]),
|
|
939
|
-
_: 1
|
|
940
|
-
}, 8, [
|
|
941
|
-
"title",
|
|
942
|
-
"open",
|
|
943
|
-
"no-border"
|
|
944
|
-
]),
|
|
945
|
-
g(hn, {
|
|
946
|
-
title: p(w).blockSettings.background,
|
|
947
|
-
open: O.has("bg"),
|
|
948
|
-
"header-test-id": "block-settings-background",
|
|
949
|
-
onToggle: o[4] ||= (e) => N("bg")
|
|
950
|
-
}, {
|
|
951
|
-
default: r(() => [
|
|
952
|
-
m("label", { class: y(p(U)) }, v(p(w).blockSettings.color), 3),
|
|
953
|
-
g(B, {
|
|
954
|
-
"model-value": e.block.styles.backgroundColor ?? "",
|
|
955
|
-
"allow-transparent": "",
|
|
956
|
-
"onUpdate:modelValue": o[2] ||= (e) => L("backgroundColor", e)
|
|
957
|
-
}, null, 8, ["model-value"]),
|
|
958
|
-
e.block.type === "section" ? (t(), b(fn, {
|
|
959
|
-
key: 0,
|
|
960
|
-
class: "tpl:mt-3.5",
|
|
961
|
-
"model-value": e.block.backgroundImage,
|
|
962
|
-
"testid-prefix": "section",
|
|
963
|
-
"onUpdate:modelValue": o[3] ||= (e) => f("update", { backgroundImage: e })
|
|
964
|
-
}, null, 8, ["model-value"])) : C("", !0)
|
|
965
|
-
]),
|
|
966
|
-
_: 1
|
|
967
|
-
}, 8, ["title", "open"]),
|
|
968
|
-
g(hn, {
|
|
969
|
-
title: p(w).blockSettings.display,
|
|
970
|
-
open: O.has("display"),
|
|
971
|
-
onToggle: o[5] ||= (e) => N("display")
|
|
972
|
-
}, {
|
|
973
|
-
default: r(() => [m("div", gn, [(t(), h(x, null, a(M, (e) => g(q, {
|
|
974
|
-
key: e.key,
|
|
975
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
976
|
-
"model-value": R(e.key),
|
|
977
|
-
label: p(w).blockSettings[e.labelKey],
|
|
978
|
-
"onUpdate:modelValue": (t) => ne(e.key)
|
|
979
|
-
}, {
|
|
980
|
-
default: r(() => [m("span", _n, [(t(), b(i(e.icon), {
|
|
981
|
-
size: 14,
|
|
982
|
-
"stroke-width": 1.5
|
|
983
|
-
})), _(" " + v(p(w).blockSettings[e.labelKey]), 1)])]),
|
|
984
|
-
_: 2
|
|
985
|
-
}, 1032, [
|
|
986
|
-
"model-value",
|
|
987
|
-
"label",
|
|
988
|
-
"onUpdate:modelValue"
|
|
989
|
-
])), 64))])]),
|
|
990
|
-
_: 1
|
|
991
|
-
}, 8, ["title", "open"]),
|
|
992
|
-
P.value ? (t(), b(hn, {
|
|
993
|
-
key: 0,
|
|
994
|
-
"header-test-id": "display-condition-section",
|
|
995
|
-
title: p(w).blockSettings.displayCondition,
|
|
996
|
-
open: O.has("condition"),
|
|
997
|
-
onToggle: o[9] ||= (e) => N("condition")
|
|
998
|
-
}, {
|
|
999
|
-
default: r(() => [m("div", vn, [m("select", {
|
|
1000
|
-
"data-testid": "display-condition-select",
|
|
1001
|
-
class: y(["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)]"]),
|
|
1002
|
-
value: k.value || F.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1003
|
-
onChange: o[6] ||= (e) => {
|
|
1004
|
-
let t = e.target.value;
|
|
1005
|
-
if (t === "__custom__") {
|
|
1006
|
-
I();
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
|
-
if (k.value = !1, !t) {
|
|
1010
|
-
f("update", { displayCondition: void 0 });
|
|
1011
|
-
return;
|
|
1012
|
-
}
|
|
1013
|
-
let n = p(E).find((e) => e.label === t);
|
|
1014
|
-
n && f("update", { displayCondition: n });
|
|
1015
|
-
}
|
|
1016
|
-
}, [
|
|
1017
|
-
m("option", bn, v(p(w).blockSettings.noCondition), 1),
|
|
1018
|
-
(t(!0), h(x, null, a(te.value, (e, n) => (t(), h(x, { key: n }, [n ? (t(), h("optgroup", {
|
|
1019
|
-
key: 0,
|
|
1020
|
-
label: String(n)
|
|
1021
|
-
}, [(t(!0), h(x, null, a(e, (e) => (t(), h("option", {
|
|
1022
|
-
key: e.label,
|
|
1023
|
-
value: e.label
|
|
1024
|
-
}, v(e.label), 9, Sn))), 128))], 8, xn)) : (t(!0), h(x, { key: 1 }, a(e, (e) => (t(), h("option", {
|
|
1025
|
-
key: e.label,
|
|
1026
|
-
value: e.label
|
|
1027
|
-
}, v(e.label), 9, Cn))), 128))], 64))), 128)),
|
|
1028
|
-
p(D) ? (t(), h("option", wn, v(p(w).blockSettings.customCondition), 1)) : C("", !0)
|
|
1029
|
-
], 42, yn), k.value || F.value ? (t(), h("div", Tn, [
|
|
1030
|
-
m("div", null, [m("label", En, v(p(w).blockSettings.customConditionBefore), 1), l(m("textarea", {
|
|
1031
|
-
"onUpdate:modelValue": o[7] ||= (e) => A.value = e,
|
|
1032
|
-
rows: "2",
|
|
1033
|
-
class: y(p(Re))
|
|
1034
|
-
}, null, 2), [[T, A.value]])]),
|
|
1035
|
-
m("div", null, [m("label", Dn, v(p(w).blockSettings.customConditionAfter), 1), l(m("textarea", {
|
|
1036
|
-
"onUpdate:modelValue": o[8] ||= (e) => j.value = e,
|
|
1037
|
-
rows: "2",
|
|
1038
|
-
class: y(p(Re))
|
|
1039
|
-
}, null, 2), [[T, j.value]])]),
|
|
1040
|
-
m("div", On, [m("button", {
|
|
1041
|
-
type: "button",
|
|
1042
|
-
class: y(p(He)),
|
|
1043
|
-
disabled: !A.value.trim(),
|
|
1044
|
-
onClick: ee
|
|
1045
|
-
}, v(p(w).blockSettings.applyCondition), 11, kn)])
|
|
1046
|
-
])) : e.block.displayCondition && !F.value ? (t(), h(x, { key: 1 }, [e.block.displayCondition.description ? (t(), h("p", An, v(e.block.displayCondition.description), 1)) : C("", !0), m("div", jn, [m("pre", Mn, v(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (t(), h("pre", Nn, v(e.block.displayCondition.after), 1)) : C("", !0)])], 64)) : C("", !0)])]),
|
|
1047
|
-
_: 1
|
|
1048
|
-
}, 8, ["title", "open"])) : C("", !0)
|
|
1049
|
-
], 2));
|
|
1050
|
-
}
|
|
1051
|
-
}), Fn = ["title"], In = /* @__PURE__ */ w({
|
|
1052
|
-
__name: "BooleanField",
|
|
1053
|
-
props: {
|
|
1054
|
-
field: {},
|
|
1055
|
-
modelValue: { type: Boolean },
|
|
1056
|
-
readOnly: { type: Boolean }
|
|
1057
|
-
},
|
|
1058
|
-
emits: ["update:modelValue"],
|
|
1059
|
-
setup(e, { emit: n }) {
|
|
1060
|
-
let i = n, { t: a } = z();
|
|
1061
|
-
return (n, o) => (t(), h("div", {
|
|
1062
|
-
class: "tpl:mb-3.5",
|
|
1063
|
-
title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1064
|
-
}, [g(q, {
|
|
1065
|
-
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1066
|
-
"model-value": e.modelValue,
|
|
1067
|
-
label: e.field.label,
|
|
1068
|
-
required: e.field.required,
|
|
1069
|
-
disabled: e.readOnly,
|
|
1070
|
-
"onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
|
|
1071
|
-
}, {
|
|
1072
|
-
default: r(() => [_(v(e.field.label) + " ", 1), e.readOnly ? (t(), b(p(qe), {
|
|
1073
|
-
key: 0,
|
|
1074
|
-
size: 12,
|
|
1075
|
-
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1076
|
-
})) : C("", !0)]),
|
|
1077
|
-
_: 1
|
|
1078
|
-
}, 8, [
|
|
1079
|
-
"model-value",
|
|
1080
|
-
"label",
|
|
1081
|
-
"required",
|
|
1082
|
-
"disabled"
|
|
1083
|
-
])], 8, Fn));
|
|
1084
|
-
}
|
|
1085
|
-
}), Ln = { class: "tpl:mb-3.5" }, Rn = ["title"], zn = { class: "tpl-sr-only" }, Bn = ["title"], Vn = { class: "tpl-sr-only" }, Q = /* @__PURE__ */ w({
|
|
1086
|
-
__name: "FieldWrapper",
|
|
1087
|
-
props: {
|
|
1088
|
-
label: {},
|
|
1089
|
-
required: { type: Boolean },
|
|
1090
|
-
readOnly: { type: Boolean }
|
|
1091
|
-
},
|
|
1092
|
-
setup(e) {
|
|
1093
|
-
let { t: n } = z();
|
|
1094
|
-
return (r, i) => (t(), h("div", Ln, [m("label", { class: y(p(U)) }, [
|
|
1095
|
-
_(v(e.label) + " ", 1),
|
|
1096
|
-
e.readOnly ? (t(), h("span", {
|
|
1097
|
-
key: 0,
|
|
1098
|
-
title: p(n).customBlocks.dataSource.readOnlyTooltip
|
|
1099
|
-
}, [g(p(qe), {
|
|
1100
|
-
size: 12,
|
|
1101
|
-
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]",
|
|
1102
|
-
"aria-hidden": "true"
|
|
1103
|
-
}), m("span", zn, v(p(n).customBlocks.dataSource.readOnlyTooltip), 1)], 8, Rn)) : C("", !0),
|
|
1104
|
-
e.required ? (t(), h("span", {
|
|
1105
|
-
key: 1,
|
|
1106
|
-
class: "tpl:text-[var(--tpl-danger)]",
|
|
1107
|
-
title: p(n).customBlocks.fields.required
|
|
1108
|
-
}, [i[0] ||= m("span", { "aria-hidden": "true" }, "*", -1), m("span", Vn, v(p(n).customBlocks.fields.required), 1)], 8, Bn)) : C("", !0)
|
|
1109
|
-
], 2), o(r.$slots, "default")]));
|
|
1110
|
-
}
|
|
1111
|
-
}), Hn = /* @__PURE__ */ w({
|
|
1112
|
-
__name: "ColorField",
|
|
1113
|
-
props: {
|
|
1114
|
-
field: {},
|
|
1115
|
-
modelValue: {},
|
|
1116
|
-
readOnly: { type: Boolean }
|
|
1117
|
-
},
|
|
1118
|
-
emits: ["update:modelValue"],
|
|
1119
|
-
setup(e, { emit: n }) {
|
|
1120
|
-
let i = e, a = n, { t: o } = z(), s = c(he, be), l = S(() => re(i.field, s));
|
|
1121
|
-
return (n, i) => (t(), b(Q, {
|
|
1122
|
-
label: e.field.label,
|
|
1123
|
-
required: e.field.required,
|
|
1124
|
-
"read-only": e.readOnly
|
|
1125
|
-
}, {
|
|
1126
|
-
default: r(() => [g(B, {
|
|
1127
|
-
"model-value": e.modelValue,
|
|
1128
|
-
placeholder: e.field.placeholder,
|
|
1129
|
-
disabled: e.readOnly,
|
|
1130
|
-
presets: l.value.presets,
|
|
1131
|
-
"allow-custom": l.value.allowCustom,
|
|
1132
|
-
title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1133
|
-
"onUpdate:modelValue": i[0] ||= (e) => a("update:modelValue", e)
|
|
1134
|
-
}, null, 8, [
|
|
1135
|
-
"model-value",
|
|
1136
|
-
"placeholder",
|
|
1137
|
-
"disabled",
|
|
1138
|
-
"presets",
|
|
1139
|
-
"allow-custom",
|
|
1140
|
-
"title"
|
|
1141
|
-
])]),
|
|
1142
|
-
_: 1
|
|
1143
|
-
}, 8, [
|
|
1144
|
-
"label",
|
|
1145
|
-
"required",
|
|
1146
|
-
"read-only"
|
|
1147
|
-
]));
|
|
1148
|
-
}
|
|
1149
|
-
}), Un = [
|
|
1150
|
-
"value",
|
|
1151
|
-
"placeholder",
|
|
1152
|
-
"title"
|
|
1153
|
-
], Wn = ["value", "placeholder"], Gn = /* @__PURE__ */ w({
|
|
1154
|
-
__name: "ImageField",
|
|
1155
|
-
props: {
|
|
1156
|
-
field: {},
|
|
1157
|
-
modelValue: {},
|
|
1158
|
-
readOnly: { type: Boolean }
|
|
1159
|
-
},
|
|
1160
|
-
emits: ["update:modelValue"],
|
|
1161
|
-
setup(e, { emit: n }) {
|
|
1162
|
-
let i = e, a = n, { t: o } = z(), s = d(), { canBrowse: c, isUploading: l, showOverlay: u, openMediaBrowser: f } = ie({
|
|
1163
|
-
target: s,
|
|
1164
|
-
blocked: () => !!i.readOnly,
|
|
1165
|
-
apply: (e) => a("update:modelValue", e.url)
|
|
1166
|
-
});
|
|
1167
|
-
return (n, i) => (t(), b(Q, {
|
|
1168
|
-
label: e.field.label,
|
|
1169
|
-
required: e.field.required,
|
|
1170
|
-
"read-only": e.readOnly
|
|
1171
|
-
}, {
|
|
1172
|
-
default: r(() => [m("div", {
|
|
1173
|
-
ref_key: "dropZoneRef",
|
|
1174
|
-
ref: s,
|
|
1175
|
-
class: "tpl:relative"
|
|
1176
|
-
}, [
|
|
1177
|
-
p(u) ? (t(), b(ne, {
|
|
1178
|
-
key: 0,
|
|
1179
|
-
uploading: p(l)
|
|
1180
|
-
}, null, 8, ["uploading"])) : C("", !0),
|
|
1181
|
-
e.readOnly ? (t(), h("input", {
|
|
1182
|
-
key: 1,
|
|
1183
|
-
type: "url",
|
|
1184
|
-
class: y([p(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1185
|
-
value: e.modelValue,
|
|
1186
|
-
placeholder: e.field.placeholder || "https://...",
|
|
1187
|
-
disabled: "",
|
|
1188
|
-
title: p(o).customBlocks.dataSource.readOnlyTooltip
|
|
1189
|
-
}, null, 10, Un)) : (t(), h("input", {
|
|
1190
|
-
key: 2,
|
|
1191
|
-
type: "url",
|
|
1192
|
-
class: y(p(K)),
|
|
1193
|
-
value: e.modelValue,
|
|
1194
|
-
placeholder: e.field.placeholder || "https://...",
|
|
1195
|
-
onInput: i[0] ||= (e) => a("update:modelValue", e.target.value)
|
|
1196
|
-
}, null, 42, Wn)),
|
|
1197
|
-
p(c) && !e.readOnly ? (t(), h("button", {
|
|
1198
|
-
key: 3,
|
|
1199
|
-
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)]",
|
|
1200
|
-
onClick: i[1] ||= (e) => p(f)()
|
|
1201
|
-
}, [g(p(ae), {
|
|
1202
|
-
size: 14,
|
|
1203
|
-
"stroke-width": 1.5
|
|
1204
|
-
}), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
|
|
1205
|
-
], 512)]),
|
|
1206
|
-
_: 1
|
|
1207
|
-
}, 8, [
|
|
1208
|
-
"label",
|
|
1209
|
-
"required",
|
|
1210
|
-
"read-only"
|
|
1211
|
-
]));
|
|
1212
|
-
}
|
|
1213
|
-
}), Kn = [
|
|
1214
|
-
"value",
|
|
1215
|
-
"placeholder",
|
|
1216
|
-
"min",
|
|
1217
|
-
"max",
|
|
1218
|
-
"step",
|
|
1219
|
-
"disabled",
|
|
1220
|
-
"title"
|
|
1221
|
-
], qn = /* @__PURE__ */ w({
|
|
1222
|
-
__name: "NumberField",
|
|
1223
|
-
props: {
|
|
1224
|
-
field: {},
|
|
1225
|
-
modelValue: {},
|
|
1226
|
-
readOnly: { type: Boolean }
|
|
1227
|
-
},
|
|
1228
|
-
emits: ["update:modelValue"],
|
|
1229
|
-
setup(e, { emit: n }) {
|
|
1230
|
-
let i = n, { t: a } = z();
|
|
1231
|
-
return (n, o) => (t(), b(Q, {
|
|
1232
|
-
label: e.field.label,
|
|
1233
|
-
required: e.field.required,
|
|
1234
|
-
"read-only": e.readOnly
|
|
1235
|
-
}, {
|
|
1236
|
-
default: r(() => [m("input", {
|
|
1237
|
-
type: "number",
|
|
1238
|
-
class: y([p(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1239
|
-
value: e.modelValue,
|
|
1240
|
-
placeholder: e.field.placeholder,
|
|
1241
|
-
min: e.field.min,
|
|
1242
|
-
max: e.field.max,
|
|
1243
|
-
step: e.field.step,
|
|
1244
|
-
disabled: e.readOnly,
|
|
1245
|
-
title: e.readOnly ? p(a).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1246
|
-
onInput: o[0] ||= (t) => !e.readOnly && i("update:modelValue", Number(t.target.value))
|
|
1247
|
-
}, null, 42, Kn)]),
|
|
1248
|
-
_: 1
|
|
1249
|
-
}, 8, [
|
|
1250
|
-
"label",
|
|
1251
|
-
"required",
|
|
1252
|
-
"read-only"
|
|
1253
|
-
]));
|
|
1254
|
-
}
|
|
1255
|
-
}), Jn = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Yn = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Xn = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Zn = ["title", "onClick"], Qn = {
|
|
1256
|
-
key: 1,
|
|
1257
|
-
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1258
|
-
}, $n = {
|
|
1259
|
-
key: 2,
|
|
1260
|
-
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1261
|
-
}, er = /* @__PURE__ */ w({
|
|
1262
|
-
__name: "RepeatableField",
|
|
1263
|
-
props: {
|
|
1264
|
-
field: {},
|
|
1265
|
-
modelValue: {},
|
|
1266
|
-
readOnly: { type: Boolean }
|
|
1267
|
-
},
|
|
1268
|
-
emits: ["update:modelValue"],
|
|
1269
|
-
setup(e, { emit: n }) {
|
|
1270
|
-
let o = e, s = n, { t: c, format: l } = z(), u = S(() => o.modelValue || []), d = S(() => !o.field.maxItems || u.value.length < o.field.maxItems), f = S(() => !o.field.minItems || u.value.length > o.field.minItems);
|
|
1271
|
-
function w() {
|
|
1272
|
-
if (!d.value || o.readOnly) return;
|
|
1273
|
-
let e = {};
|
|
1274
|
-
for (let t of o.field.fields) e[t.key] = t.default ?? "";
|
|
1275
|
-
s("update:modelValue", [...u.value, e]);
|
|
1276
|
-
}
|
|
1277
|
-
function T(e) {
|
|
1278
|
-
if (!f.value || o.readOnly) return;
|
|
1279
|
-
let t = [...u.value];
|
|
1280
|
-
t.splice(e, 1), s("update:modelValue", t);
|
|
1281
|
-
}
|
|
1282
|
-
function E(e, t, n) {
|
|
1283
|
-
let r = u.value.map((r, i) => i === e ? {
|
|
1284
|
-
...r,
|
|
1285
|
-
[t]: n
|
|
1286
|
-
} : r);
|
|
1287
|
-
s("update:modelValue", r);
|
|
1288
|
-
}
|
|
1289
|
-
return (n, o) => (t(), b(Q, {
|
|
1290
|
-
label: e.field.label,
|
|
1291
|
-
required: e.field.required,
|
|
1292
|
-
"read-only": e.readOnly
|
|
1293
|
-
}, {
|
|
1294
|
-
default: r(() => [m("div", Jn, [
|
|
1295
|
-
(t(!0), h(x, null, a(u.value, (n, r) => (t(), h("div", {
|
|
1296
|
-
key: `${e.field.key}-${r}`,
|
|
1297
|
-
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1298
|
-
}, [m("div", Yn, [m("span", Xn, " #" + v(r + 1), 1), f.value && !e.readOnly ? (t(), h("button", {
|
|
1299
|
-
key: 0,
|
|
1300
|
-
type: "button",
|
|
1301
|
-
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)]",
|
|
1302
|
-
title: p(c).customBlocks.fields.removeItem,
|
|
1303
|
-
onClick: (e) => T(r)
|
|
1304
|
-
}, [g(p(Pe), {
|
|
1305
|
-
size: 12,
|
|
1306
|
-
"stroke-width": 2
|
|
1307
|
-
})], 8, Zn)) : C("", !0)]), (t(!0), h(x, null, a(e.field.fields, (a) => (t(), b(i(p(lr)(a.type)), {
|
|
1308
|
-
key: a.key,
|
|
1309
|
-
field: a,
|
|
1310
|
-
"model-value": n[a.key],
|
|
1311
|
-
"read-only": e.readOnly,
|
|
1312
|
-
"onUpdate:modelValue": (e) => E(r, a.key, e)
|
|
1313
|
-
}, null, 8, [
|
|
1314
|
-
"field",
|
|
1315
|
-
"model-value",
|
|
1316
|
-
"read-only",
|
|
1317
|
-
"onUpdate:modelValue"
|
|
1318
|
-
]))), 128))]))), 128)),
|
|
1319
|
-
d.value && !e.readOnly ? (t(), h("button", {
|
|
1320
|
-
key: 0,
|
|
1321
|
-
type: "button",
|
|
1322
|
-
class: y(p(Be)),
|
|
1323
|
-
onClick: w
|
|
1324
|
-
}, [g(p(H), {
|
|
1325
|
-
size: 14,
|
|
1326
|
-
"stroke-width": 2
|
|
1327
|
-
}), _(" " + v(p(c).customBlocks.fields.addItem), 1)], 2)) : C("", !0),
|
|
1328
|
-
!d.value && !e.readOnly ? (t(), h("p", Qn, v(p(c).customBlocks.fields.maxItemsReached), 1)) : C("", !0),
|
|
1329
|
-
!f.value && !e.readOnly ? (t(), h("p", $n, v(p(l)(p(c).customBlocks.fields.minItemsRequired, { count: e.field.minItems ?? 0 })), 1)) : C("", !0)
|
|
1330
|
-
])]),
|
|
1331
|
-
_: 1
|
|
1332
|
-
}, 8, [
|
|
1333
|
-
"label",
|
|
1334
|
-
"required",
|
|
1335
|
-
"read-only"
|
|
1336
|
-
]));
|
|
1337
|
-
}
|
|
1338
|
-
}), tr = [
|
|
1339
|
-
"value",
|
|
1340
|
-
"disabled",
|
|
1341
|
-
"title"
|
|
1342
|
-
], nr = ["value"], rr = /* @__PURE__ */ w({
|
|
1343
|
-
__name: "SelectField",
|
|
1344
|
-
props: {
|
|
1345
|
-
field: {},
|
|
1346
|
-
modelValue: {},
|
|
1347
|
-
readOnly: { type: Boolean }
|
|
1348
|
-
},
|
|
1349
|
-
emits: ["update:modelValue"],
|
|
1350
|
-
setup(e, { emit: n }) {
|
|
1351
|
-
let i = n, { t: o } = z();
|
|
1352
|
-
return (n, s) => (t(), b(Q, {
|
|
1353
|
-
label: e.field.label,
|
|
1354
|
-
required: e.field.required,
|
|
1355
|
-
"read-only": e.readOnly
|
|
1356
|
-
}, {
|
|
1357
|
-
default: r(() => [m("select", {
|
|
1358
|
-
class: y([p(K), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1359
|
-
value: e.modelValue,
|
|
1360
|
-
disabled: e.readOnly,
|
|
1361
|
-
title: e.readOnly ? p(o).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1362
|
-
onChange: s[0] ||= (t) => !e.readOnly && i("update:modelValue", t.target.value)
|
|
1363
|
-
}, [(t(!0), h(x, null, a(e.field.options, (e) => (t(), h("option", {
|
|
1364
|
-
key: e.value,
|
|
1365
|
-
value: e.value
|
|
1366
|
-
}, v(e.label), 9, nr))), 128))], 42, tr)]),
|
|
1367
|
-
_: 1
|
|
1368
|
-
}, 8, [
|
|
1369
|
-
"label",
|
|
1370
|
-
"required",
|
|
1371
|
-
"read-only"
|
|
1372
|
-
]));
|
|
1373
|
-
}
|
|
1374
|
-
}), ir = [
|
|
1375
|
-
"value",
|
|
1376
|
-
"placeholder",
|
|
1377
|
-
"title"
|
|
1378
|
-
], ar = /* @__PURE__ */ w({
|
|
1379
|
-
__name: "TextField",
|
|
1380
|
-
props: {
|
|
1381
|
-
field: {},
|
|
1382
|
-
modelValue: {},
|
|
1383
|
-
readOnly: { type: Boolean }
|
|
1384
|
-
},
|
|
1385
|
-
emits: ["update:modelValue"],
|
|
1386
|
-
setup(e, { emit: n }) {
|
|
1387
|
-
let i = n, { t: a } = z();
|
|
1388
|
-
return (n, o) => (t(), b(Q, {
|
|
1389
|
-
label: e.field.label,
|
|
1390
|
-
required: e.field.required,
|
|
1391
|
-
"read-only": e.readOnly
|
|
1392
|
-
}, {
|
|
1393
|
-
default: r(() => [e.readOnly ? (t(), h("input", {
|
|
1394
|
-
key: 0,
|
|
1395
|
-
type: "text",
|
|
1396
|
-
class: y([p(K), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1397
|
-
value: e.modelValue,
|
|
1398
|
-
placeholder: e.field.placeholder,
|
|
1399
|
-
disabled: "",
|
|
1400
|
-
title: p(a).customBlocks.dataSource.readOnlyTooltip
|
|
1401
|
-
}, null, 10, ir)) : (t(), b(J, {
|
|
1402
|
-
key: 1,
|
|
1403
|
-
"model-value": e.modelValue,
|
|
1404
|
-
placeholder: e.field.placeholder,
|
|
1405
|
-
"onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
|
|
1406
|
-
}, null, 8, ["model-value", "placeholder"]))]),
|
|
1407
|
-
_: 1
|
|
1408
|
-
}, 8, [
|
|
1409
|
-
"label",
|
|
1410
|
-
"required",
|
|
1411
|
-
"read-only"
|
|
1412
|
-
]));
|
|
1413
|
-
}
|
|
1414
|
-
}), or = [
|
|
1415
|
-
"value",
|
|
1416
|
-
"placeholder",
|
|
1417
|
-
"title"
|
|
1418
|
-
], sr = "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", cr = {
|
|
1419
|
-
text: ar,
|
|
1420
|
-
textarea: /* @__PURE__ */ w({
|
|
1421
|
-
__name: "TextareaField",
|
|
1422
|
-
props: {
|
|
1423
|
-
field: {},
|
|
1424
|
-
modelValue: {},
|
|
1425
|
-
readOnly: { type: Boolean }
|
|
1426
|
-
},
|
|
1427
|
-
emits: ["update:modelValue"],
|
|
1428
|
-
setup(e, { emit: n }) {
|
|
1429
|
-
let i = n, { t: a } = z();
|
|
1430
|
-
return (n, o) => (t(), b(Q, {
|
|
1431
|
-
label: e.field.label,
|
|
1432
|
-
required: e.field.required,
|
|
1433
|
-
"read-only": e.readOnly
|
|
1434
|
-
}, {
|
|
1435
|
-
default: r(() => [e.readOnly ? (t(), h("textarea", {
|
|
1436
|
-
key: 0,
|
|
1437
|
-
value: e.modelValue,
|
|
1438
|
-
placeholder: e.field.placeholder,
|
|
1439
|
-
rows: "3",
|
|
1440
|
-
disabled: "",
|
|
1441
|
-
title: p(a).customBlocks.dataSource.readOnlyTooltip,
|
|
1442
|
-
class: y(sr)
|
|
1443
|
-
}, null, 8, or)) : (t(), b(Ue, {
|
|
1444
|
-
key: 1,
|
|
1445
|
-
"model-value": e.modelValue,
|
|
1446
|
-
placeholder: e.field.placeholder,
|
|
1447
|
-
"onUpdate:modelValue": o[0] ||= (e) => i("update:modelValue", e)
|
|
1448
|
-
}, null, 8, ["model-value", "placeholder"]))]),
|
|
1449
|
-
_: 1
|
|
1450
|
-
}, 8, [
|
|
1451
|
-
"label",
|
|
1452
|
-
"required",
|
|
1453
|
-
"read-only"
|
|
1454
|
-
]));
|
|
1455
|
-
}
|
|
1456
|
-
}),
|
|
1457
|
-
image: Gn,
|
|
1458
|
-
color: Hn,
|
|
1459
|
-
number: qn,
|
|
1460
|
-
select: rr,
|
|
1461
|
-
boolean: In,
|
|
1462
|
-
repeatable: er
|
|
1463
|
-
};
|
|
1464
|
-
function lr(e) {
|
|
1465
|
-
return cr[e] ?? ar;
|
|
1466
|
-
}
|
|
1467
|
-
//#endregion
|
|
1468
|
-
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
1469
|
-
var ur = {
|
|
1470
|
-
key: 0,
|
|
1471
|
-
class: "tpl:p-4"
|
|
1472
|
-
}, dr = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fr = { key: 1 }, pr = {
|
|
1473
|
-
key: 0,
|
|
1474
|
-
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1475
|
-
}, mr = {
|
|
1476
|
-
key: 1,
|
|
1477
|
-
class: "tpl:mb-4"
|
|
1478
|
-
}, hr = {
|
|
1479
|
-
key: 1,
|
|
1480
|
-
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
1481
|
-
}, gr = {
|
|
1482
|
-
key: 0,
|
|
1483
|
-
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
1484
|
-
}, _r = {
|
|
1485
|
-
key: 2,
|
|
1486
|
-
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
1487
|
-
}, vr = /* @__PURE__ */ w({
|
|
1488
|
-
__name: "CustomBlockToolbar",
|
|
1489
|
-
props: { block: {} },
|
|
1490
|
-
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
1491
|
-
setup(e, { emit: n }) {
|
|
1492
|
-
let r = e, o = n, { t: s } = z(), l = c(ve, []), u = S(() => l.find((e) => e.type === r.block.customType)), d = S(() => r.block), { isFetching: f, fetchError: y, fetch: w, hasDataSource: T, needsFetch: E } = R({
|
|
1493
|
-
definition: u,
|
|
1494
|
-
block: d,
|
|
1495
|
-
onUpdate: (e, t) => {
|
|
1496
|
-
o("updateFieldValues", e), o("updateDataSourceFetched", t);
|
|
1497
|
-
}
|
|
1498
|
-
});
|
|
1499
|
-
function D(e) {
|
|
1500
|
-
return e.readOnly === !0 && T.value && !!r.block.dataSourceFetched;
|
|
1501
|
-
}
|
|
1502
|
-
function O(e, t) {
|
|
1503
|
-
o("updateFieldValues", {
|
|
1504
|
-
...r.block.fieldValues,
|
|
1505
|
-
[e]: t
|
|
1506
|
-
});
|
|
1507
|
-
}
|
|
1508
|
-
return (n, r) => u.value ? (t(), h("div", fr, [
|
|
1509
|
-
u.value.description ? (t(), h("p", pr, v(u.value.description), 1)) : C("", !0),
|
|
1510
|
-
p(T) ? (t(), h("div", mr, [p(E) && !p(f) ? (t(), h("button", {
|
|
1511
|
-
key: 0,
|
|
1512
|
-
type: "button",
|
|
1513
|
-
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)]",
|
|
1514
|
-
onClick: r[0] ||= (...e) => p(w) && p(w)(...e)
|
|
1515
|
-
}, v(u.value?.dataSource?.label || p(s).customBlocks.dataSource.fetchButton), 1)) : (t(), h("div", hr, [p(f) ? (t(), h("div", gr, v(p(s).customBlocks.dataSource.fetching), 1)) : (t(), h("button", {
|
|
1516
|
-
key: 1,
|
|
1517
|
-
type: "button",
|
|
1518
|
-
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)]",
|
|
1519
|
-
onClick: r[1] ||= (...e) => p(w) && p(w)(...e)
|
|
1520
|
-
}, [g(p(Ae), { size: 12 }), _(" " + v(p(s).customBlocks.dataSource.changeButton), 1)]))])), p(y) ? (t(), h("p", _r, [g(p(Ce), {
|
|
1521
|
-
size: 14,
|
|
1522
|
-
class: "tpl:shrink-0"
|
|
1523
|
-
}), _(" " + v(p(s).customBlocks.dataSource.fetchError), 1)])) : C("", !0)])) : C("", !0),
|
|
1524
|
-
(t(!0), h(x, null, a(u.value.fields, (n) => (t(), b(i(p(lr)(n.type)), {
|
|
1525
|
-
key: n.key,
|
|
1526
|
-
field: n,
|
|
1527
|
-
"model-value": e.block.fieldValues[n.key],
|
|
1528
|
-
"read-only": D(n),
|
|
1529
|
-
"onUpdate:modelValue": (e) => O(n.key, e)
|
|
1530
|
-
}, null, 8, [
|
|
1531
|
-
"field",
|
|
1532
|
-
"model-value",
|
|
1533
|
-
"read-only",
|
|
1534
|
-
"onUpdate:modelValue"
|
|
1535
|
-
]))), 128))
|
|
1536
|
-
])) : (t(), h("div", ur, [m("p", dr, v(p(s).customBlocks.toolbar.noDefinition), 1)]));
|
|
1537
|
-
}
|
|
1538
|
-
}), yr = { class: "tpl:mb-3.5" }, br = { class: "tpl:mb-3.5" }, xr = { class: "tpl:mb-3.5" }, Sr = { class: "tpl:flex tpl:items-stretch" }, Cr = ["value"], wr = /* @__PURE__ */ w({
|
|
1539
|
-
__name: "DividerToolbar",
|
|
1540
|
-
props: { block: {} },
|
|
1541
|
-
emits: ["update"],
|
|
1542
|
-
setup(e, { emit: n }) {
|
|
1543
|
-
let r = n, { t: i } = z();
|
|
1544
|
-
function a(e, t) {
|
|
1545
|
-
r("update", { [e]: t });
|
|
1546
|
-
}
|
|
1547
|
-
return (n, r) => (t(), h(x, null, [
|
|
1548
|
-
m("div", yr, [m("label", { class: y(p(U)) }, v(p(i).divider.style), 3), g(Y, {
|
|
1549
|
-
options: [
|
|
1550
|
-
{
|
|
1551
|
-
value: "solid",
|
|
1552
|
-
label: p(i).divider.solid
|
|
1553
|
-
},
|
|
1554
|
-
{
|
|
1555
|
-
value: "dashed",
|
|
1556
|
-
label: p(i).divider.dashed
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
value: "dotted",
|
|
1560
|
-
label: p(i).divider.dotted
|
|
1561
|
-
}
|
|
1562
|
-
],
|
|
1563
|
-
"model-value": e.block.lineStyle,
|
|
1564
|
-
"onUpdate:modelValue": r[0] ||= (e) => a("lineStyle", e)
|
|
1565
|
-
}, null, 8, ["options", "model-value"])]),
|
|
1566
|
-
m("div", br, [m("label", { class: y(p(U)) }, v(p(i).divider.color), 3), g(B, {
|
|
1567
|
-
"model-value": e.block.color,
|
|
1568
|
-
"onUpdate:modelValue": r[1] ||= (e) => a("color", e)
|
|
1569
|
-
}, null, 8, ["model-value"])]),
|
|
1570
|
-
m("div", xr, [m("label", { class: y(p(U)) }, v(p(i).divider.thickness), 3), m("div", Sr, [m("input", {
|
|
1571
|
-
type: "number",
|
|
1572
|
-
class: y(p(G)),
|
|
1573
|
-
value: e.block.thickness,
|
|
1574
|
-
min: "1",
|
|
1575
|
-
max: "10",
|
|
1576
|
-
onInput: r[2] ||= (e) => a("thickness", Number(e.target.value))
|
|
1577
|
-
}, null, 42, Cr), m("span", { class: y(p(W)) }, "px", 2)])])
|
|
1578
|
-
], 64));
|
|
1579
|
-
}
|
|
1580
|
-
}), Tr = { class: "tpl:mb-3.5" }, Er = ["value"], Dr = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Or = /* @__PURE__ */ w({
|
|
1581
|
-
__name: "HtmlToolbar",
|
|
1582
|
-
props: { block: {} },
|
|
1583
|
-
emits: ["update"],
|
|
1584
|
-
setup(e, { emit: n }) {
|
|
1585
|
-
let r = n, { t: i } = z();
|
|
1586
|
-
return (n, a) => (t(), h("div", Tr, [
|
|
1587
|
-
m("label", { class: y(p(U)) }, v(p(i).html.content), 3),
|
|
1588
|
-
m("textarea", {
|
|
1589
|
-
value: e.block.content,
|
|
1590
|
-
placeholder: "<div>...</div>",
|
|
1591
|
-
rows: "10",
|
|
1592
|
-
class: y(p(Re)),
|
|
1593
|
-
onInput: a[0] ||= (e) => r("update", { content: e.target.value })
|
|
1594
|
-
}, null, 42, Er),
|
|
1595
|
-
m("p", Dr, [g(p(Ee), {
|
|
1596
|
-
size: 12,
|
|
1597
|
-
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
1598
|
-
}), _(" " + v(p(i).html.sanitizationHint), 1)])
|
|
1599
|
-
]));
|
|
1600
|
-
}
|
|
1601
|
-
}), kr = { class: "tpl:mb-3.5" }, Ar = {
|
|
1602
|
-
key: 0,
|
|
1603
|
-
class: "tpl:mb-3.5"
|
|
1604
|
-
}, jr = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Mr = [
|
|
1605
|
-
"value",
|
|
1606
|
-
"placeholder",
|
|
1607
|
-
"title"
|
|
1608
|
-
], Nr = { class: "tpl:mb-3.5" }, Pr = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, Fr = { class: "tpl:mb-3.5" }, Ir = ["value"], Lr = { value: "full" }, Rr = { value: "custom" }, zr = {
|
|
1609
|
-
key: 0,
|
|
1610
|
-
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1611
|
-
}, Br = ["value"], Vr = { class: "tpl:mb-3.5" }, Hr = ["value"], Ur = { value: "auto" }, Wr = { value: "custom" }, Gr = {
|
|
1612
|
-
key: 0,
|
|
1613
|
-
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1614
|
-
}, Kr = ["value"], qr = { class: "tpl:mb-3.5" }, Jr = { class: "tpl:mb-3.5" }, Yr = 350, Xr = 200, Zr = /* @__PURE__ */ w({
|
|
1615
|
-
__name: "ImageToolbar",
|
|
1616
|
-
props: { block: {} },
|
|
1617
|
-
emits: ["update"],
|
|
1618
|
-
setup(e, { emit: n }) {
|
|
1619
|
-
let i = e, a = n, { t: o } = z(), s = c(me, ee.liquid), l = d(!1), u = d(!1), { start: f } = le(() => {
|
|
1620
|
-
l.value = !1, u.value = !1;
|
|
1621
|
-
}, 1e3, { immediate: !1 }), w = [
|
|
1622
|
-
300,
|
|
1623
|
-
400,
|
|
1624
|
-
500
|
|
1625
|
-
], T = S(() => {
|
|
1626
|
-
let e = i.block.width;
|
|
1627
|
-
return e === "full" ? "full" : w.includes(e) ? String(e) : "custom";
|
|
1628
|
-
}), E = S(() => typeof i.block.height == "number" ? "custom" : "auto");
|
|
1629
|
-
function D(e, t) {
|
|
1630
|
-
a("update", { [e]: t });
|
|
1631
|
-
}
|
|
1632
|
-
function O(e) {
|
|
1633
|
-
if (e === "custom") {
|
|
1634
|
-
let e = i.block.width;
|
|
1635
|
-
(typeof e != "number" || w.includes(e)) && D("width", Yr);
|
|
1636
|
-
} else D("width", e === "full" ? "full" : Number(e));
|
|
1637
|
-
}
|
|
1638
|
-
function j(e) {
|
|
1639
|
-
D("height", e === "custom" ? Xr : void 0);
|
|
1640
|
-
}
|
|
1641
|
-
function M(e) {
|
|
1642
|
-
let t = Number(e);
|
|
1643
|
-
!Number.isFinite(t) || t <= 0 || D("height", t);
|
|
1644
|
-
}
|
|
1645
|
-
function N(e) {
|
|
1646
|
-
D("borderRadius", A(e) === null ? void 0 : e);
|
|
1647
|
-
}
|
|
1648
|
-
function P(e) {
|
|
1649
|
-
let t = Number(e);
|
|
1650
|
-
!Number.isFinite(t) || t <= 0 || D("width", t);
|
|
1651
|
-
}
|
|
1652
|
-
function F(e) {
|
|
1653
|
-
D("src", e.url), e.alt && (D("alt", e.alt), u.value = !0), l.value = !0, f();
|
|
1654
|
-
}
|
|
1655
|
-
let I = d(), te = S(() => k(i.block.src, s)), { canBrowse: L, isUploading: R, showOverlay: re, openMediaBrowser: oe } = ie({
|
|
1656
|
-
target: I,
|
|
1657
|
-
blocked: te,
|
|
1658
|
-
apply: F
|
|
1659
|
-
});
|
|
1660
|
-
return (n, i) => (t(), h(x, null, [
|
|
1661
|
-
m("div", kr, [m("label", { class: y(p(U)) }, v(p(o).image.imageUrl), 3), m("div", {
|
|
1662
|
-
ref_key: "dropZoneRef",
|
|
1663
|
-
ref: I,
|
|
1664
|
-
class: "tpl:relative"
|
|
1665
|
-
}, [
|
|
1666
|
-
p(re) ? (t(), b(ne, {
|
|
1667
|
-
key: 0,
|
|
1668
|
-
uploading: p(R)
|
|
1669
|
-
}, null, 8, ["uploading"])) : C("", !0),
|
|
1670
|
-
g(J, {
|
|
1671
|
-
"model-value": e.block.src,
|
|
1672
|
-
type: "url",
|
|
1673
|
-
placeholder: p(o).image.imageUrlPlaceholder,
|
|
1674
|
-
pulse: l.value,
|
|
1675
|
-
"onUpdate:modelValue": i[0] ||= (e) => D("src", e)
|
|
1676
|
-
}, null, 8, [
|
|
1677
|
-
"model-value",
|
|
1678
|
-
"placeholder",
|
|
1679
|
-
"pulse"
|
|
1680
|
-
]),
|
|
1681
|
-
p(L) ? (t(), h("button", {
|
|
1682
|
-
key: 1,
|
|
1683
|
-
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",
|
|
1684
|
-
style: {
|
|
1685
|
-
"border-color": "var(--tpl-border)",
|
|
1686
|
-
color: "var(--tpl-primary)",
|
|
1687
|
-
"background-color": "var(--tpl-bg)"
|
|
1688
|
-
},
|
|
1689
|
-
onClick: i[1] ||= (...e) => p(oe) && p(oe)(...e)
|
|
1690
|
-
}, [g(p(ae), {
|
|
1691
|
-
size: 14,
|
|
1692
|
-
"stroke-width": 1.5
|
|
1693
|
-
}), _(" " + v(p(o).image.browseMedia), 1)])) : C("", !0)
|
|
1694
|
-
], 512)]),
|
|
1695
|
-
p(k)(e.block.src, p(s)) ? (t(), h("div", Ar, [m("label", { class: y(p(U)) }, [_(v(p(o).image.placeholderUrl) + " ", 1), m("span", jr, v(p(o).image.optional), 1)], 2), m("input", {
|
|
1696
|
-
type: "url",
|
|
1697
|
-
class: y(p(K)),
|
|
1698
|
-
value: e.block.placeholderUrl || "",
|
|
1699
|
-
placeholder: p(o).image.placeholderUrlPlaceholder,
|
|
1700
|
-
title: p(o).image.placeholderUrlTooltip,
|
|
1701
|
-
onInput: i[2] ||= (e) => D("placeholderUrl", e.target.value)
|
|
1702
|
-
}, null, 42, Mr)])) : C("", !0),
|
|
1703
|
-
m("div", Nr, [
|
|
1704
|
-
m("label", { class: y(p(U)) }, v(p(o).image.altText), 3),
|
|
1705
|
-
g(J, {
|
|
1706
|
-
"model-value": e.block.alt,
|
|
1707
|
-
type: "text",
|
|
1708
|
-
placeholder: p(o).image.altTextPlaceholder,
|
|
1709
|
-
pulse: u.value,
|
|
1710
|
-
disabled: e.block.decorative === !0,
|
|
1711
|
-
"onUpdate:modelValue": i[3] ||= (e) => D("alt", e)
|
|
1712
|
-
}, null, 8, [
|
|
1713
|
-
"model-value",
|
|
1714
|
-
"placeholder",
|
|
1715
|
-
"pulse",
|
|
1716
|
-
"disabled"
|
|
1717
|
-
]),
|
|
1718
|
-
g(q, {
|
|
1719
|
-
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
1720
|
-
"model-value": e.block.decorative === !0,
|
|
1721
|
-
label: p(o).image.decorative,
|
|
1722
|
-
"onUpdate:modelValue": i[4] ||= (e) => D("decorative", e)
|
|
1723
|
-
}, {
|
|
1724
|
-
default: r(() => [m("span", null, [_(v(p(o).image.decorative) + " ", 1), m("span", Pr, v(p(o).image.decorativeHint), 1)])]),
|
|
1725
|
-
_: 1
|
|
1726
|
-
}, 8, ["model-value", "label"])
|
|
1727
|
-
]),
|
|
1728
|
-
m("div", Fr, [
|
|
1729
|
-
m("label", { class: y(p(U)) }, v(p(o).image.width), 3),
|
|
1730
|
-
m("select", {
|
|
1731
|
-
class: y(p(K)),
|
|
1732
|
-
value: T.value,
|
|
1733
|
-
onChange: i[5] ||= (e) => O(e.target.value)
|
|
1734
|
-
}, [
|
|
1735
|
-
m("option", Lr, v(p(o).image.fullWidth), 1),
|
|
1736
|
-
i[13] ||= m("option", { value: "300" }, "300px", -1),
|
|
1737
|
-
i[14] ||= m("option", { value: "400" }, "400px", -1),
|
|
1738
|
-
i[15] ||= m("option", { value: "500" }, "500px", -1),
|
|
1739
|
-
m("option", Rr, v(p(o).image.widthCustom), 1)
|
|
1740
|
-
], 42, Ir),
|
|
1741
|
-
T.value === "custom" ? (t(), h("div", zr, [m("input", {
|
|
1742
|
-
type: "number",
|
|
1743
|
-
class: y(p(G)),
|
|
1744
|
-
value: typeof e.block.width == "number" ? e.block.width : Yr,
|
|
1745
|
-
min: "20",
|
|
1746
|
-
onInput: i[6] ||= (e) => P(e.target.value)
|
|
1747
|
-
}, null, 42, Br), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
|
|
1748
|
-
]),
|
|
1749
|
-
m("div", Vr, [
|
|
1750
|
-
m("label", { class: y(p(U)) }, v(p(o).image.height), 3),
|
|
1751
|
-
m("select", {
|
|
1752
|
-
class: y(p(K)),
|
|
1753
|
-
"data-testid": "image-height-mode",
|
|
1754
|
-
value: E.value,
|
|
1755
|
-
onChange: i[7] ||= (e) => j(e.target.value)
|
|
1756
|
-
}, [m("option", Ur, v(p(o).image.heightAuto), 1), m("option", Wr, v(p(o).image.heightCustom), 1)], 42, Hr),
|
|
1757
|
-
E.value === "custom" ? (t(), h("div", Gr, [m("input", {
|
|
1758
|
-
type: "number",
|
|
1759
|
-
"data-testid": "image-height-input",
|
|
1760
|
-
class: y(p(G)),
|
|
1761
|
-
value: e.block.height,
|
|
1762
|
-
min: "20",
|
|
1763
|
-
onInput: i[8] ||= (e) => M(e.target.value)
|
|
1764
|
-
}, null, 42, Kr), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
|
|
1765
|
-
]),
|
|
1766
|
-
g(pt, {
|
|
1767
|
-
"model-value": e.block.borderRadius,
|
|
1768
|
-
label: p(o).image.borderRadius,
|
|
1769
|
-
"testid-prefix": "image",
|
|
1770
|
-
"onUpdate:modelValue": N
|
|
1771
|
-
}, null, 8, ["model-value", "label"]),
|
|
1772
|
-
g(st, {
|
|
1773
|
-
"model-value": e.block.border,
|
|
1774
|
-
"testid-prefix": "image",
|
|
1775
|
-
"onUpdate:modelValue": i[9] ||= (e) => D("border", e)
|
|
1776
|
-
}, null, 8, ["model-value"]),
|
|
1777
|
-
m("div", qr, [m("label", { class: y(p(U)) }, v(p(o).title.align), 3), g(Y, {
|
|
1778
|
-
options: [
|
|
1779
|
-
{
|
|
1780
|
-
value: "left",
|
|
1781
|
-
label: p(o).title.alignLeft
|
|
1782
|
-
},
|
|
1783
|
-
{
|
|
1784
|
-
value: "center",
|
|
1785
|
-
label: p(o).title.alignCenter
|
|
1786
|
-
},
|
|
1787
|
-
{
|
|
1788
|
-
value: "right",
|
|
1789
|
-
label: p(o).title.alignRight
|
|
1790
|
-
}
|
|
1791
|
-
],
|
|
1792
|
-
"model-value": e.block.align,
|
|
1793
|
-
"onUpdate:modelValue": i[10] ||= (e) => D("align", e)
|
|
1794
|
-
}, null, 8, ["options", "model-value"])]),
|
|
1795
|
-
m("div", Jr, [
|
|
1796
|
-
m("label", { class: y(p(U)) }, v(p(o).image.linkUrl), 3),
|
|
1797
|
-
g(J, {
|
|
1798
|
-
"model-value": e.block.linkUrl || "",
|
|
1799
|
-
type: "url",
|
|
1800
|
-
placeholder: p(o).image.imageUrlPlaceholder,
|
|
1801
|
-
"onUpdate:modelValue": i[11] ||= (e) => D("linkUrl", e)
|
|
1802
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
1803
|
-
e.block.linkUrl ? (t(), b(q, {
|
|
1804
|
-
key: 0,
|
|
1805
|
-
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
1806
|
-
"model-value": e.block.linkOpenInNewTab ?? !1,
|
|
1807
|
-
label: p(o).image.openInNewTab,
|
|
1808
|
-
"onUpdate:modelValue": i[12] ||= (e) => D("linkOpenInNewTab", e)
|
|
1809
|
-
}, null, 8, ["model-value", "label"])) : C("", !0)
|
|
1810
|
-
])
|
|
1811
|
-
], 64));
|
|
1812
|
-
}
|
|
1813
|
-
}), Qr = { class: "tpl:mb-3.5" }, $ = /* @__PURE__ */ w({
|
|
1814
|
-
__name: "FieldRow",
|
|
1815
|
-
props: { label: {} },
|
|
1816
|
-
setup(e) {
|
|
1817
|
-
return (n, r) => (t(), h("div", Qr, [e.label ? (t(), h("label", {
|
|
1818
|
-
key: 0,
|
|
1819
|
-
class: y(p(U))
|
|
1820
|
-
}, v(e.label), 3)) : C("", !0), o(n.$slots, "default")]));
|
|
1821
|
-
}
|
|
1822
|
-
}), $r = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, ei = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ti = [
|
|
1823
|
-
"value",
|
|
1824
|
-
"placeholder",
|
|
1825
|
-
"onInput"
|
|
1826
|
-
], ni = ["title", "onClick"], ri = { class: "tpl:flex tpl:flex-wrap tpl:items-center tpl:gap-x-3 tpl:gap-y-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ii = { class: "tpl:flex tpl:items-center tpl:gap-2" }, ai = ["value"], oi = { value: "" }, si = ["value"], ci = ["value"], li = /* @__PURE__ */ w({
|
|
1827
|
-
__name: "MenuToolbar",
|
|
1828
|
-
props: {
|
|
1829
|
-
block: {},
|
|
1830
|
-
fontFamilies: {}
|
|
1831
|
-
},
|
|
1832
|
-
emits: ["update"],
|
|
1833
|
-
setup(e, { emit: n }) {
|
|
1834
|
-
let i = e, o = n, { t: s } = z(), c = S(() => [
|
|
1835
|
-
{
|
|
1836
|
-
key: "openInNewTab",
|
|
1837
|
-
label: s.menu.openInNewTab
|
|
1838
|
-
},
|
|
1839
|
-
{
|
|
1840
|
-
key: "bold",
|
|
1841
|
-
label: s.menu.bold
|
|
1842
|
-
},
|
|
1843
|
-
{
|
|
1844
|
-
key: "underline",
|
|
1845
|
-
label: s.menu.underline
|
|
1846
|
-
}
|
|
1847
|
-
]), l = S(() => [
|
|
1848
|
-
{
|
|
1849
|
-
value: "left",
|
|
1850
|
-
label: s.title.alignLeft,
|
|
1851
|
-
icon: Ne
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
value: "center",
|
|
1855
|
-
label: s.title.alignCenter,
|
|
1856
|
-
icon: Me
|
|
1857
|
-
},
|
|
1858
|
-
{
|
|
1859
|
-
value: "right",
|
|
1860
|
-
label: s.title.alignRight,
|
|
1861
|
-
icon: je
|
|
1862
|
-
}
|
|
1863
|
-
]);
|
|
1864
|
-
function u(e, t) {
|
|
1865
|
-
o("update", { [e]: t });
|
|
1866
|
-
}
|
|
1867
|
-
function d() {
|
|
1868
|
-
let e = {
|
|
1869
|
-
id: O(),
|
|
1870
|
-
text: "",
|
|
1871
|
-
url: "",
|
|
1872
|
-
openInNewTab: !1,
|
|
1873
|
-
bold: !1,
|
|
1874
|
-
underline: !1
|
|
1875
|
-
};
|
|
1876
|
-
o("update", { items: [...i.block.items, e] });
|
|
1877
|
-
}
|
|
1878
|
-
function f(e, t, n) {
|
|
1879
|
-
let r = i.block.items.map((r) => r.id === e ? {
|
|
1880
|
-
...r,
|
|
1881
|
-
[t]: n
|
|
1882
|
-
} : r);
|
|
1883
|
-
o("update", { items: r });
|
|
1884
|
-
}
|
|
1885
|
-
function C(e) {
|
|
1886
|
-
o("update", { items: i.block.items.filter((t) => t.id !== e) });
|
|
1887
|
-
}
|
|
1888
|
-
return (n, i) => (t(), h(x, null, [
|
|
1889
|
-
g($, { label: p(s).menu.items }, {
|
|
1890
|
-
default: r(() => [m("div", $r, [(t(!0), h(x, null, a(e.block.items, (n) => (t(), h("div", {
|
|
1891
|
-
key: n.id,
|
|
1892
|
-
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"
|
|
1893
|
-
}, [
|
|
1894
|
-
m("div", ei, [m("input", {
|
|
1895
|
-
type: "text",
|
|
1896
|
-
class: y([p(K), "tpl:flex-1"]),
|
|
1897
|
-
value: n.text,
|
|
1898
|
-
placeholder: p(s).menu.text,
|
|
1899
|
-
onInput: (e) => f(n.id, "text", e.target.value)
|
|
1900
|
-
}, null, 42, ti), m("button", {
|
|
1901
|
-
class: y(p(ze)),
|
|
1902
|
-
title: p(s).menu.removeItem,
|
|
1903
|
-
onClick: (e) => C(n.id)
|
|
1904
|
-
}, [g(p(Fe), {
|
|
1905
|
-
size: 14,
|
|
1906
|
-
"stroke-width": 2
|
|
1907
|
-
})], 10, ni)]),
|
|
1908
|
-
g(J, {
|
|
1909
|
-
"model-value": n.url,
|
|
1910
|
-
type: "url",
|
|
1911
|
-
placeholder: p(s).menu.urlPlaceholder,
|
|
1912
|
-
"onUpdate:modelValue": (e) => f(n.id, "url", e)
|
|
1913
|
-
}, null, 8, [
|
|
1914
|
-
"model-value",
|
|
1915
|
-
"placeholder",
|
|
1916
|
-
"onUpdate:modelValue"
|
|
1917
|
-
]),
|
|
1918
|
-
m("div", ri, [(t(!0), h(x, null, a(c.value, (e) => (t(), b(q, {
|
|
1919
|
-
key: e.key,
|
|
1920
|
-
"model-value": n[e.key],
|
|
1921
|
-
label: e.label,
|
|
1922
|
-
"onUpdate:modelValue": (t) => f(n.id, e.key, t)
|
|
1923
|
-
}, null, 8, [
|
|
1924
|
-
"model-value",
|
|
1925
|
-
"label",
|
|
1926
|
-
"onUpdate:modelValue"
|
|
1927
|
-
]))), 128))]),
|
|
1928
|
-
m("div", ii, [m("label", { class: y([p(U), "tpl:!mb-0"]) }, v(p(s).menu.color), 3), g(B, {
|
|
1929
|
-
"swatch-only": "",
|
|
1930
|
-
"model-value": n.color || e.block.linkColor || e.block.color || "",
|
|
1931
|
-
"onUpdate:modelValue": (e) => f(n.id, "color", e)
|
|
1932
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
1933
|
-
]))), 128)), m("button", {
|
|
1934
|
-
class: y(p(Be)),
|
|
1935
|
-
onClick: d
|
|
1936
|
-
}, [g(p(H), {
|
|
1937
|
-
size: 14,
|
|
1938
|
-
"stroke-width": 2
|
|
1939
|
-
}), _(" " + v(p(s).menu.addItem), 1)], 2)])]),
|
|
1940
|
-
_: 1
|
|
1941
|
-
}, 8, ["label"]),
|
|
1942
|
-
g($, { label: p(s).menu.fontFamily }, {
|
|
1943
|
-
default: r(() => [m("select", {
|
|
1944
|
-
class: y(p(K)),
|
|
1945
|
-
value: p(Ge)(e.block.fontFamily),
|
|
1946
|
-
onChange: i[0] ||= (e) => u("fontFamily", e.target.value || void 0)
|
|
1947
|
-
}, [m("option", oi, v(p(s).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
|
|
1948
|
-
key: e.value,
|
|
1949
|
-
value: e.value
|
|
1950
|
-
}, v(e.label), 9, si))), 128))], 42, ai)]),
|
|
1951
|
-
_: 1
|
|
1952
|
-
}, 8, ["label"]),
|
|
1953
|
-
g($, { label: p(s).menu.fontSize }, {
|
|
1954
|
-
default: r(() => [g(X, {
|
|
1955
|
-
"model-value": e.block.fontSize,
|
|
1956
|
-
min: 8,
|
|
1957
|
-
max: 48,
|
|
1958
|
-
suffix: "px",
|
|
1959
|
-
"onUpdate:modelValue": i[1] ||= (e) => u("fontSize", e)
|
|
1960
|
-
}, null, 8, ["model-value"])]),
|
|
1961
|
-
_: 1
|
|
1962
|
-
}, 8, ["label"]),
|
|
1963
|
-
g($, { label: p(s).menu.color }, {
|
|
1964
|
-
default: r(() => [g(B, {
|
|
1965
|
-
"model-value": e.block.color ?? "",
|
|
1966
|
-
"onUpdate:modelValue": i[2] ||= (e) => u("color", e || void 0)
|
|
1967
|
-
}, null, 8, ["model-value"])]),
|
|
1968
|
-
_: 1
|
|
1969
|
-
}, 8, ["label"]),
|
|
1970
|
-
g($, { label: p(s).menu.linkColor }, {
|
|
1971
|
-
default: r(() => [g(B, {
|
|
1972
|
-
"model-value": e.block.linkColor || e.block.color || "",
|
|
1973
|
-
"onUpdate:modelValue": i[3] ||= (e) => u("linkColor", e || void 0)
|
|
1974
|
-
}, null, 8, ["model-value"])]),
|
|
1975
|
-
_: 1
|
|
1976
|
-
}, 8, ["label"]),
|
|
1977
|
-
g($, { label: p(s).menu.textAlign }, {
|
|
1978
|
-
default: r(() => [g(Y, {
|
|
1979
|
-
options: l.value,
|
|
1980
|
-
"model-value": e.block.textAlign,
|
|
1981
|
-
"onUpdate:modelValue": i[4] ||= (e) => u("textAlign", e)
|
|
1982
|
-
}, null, 8, ["options", "model-value"])]),
|
|
1983
|
-
_: 1
|
|
1984
|
-
}, 8, ["label"]),
|
|
1985
|
-
g($, { label: p(s).menu.separator }, {
|
|
1986
|
-
default: r(() => [m("input", {
|
|
1987
|
-
type: "text",
|
|
1988
|
-
class: y(p(K)),
|
|
1989
|
-
value: e.block.separator,
|
|
1990
|
-
onInput: i[5] ||= (e) => u("separator", e.target.value)
|
|
1991
|
-
}, null, 42, ci)]),
|
|
1992
|
-
_: 1
|
|
1993
|
-
}, 8, ["label"]),
|
|
1994
|
-
g($, { label: p(s).menu.separatorColor }, {
|
|
1995
|
-
default: r(() => [g(B, {
|
|
1996
|
-
"model-value": e.block.separatorColor,
|
|
1997
|
-
"onUpdate:modelValue": i[6] ||= (e) => u("separatorColor", e)
|
|
1998
|
-
}, null, 8, ["model-value"])]),
|
|
1999
|
-
_: 1
|
|
2000
|
-
}, 8, ["label"]),
|
|
2001
|
-
g($, { label: p(s).menu.spacing }, {
|
|
2002
|
-
default: r(() => [g(X, {
|
|
2003
|
-
"model-value": e.block.spacing,
|
|
2004
|
-
min: 0,
|
|
2005
|
-
max: 50,
|
|
2006
|
-
suffix: "px",
|
|
2007
|
-
"onUpdate:modelValue": i[7] ||= (e) => u("spacing", e)
|
|
2008
|
-
}, null, 8, ["model-value"])]),
|
|
2009
|
-
_: 1
|
|
2010
|
-
}, 8, ["label"])
|
|
2011
|
-
], 64));
|
|
2012
|
-
}
|
|
2013
|
-
}), ui = {
|
|
2014
|
-
class: "tpl:mb-3.5",
|
|
2015
|
-
"data-testid": "paragraph-spacing"
|
|
2016
|
-
}, di = { class: "tpl:flex tpl:items-stretch" }, fi = ["value"], pi = /* @__PURE__ */ w({
|
|
2017
|
-
__name: "ParagraphToolbar",
|
|
2018
|
-
props: { block: {} },
|
|
2019
|
-
emits: ["update"],
|
|
2020
|
-
setup(e, { emit: n }) {
|
|
2021
|
-
let r = n, { t: i } = z();
|
|
2022
|
-
return (n, a) => (t(), h("div", ui, [m("label", { class: y(p(U)) }, v(p(i).paragraph.paragraphSpacing), 3), m("div", di, [m("input", {
|
|
2023
|
-
type: "number",
|
|
2024
|
-
class: y(p(G)),
|
|
2025
|
-
value: e.block.paragraphSpacing ?? p(j).paragraphGap,
|
|
2026
|
-
min: "0",
|
|
2027
|
-
max: "64",
|
|
2028
|
-
onInput: a[0] ||= (e) => r("update", { paragraphSpacing: Number(e.target.value) })
|
|
2029
|
-
}, null, 42, fi), m("span", { class: y(p(W)) }, "px", 2)])]));
|
|
2030
|
-
}
|
|
2031
|
-
});
|
|
2032
|
-
//#endregion
|
|
2033
|
-
//#region src/utils/rebalanceColumnChildren.ts
|
|
2034
|
-
function mi(e) {
|
|
2035
|
-
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2036
|
-
}
|
|
2037
|
-
function hi(e, t) {
|
|
2038
|
-
let n = mi(t);
|
|
2039
|
-
if (e.length === n) return e;
|
|
2040
|
-
if (e.length < n) {
|
|
2041
|
-
let t = Array.from({ length: n - e.length }, () => []);
|
|
2042
|
-
return [...e, ...t];
|
|
2043
|
-
}
|
|
2044
|
-
let r = e.slice(0, n), i = e.slice(n).flat(), a = [...r[n - 1], ...i];
|
|
2045
|
-
return [...r.slice(0, n - 1), a];
|
|
2046
|
-
}
|
|
2047
|
-
//#endregion
|
|
2048
|
-
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2049
|
-
var gi = { class: "tpl:mb-3.5" }, _i = ["value"], vi = ["value"], yi = {
|
|
2050
|
-
key: 0,
|
|
2051
|
-
class: "tpl:mb-3.5"
|
|
2052
|
-
}, bi = {
|
|
2053
|
-
key: 1,
|
|
2054
|
-
class: "tpl:mb-3.5"
|
|
2055
|
-
}, xi = {
|
|
2056
|
-
key: 0,
|
|
2057
|
-
class: "tpl:mt-1.5 tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
2058
|
-
}, Si = {
|
|
2059
|
-
key: 1,
|
|
2060
|
-
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2061
|
-
}, Ci = /* @__PURE__ */ w({
|
|
2062
|
-
__name: "SectionToolbar",
|
|
2063
|
-
props: { block: {} },
|
|
2064
|
-
emits: ["update"],
|
|
2065
|
-
setup(e, { emit: n }) {
|
|
2066
|
-
let r = e, i = n, { t: o } = z(), s = c(de, void 0), l = c(fe, void 0), u = s !== void 0 && I(s), d = S(() => l !== !1 || !!r.block.wrapper), f = S(() => u && !r.block.wrapper), _ = S(() => u && d.value), b = S(() => [
|
|
2067
|
-
{
|
|
2068
|
-
value: "1",
|
|
2069
|
-
label: o.section.column1
|
|
2070
|
-
},
|
|
2071
|
-
{
|
|
2072
|
-
value: "2",
|
|
2073
|
-
label: o.section.column2
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
value: "3",
|
|
2077
|
-
label: o.section.column3
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
value: "1-2",
|
|
2081
|
-
label: o.section.ratio12
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
value: "2-1",
|
|
2085
|
-
label: o.section.ratio21
|
|
2086
|
-
}
|
|
2087
|
-
]);
|
|
2088
|
-
function w(e) {
|
|
2089
|
-
let t = e.target.value, n = hi(r.block.children, t);
|
|
2090
|
-
i("update", {
|
|
2091
|
-
columns: t,
|
|
2092
|
-
children: n
|
|
2093
|
-
});
|
|
2094
|
-
}
|
|
2095
|
-
function T(e) {
|
|
2096
|
-
i("update", { stackOnMobile: e });
|
|
2097
|
-
}
|
|
2098
|
-
function E(e) {
|
|
2099
|
-
i("update", { borderRadius: e });
|
|
2100
|
-
}
|
|
2101
|
-
function D(e) {
|
|
2102
|
-
i("update", { wrapper: e ? { padding: {
|
|
2103
|
-
top: 20,
|
|
2104
|
-
right: 20,
|
|
2105
|
-
bottom: 20,
|
|
2106
|
-
left: 20
|
|
2107
|
-
} } : void 0 });
|
|
2108
|
-
}
|
|
2109
|
-
function O(e) {
|
|
2110
|
-
i("update", { wrapper: {
|
|
2111
|
-
...r.block.wrapper,
|
|
2112
|
-
...e
|
|
2113
|
-
} });
|
|
2114
|
-
}
|
|
2115
|
-
function k(e) {
|
|
2116
|
-
O({ padding: e });
|
|
2117
|
-
}
|
|
2118
|
-
function A(e) {
|
|
2119
|
-
O({ borderRadius: e });
|
|
2120
|
-
}
|
|
2121
|
-
return (n, r) => (t(), h(x, null, [
|
|
2122
|
-
m("div", gi, [m("label", { class: y(p(U)) }, v(p(o).section.columns), 3), m("select", {
|
|
2123
|
-
class: y(p(K)),
|
|
2124
|
-
value: e.block.columns,
|
|
2125
|
-
onChange: w
|
|
2126
|
-
}, [(t(!0), h(x, null, a(b.value, (e) => (t(), h("option", {
|
|
2127
|
-
key: e.value,
|
|
2128
|
-
value: e.value
|
|
2129
|
-
}, v(e.label), 9, vi))), 128))], 42, _i)]),
|
|
2130
|
-
e.block.columns === "1" ? C("", !0) : (t(), h("div", yi, [g(q, {
|
|
2131
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2132
|
-
"model-value": e.block.stackOnMobile !== !1,
|
|
2133
|
-
label: p(o).section.stackOnMobile,
|
|
2134
|
-
"onUpdate:modelValue": r[0] ||= (e) => T(e)
|
|
2135
|
-
}, null, 8, ["model-value", "label"])])),
|
|
2136
|
-
g(pt, {
|
|
2137
|
-
"model-value": e.block.borderRadius,
|
|
2138
|
-
label: p(o).section.borderRadius,
|
|
2139
|
-
max: 50,
|
|
2140
|
-
"testid-prefix": "section",
|
|
2141
|
-
"onUpdate:modelValue": E
|
|
2142
|
-
}, null, 8, ["model-value", "label"]),
|
|
2143
|
-
g(st, {
|
|
2144
|
-
"model-value": e.block.border,
|
|
2145
|
-
"testid-prefix": "section",
|
|
2146
|
-
"onUpdate:modelValue": r[1] ||= (e) => i("update", { border: e })
|
|
2147
|
-
}, null, 8, ["model-value"]),
|
|
2148
|
-
d.value ? (t(), h("div", bi, [
|
|
2149
|
-
g(q, {
|
|
2150
|
-
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2151
|
-
"model-value": !!e.block.wrapper,
|
|
2152
|
-
label: p(o).section.wrapperEnable,
|
|
2153
|
-
disabled: f.value,
|
|
2154
|
-
"onUpdate:modelValue": r[2] ||= (e) => D(e)
|
|
2155
|
-
}, null, 8, [
|
|
2156
|
-
"model-value",
|
|
2157
|
-
"label",
|
|
2158
|
-
"disabled"
|
|
2159
|
-
]),
|
|
2160
|
-
_.value ? (t(), h("p", xi, v(p(o).section.wrapperLayoutConflict), 1)) : C("", !0),
|
|
2161
|
-
e.block.wrapper ? (t(), h("div", Si, [
|
|
2162
|
-
m("div", null, [m("label", { class: y(p(U)) }, v(p(o).blockSettings.color), 3), g(B, {
|
|
2163
|
-
"model-value": e.block.wrapper.backgroundColor ?? "",
|
|
2164
|
-
"allow-transparent": "",
|
|
2165
|
-
"onUpdate:modelValue": r[3] ||= (e) => O({ backgroundColor: e })
|
|
2166
|
-
}, null, 8, ["model-value"])]),
|
|
2167
|
-
g(fn, {
|
|
2168
|
-
"model-value": e.block.wrapper.backgroundImage,
|
|
2169
|
-
"testid-prefix": "section-wrapper",
|
|
2170
|
-
"onUpdate:modelValue": r[4] ||= (e) => O({ backgroundImage: e })
|
|
2171
|
-
}, null, 8, ["model-value"]),
|
|
2172
|
-
g(rn, {
|
|
2173
|
-
label: p(o).blockSettings.padding,
|
|
2174
|
-
"model-value": e.block.wrapper.padding ?? {
|
|
2175
|
-
top: 0,
|
|
2176
|
-
right: 0,
|
|
2177
|
-
bottom: 0,
|
|
2178
|
-
left: 0
|
|
2179
|
-
},
|
|
2180
|
-
"onUpdate:modelValue": k
|
|
2181
|
-
}, null, 8, ["label", "model-value"]),
|
|
2182
|
-
g(pt, {
|
|
2183
|
-
"model-value": e.block.wrapper.borderRadius,
|
|
2184
|
-
label: p(o).section.borderRadius,
|
|
2185
|
-
max: 50,
|
|
2186
|
-
"testid-prefix": "section-wrapper",
|
|
2187
|
-
"onUpdate:modelValue": A
|
|
2188
|
-
}, null, 8, ["model-value", "label"])
|
|
2189
|
-
])) : C("", !0)
|
|
2190
|
-
])) : C("", !0)
|
|
2191
|
-
], 64));
|
|
2192
|
-
}
|
|
2193
|
-
}), wi = { class: "tpl:mb-3.5" }, Ti = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Ei = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Di = ["value", "onChange"], Oi = ["value"], ki = ["title", "onClick"], Ai = { class: "tpl:mb-3.5" }, ji = ["value"], Mi = { value: "solid" }, Ni = { value: "outlined" }, Pi = { value: "rounded" }, Fi = { value: "square" }, Ii = { value: "circle" }, Li = { value: "plain" }, Ri = { class: "tpl:mb-3.5" }, zi = ["value"], Bi = { value: "brand" }, Vi = { value: "dark" }, Hi = { value: "light" }, Ui = { class: "tpl:mb-3.5" }, Wi = { class: "tpl:mb-3.5" }, Gi = { class: "tpl:flex tpl:items-stretch" }, Ki = ["value"], qi = { class: "tpl:mb-3.5" }, Ji = /* @__PURE__ */ w({
|
|
2194
|
-
__name: "SocialToolbar",
|
|
2195
|
-
props: { block: {} },
|
|
2196
|
-
emits: ["update"],
|
|
2197
|
-
setup(e, { emit: n }) {
|
|
2198
|
-
let r = e, i = n, { t: o } = z();
|
|
2199
|
-
function s(e, t) {
|
|
2200
|
-
i("update", { [e]: t });
|
|
2201
|
-
}
|
|
2202
|
-
function c() {
|
|
2203
|
-
let e = {
|
|
2204
|
-
id: O(),
|
|
2205
|
-
platform: "facebook",
|
|
2206
|
-
url: ""
|
|
2207
|
-
};
|
|
2208
|
-
i("update", { icons: [...r.block.icons, e] });
|
|
2209
|
-
}
|
|
2210
|
-
function l(e, t, n) {
|
|
2211
|
-
let a = r.block.icons.map((r) => r.id === e ? {
|
|
2212
|
-
...r,
|
|
2213
|
-
[t]: n
|
|
2214
|
-
} : r);
|
|
2215
|
-
i("update", { icons: a });
|
|
2216
|
-
}
|
|
2217
|
-
function u(e) {
|
|
2218
|
-
i("update", { icons: r.block.icons.filter((t) => t.id !== e) });
|
|
2219
|
-
}
|
|
2220
|
-
return (n, r) => (t(), h(x, null, [
|
|
2221
|
-
m("div", wi, [m("label", { class: y(p(U)) }, v(p(o).social.icons), 3), m("div", Ti, [(t(!0), h(x, null, a(e.block.icons, (e) => (t(), h("div", {
|
|
2222
|
-
key: e.id,
|
|
2223
|
-
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"
|
|
2224
|
-
}, [m("div", Ei, [m("select", {
|
|
2225
|
-
"data-testid": "social-platform-select",
|
|
2226
|
-
class: y([p(K), "tpl:flex-1"]),
|
|
2227
|
-
value: e.platform,
|
|
2228
|
-
onChange: (t) => l(e.id, "platform", t.target.value)
|
|
2229
|
-
}, [(t(!0), h(x, null, a(p(se), (e) => (t(), h("option", {
|
|
2230
|
-
key: e,
|
|
2231
|
-
value: e
|
|
2232
|
-
}, v(p(o).social.platforms[e]), 9, Oi))), 128))], 42, Di), m("button", {
|
|
2233
|
-
class: y(p(ze)),
|
|
2234
|
-
title: p(o).social.removeIcon,
|
|
2235
|
-
onClick: (t) => u(e.id)
|
|
2236
|
-
}, [g(p(Fe), {
|
|
2237
|
-
size: 14,
|
|
2238
|
-
"stroke-width": 2
|
|
2239
|
-
})], 10, ki)]), g(J, {
|
|
2240
|
-
"model-value": e.url,
|
|
2241
|
-
type: "url",
|
|
2242
|
-
placeholder: p(o).social.urlPlaceholder,
|
|
2243
|
-
"onUpdate:modelValue": (t) => l(e.id, "url", t)
|
|
2244
|
-
}, null, 8, [
|
|
2245
|
-
"model-value",
|
|
2246
|
-
"placeholder",
|
|
2247
|
-
"onUpdate:modelValue"
|
|
2248
|
-
])]))), 128)), m("button", {
|
|
2249
|
-
class: y(p(Be)),
|
|
2250
|
-
onClick: c
|
|
2251
|
-
}, [g(p(H), {
|
|
2252
|
-
size: 14,
|
|
2253
|
-
"stroke-width": 2
|
|
2254
|
-
}), _(" " + v(p(o).social.addIcon), 1)], 2)])]),
|
|
2255
|
-
m("div", Ai, [m("label", { class: y(p(U)) }, v(p(o).social.style), 3), m("select", {
|
|
2256
|
-
class: y(p(K)),
|
|
2257
|
-
value: e.block.iconStyle,
|
|
2258
|
-
onChange: r[0] ||= (e) => s("iconStyle", e.target.value)
|
|
2259
|
-
}, [
|
|
2260
|
-
m("option", Mi, v(p(o).social.styleSolid), 1),
|
|
2261
|
-
m("option", Ni, v(p(o).social.styleOutlined), 1),
|
|
2262
|
-
m("option", Pi, v(p(o).social.styleRounded), 1),
|
|
2263
|
-
m("option", Fi, v(p(o).social.styleSquare), 1),
|
|
2264
|
-
m("option", Ii, v(p(o).social.styleCircle), 1),
|
|
2265
|
-
m("option", Li, v(p(o).social.stylePlain), 1)
|
|
2266
|
-
], 42, ji)]),
|
|
2267
|
-
m("div", Ri, [m("label", { class: y(p(U)) }, v(p(o).social.color), 3), m("select", {
|
|
2268
|
-
"data-testid": "social-tone-select",
|
|
2269
|
-
class: y(p(K)),
|
|
2270
|
-
value: e.block.iconTone ?? "brand",
|
|
2271
|
-
onChange: r[1] ||= (e) => s("iconTone", e.target.value)
|
|
2272
|
-
}, [
|
|
2273
|
-
m("option", Bi, v(p(o).social.colorBrand), 1),
|
|
2274
|
-
m("option", Vi, v(p(o).social.colorDark), 1),
|
|
2275
|
-
m("option", Hi, v(p(o).social.colorLight), 1)
|
|
2276
|
-
], 42, zi)]),
|
|
2277
|
-
m("div", Ui, [m("label", { class: y(p(U)) }, v(p(o).social.size), 3), g(Y, {
|
|
2278
|
-
options: [
|
|
2279
|
-
{
|
|
2280
|
-
value: "small",
|
|
2281
|
-
label: p(o).social.sizeSmall
|
|
2282
|
-
},
|
|
2283
|
-
{
|
|
2284
|
-
value: "medium",
|
|
2285
|
-
label: p(o).social.sizeMedium
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
value: "large",
|
|
2289
|
-
label: p(o).social.sizeLarge
|
|
2290
|
-
}
|
|
2291
|
-
],
|
|
2292
|
-
"model-value": e.block.iconSize,
|
|
2293
|
-
"onUpdate:modelValue": r[2] ||= (e) => s("iconSize", e)
|
|
2294
|
-
}, null, 8, ["options", "model-value"])]),
|
|
2295
|
-
m("div", Wi, [m("label", { class: y(p(U)) }, v(p(o).social.spacing), 3), m("div", Gi, [m("input", {
|
|
2296
|
-
type: "number",
|
|
2297
|
-
class: y(p(G)),
|
|
2298
|
-
value: e.block.spacing,
|
|
2299
|
-
min: "0",
|
|
2300
|
-
max: "50",
|
|
2301
|
-
onInput: r[3] ||= (e) => s("spacing", Number(e.target.value))
|
|
2302
|
-
}, null, 42, Ki), m("span", { class: y(p(W)) }, "px", 2)])]),
|
|
2303
|
-
m("div", qi, [m("label", { class: y(p(U)) }, v(p(o).social.align), 3), g(Y, {
|
|
2304
|
-
options: [
|
|
2305
|
-
{
|
|
2306
|
-
value: "left",
|
|
2307
|
-
label: p(o).title.alignLeft,
|
|
2308
|
-
icon: p(Ne)
|
|
2309
|
-
},
|
|
2310
|
-
{
|
|
2311
|
-
value: "center",
|
|
2312
|
-
label: p(o).title.alignCenter,
|
|
2313
|
-
icon: p(Me)
|
|
2314
|
-
},
|
|
2315
|
-
{
|
|
2316
|
-
value: "right",
|
|
2317
|
-
label: p(o).title.alignRight,
|
|
2318
|
-
icon: p(je)
|
|
2319
|
-
}
|
|
2320
|
-
],
|
|
2321
|
-
"model-value": e.block.align,
|
|
2322
|
-
"onUpdate:modelValue": r[4] ||= (e) => s("align", e)
|
|
2323
|
-
}, null, 8, ["options", "model-value"])])
|
|
2324
|
-
], 64));
|
|
2325
|
-
}
|
|
2326
|
-
}), Yi = { class: "tpl:mb-3.5" }, Xi = { class: "tpl:flex tpl:items-stretch" }, Zi = ["value"], Qi = ["value"], $i = /* @__PURE__ */ w({
|
|
2327
|
-
__name: "SpacerToolbar",
|
|
2328
|
-
props: { block: {} },
|
|
2329
|
-
emits: ["update"],
|
|
2330
|
-
setup(e, { emit: n }) {
|
|
2331
|
-
let r = n, { t: i } = z();
|
|
2332
|
-
return (n, a) => (t(), h("div", Yi, [
|
|
2333
|
-
m("label", { class: y(p(U)) }, v(p(i).spacer.height), 3),
|
|
2334
|
-
m("div", Xi, [m("input", {
|
|
2335
|
-
type: "number",
|
|
2336
|
-
class: y(p(G)),
|
|
2337
|
-
value: e.block.height,
|
|
2338
|
-
min: "10",
|
|
2339
|
-
max: "100",
|
|
2340
|
-
onInput: a[0] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2341
|
-
}, null, 42, Zi), m("span", { class: y(p(W)) }, "px", 2)]),
|
|
2342
|
-
m("input", {
|
|
2343
|
-
type: "range",
|
|
2344
|
-
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
2345
|
-
value: e.block.height,
|
|
2346
|
-
min: "10",
|
|
2347
|
-
max: "100",
|
|
2348
|
-
onInput: a[1] ||= (e) => r("update", { height: Number(e.target.value) })
|
|
2349
|
-
}, null, 40, Qi)
|
|
2350
|
-
]));
|
|
2351
|
-
}
|
|
2352
|
-
}), ea = { class: "tpl:mb-3.5" }, ta = { class: "tpl:flex tpl:items-center tpl:gap-3" }, na = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ra = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, ia = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, aa = ["disabled"], oa = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, sa = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, ca = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, la = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ua = ["disabled"], da = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, fa = { class: "tpl:mb-3.5" }, pa = {
|
|
2353
|
-
key: 0,
|
|
2354
|
-
class: "tpl:mb-3.5"
|
|
2355
|
-
}, ma = { class: "tpl:mb-3.5" }, ha = { class: "tpl:mb-3.5" }, ga = { class: "tpl:flex tpl:items-stretch" }, _a = ["value"], va = { class: "tpl:mb-3.5" }, ya = { class: "tpl:flex tpl:items-stretch" }, ba = ["value"], xa = { class: "tpl:mb-3.5" }, Sa = ["value"], Ca = { value: "" }, wa = ["value"], Ta = { class: "tpl:mb-3.5" }, Ea = { class: "tpl:flex tpl:items-stretch" }, Da = ["value"], Oa = { class: "tpl:mb-3.5" }, ka = { class: "tpl:mb-3.5" }, Aa = /* @__PURE__ */ w({
|
|
2356
|
-
__name: "TableToolbar",
|
|
2357
|
-
props: {
|
|
2358
|
-
block: {},
|
|
2359
|
-
fontFamilies: {}
|
|
2360
|
-
},
|
|
2361
|
-
emits: ["update"],
|
|
2362
|
-
setup(e, { emit: n }) {
|
|
2363
|
-
let r = e, i = n, { t: o } = z(), s = S(() => r.block.rows.length > 0 ? r.block.rows[0].cells.length : 0);
|
|
2364
|
-
function c(e, t) {
|
|
2365
|
-
i("update", { [e]: t });
|
|
2366
|
-
}
|
|
2367
|
-
function l() {
|
|
2368
|
-
let e = r.block.rows.length > 0 ? r.block.rows[0].cells.length : 3, t = {
|
|
2369
|
-
id: O(),
|
|
2370
|
-
cells: Array.from({ length: e }, () => ({
|
|
2371
|
-
id: O(),
|
|
2372
|
-
content: ""
|
|
2373
|
-
}))
|
|
2374
|
-
};
|
|
2375
|
-
i("update", { rows: [...r.block.rows, t] });
|
|
2376
|
-
}
|
|
2377
|
-
function u(e) {
|
|
2378
|
-
i("update", { rows: r.block.rows.filter((t) => t.id !== e) });
|
|
2379
|
-
}
|
|
2380
|
-
function d() {
|
|
2381
|
-
let e = r.block.rows.map((e) => ({
|
|
2382
|
-
...e,
|
|
2383
|
-
cells: [...e.cells, {
|
|
2384
|
-
id: O(),
|
|
2385
|
-
content: ""
|
|
2386
|
-
}]
|
|
2387
|
-
}));
|
|
2388
|
-
i("update", { rows: e });
|
|
2389
|
-
}
|
|
2390
|
-
function f(e) {
|
|
2391
|
-
let t = r.block.rows.map((t) => ({
|
|
2392
|
-
...t,
|
|
2393
|
-
cells: t.cells.filter((t, n) => n !== e)
|
|
2394
|
-
}));
|
|
2395
|
-
i("update", { rows: t });
|
|
2396
|
-
}
|
|
2397
|
-
return (n, r) => (t(), h(x, null, [
|
|
2398
|
-
m("div", ea, [m("label", { class: y(p(U)) }, v(p(o).table.dimensions), 3), m("div", ta, [m("div", na, [m("span", ra, v(p(o).table.rows), 1), m("div", ia, [
|
|
2399
|
-
m("button", {
|
|
2400
|
-
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",
|
|
2401
|
-
disabled: e.block.rows.length <= 1,
|
|
2402
|
-
onClick: r[0] ||= (t) => u(e.block.rows[e.block.rows.length - 1].id)
|
|
2403
|
-
}, [g(p(V), {
|
|
2404
|
-
size: 12,
|
|
2405
|
-
"stroke-width": 2
|
|
2406
|
-
})], 8, aa),
|
|
2407
|
-
m("span", oa, v(e.block.rows.length), 1),
|
|
2408
|
-
m("button", {
|
|
2409
|
-
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)]",
|
|
2410
|
-
onClick: l
|
|
2411
|
-
}, [g(p(H), {
|
|
2412
|
-
size: 12,
|
|
2413
|
-
"stroke-width": 2
|
|
2414
|
-
})])
|
|
2415
|
-
])]), m("div", sa, [m("span", ca, v(p(o).table.columns), 1), m("div", la, [
|
|
2416
|
-
m("button", {
|
|
2417
|
-
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",
|
|
2418
|
-
disabled: s.value <= 1,
|
|
2419
|
-
onClick: r[1] ||= (e) => f(s.value - 1)
|
|
2420
|
-
}, [g(p(V), {
|
|
2421
|
-
size: 12,
|
|
2422
|
-
"stroke-width": 2
|
|
2423
|
-
})], 8, ua),
|
|
2424
|
-
m("span", da, v(s.value), 1),
|
|
2425
|
-
m("button", {
|
|
2426
|
-
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)]",
|
|
2427
|
-
onClick: d
|
|
2428
|
-
}, [g(p(H), {
|
|
2429
|
-
size: 12,
|
|
2430
|
-
"stroke-width": 2
|
|
2431
|
-
})])
|
|
2432
|
-
])])])]),
|
|
2433
|
-
m("div", fa, [g(q, {
|
|
2434
|
-
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
2435
|
-
"model-value": e.block.hasHeaderRow,
|
|
2436
|
-
label: p(o).table.hasHeaderRow,
|
|
2437
|
-
"onUpdate:modelValue": r[2] ||= (e) => c("hasHeaderRow", e)
|
|
2438
|
-
}, null, 8, ["model-value", "label"])]),
|
|
2439
|
-
e.block.hasHeaderRow ? (t(), h("div", pa, [m("label", { class: y(p(U)) }, v(p(o).table.headerBackgroundColor), 3), g(B, {
|
|
2440
|
-
"model-value": e.block.headerBackgroundColor ?? "",
|
|
2441
|
-
"seed-color": p(Ve),
|
|
2442
|
-
placeholder: p(o).table.noHeaderBg,
|
|
2443
|
-
"onUpdate:modelValue": r[3] ||= (e) => c("headerBackgroundColor", e || null)
|
|
2444
|
-
}, null, 8, [
|
|
2445
|
-
"model-value",
|
|
2446
|
-
"seed-color",
|
|
2447
|
-
"placeholder"
|
|
2448
|
-
])])) : C("", !0),
|
|
2449
|
-
m("div", ma, [m("label", { class: y(p(U)) }, v(p(o).table.borderColor), 3), g(B, {
|
|
2450
|
-
"model-value": e.block.borderColor,
|
|
2451
|
-
"onUpdate:modelValue": r[4] ||= (e) => c("borderColor", e)
|
|
2452
|
-
}, null, 8, ["model-value"])]),
|
|
2453
|
-
m("div", ha, [m("label", { class: y(p(U)) }, v(p(o).table.borderWidth), 3), m("div", ga, [m("input", {
|
|
2454
|
-
type: "number",
|
|
2455
|
-
class: y(p(G)),
|
|
2456
|
-
value: e.block.borderWidth,
|
|
2457
|
-
min: "0",
|
|
2458
|
-
max: "10",
|
|
2459
|
-
onInput: r[5] ||= (e) => c("borderWidth", Number(e.target.value))
|
|
2460
|
-
}, null, 42, _a), m("span", { class: y(p(W)) }, "px", 2)])]),
|
|
2461
|
-
m("div", va, [m("label", { class: y(p(U)) }, v(p(o).table.cellPadding), 3), m("div", ya, [m("input", {
|
|
2462
|
-
type: "number",
|
|
2463
|
-
class: y(p(G)),
|
|
2464
|
-
value: e.block.cellPadding,
|
|
2465
|
-
min: "0",
|
|
2466
|
-
max: "30",
|
|
2467
|
-
onInput: r[6] ||= (e) => c("cellPadding", Number(e.target.value))
|
|
2468
|
-
}, null, 42, ba), m("span", { class: y(p(W)) }, "px", 2)])]),
|
|
2469
|
-
m("div", xa, [m("label", { class: y(p(U)) }, v(p(o).table.fontFamily), 3), m("select", {
|
|
2470
|
-
class: y(p(K)),
|
|
2471
|
-
value: p(Ge)(e.block.fontFamily),
|
|
2472
|
-
onChange: r[7] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2473
|
-
}, [m("option", Ca, v(p(o).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
|
|
2474
|
-
key: e.value,
|
|
2475
|
-
value: e.value
|
|
2476
|
-
}, v(e.label), 9, wa))), 128))], 42, Sa)]),
|
|
2477
|
-
m("div", Ta, [m("label", { class: y(p(U)) }, v(p(o).table.fontSize), 3), m("div", Ea, [m("input", {
|
|
2478
|
-
type: "number",
|
|
2479
|
-
class: y(p(G)),
|
|
2480
|
-
value: e.block.fontSize,
|
|
2481
|
-
min: "10",
|
|
2482
|
-
max: "32",
|
|
2483
|
-
onInput: r[8] ||= (e) => c("fontSize", Number(e.target.value))
|
|
2484
|
-
}, null, 42, Da), m("span", { class: y(p(W)) }, "px", 2)])]),
|
|
2485
|
-
m("div", Oa, [m("label", { class: y(p(U)) }, v(p(o).table.color), 3), g(B, {
|
|
2486
|
-
"model-value": e.block.color ?? "",
|
|
2487
|
-
"onUpdate:modelValue": r[9] ||= (e) => c("color", e || void 0)
|
|
2488
|
-
}, null, 8, ["model-value"])]),
|
|
2489
|
-
m("div", ka, [m("label", { class: y(p(U)) }, v(p(o).table.textAlign), 3), g(Y, {
|
|
2490
|
-
options: [
|
|
2491
|
-
{
|
|
2492
|
-
value: "left",
|
|
2493
|
-
label: p(o).title.alignLeft,
|
|
2494
|
-
icon: p(Ne)
|
|
2495
|
-
},
|
|
2496
|
-
{
|
|
2497
|
-
value: "center",
|
|
2498
|
-
label: p(o).title.alignCenter,
|
|
2499
|
-
icon: p(Me)
|
|
2500
|
-
},
|
|
2501
|
-
{
|
|
2502
|
-
value: "right",
|
|
2503
|
-
label: p(o).title.alignRight,
|
|
2504
|
-
icon: p(je)
|
|
2505
|
-
}
|
|
2506
|
-
],
|
|
2507
|
-
"model-value": e.block.textAlign,
|
|
2508
|
-
"onUpdate:modelValue": r[10] ||= (e) => c("textAlign", e)
|
|
2509
|
-
}, null, 8, ["options", "model-value"])])
|
|
2510
|
-
], 64));
|
|
2511
|
-
}
|
|
2512
|
-
}), ja = { class: "tpl:mb-3.5" }, Ma = ["value"], Na = { value: 1 }, Pa = { value: 2 }, Fa = { value: 3 }, Ia = { value: 4 }, La = { class: "tpl:mb-3.5" }, Ra = ["value"], za = { value: "" }, Ba = ["value"], Va = { class: "tpl:mb-3.5" }, Ha = { class: "tpl:mb-3.5" }, Ua = /* @__PURE__ */ w({
|
|
2513
|
-
__name: "TitleToolbar",
|
|
2514
|
-
props: {
|
|
2515
|
-
block: {},
|
|
2516
|
-
fontFamilies: {}
|
|
2517
|
-
},
|
|
2518
|
-
emits: ["update"],
|
|
2519
|
-
setup(e, { emit: n }) {
|
|
2520
|
-
let r = n, { t: i } = z();
|
|
2521
|
-
function o(e, t) {
|
|
2522
|
-
r("update", { [e]: t });
|
|
2523
|
-
}
|
|
2524
|
-
return (n, r) => (t(), h(x, null, [
|
|
2525
|
-
m("div", ja, [m("label", { class: y(p(U)) }, v(p(i).title.level), 3), m("select", {
|
|
2526
|
-
class: y(p(K)),
|
|
2527
|
-
value: e.block.level,
|
|
2528
|
-
onChange: r[0] ||= (e) => o("level", Number(e.target.value))
|
|
2529
|
-
}, [
|
|
2530
|
-
m("option", Na, v(p(i).title.heading1), 1),
|
|
2531
|
-
m("option", Pa, v(p(i).title.heading2), 1),
|
|
2532
|
-
m("option", Fa, v(p(i).title.heading3), 1),
|
|
2533
|
-
m("option", Ia, v(p(i).title.heading4), 1)
|
|
2534
|
-
], 42, Ma)]),
|
|
2535
|
-
m("div", La, [m("label", { class: y(p(U)) }, v(p(i).title.fontFamily), 3), m("select", {
|
|
2536
|
-
class: y(p(K)),
|
|
2537
|
-
value: p(Ge)(e.block.fontFamily),
|
|
2538
|
-
onChange: r[1] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
2539
|
-
}, [m("option", za, v(p(i).title.inheritFont), 1), (t(!0), h(x, null, a(e.fontFamilies, (e) => (t(), h("option", {
|
|
2540
|
-
key: e.value,
|
|
2541
|
-
value: e.value
|
|
2542
|
-
}, v(e.label), 9, Ba))), 128))], 42, Ra)]),
|
|
2543
|
-
m("div", Va, [m("label", { class: y(p(U)) }, v(p(i).title.color), 3), g(B, {
|
|
2544
|
-
"model-value": e.block.color ?? "",
|
|
2545
|
-
"onUpdate:modelValue": r[2] ||= (e) => o("color", e || void 0)
|
|
2546
|
-
}, null, 8, ["model-value"])]),
|
|
2547
|
-
m("div", Ha, [m("label", { class: y(p(U)) }, v(p(i).title.align), 3), g(Y, {
|
|
2548
|
-
options: [
|
|
2549
|
-
{
|
|
2550
|
-
value: "left",
|
|
2551
|
-
label: p(i).title.alignLeft,
|
|
2552
|
-
icon: p(Ne)
|
|
2553
|
-
},
|
|
2554
|
-
{
|
|
2555
|
-
value: "center",
|
|
2556
|
-
label: p(i).title.alignCenter,
|
|
2557
|
-
icon: p(Me)
|
|
2558
|
-
},
|
|
2559
|
-
{
|
|
2560
|
-
value: "right",
|
|
2561
|
-
label: p(i).title.alignRight,
|
|
2562
|
-
icon: p(je)
|
|
2563
|
-
}
|
|
2564
|
-
],
|
|
2565
|
-
"model-value": e.block.textAlign,
|
|
2566
|
-
"onUpdate:modelValue": r[3] ||= (e) => o("textAlign", e)
|
|
2567
|
-
}, null, 8, ["options", "model-value"])])
|
|
2568
|
-
], 64));
|
|
2569
|
-
}
|
|
2570
|
-
}), Wa = { class: "tpl:mb-3.5" }, Ga = {
|
|
2571
|
-
key: 0,
|
|
2572
|
-
class: "tpl:mb-3.5"
|
|
2573
|
-
}, Ka = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, qa = [
|
|
2574
|
-
"value",
|
|
2575
|
-
"placeholder",
|
|
2576
|
-
"title"
|
|
2577
|
-
], Ja = { class: "tpl:mb-3.5" }, Ya = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, Xa = { class: "tpl:mb-3.5" }, Za = { class: "tpl:mb-3.5" }, Qa = ["value"], $a = { value: "full" }, eo = { value: "custom" }, to = {
|
|
2578
|
-
key: 0,
|
|
2579
|
-
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2580
|
-
}, no = ["value"], ro = { class: "tpl:mb-3.5" }, io = ["value"], ao = { value: "auto" }, oo = { value: "custom" }, so = {
|
|
2581
|
-
key: 0,
|
|
2582
|
-
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2583
|
-
}, co = ["value"], lo = { class: "tpl:mb-3.5" }, uo = 350, fo = 200, po = /* @__PURE__ */ w({
|
|
2584
|
-
__name: "VideoToolbar",
|
|
2585
|
-
props: { block: {} },
|
|
2586
|
-
emits: ["update"],
|
|
2587
|
-
setup(e, { emit: n }) {
|
|
2588
|
-
let r = e, i = n, { t: a } = z(), o = c(pe, null), s = c(me, ee.liquid), l = Le(), u = [
|
|
2589
|
-
300,
|
|
2590
|
-
400,
|
|
2591
|
-
500
|
|
2592
|
-
], f = S(() => !!o), w = S(() => k(r.block.url, s)), T = S(() => {
|
|
2593
|
-
let e = r.block.width;
|
|
2594
|
-
return e === "full" ? "full" : u.includes(e) ? String(e) : "custom";
|
|
2595
|
-
}), E = S(() => typeof r.block.height == "number" ? "custom" : "auto"), D = d(!1), { start: O } = le(() => {
|
|
2596
|
-
D.value = !1;
|
|
2597
|
-
}, 1e3, { immediate: !1 });
|
|
2598
|
-
function A(e, t) {
|
|
2599
|
-
i("update", { [e]: t });
|
|
2600
|
-
}
|
|
2601
|
-
function j(e) {
|
|
2602
|
-
if (e === "custom") {
|
|
2603
|
-
let e = r.block.width;
|
|
2604
|
-
(typeof e != "number" || u.includes(e)) && A("width", uo);
|
|
2605
|
-
} else A("width", e === "full" ? "full" : Number(e));
|
|
2606
|
-
}
|
|
2607
|
-
function M(e) {
|
|
2608
|
-
let t = Number(e);
|
|
2609
|
-
!Number.isFinite(t) || t <= 0 || A("width", t);
|
|
2610
|
-
}
|
|
2611
|
-
function N(e) {
|
|
2612
|
-
A("height", e === "custom" ? fo : void 0);
|
|
2613
|
-
}
|
|
2614
|
-
function P(e) {
|
|
2615
|
-
let t = Number(e);
|
|
2616
|
-
!Number.isFinite(t) || t <= 0 || A("height", t);
|
|
2617
|
-
}
|
|
2618
|
-
async function F() {
|
|
2619
|
-
let e = await o?.({ accept: ["images"] });
|
|
2620
|
-
l.alive && e && (A("thumbnailUrl", e.url), D.value = !0, O());
|
|
2621
|
-
}
|
|
2622
|
-
return (n, r) => (t(), h(x, null, [
|
|
2623
|
-
m("div", Wa, [
|
|
2624
|
-
m("label", { class: y(p(U)) }, v(p(a).video.videoUrl), 3),
|
|
2625
|
-
g(J, {
|
|
2626
|
-
"model-value": e.block.url,
|
|
2627
|
-
type: "url",
|
|
2628
|
-
placeholder: p(a).video.videoUrlPlaceholder,
|
|
2629
|
-
"onUpdate:modelValue": r[0] ||= (e) => A("url", e)
|
|
2630
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
2631
|
-
e.block.url ? (t(), b(q, {
|
|
2632
|
-
key: 0,
|
|
2633
|
-
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2634
|
-
"model-value": e.block.openInNewTab ?? !1,
|
|
2635
|
-
label: p(a).video.openInNewTab,
|
|
2636
|
-
"onUpdate:modelValue": r[1] ||= (e) => A("openInNewTab", e)
|
|
2637
|
-
}, null, 8, ["model-value", "label"])) : C("", !0)
|
|
2638
|
-
]),
|
|
2639
|
-
w.value ? (t(), h("div", Ga, [m("label", { class: y(p(U)) }, [_(v(p(a).video.placeholderUrl) + " ", 1), m("span", Ka, v(p(a).video.optional), 1)], 2), m("input", {
|
|
2640
|
-
type: "url",
|
|
2641
|
-
class: y(p(K)),
|
|
2642
|
-
value: e.block.placeholderUrl || "",
|
|
2643
|
-
placeholder: p(a).video.placeholderUrlPlaceholder,
|
|
2644
|
-
title: p(a).video.placeholderUrlTooltip,
|
|
2645
|
-
onInput: r[2] ||= (e) => A("placeholderUrl", e.target.value)
|
|
2646
|
-
}, null, 42, qa)])) : C("", !0),
|
|
2647
|
-
m("div", Ja, [
|
|
2648
|
-
m("label", { class: y(p(U)) }, [_(v(p(a).video.customThumbnail) + " ", 1), m("span", Ya, v(p(a).video.optional), 1)], 2),
|
|
2649
|
-
g(J, {
|
|
2650
|
-
"model-value": e.block.thumbnailUrl,
|
|
2651
|
-
type: "url",
|
|
2652
|
-
placeholder: p(a).video.thumbnailPlaceholder,
|
|
2653
|
-
pulse: D.value,
|
|
2654
|
-
"onUpdate:modelValue": r[3] ||= (e) => A("thumbnailUrl", e)
|
|
2655
|
-
}, null, 8, [
|
|
2656
|
-
"model-value",
|
|
2657
|
-
"placeholder",
|
|
2658
|
-
"pulse"
|
|
2659
|
-
]),
|
|
2660
|
-
f.value ? (t(), h("button", {
|
|
2661
|
-
key: 0,
|
|
2662
|
-
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",
|
|
2663
|
-
style: {
|
|
2664
|
-
"border-color": "var(--tpl-border)",
|
|
2665
|
-
color: "var(--tpl-primary)",
|
|
2666
|
-
"background-color": "var(--tpl-bg)"
|
|
2667
|
-
},
|
|
2668
|
-
onClick: F
|
|
2669
|
-
}, [g(p(ae), {
|
|
2670
|
-
size: 14,
|
|
2671
|
-
"stroke-width": 1.5
|
|
2672
|
-
}), _(" " + v(p(a).image.browseMedia), 1)])) : C("", !0)
|
|
2673
|
-
]),
|
|
2674
|
-
m("div", Xa, [m("label", { class: y(p(U)) }, v(p(a).video.altText), 3), g(J, {
|
|
2675
|
-
"model-value": e.block.alt,
|
|
2676
|
-
type: "text",
|
|
2677
|
-
placeholder: p(a).video.altTextPlaceholder,
|
|
2678
|
-
"onUpdate:modelValue": r[4] ||= (e) => A("alt", e)
|
|
2679
|
-
}, null, 8, ["model-value", "placeholder"])]),
|
|
2680
|
-
m("div", Za, [
|
|
2681
|
-
m("label", { class: y(p(U)) }, v(p(a).video.width), 3),
|
|
2682
|
-
m("select", {
|
|
2683
|
-
class: y(p(K)),
|
|
2684
|
-
"data-testid": "video-width-mode",
|
|
2685
|
-
value: T.value,
|
|
2686
|
-
onChange: r[5] ||= (e) => j(e.target.value)
|
|
2687
|
-
}, [
|
|
2688
|
-
m("option", $a, v(p(a).video.fullWidth), 1),
|
|
2689
|
-
r[10] ||= m("option", { value: "300" }, "300px", -1),
|
|
2690
|
-
r[11] ||= m("option", { value: "400" }, "400px", -1),
|
|
2691
|
-
r[12] ||= m("option", { value: "500" }, "500px", -1),
|
|
2692
|
-
m("option", eo, v(p(a).video.widthCustom), 1)
|
|
2693
|
-
], 42, Qa),
|
|
2694
|
-
T.value === "custom" ? (t(), h("div", to, [m("input", {
|
|
2695
|
-
type: "number",
|
|
2696
|
-
"data-testid": "video-width-input",
|
|
2697
|
-
class: y(p(G)),
|
|
2698
|
-
value: e.block.width,
|
|
2699
|
-
min: "20",
|
|
2700
|
-
onInput: r[6] ||= (e) => M(e.target.value)
|
|
2701
|
-
}, null, 42, no), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
|
|
2702
|
-
]),
|
|
2703
|
-
m("div", ro, [
|
|
2704
|
-
m("label", { class: y(p(U)) }, v(p(a).video.height), 3),
|
|
2705
|
-
m("select", {
|
|
2706
|
-
class: y(p(K)),
|
|
2707
|
-
"data-testid": "video-height-mode",
|
|
2708
|
-
value: E.value,
|
|
2709
|
-
onChange: r[7] ||= (e) => N(e.target.value)
|
|
2710
|
-
}, [m("option", ao, v(p(a).video.heightAuto), 1), m("option", oo, v(p(a).video.heightCustom), 1)], 42, io),
|
|
2711
|
-
E.value === "custom" ? (t(), h("div", so, [m("input", {
|
|
2712
|
-
type: "number",
|
|
2713
|
-
"data-testid": "video-height-input",
|
|
2714
|
-
class: y(p(G)),
|
|
2715
|
-
value: e.block.height,
|
|
2716
|
-
min: "20",
|
|
2717
|
-
onInput: r[8] ||= (e) => P(e.target.value)
|
|
2718
|
-
}, null, 42, co), m("span", { class: y(p(W)) }, "px", 2)])) : C("", !0)
|
|
2719
|
-
]),
|
|
2720
|
-
m("div", lo, [m("label", { class: y(p(U)) }, v(p(a).title.align), 3), g(Y, {
|
|
2721
|
-
options: [
|
|
2722
|
-
{
|
|
2723
|
-
value: "left",
|
|
2724
|
-
label: p(a).title.alignLeft
|
|
2725
|
-
},
|
|
2726
|
-
{
|
|
2727
|
-
value: "center",
|
|
2728
|
-
label: p(a).title.alignCenter
|
|
2729
|
-
},
|
|
2730
|
-
{
|
|
2731
|
-
value: "right",
|
|
2732
|
-
label: p(a).title.alignRight
|
|
2733
|
-
}
|
|
2734
|
-
],
|
|
2735
|
-
"model-value": e.block.align,
|
|
2736
|
-
"onUpdate:modelValue": r[9] ||= (e) => A("align", e)
|
|
2737
|
-
}, null, 8, ["options", "model-value"])])
|
|
2738
|
-
], 64));
|
|
2739
|
-
}
|
|
2740
|
-
}), mo = ["aria-label"], ho = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, go = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, _o = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vo = { class: "tpl:flex tpl:gap-1" }, yo = ["title"], bo = ["title"], xo = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, So = /*@__PURE__*/ w({
|
|
2741
|
-
__name: "Toolbar",
|
|
2742
|
-
props: { block: {} },
|
|
2743
|
-
emits: [
|
|
2744
|
-
"update",
|
|
2745
|
-
"delete",
|
|
2746
|
-
"duplicate"
|
|
2747
|
-
],
|
|
2748
|
-
setup(e, { emit: n }) {
|
|
2749
|
-
let r = f(() => import("./CountdownToolbar-DVuucA3v.js")), a = e, o = n, { t: s } = z(), l = ue(ye, "Toolbar"), u = c(ve, []), d = S(() => a.block.type), _ = S(() => D(a.block)), y = S(() => {
|
|
2750
|
-
if (_.value) return u.find((e) => e.type === a.block.customType);
|
|
2751
|
-
}), x = S(() => _.value ? y.value?.name ?? a.block.customType : oe(d.value, s)), w = S(() => We(l.fonts.value, "fontFamily" in a.block ? a.block.fontFamily : void 0));
|
|
2752
|
-
function T(e) {
|
|
2753
|
-
o("update", e);
|
|
2754
|
-
}
|
|
2755
|
-
return (n, a) => (t(), h("aside", {
|
|
2756
|
-
"data-testid": "block-toolbar",
|
|
2757
|
-
"aria-label": p(s).landmarks.blockToolbar,
|
|
2758
|
-
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
2759
|
-
}, [m("div", ho, [m("div", go, [p(we)[d.value] ? (t(), b(i(p(we)[d.value]), {
|
|
2760
|
-
key: 0,
|
|
2761
|
-
size: 16,
|
|
2762
|
-
"stroke-width": 1.5
|
|
2763
|
-
})) : _.value ? (t(), b(p(ce), {
|
|
2764
|
-
key: 1,
|
|
2765
|
-
size: 16,
|
|
2766
|
-
"stroke-width": 1.5
|
|
2767
|
-
})) : C("", !0), m("h3", _o, v(x.value), 1)]), m("div", vo, [m("button", {
|
|
2768
|
-
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)]",
|
|
2769
|
-
title: p(s).toolbar.duplicate,
|
|
2770
|
-
onClick: a[0] ||= (e) => o("duplicate")
|
|
2771
|
-
}, [g(p(Te), {
|
|
2772
|
-
size: 14,
|
|
2773
|
-
"stroke-width": 2
|
|
2774
|
-
})], 8, yo), m("button", {
|
|
2775
|
-
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)]",
|
|
2776
|
-
title: p(s).toolbar.delete,
|
|
2777
|
-
onClick: a[1] ||= (e) => o("delete")
|
|
2778
|
-
}, [g(p(Pe), {
|
|
2779
|
-
size: 14,
|
|
2780
|
-
"stroke-width": 2
|
|
2781
|
-
})], 8, bo)])]), m("div", xo, [_.value ? (t(), b(vr, {
|
|
2782
|
-
key: 0,
|
|
2783
|
-
block: e.block,
|
|
2784
|
-
onUpdateFieldValues: a[2] ||= (e) => o("update", { fieldValues: e }),
|
|
2785
|
-
onUpdateDataSourceFetched: a[3] ||= (e) => o("update", { dataSourceFetched: e })
|
|
2786
|
-
}, null, 8, ["block"])) : d.value === "section" ? (t(), b(Ci, {
|
|
2787
|
-
key: 1,
|
|
2788
|
-
block: e.block,
|
|
2789
|
-
onUpdate: T
|
|
2790
|
-
}, null, 8, ["block"])) : d.value === "title" ? (t(), b(Ua, {
|
|
2791
|
-
key: 2,
|
|
2792
|
-
block: e.block,
|
|
2793
|
-
"font-families": w.value,
|
|
2794
|
-
onUpdate: T
|
|
2795
|
-
}, null, 8, ["block", "font-families"])) : d.value === "paragraph" ? (t(), b(pi, {
|
|
2796
|
-
key: 3,
|
|
2797
|
-
block: e.block,
|
|
2798
|
-
onUpdate: T
|
|
2799
|
-
}, null, 8, ["block"])) : d.value === "image" ? (t(), b(Zr, {
|
|
2800
|
-
key: 4,
|
|
2801
|
-
block: e.block,
|
|
2802
|
-
onUpdate: T
|
|
2803
|
-
}, null, 8, ["block"])) : d.value === "video" ? (t(), b(po, {
|
|
2804
|
-
key: 5,
|
|
2805
|
-
block: e.block,
|
|
2806
|
-
onUpdate: T
|
|
2807
|
-
}, null, 8, ["block"])) : d.value === "button" ? (t(), b(Pt, {
|
|
2808
|
-
key: 6,
|
|
2809
|
-
block: e.block,
|
|
2810
|
-
"font-families": w.value,
|
|
2811
|
-
onUpdate: T
|
|
2812
|
-
}, null, 8, ["block", "font-families"])) : d.value === "divider" ? (t(), b(wr, {
|
|
2813
|
-
key: 7,
|
|
2814
|
-
block: e.block,
|
|
2815
|
-
onUpdate: T
|
|
2816
|
-
}, null, 8, ["block"])) : d.value === "social" ? (t(), b(Ji, {
|
|
2817
|
-
key: 8,
|
|
2818
|
-
block: e.block,
|
|
2819
|
-
onUpdate: T
|
|
2820
|
-
}, null, 8, ["block"])) : d.value === "menu" ? (t(), b(li, {
|
|
2821
|
-
key: 9,
|
|
2822
|
-
block: e.block,
|
|
2823
|
-
"font-families": w.value,
|
|
2824
|
-
onUpdate: T
|
|
2825
|
-
}, null, 8, ["block", "font-families"])) : d.value === "table" ? (t(), b(Aa, {
|
|
2826
|
-
key: 10,
|
|
2827
|
-
block: e.block,
|
|
2828
|
-
"font-families": w.value,
|
|
2829
|
-
onUpdate: T
|
|
2830
|
-
}, null, 8, ["block", "font-families"])) : d.value === "spacer" ? (t(), b($i, {
|
|
2831
|
-
key: 11,
|
|
2832
|
-
block: e.block,
|
|
2833
|
-
onUpdate: T
|
|
2834
|
-
}, null, 8, ["block"])) : d.value === "html" ? (t(), b(Or, {
|
|
2835
|
-
key: 12,
|
|
2836
|
-
block: e.block,
|
|
2837
|
-
onUpdate: T
|
|
2838
|
-
}, null, 8, ["block"])) : d.value === "countdown" ? (t(), b(p(r), {
|
|
2839
|
-
key: 13,
|
|
2840
|
-
block: e.block,
|
|
2841
|
-
"font-families": w.value,
|
|
2842
|
-
onUpdate: T
|
|
2843
|
-
}, null, 8, ["block", "font-families"])) : C("", !0), g(Pn, {
|
|
2844
|
-
block: e.block,
|
|
2845
|
-
"is-first-section": d.value === "paragraph",
|
|
2846
|
-
onUpdate: T
|
|
2847
|
-
}, null, 8, ["block", "is-first-section"])])], 8, mo));
|
|
2848
|
-
}
|
|
2849
|
-
}), Co = /* @__PURE__ */ e({ default: () => wo }), wo = /*#__PURE__*/ Ie(So, [["__scopeId", "data-v-e2d2c22f"]]);
|
|
2850
|
-
//#endregion
|
|
2851
|
-
export { wo as default, Y as i, $ as n, X as r, Co as t };
|