@templatical/editor 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-BYMdVldY.js → AiChatSidebar-c-3yyjN1.js} +14 -14
- package/dist/{AiFeatureMenu-BhHhnu9G.js → AiFeatureMenu-B-COyG7k.js} +7 -7
- package/dist/{BlockIssueBadge-De36PJC4.js → BlockIssueBadge-Buk3_6QF.js} +5 -5
- package/dist/{BlockPreviewCanvas-BxSoA1QV.js → BlockPreviewCanvas-CJPHGI93.js} +3 -3
- package/dist/{CloudEditor-BXfuytQj.js → CloudEditor-BdSQ8hfv.js} +26 -26
- package/dist/{CollaboratorBar-D9AfWRTH.js → CollaboratorBar-mGoi6yye.js} +4 -4
- package/dist/{ColorPicker-VPq4ASC8.js → ColorPicker-ClETsjA3.js} +6 -6
- package/dist/{CommentsSidebar-C8BLy3Pr.js → CommentsSidebar-CdRCCSDD.js} +15 -15
- package/dist/{CountdownBlock-Bs2Q_bFX.js → CountdownBlock-DuyvGcr8.js} +3 -3
- package/dist/{CountdownToolbar-Cic6cdOw.js → CountdownToolbar-CBE9wRaV.js} +4 -4
- package/dist/{DesignReferenceSidebar-k-26nkJI.js → DesignReferenceSidebar-CgYkySre.js} +11 -11
- package/dist/{IssuesPanel-NPzwTPYW.js → IssuesPanel-Do7RLXsP.js} +8 -8
- package/dist/{LoadingTrack-DH3OEM3z.js → LoadingTrack-BexpNuTV.js} +1 -1
- package/dist/{MergeTagModeToggle-DEGyx8tw.js → MergeTagModeToggle-hAJgIKhw.js} +6 -6
- package/dist/{MergeTagSuggestion-DvisJ9im.js → MergeTagSuggestion-BJ43ihWR.js} +34 -32
- package/dist/{NumberWithSuffix-CuHCIwSn.js → NumberWithSuffix-D37ZWiZh.js} +2 -2
- package/dist/{ParagraphEditor-DK_IPi9H.js → ParagraphEditor-DBG63S70.js} +74 -80
- package/dist/{RichTextEditorContent-DznIQcdY.js → RichTextEditorContent-fbYJXAio.js} +8 -8
- package/dist/{SaveBlockDialog-R9PbMsy-.js → SaveBlockDialog-Dq9UVihi.js} +10 -10
- package/dist/{SavedBlocksBrowserModal-ttPAklPE.js → SavedBlocksBrowserModal-CtFG4zeV.js} +11 -11
- package/dist/{SavedBlocksPanels-BCwQgKLF.js → SavedBlocksPanels-DNVdso_W.js} +2 -2
- package/dist/{SavedBlocksPickBar-DD5Ddv9t.js → SavedBlocksPickBar-Cv4dIpP-.js} +4 -4
- package/dist/{SnapshotHistory-BXSTGgBh.js → SnapshotHistory-DsOtMHOV.js} +10 -10
- package/dist/{TemplateScoringPanel-Ue6Dfnjb.js → TemplateScoringPanel-BZUsb3FD.js} +15 -15
- package/dist/{TestEmailModal-KPFc5oSv.js → TestEmailModal-CIwqtGfr.js} +11 -11
- package/dist/{TestEmailPanel-b8GHTrnE.js → TestEmailPanel-l6LDmBGM.js} +2 -2
- package/dist/{TitleEditor-8ln7UBr_.js → TitleEditor-imoBUynh.js} +12 -12
- package/dist/{TplModal-D_FA3Wm3.js → TplModal-DDDHcoir.js} +5 -5
- package/dist/{blockTypeIcons-BoZeK6l7.js → blockTypeIcons-CfLN4A6t.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatSidebar-D6jGwb4y.js → AiChatSidebar-BHqNxNcX.js} +35 -35
- package/dist/cdn/chunks/{AiChatSidebar-D6jGwb4y.js.map → AiChatSidebar-BHqNxNcX.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-BtEcjxLL.js → AiFeatureMenu-D2AIDwEG.js} +13 -13
- package/dist/cdn/chunks/{AiFeatureMenu-BtEcjxLL.js.map → AiFeatureMenu-D2AIDwEG.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-dnqZk6pl.js → BlockIssueBadge-BEEY9o2o.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-dnqZk6pl.js.map → BlockIssueBadge-BEEY9o2o.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-D8pfTFWi.js → BlockPreviewCanvas-DH5ULGkw.js} +22 -22
- package/dist/cdn/chunks/{BlockPreviewCanvas-D8pfTFWi.js.map → BlockPreviewCanvas-DH5ULGkw.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-BJ4-pPAl.js → CloudEditor-C0nB1JfD.js} +67 -67
- package/dist/cdn/chunks/{CloudEditor-BJ4-pPAl.js.map → CloudEditor-C0nB1JfD.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-SeUOuLeJ.js → CollaboratorBar-f6Ni7KNH.js} +12 -12
- package/dist/cdn/chunks/{CollaboratorBar-SeUOuLeJ.js.map → CollaboratorBar-f6Ni7KNH.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-yxvrro60.js → ColorPicker-W_UyiVGc.js} +131 -131
- package/dist/cdn/chunks/{ColorPicker-yxvrro60.js.map → ColorPicker-W_UyiVGc.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-FPbg-FuU.js → CommentsSidebar-BLRZRSSC.js} +112 -112
- package/dist/cdn/chunks/{CommentsSidebar-FPbg-FuU.js.map → CommentsSidebar-BLRZRSSC.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-D2Oth7YY.js → CountdownBlock-vLTkTI9e.js} +11 -11
- package/dist/cdn/chunks/{CountdownBlock-D2Oth7YY.js.map → CountdownBlock-vLTkTI9e.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BNgTBQGB.js → CountdownToolbar-DPjcgcVR.js} +41 -41
- package/dist/cdn/chunks/{CountdownToolbar-BNgTBQGB.js.map → CountdownToolbar-DPjcgcVR.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-ChB_HBK1.js → DesignReferenceSidebar-DBoEBKxQ.js} +34 -34
- package/dist/cdn/chunks/{DesignReferenceSidebar-ChB_HBK1.js.map → DesignReferenceSidebar-DBoEBKxQ.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CjiZ8cLW.js → IssuesPanel-DKTS4QVb.js} +32 -32
- package/dist/cdn/chunks/{IssuesPanel-CjiZ8cLW.js.map → IssuesPanel-DKTS4QVb.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-CiNg9s16.js → LoadingTrack-C52ZGL5q.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-CiNg9s16.js.map → LoadingTrack-C52ZGL5q.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-CiYbOKzd.js → MergeTagModeToggle-D8iKvz7v.js} +28 -28
- package/dist/cdn/chunks/{MergeTagModeToggle-CiYbOKzd.js.map → MergeTagModeToggle-D8iKvz7v.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-CvZLI6Np.js → MergeTagSuggestion-Dn8dExNa.js} +18 -18
- package/dist/cdn/chunks/{MergeTagSuggestion-CvZLI6Np.js.map → MergeTagSuggestion-Dn8dExNa.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-vVwCWrd_.js → NumberWithSuffix-BXrRdfq1.js} +22 -22
- package/dist/cdn/chunks/{NumberWithSuffix-vVwCWrd_.js.map → NumberWithSuffix-BXrRdfq1.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-o4hs9mgy.js → ParagraphEditor-Cuc83Blj.js} +58 -58
- package/dist/cdn/chunks/{ParagraphEditor-o4hs9mgy.js.map → ParagraphEditor-Cuc83Blj.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BAriGldd.js → RichTextEditorContent-DtL49Jpo.js} +20 -20
- package/dist/cdn/chunks/{RichTextEditorContent-BAriGldd.js.map → RichTextEditorContent-DtL49Jpo.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-D3-oILb5.js → SaveBlockDialog-B8KHhVkI.js} +50 -50
- package/dist/cdn/chunks/{SaveBlockDialog-D3-oILb5.js.map → SaveBlockDialog-B8KHhVkI.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-jMnNd4wn.js → SavedBlocksBrowserModal-B-sjsIJv.js} +62 -62
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-jMnNd4wn.js.map → SavedBlocksBrowserModal-B-sjsIJv.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-BDd8FH6l.js → SavedBlocksPanels-Bb-eDMAh.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-BDd8FH6l.js.map → SavedBlocksPanels-Bb-eDMAh.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BNkLe8In.js → SavedBlocksPickBar-GudFfXa4.js} +12 -12
- package/dist/cdn/chunks/{SavedBlocksPickBar-BNkLe8In.js.map → SavedBlocksPickBar-GudFfXa4.js.map} +1 -1
- package/dist/cdn/chunks/{SnapshotHistory-CYVi7fvQ.js → SnapshotHistory-Srpzt2na.js} +26 -26
- package/dist/cdn/chunks/{SnapshotHistory-CYVi7fvQ.js.map → SnapshotHistory-Srpzt2na.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-D0KrxVnr.js → TemplateScoringPanel-NucRtAP0.js} +42 -42
- package/dist/cdn/chunks/{TemplateScoringPanel-D0KrxVnr.js.map → TemplateScoringPanel-NucRtAP0.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-_RbTD787.js → TestEmailModal-DLeoJqaJ.js} +31 -31
- package/dist/cdn/chunks/{TestEmailModal-_RbTD787.js.map → TestEmailModal-DLeoJqaJ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BAnKtbSu.js → TestEmailPanel-Dr7Dkq2P.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-BAnKtbSu.js.map → TestEmailPanel-Dr7Dkq2P.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-LiUvXGPw.js → TitleEditor-DzYRr18C.js} +35 -35
- package/dist/cdn/chunks/{TitleEditor-LiUvXGPw.js.map → TitleEditor-DzYRr18C.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-C1iguuZz.js → TplModal-byw7-3wg.js} +17 -17
- package/dist/cdn/chunks/{TplModal-C1iguuZz.js.map → TplModal-byw7-3wg.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-FXlMM3PL.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-CrPzyP_k.js.map → blockTypeIcons-FXlMM3PL.js.map} +1 -1
- package/dist/cdn/chunks/{cloud-CxNsW3hp.js → cloud-CuItCnN_.js} +4 -4
- package/dist/cdn/chunks/{cloud-CxNsW3hp.js.map → cloud-CuItCnN_.js.map} +1 -1
- package/dist/cdn/chunks/{dist-BLF-S9_A.js → dist-B2HKGHnc.js} +9 -7
- package/dist/cdn/chunks/{dist-BLF-S9_A.js.map → dist-B2HKGHnc.js.map} +1 -1
- package/dist/cdn/chunks/{dist-Dp46rwVY.js → dist-C6z8AjBC.js} +2 -2
- package/dist/cdn/chunks/{dist-Dp46rwVY.js.map → dist-C6z8AjBC.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-BRF_Q_jB.js → draggable-DCs9qL-b.js} +114 -92
- package/dist/cdn/chunks/{draggable-BRF_Q_jB.js.map → draggable-DCs9qL-b.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-yNQlgLNE.js → extensions-B7laxHjs.js} +22 -22
- package/dist/cdn/chunks/{extensions-yNQlgLNE.js.map → extensions-B7laxHjs.js.map} +1 -1
- package/dist/cdn/chunks/{htmlparser-CPhs2cYE.js → htmlparser-DTML8Gvz.js} +8 -7
- package/dist/cdn/chunks/{htmlparser-CPhs2cYE.js.map → htmlparser-DTML8Gvz.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DN008liP.js → icons-CvYN6zrM.js} +74 -80
- package/dist/cdn/chunks/icons-CvYN6zrM.js.map +1 -0
- package/dist/cdn/chunks/{keys-CZOBuCQd.js → keys-Cmc2Yl3D.js} +2 -2
- package/dist/cdn/chunks/{keys-CZOBuCQd.js.map → keys-Cmc2Yl3D.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-CZaQe87t.js → liquid.browser-UlAOKBjI.js} +120 -110
- package/dist/cdn/chunks/liquid.browser-UlAOKBjI.js.map +1 -0
- package/dist/cdn/chunks/{pusher-kUlkqMvR.js → pusher-BbIHJKf3.js} +29 -25
- package/dist/cdn/chunks/{pusher-kUlkqMvR.js.map → pusher-BbIHJKf3.js.map} +1 -1
- package/dist/cdn/chunks/{src-uc_Mb_yH.js → src-BYKYmEOD.js} +7 -6
- package/dist/cdn/chunks/src-BYKYmEOD.js.map +1 -0
- package/dist/cdn/chunks/{src-D_3bXt7-.js → src-Bi-Qhtfs.js} +3 -3
- package/dist/cdn/chunks/{src-D_3bXt7-.js.map → src-Bi-Qhtfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-B2LpXMIw.js → src-C0N74uvF.js} +280 -277
- package/dist/cdn/chunks/{src-B2LpXMIw.js.map → src-C0N74uvF.js.map} +1 -1
- package/dist/cdn/chunks/{src-CZjSXPYq.js → src-EKTTBQ0y.js} +3 -2
- package/dist/cdn/chunks/src-EKTTBQ0y.js.map +1 -0
- package/dist/cdn/chunks/{styles-BzP13r-I.js → styles-C7s-VtJi.js} +1112 -1094
- package/dist/cdn/chunks/styles-C7s-VtJi.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CgwK_fKJ.js → tiptap-C44S1Cmh.js} +3681 -2965
- package/dist/cdn/chunks/tiptap-C44S1Cmh.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-Ctyt3GgH.js → useAliveFlag-Dxwgo6P4.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-Ctyt3GgH.js.map → useAliveFlag-Dxwgo6P4.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-CML0BxqX.js → useCloudI18n-8wkJtuJD.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-CML0BxqX.js.map → useCloudI18n-8wkJtuJD.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CTYH6u4r.js → useEditorCore-C_nUXiph.js} +275 -275
- package/dist/cdn/chunks/useEditorCore-C_nUXiph.js.map +1 -0
- package/dist/cdn/chunks/{useI18n-aRMtgYRj.js → useI18n-UMs0F71x.js} +3 -3
- package/dist/cdn/chunks/{useI18n-aRMtgYRj.js.map → useI18n-UMs0F71x.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-8a8BnIZp.js → useMergeTag-CPa_9VOq.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-8a8BnIZp.js.map → useMergeTag-CPa_9VOq.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Dm1jv3y5.js → usePopoverPosition-cf8Y-ynK.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-Dm1jv3y5.js.map → usePopoverPosition-cf8Y-ynK.js.map} +1 -1
- package/dist/cdn/editor.js +47 -47
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Bqimqf7l.js → check-On4TSac-.js} +1 -1
- package/dist/{chevron-down-CYOoeGBd.js → chevron-down-69EiBGoB.js} +1 -1
- package/dist/{chevron-up-DYknsfm0.js → chevron-up-Dh3MG1Dw.js} +1 -1
- package/dist/{circle-alert-6q_jgtv_.js → circle-alert-cilwzafX.js} +1 -1
- package/dist/{clock-CnadSSTD.js → clock-Dt0APH92.js} +1 -1
- package/dist/{cloud-BJLg_SlM.js → cloud-C7-FhzMc.js} +2 -2
- package/dist/{createLucideIcon-D7GKhya2.js → createLucideIcon-C8WzBYCv.js} +3 -3
- package/dist/dist-6YJAWMuf.js +5 -0
- package/dist/dist-8vlm9kfO.js +5 -0
- package/dist/{dist-DSIgxp0v.js → dist-BImfm-46.js} +2 -2
- package/dist/{dist-DDfXShPv.js → dist-BpKxrUi2.js} +1 -1
- package/dist/{dist-B6Px6GPj.js → dist-C08jiemd.js} +7 -7
- package/dist/{dist-BxbTVeY0.js → dist-C27SeFL5.js} +15 -15
- package/dist/{dist-nR6mxyqI.js → dist-CYx-E82k.js} +2 -2
- package/dist/{dist-CcQFPJMF.js → dist-ChYLhoJ4.js} +2300 -1704
- package/dist/{dist-C31bMR4x.js → dist-Cl8J0IES.js} +270 -182
- package/dist/{dist-CQ0fVBQ3.js → dist-D5zCZFdU.js} +2 -1
- package/dist/{dist-Dx71pluS.js → dist-DMJRSouD.js} +470 -440
- package/dist/{dist-DyCHUyRR.js → dist-DfpeSdmE.js} +2 -2
- package/dist/{dist-DX4x6mQ1.js → dist-M7m1lYRe.js} +47 -47
- package/dist/{dist-CRH880TV.js → dist-g6cbzhZW.js} +2 -2
- package/dist/{extensions-CbiWtzS6.js → extensions-CxwhoG8v.js} +19 -19
- package/dist/{image-up-BfukboIn.js → image-up-Ceggh_R3.js} +1 -1
- package/dist/{info-DSYRzSZo.js → info-DO5odBcZ.js} +1 -1
- package/dist/{keys-BI6VSUh4.js → keys-fwF3qZax.js} +1 -1
- package/dist/{liquid.browser-BECWFL5Z.js → liquid.browser-B-rGrnrQ.js} +119 -109
- package/dist/{list-checks-URZOyLhr.js → list-checks-BSkPKbuI.js} +1 -1
- package/dist/{loader-circle-GADaYcyQ.js → loader-circle-bO7o7_HD.js} +1 -1
- package/dist/{message-circle-B62fdo0b.js → message-circle-BEkAk65X.js} +1 -1
- package/dist/{pencil-BGwkOpD_.js → pencil-t6m0EtKL.js} +1 -1
- package/dist/{refresh-cw-Z4wXfduO.js → refresh-cw-CkOYVzK5.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-BkOsapVg.js → runtime-dom.esm-bundler-CepEmvwF.js} +13 -10
- package/dist/{scan-line-D8Oh5xos.js → scan-line-DwSVj25O.js} +1 -1
- package/dist/{send-BYp4k38T.js → send-CWsWN8PQ.js} +1 -1
- package/dist/{shield-check-Cm0RePnW.js → shield-check-qje8Kufw.js} +1 -1
- package/dist/{sparkles-BHEE-vRD.js → sparkles-DumaWRW-.js} +1 -1
- package/dist/{styles-B0MEBpOK.js → styles-C_slTGwp.js} +454 -436
- package/dist/templatical-editor.js +11 -11
- package/dist/{text-align-start-CHrg3vK8.js → text-align-start-Ir8Ah4mT.js} +1 -1
- package/dist/{trash-2-BoNT8wbq.js → trash-2-CklAFCmO.js} +1 -1
- package/dist/{triangle-alert-CiN0ssB3.js → triangle-alert-BBi4n93g.js} +1 -1
- package/dist/{upload-WvZGBySw.js → upload-sVqqppuv.js} +1 -1
- package/dist/{useAliveFlag-eT67QCMf.js → useAliveFlag-cvyBxHp7.js} +1 -1
- package/dist/{useCloudI18n-KgIWl-IE.js → useCloudI18n-DKVm6PCa.js} +2 -2
- package/dist/{useEditorCore-BMbxdUbY.js → useEditorCore-r4gWzCBA.js} +893 -893
- package/dist/{useI18n-BkHfCWC6.js → useI18n-DoVKdCTH.js} +2 -2
- package/dist/{useMergeTag-CZ4XYAxu.js → useMergeTag-C-_WxrgL.js} +3 -3
- package/dist/{usePopoverPosition-D93u-EZm.js → usePopoverPosition-C0dPEF4X.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-0R1UhmZB.js → vue.runtime.esm-bundler-D1diBMsm.js} +119 -95
- package/dist/{x-B4WnJVRx.js → x-Mby7KlhS.js} +1 -1
- package/package.json +23 -23
- package/dist/cdn/chunks/blockTypeIcons-CrPzyP_k.js +0 -21
- package/dist/cdn/chunks/icons-DN008liP.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-CZaQe87t.js.map +0 -1
- package/dist/cdn/chunks/src-CZjSXPYq.js.map +0 -1
- package/dist/cdn/chunks/src-uc_Mb_yH.js.map +0 -1
- package/dist/cdn/chunks/styles-BzP13r-I.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CgwK_fKJ.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CTYH6u4r.js.map +0 -1
- package/dist/dist-CkPvZCld.js +0 -5
- package/dist/dist-iCEDH3cC.js +0 -5
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { C as e, F as t, G as n, H as r, J as i, K as a, L as o, M as s, N as c, O as l, P as u, T as d, V as f, Y as p, Z as m, b as h, c as g, ct as _, f as v, g as y, h as b, it as x, l as S,
|
|
2
|
-
import { B as
|
|
3
|
-
import { A as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { A as
|
|
6
|
-
import { t as
|
|
7
|
-
import { a as
|
|
8
|
-
import { $ as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { n as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { _ as
|
|
17
|
-
import { n as
|
|
18
|
-
import { i as
|
|
19
|
-
import { t as on } from "./TplModal-
|
|
1
|
+
import { C as e, F as t, G as n, H as r, J as i, K as a, L as o, M as s, N as c, O as l, P as u, T as d, V as f, Y as p, Z as m, b as h, c as g, ct as _, f as v, g as y, h as b, it as x, l as S, lt as C, m as w, n as T, o as ee, p as E, s as D, st as O, t as k, u as A, v as j, x as M, y as N, z as P } from "./draggable-DCs9qL-b.js";
|
|
2
|
+
import { B as F, C as te, F as I, a as L, b as R, c as z, d as B, i as V, l as ne, r as re, y as ie } from "./src-EKTTBQ0y.js";
|
|
3
|
+
import { A as ae, C as oe, I as se, L as H, N as ce, O as le, _ as ue, a as de, c as fe, d as pe, f as me, g as he, h as ge, i as _e, j as ve, k as ye, l as be, m as xe, n as Se, o as Ce, p as we, r as Te, s as Ee, v as De, y as Oe } from "./useEditorCore-C_nUXiph.js";
|
|
4
|
+
import { _ as ke, d as Ae } from "./dist-C6z8AjBC.js";
|
|
5
|
+
import { A as je, B as Me, G as Ne, H as Pe, I as Fe, M as Ie, O as Le, P as Re, R as ze, T as Be, U as Ve, V as He, W as Ue, c as We, f as Ge, g as Ke, h as qe, k as Je, m as Ye, n as Xe, o as Ze, p as Qe, r as $e, s as et, u as tt, v as nt } from "./keys-Cmc2Yl3D.js";
|
|
6
|
+
import { t as U } from "./useI18n-UMs0F71x.js";
|
|
7
|
+
import { a as rt, n as it } from "./usePopoverPosition-cf8Y-ynK.js";
|
|
8
|
+
import { $ as at, At as ot, D as st, E as ct, Et as lt, It as ut, Mt as dt, N as ft, Ot as pt, P as mt, Q as ht, Rt as gt, T as _t, Tt as vt, U as W, Y as yt, _ as bt, _t as xt, b as St, d as Ct, dt as wt, et as Tt, ft as Et, g as Dt, it as Ot, j as kt, lt as At, m as jt, n as Mt, nt as Nt, pt as Pt, q as Ft, rt as It, s as Lt, st as Rt, w as zt, wt as Bt, z as Vt } from "./icons-CvYN6zrM.js";
|
|
9
|
+
import { t as Ht } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
10
|
+
import { t as Ut } from "./useCloudI18n-8wkJtuJD.js";
|
|
11
|
+
import { t as Wt } from "./useMergeTag-CPa_9VOq.js";
|
|
12
|
+
import { t as Gt } from "./useAliveFlag-Dxwgo6P4.js";
|
|
13
|
+
import { n as Kt, t as qt } from "./emailFrameWidth-BmFCN2dp.js";
|
|
14
|
+
import { t as Jt } from "./readableTextColor-f8Kykfnh.js";
|
|
15
|
+
import { t as Yt } from "./blockTypeIcons-FXlMM3PL.js";
|
|
16
|
+
import { _ as Xt, f as G, g as Zt, h as K, i as Qt, l as $t, m as q, n as en, p as J, t as Y, u as tn } from "./ColorPicker-W_UyiVGc.js";
|
|
17
|
+
import { n as nn, r as rn } from "./MergeTagSuggestion-Dn8dExNa.js";
|
|
18
|
+
import { i as X, n as Z, r as Q, t as an } from "./NumberWithSuffix-BXrRdfq1.js";
|
|
19
|
+
import { t as on } from "./TplModal-byw7-3wg.js";
|
|
20
20
|
//#region src/composables/useSavedBlocksFeature.ts
|
|
21
21
|
function sn(e) {
|
|
22
|
-
let { provider: t, editor: n } = e, r =
|
|
22
|
+
let { provider: t, editor: n } = e, r = se({
|
|
23
23
|
provider: t,
|
|
24
24
|
onError: e.onError
|
|
25
25
|
}), i = m(!1), a = m(!1), o = m(!1), s = m(/* @__PURE__ */ new Set()), l = v(() => o.value), u = v(() => s.value.size);
|
|
@@ -43,7 +43,7 @@ function sn(e) {
|
|
|
43
43
|
function _() {
|
|
44
44
|
i.value = !1, s.value = /* @__PURE__ */ new Set();
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
P(() => n.state.previewMode, (e) => {
|
|
47
47
|
e && o.value && h();
|
|
48
48
|
});
|
|
49
49
|
function y() {
|
|
@@ -54,7 +54,7 @@ function sn(e) {
|
|
|
54
54
|
}
|
|
55
55
|
function x(e, t) {
|
|
56
56
|
for (let r = 0; r < e.content.length; r++) {
|
|
57
|
-
let i =
|
|
57
|
+
let i = ie(e.content[r]), a = t === void 0 ? void 0 : t + r;
|
|
58
58
|
n.addBlock(i, void 0, void 0, a);
|
|
59
59
|
}
|
|
60
60
|
a.value = !1;
|
|
@@ -63,7 +63,7 @@ function sn(e) {
|
|
|
63
63
|
r.load().catch(() => {});
|
|
64
64
|
}
|
|
65
65
|
let C = v(() => r.savedBlocks.value.length), w = v(() => e.isAvailable?.() ?? !0);
|
|
66
|
-
return c(
|
|
66
|
+
return c(ze, r), {
|
|
67
67
|
headless: r,
|
|
68
68
|
isPicking: l,
|
|
69
69
|
pickedIds: s,
|
|
@@ -102,7 +102,7 @@ function sn(e) {
|
|
|
102
102
|
//#region src/utils/toMjml.ts
|
|
103
103
|
async function cn() {
|
|
104
104
|
try {
|
|
105
|
-
return await import("./src-
|
|
105
|
+
return await import("./src-BYKYmEOD.js");
|
|
106
106
|
} catch {
|
|
107
107
|
return null;
|
|
108
108
|
}
|
|
@@ -142,7 +142,7 @@ function dn(e) {
|
|
|
142
142
|
return await e.renderMjml();
|
|
143
143
|
} catch (e) {
|
|
144
144
|
if (await cn() === null) {
|
|
145
|
-
c || (c = !0,
|
|
145
|
+
c || (c = !0, ve.warn("testEmail.includeMjml is set but @templatical/renderer is not installed — sending the template as JSON only. Install it to receive `payload.mjml`."));
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
148
|
throw e;
|
|
@@ -224,7 +224,7 @@ var pn = ["aria-label"], mn = {
|
|
|
224
224
|
}, Cn = { class: "tpl:relative" }, wn = {
|
|
225
225
|
class: "tpl:inline-flex tpl:size-3 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[8px] tpl:font-bold",
|
|
226
226
|
style: { "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 30%,\n transparent\n )" }
|
|
227
|
-
}, Tn = /*#__PURE__*/
|
|
227
|
+
}, Tn = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
228
228
|
__name: "Canvas",
|
|
229
229
|
props: {
|
|
230
230
|
viewport: {},
|
|
@@ -241,22 +241,22 @@ var pn = ["aria-label"], mn = {
|
|
|
241
241
|
],
|
|
242
242
|
setup(e, { emit: t }) {
|
|
243
243
|
let n = {
|
|
244
|
-
section:
|
|
245
|
-
title:
|
|
246
|
-
paragraph:
|
|
247
|
-
image:
|
|
248
|
-
button:
|
|
249
|
-
divider:
|
|
250
|
-
spacer:
|
|
251
|
-
html:
|
|
252
|
-
social:
|
|
253
|
-
menu:
|
|
254
|
-
table:
|
|
255
|
-
video:
|
|
256
|
-
custom:
|
|
257
|
-
}, i = e, a = t, { t: l } =
|
|
258
|
-
c(
|
|
259
|
-
let
|
|
244
|
+
section: Ee,
|
|
245
|
+
title: fe,
|
|
246
|
+
paragraph: we,
|
|
247
|
+
image: ge,
|
|
248
|
+
button: ye,
|
|
249
|
+
divider: De,
|
|
250
|
+
spacer: _e,
|
|
251
|
+
html: ue,
|
|
252
|
+
social: de,
|
|
253
|
+
menu: xe,
|
|
254
|
+
table: Te,
|
|
255
|
+
video: Se,
|
|
256
|
+
custom: Oe
|
|
257
|
+
}, i = e, a = t, { t: l } = U(), { t: p } = Ut(), h = Ne(Ke, "Canvas"), g = d(Ge, null), S = d(et, null), T = d(We, {}), ee = d(Je, null), M = d(Fe, null);
|
|
258
|
+
c(Ue, v(() => i.previewMode && (ee?.value ?? !1) && !M?.isConfigured));
|
|
259
|
+
let P = v(() => (T.plan?.hasFeature("ai_generation") ?? !1) && (T.ai?.isFeatureEnabled("chat") ?? !1)), F = v(() => (T.plan?.hasFeature("ai_generation") ?? !1) && (T.ai?.isFeatureEnabled("designToTemplate") ?? !1)), te = d($e, null), I = v({
|
|
260
260
|
get: () => i.content.blocks,
|
|
261
261
|
set: (e) => {
|
|
262
262
|
h.setContent({
|
|
@@ -264,39 +264,39 @@ var pn = ["aria-label"], mn = {
|
|
|
264
264
|
blocks: e
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
|
-
}),
|
|
268
|
-
function ne() {
|
|
269
|
-
V.value && (H.value += 1);
|
|
270
|
-
}
|
|
267
|
+
}), L = v(() => Kt(i.content.settings, i.viewport)), R = v(() => L.value + 192), z = v(() => pe(i.content.settings)), B = v(() => I.value.length === 0 && !i.previewMode), V = m(0), ne = v(() => B.value && V.value > 0);
|
|
271
268
|
function re() {
|
|
272
|
-
|
|
269
|
+
B.value && (V.value += 1);
|
|
273
270
|
}
|
|
274
271
|
function ie() {
|
|
275
|
-
|
|
272
|
+
B.value && (V.value = Math.max(0, V.value - 1));
|
|
276
273
|
}
|
|
277
|
-
function ae(
|
|
278
|
-
|
|
274
|
+
function ae() {
|
|
275
|
+
V.value = 0;
|
|
279
276
|
}
|
|
280
277
|
function oe(e) {
|
|
281
|
-
|
|
278
|
+
i.previewMode || T.savedBlocks?.isPicking.value || e.target === e.currentTarget && a("select-block", null);
|
|
279
|
+
}
|
|
280
|
+
function se(e) {
|
|
281
|
+
return me(e, S, n);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function H(e) {
|
|
284
284
|
return i.lockedBlocks?.get(e) ?? null;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
if (i.previewMode ||
|
|
288
|
-
let t =
|
|
286
|
+
function ce(e) {
|
|
287
|
+
if (i.previewMode || H(e)) return;
|
|
288
|
+
let t = T.savedBlocks;
|
|
289
289
|
if (t?.isPicking.value) {
|
|
290
290
|
t.togglePick(e);
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
a("select-block", e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
return
|
|
295
|
+
function le(e) {
|
|
296
|
+
return T.savedBlocks?.isPicked(e) ?? !1;
|
|
297
297
|
}
|
|
298
|
-
let
|
|
299
|
-
function
|
|
298
|
+
let he = v(() => T.savedBlocks?.isPicking.value === !0);
|
|
299
|
+
function ve(e, t) {
|
|
300
300
|
e.type === "custom" && h.updateBlock(e.id, {
|
|
301
301
|
fieldValues: t.fieldValues,
|
|
302
302
|
dataSourceFetched: t.dataSourceFetched
|
|
@@ -304,41 +304,41 @@ var pn = ["aria-label"], mn = {
|
|
|
304
304
|
}
|
|
305
305
|
return (t, n) => (s(), y("div", {
|
|
306
306
|
class: "tpl-canvas-stage tpl:relative tpl:flex tpl:justify-center tpl:rounded-lg",
|
|
307
|
-
style:
|
|
308
|
-
width: `${
|
|
307
|
+
style: _({
|
|
308
|
+
width: `${R.value}px`,
|
|
309
309
|
boxShadow: e.darkMode ? "none" : "var(--tpl-shadow-xl)",
|
|
310
|
-
transition: x(
|
|
310
|
+
transition: x(qt)
|
|
311
311
|
})
|
|
312
|
-
}, [
|
|
312
|
+
}, [E("div", {
|
|
313
313
|
class: "tpl-canvas-bg tpl:absolute tpl:inset-0 tpl:rounded-lg tpl:pointer-events-none",
|
|
314
|
-
style:
|
|
314
|
+
style: _({
|
|
315
315
|
backgroundColor: e.content.settings.backgroundColor,
|
|
316
316
|
...e.darkMode ? { filter: "invert(1) hue-rotate(180deg)" } : {},
|
|
317
317
|
transition: "filter 300ms ease"
|
|
318
318
|
})
|
|
319
|
-
}, null, 4),
|
|
319
|
+
}, null, 4), E("div", {
|
|
320
320
|
"data-testid": "canvas-wrapper",
|
|
321
321
|
role: "region",
|
|
322
322
|
"aria-label": x(l).landmarks.canvas,
|
|
323
323
|
class: "tpl-canvas-wrapper tpl:relative",
|
|
324
|
-
style:
|
|
325
|
-
width: `${
|
|
326
|
-
transition: x(
|
|
324
|
+
style: _({
|
|
325
|
+
width: `${L.value}px`,
|
|
326
|
+
transition: x(qt)
|
|
327
327
|
})
|
|
328
|
-
}, [
|
|
329
|
-
class:
|
|
328
|
+
}, [E("div", {
|
|
329
|
+
class: O(["tpl-canvas tpl:relative tpl:rounded-lg", {
|
|
330
330
|
"tpl-canvas--dark-mode": e.darkMode,
|
|
331
331
|
"tpl-preview-mode": e.previewMode
|
|
332
332
|
}]),
|
|
333
|
-
style:
|
|
334
|
-
onClick:
|
|
335
|
-
}, [x(
|
|
333
|
+
style: _(z.value),
|
|
334
|
+
onClick: oe
|
|
335
|
+
}, [x(M)?.isInitialResolve.value ? (s(), y("div", mn, [E("span", hn, C(x(l).previewResolution.resolving), 1), (s(), y(A, null, u(3, (e) => E("div", {
|
|
336
336
|
key: e,
|
|
337
337
|
"aria-hidden": "true",
|
|
338
338
|
class: "tpl-pulse tpl:h-16 tpl:rounded-md tpl:bg-[var(--tpl-bg-hover)]"
|
|
339
|
-
})), 64))])) : x(
|
|
340
|
-
modelValue:
|
|
341
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
339
|
+
})), 64))])) : x(M)?.hasFailed.value ? (s(), y("p", gn, C(x(l).previewResolution.failed), 1)) : b("", !0), r(N(x(k), {
|
|
340
|
+
modelValue: I.value,
|
|
341
|
+
"onUpdate:modelValue": n[2] ||= (e) => I.value = e,
|
|
342
342
|
group: "blocks",
|
|
343
343
|
animation: 150,
|
|
344
344
|
"ghost-class": "tpl-ghost",
|
|
@@ -349,73 +349,73 @@ var pn = ["aria-label"], mn = {
|
|
|
349
349
|
disabled: e.previewMode,
|
|
350
350
|
draggable: ".tpl-block-item",
|
|
351
351
|
"force-fallback": !0,
|
|
352
|
-
class:
|
|
352
|
+
class: O([
|
|
353
353
|
"tpl-canvas-blocks",
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
354
|
+
B.value ? "tpl-canvas-empty tpl:m-6 tpl:flex tpl:min-h-[400px] tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-xl tpl:border-2 tpl:border-dashed tpl:px-10 tpl:py-12 tpl:text-center tpl:bg-[var(--tpl-bg-elevated)] tpl:font-[var(--tpl-font-family)] tpl:transition-colors tpl:duration-150" : "",
|
|
355
|
+
B.value && ne.value ? "tpl-canvas-empty--drag-over tpl:border-[var(--tpl-primary-hover)] tpl:bg-[var(--tpl-primary-light)]" : "",
|
|
356
|
+
B.value && !ne.value ? "tpl:border-[var(--tpl-primary)]" : ""
|
|
357
357
|
]),
|
|
358
|
-
onDragenter:
|
|
359
|
-
onDragleave:
|
|
360
|
-
onDrop:
|
|
358
|
+
onDragenter: re,
|
|
359
|
+
onDragleave: ie,
|
|
360
|
+
onDrop: ae
|
|
361
361
|
}, {
|
|
362
|
-
default: f(() => [
|
|
363
|
-
|
|
362
|
+
default: f(() => [B.value ? (s(), y("div", _n, [
|
|
363
|
+
E("div", vn, [N(x(_t), {
|
|
364
364
|
size: 48,
|
|
365
365
|
"stroke-width": 1
|
|
366
366
|
})]),
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
367
|
+
E("p", yn, C(x(l).canvas.noBlocks), 1),
|
|
368
|
+
E("p", bn, C(x(l).canvas.dragHint), 1),
|
|
369
|
+
P.value && x(p) ? (s(), y("p", xn, [
|
|
370
|
+
j(C(x(l).canvas.aiHintChat) + " ", 1),
|
|
371
|
+
E("button", {
|
|
372
372
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
373
373
|
onClick: n[0] ||= (e) => a("open-ai-chat")
|
|
374
|
-
}, [
|
|
374
|
+
}, [N(x(ct), {
|
|
375
375
|
size: 14,
|
|
376
376
|
"stroke-width": 2
|
|
377
|
-
}),
|
|
378
|
-
|
|
377
|
+
}), j(" " + C(x(p).aiMenu.aiAssistant), 1)]),
|
|
378
|
+
j(" " + C(x(l).canvas.aiHintChatSuffix), 1)
|
|
379
379
|
])) : b("", !0),
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
F.value && x(p) ? (s(), y("p", Sn, [
|
|
381
|
+
j(C(x(l).canvas.aiHintDesign) + " ", 1),
|
|
382
|
+
E("button", {
|
|
383
383
|
class: "tpl:inline-flex tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:whitespace-nowrap tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-sm tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
384
384
|
onClick: n[1] ||= (e) => a("open-design-reference")
|
|
385
|
-
}, [
|
|
385
|
+
}, [N(x(Pt), {
|
|
386
386
|
size: 14,
|
|
387
387
|
"stroke-width": 2
|
|
388
|
-
}),
|
|
389
|
-
|
|
388
|
+
}), j(" " + C(x(p).aiMenu.designToTemplate), 1)]),
|
|
389
|
+
j(" " + C(x(l).canvas.aiHintDesignSuffix), 1)
|
|
390
390
|
])) : b("", !0)
|
|
391
|
-
])) : b("", !0), (s(!0), y(
|
|
391
|
+
])) : b("", !0), (s(!0), y(A, null, u(I.value, (t) => r((s(), y("div", {
|
|
392
392
|
key: t.id,
|
|
393
393
|
class: "tpl-block-item"
|
|
394
|
-
}, [
|
|
394
|
+
}, [E("div", Cn, [H(t.id) ? (s(), y("div", {
|
|
395
395
|
key: 0,
|
|
396
396
|
class: "tpl-collab-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
397
|
-
style:
|
|
398
|
-
outline: `2px solid ${
|
|
397
|
+
style: _({
|
|
398
|
+
outline: `2px solid ${H(t.id).color}`,
|
|
399
399
|
outlineOffset: "-1px"
|
|
400
400
|
})
|
|
401
|
-
}, [
|
|
401
|
+
}, [E("span", {
|
|
402
402
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:flex tpl:-translate-x-1/2 tpl:-translate-y-full tpl:items-center tpl:gap-1 tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
403
|
-
style:
|
|
404
|
-
backgroundColor:
|
|
405
|
-
color: x(
|
|
403
|
+
style: _({
|
|
404
|
+
backgroundColor: H(t.id).color,
|
|
405
|
+
color: x(Jt)(H(t.id).color)
|
|
406
406
|
})
|
|
407
|
-
}, [
|
|
407
|
+
}, [E("span", wn, C(H(t.id).name.charAt(0)), 1), j(" " + C(H(t.id).name), 1)], 4)], 4)) : b("", !0), N(be, {
|
|
408
408
|
block: t,
|
|
409
|
-
"is-selected": !e.previewMode && !
|
|
410
|
-
picked:
|
|
409
|
+
"is-selected": !e.previewMode && !he.value && e.selectedBlockId === t.id && !H(t.id),
|
|
410
|
+
picked: le(t.id),
|
|
411
411
|
viewport: e.viewport,
|
|
412
412
|
"preview-mode": e.previewMode,
|
|
413
|
-
onSelect: (e) =>
|
|
413
|
+
onSelect: (e) => ce(t.id)
|
|
414
414
|
}, {
|
|
415
|
-
default: f(() => [(s(),
|
|
415
|
+
default: f(() => [(s(), w(o(se(t)), {
|
|
416
416
|
block: t,
|
|
417
417
|
viewport: e.viewport,
|
|
418
|
-
onFetchData: (e) =>
|
|
418
|
+
onFetchData: (e) => ve(t, e),
|
|
419
419
|
onUpdate: (e) => x(h).updateBlock(t.id, e)
|
|
420
420
|
}, null, 40, [
|
|
421
421
|
"block",
|
|
@@ -431,18 +431,18 @@ var pn = ["aria-label"], mn = {
|
|
|
431
431
|
"viewport",
|
|
432
432
|
"preview-mode",
|
|
433
433
|
"onSelect"
|
|
434
|
-
])])])), [[
|
|
434
|
+
])])])), [[D, x(te) === !1 || !x(g)?.isHidden(t.id)]])), 128))]),
|
|
435
435
|
_: 1
|
|
436
436
|
}, 8, [
|
|
437
437
|
"modelValue",
|
|
438
438
|
"disabled",
|
|
439
439
|
"class"
|
|
440
|
-
]), [[
|
|
440
|
+
]), [[D, !x(M)?.isInitialResolve.value]])], 6)], 12, pn)], 4));
|
|
441
441
|
}
|
|
442
|
-
}), [["__scopeId", "data-v-0af1c100"]]), En =
|
|
442
|
+
}), [["__scopeId", "data-v-0af1c100"]]), En = M({
|
|
443
443
|
name: "CustomBlockStylesheets",
|
|
444
444
|
setup() {
|
|
445
|
-
let t = d(
|
|
445
|
+
let t = d(Ye, null);
|
|
446
446
|
return () => t ? t.value.map((t, n) => e("style", {
|
|
447
447
|
key: n,
|
|
448
448
|
"data-tpl-custom-block-stylesheet": "",
|
|
@@ -485,20 +485,20 @@ var On = ["aria-label"], kn = {
|
|
|
485
485
|
], Nn = { class: "tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:transition-transform tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:scale-105" }, Pn = {
|
|
486
486
|
key: 0,
|
|
487
487
|
class: "tpl:truncate tpl:text-sm tpl:font-medium"
|
|
488
|
-
}, Fn = /* @__PURE__ */
|
|
488
|
+
}, Fn = /* @__PURE__ */ M({
|
|
489
489
|
__name: "Sidebar",
|
|
490
490
|
setup(e) {
|
|
491
|
-
let { t, format: n } =
|
|
491
|
+
let { t, format: n } = U(), r = d(Qe, []), i = d(Re, void 0), a = d(Ze, void 0), c = d(Ke, null), l = d(We, {}), p = v(() => l.savedBlocks?.isAvailable.value === !0), h = m(!1), g = m(!1);
|
|
492
492
|
function S() {
|
|
493
493
|
g.value || (h.value = !1);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function T() {
|
|
496
496
|
g.value = !0;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function ee() {
|
|
499
499
|
g.value = !1, h.value = !1;
|
|
500
500
|
}
|
|
501
|
-
let
|
|
501
|
+
let D = [
|
|
502
502
|
"section",
|
|
503
503
|
"image",
|
|
504
504
|
"title",
|
|
@@ -512,42 +512,42 @@ var On = ["aria-label"], kn = {
|
|
|
512
512
|
"spacer",
|
|
513
513
|
"html"
|
|
514
514
|
], O = v(() => {
|
|
515
|
-
let e =
|
|
515
|
+
let e = D.map((e) => ({
|
|
516
516
|
type: e,
|
|
517
|
-
label:
|
|
517
|
+
label: ce(e, t)
|
|
518
518
|
}));
|
|
519
519
|
return l.plan && e.splice(-1, 0, {
|
|
520
520
|
type: "countdown",
|
|
521
|
-
label:
|
|
521
|
+
label: ce("countdown", t)
|
|
522
522
|
}), e;
|
|
523
|
-
}),
|
|
523
|
+
}), j = v(() => r.map((e) => ({
|
|
524
524
|
type: `custom:${e.type}`,
|
|
525
525
|
label: e.name,
|
|
526
526
|
isCustom: !0,
|
|
527
527
|
icon: e.icon
|
|
528
|
-
}))),
|
|
529
|
-
|
|
530
|
-
for (let t of e)
|
|
528
|
+
}))), M = v(() => [...O.value, ...j.value]), F = v(() => Dn(M.value, i)), I = v(() => F.value.items), L = /* @__PURE__ */ new Set();
|
|
529
|
+
P(() => F.value.unknown, (e) => {
|
|
530
|
+
for (let t of e) L.has(t) || (L.add(t), ve.warn(`config.paletteBlocks: "${t}" is not a built-in or registered custom block (use the "custom:" prefix for custom blocks) — skipping it in the palette.`));
|
|
531
531
|
}, { immediate: !0 });
|
|
532
|
-
function
|
|
532
|
+
function z(e) {
|
|
533
533
|
if (e.isCustom) {
|
|
534
534
|
let t = e.type.replace("custom:", ""), n = r.find((e) => e.type === t);
|
|
535
|
-
if (n) return
|
|
535
|
+
if (n) return te(n);
|
|
536
536
|
}
|
|
537
|
-
return
|
|
537
|
+
return R(e.type, a);
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function B(e) {
|
|
540
540
|
if (!c) return;
|
|
541
|
-
let t =
|
|
541
|
+
let t = z(e);
|
|
542
542
|
c.addBlock(t), c.selectBlock(t.id);
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
(e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
544
|
+
function V(e, t) {
|
|
545
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), B(t));
|
|
546
546
|
}
|
|
547
547
|
return (e, r) => (s(), y("aside", {
|
|
548
548
|
"aria-label": x(t).sidebarNav.palette,
|
|
549
549
|
class: "tpl-sidebar-rail tpl:absolute tpl:top-14 tpl:bottom-0 tpl:left-0 tpl:z-40 tpl:flex tpl:flex-col tpl:overflow-hidden",
|
|
550
|
-
style:
|
|
550
|
+
style: _({
|
|
551
551
|
width: h.value ? "200px" : "48px",
|
|
552
552
|
backgroundColor: "var(--tpl-bg-elevated)",
|
|
553
553
|
borderRight: "1px solid var(--tpl-border)",
|
|
@@ -558,49 +558,49 @@ var On = ["aria-label"], kn = {
|
|
|
558
558
|
onMouseleave: S,
|
|
559
559
|
onFocusin: r[2] ||= (e) => h.value = !0,
|
|
560
560
|
onFocusout: r[3] ||= (e) => h.value = !1
|
|
561
|
-
}, [p.value ? (s(), y("div", kn, [
|
|
561
|
+
}, [p.value ? (s(), y("div", kn, [E("button", {
|
|
562
562
|
type: "button",
|
|
563
563
|
"aria-label": x(t).sidebarNav.browseSavedBlocks,
|
|
564
564
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)]",
|
|
565
|
-
style:
|
|
565
|
+
style: _({ justifyContent: h.value ? "flex-start" : "center" }),
|
|
566
566
|
onClick: r[0] ||= (e) => x(l).savedBlocks?.openBrowser()
|
|
567
|
-
}, [
|
|
567
|
+
}, [N(x(yt), {
|
|
568
568
|
size: 20,
|
|
569
569
|
"stroke-width": 1.5,
|
|
570
570
|
class: "tpl:shrink-0"
|
|
571
|
-
}), h.value ? (s(), y("span", jn,
|
|
572
|
-
"model-value":
|
|
571
|
+
}), h.value ? (s(), y("span", jn, C(x(t).savedBlocks.title), 1)) : b("", !0)], 12, An)])) : b("", !0), N(x(k), {
|
|
572
|
+
"model-value": I.value,
|
|
573
573
|
group: {
|
|
574
574
|
name: "blocks",
|
|
575
575
|
pull: "clone",
|
|
576
576
|
put: !1
|
|
577
577
|
},
|
|
578
|
-
clone:
|
|
578
|
+
clone: z,
|
|
579
579
|
sort: !1,
|
|
580
580
|
animation: 150,
|
|
581
581
|
"force-fallback": !0,
|
|
582
582
|
class: "tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl:gap-0.5 tpl:overflow-y-auto tpl:p-1",
|
|
583
|
-
onChoose:
|
|
584
|
-
onEnd:
|
|
583
|
+
onChoose: T,
|
|
584
|
+
onEnd: ee
|
|
585
585
|
}, {
|
|
586
|
-
default: f(() => [(s(!0), y(
|
|
586
|
+
default: f(() => [(s(!0), y(A, null, u(I.value, (e) => (s(), y("button", {
|
|
587
587
|
key: e.type,
|
|
588
588
|
type: "button",
|
|
589
589
|
"data-palette-type": e.type,
|
|
590
590
|
"aria-label": x(n)(x(t).sidebarNav.insertBlock, { block: e.label }),
|
|
591
591
|
class: "tpl:flex tpl:h-10 tpl:w-full tpl:shrink-0 tpl:cursor-grab tpl:items-center tpl:gap-3 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-3 tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] active:tpl:cursor-grabbing",
|
|
592
|
-
style:
|
|
593
|
-
onClick: (t) =>
|
|
594
|
-
onKeydown: (t) =>
|
|
595
|
-
}, [
|
|
592
|
+
style: _({ justifyContent: h.value ? "flex-start" : "center" }),
|
|
593
|
+
onClick: (t) => B(e),
|
|
594
|
+
onKeydown: (t) => V(t, e)
|
|
595
|
+
}, [E("div", Nn, [x(Yt)[e.type] ? (s(), w(o(x(Yt)[e.type]), {
|
|
596
596
|
key: 0,
|
|
597
597
|
size: 20,
|
|
598
598
|
"stroke-width": 1.5
|
|
599
|
-
})) : e.isCustom ? (s(),
|
|
599
|
+
})) : e.isCustom ? (s(), w(le, {
|
|
600
600
|
key: 1,
|
|
601
601
|
icon: e.icon,
|
|
602
602
|
size: 20
|
|
603
|
-
}, null, 8, ["icon"])) : b("", !0)]), h.value ? (s(), y("span", Pn,
|
|
603
|
+
}, null, 8, ["icon"])) : b("", !0)]), h.value ? (s(), y("span", Pn, C(e.label), 1)) : b("", !0)], 44, Mn))), 128))]),
|
|
604
604
|
_: 1
|
|
605
605
|
}, 8, ["model-value"])], 44, On));
|
|
606
606
|
}
|
|
@@ -664,7 +664,7 @@ var Bn = /* @__PURE__ */ new Set([
|
|
|
664
664
|
"End"
|
|
665
665
|
]);
|
|
666
666
|
function Vn(e) {
|
|
667
|
-
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: c, enabled: u, onInsert: f } = e, p =
|
|
667
|
+
let { elementRef: t, modelValue: r, emit: o, mergeTags: s, syntax: c, enabled: u, onInsert: f } = e, p = ne(c), m = z(c), h = u && p !== null && s.length > 0, g = d(Pe, null), _ = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = it(), y = nn(_, v), b = !1;
|
|
668
668
|
n() && i(() => {
|
|
669
669
|
b = !0, y.close();
|
|
670
670
|
});
|
|
@@ -692,7 +692,7 @@ function Vn(e) {
|
|
|
692
692
|
y.close();
|
|
693
693
|
return;
|
|
694
694
|
}
|
|
695
|
-
let r =
|
|
695
|
+
let r = rn(s, n.query), i = () => zn(e, n.triggerStart), a = (t) => S(e, n, t);
|
|
696
696
|
y.isOpen() ? y.update({
|
|
697
697
|
items: r,
|
|
698
698
|
getRect: i,
|
|
@@ -718,7 +718,7 @@ function Vn(e) {
|
|
|
718
718
|
//#endregion
|
|
719
719
|
//#region src/composables/useMergeTagField.ts
|
|
720
720
|
function Hn(e) {
|
|
721
|
-
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: p, autocomplete: h } =
|
|
721
|
+
let { modelValue: t, emit: r, elementRef: a } = e, { mergeTags: o, canRequestMergeTag: s, isRequesting: c, isMergeTagValue: u, getMergeTagLabel: d, requestMergeTag: f, syntax: p, autocomplete: h } = Wt(), { canInsertLogicTag: g, isRequesting: _, requestLogicTag: y } = oe(), b = m(!1), x = !1, S = !1;
|
|
722
722
|
n() && i(() => {
|
|
723
723
|
S = !0;
|
|
724
724
|
});
|
|
@@ -746,10 +746,10 @@ function Hn(e) {
|
|
|
746
746
|
type: "mergeTag",
|
|
747
747
|
value: t,
|
|
748
748
|
label: d(t)
|
|
749
|
-
}) :
|
|
749
|
+
}) : B(t, p) ? n.push({
|
|
750
750
|
type: "logicMergeTag",
|
|
751
751
|
value: t,
|
|
752
|
-
keyword:
|
|
752
|
+
keyword: L(t, p)
|
|
753
753
|
}) : n.push({
|
|
754
754
|
type: "text",
|
|
755
755
|
value: t
|
|
@@ -760,36 +760,36 @@ function Hn(e) {
|
|
|
760
760
|
value: e.slice(a)
|
|
761
761
|
}), n;
|
|
762
762
|
}), T = v(() => w.value.some((e) => e.type === "mergeTag" || e.type === "logicMergeTag"));
|
|
763
|
-
function
|
|
763
|
+
function ee() {
|
|
764
764
|
b.value = !0, l(() => {
|
|
765
765
|
a.value?.focus();
|
|
766
766
|
let e = t()?.length || 0;
|
|
767
767
|
a.value?.setSelectionRange(e, e);
|
|
768
768
|
});
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function E() {
|
|
771
771
|
x || (b.value = !1);
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function D(e) {
|
|
774
774
|
r(e.target.value), C.refresh();
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function O(e) {
|
|
777
777
|
if (C.handleKeydown(e)) {
|
|
778
778
|
e.preventDefault();
|
|
779
779
|
return;
|
|
780
780
|
}
|
|
781
|
-
e.key === "Escape" &&
|
|
781
|
+
e.key === "Escape" && E();
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function k() {
|
|
784
784
|
C.refresh();
|
|
785
785
|
}
|
|
786
|
-
function
|
|
787
|
-
C.close(),
|
|
786
|
+
function A() {
|
|
787
|
+
C.close(), E();
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function j() {
|
|
790
790
|
r("");
|
|
791
791
|
}
|
|
792
|
-
async function
|
|
792
|
+
async function M() {
|
|
793
793
|
let e = b.value && a.value ? a.value.selectionStart ?? t().length : t().length;
|
|
794
794
|
x = !0;
|
|
795
795
|
let n;
|
|
@@ -807,7 +807,7 @@ function Hn(e) {
|
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
async function
|
|
810
|
+
async function N() {
|
|
811
811
|
let e = a.value, n = e?.selectionStart ?? t().length, i = e?.selectionEnd ?? n;
|
|
812
812
|
x = !0;
|
|
813
813
|
let o;
|
|
@@ -830,15 +830,15 @@ function Hn(e) {
|
|
|
830
830
|
canInsertLogicTag: g,
|
|
831
831
|
isRequestingLogicTag: _,
|
|
832
832
|
isEditing: b,
|
|
833
|
-
startEditing:
|
|
834
|
-
stopEditing:
|
|
835
|
-
handleInput:
|
|
836
|
-
handleKeydown:
|
|
837
|
-
handleClick:
|
|
838
|
-
handleBlur:
|
|
839
|
-
clearValue:
|
|
840
|
-
insertMergeTag:
|
|
841
|
-
insertLogicTag:
|
|
833
|
+
startEditing: ee,
|
|
834
|
+
stopEditing: E,
|
|
835
|
+
handleInput: D,
|
|
836
|
+
handleKeydown: O,
|
|
837
|
+
handleClick: k,
|
|
838
|
+
handleBlur: A,
|
|
839
|
+
clearValue: j,
|
|
840
|
+
insertMergeTag: M,
|
|
841
|
+
insertLogicTag: N,
|
|
842
842
|
autocompleteAvailable: C.available
|
|
843
843
|
};
|
|
844
844
|
}
|
|
@@ -847,7 +847,7 @@ function Hn(e) {
|
|
|
847
847
|
var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip"], Kn = {
|
|
848
848
|
key: 2,
|
|
849
849
|
class: "tpl:text-sm tpl:text-[var(--tpl-text)]"
|
|
850
|
-
}, qn = ["aria-label", "title"], Jn = /* @__PURE__ */
|
|
850
|
+
}, qn = ["aria-label", "title"], Jn = /* @__PURE__ */ M({
|
|
851
851
|
__name: "MergeTagSegments",
|
|
852
852
|
props: {
|
|
853
853
|
segments: {},
|
|
@@ -856,7 +856,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
856
856
|
},
|
|
857
857
|
emits: ["edit", "clear"],
|
|
858
858
|
setup(e, { emit: t }) {
|
|
859
|
-
let n = t, { t: r } =
|
|
859
|
+
let n = t, { t: r } = U();
|
|
860
860
|
function i() {
|
|
861
861
|
n("edit");
|
|
862
862
|
}
|
|
@@ -864,10 +864,10 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
864
864
|
role: "button",
|
|
865
865
|
tabindex: "0",
|
|
866
866
|
"aria-label": x(r).mergeTag.clickToEdit,
|
|
867
|
-
class:
|
|
867
|
+
class: O([e.displayClass, { "tpl-pulse-fill": e.pulse }]),
|
|
868
868
|
onClick: i,
|
|
869
869
|
onKeydown: [g(i, ["enter"]), g(S(i, ["prevent"]), ["space"])]
|
|
870
|
-
}, [(s(!0), y(
|
|
870
|
+
}, [(s(!0), y(A, null, u(e.segments, (e, t) => (s(), y(A, { key: `${e.type}-${t}-${e.value}` }, [e.type === "mergeTag" ? (s(), y("span", {
|
|
871
871
|
key: 0,
|
|
872
872
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.9em] tpl:font-medium",
|
|
873
873
|
"data-tooltip": e.value,
|
|
@@ -875,7 +875,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
875
875
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-primary) 20%,\n transparent\n )",
|
|
876
876
|
color: "var(--tpl-primary)"
|
|
877
877
|
}
|
|
878
|
-
},
|
|
878
|
+
}, C(e.label), 9, Wn)) : e.type === "logicMergeTag" ? (s(), y("span", {
|
|
879
879
|
key: 1,
|
|
880
880
|
class: "tpl-tooltip tpl:inline-flex tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[0.8em] tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
881
881
|
"data-tooltip": e.value,
|
|
@@ -884,13 +884,13 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
884
884
|
border: "1.5px solid\n color-mix(in srgb, var(--tpl-primary) 50%, transparent)",
|
|
885
885
|
color: "var(--tpl-primary)"
|
|
886
886
|
}
|
|
887
|
-
},
|
|
887
|
+
}, C(e.keyword), 9, Gn)) : (s(), y("span", Kn, C(e.value), 1))], 64))), 128)), E("button", {
|
|
888
888
|
type: "button",
|
|
889
889
|
class: "tpl:ml-auto tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:bg-transparent tpl:p-0 tpl:text-[var(--tpl-text-dim)] tpl:opacity-60 tpl:transition-all hover:tpl:text-[var(--tpl-danger)] hover:tpl:opacity-100",
|
|
890
890
|
"aria-label": x(r).mergeTag.remove,
|
|
891
891
|
title: x(r).mergeTag.remove,
|
|
892
892
|
onClick: a[0] ||= S((e) => n("clear"), ["stop"])
|
|
893
|
-
}, [
|
|
893
|
+
}, [N(x(Mt), {
|
|
894
894
|
size: 12,
|
|
895
895
|
"stroke-width": 2.5
|
|
896
896
|
})], 8, qn)], 42, Un));
|
|
@@ -899,48 +899,48 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
899
899
|
"aria-label",
|
|
900
900
|
"title",
|
|
901
901
|
"disabled"
|
|
902
|
-
], Xn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", Zn = /* @__PURE__ */
|
|
902
|
+
], Xn = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", Zn = /* @__PURE__ */ M({
|
|
903
903
|
__name: "MergeTagInsertButton",
|
|
904
904
|
props: { disabled: { type: Boolean } },
|
|
905
905
|
emits: ["insert"],
|
|
906
906
|
setup(e) {
|
|
907
|
-
let { t } =
|
|
907
|
+
let { t } = U();
|
|
908
908
|
return (n, r) => (s(), y("button", {
|
|
909
909
|
type: "button",
|
|
910
|
-
class:
|
|
910
|
+
class: O([Xn, "tpl:mt-1.5"]),
|
|
911
911
|
"aria-label": x(t).mergeTag.insert,
|
|
912
912
|
title: x(t).mergeTag.insert,
|
|
913
913
|
disabled: e.disabled,
|
|
914
914
|
onMousedown: r[0] ||= S(() => {}, ["prevent"]),
|
|
915
915
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
916
|
-
}, [
|
|
916
|
+
}, [N(x(mt), {
|
|
917
917
|
size: 12,
|
|
918
918
|
"stroke-width": 2
|
|
919
|
-
}),
|
|
919
|
+
}), j(" " + C(x(t).mergeTag.insertShort), 1)], 42, Yn));
|
|
920
920
|
}
|
|
921
921
|
}), Qn = [
|
|
922
922
|
"aria-label",
|
|
923
923
|
"title",
|
|
924
924
|
"disabled"
|
|
925
|
-
], $n = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", er = /* @__PURE__ */
|
|
925
|
+
], $n = "tpl:flex tpl:items-center tpl:justify-center tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:px-2 tpl:py-1 tpl:text-xs tpl:text-[var(--tpl-text-muted)] tpl:transition-all tpl:duration-[120ms] hover:tpl:bg-[var(--tpl-primary-light)] hover:tpl:text-[var(--tpl-primary)] hover:tpl:border-[var(--tpl-primary)]", er = /* @__PURE__ */ M({
|
|
926
926
|
__name: "LogicTagInsertButton",
|
|
927
927
|
props: { disabled: { type: Boolean } },
|
|
928
928
|
emits: ["insert"],
|
|
929
929
|
setup(e) {
|
|
930
|
-
let { t } =
|
|
930
|
+
let { t } = U();
|
|
931
931
|
return (n, r) => (s(), y("button", {
|
|
932
932
|
type: "button",
|
|
933
|
-
class:
|
|
933
|
+
class: O([$n, "tpl:mt-1.5"]),
|
|
934
934
|
"aria-label": x(t).logicTag.insert,
|
|
935
935
|
title: x(t).logicTag.insert,
|
|
936
936
|
disabled: e.disabled,
|
|
937
937
|
"data-testid": "field-insert-logic-button",
|
|
938
938
|
onMousedown: r[0] ||= S(() => {}, ["prevent"]),
|
|
939
939
|
onClick: r[1] ||= (e) => n.$emit("insert")
|
|
940
|
-
}, [
|
|
940
|
+
}, [N(x(gt), {
|
|
941
941
|
size: 12,
|
|
942
942
|
"stroke-width": 2
|
|
943
|
-
}),
|
|
943
|
+
}), j(" " + C(x(t).logicTag.insertShort), 1)], 42, Qn));
|
|
944
944
|
}
|
|
945
945
|
}), tr = { key: 0 }, nr = {
|
|
946
946
|
key: 0,
|
|
@@ -952,7 +952,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
952
952
|
], ar = {
|
|
953
953
|
key: 0,
|
|
954
954
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
955
|
-
}, or = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs 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:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", sr = "tpl:flex tpl:w-full tpl:min-h-20 tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", cr = /* @__PURE__ */
|
|
955
|
+
}, or = "tpl:w-full tpl:resize-y tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs 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:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)] tpl:placeholder:text-[var(--tpl-text-dim)] tpl:focus:border-[var(--tpl-primary)] tpl:focus:shadow-[var(--tpl-ring)]", sr = "tpl:flex tpl:w-full tpl:min-h-20 tpl:cursor-pointer tpl:items-start tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", cr = /* @__PURE__ */ M({
|
|
956
956
|
__name: "MergeTagTextarea",
|
|
957
957
|
props: {
|
|
958
958
|
modelValue: {},
|
|
@@ -961,12 +961,12 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
961
961
|
},
|
|
962
962
|
emits: ["update:modelValue"],
|
|
963
963
|
setup(e, { emit: t }) {
|
|
964
|
-
let n = e, r = t, i = m(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: p, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: v, clearValue: S, insertMergeTag:
|
|
964
|
+
let n = e, r = t, i = m(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: p, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: v, clearValue: S, insertMergeTag: C, insertLogicTag: T } = Hn({
|
|
965
965
|
modelValue: () => n.modelValue,
|
|
966
966
|
emit: (e) => r("update:modelValue", e),
|
|
967
967
|
elementRef: i
|
|
968
968
|
});
|
|
969
|
-
return (t, n) => x(o) && !x(f) ? (s(), y("div", tr, [
|
|
969
|
+
return (t, n) => x(o) && !x(f) ? (s(), y("div", tr, [N(Jn, {
|
|
970
970
|
segments: x(a),
|
|
971
971
|
"display-class": sr,
|
|
972
972
|
onEdit: x(p),
|
|
@@ -975,18 +975,18 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
975
975
|
"segments",
|
|
976
976
|
"onEdit",
|
|
977
977
|
"onClear"
|
|
978
|
-
]), x(c) || x(u) ? (s(), y("div", nr, [x(c) ? (s(),
|
|
978
|
+
]), x(c) || x(u) ? (s(), y("div", nr, [x(c) ? (s(), w(Zn, {
|
|
979
979
|
key: 0,
|
|
980
980
|
disabled: x(l),
|
|
981
|
-
onInsert: x(
|
|
982
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(),
|
|
981
|
+
onInsert: x(C)
|
|
982
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(), w(er, {
|
|
983
983
|
key: 1,
|
|
984
984
|
disabled: x(d),
|
|
985
985
|
onInsert: x(T)
|
|
986
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : b("", !0)])) : (s(), y("div", rr, [
|
|
986
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : b("", !0)])) : (s(), y("div", rr, [E("textarea", {
|
|
987
987
|
ref_key: "textareaRef",
|
|
988
988
|
ref: i,
|
|
989
|
-
class:
|
|
989
|
+
class: O(or),
|
|
990
990
|
value: e.modelValue,
|
|
991
991
|
placeholder: e.placeholder,
|
|
992
992
|
rows: e.rows,
|
|
@@ -994,22 +994,22 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
994
994
|
onKeydown: n[1] ||= (...e) => x(g) && x(g)(...e),
|
|
995
995
|
onClick: n[2] ||= (...e) => x(_) && x(_)(...e),
|
|
996
996
|
onBlur: n[3] ||= (...e) => x(v) && x(v)(...e)
|
|
997
|
-
}, null, 40, ir), x(c) || x(u) ? (s(), y("div", ar, [x(c) ? (s(),
|
|
997
|
+
}, null, 40, ir), x(c) || x(u) ? (s(), y("div", ar, [x(c) ? (s(), w(Zn, {
|
|
998
998
|
key: 0,
|
|
999
999
|
disabled: x(l),
|
|
1000
|
-
onInsert: x(
|
|
1001
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(),
|
|
1000
|
+
onInsert: x(C)
|
|
1001
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(), w(er, {
|
|
1002
1002
|
key: 1,
|
|
1003
1003
|
disabled: x(d),
|
|
1004
1004
|
onInsert: x(T)
|
|
1005
1005
|
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : b("", !0)]));
|
|
1006
1006
|
}
|
|
1007
|
-
}), lr = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, ur = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, dr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, fr = { class: "tpl:mb-3.5" }, pr = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, mr = ["onClick"], hr = { class: "tpl:flex tpl:items-stretch" }, gr = ["value"], _r = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vr = { class: "tpl:mb-3.5" }, yr = { class: "tpl:mb-3.5" }, br = { class: "tpl:mb-3.5" }, xr = { class: "tpl:mb-3.5" }, Sr = ["value"], Cr = ["value"], wr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tr = ["value"], Er = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Dr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Or = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, kr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Ar = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, jr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Mr = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, Nr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Pr = { class: "tpl:mb-1 tpl:last:mb-0" }, Fr = { class: "tpl:mb-1 tpl:last:mb-0" }, Ir = { class: "tpl:mb-1 tpl:last:mb-0" }, Lr = 150, Rr = /* @__PURE__ */
|
|
1007
|
+
}), lr = { class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]" }, ur = { class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:gap-3 tpl:overflow-y-auto tpl:p-4" }, dr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, fr = { class: "tpl:mb-3.5" }, pr = { class: "tpl:grid tpl:grid-cols-4 tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, mr = ["onClick"], hr = { class: "tpl:flex tpl:items-stretch" }, gr = ["value"], _r = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vr = { class: "tpl:mb-3.5" }, yr = { class: "tpl:mb-3.5" }, br = { class: "tpl:mb-3.5" }, xr = { class: "tpl:mb-3.5" }, Sr = ["value"], Cr = ["value"], wr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tr = ["value"], Er = { class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Dr = { class: "tpl:mb-3.5 tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Or = { class: "tpl:mt-1 tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, kr = { class: "tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Ar = { class: "tpl:shrink-0 tpl:text-xs tpl:tabular-nums tpl:text-[var(--tpl-text-dim)]" }, jr = { class: "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3" }, Mr = { class: "tpl:mb-2.5 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text-muted)]" }, Nr = { class: "tpl:m-0 tpl:pl-[18px] tpl:text-xs tpl:leading-relaxed tpl:text-[var(--tpl-text-dim)]" }, Pr = { class: "tpl:mb-1 tpl:last:mb-0" }, Fr = { class: "tpl:mb-1 tpl:last:mb-0" }, Ir = { class: "tpl:mb-1 tpl:last:mb-0" }, Lr = 150, Rr = /* @__PURE__ */ M({
|
|
1008
1008
|
__name: "TemplateSettings",
|
|
1009
1009
|
props: { settings: {} },
|
|
1010
1010
|
emits: ["update"],
|
|
1011
1011
|
setup(e, { emit: t }) {
|
|
1012
|
-
let n = e, r = t, { t: i } =
|
|
1012
|
+
let n = e, r = t, { t: i } = U(), a = Ne(nt, "TemplateSettings"), o = v(() => a.fonts.value), c = v(() => o.value.some((e) => e.value === n.settings.fontFamily) ? n.settings.fontFamily : a.defaultFont.value), l = [
|
|
1013
1013
|
{
|
|
1014
1014
|
value: 480,
|
|
1015
1015
|
label: "480px"
|
|
@@ -1027,77 +1027,77 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1027
1027
|
label: "800px"
|
|
1028
1028
|
}
|
|
1029
1029
|
];
|
|
1030
|
-
return (t, n) => (s(), y("aside", lr, [
|
|
1031
|
-
|
|
1032
|
-
|
|
1030
|
+
return (t, n) => (s(), y("aside", lr, [E("div", ur, [
|
|
1031
|
+
E("div", { class: O(x(tn)) }, [
|
|
1032
|
+
E("div", dr, [N(x(zt), {
|
|
1033
1033
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1034
1034
|
size: 14,
|
|
1035
1035
|
"stroke-width": 2
|
|
1036
|
-
}),
|
|
1037
|
-
|
|
1036
|
+
}), E("span", null, C(x(i).templateSettings.layout), 1)]),
|
|
1037
|
+
E("div", fr, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.widthPreset), 3), E("div", pr, [(s(), y(A, null, u(l, (t) => E("button", {
|
|
1038
1038
|
key: t.value,
|
|
1039
1039
|
class: "tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-2 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]",
|
|
1040
|
-
style:
|
|
1040
|
+
style: _({
|
|
1041
1041
|
backgroundColor: e.settings.width === t.value ? "var(--tpl-bg)" : "transparent",
|
|
1042
1042
|
color: e.settings.width === t.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
1043
1043
|
boxShadow: e.settings.width === t.value ? "var(--tpl-shadow)" : "none"
|
|
1044
1044
|
}),
|
|
1045
1045
|
onClick: (e) => r("update", { width: t.value })
|
|
1046
|
-
},
|
|
1047
|
-
|
|
1046
|
+
}, C(t.label), 13, mr)), 64))])]),
|
|
1047
|
+
E("div", null, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.customWidth), 3), E("div", hr, [E("input", {
|
|
1048
1048
|
type: "number",
|
|
1049
|
-
class:
|
|
1049
|
+
class: O(x(J)),
|
|
1050
1050
|
value: e.settings.width,
|
|
1051
1051
|
min: "300",
|
|
1052
1052
|
max: "900",
|
|
1053
1053
|
onInput: n[0] ||= (e) => r("update", { width: Number(e.target.value) })
|
|
1054
|
-
}, null, 42, gr),
|
|
1054
|
+
}, null, 42, gr), E("span", { class: O(x(q)) }, "px", 2)])])
|
|
1055
1055
|
], 2),
|
|
1056
|
-
|
|
1057
|
-
|
|
1056
|
+
E("div", { class: O(x(tn)) }, [
|
|
1057
|
+
E("div", _r, [N(x(ot), {
|
|
1058
1058
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1059
1059
|
size: 14,
|
|
1060
1060
|
"stroke-width": 2
|
|
1061
|
-
}),
|
|
1062
|
-
|
|
1061
|
+
}), E("span", null, C(x(i).templateSettings.appearance), 1)]),
|
|
1062
|
+
E("div", vr, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.backgroundColor), 3), N(Y, {
|
|
1063
1063
|
"model-value": e.settings.backgroundColor,
|
|
1064
|
-
placeholder: x(
|
|
1064
|
+
placeholder: x(en),
|
|
1065
1065
|
"onUpdate:modelValue": n[1] ||= (e) => r("update", { backgroundColor: e })
|
|
1066
1066
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
1067
|
-
|
|
1067
|
+
E("div", yr, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.textColor), 3), N(Y, {
|
|
1068
1068
|
"model-value": e.settings.textColor ?? "",
|
|
1069
1069
|
"seed-color": "#1a1a1a",
|
|
1070
1070
|
"onUpdate:modelValue": n[2] ||= (e) => r("update", { textColor: e })
|
|
1071
1071
|
}, null, 8, ["model-value"])]),
|
|
1072
|
-
|
|
1072
|
+
E("div", br, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.linkColor), 3), N(Y, {
|
|
1073
1073
|
"model-value": e.settings.linkColor ?? "",
|
|
1074
1074
|
"seed-color": "#0066cc",
|
|
1075
1075
|
"onUpdate:modelValue": n[3] ||= (e) => r("update", { linkColor: e || void 0 })
|
|
1076
1076
|
}, null, 8, ["model-value"])]),
|
|
1077
|
-
|
|
1077
|
+
E("div", xr, [N(X, {
|
|
1078
1078
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1079
1079
|
"model-value": e.settings.linkUnderline,
|
|
1080
1080
|
label: x(i).templateSettings.linkUnderline,
|
|
1081
1081
|
"onUpdate:modelValue": n[4] ||= (e) => r("update", { linkUnderline: e })
|
|
1082
1082
|
}, null, 8, ["model-value", "label"])]),
|
|
1083
|
-
|
|
1084
|
-
class:
|
|
1083
|
+
E("div", null, [E("label", { class: O(x(K)) }, C(x(i).templateSettings.fontFamily), 3), E("select", {
|
|
1084
|
+
class: O(x(G)),
|
|
1085
1085
|
value: c.value,
|
|
1086
1086
|
onChange: n[5] ||= (e) => r("update", { fontFamily: e.target.value })
|
|
1087
|
-
}, [(s(!0), y(
|
|
1087
|
+
}, [(s(!0), y(A, null, u(o.value, (e) => (s(), y("option", {
|
|
1088
1088
|
key: e.value,
|
|
1089
1089
|
value: e.value
|
|
1090
|
-
},
|
|
1090
|
+
}, C(e.label), 9, Cr))), 128))], 42, Sr)])
|
|
1091
1091
|
], 2),
|
|
1092
|
-
|
|
1092
|
+
E("div", { class: O(x(tn)) }, [E("div", wr, [N(x(xt), {
|
|
1093
1093
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1094
1094
|
size: 14,
|
|
1095
1095
|
"stroke-width": 2
|
|
1096
|
-
}),
|
|
1097
|
-
|
|
1098
|
-
|
|
1096
|
+
}), E("span", null, C(x(i).templateSettings.language), 1)]), E("div", null, [
|
|
1097
|
+
E("label", { class: O(x(K)) }, C(x(i).templateSettings.contentLocale), 3),
|
|
1098
|
+
E("input", {
|
|
1099
1099
|
type: "text",
|
|
1100
|
-
class:
|
|
1100
|
+
class: O(x(G)),
|
|
1101
1101
|
value: e.settings.locale ?? "",
|
|
1102
1102
|
placeholder: "en",
|
|
1103
1103
|
spellcheck: "false",
|
|
@@ -1105,25 +1105,25 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1105
1105
|
autocomplete: "off",
|
|
1106
1106
|
onInput: n[6] ||= (e) => r("update", { locale: e.target.value.trim() || void 0 })
|
|
1107
1107
|
}, null, 42, Tr),
|
|
1108
|
-
|
|
1108
|
+
E("p", Er, C(x(i).templateSettings.contentLocaleHint), 1)
|
|
1109
1109
|
])], 2),
|
|
1110
|
-
|
|
1110
|
+
E("div", { class: O(x(tn)) }, [E("div", Dr, [N(x(Bt), {
|
|
1111
1111
|
class: "tpl:text-[var(--tpl-text-muted)]",
|
|
1112
1112
|
size: 14,
|
|
1113
1113
|
"stroke-width": 2
|
|
1114
|
-
}),
|
|
1114
|
+
}), E("span", null, C(x(i).templateSettings.preheaderText), 1)]), E("div", null, [N(cr, {
|
|
1115
1115
|
"model-value": e.settings.preheaderText ?? "",
|
|
1116
1116
|
placeholder: x(i).templateSettings.preheaderTextPlaceholder,
|
|
1117
1117
|
rows: 2,
|
|
1118
1118
|
"onUpdate:modelValue": n[7] ||= (e) => r("update", { preheaderText: e.replace(/[\r\n]/g, " ") || void 0 })
|
|
1119
|
-
}, null, 8, ["model-value", "placeholder"]),
|
|
1120
|
-
|
|
1119
|
+
}, null, 8, ["model-value", "placeholder"]), E("div", Or, [E("span", kr, C(x(i).templateSettings.preheaderTextHint), 1), E("span", Ar, C((e.settings.preheaderText ?? "").length) + "/" + C(Lr), 1)])])], 2),
|
|
1120
|
+
E("div", jr, [E("div", Mr, [N(x(wt), {
|
|
1121
1121
|
size: 14,
|
|
1122
1122
|
"stroke-width": 2
|
|
1123
|
-
}),
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1123
|
+
}), E("span", null, C(x(i).templateSettings.tips), 1)]), E("ul", Nr, [
|
|
1124
|
+
E("li", Pr, C(x(i).templateSettings.tip1), 1),
|
|
1125
|
+
E("li", Fr, C(x(i).templateSettings.tip2), 1),
|
|
1126
|
+
E("li", Ir, C(x(i).templateSettings.tip3), 1)
|
|
1127
1127
|
])])
|
|
1128
1128
|
])]));
|
|
1129
1129
|
}
|
|
@@ -1137,7 +1137,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1137
1137
|
], Ur = {
|
|
1138
1138
|
key: 0,
|
|
1139
1139
|
class: "tpl:flex tpl:flex-wrap tpl:gap-1.5"
|
|
1140
|
-
}, Wr = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", $ = /*#__PURE__*/
|
|
1140
|
+
}, Wr = "tpl:flex tpl:w-full tpl:min-h-10 tpl:cursor-pointer tpl:items-center tpl:flex-wrap tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:shadow-xs tpl:bg-[var(--tpl-bg)] tpl:border-[var(--tpl-border)] tpl:px-3.5 tpl:py-1.5 tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", $ = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
1141
1141
|
__name: "MergeTagInput",
|
|
1142
1142
|
props: {
|
|
1143
1143
|
modelValue: {},
|
|
@@ -1150,12 +1150,12 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1150
1150
|
},
|
|
1151
1151
|
emits: ["update:modelValue"],
|
|
1152
1152
|
setup(e, { emit: t }) {
|
|
1153
|
-
let n = e, r = t, i = m(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: p, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: v, clearValue: S, insertMergeTag:
|
|
1153
|
+
let n = e, r = t, i = m(null), { segments: a, hasMergeTags: o, canRequestMergeTag: c, isRequestingMergeTag: l, canInsertLogicTag: u, isRequestingLogicTag: d, isEditing: f, startEditing: p, handleInput: h, handleKeydown: g, handleClick: _, handleBlur: v, clearValue: S, insertMergeTag: C, insertLogicTag: T } = Hn({
|
|
1154
1154
|
modelValue: () => n.modelValue,
|
|
1155
1155
|
emit: (e) => r("update:modelValue", e),
|
|
1156
1156
|
elementRef: i
|
|
1157
1157
|
});
|
|
1158
|
-
return (t, n) => x(o) && !x(f) ? (s(), y("div", zr, [
|
|
1158
|
+
return (t, n) => x(o) && !x(f) ? (s(), y("div", zr, [N(Jn, {
|
|
1159
1159
|
segments: x(a),
|
|
1160
1160
|
"display-class": Wr,
|
|
1161
1161
|
pulse: e.pulse,
|
|
@@ -1166,30 +1166,30 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1166
1166
|
"pulse",
|
|
1167
1167
|
"onEdit",
|
|
1168
1168
|
"onClear"
|
|
1169
|
-
]), x(c) || x(u) ? (s(), y("div", Br, [x(c) ? (s(),
|
|
1169
|
+
]), x(c) || x(u) ? (s(), y("div", Br, [x(c) ? (s(), w(Zn, {
|
|
1170
1170
|
key: 0,
|
|
1171
1171
|
disabled: x(l),
|
|
1172
|
-
onInsert: x(
|
|
1173
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(),
|
|
1172
|
+
onInsert: x(C)
|
|
1173
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(), w(er, {
|
|
1174
1174
|
key: 1,
|
|
1175
1175
|
disabled: x(d),
|
|
1176
1176
|
onInsert: x(T)
|
|
1177
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : b("", !0)])) : (s(), y("div", Vr, [
|
|
1177
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0)])) : b("", !0)])) : (s(), y("div", Vr, [E("input", {
|
|
1178
1178
|
ref_key: "inputRef",
|
|
1179
1179
|
ref: i,
|
|
1180
1180
|
type: e.type,
|
|
1181
|
-
class:
|
|
1181
|
+
class: O([x(G), { "tpl-pulse-fill": e.pulse }]),
|
|
1182
1182
|
value: e.modelValue,
|
|
1183
1183
|
placeholder: e.placeholder,
|
|
1184
1184
|
onInput: n[0] ||= (...e) => x(h) && x(h)(...e),
|
|
1185
1185
|
onKeydown: n[1] ||= (...e) => x(g) && x(g)(...e),
|
|
1186
1186
|
onClick: n[2] ||= (...e) => x(_) && x(_)(...e),
|
|
1187
1187
|
onBlur: n[3] ||= (...e) => x(v) && x(v)(...e)
|
|
1188
|
-
}, null, 42, Hr), x(c) || x(u) ? (s(), y("div", Ur, [x(c) ? (s(),
|
|
1188
|
+
}, null, 42, Hr), x(c) || x(u) ? (s(), y("div", Ur, [x(c) ? (s(), w(Zn, {
|
|
1189
1189
|
key: 0,
|
|
1190
1190
|
disabled: x(l),
|
|
1191
|
-
onInsert: x(
|
|
1192
|
-
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(),
|
|
1191
|
+
onInsert: x(C)
|
|
1192
|
+
}, null, 8, ["disabled", "onInsert"])) : b("", !0), x(u) ? (s(), w(er, {
|
|
1193
1193
|
key: 1,
|
|
1194
1194
|
disabled: x(d),
|
|
1195
1195
|
onInsert: x(T)
|
|
@@ -1198,7 +1198,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1198
1198
|
}), [["__scopeId", "data-v-d6563be6"]]), Gr = { class: "tpl:mb-3.5" }, Kr = ["value"], qr = { value: "" }, Jr = ["value"], Yr = { class: "tpl:mb-3.5" }, Xr = { class: "tpl:mb-3.5" }, Zr = { class: "tpl:mb-3.5" }, Qr = { class: "tpl:mb-3.5" }, $r = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, ei = { class: "tpl:mb-3.5" }, ti = { class: "tpl:flex tpl:items-stretch" }, ni = ["value"], ri = { class: "tpl:mb-3.5" }, ii = { class: "tpl:flex tpl:items-stretch" }, ai = ["value"], oi = { class: "tpl:mb-3.5" }, si = ["value"], ci = { value: "auto" }, li = { value: "full" }, ui = { value: "custom" }, di = {
|
|
1199
1199
|
key: 0,
|
|
1200
1200
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
1201
|
-
}, fi = ["value"], pi =
|
|
1201
|
+
}, fi = ["value"], pi = { class: "tpl:mb-3.5" }, mi = 200, hi = /* @__PURE__ */ M({
|
|
1202
1202
|
__name: "ButtonToolbar",
|
|
1203
1203
|
props: {
|
|
1204
1204
|
block: {},
|
|
@@ -1206,7 +1206,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1206
1206
|
},
|
|
1207
1207
|
emits: ["update"],
|
|
1208
1208
|
setup(e, { emit: t }) {
|
|
1209
|
-
let n = e, r = t, { t: i } =
|
|
1209
|
+
let n = e, r = t, { t: i } = U(), a = v(() => n.block.width === "full" ? "full" : typeof n.block.width == "number" ? "custom" : "auto");
|
|
1210
1210
|
function o(e, t) {
|
|
1211
1211
|
r("update", { [e]: t });
|
|
1212
1212
|
}
|
|
@@ -1216,7 +1216,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1216
1216
|
return;
|
|
1217
1217
|
}
|
|
1218
1218
|
if (e === "custom") {
|
|
1219
|
-
o("width", typeof n.block.width == "number" ? n.block.width :
|
|
1219
|
+
o("width", typeof n.block.width == "number" ? n.block.width : mi);
|
|
1220
1220
|
return;
|
|
1221
1221
|
}
|
|
1222
1222
|
o("width", void 0);
|
|
@@ -1225,29 +1225,29 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1225
1225
|
let t = Number(e);
|
|
1226
1226
|
!Number.isFinite(t) || t <= 0 || o("width", t);
|
|
1227
1227
|
}
|
|
1228
|
-
return (t, n) => (s(), y(
|
|
1229
|
-
|
|
1230
|
-
class:
|
|
1228
|
+
return (t, n) => (s(), y(A, null, [
|
|
1229
|
+
E("div", Gr, [E("label", { class: O(x(K)) }, C(x(i).button.fontFamily), 3), E("select", {
|
|
1230
|
+
class: O(x(G)),
|
|
1231
1231
|
value: e.block.fontFamily || "",
|
|
1232
1232
|
onChange: n[0] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
1233
|
-
}, [
|
|
1233
|
+
}, [E("option", qr, C(x(i).button.inheritFont), 1), (s(!0), y(A, null, u(e.fontFamilies, (e) => (s(), y("option", {
|
|
1234
1234
|
key: e.value,
|
|
1235
1235
|
value: e.value
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1236
|
+
}, C(e.label), 9, Jr))), 128))], 42, Kr)]),
|
|
1237
|
+
E("div", Yr, [E("label", { class: O(x(K)) }, C(x(i).button.text), 3), N($, {
|
|
1238
1238
|
"model-value": e.block.text,
|
|
1239
1239
|
type: "text",
|
|
1240
1240
|
"onUpdate:modelValue": n[1] ||= (e) => o("text", e)
|
|
1241
1241
|
}, null, 8, ["model-value"])]),
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1242
|
+
E("div", Xr, [
|
|
1243
|
+
E("label", { class: O(x(K)) }, C(x(i).button.url), 3),
|
|
1244
|
+
N($, {
|
|
1245
1245
|
"model-value": e.block.url,
|
|
1246
1246
|
type: "url",
|
|
1247
1247
|
placeholder: x(i).button.urlPlaceholder,
|
|
1248
1248
|
"onUpdate:modelValue": n[2] ||= (e) => o("url", e)
|
|
1249
1249
|
}, null, 8, ["model-value", "placeholder"]),
|
|
1250
|
-
e.block.url ? (s(),
|
|
1250
|
+
e.block.url ? (s(), w(X, {
|
|
1251
1251
|
key: 0,
|
|
1252
1252
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
1253
1253
|
"model-value": e.block.openInNewTab ?? !1,
|
|
@@ -1255,51 +1255,69 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1255
1255
|
"onUpdate:modelValue": n[3] ||= (e) => o("openInNewTab", e)
|
|
1256
1256
|
}, null, 8, ["model-value", "label"])) : b("", !0)
|
|
1257
1257
|
]),
|
|
1258
|
-
|
|
1258
|
+
E("div", Zr, [E("label", { class: O(x(K)) }, C(x(i).button.background), 3), N(Y, {
|
|
1259
1259
|
"model-value": e.block.backgroundColor,
|
|
1260
1260
|
"onUpdate:modelValue": n[4] ||= (e) => o("backgroundColor", e)
|
|
1261
1261
|
}, null, 8, ["model-value"])]),
|
|
1262
|
-
|
|
1262
|
+
E("div", Qr, [E("label", { class: O(x(K)) }, C(x(i).button.textColor), 3), N(Y, {
|
|
1263
1263
|
"model-value": e.block.textColor,
|
|
1264
1264
|
"onUpdate:modelValue": n[5] ||= (e) => o("textColor", e)
|
|
1265
1265
|
}, null, 8, ["model-value"])]),
|
|
1266
|
-
|
|
1266
|
+
E("div", $r, [E("div", ei, [E("label", { class: O(x(K)) }, C(x(i).button.borderRadius), 3), E("div", ti, [E("input", {
|
|
1267
1267
|
type: "number",
|
|
1268
|
-
class:
|
|
1268
|
+
class: O(x(J)),
|
|
1269
1269
|
value: e.block.borderRadius,
|
|
1270
1270
|
min: "0",
|
|
1271
1271
|
max: "50",
|
|
1272
1272
|
onInput: n[6] ||= (e) => o("borderRadius", Number(e.target.value))
|
|
1273
|
-
}, null, 42, ni),
|
|
1273
|
+
}, null, 42, ni), E("span", { class: O(x(q)) }, "px", 2)])]), E("div", ri, [E("label", { class: O(x(K)) }, C(x(i).button.fontSize), 3), E("div", ii, [E("input", {
|
|
1274
1274
|
type: "number",
|
|
1275
|
-
class:
|
|
1275
|
+
class: O(x(J)),
|
|
1276
1276
|
value: e.block.fontSize,
|
|
1277
1277
|
min: "10",
|
|
1278
1278
|
max: "36",
|
|
1279
1279
|
onInput: n[7] ||= (e) => o("fontSize", Number(e.target.value))
|
|
1280
|
-
}, null, 42, ai),
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
class:
|
|
1280
|
+
}, null, 42, ai), E("span", { class: O(x(q)) }, "px", 2)])])]),
|
|
1281
|
+
E("div", oi, [
|
|
1282
|
+
E("label", { class: O(x(K)) }, C(x(i).button.width), 3),
|
|
1283
|
+
E("select", {
|
|
1284
|
+
class: O(x(G)),
|
|
1285
1285
|
value: a.value,
|
|
1286
1286
|
onChange: n[8] ||= (e) => c(e.target.value)
|
|
1287
1287
|
}, [
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1288
|
+
E("option", ci, C(x(i).button.widthAuto), 1),
|
|
1289
|
+
E("option", li, C(x(i).button.fullWidth), 1),
|
|
1290
|
+
E("option", ui, C(x(i).button.widthCustom), 1)
|
|
1291
1291
|
], 42, si),
|
|
1292
|
-
a.value === "custom" ? (s(), y("div", di, [
|
|
1292
|
+
a.value === "custom" ? (s(), y("div", di, [E("input", {
|
|
1293
1293
|
type: "number",
|
|
1294
|
-
class:
|
|
1295
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
1294
|
+
class: O(x(J)),
|
|
1295
|
+
value: typeof e.block.width == "number" ? e.block.width : mi,
|
|
1296
1296
|
min: "20",
|
|
1297
1297
|
onInput: n[9] ||= (e) => l(e.target.value)
|
|
1298
|
-
}, null, 42, fi),
|
|
1299
|
-
])
|
|
1298
|
+
}, null, 42, fi), E("span", { class: O(x(q)) }, "px", 2)])) : b("", !0)
|
|
1299
|
+
]),
|
|
1300
|
+
E("div", pi, [E("label", { class: O(x(K)) }, C(x(i).title.align), 3), N(Q, {
|
|
1301
|
+
options: [
|
|
1302
|
+
{
|
|
1303
|
+
value: "left",
|
|
1304
|
+
label: x(i).title.alignLeft
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
value: "center",
|
|
1308
|
+
label: x(i).title.alignCenter
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
value: "right",
|
|
1312
|
+
label: x(i).title.alignRight
|
|
1313
|
+
}
|
|
1314
|
+
],
|
|
1315
|
+
"model-value": e.block.align ?? "center",
|
|
1316
|
+
"onUpdate:modelValue": n[10] ||= (e) => o("align", e)
|
|
1317
|
+
}, null, 8, ["options", "model-value"])])
|
|
1300
1318
|
], 64));
|
|
1301
1319
|
}
|
|
1302
|
-
}),
|
|
1320
|
+
}), gi = { class: "spacing-control" }, _i = { class: "tpl:mb-2 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, vi = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-1.5" }, yi = { class: "tpl:flex tpl:items-center" }, bi = ["aria-label"], xi = ["value", "aria-label"], Si = ["aria-label"], Ci = { class: "tpl:flex tpl:items-center tpl:gap-2" }, wi = { class: "tpl:flex tpl:items-center" }, Ti = ["aria-label"], Ei = ["value", "aria-label"], Di = ["aria-label"], Oi = ["aria-label", "title"], ki = { class: "tpl:flex tpl:items-center" }, Ai = ["aria-label"], ji = ["value", "aria-label"], Mi = ["aria-label"], Ni = { class: "tpl:flex tpl:items-center" }, Pi = ["aria-label"], Fi = ["value", "aria-label"], Ii = ["aria-label"], Li = "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)] hover:tpl:bg-[var(--tpl-bg-hover)] hover:tpl:text-[var(--tpl-text)] active:tpl:bg-[var(--tpl-bg-active)]", Ri = "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] focus:tpl:border-[var(--tpl-primary)] focus:tpl:shadow-[var(--tpl-ring)]", zi = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
1303
1321
|
__name: "SpacingControl",
|
|
1304
1322
|
props: {
|
|
1305
1323
|
modelValue: {},
|
|
@@ -1307,8 +1325,8 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1307
1325
|
},
|
|
1308
1326
|
emits: ["update:modelValue"],
|
|
1309
1327
|
setup(e, { emit: t }) {
|
|
1310
|
-
let n = e, r = t, { t: i } =
|
|
1311
|
-
|
|
1328
|
+
let n = e, r = t, { t: i } = U(), a = v(() => n.modelValue.top === n.modelValue.right && n.modelValue.right === n.modelValue.bottom && n.modelValue.bottom === n.modelValue.left), o = m(a.value);
|
|
1329
|
+
P(a, (e) => {
|
|
1312
1330
|
!e && o.value && (o.value = !1);
|
|
1313
1331
|
});
|
|
1314
1332
|
function c(e, t) {
|
|
@@ -1346,130 +1364,130 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1346
1364
|
});
|
|
1347
1365
|
}
|
|
1348
1366
|
}
|
|
1349
|
-
return (t, n) => (s(), y("div",
|
|
1350
|
-
|
|
1351
|
-
|
|
1367
|
+
return (t, n) => (s(), y("div", gi, [E("label", _i, C(e.label), 1), E("div", vi, [
|
|
1368
|
+
E("div", yi, [
|
|
1369
|
+
E("button", {
|
|
1352
1370
|
"aria-label": x(i).spacingControl.decreaseTop,
|
|
1353
|
-
class:
|
|
1371
|
+
class: O([Li, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1354
1372
|
onClick: n[0] ||= (e) => c("top", -1)
|
|
1355
|
-
}, [
|
|
1373
|
+
}, [N(x(Tt), {
|
|
1356
1374
|
size: 12,
|
|
1357
1375
|
"stroke-width": 2
|
|
1358
|
-
})], 10,
|
|
1359
|
-
|
|
1376
|
+
})], 10, bi),
|
|
1377
|
+
E("input", {
|
|
1360
1378
|
type: "number",
|
|
1361
|
-
class:
|
|
1379
|
+
class: O(Ri),
|
|
1362
1380
|
value: e.modelValue.top,
|
|
1363
1381
|
"aria-label": x(i).spacingControl.top,
|
|
1364
1382
|
min: "0",
|
|
1365
1383
|
onInput: n[1] ||= (e) => l("top", Number(e.target.value))
|
|
1366
|
-
}, null, 40,
|
|
1367
|
-
|
|
1384
|
+
}, null, 40, xi),
|
|
1385
|
+
E("button", {
|
|
1368
1386
|
"aria-label": x(i).spacingControl.increaseTop,
|
|
1369
|
-
class:
|
|
1387
|
+
class: O([Li, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1370
1388
|
onClick: n[2] ||= (e) => c("top", 1)
|
|
1371
|
-
}, [
|
|
1389
|
+
}, [N(x(W), {
|
|
1372
1390
|
size: 12,
|
|
1373
1391
|
"stroke-width": 2
|
|
1374
|
-
})], 10,
|
|
1392
|
+
})], 10, Si)
|
|
1375
1393
|
]),
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1394
|
+
E("div", Ci, [
|
|
1395
|
+
E("div", wi, [
|
|
1396
|
+
E("button", {
|
|
1379
1397
|
"aria-label": x(i).spacingControl.decreaseLeft,
|
|
1380
|
-
class:
|
|
1398
|
+
class: O([Li, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1381
1399
|
onClick: n[3] ||= (e) => c("left", -1)
|
|
1382
|
-
}, [
|
|
1400
|
+
}, [N(x(Tt), {
|
|
1383
1401
|
size: 12,
|
|
1384
1402
|
"stroke-width": 2
|
|
1385
|
-
})], 10,
|
|
1386
|
-
|
|
1403
|
+
})], 10, Ti),
|
|
1404
|
+
E("input", {
|
|
1387
1405
|
type: "number",
|
|
1388
|
-
class:
|
|
1406
|
+
class: O(Ri),
|
|
1389
1407
|
value: e.modelValue.left,
|
|
1390
1408
|
"aria-label": x(i).spacingControl.left,
|
|
1391
1409
|
min: "0",
|
|
1392
1410
|
onInput: n[4] ||= (e) => l("left", Number(e.target.value))
|
|
1393
|
-
}, null, 40,
|
|
1394
|
-
|
|
1411
|
+
}, null, 40, Ei),
|
|
1412
|
+
E("button", {
|
|
1395
1413
|
"aria-label": x(i).spacingControl.increaseLeft,
|
|
1396
|
-
class:
|
|
1414
|
+
class: O([Li, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1397
1415
|
onClick: n[5] ||= (e) => c("left", 1)
|
|
1398
|
-
}, [
|
|
1416
|
+
}, [N(x(W), {
|
|
1399
1417
|
size: 12,
|
|
1400
1418
|
"stroke-width": 2
|
|
1401
|
-
})], 10,
|
|
1419
|
+
})], 10, Di)
|
|
1402
1420
|
]),
|
|
1403
|
-
|
|
1404
|
-
class:
|
|
1421
|
+
E("button", {
|
|
1422
|
+
class: O(["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)]", o.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)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
|
|
1405
1423
|
"aria-label": o.value ? x(i).spacingControl.unlock : x(i).spacingControl.lockAll,
|
|
1406
1424
|
title: o.value ? x(i).spacingControl.unlock : x(i).spacingControl.lockAll,
|
|
1407
1425
|
onClick: u
|
|
1408
|
-
}, [o.value ? (s(),
|
|
1426
|
+
}, [o.value ? (s(), w(x(Nt), {
|
|
1409
1427
|
key: 0,
|
|
1410
1428
|
size: 14,
|
|
1411
1429
|
"stroke-width": 2
|
|
1412
|
-
})) : (s(),
|
|
1430
|
+
})) : (s(), w(x(It), {
|
|
1413
1431
|
key: 1,
|
|
1414
1432
|
size: 14,
|
|
1415
1433
|
"stroke-width": 2
|
|
1416
|
-
}))], 10,
|
|
1417
|
-
|
|
1418
|
-
|
|
1434
|
+
}))], 10, Oi),
|
|
1435
|
+
E("div", ki, [
|
|
1436
|
+
E("button", {
|
|
1419
1437
|
"aria-label": x(i).spacingControl.decreaseRight,
|
|
1420
|
-
class:
|
|
1438
|
+
class: O([Li, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1421
1439
|
onClick: n[6] ||= (e) => c("right", -1)
|
|
1422
|
-
}, [
|
|
1440
|
+
}, [N(x(Tt), {
|
|
1423
1441
|
size: 12,
|
|
1424
1442
|
"stroke-width": 2
|
|
1425
|
-
})], 10,
|
|
1426
|
-
|
|
1443
|
+
})], 10, Ai),
|
|
1444
|
+
E("input", {
|
|
1427
1445
|
type: "number",
|
|
1428
|
-
class:
|
|
1446
|
+
class: O(Ri),
|
|
1429
1447
|
value: e.modelValue.right,
|
|
1430
1448
|
"aria-label": x(i).spacingControl.right,
|
|
1431
1449
|
min: "0",
|
|
1432
1450
|
onInput: n[7] ||= (e) => l("right", Number(e.target.value))
|
|
1433
|
-
}, null, 40,
|
|
1434
|
-
|
|
1451
|
+
}, null, 40, ji),
|
|
1452
|
+
E("button", {
|
|
1435
1453
|
"aria-label": x(i).spacingControl.increaseRight,
|
|
1436
|
-
class:
|
|
1454
|
+
class: O([Li, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1437
1455
|
onClick: n[8] ||= (e) => c("right", 1)
|
|
1438
|
-
}, [
|
|
1456
|
+
}, [N(x(W), {
|
|
1439
1457
|
size: 12,
|
|
1440
1458
|
"stroke-width": 2
|
|
1441
|
-
})], 10,
|
|
1459
|
+
})], 10, Mi)
|
|
1442
1460
|
])
|
|
1443
1461
|
]),
|
|
1444
|
-
|
|
1445
|
-
|
|
1462
|
+
E("div", Ni, [
|
|
1463
|
+
E("button", {
|
|
1446
1464
|
"aria-label": x(i).spacingControl.decreaseBottom,
|
|
1447
|
-
class:
|
|
1465
|
+
class: O([Li, "tpl:rounded-l-[var(--tpl-radius-sm)]"]),
|
|
1448
1466
|
onClick: n[9] ||= (e) => c("bottom", -1)
|
|
1449
|
-
}, [
|
|
1467
|
+
}, [N(x(Tt), {
|
|
1450
1468
|
size: 12,
|
|
1451
1469
|
"stroke-width": 2
|
|
1452
|
-
})], 10,
|
|
1453
|
-
|
|
1470
|
+
})], 10, Pi),
|
|
1471
|
+
E("input", {
|
|
1454
1472
|
type: "number",
|
|
1455
|
-
class:
|
|
1473
|
+
class: O(Ri),
|
|
1456
1474
|
value: e.modelValue.bottom,
|
|
1457
1475
|
"aria-label": x(i).spacingControl.bottom,
|
|
1458
1476
|
min: "0",
|
|
1459
1477
|
onInput: n[10] ||= (e) => l("bottom", Number(e.target.value))
|
|
1460
|
-
}, null, 40,
|
|
1461
|
-
|
|
1478
|
+
}, null, 40, Fi),
|
|
1479
|
+
E("button", {
|
|
1462
1480
|
"aria-label": x(i).spacingControl.increaseBottom,
|
|
1463
|
-
class:
|
|
1481
|
+
class: O([Li, "tpl:rounded-r-[var(--tpl-radius-sm)]"]),
|
|
1464
1482
|
onClick: n[11] ||= (e) => c("bottom", 1)
|
|
1465
|
-
}, [
|
|
1483
|
+
}, [N(x(W), {
|
|
1466
1484
|
size: 12,
|
|
1467
1485
|
"stroke-width": 2
|
|
1468
|
-
})], 10,
|
|
1486
|
+
})], 10, Ii)
|
|
1469
1487
|
])
|
|
1470
1488
|
])]));
|
|
1471
1489
|
}
|
|
1472
|
-
}), [["__scopeId", "data-v-9a9c8a07"]]),
|
|
1490
|
+
}), [["__scopeId", "data-v-9a9c8a07"]]), Bi = ["data-testid"], Vi = { class: "tpl:mt-3" }, Hi = /* @__PURE__ */ M({
|
|
1473
1491
|
__name: "CollapsibleSection",
|
|
1474
1492
|
props: {
|
|
1475
1493
|
title: {},
|
|
@@ -1479,30 +1497,30 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1479
1497
|
},
|
|
1480
1498
|
emits: ["toggle"],
|
|
1481
1499
|
setup(e) {
|
|
1482
|
-
return (n, i) => (s(), y("div", { class:
|
|
1500
|
+
return (n, i) => (s(), y("div", { class: O(["tpl:py-3", e.noBorder ? "" : "tpl:border-t tpl:border-[var(--tpl-border)]"]) }, [E("button", {
|
|
1483
1501
|
type: "button",
|
|
1484
1502
|
"data-testid": e.headerTestId,
|
|
1485
1503
|
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)]",
|
|
1486
1504
|
onClick: i[0] ||= (e) => n.$emit("toggle")
|
|
1487
|
-
}, [
|
|
1488
|
-
class:
|
|
1505
|
+
}, [N(x(ut), {
|
|
1506
|
+
class: O(["tpl:transition-transform tpl:duration-200", e.open ? "tpl:rotate-0" : "tpl:-rotate-90"]),
|
|
1489
1507
|
size: 12,
|
|
1490
1508
|
"stroke-width": 2
|
|
1491
|
-
}, null, 8, ["class"]),
|
|
1509
|
+
}, null, 8, ["class"]), E("span", null, C(e.title), 1)], 8, Bi), r(E("div", Vi, [t(n.$slots, "default")], 512), [[D, e.open]])], 2));
|
|
1492
1510
|
}
|
|
1493
|
-
}),
|
|
1511
|
+
}), Ui = { class: "tpl:space-y-2" }, Wi = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Gi = { class: "tpl:space-y-2" }, Ki = ["value"], qi = { value: "" }, Ji = ["label"], Yi = ["value"], Xi = ["value"], Zi = {
|
|
1494
1512
|
key: 0,
|
|
1495
1513
|
value: "__custom__"
|
|
1496
|
-
},
|
|
1514
|
+
}, Qi = {
|
|
1497
1515
|
key: 0,
|
|
1498
1516
|
class: "tpl:space-y-2"
|
|
1499
|
-
},
|
|
1517
|
+
}, $i = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ea = { class: "tpl:mb-1 tpl:block tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, ta = { class: "tpl:flex tpl:justify-end" }, na = ["disabled"], ra = {
|
|
1500
1518
|
key: 0,
|
|
1501
1519
|
class: "tpl:text-[11px] tpl:text-[var(--tpl-text-muted)]"
|
|
1502
|
-
},
|
|
1520
|
+
}, ia = { class: "tpl:space-y-1" }, aa = { 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)]" }, oa = {
|
|
1503
1521
|
key: 0,
|
|
1504
1522
|
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)]"
|
|
1505
|
-
},
|
|
1523
|
+
}, sa = /* @__PURE__ */ M({
|
|
1506
1524
|
__name: "CommonBlockSettings",
|
|
1507
1525
|
props: {
|
|
1508
1526
|
block: {},
|
|
@@ -1510,37 +1528,37 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1510
1528
|
},
|
|
1511
1529
|
emits: ["update"],
|
|
1512
1530
|
setup(e, { emit: t }) {
|
|
1513
|
-
let n = e, i = t, { t: a } =
|
|
1531
|
+
let n = e, i = t, { t: a } = U(), c = d(qe, []), l = d(Xe, !1), h = p(/* @__PURE__ */ new Set()), g = m(!1), _ = m(""), S = m(""), T = [{
|
|
1514
1532
|
key: "desktop",
|
|
1515
|
-
icon:
|
|
1533
|
+
icon: at,
|
|
1516
1534
|
labelKey: "showOnDesktop"
|
|
1517
1535
|
}, {
|
|
1518
1536
|
key: "mobile",
|
|
1519
|
-
icon:
|
|
1537
|
+
icon: st,
|
|
1520
1538
|
labelKey: "showOnMobile"
|
|
1521
1539
|
}];
|
|
1522
|
-
function
|
|
1540
|
+
function D(e) {
|
|
1523
1541
|
h.has(e) ? h.delete(e) : h.add(e);
|
|
1524
1542
|
}
|
|
1525
|
-
let
|
|
1526
|
-
function
|
|
1527
|
-
g.value = !0,
|
|
1543
|
+
let k = v(() => c.length > 0 || l), M = v(() => n.block.displayCondition ? !c.some((e) => e.label === n.block.displayCondition?.label) : !1);
|
|
1544
|
+
function F() {
|
|
1545
|
+
g.value = !0, M.value && n.block.displayCondition ? (_.value = n.block.displayCondition.before, S.value = n.block.displayCondition.after ?? "") : (_.value = "", S.value = "");
|
|
1528
1546
|
}
|
|
1529
|
-
function
|
|
1530
|
-
|
|
1547
|
+
function te() {
|
|
1548
|
+
_.value.trim() && (i("update", { displayCondition: {
|
|
1531
1549
|
label: a.blockSettings.customCondition,
|
|
1532
|
-
before:
|
|
1533
|
-
after:
|
|
1534
|
-
} }), g.value = !1,
|
|
1550
|
+
before: _.value.trim(),
|
|
1551
|
+
after: S.value.trim()
|
|
1552
|
+
} }), g.value = !1, _.value = "", S.value = "");
|
|
1535
1553
|
}
|
|
1536
|
-
|
|
1554
|
+
P(() => n.block.displayCondition, (e) => {
|
|
1537
1555
|
if (!e) {
|
|
1538
|
-
g.value = !1,
|
|
1556
|
+
g.value = !1, _.value = "", S.value = "";
|
|
1539
1557
|
return;
|
|
1540
1558
|
}
|
|
1541
|
-
|
|
1559
|
+
M.value && (_.value = e.before, S.value = e.after ?? "");
|
|
1542
1560
|
}, { immediate: !0 });
|
|
1543
|
-
let
|
|
1561
|
+
let I = v(() => {
|
|
1544
1562
|
let e = {};
|
|
1545
1563
|
for (let t of c) {
|
|
1546
1564
|
let n = t.group ?? "";
|
|
@@ -1548,33 +1566,33 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1548
1566
|
}
|
|
1549
1567
|
return e;
|
|
1550
1568
|
});
|
|
1551
|
-
function
|
|
1569
|
+
function L(e, t) {
|
|
1552
1570
|
i("update", { styles: {
|
|
1553
1571
|
...n.block.styles,
|
|
1554
1572
|
[e]: t
|
|
1555
1573
|
} });
|
|
1556
1574
|
}
|
|
1557
|
-
function
|
|
1575
|
+
function R(e) {
|
|
1558
1576
|
return n.block.visibility?.[e] !== !1;
|
|
1559
1577
|
}
|
|
1560
|
-
function
|
|
1578
|
+
function z(e) {
|
|
1561
1579
|
let t = {
|
|
1562
|
-
desktop:
|
|
1563
|
-
mobile:
|
|
1580
|
+
desktop: R("desktop"),
|
|
1581
|
+
mobile: R("mobile")
|
|
1564
1582
|
};
|
|
1565
1583
|
t[e] = !t[e], i("update", { visibility: t });
|
|
1566
1584
|
}
|
|
1567
|
-
return (t, n) => (s(), y("div", { class:
|
|
1568
|
-
|
|
1585
|
+
return (t, n) => (s(), y("div", { class: O(["tpl:flex tpl:flex-col", e.isFirstSection ? "" : "tpl:mt-4"]) }, [
|
|
1586
|
+
N(Hi, {
|
|
1569
1587
|
title: x(a).blockSettings.spacing,
|
|
1570
1588
|
open: h.has("spacing"),
|
|
1571
1589
|
"no-border": e.isFirstSection,
|
|
1572
|
-
onToggle: n[1] ||= (e) =>
|
|
1590
|
+
onToggle: n[1] ||= (e) => D("spacing")
|
|
1573
1591
|
}, {
|
|
1574
|
-
default: f(() => [
|
|
1592
|
+
default: f(() => [N(zi, {
|
|
1575
1593
|
label: x(a).blockSettings.padding,
|
|
1576
1594
|
"model-value": e.block.styles.padding,
|
|
1577
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
1595
|
+
"onUpdate:modelValue": n[0] ||= (e) => L("padding", e)
|
|
1578
1596
|
}, null, 8, ["label", "model-value"])]),
|
|
1579
1597
|
_: 1
|
|
1580
1598
|
}, 8, [
|
|
@@ -1582,33 +1600,33 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1582
1600
|
"open",
|
|
1583
1601
|
"no-border"
|
|
1584
1602
|
]),
|
|
1585
|
-
|
|
1603
|
+
N(Hi, {
|
|
1586
1604
|
title: x(a).blockSettings.background,
|
|
1587
1605
|
open: h.has("bg"),
|
|
1588
|
-
onToggle: n[3] ||= (e) =>
|
|
1606
|
+
onToggle: n[3] ||= (e) => D("bg")
|
|
1589
1607
|
}, {
|
|
1590
|
-
default: f(() => [
|
|
1608
|
+
default: f(() => [E("label", { class: O(x(K)) }, C(x(a).blockSettings.color), 3), N(Y, {
|
|
1591
1609
|
"model-value": e.block.styles.backgroundColor ?? "",
|
|
1592
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
1610
|
+
"onUpdate:modelValue": n[2] ||= (e) => L("backgroundColor", e)
|
|
1593
1611
|
}, null, 8, ["model-value"])]),
|
|
1594
1612
|
_: 1
|
|
1595
1613
|
}, 8, ["title", "open"]),
|
|
1596
|
-
|
|
1614
|
+
N(Hi, {
|
|
1597
1615
|
title: x(a).blockSettings.display,
|
|
1598
1616
|
open: h.has("display"),
|
|
1599
|
-
onToggle: n[4] ||= (e) =>
|
|
1617
|
+
onToggle: n[4] ||= (e) => D("display")
|
|
1600
1618
|
}, {
|
|
1601
|
-
default: f(() => [
|
|
1619
|
+
default: f(() => [E("div", Ui, [(s(), y(A, null, u(T, (e) => N(X, {
|
|
1602
1620
|
key: e.key,
|
|
1603
1621
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
1604
|
-
"model-value":
|
|
1622
|
+
"model-value": R(e.key),
|
|
1605
1623
|
label: x(a).blockSettings[e.labelKey],
|
|
1606
|
-
"onUpdate:modelValue": (t) =>
|
|
1624
|
+
"onUpdate:modelValue": (t) => z(e.key)
|
|
1607
1625
|
}, {
|
|
1608
|
-
default: f(() => [
|
|
1626
|
+
default: f(() => [E("span", Wi, [(s(), w(o(e.icon), {
|
|
1609
1627
|
size: 14,
|
|
1610
1628
|
"stroke-width": 1.5
|
|
1611
|
-
})),
|
|
1629
|
+
})), j(" " + C(x(a).blockSettings[e.labelKey]), 1)])]),
|
|
1612
1630
|
_: 2
|
|
1613
1631
|
}, 1032, [
|
|
1614
1632
|
"model-value",
|
|
@@ -1617,21 +1635,21 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1617
1635
|
])), 64))])]),
|
|
1618
1636
|
_: 1
|
|
1619
1637
|
}, 8, ["title", "open"]),
|
|
1620
|
-
|
|
1638
|
+
k.value ? (s(), w(Hi, {
|
|
1621
1639
|
key: 0,
|
|
1622
1640
|
"header-test-id": "display-condition-section",
|
|
1623
1641
|
title: x(a).blockSettings.displayCondition,
|
|
1624
1642
|
open: h.has("condition"),
|
|
1625
|
-
onToggle: n[8] ||= (e) =>
|
|
1643
|
+
onToggle: n[8] ||= (e) => D("condition")
|
|
1626
1644
|
}, {
|
|
1627
|
-
default: f(() => [
|
|
1645
|
+
default: f(() => [E("div", Gi, [E("select", {
|
|
1628
1646
|
"data-testid": "display-condition-select",
|
|
1629
|
-
class:
|
|
1630
|
-
value: g.value ||
|
|
1647
|
+
class: O(["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:duration-150 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)]"]),
|
|
1648
|
+
value: g.value || M.value ? "__custom__" : e.block.displayCondition?.label ?? "",
|
|
1631
1649
|
onChange: n[5] ||= (e) => {
|
|
1632
1650
|
let t = e.target.value;
|
|
1633
1651
|
if (t === "__custom__") {
|
|
1634
|
-
|
|
1652
|
+
F();
|
|
1635
1653
|
return;
|
|
1636
1654
|
}
|
|
1637
1655
|
if (g.value = !1, !t) {
|
|
@@ -1642,41 +1660,41 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1642
1660
|
n && i("update", { displayCondition: n });
|
|
1643
1661
|
}
|
|
1644
1662
|
}, [
|
|
1645
|
-
|
|
1646
|
-
(s(!0), y(
|
|
1663
|
+
E("option", qi, C(x(a).blockSettings.noCondition), 1),
|
|
1664
|
+
(s(!0), y(A, null, u(I.value, (e, t) => (s(), y(A, { key: t }, [t ? (s(), y("optgroup", {
|
|
1647
1665
|
key: 0,
|
|
1648
1666
|
label: String(t)
|
|
1649
|
-
}, [(s(!0), y(
|
|
1667
|
+
}, [(s(!0), y(A, null, u(e, (e) => (s(), y("option", {
|
|
1650
1668
|
key: e.label,
|
|
1651
1669
|
value: e.label
|
|
1652
|
-
},
|
|
1670
|
+
}, C(e.label), 9, Yi))), 128))], 8, Ji)) : (s(!0), y(A, { key: 1 }, u(e, (e) => (s(), y("option", {
|
|
1653
1671
|
key: e.label,
|
|
1654
1672
|
value: e.label
|
|
1655
|
-
},
|
|
1656
|
-
x(l) ? (s(), y("option",
|
|
1657
|
-
], 42,
|
|
1658
|
-
|
|
1659
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
1673
|
+
}, C(e.label), 9, Xi))), 128))], 64))), 128)),
|
|
1674
|
+
x(l) ? (s(), y("option", Zi, C(x(a).blockSettings.customCondition), 1)) : b("", !0)
|
|
1675
|
+
], 42, Ki), g.value || M.value ? (s(), y("div", Qi, [
|
|
1676
|
+
E("div", null, [E("label", $i, C(x(a).blockSettings.customConditionBefore), 1), r(E("textarea", {
|
|
1677
|
+
"onUpdate:modelValue": n[6] ||= (e) => _.value = e,
|
|
1660
1678
|
rows: "2",
|
|
1661
|
-
class:
|
|
1662
|
-
}, null, 2), [[
|
|
1663
|
-
|
|
1664
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
1679
|
+
class: O(x(Zt))
|
|
1680
|
+
}, null, 2), [[ee, _.value]])]),
|
|
1681
|
+
E("div", null, [E("label", ea, C(x(a).blockSettings.customConditionAfter), 1), r(E("textarea", {
|
|
1682
|
+
"onUpdate:modelValue": n[7] ||= (e) => S.value = e,
|
|
1665
1683
|
rows: "2",
|
|
1666
|
-
class:
|
|
1667
|
-
}, null, 2), [[
|
|
1668
|
-
|
|
1684
|
+
class: O(x(Zt))
|
|
1685
|
+
}, null, 2), [[ee, S.value]])]),
|
|
1686
|
+
E("div", ta, [E("button", {
|
|
1669
1687
|
type: "button",
|
|
1670
1688
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border-none tpl:bg-[var(--tpl-primary)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-bg)] tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:opacity-50",
|
|
1671
|
-
disabled: !
|
|
1672
|
-
onClick:
|
|
1673
|
-
},
|
|
1674
|
-
])) : e.block.displayCondition && !
|
|
1689
|
+
disabled: !_.value.trim(),
|
|
1690
|
+
onClick: te
|
|
1691
|
+
}, C(x(a).blockSettings.applyCondition), 9, na)])
|
|
1692
|
+
])) : e.block.displayCondition && !M.value ? (s(), y(A, { key: 1 }, [e.block.displayCondition.description ? (s(), y("p", ra, C(e.block.displayCondition.description), 1)) : b("", !0), E("div", ia, [E("pre", aa, C(e.block.displayCondition.before), 1), e.block.displayCondition.after ? (s(), y("pre", oa, C(e.block.displayCondition.after), 1)) : b("", !0)])], 64)) : b("", !0)])]),
|
|
1675
1693
|
_: 1
|
|
1676
1694
|
}, 8, ["title", "open"])) : b("", !0)
|
|
1677
1695
|
], 2));
|
|
1678
1696
|
}
|
|
1679
|
-
}),
|
|
1697
|
+
}), ca = ["title"], la = /* @__PURE__ */ M({
|
|
1680
1698
|
__name: "BooleanField",
|
|
1681
1699
|
props: {
|
|
1682
1700
|
field: {},
|
|
@@ -1685,11 +1703,11 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1685
1703
|
},
|
|
1686
1704
|
emits: ["update:modelValue"],
|
|
1687
1705
|
setup(e, { emit: t }) {
|
|
1688
|
-
let n = t, { t: r } =
|
|
1706
|
+
let n = t, { t: r } = U();
|
|
1689
1707
|
return (t, i) => (s(), y("div", {
|
|
1690
1708
|
class: "tpl:mb-3.5",
|
|
1691
1709
|
title: e.readOnly ? x(r).customBlocks.dataSource.readOnlyTooltip : void 0
|
|
1692
|
-
}, [
|
|
1710
|
+
}, [N(X, {
|
|
1693
1711
|
class: "tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
1694
1712
|
"model-value": e.modelValue,
|
|
1695
1713
|
label: e.field.label,
|
|
@@ -1697,7 +1715,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1697
1715
|
disabled: e.readOnly,
|
|
1698
1716
|
"onUpdate:modelValue": i[0] ||= (e) => n("update:modelValue", e)
|
|
1699
1717
|
}, {
|
|
1700
|
-
default: f(() => [
|
|
1718
|
+
default: f(() => [j(C(e.field.label) + " ", 1), e.readOnly ? (s(), w(x(Nt), {
|
|
1701
1719
|
key: 0,
|
|
1702
1720
|
size: 12,
|
|
1703
1721
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
@@ -1708,12 +1726,12 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1708
1726
|
"label",
|
|
1709
1727
|
"required",
|
|
1710
1728
|
"disabled"
|
|
1711
|
-
])], 8,
|
|
1729
|
+
])], 8, ca));
|
|
1712
1730
|
}
|
|
1713
|
-
}),
|
|
1731
|
+
}), ua = { class: "tpl:mb-3.5" }, da = {
|
|
1714
1732
|
key: 1,
|
|
1715
1733
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1716
|
-
},
|
|
1734
|
+
}, fa = /* @__PURE__ */ M({
|
|
1717
1735
|
__name: "FieldWrapper",
|
|
1718
1736
|
props: {
|
|
1719
1737
|
label: {},
|
|
@@ -1721,17 +1739,17 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1721
1739
|
readOnly: { type: Boolean }
|
|
1722
1740
|
},
|
|
1723
1741
|
setup(e) {
|
|
1724
|
-
return (n, r) => (s(), y("div",
|
|
1725
|
-
|
|
1726
|
-
e.readOnly ? (s(),
|
|
1742
|
+
return (n, r) => (s(), y("div", ua, [E("label", { class: O(x(K)) }, [
|
|
1743
|
+
j(C(e.label) + " ", 1),
|
|
1744
|
+
e.readOnly ? (s(), w(x(Nt), {
|
|
1727
1745
|
key: 0,
|
|
1728
1746
|
size: 12,
|
|
1729
1747
|
class: "tpl:inline tpl:text-[var(--tpl-text-dim)]"
|
|
1730
1748
|
})) : b("", !0),
|
|
1731
|
-
e.required ? (s(), y("span",
|
|
1749
|
+
e.required ? (s(), y("span", da, "*")) : b("", !0)
|
|
1732
1750
|
], 2), t(n.$slots, "default")]));
|
|
1733
1751
|
}
|
|
1734
|
-
}),
|
|
1752
|
+
}), pa = /* @__PURE__ */ M({
|
|
1735
1753
|
__name: "ColorField",
|
|
1736
1754
|
props: {
|
|
1737
1755
|
field: {},
|
|
@@ -1740,13 +1758,13 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1740
1758
|
},
|
|
1741
1759
|
emits: ["update:modelValue"],
|
|
1742
1760
|
setup(e, { emit: t }) {
|
|
1743
|
-
let n = e, r = t, { t: i } =
|
|
1744
|
-
return (t, n) => (s(),
|
|
1761
|
+
let n = e, r = t, { t: i } = U(), a = d(tt, rt), o = v(() => ae(n.field, a));
|
|
1762
|
+
return (t, n) => (s(), w(fa, {
|
|
1745
1763
|
label: e.field.label,
|
|
1746
1764
|
required: e.field.required,
|
|
1747
1765
|
"read-only": e.readOnly
|
|
1748
1766
|
}, {
|
|
1749
|
-
default: f(() => [
|
|
1767
|
+
default: f(() => [N(Y, {
|
|
1750
1768
|
"model-value": e.modelValue,
|
|
1751
1769
|
placeholder: e.field.placeholder,
|
|
1752
1770
|
disabled: e.readOnly,
|
|
@@ -1769,15 +1787,15 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1769
1787
|
"read-only"
|
|
1770
1788
|
]));
|
|
1771
1789
|
}
|
|
1772
|
-
}),
|
|
1790
|
+
}), ma = {
|
|
1773
1791
|
key: 0,
|
|
1774
1792
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
1775
1793
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
1776
|
-
},
|
|
1794
|
+
}, ha = [
|
|
1777
1795
|
"value",
|
|
1778
1796
|
"placeholder",
|
|
1779
1797
|
"title"
|
|
1780
|
-
],
|
|
1798
|
+
], ga = ["value", "placeholder"], _a = /* @__PURE__ */ M({
|
|
1781
1799
|
__name: "ImageField",
|
|
1782
1800
|
props: {
|
|
1783
1801
|
field: {},
|
|
@@ -1786,7 +1804,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1786
1804
|
},
|
|
1787
1805
|
emits: ["update:modelValue"],
|
|
1788
1806
|
setup(e, { emit: t }) {
|
|
1789
|
-
let n = e, r = t, { t: i } =
|
|
1807
|
+
let n = e, r = t, { t: i } = U(), a = d(Ie, null), o = Gt(), c = v(() => !!a);
|
|
1790
1808
|
async function l() {
|
|
1791
1809
|
let e = await a?.({ accept: ["images"] });
|
|
1792
1810
|
o.alive && e && r("update:modelValue", e.url);
|
|
@@ -1807,53 +1825,53 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1807
1825
|
}
|
|
1808
1826
|
}
|
|
1809
1827
|
}
|
|
1810
|
-
let { isOver:
|
|
1828
|
+
let { isOver: _ } = he({
|
|
1811
1829
|
target: u,
|
|
1812
1830
|
enabled: h,
|
|
1813
1831
|
onFiles: g
|
|
1814
1832
|
});
|
|
1815
|
-
return (t, n) => (s(),
|
|
1833
|
+
return (t, n) => (s(), w(fa, {
|
|
1816
1834
|
label: e.field.label,
|
|
1817
1835
|
required: e.field.required,
|
|
1818
1836
|
"read-only": e.readOnly
|
|
1819
1837
|
}, {
|
|
1820
|
-
default: f(() => [
|
|
1838
|
+
default: f(() => [E("div", {
|
|
1821
1839
|
ref_key: "dropZoneRef",
|
|
1822
1840
|
ref: u,
|
|
1823
1841
|
class: "tpl:relative"
|
|
1824
1842
|
}, [
|
|
1825
|
-
h.value && (x(
|
|
1843
|
+
h.value && (x(_) || p.value) ? (s(), y("div", ma, [p.value ? (s(), y(A, { key: 0 }, [N(x(Ot), {
|
|
1826
1844
|
class: "tpl-spinner",
|
|
1827
1845
|
size: 18,
|
|
1828
1846
|
"stroke-width": 2
|
|
1829
|
-
}),
|
|
1847
|
+
}), j(" " + C(x(i).image.uploading), 1)], 64)) : (s(), y(A, { key: 1 }, [N(x(Lt), {
|
|
1830
1848
|
size: 18,
|
|
1831
1849
|
"stroke-width": 1.5
|
|
1832
|
-
}),
|
|
1850
|
+
}), j(" " + C(x(i).image.dropToUpload), 1)], 64))])) : b("", !0),
|
|
1833
1851
|
e.readOnly ? (s(), y("input", {
|
|
1834
1852
|
key: 1,
|
|
1835
1853
|
type: "url",
|
|
1836
|
-
class:
|
|
1854
|
+
class: O([x(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1837
1855
|
value: e.modelValue,
|
|
1838
1856
|
placeholder: e.field.placeholder || "https://...",
|
|
1839
1857
|
disabled: "",
|
|
1840
1858
|
title: x(i).customBlocks.dataSource.readOnlyTooltip
|
|
1841
|
-
}, null, 10,
|
|
1859
|
+
}, null, 10, ha)) : (s(), y("input", {
|
|
1842
1860
|
key: 2,
|
|
1843
1861
|
type: "url",
|
|
1844
|
-
class:
|
|
1862
|
+
class: O(x(G)),
|
|
1845
1863
|
value: e.modelValue,
|
|
1846
1864
|
placeholder: e.field.placeholder || "https://...",
|
|
1847
1865
|
onInput: n[0] ||= (e) => r("update:modelValue", e.target.value)
|
|
1848
|
-
}, null, 42,
|
|
1866
|
+
}, null, 42, ga)),
|
|
1849
1867
|
c.value && !e.readOnly ? (s(), y("button", {
|
|
1850
1868
|
key: 3,
|
|
1851
1869
|
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:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1852
1870
|
onClick: n[1] ||= (e) => l()
|
|
1853
|
-
}, [
|
|
1871
|
+
}, [N(x(Et), {
|
|
1854
1872
|
size: 14,
|
|
1855
1873
|
"stroke-width": 1.5
|
|
1856
|
-
}),
|
|
1874
|
+
}), j(" " + C(x(i).image.browseMedia), 1)])) : b("", !0)
|
|
1857
1875
|
], 512)]),
|
|
1858
1876
|
_: 1
|
|
1859
1877
|
}, 8, [
|
|
@@ -1862,7 +1880,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1862
1880
|
"read-only"
|
|
1863
1881
|
]));
|
|
1864
1882
|
}
|
|
1865
|
-
}),
|
|
1883
|
+
}), va = [
|
|
1866
1884
|
"value",
|
|
1867
1885
|
"placeholder",
|
|
1868
1886
|
"min",
|
|
@@ -1870,7 +1888,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1870
1888
|
"step",
|
|
1871
1889
|
"disabled",
|
|
1872
1890
|
"title"
|
|
1873
|
-
],
|
|
1891
|
+
], ya = /* @__PURE__ */ M({
|
|
1874
1892
|
__name: "NumberField",
|
|
1875
1893
|
props: {
|
|
1876
1894
|
field: {},
|
|
@@ -1879,15 +1897,15 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1879
1897
|
},
|
|
1880
1898
|
emits: ["update:modelValue"],
|
|
1881
1899
|
setup(e, { emit: t }) {
|
|
1882
|
-
let n = t, { t: r } =
|
|
1883
|
-
return (t, i) => (s(),
|
|
1900
|
+
let n = t, { t: r } = U();
|
|
1901
|
+
return (t, i) => (s(), w(fa, {
|
|
1884
1902
|
label: e.field.label,
|
|
1885
1903
|
required: e.field.required,
|
|
1886
1904
|
"read-only": e.readOnly
|
|
1887
1905
|
}, {
|
|
1888
|
-
default: f(() => [
|
|
1906
|
+
default: f(() => [E("input", {
|
|
1889
1907
|
type: "number",
|
|
1890
|
-
class:
|
|
1908
|
+
class: O([x(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
1891
1909
|
value: e.modelValue,
|
|
1892
1910
|
placeholder: e.field.placeholder,
|
|
1893
1911
|
min: e.field.min,
|
|
@@ -1896,7 +1914,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1896
1914
|
disabled: e.readOnly,
|
|
1897
1915
|
title: e.readOnly ? x(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
1898
1916
|
onInput: i[0] ||= (t) => !e.readOnly && n("update:modelValue", Number(t.target.value))
|
|
1899
|
-
}, null, 42,
|
|
1917
|
+
}, null, 42, va)]),
|
|
1900
1918
|
_: 1
|
|
1901
1919
|
}, 8, [
|
|
1902
1920
|
"label",
|
|
@@ -1904,10 +1922,10 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1904
1922
|
"read-only"
|
|
1905
1923
|
]));
|
|
1906
1924
|
}
|
|
1907
|
-
}),
|
|
1925
|
+
}), ba = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, xa = { class: "tpl:mb-2 tpl:flex tpl:items-center tpl:justify-between" }, Sa = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]" }, Ca = ["title", "onClick"], wa = {
|
|
1908
1926
|
key: 1,
|
|
1909
1927
|
class: "tpl:m-0 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
1910
|
-
},
|
|
1928
|
+
}, Ta = /* @__PURE__ */ M({
|
|
1911
1929
|
__name: "RepeatableField",
|
|
1912
1930
|
props: {
|
|
1913
1931
|
field: {},
|
|
@@ -1916,7 +1934,7 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1916
1934
|
},
|
|
1917
1935
|
emits: ["update:modelValue"],
|
|
1918
1936
|
setup(e, { emit: t }) {
|
|
1919
|
-
let n = e, r = t, { t: i } =
|
|
1937
|
+
let n = e, r = t, { t: i } = U(), a = v(() => n.modelValue || []), c = v(() => !n.field.maxItems || a.value.length < n.field.maxItems), l = v(() => !n.field.minItems || a.value.length > n.field.minItems);
|
|
1920
1938
|
function d() {
|
|
1921
1939
|
if (!c.value || n.readOnly) return;
|
|
1922
1940
|
let e = {};
|
|
@@ -1935,25 +1953,25 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1935
1953
|
} : r);
|
|
1936
1954
|
r("update:modelValue", i);
|
|
1937
1955
|
}
|
|
1938
|
-
return (t, n) => (s(),
|
|
1956
|
+
return (t, n) => (s(), w(fa, {
|
|
1939
1957
|
label: e.field.label,
|
|
1940
1958
|
required: e.field.required,
|
|
1941
1959
|
"read-only": e.readOnly
|
|
1942
1960
|
}, {
|
|
1943
|
-
default: f(() => [
|
|
1944
|
-
(s(!0), y(
|
|
1961
|
+
default: f(() => [E("div", ba, [
|
|
1962
|
+
(s(!0), y(A, null, u(a.value, (t, n) => (s(), y("div", {
|
|
1945
1963
|
key: `${e.field.key}-${n}`,
|
|
1946
1964
|
class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)] tpl:p-3"
|
|
1947
|
-
}, [
|
|
1965
|
+
}, [E("div", xa, [E("span", Sa, " #" + C(n + 1), 1), l.value && !e.readOnly ? (s(), y("button", {
|
|
1948
1966
|
key: 0,
|
|
1949
1967
|
type: "button",
|
|
1950
1968
|
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:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
1951
1969
|
title: x(i).customBlocks.fields.removeItem,
|
|
1952
1970
|
onClick: (e) => p(n)
|
|
1953
|
-
}, [
|
|
1971
|
+
}, [N(x(Ct), {
|
|
1954
1972
|
size: 12,
|
|
1955
1973
|
"stroke-width": 2
|
|
1956
|
-
})], 8,
|
|
1974
|
+
})], 8, Ca)) : b("", !0)]), (s(!0), y(A, null, u(e.field.fields, (r) => (s(), w(o(x(Pa)(r.type)), {
|
|
1957
1975
|
key: r.key,
|
|
1958
1976
|
field: r,
|
|
1959
1977
|
"model-value": t[r.key],
|
|
@@ -1968,13 +1986,13 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1968
1986
|
c.value && !e.readOnly ? (s(), y("button", {
|
|
1969
1987
|
key: 0,
|
|
1970
1988
|
type: "button",
|
|
1971
|
-
class:
|
|
1989
|
+
class: O(x($t)),
|
|
1972
1990
|
onClick: d
|
|
1973
|
-
}, [
|
|
1991
|
+
}, [N(x(W), {
|
|
1974
1992
|
size: 14,
|
|
1975
1993
|
"stroke-width": 2
|
|
1976
|
-
}),
|
|
1977
|
-
!c.value && !e.readOnly ? (s(), y("p",
|
|
1994
|
+
}), j(" " + C(x(i).customBlocks.fields.addItem), 1)], 2)) : b("", !0),
|
|
1995
|
+
!c.value && !e.readOnly ? (s(), y("p", wa, C(x(i).customBlocks.fields.maxItemsReached), 1)) : b("", !0)
|
|
1978
1996
|
])]),
|
|
1979
1997
|
_: 1
|
|
1980
1998
|
}, 8, [
|
|
@@ -1983,11 +2001,11 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1983
2001
|
"read-only"
|
|
1984
2002
|
]));
|
|
1985
2003
|
}
|
|
1986
|
-
}),
|
|
2004
|
+
}), Ea = [
|
|
1987
2005
|
"value",
|
|
1988
2006
|
"disabled",
|
|
1989
2007
|
"title"
|
|
1990
|
-
],
|
|
2008
|
+
], Da = ["value"], Oa = /* @__PURE__ */ M({
|
|
1991
2009
|
__name: "SelectField",
|
|
1992
2010
|
props: {
|
|
1993
2011
|
field: {},
|
|
@@ -1996,22 +2014,22 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
1996
2014
|
},
|
|
1997
2015
|
emits: ["update:modelValue"],
|
|
1998
2016
|
setup(e, { emit: t }) {
|
|
1999
|
-
let n = t, { t: r } =
|
|
2000
|
-
return (t, i) => (s(),
|
|
2017
|
+
let n = t, { t: r } = U();
|
|
2018
|
+
return (t, i) => (s(), w(fa, {
|
|
2001
2019
|
label: e.field.label,
|
|
2002
2020
|
required: e.field.required,
|
|
2003
2021
|
"read-only": e.readOnly
|
|
2004
2022
|
}, {
|
|
2005
|
-
default: f(() => [
|
|
2006
|
-
class:
|
|
2023
|
+
default: f(() => [E("select", {
|
|
2024
|
+
class: O([x(G), e.readOnly && "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2007
2025
|
value: e.modelValue,
|
|
2008
2026
|
disabled: e.readOnly,
|
|
2009
2027
|
title: e.readOnly ? x(r).customBlocks.dataSource.readOnlyTooltip : void 0,
|
|
2010
2028
|
onChange: i[0] ||= (t) => !e.readOnly && n("update:modelValue", t.target.value)
|
|
2011
|
-
}, [(s(!0), y(
|
|
2029
|
+
}, [(s(!0), y(A, null, u(e.field.options, (e) => (s(), y("option", {
|
|
2012
2030
|
key: e.value,
|
|
2013
2031
|
value: e.value
|
|
2014
|
-
},
|
|
2032
|
+
}, C(e.label), 9, Da))), 128))], 42, Ea)]),
|
|
2015
2033
|
_: 1
|
|
2016
2034
|
}, 8, [
|
|
2017
2035
|
"label",
|
|
@@ -2019,11 +2037,11 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2019
2037
|
"read-only"
|
|
2020
2038
|
]));
|
|
2021
2039
|
}
|
|
2022
|
-
}),
|
|
2040
|
+
}), ka = [
|
|
2023
2041
|
"value",
|
|
2024
2042
|
"placeholder",
|
|
2025
2043
|
"title"
|
|
2026
|
-
],
|
|
2044
|
+
], Aa = /* @__PURE__ */ M({
|
|
2027
2045
|
__name: "TextField",
|
|
2028
2046
|
props: {
|
|
2029
2047
|
field: {},
|
|
@@ -2032,8 +2050,8 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2032
2050
|
},
|
|
2033
2051
|
emits: ["update:modelValue"],
|
|
2034
2052
|
setup(e, { emit: t }) {
|
|
2035
|
-
let n = t, { t: r } =
|
|
2036
|
-
return (t, i) => (s(),
|
|
2053
|
+
let n = t, { t: r } = U();
|
|
2054
|
+
return (t, i) => (s(), w(fa, {
|
|
2037
2055
|
label: e.field.label,
|
|
2038
2056
|
required: e.field.required,
|
|
2039
2057
|
"read-only": e.readOnly
|
|
@@ -2041,12 +2059,12 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2041
2059
|
default: f(() => [e.readOnly ? (s(), y("input", {
|
|
2042
2060
|
key: 0,
|
|
2043
2061
|
type: "text",
|
|
2044
|
-
class:
|
|
2062
|
+
class: O([x(G), "tpl:opacity-60 tpl:cursor-not-allowed"]),
|
|
2045
2063
|
value: e.modelValue,
|
|
2046
2064
|
placeholder: e.field.placeholder,
|
|
2047
2065
|
disabled: "",
|
|
2048
2066
|
title: x(r).customBlocks.dataSource.readOnlyTooltip
|
|
2049
|
-
}, null, 10,
|
|
2067
|
+
}, null, 10, ka)) : (s(), w($, {
|
|
2050
2068
|
key: 1,
|
|
2051
2069
|
"model-value": e.modelValue,
|
|
2052
2070
|
placeholder: e.field.placeholder,
|
|
@@ -2059,13 +2077,13 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2059
2077
|
"read-only"
|
|
2060
2078
|
]));
|
|
2061
2079
|
}
|
|
2062
|
-
}),
|
|
2080
|
+
}), ja = [
|
|
2063
2081
|
"value",
|
|
2064
2082
|
"placeholder",
|
|
2065
2083
|
"title"
|
|
2066
|
-
],
|
|
2067
|
-
text:
|
|
2068
|
-
textarea: /* @__PURE__ */
|
|
2084
|
+
], Ma = "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", Na = {
|
|
2085
|
+
text: Aa,
|
|
2086
|
+
textarea: /* @__PURE__ */ M({
|
|
2069
2087
|
__name: "TextareaField",
|
|
2070
2088
|
props: {
|
|
2071
2089
|
field: {},
|
|
@@ -2074,8 +2092,8 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2074
2092
|
},
|
|
2075
2093
|
emits: ["update:modelValue"],
|
|
2076
2094
|
setup(e, { emit: t }) {
|
|
2077
|
-
let n = t, { t: r } =
|
|
2078
|
-
return (t, i) => (s(),
|
|
2095
|
+
let n = t, { t: r } = U();
|
|
2096
|
+
return (t, i) => (s(), w(fa, {
|
|
2079
2097
|
label: e.field.label,
|
|
2080
2098
|
required: e.field.required,
|
|
2081
2099
|
"read-only": e.readOnly
|
|
@@ -2087,8 +2105,8 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2087
2105
|
rows: "3",
|
|
2088
2106
|
disabled: "",
|
|
2089
2107
|
title: x(r).customBlocks.dataSource.readOnlyTooltip,
|
|
2090
|
-
class:
|
|
2091
|
-
}, null, 8,
|
|
2108
|
+
class: O(Ma)
|
|
2109
|
+
}, null, 8, ja)) : (s(), w(cr, {
|
|
2092
2110
|
key: 1,
|
|
2093
2111
|
"model-value": e.modelValue,
|
|
2094
2112
|
placeholder: e.field.placeholder,
|
|
@@ -2102,98 +2120,98 @@ var Un = ["aria-label", "onKeydown"], Wn = ["data-tooltip"], Gn = ["data-tooltip
|
|
|
2102
2120
|
]));
|
|
2103
2121
|
}
|
|
2104
2122
|
}),
|
|
2105
|
-
image:
|
|
2106
|
-
color:
|
|
2107
|
-
number:
|
|
2108
|
-
select:
|
|
2109
|
-
boolean:
|
|
2110
|
-
repeatable:
|
|
2123
|
+
image: _a,
|
|
2124
|
+
color: pa,
|
|
2125
|
+
number: ya,
|
|
2126
|
+
select: Oa,
|
|
2127
|
+
boolean: la,
|
|
2128
|
+
repeatable: Ta
|
|
2111
2129
|
};
|
|
2112
|
-
function
|
|
2113
|
-
return
|
|
2130
|
+
function Pa(e) {
|
|
2131
|
+
return Na[e] ?? Aa;
|
|
2114
2132
|
}
|
|
2115
2133
|
//#endregion
|
|
2116
2134
|
//#region src/components/toolbar/CustomBlockToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2117
|
-
var
|
|
2135
|
+
var Fa = {
|
|
2118
2136
|
key: 0,
|
|
2119
2137
|
class: "tpl:p-4"
|
|
2120
|
-
},
|
|
2138
|
+
}, Ia = { class: "tpl:m-0 tpl:text-center tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, La = { key: 1 }, Ra = {
|
|
2121
2139
|
key: 0,
|
|
2122
2140
|
class: "tpl:m-0 tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
2123
|
-
},
|
|
2141
|
+
}, za = {
|
|
2124
2142
|
key: 1,
|
|
2125
2143
|
class: "tpl:mb-4"
|
|
2126
|
-
},
|
|
2144
|
+
}, Ba = {
|
|
2127
2145
|
key: 1,
|
|
2128
2146
|
class: "tpl:flex tpl:h-[32px] tpl:items-center"
|
|
2129
|
-
},
|
|
2147
|
+
}, Va = {
|
|
2130
2148
|
key: 0,
|
|
2131
2149
|
class: "tpl:w-full tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
2132
|
-
},
|
|
2150
|
+
}, Ha = {
|
|
2133
2151
|
key: 2,
|
|
2134
2152
|
class: "tpl:m-0 tpl:mt-2 tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
2135
|
-
},
|
|
2153
|
+
}, Ua = /* @__PURE__ */ M({
|
|
2136
2154
|
__name: "CustomBlockToolbar",
|
|
2137
2155
|
props: { block: {} },
|
|
2138
2156
|
emits: ["updateFieldValues", "updateDataSourceFetched"],
|
|
2139
2157
|
setup(e, { emit: t }) {
|
|
2140
|
-
let n = e, r = t, { t: i } =
|
|
2158
|
+
let n = e, r = t, { t: i } = U(), a = d(Qe, []), c = v(() => a.find((e) => e.type === n.block.customType)), l = v(() => n.block), { isFetching: f, fetchError: p, fetch: m, hasDataSource: h, needsFetch: g } = H({
|
|
2141
2159
|
definition: c,
|
|
2142
2160
|
block: l,
|
|
2143
2161
|
onUpdate: (e, t) => {
|
|
2144
2162
|
r("updateFieldValues", e), r("updateDataSourceFetched", t);
|
|
2145
2163
|
}
|
|
2146
2164
|
});
|
|
2147
|
-
function
|
|
2165
|
+
function _(e) {
|
|
2148
2166
|
return e.readOnly === !0 && h.value && !!n.block.dataSourceFetched;
|
|
2149
2167
|
}
|
|
2150
|
-
function
|
|
2168
|
+
function S(e, t) {
|
|
2151
2169
|
r("updateFieldValues", {
|
|
2152
2170
|
...n.block.fieldValues,
|
|
2153
2171
|
[e]: t
|
|
2154
2172
|
});
|
|
2155
2173
|
}
|
|
2156
|
-
return (t, n) => c.value ? (s(), y("div",
|
|
2157
|
-
c.value.description ? (s(), y("p",
|
|
2158
|
-
x(h) ? (s(), y("div",
|
|
2174
|
+
return (t, n) => c.value ? (s(), y("div", La, [
|
|
2175
|
+
c.value.description ? (s(), y("p", Ra, C(c.value.description), 1)) : b("", !0),
|
|
2176
|
+
x(h) ? (s(), y("div", za, [x(g) && !x(f) ? (s(), y("button", {
|
|
2159
2177
|
key: 0,
|
|
2160
2178
|
type: "button",
|
|
2161
2179
|
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-bg)] tpl:transition-all tpl:duration-150 tpl:bg-[var(--tpl-primary)]",
|
|
2162
2180
|
onClick: n[0] ||= (...e) => x(m) && x(m)(...e)
|
|
2163
|
-
},
|
|
2181
|
+
}, C(c.value?.dataSource?.label || x(i).customBlocks.dataSource.fetchButton), 1)) : (s(), y("div", Ba, [x(f) ? (s(), y("div", Va, C(x(i).customBlocks.dataSource.fetching), 1)) : (s(), y("button", {
|
|
2164
2182
|
key: 1,
|
|
2165
2183
|
type: "button",
|
|
2166
2184
|
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:duration-150 tpl:hover:border-[var(--tpl-primary)] tpl:hover:text-[var(--tpl-primary)]",
|
|
2167
2185
|
onClick: n[1] ||= (...e) => x(m) && x(m)(...e)
|
|
2168
|
-
}, [
|
|
2186
|
+
}, [N(x(Vt), { size: 12 }), j(" " + C(x(i).customBlocks.dataSource.changeButton), 1)]))])), x(p) ? (s(), y("p", Ha, [N(x(dt), {
|
|
2169
2187
|
size: 14,
|
|
2170
2188
|
class: "tpl:shrink-0"
|
|
2171
|
-
}),
|
|
2172
|
-
(s(!0), y(
|
|
2189
|
+
}), j(" " + C(x(i).customBlocks.dataSource.fetchError), 1)])) : b("", !0)])) : b("", !0),
|
|
2190
|
+
(s(!0), y(A, null, u(c.value.fields, (t) => (s(), w(o(x(Pa)(t.type)), {
|
|
2173
2191
|
key: t.key,
|
|
2174
2192
|
field: t,
|
|
2175
2193
|
"model-value": e.block.fieldValues[t.key],
|
|
2176
|
-
"read-only":
|
|
2177
|
-
"onUpdate:modelValue": (e) =>
|
|
2194
|
+
"read-only": _(t),
|
|
2195
|
+
"onUpdate:modelValue": (e) => S(t.key, e)
|
|
2178
2196
|
}, null, 8, [
|
|
2179
2197
|
"field",
|
|
2180
2198
|
"model-value",
|
|
2181
2199
|
"read-only",
|
|
2182
2200
|
"onUpdate:modelValue"
|
|
2183
2201
|
]))), 128))
|
|
2184
|
-
])) : (s(), y("div",
|
|
2202
|
+
])) : (s(), y("div", Fa, [E("p", Ia, C(x(i).customBlocks.toolbar.noDefinition), 1)]));
|
|
2185
2203
|
}
|
|
2186
|
-
}),
|
|
2204
|
+
}), Wa = { class: "tpl:mb-3.5" }, Ga = { class: "tpl:mb-3.5" }, Ka = { class: "tpl:mb-3.5" }, qa = { class: "tpl:flex tpl:items-stretch" }, Ja = ["value"], Ya = /* @__PURE__ */ M({
|
|
2187
2205
|
__name: "DividerToolbar",
|
|
2188
2206
|
props: { block: {} },
|
|
2189
2207
|
emits: ["update"],
|
|
2190
2208
|
setup(e, { emit: t }) {
|
|
2191
|
-
let n = t, { t: r } =
|
|
2209
|
+
let n = t, { t: r } = U();
|
|
2192
2210
|
function i(e, t) {
|
|
2193
2211
|
n("update", { [e]: t });
|
|
2194
2212
|
}
|
|
2195
|
-
return (t, n) => (s(), y(
|
|
2196
|
-
|
|
2213
|
+
return (t, n) => (s(), y(A, null, [
|
|
2214
|
+
E("div", Wa, [E("label", { class: O(x(K)) }, C(x(r).divider.style), 3), N(Q, {
|
|
2197
2215
|
options: [
|
|
2198
2216
|
{
|
|
2199
2217
|
value: "solid",
|
|
@@ -2211,126 +2229,126 @@ var Pa = {
|
|
|
2211
2229
|
"model-value": e.block.lineStyle,
|
|
2212
2230
|
"onUpdate:modelValue": n[0] ||= (e) => i("lineStyle", e)
|
|
2213
2231
|
}, null, 8, ["options", "model-value"])]),
|
|
2214
|
-
|
|
2232
|
+
E("div", Ga, [E("label", { class: O(x(K)) }, C(x(r).divider.color), 3), N(Y, {
|
|
2215
2233
|
"model-value": e.block.color,
|
|
2216
2234
|
"onUpdate:modelValue": n[1] ||= (e) => i("color", e)
|
|
2217
2235
|
}, null, 8, ["model-value"])]),
|
|
2218
|
-
|
|
2236
|
+
E("div", Ka, [E("label", { class: O(x(K)) }, C(x(r).divider.thickness), 3), E("div", qa, [E("input", {
|
|
2219
2237
|
type: "number",
|
|
2220
|
-
class:
|
|
2238
|
+
class: O(x(J)),
|
|
2221
2239
|
value: e.block.thickness,
|
|
2222
2240
|
min: "1",
|
|
2223
2241
|
max: "10",
|
|
2224
2242
|
onInput: n[2] ||= (e) => i("thickness", Number(e.target.value))
|
|
2225
|
-
}, null, 42,
|
|
2243
|
+
}, null, 42, Ja), E("span", { class: O(x(q)) }, "px", 2)])])
|
|
2226
2244
|
], 64));
|
|
2227
2245
|
}
|
|
2228
|
-
}),
|
|
2246
|
+
}), Xa = { class: "tpl:mb-3.5" }, Za = ["value"], Qa = { class: "tpl:mt-1.5 tpl:flex tpl:items-start tpl:gap-1.5 tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, $a = /* @__PURE__ */ M({
|
|
2229
2247
|
__name: "HtmlToolbar",
|
|
2230
2248
|
props: { block: {} },
|
|
2231
2249
|
emits: ["update"],
|
|
2232
2250
|
setup(e, { emit: t }) {
|
|
2233
|
-
let n = t, { t: r } =
|
|
2234
|
-
return (t, i) => (s(), y("div",
|
|
2235
|
-
|
|
2236
|
-
|
|
2251
|
+
let n = t, { t: r } = U();
|
|
2252
|
+
return (t, i) => (s(), y("div", Xa, [
|
|
2253
|
+
E("label", { class: O(x(K)) }, C(x(r).html.content), 3),
|
|
2254
|
+
E("textarea", {
|
|
2237
2255
|
value: e.block.content,
|
|
2238
2256
|
placeholder: "<div>...</div>",
|
|
2239
2257
|
rows: "10",
|
|
2240
|
-
class:
|
|
2258
|
+
class: O(x(Zt)),
|
|
2241
2259
|
onInput: i[0] ||= (e) => n("update", { content: e.target.value })
|
|
2242
|
-
}, null, 42,
|
|
2243
|
-
|
|
2260
|
+
}, null, 42, Za),
|
|
2261
|
+
E("p", Qa, [N(x(wt), {
|
|
2244
2262
|
size: 12,
|
|
2245
2263
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
2246
|
-
}),
|
|
2264
|
+
}), j(" " + C(x(r).html.sanitizationHint), 1)])
|
|
2247
2265
|
]));
|
|
2248
2266
|
}
|
|
2249
|
-
}),
|
|
2267
|
+
}), eo = { class: "tpl:mb-3.5" }, to = {
|
|
2250
2268
|
key: 0,
|
|
2251
2269
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
2252
2270
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 90%, transparent)" }
|
|
2253
|
-
},
|
|
2271
|
+
}, no = {
|
|
2254
2272
|
key: 0,
|
|
2255
2273
|
class: "tpl:mb-3.5"
|
|
2256
|
-
},
|
|
2274
|
+
}, ro = ["value", "placeholder"], io = { class: "tpl:mb-3.5" }, ao = { class: "tpl:block tpl:text-[var(--tpl-text-dim)]" }, oo = { class: "tpl:mb-3.5" }, so = ["value"], co = { value: "full" }, lo = { value: "custom" }, uo = {
|
|
2257
2275
|
key: 0,
|
|
2258
2276
|
class: "tpl:mt-2 tpl:flex tpl:items-stretch"
|
|
2259
|
-
},
|
|
2277
|
+
}, fo = ["value"], po = { class: "tpl:mb-3.5" }, mo = { class: "tpl:mb-3.5" }, ho = 350, go = /* @__PURE__ */ M({
|
|
2260
2278
|
__name: "ImageToolbar",
|
|
2261
2279
|
props: { block: {} },
|
|
2262
2280
|
emits: ["update"],
|
|
2263
2281
|
setup(e, { emit: t }) {
|
|
2264
|
-
let n = e, r = t, { t: i } =
|
|
2282
|
+
let n = e, r = t, { t: i } = U(), a = d(Ie, null), o = d(je, re.liquid), c = Gt(), l = v(() => !!a), u = m(!1), p = m(!1), { start: h } = ke(() => {
|
|
2265
2283
|
u.value = !1;
|
|
2266
2284
|
}, 1e3, { immediate: !1 }), g = [
|
|
2267
2285
|
300,
|
|
2268
2286
|
400,
|
|
2269
2287
|
500
|
|
2270
|
-
],
|
|
2288
|
+
], _ = v(() => {
|
|
2271
2289
|
let e = n.block.width;
|
|
2272
2290
|
return e === "full" ? "full" : g.includes(e) ? String(e) : "custom";
|
|
2273
2291
|
});
|
|
2274
|
-
function
|
|
2292
|
+
function S(e, t) {
|
|
2275
2293
|
r("update", { [e]: t });
|
|
2276
2294
|
}
|
|
2277
2295
|
function T(e) {
|
|
2278
2296
|
if (e === "custom") {
|
|
2279
2297
|
let e = n.block.width;
|
|
2280
|
-
(typeof e != "number" || g.includes(e)) &&
|
|
2298
|
+
(typeof e != "number" || g.includes(e)) && S("width", ho);
|
|
2281
2299
|
return;
|
|
2282
2300
|
}
|
|
2283
|
-
|
|
2301
|
+
S("width", e === "full" ? "full" : Number(e));
|
|
2284
2302
|
}
|
|
2285
|
-
function
|
|
2303
|
+
function ee(e) {
|
|
2286
2304
|
let t = Number(e);
|
|
2287
|
-
!Number.isFinite(t) || t <= 0 ||
|
|
2305
|
+
!Number.isFinite(t) || t <= 0 || S("width", t);
|
|
2288
2306
|
}
|
|
2289
|
-
async function
|
|
2307
|
+
async function D() {
|
|
2290
2308
|
let e = await a?.({ accept: ["images"] });
|
|
2291
|
-
c.alive && e && (
|
|
2309
|
+
c.alive && e && (S("src", e.url), e.alt && (S("alt", e.alt), p.value = !0), u.value = !0, h());
|
|
2292
2310
|
}
|
|
2293
|
-
let
|
|
2294
|
-
async function
|
|
2311
|
+
let k = m(), M = m(!1), P = v(() => V(n.block.src, o)), F = v(() => l.value && !M.value && !P.value);
|
|
2312
|
+
async function te(e) {
|
|
2295
2313
|
if (a) {
|
|
2296
|
-
|
|
2314
|
+
M.value = !0;
|
|
2297
2315
|
try {
|
|
2298
2316
|
let t = await a({
|
|
2299
2317
|
accept: ["images"],
|
|
2300
2318
|
files: e
|
|
2301
2319
|
});
|
|
2302
2320
|
if (!c.alive) return;
|
|
2303
|
-
t && (
|
|
2321
|
+
t && (S("src", t.url), t.alt && (S("alt", t.alt), p.value = !0), u.value = !0, h());
|
|
2304
2322
|
} finally {
|
|
2305
|
-
c.alive && (
|
|
2323
|
+
c.alive && (M.value = !1);
|
|
2306
2324
|
}
|
|
2307
2325
|
}
|
|
2308
2326
|
}
|
|
2309
|
-
let { isOver:
|
|
2310
|
-
target:
|
|
2311
|
-
enabled:
|
|
2312
|
-
onFiles:
|
|
2327
|
+
let { isOver: I } = he({
|
|
2328
|
+
target: k,
|
|
2329
|
+
enabled: F,
|
|
2330
|
+
onFiles: te
|
|
2313
2331
|
});
|
|
2314
|
-
return (t, n) => (s(), y(
|
|
2315
|
-
|
|
2332
|
+
return (t, n) => (s(), y(A, null, [
|
|
2333
|
+
E("div", eo, [E("label", { class: O(x(K)) }, C(x(i).image.imageUrl), 3), E("div", {
|
|
2316
2334
|
ref_key: "dropZoneRef",
|
|
2317
|
-
ref:
|
|
2335
|
+
ref: k,
|
|
2318
2336
|
class: "tpl:relative"
|
|
2319
2337
|
}, [
|
|
2320
|
-
|
|
2338
|
+
F.value && (x(I) || M.value) ? (s(), y("div", to, [M.value ? (s(), y(A, { key: 0 }, [N(x(Ot), {
|
|
2321
2339
|
class: "tpl-spinner",
|
|
2322
2340
|
size: 18,
|
|
2323
2341
|
"stroke-width": 2
|
|
2324
|
-
}),
|
|
2342
|
+
}), j(" " + C(x(i).image.uploading), 1)], 64)) : (s(), y(A, { key: 1 }, [N(x(Lt), {
|
|
2325
2343
|
size: 18,
|
|
2326
2344
|
"stroke-width": 1.5
|
|
2327
|
-
}),
|
|
2328
|
-
|
|
2345
|
+
}), j(" " + C(x(i).image.dropToUpload), 1)], 64))])) : b("", !0),
|
|
2346
|
+
N($, {
|
|
2329
2347
|
"model-value": e.block.src,
|
|
2330
2348
|
type: "url",
|
|
2331
2349
|
placeholder: x(i).image.imageUrlPlaceholder,
|
|
2332
2350
|
pulse: u.value,
|
|
2333
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
2351
|
+
"onUpdate:modelValue": n[0] ||= (e) => S("src", e)
|
|
2334
2352
|
}, null, 8, [
|
|
2335
2353
|
"model-value",
|
|
2336
2354
|
"placeholder",
|
|
@@ -2344,66 +2362,66 @@ var Pa = {
|
|
|
2344
2362
|
color: "var(--tpl-primary)",
|
|
2345
2363
|
"background-color": "var(--tpl-bg)"
|
|
2346
2364
|
},
|
|
2347
|
-
onClick:
|
|
2348
|
-
}, [
|
|
2365
|
+
onClick: D
|
|
2366
|
+
}, [N(x(Et), {
|
|
2349
2367
|
size: 14,
|
|
2350
2368
|
"stroke-width": 1.5
|
|
2351
|
-
}),
|
|
2369
|
+
}), j(" " + C(x(i).image.browseMedia), 1)])) : b("", !0)
|
|
2352
2370
|
], 512)]),
|
|
2353
|
-
x(
|
|
2371
|
+
x(V)(e.block.src, x(o)) ? (s(), y("div", no, [E("label", { class: O(x(K)) }, [j(C(x(i).image.placeholderUrl) + " ", 1), n[9] ||= E("span", { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, C("(optional)"), -1)], 2), E("input", {
|
|
2354
2372
|
type: "url",
|
|
2355
|
-
class:
|
|
2373
|
+
class: O(x(G)),
|
|
2356
2374
|
value: e.block.placeholderUrl || "",
|
|
2357
2375
|
placeholder: x(i).image.placeholderUrlPlaceholder,
|
|
2358
|
-
onInput: n[1] ||= (e) =>
|
|
2359
|
-
}, null, 42,
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2376
|
+
onInput: n[1] ||= (e) => S("placeholderUrl", e.target.value)
|
|
2377
|
+
}, null, 42, ro)])) : b("", !0),
|
|
2378
|
+
E("div", io, [
|
|
2379
|
+
E("label", { class: O(x(K)) }, C(x(i).image.altText), 3),
|
|
2380
|
+
N($, {
|
|
2363
2381
|
"model-value": e.block.alt,
|
|
2364
2382
|
type: "text",
|
|
2365
2383
|
placeholder: x(i).image.altTextPlaceholder,
|
|
2366
2384
|
pulse: p.value,
|
|
2367
2385
|
disabled: e.block.decorative === !0,
|
|
2368
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
2386
|
+
"onUpdate:modelValue": n[2] ||= (e) => S("alt", e)
|
|
2369
2387
|
}, null, 8, [
|
|
2370
2388
|
"model-value",
|
|
2371
2389
|
"placeholder",
|
|
2372
2390
|
"pulse",
|
|
2373
2391
|
"disabled"
|
|
2374
2392
|
]),
|
|
2375
|
-
|
|
2393
|
+
N(X, {
|
|
2376
2394
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2377
2395
|
"model-value": e.block.decorative === !0,
|
|
2378
2396
|
label: x(i).image.decorative,
|
|
2379
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
2397
|
+
"onUpdate:modelValue": n[3] ||= (e) => S("decorative", e)
|
|
2380
2398
|
}, {
|
|
2381
|
-
default: f(() => [
|
|
2399
|
+
default: f(() => [E("span", null, [j(C(x(i).image.decorative) + " ", 1), E("span", ao, C(x(i).image.decorativeHint), 1)])]),
|
|
2382
2400
|
_: 1
|
|
2383
2401
|
}, 8, ["model-value", "label"])
|
|
2384
2402
|
]),
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
class:
|
|
2389
|
-
value:
|
|
2403
|
+
E("div", oo, [
|
|
2404
|
+
E("label", { class: O(x(K)) }, C(x(i).image.width), 3),
|
|
2405
|
+
E("select", {
|
|
2406
|
+
class: O(x(G)),
|
|
2407
|
+
value: _.value,
|
|
2390
2408
|
onChange: n[4] ||= (e) => T(e.target.value)
|
|
2391
2409
|
}, [
|
|
2392
|
-
|
|
2393
|
-
n[10] ||=
|
|
2394
|
-
n[11] ||=
|
|
2395
|
-
n[12] ||=
|
|
2396
|
-
|
|
2397
|
-
], 42,
|
|
2398
|
-
|
|
2410
|
+
E("option", co, C(x(i).image.fullWidth), 1),
|
|
2411
|
+
n[10] ||= E("option", { value: "300" }, "300px", -1),
|
|
2412
|
+
n[11] ||= E("option", { value: "400" }, "400px", -1),
|
|
2413
|
+
n[12] ||= E("option", { value: "500" }, "500px", -1),
|
|
2414
|
+
E("option", lo, C(x(i).image.widthCustom), 1)
|
|
2415
|
+
], 42, so),
|
|
2416
|
+
_.value === "custom" ? (s(), y("div", uo, [E("input", {
|
|
2399
2417
|
type: "number",
|
|
2400
|
-
class:
|
|
2401
|
-
value: typeof e.block.width == "number" ? e.block.width :
|
|
2418
|
+
class: O(x(J)),
|
|
2419
|
+
value: typeof e.block.width == "number" ? e.block.width : ho,
|
|
2402
2420
|
min: "20",
|
|
2403
|
-
onInput: n[5] ||= (e) =>
|
|
2404
|
-
}, null, 42,
|
|
2421
|
+
onInput: n[5] ||= (e) => ee(e.target.value)
|
|
2422
|
+
}, null, 42, fo), E("span", { class: O(x(q)) }, "px", 2)])) : b("", !0)
|
|
2405
2423
|
]),
|
|
2406
|
-
|
|
2424
|
+
E("div", po, [E("label", { class: O(x(K)) }, C(x(i).title.align), 3), N(Q, {
|
|
2407
2425
|
options: [
|
|
2408
2426
|
{
|
|
2409
2427
|
value: "left",
|
|
@@ -2419,31 +2437,31 @@ var Pa = {
|
|
|
2419
2437
|
}
|
|
2420
2438
|
],
|
|
2421
2439
|
"model-value": e.block.align,
|
|
2422
|
-
"onUpdate:modelValue": n[6] ||= (e) =>
|
|
2440
|
+
"onUpdate:modelValue": n[6] ||= (e) => S("align", e)
|
|
2423
2441
|
}, null, 8, ["options", "model-value"])]),
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2442
|
+
E("div", mo, [
|
|
2443
|
+
E("label", { class: O(x(K)) }, C(x(i).image.linkUrl), 3),
|
|
2444
|
+
N($, {
|
|
2427
2445
|
"model-value": e.block.linkUrl || "",
|
|
2428
2446
|
type: "url",
|
|
2429
2447
|
placeholder: x(i).image.imageUrlPlaceholder,
|
|
2430
|
-
"onUpdate:modelValue": n[7] ||= (e) =>
|
|
2448
|
+
"onUpdate:modelValue": n[7] ||= (e) => S("linkUrl", e)
|
|
2431
2449
|
}, null, 8, ["model-value", "placeholder"]),
|
|
2432
|
-
e.block.linkUrl ? (s(),
|
|
2450
|
+
e.block.linkUrl ? (s(), w(X, {
|
|
2433
2451
|
key: 0,
|
|
2434
2452
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
2435
2453
|
"model-value": e.block.linkOpenInNewTab ?? !1,
|
|
2436
2454
|
label: x(i).image.openInNewTab,
|
|
2437
|
-
"onUpdate:modelValue": n[8] ||= (e) =>
|
|
2455
|
+
"onUpdate:modelValue": n[8] ||= (e) => S("linkOpenInNewTab", e)
|
|
2438
2456
|
}, null, 8, ["model-value", "label"])) : b("", !0)
|
|
2439
2457
|
])
|
|
2440
2458
|
], 64));
|
|
2441
2459
|
}
|
|
2442
|
-
}),
|
|
2460
|
+
}), _o = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, vo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, yo = [
|
|
2443
2461
|
"value",
|
|
2444
2462
|
"placeholder",
|
|
2445
2463
|
"onInput"
|
|
2446
|
-
],
|
|
2464
|
+
], bo = ["title", "onClick"], xo = { 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)]" }, So = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Co = ["value"], wo = { value: "" }, To = ["value"], Eo = ["value"], Do = /* @__PURE__ */ M({
|
|
2447
2465
|
__name: "MenuToolbar",
|
|
2448
2466
|
props: {
|
|
2449
2467
|
block: {},
|
|
@@ -2451,7 +2469,7 @@ var Pa = {
|
|
|
2451
2469
|
},
|
|
2452
2470
|
emits: ["update"],
|
|
2453
2471
|
setup(e, { emit: t }) {
|
|
2454
|
-
let n = e, r = t, { t: i } =
|
|
2472
|
+
let n = e, r = t, { t: i } = U(), a = v(() => [
|
|
2455
2473
|
{
|
|
2456
2474
|
key: "openInNewTab",
|
|
2457
2475
|
label: i.menu.openInNewTab
|
|
@@ -2468,17 +2486,17 @@ var Pa = {
|
|
|
2468
2486
|
{
|
|
2469
2487
|
value: "left",
|
|
2470
2488
|
label: i.title.alignLeft,
|
|
2471
|
-
icon:
|
|
2489
|
+
icon: jt
|
|
2472
2490
|
},
|
|
2473
2491
|
{
|
|
2474
2492
|
value: "center",
|
|
2475
2493
|
label: i.title.alignCenter,
|
|
2476
|
-
icon:
|
|
2494
|
+
icon: bt
|
|
2477
2495
|
},
|
|
2478
2496
|
{
|
|
2479
2497
|
value: "right",
|
|
2480
2498
|
label: i.title.alignRight,
|
|
2481
|
-
icon:
|
|
2499
|
+
icon: Dt
|
|
2482
2500
|
}
|
|
2483
2501
|
]);
|
|
2484
2502
|
function c(e, t) {
|
|
@@ -2486,7 +2504,7 @@ var Pa = {
|
|
|
2486
2504
|
}
|
|
2487
2505
|
function l() {
|
|
2488
2506
|
let e = {
|
|
2489
|
-
id:
|
|
2507
|
+
id: I(),
|
|
2490
2508
|
text: "",
|
|
2491
2509
|
url: "",
|
|
2492
2510
|
openInNewTab: !1,
|
|
@@ -2505,27 +2523,27 @@ var Pa = {
|
|
|
2505
2523
|
function p(e) {
|
|
2506
2524
|
r("update", { items: n.block.items.filter((t) => t.id !== e) });
|
|
2507
2525
|
}
|
|
2508
|
-
return (t, n) => (s(), y(
|
|
2509
|
-
|
|
2510
|
-
default: f(() => [
|
|
2526
|
+
return (t, n) => (s(), y(A, null, [
|
|
2527
|
+
N(Z, { label: x(i).menu.items }, {
|
|
2528
|
+
default: f(() => [E("div", _o, [(s(!0), y(A, null, u(e.block.items, (t) => (s(), y("div", {
|
|
2511
2529
|
key: t.id,
|
|
2512
2530
|
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"
|
|
2513
2531
|
}, [
|
|
2514
|
-
|
|
2532
|
+
E("div", vo, [E("input", {
|
|
2515
2533
|
type: "text",
|
|
2516
|
-
class:
|
|
2534
|
+
class: O([x(G), "tpl:flex-1"]),
|
|
2517
2535
|
value: t.text,
|
|
2518
2536
|
placeholder: x(i).menu.text,
|
|
2519
2537
|
onInput: (e) => d(t.id, "text", e.target.value)
|
|
2520
|
-
}, null, 42,
|
|
2521
|
-
class:
|
|
2538
|
+
}, null, 42, yo), E("button", {
|
|
2539
|
+
class: O(x(Xt)),
|
|
2522
2540
|
title: x(i).menu.removeItem,
|
|
2523
2541
|
onClick: (e) => p(t.id)
|
|
2524
|
-
}, [
|
|
2542
|
+
}, [N(x(Mt), {
|
|
2525
2543
|
size: 14,
|
|
2526
2544
|
"stroke-width": 2
|
|
2527
|
-
})], 10,
|
|
2528
|
-
|
|
2545
|
+
})], 10, bo)]),
|
|
2546
|
+
N($, {
|
|
2529
2547
|
"model-value": t.url,
|
|
2530
2548
|
type: "url",
|
|
2531
2549
|
placeholder: x(i).menu.urlPlaceholder,
|
|
@@ -2535,7 +2553,7 @@ var Pa = {
|
|
|
2535
2553
|
"placeholder",
|
|
2536
2554
|
"onUpdate:modelValue"
|
|
2537
2555
|
]),
|
|
2538
|
-
|
|
2556
|
+
E("div", xo, [(s(!0), y(A, null, u(a.value, (e) => (s(), w(X, {
|
|
2539
2557
|
key: e.key,
|
|
2540
2558
|
"model-value": t[e.key],
|
|
2541
2559
|
label: e.label,
|
|
@@ -2545,33 +2563,33 @@ var Pa = {
|
|
|
2545
2563
|
"label",
|
|
2546
2564
|
"onUpdate:modelValue"
|
|
2547
2565
|
]))), 128))]),
|
|
2548
|
-
|
|
2566
|
+
E("div", So, [E("label", { class: O([x(K), "tpl:!mb-0"]) }, C(x(i).menu.color), 3), N(Y, {
|
|
2549
2567
|
"swatch-only": "",
|
|
2550
2568
|
"model-value": t.color || e.block.linkColor || e.block.color || "",
|
|
2551
2569
|
"onUpdate:modelValue": (e) => d(t.id, "color", e)
|
|
2552
2570
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])
|
|
2553
|
-
]))), 128)),
|
|
2554
|
-
class:
|
|
2571
|
+
]))), 128)), E("button", {
|
|
2572
|
+
class: O(x($t)),
|
|
2555
2573
|
onClick: l
|
|
2556
|
-
}, [
|
|
2574
|
+
}, [N(x(W), {
|
|
2557
2575
|
size: 14,
|
|
2558
2576
|
"stroke-width": 2
|
|
2559
|
-
}),
|
|
2577
|
+
}), j(" " + C(x(i).menu.addItem), 1)], 2)])]),
|
|
2560
2578
|
_: 1
|
|
2561
2579
|
}, 8, ["label"]),
|
|
2562
|
-
|
|
2563
|
-
default: f(() => [
|
|
2564
|
-
class:
|
|
2580
|
+
N(Z, { label: x(i).menu.fontFamily }, {
|
|
2581
|
+
default: f(() => [E("select", {
|
|
2582
|
+
class: O(x(G)),
|
|
2565
2583
|
value: e.block.fontFamily || "",
|
|
2566
2584
|
onChange: n[0] ||= (e) => c("fontFamily", e.target.value || void 0)
|
|
2567
|
-
}, [
|
|
2585
|
+
}, [E("option", wo, C(x(i).title.inheritFont), 1), (s(!0), y(A, null, u(e.fontFamilies, (e) => (s(), y("option", {
|
|
2568
2586
|
key: e.value,
|
|
2569
2587
|
value: e.value
|
|
2570
|
-
},
|
|
2588
|
+
}, C(e.label), 9, To))), 128))], 42, Co)]),
|
|
2571
2589
|
_: 1
|
|
2572
2590
|
}, 8, ["label"]),
|
|
2573
|
-
|
|
2574
|
-
default: f(() => [
|
|
2591
|
+
N(Z, { label: x(i).menu.fontSize }, {
|
|
2592
|
+
default: f(() => [N(an, {
|
|
2575
2593
|
"model-value": e.block.fontSize,
|
|
2576
2594
|
min: 8,
|
|
2577
2595
|
max: 48,
|
|
@@ -2580,46 +2598,46 @@ var Pa = {
|
|
|
2580
2598
|
}, null, 8, ["model-value"])]),
|
|
2581
2599
|
_: 1
|
|
2582
2600
|
}, 8, ["label"]),
|
|
2583
|
-
|
|
2584
|
-
default: f(() => [
|
|
2601
|
+
N(Z, { label: x(i).menu.color }, {
|
|
2602
|
+
default: f(() => [N(Y, {
|
|
2585
2603
|
"model-value": e.block.color ?? "",
|
|
2586
2604
|
"onUpdate:modelValue": n[2] ||= (e) => c("color", e || void 0)
|
|
2587
2605
|
}, null, 8, ["model-value"])]),
|
|
2588
2606
|
_: 1
|
|
2589
2607
|
}, 8, ["label"]),
|
|
2590
|
-
|
|
2591
|
-
default: f(() => [
|
|
2608
|
+
N(Z, { label: x(i).menu.linkColor }, {
|
|
2609
|
+
default: f(() => [N(Y, {
|
|
2592
2610
|
"model-value": e.block.linkColor || e.block.color || "",
|
|
2593
2611
|
"onUpdate:modelValue": n[3] ||= (e) => c("linkColor", e || void 0)
|
|
2594
2612
|
}, null, 8, ["model-value"])]),
|
|
2595
2613
|
_: 1
|
|
2596
2614
|
}, 8, ["label"]),
|
|
2597
|
-
|
|
2598
|
-
default: f(() => [
|
|
2615
|
+
N(Z, { label: x(i).menu.textAlign }, {
|
|
2616
|
+
default: f(() => [N(Q, {
|
|
2599
2617
|
options: o.value,
|
|
2600
2618
|
"model-value": e.block.textAlign,
|
|
2601
2619
|
"onUpdate:modelValue": n[4] ||= (e) => c("textAlign", e)
|
|
2602
2620
|
}, null, 8, ["options", "model-value"])]),
|
|
2603
2621
|
_: 1
|
|
2604
2622
|
}, 8, ["label"]),
|
|
2605
|
-
|
|
2606
|
-
default: f(() => [
|
|
2623
|
+
N(Z, { label: x(i).menu.separator }, {
|
|
2624
|
+
default: f(() => [E("input", {
|
|
2607
2625
|
type: "text",
|
|
2608
|
-
class:
|
|
2626
|
+
class: O(x(G)),
|
|
2609
2627
|
value: e.block.separator,
|
|
2610
2628
|
onInput: n[5] ||= (e) => c("separator", e.target.value)
|
|
2611
|
-
}, null, 42,
|
|
2629
|
+
}, null, 42, Eo)]),
|
|
2612
2630
|
_: 1
|
|
2613
2631
|
}, 8, ["label"]),
|
|
2614
|
-
|
|
2615
|
-
default: f(() => [
|
|
2632
|
+
N(Z, { label: x(i).menu.separatorColor }, {
|
|
2633
|
+
default: f(() => [N(Y, {
|
|
2616
2634
|
"model-value": e.block.separatorColor,
|
|
2617
2635
|
"onUpdate:modelValue": n[6] ||= (e) => c("separatorColor", e)
|
|
2618
2636
|
}, null, 8, ["model-value"])]),
|
|
2619
2637
|
_: 1
|
|
2620
2638
|
}, 8, ["label"]),
|
|
2621
|
-
|
|
2622
|
-
default: f(() => [
|
|
2639
|
+
N(Z, { label: x(i).menu.spacing }, {
|
|
2640
|
+
default: f(() => [N(an, {
|
|
2623
2641
|
"model-value": e.block.spacing,
|
|
2624
2642
|
min: 0,
|
|
2625
2643
|
max: 50,
|
|
@@ -2633,11 +2651,11 @@ var Pa = {
|
|
|
2633
2651
|
});
|
|
2634
2652
|
//#endregion
|
|
2635
2653
|
//#region src/utils/rebalanceColumnChildren.ts
|
|
2636
|
-
function
|
|
2654
|
+
function Oo(e) {
|
|
2637
2655
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
2638
2656
|
}
|
|
2639
|
-
function
|
|
2640
|
-
let n =
|
|
2657
|
+
function ko(e, t) {
|
|
2658
|
+
let n = Oo(t);
|
|
2641
2659
|
if (e.length === n) return e;
|
|
2642
2660
|
if (e.length < n) {
|
|
2643
2661
|
let t = Array.from({ length: n - e.length }, () => []);
|
|
@@ -2648,18 +2666,18 @@ function Oo(e, t) {
|
|
|
2648
2666
|
}
|
|
2649
2667
|
//#endregion
|
|
2650
2668
|
//#region src/components/toolbar/SectionToolbar.vue?vue&type=script&setup=true&lang.ts
|
|
2651
|
-
var
|
|
2669
|
+
var Ao = { class: "tpl:mb-3.5" }, jo = ["value"], Mo = ["value"], No = {
|
|
2652
2670
|
key: 0,
|
|
2653
2671
|
class: "tpl:mb-3.5"
|
|
2654
|
-
},
|
|
2672
|
+
}, Po = { class: "tpl:mb-3.5" }, Fo = { class: "tpl:flex tpl:items-stretch" }, Io = ["value"], Lo = { class: "tpl:mb-3.5" }, Ro = {
|
|
2655
2673
|
key: 0,
|
|
2656
2674
|
class: "tpl:mt-3 tpl:ml-0.5 tpl:space-y-3 tpl:border-l tpl:border-[var(--tpl-border)] tpl:pl-3"
|
|
2657
|
-
},
|
|
2675
|
+
}, zo = { class: "tpl:flex tpl:items-stretch" }, Bo = ["value"], Vo = /* @__PURE__ */ M({
|
|
2658
2676
|
__name: "SectionToolbar",
|
|
2659
2677
|
props: { block: {} },
|
|
2660
2678
|
emits: ["update"],
|
|
2661
2679
|
setup(e, { emit: t }) {
|
|
2662
|
-
let n = e, r = t, { t: i } =
|
|
2680
|
+
let n = e, r = t, { t: i } = U(), a = v(() => [
|
|
2663
2681
|
{
|
|
2664
2682
|
value: "1",
|
|
2665
2683
|
label: i.section.column1
|
|
@@ -2682,7 +2700,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2682
2700
|
}
|
|
2683
2701
|
]);
|
|
2684
2702
|
function o(e) {
|
|
2685
|
-
let t = e.target.value, i =
|
|
2703
|
+
let t = e.target.value, i = ko(n.block.children, t);
|
|
2686
2704
|
r("update", {
|
|
2687
2705
|
columns: t,
|
|
2688
2706
|
children: i
|
|
@@ -2715,40 +2733,40 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2715
2733
|
function m(e) {
|
|
2716
2734
|
f({ borderRadius: Number(e.target.value) });
|
|
2717
2735
|
}
|
|
2718
|
-
return (t, n) => (s(), y(
|
|
2719
|
-
|
|
2720
|
-
class:
|
|
2736
|
+
return (t, n) => (s(), y(A, null, [
|
|
2737
|
+
E("div", Ao, [E("label", { class: O(x(K)) }, C(x(i).section.columns), 3), E("select", {
|
|
2738
|
+
class: O(x(G)),
|
|
2721
2739
|
value: e.block.columns,
|
|
2722
2740
|
onChange: o
|
|
2723
|
-
}, [(s(!0), y(
|
|
2741
|
+
}, [(s(!0), y(A, null, u(a.value, (e) => (s(), y("option", {
|
|
2724
2742
|
key: e.value,
|
|
2725
2743
|
value: e.value
|
|
2726
|
-
},
|
|
2727
|
-
e.block.columns === "1" ? b("", !0) : (s(), y("div",
|
|
2744
|
+
}, C(e.label), 9, Mo))), 128))], 42, jo)]),
|
|
2745
|
+
e.block.columns === "1" ? b("", !0) : (s(), y("div", No, [N(X, {
|
|
2728
2746
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2729
2747
|
"model-value": e.block.stackOnMobile !== !1,
|
|
2730
2748
|
label: x(i).section.stackOnMobile,
|
|
2731
2749
|
"onUpdate:modelValue": n[0] ||= (e) => c(e)
|
|
2732
2750
|
}, null, 8, ["model-value", "label"])])),
|
|
2733
|
-
|
|
2751
|
+
E("div", Po, [E("label", { class: O(x(K)) }, C(x(i).section.borderRadius), 3), E("div", Fo, [E("input", {
|
|
2734
2752
|
type: "number",
|
|
2735
|
-
class:
|
|
2753
|
+
class: O(x(J)),
|
|
2736
2754
|
value: e.block.borderRadius ?? 0,
|
|
2737
2755
|
min: "0",
|
|
2738
2756
|
max: "50",
|
|
2739
2757
|
onInput: l
|
|
2740
|
-
}, null, 42,
|
|
2741
|
-
|
|
2758
|
+
}, null, 42, Io), E("span", { class: O(x(q)) }, "px", 2)])]),
|
|
2759
|
+
E("div", Lo, [N(X, {
|
|
2742
2760
|
class: "tpl:text-xs tpl:text-[var(--tpl-text)]",
|
|
2743
2761
|
"model-value": !!e.block.wrapper,
|
|
2744
2762
|
label: x(i).section.wrapperEnable,
|
|
2745
2763
|
"onUpdate:modelValue": n[1] ||= (e) => d(e)
|
|
2746
|
-
}, null, 8, ["model-value", "label"]), e.block.wrapper ? (s(), y("div",
|
|
2747
|
-
|
|
2764
|
+
}, null, 8, ["model-value", "label"]), e.block.wrapper ? (s(), y("div", Ro, [
|
|
2765
|
+
E("div", null, [E("label", { class: O(x(K)) }, C(x(i).blockSettings.color), 3), N(Y, {
|
|
2748
2766
|
"model-value": e.block.wrapper.backgroundColor ?? "",
|
|
2749
2767
|
"onUpdate:modelValue": n[2] ||= (e) => f({ backgroundColor: e })
|
|
2750
2768
|
}, null, 8, ["model-value"])]),
|
|
2751
|
-
|
|
2769
|
+
N(zi, {
|
|
2752
2770
|
label: x(i).blockSettings.padding,
|
|
2753
2771
|
"model-value": e.block.wrapper.padding ?? {
|
|
2754
2772
|
top: 0,
|
|
@@ -2758,29 +2776,29 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2758
2776
|
},
|
|
2759
2777
|
"onUpdate:modelValue": p
|
|
2760
2778
|
}, null, 8, ["label", "model-value"]),
|
|
2761
|
-
|
|
2779
|
+
E("div", null, [E("label", { class: O(x(K)) }, C(x(i).section.borderRadius), 3), E("div", zo, [E("input", {
|
|
2762
2780
|
type: "number",
|
|
2763
|
-
class:
|
|
2781
|
+
class: O(x(J)),
|
|
2764
2782
|
value: e.block.wrapper.borderRadius ?? 0,
|
|
2765
2783
|
min: "0",
|
|
2766
2784
|
max: "50",
|
|
2767
2785
|
onInput: m
|
|
2768
|
-
}, null, 42,
|
|
2786
|
+
}, null, 42, Bo), E("span", { class: O(x(q)) }, "px", 2)])])
|
|
2769
2787
|
])) : b("", !0)])
|
|
2770
2788
|
], 64));
|
|
2771
2789
|
}
|
|
2772
|
-
}),
|
|
2790
|
+
}), Ho = { class: "tpl:mb-3.5" }, Uo = { class: "tpl:flex tpl:flex-col tpl:gap-2" }, Wo = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Go = ["value", "onChange"], Ko = ["value"], qo = ["title", "onClick"], Jo = { class: "tpl:mb-3.5" }, Yo = ["value"], Xo = { value: "solid" }, Zo = { value: "outlined" }, Qo = { value: "rounded" }, $o = { value: "square" }, es = { value: "circle" }, ts = { class: "tpl:mb-3.5" }, ns = { class: "tpl:mb-3.5" }, rs = { class: "tpl:flex tpl:items-stretch" }, is = ["value"], as = { class: "tpl:mb-3.5" }, os = /* @__PURE__ */ M({
|
|
2773
2791
|
__name: "SocialToolbar",
|
|
2774
2792
|
props: { block: {} },
|
|
2775
2793
|
emits: ["update"],
|
|
2776
2794
|
setup(e, { emit: t }) {
|
|
2777
|
-
let n = e, r = t, { t: i } =
|
|
2795
|
+
let n = e, r = t, { t: i } = U();
|
|
2778
2796
|
function a(e, t) {
|
|
2779
2797
|
r("update", { [e]: t });
|
|
2780
2798
|
}
|
|
2781
2799
|
function o() {
|
|
2782
2800
|
let e = {
|
|
2783
|
-
id:
|
|
2801
|
+
id: I(),
|
|
2784
2802
|
platform: "facebook",
|
|
2785
2803
|
url: ""
|
|
2786
2804
|
};
|
|
@@ -2796,26 +2814,26 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2796
2814
|
function l(e) {
|
|
2797
2815
|
r("update", { icons: n.block.icons.filter((t) => t.id !== e) });
|
|
2798
2816
|
}
|
|
2799
|
-
return (t, n) => (s(), y(
|
|
2800
|
-
|
|
2817
|
+
return (t, n) => (s(), y(A, null, [
|
|
2818
|
+
E("div", Ho, [E("label", { class: O(x(K)) }, C(x(i).social.icons), 3), E("div", Uo, [(s(!0), y(A, null, u(e.block.icons, (e) => (s(), y("div", {
|
|
2801
2819
|
key: e.id,
|
|
2802
2820
|
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"
|
|
2803
|
-
}, [
|
|
2821
|
+
}, [E("div", Wo, [E("select", {
|
|
2804
2822
|
"data-testid": "social-platform-select",
|
|
2805
|
-
class:
|
|
2823
|
+
class: O([x(G), "tpl:flex-1"]),
|
|
2806
2824
|
value: e.platform,
|
|
2807
2825
|
onChange: (t) => c(e.id, "platform", t.target.value)
|
|
2808
|
-
}, [(s(!0), y(
|
|
2826
|
+
}, [(s(!0), y(A, null, u(x(Ce), (e) => (s(), y("option", {
|
|
2809
2827
|
key: e,
|
|
2810
2828
|
value: e
|
|
2811
|
-
},
|
|
2812
|
-
class:
|
|
2829
|
+
}, C(x(i).social.platforms[e]), 9, Ko))), 128))], 42, Go), E("button", {
|
|
2830
|
+
class: O(x(Xt)),
|
|
2813
2831
|
title: x(i).social.removeIcon,
|
|
2814
2832
|
onClick: (t) => l(e.id)
|
|
2815
|
-
}, [
|
|
2833
|
+
}, [N(x(Mt), {
|
|
2816
2834
|
size: 14,
|
|
2817
2835
|
"stroke-width": 2
|
|
2818
|
-
})], 10,
|
|
2836
|
+
})], 10, qo)]), N($, {
|
|
2819
2837
|
"model-value": e.url,
|
|
2820
2838
|
type: "url",
|
|
2821
2839
|
placeholder: x(i).social.urlPlaceholder,
|
|
@@ -2824,25 +2842,25 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2824
2842
|
"model-value",
|
|
2825
2843
|
"placeholder",
|
|
2826
2844
|
"onUpdate:modelValue"
|
|
2827
|
-
])]))), 128)),
|
|
2828
|
-
class:
|
|
2845
|
+
])]))), 128)), E("button", {
|
|
2846
|
+
class: O(x($t)),
|
|
2829
2847
|
onClick: o
|
|
2830
|
-
}, [
|
|
2848
|
+
}, [N(x(W), {
|
|
2831
2849
|
size: 14,
|
|
2832
2850
|
"stroke-width": 2
|
|
2833
|
-
}),
|
|
2834
|
-
|
|
2835
|
-
class:
|
|
2851
|
+
}), j(" " + C(x(i).social.addIcon), 1)], 2)])]),
|
|
2852
|
+
E("div", Jo, [E("label", { class: O(x(K)) }, C(x(i).social.style), 3), E("select", {
|
|
2853
|
+
class: O(x(G)),
|
|
2836
2854
|
value: e.block.iconStyle,
|
|
2837
2855
|
onChange: n[0] ||= (e) => a("iconStyle", e.target.value)
|
|
2838
2856
|
}, [
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
], 42,
|
|
2845
|
-
|
|
2857
|
+
E("option", Xo, C(x(i).social.styleSolid), 1),
|
|
2858
|
+
E("option", Zo, C(x(i).social.styleOutlined), 1),
|
|
2859
|
+
E("option", Qo, C(x(i).social.styleRounded), 1),
|
|
2860
|
+
E("option", $o, C(x(i).social.styleSquare), 1),
|
|
2861
|
+
E("option", es, C(x(i).social.styleCircle), 1)
|
|
2862
|
+
], 42, Yo)]),
|
|
2863
|
+
E("div", ts, [E("label", { class: O(x(K)) }, C(x(i).social.size), 3), N(Q, {
|
|
2846
2864
|
options: [
|
|
2847
2865
|
{
|
|
2848
2866
|
value: "small",
|
|
@@ -2860,30 +2878,30 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2860
2878
|
"model-value": e.block.iconSize,
|
|
2861
2879
|
"onUpdate:modelValue": n[1] ||= (e) => a("iconSize", e)
|
|
2862
2880
|
}, null, 8, ["options", "model-value"])]),
|
|
2863
|
-
|
|
2881
|
+
E("div", ns, [E("label", { class: O(x(K)) }, C(x(i).social.spacing), 3), E("div", rs, [E("input", {
|
|
2864
2882
|
type: "number",
|
|
2865
|
-
class:
|
|
2883
|
+
class: O(x(J)),
|
|
2866
2884
|
value: e.block.spacing,
|
|
2867
2885
|
min: "0",
|
|
2868
2886
|
max: "50",
|
|
2869
2887
|
onInput: n[2] ||= (e) => a("spacing", Number(e.target.value))
|
|
2870
|
-
}, null, 42,
|
|
2871
|
-
|
|
2888
|
+
}, null, 42, is), E("span", { class: O(x(q)) }, "px", 2)])]),
|
|
2889
|
+
E("div", as, [E("label", { class: O(x(K)) }, C(x(i).social.align), 3), N(Q, {
|
|
2872
2890
|
options: [
|
|
2873
2891
|
{
|
|
2874
2892
|
value: "left",
|
|
2875
2893
|
label: x(i).title.alignLeft,
|
|
2876
|
-
icon: x(
|
|
2894
|
+
icon: x(jt)
|
|
2877
2895
|
},
|
|
2878
2896
|
{
|
|
2879
2897
|
value: "center",
|
|
2880
2898
|
label: x(i).title.alignCenter,
|
|
2881
|
-
icon: x(
|
|
2899
|
+
icon: x(bt)
|
|
2882
2900
|
},
|
|
2883
2901
|
{
|
|
2884
2902
|
value: "right",
|
|
2885
2903
|
label: x(i).title.alignRight,
|
|
2886
|
-
icon: x(
|
|
2904
|
+
icon: x(Dt)
|
|
2887
2905
|
}
|
|
2888
2906
|
],
|
|
2889
2907
|
"model-value": e.block.align,
|
|
@@ -2891,36 +2909,36 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2891
2909
|
}, null, 8, ["options", "model-value"])])
|
|
2892
2910
|
], 64));
|
|
2893
2911
|
}
|
|
2894
|
-
}),
|
|
2912
|
+
}), ss = { class: "tpl:mb-3.5" }, cs = { class: "tpl:flex tpl:items-stretch" }, ls = ["value"], us = ["value"], ds = /* @__PURE__ */ M({
|
|
2895
2913
|
__name: "SpacerToolbar",
|
|
2896
2914
|
props: { block: {} },
|
|
2897
2915
|
emits: ["update"],
|
|
2898
2916
|
setup(e, { emit: t }) {
|
|
2899
|
-
let n = t, { t: r } =
|
|
2900
|
-
return (t, i) => (s(), y("div",
|
|
2901
|
-
|
|
2902
|
-
|
|
2917
|
+
let n = t, { t: r } = U();
|
|
2918
|
+
return (t, i) => (s(), y("div", ss, [
|
|
2919
|
+
E("label", { class: O(x(K)) }, C(x(r).spacer.height), 3),
|
|
2920
|
+
E("div", cs, [E("input", {
|
|
2903
2921
|
type: "number",
|
|
2904
|
-
class:
|
|
2922
|
+
class: O(x(J)),
|
|
2905
2923
|
value: e.block.height,
|
|
2906
2924
|
min: "10",
|
|
2907
2925
|
max: "100",
|
|
2908
2926
|
onInput: i[0] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2909
|
-
}, null, 42,
|
|
2910
|
-
|
|
2927
|
+
}, null, 42, ls), E("span", { class: O(x(q)) }, "px", 2)]),
|
|
2928
|
+
E("input", {
|
|
2911
2929
|
type: "range",
|
|
2912
2930
|
class: "tpl:mt-2 tpl:w-full tpl:accent-[var(--tpl-primary)]",
|
|
2913
2931
|
value: e.block.height,
|
|
2914
2932
|
min: "10",
|
|
2915
2933
|
max: "100",
|
|
2916
2934
|
onInput: i[1] ||= (e) => n("update", { height: Number(e.target.value) })
|
|
2917
|
-
}, null, 40,
|
|
2935
|
+
}, null, 40, us)
|
|
2918
2936
|
]));
|
|
2919
2937
|
}
|
|
2920
|
-
}),
|
|
2938
|
+
}), fs = { class: "tpl:mb-3.5" }, ps = { class: "tpl:flex tpl:items-center tpl:gap-3" }, ms = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, hs = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, gs = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, _s = ["disabled"], vs = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ys = { class: "tpl:flex tpl:flex-1 tpl:items-center tpl:gap-1.5" }, bs = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, xs = { class: "tpl:flex tpl:items-center tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ss = ["disabled"], Cs = { class: "tpl:min-w-[20px] tpl:text-center tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ws = { class: "tpl:mb-3.5" }, Ts = {
|
|
2921
2939
|
key: 0,
|
|
2922
2940
|
class: "tpl:mb-3.5"
|
|
2923
|
-
},
|
|
2941
|
+
}, Es = { class: "tpl:mb-3.5" }, Ds = { class: "tpl:mb-3.5" }, Os = { class: "tpl:flex tpl:items-stretch" }, ks = ["value"], As = { class: "tpl:mb-3.5" }, js = { class: "tpl:flex tpl:items-stretch" }, Ms = ["value"], Ns = { class: "tpl:mb-3.5" }, Ps = ["value"], Fs = { value: "" }, Is = ["value"], Ls = { class: "tpl:mb-3.5" }, Rs = { class: "tpl:flex tpl:items-stretch" }, zs = ["value"], Bs = { class: "tpl:mb-3.5" }, Vs = { class: "tpl:mb-3.5" }, Hs = /* @__PURE__ */ M({
|
|
2924
2942
|
__name: "TableToolbar",
|
|
2925
2943
|
props: {
|
|
2926
2944
|
block: {},
|
|
@@ -2928,15 +2946,15 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2928
2946
|
},
|
|
2929
2947
|
emits: ["update"],
|
|
2930
2948
|
setup(e, { emit: t }) {
|
|
2931
|
-
let n = e, r = t, { t: i } =
|
|
2949
|
+
let n = e, r = t, { t: i } = U(), a = v(() => n.block.rows.length > 0 ? n.block.rows[0].cells.length : 0);
|
|
2932
2950
|
function o(e, t) {
|
|
2933
2951
|
r("update", { [e]: t });
|
|
2934
2952
|
}
|
|
2935
2953
|
function c() {
|
|
2936
2954
|
let e = n.block.rows.length > 0 ? n.block.rows[0].cells.length : 3, t = {
|
|
2937
|
-
id:
|
|
2955
|
+
id: I(),
|
|
2938
2956
|
cells: Array.from({ length: e }, () => ({
|
|
2939
|
-
id:
|
|
2957
|
+
id: I(),
|
|
2940
2958
|
content: ""
|
|
2941
2959
|
}))
|
|
2942
2960
|
};
|
|
@@ -2949,7 +2967,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2949
2967
|
let e = n.block.rows.map((e) => ({
|
|
2950
2968
|
...e,
|
|
2951
2969
|
cells: [...e.cells, {
|
|
2952
|
-
id:
|
|
2970
|
+
id: I(),
|
|
2953
2971
|
content: ""
|
|
2954
2972
|
}]
|
|
2955
2973
|
}));
|
|
@@ -2962,51 +2980,51 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
2962
2980
|
}));
|
|
2963
2981
|
r("update", { rows: t });
|
|
2964
2982
|
}
|
|
2965
|
-
return (t, n) => (s(), y(
|
|
2966
|
-
|
|
2967
|
-
|
|
2983
|
+
return (t, n) => (s(), y(A, null, [
|
|
2984
|
+
E("div", fs, [E("label", { class: O(x(K)) }, C(x(i).table.dimensions), 3), E("div", ps, [E("div", ms, [E("span", hs, C(x(i).table.rows), 1), E("div", gs, [
|
|
2985
|
+
E("button", {
|
|
2968
2986
|
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:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2969
2987
|
disabled: e.block.rows.length <= 1,
|
|
2970
2988
|
onClick: n[0] ||= (t) => l(e.block.rows[e.block.rows.length - 1].id)
|
|
2971
|
-
}, [
|
|
2989
|
+
}, [N(x(Tt), {
|
|
2972
2990
|
size: 12,
|
|
2973
2991
|
"stroke-width": 2
|
|
2974
|
-
})], 8,
|
|
2975
|
-
|
|
2976
|
-
|
|
2992
|
+
})], 8, _s),
|
|
2993
|
+
E("span", vs, C(e.block.rows.length), 1),
|
|
2994
|
+
E("button", {
|
|
2977
2995
|
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:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2978
2996
|
onClick: c
|
|
2979
|
-
}, [
|
|
2997
|
+
}, [N(x(W), {
|
|
2980
2998
|
size: 12,
|
|
2981
2999
|
"stroke-width": 2
|
|
2982
3000
|
})])
|
|
2983
|
-
])]),
|
|
2984
|
-
|
|
3001
|
+
])]), E("div", ys, [E("span", bs, C(x(i).table.columns), 1), E("div", xs, [
|
|
3002
|
+
E("button", {
|
|
2985
3003
|
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:duration-150 tpl:hover:text-[var(--tpl-primary)] tpl:disabled:opacity-30",
|
|
2986
3004
|
disabled: a.value <= 1,
|
|
2987
3005
|
onClick: n[1] ||= (e) => f(a.value - 1)
|
|
2988
|
-
}, [
|
|
3006
|
+
}, [N(x(Tt), {
|
|
2989
3007
|
size: 12,
|
|
2990
3008
|
"stroke-width": 2
|
|
2991
|
-
})], 8,
|
|
2992
|
-
|
|
2993
|
-
|
|
3009
|
+
})], 8, Ss),
|
|
3010
|
+
E("span", Cs, C(a.value), 1),
|
|
3011
|
+
E("button", {
|
|
2994
3012
|
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:duration-150 tpl:hover:text-[var(--tpl-primary)]",
|
|
2995
3013
|
onClick: d
|
|
2996
|
-
}, [
|
|
3014
|
+
}, [N(x(W), {
|
|
2997
3015
|
size: 12,
|
|
2998
3016
|
"stroke-width": 2
|
|
2999
3017
|
})])
|
|
3000
3018
|
])])])]),
|
|
3001
|
-
|
|
3019
|
+
E("div", ws, [N(X, {
|
|
3002
3020
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
3003
3021
|
"model-value": e.block.hasHeaderRow,
|
|
3004
3022
|
label: x(i).table.hasHeaderRow,
|
|
3005
3023
|
"onUpdate:modelValue": n[2] ||= (e) => o("hasHeaderRow", e)
|
|
3006
3024
|
}, null, 8, ["model-value", "label"])]),
|
|
3007
|
-
e.block.hasHeaderRow ? (s(), y("div",
|
|
3025
|
+
e.block.hasHeaderRow ? (s(), y("div", Ts, [E("label", { class: O(x(K)) }, C(x(i).table.headerBackgroundColor), 3), N(Y, {
|
|
3008
3026
|
"model-value": e.block.headerBackgroundColor ?? "",
|
|
3009
|
-
"seed-color": x(
|
|
3027
|
+
"seed-color": x(Qt),
|
|
3010
3028
|
placeholder: x(i).table.noHeaderBg,
|
|
3011
3029
|
"onUpdate:modelValue": n[3] ||= (e) => o("headerBackgroundColor", e || null)
|
|
3012
3030
|
}, null, 8, [
|
|
@@ -3014,62 +3032,62 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3014
3032
|
"seed-color",
|
|
3015
3033
|
"placeholder"
|
|
3016
3034
|
])])) : b("", !0),
|
|
3017
|
-
|
|
3035
|
+
E("div", Es, [E("label", { class: O(x(K)) }, C(x(i).table.borderColor), 3), N(Y, {
|
|
3018
3036
|
"model-value": e.block.borderColor,
|
|
3019
3037
|
"onUpdate:modelValue": n[4] ||= (e) => o("borderColor", e)
|
|
3020
3038
|
}, null, 8, ["model-value"])]),
|
|
3021
|
-
|
|
3039
|
+
E("div", Ds, [E("label", { class: O(x(K)) }, C(x(i).table.borderWidth), 3), E("div", Os, [E("input", {
|
|
3022
3040
|
type: "number",
|
|
3023
|
-
class:
|
|
3041
|
+
class: O(x(J)),
|
|
3024
3042
|
value: e.block.borderWidth,
|
|
3025
3043
|
min: "0",
|
|
3026
3044
|
max: "10",
|
|
3027
3045
|
onInput: n[5] ||= (e) => o("borderWidth", Number(e.target.value))
|
|
3028
|
-
}, null, 42,
|
|
3029
|
-
|
|
3046
|
+
}, null, 42, ks), E("span", { class: O(x(q)) }, "px", 2)])]),
|
|
3047
|
+
E("div", As, [E("label", { class: O(x(K)) }, C(x(i).table.cellPadding), 3), E("div", js, [E("input", {
|
|
3030
3048
|
type: "number",
|
|
3031
|
-
class:
|
|
3049
|
+
class: O(x(J)),
|
|
3032
3050
|
value: e.block.cellPadding,
|
|
3033
3051
|
min: "0",
|
|
3034
3052
|
max: "30",
|
|
3035
3053
|
onInput: n[6] ||= (e) => o("cellPadding", Number(e.target.value))
|
|
3036
|
-
}, null, 42,
|
|
3037
|
-
|
|
3038
|
-
class:
|
|
3054
|
+
}, null, 42, Ms), E("span", { class: O(x(q)) }, "px", 2)])]),
|
|
3055
|
+
E("div", Ns, [E("label", { class: O(x(K)) }, C(x(i).table.fontFamily), 3), E("select", {
|
|
3056
|
+
class: O(x(G)),
|
|
3039
3057
|
value: e.block.fontFamily || "",
|
|
3040
3058
|
onChange: n[7] ||= (e) => o("fontFamily", e.target.value || void 0)
|
|
3041
|
-
}, [
|
|
3059
|
+
}, [E("option", Fs, C(x(i).title.inheritFont), 1), (s(!0), y(A, null, u(e.fontFamilies, (e) => (s(), y("option", {
|
|
3042
3060
|
key: e.value,
|
|
3043
3061
|
value: e.value
|
|
3044
|
-
},
|
|
3045
|
-
|
|
3062
|
+
}, C(e.label), 9, Is))), 128))], 42, Ps)]),
|
|
3063
|
+
E("div", Ls, [E("label", { class: O(x(K)) }, C(x(i).table.fontSize), 3), E("div", Rs, [E("input", {
|
|
3046
3064
|
type: "number",
|
|
3047
|
-
class:
|
|
3065
|
+
class: O(x(J)),
|
|
3048
3066
|
value: e.block.fontSize,
|
|
3049
3067
|
min: "10",
|
|
3050
3068
|
max: "32",
|
|
3051
3069
|
onInput: n[8] ||= (e) => o("fontSize", Number(e.target.value))
|
|
3052
|
-
}, null, 42,
|
|
3053
|
-
|
|
3070
|
+
}, null, 42, zs), E("span", { class: O(x(q)) }, "px", 2)])]),
|
|
3071
|
+
E("div", Bs, [E("label", { class: O(x(K)) }, C(x(i).table.color), 3), N(Y, {
|
|
3054
3072
|
"model-value": e.block.color ?? "",
|
|
3055
3073
|
"onUpdate:modelValue": n[9] ||= (e) => o("color", e || void 0)
|
|
3056
3074
|
}, null, 8, ["model-value"])]),
|
|
3057
|
-
|
|
3075
|
+
E("div", Vs, [E("label", { class: O(x(K)) }, C(x(i).table.textAlign), 3), N(Q, {
|
|
3058
3076
|
options: [
|
|
3059
3077
|
{
|
|
3060
3078
|
value: "left",
|
|
3061
3079
|
label: x(i).title.alignLeft,
|
|
3062
|
-
icon: x(
|
|
3080
|
+
icon: x(jt)
|
|
3063
3081
|
},
|
|
3064
3082
|
{
|
|
3065
3083
|
value: "center",
|
|
3066
3084
|
label: x(i).title.alignCenter,
|
|
3067
|
-
icon: x(
|
|
3085
|
+
icon: x(bt)
|
|
3068
3086
|
},
|
|
3069
3087
|
{
|
|
3070
3088
|
value: "right",
|
|
3071
3089
|
label: x(i).title.alignRight,
|
|
3072
|
-
icon: x(
|
|
3090
|
+
icon: x(Dt)
|
|
3073
3091
|
}
|
|
3074
3092
|
],
|
|
3075
3093
|
"model-value": e.block.textAlign,
|
|
@@ -3077,7 +3095,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3077
3095
|
}, null, 8, ["options", "model-value"])])
|
|
3078
3096
|
], 64));
|
|
3079
3097
|
}
|
|
3080
|
-
}),
|
|
3098
|
+
}), Us = { class: "tpl:mb-3.5" }, Ws = ["value"], Gs = { value: 1 }, Ks = { value: 2 }, qs = { value: 3 }, Js = { value: 4 }, Ys = { class: "tpl:mb-3.5" }, Xs = ["value"], Zs = { value: "" }, Qs = ["value"], $s = { class: "tpl:mb-3.5" }, ec = { class: "tpl:mb-3.5" }, tc = /* @__PURE__ */ M({
|
|
3081
3099
|
__name: "TitleToolbar",
|
|
3082
3100
|
props: {
|
|
3083
3101
|
block: {},
|
|
@@ -3085,49 +3103,49 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3085
3103
|
},
|
|
3086
3104
|
emits: ["update"],
|
|
3087
3105
|
setup(e, { emit: t }) {
|
|
3088
|
-
let n = t, { t: r } =
|
|
3106
|
+
let n = t, { t: r } = U();
|
|
3089
3107
|
function i(e, t) {
|
|
3090
3108
|
n("update", { [e]: t });
|
|
3091
3109
|
}
|
|
3092
|
-
return (t, n) => (s(), y(
|
|
3093
|
-
|
|
3094
|
-
class:
|
|
3110
|
+
return (t, n) => (s(), y(A, null, [
|
|
3111
|
+
E("div", Us, [E("label", { class: O(x(K)) }, C(x(r).title.level), 3), E("select", {
|
|
3112
|
+
class: O(x(G)),
|
|
3095
3113
|
value: e.block.level,
|
|
3096
3114
|
onChange: n[0] ||= (e) => i("level", Number(e.target.value))
|
|
3097
3115
|
}, [
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
], 42,
|
|
3103
|
-
|
|
3104
|
-
class:
|
|
3116
|
+
E("option", Gs, C(x(r).title.heading1), 1),
|
|
3117
|
+
E("option", Ks, C(x(r).title.heading2), 1),
|
|
3118
|
+
E("option", qs, C(x(r).title.heading3), 1),
|
|
3119
|
+
E("option", Js, C(x(r).title.heading4), 1)
|
|
3120
|
+
], 42, Ws)]),
|
|
3121
|
+
E("div", Ys, [E("label", { class: O(x(K)) }, C(x(r).title.fontFamily), 3), E("select", {
|
|
3122
|
+
class: O(x(G)),
|
|
3105
3123
|
value: e.block.fontFamily || "",
|
|
3106
3124
|
onChange: n[1] ||= (e) => i("fontFamily", e.target.value || void 0)
|
|
3107
|
-
}, [
|
|
3125
|
+
}, [E("option", Zs, C(x(r).title.inheritFont), 1), (s(!0), y(A, null, u(e.fontFamilies, (e) => (s(), y("option", {
|
|
3108
3126
|
key: e.value,
|
|
3109
3127
|
value: e.value
|
|
3110
|
-
},
|
|
3111
|
-
|
|
3128
|
+
}, C(e.label), 9, Qs))), 128))], 42, Xs)]),
|
|
3129
|
+
E("div", $s, [E("label", { class: O(x(K)) }, C(x(r).title.color), 3), N(Y, {
|
|
3112
3130
|
"model-value": e.block.color ?? "",
|
|
3113
3131
|
"onUpdate:modelValue": n[2] ||= (e) => i("color", e || void 0)
|
|
3114
3132
|
}, null, 8, ["model-value"])]),
|
|
3115
|
-
|
|
3133
|
+
E("div", ec, [E("label", { class: O(x(K)) }, C(x(r).title.align), 3), N(Q, {
|
|
3116
3134
|
options: [
|
|
3117
3135
|
{
|
|
3118
3136
|
value: "left",
|
|
3119
3137
|
label: x(r).title.alignLeft,
|
|
3120
|
-
icon: x(
|
|
3138
|
+
icon: x(jt)
|
|
3121
3139
|
},
|
|
3122
3140
|
{
|
|
3123
3141
|
value: "center",
|
|
3124
3142
|
label: x(r).title.alignCenter,
|
|
3125
|
-
icon: x(
|
|
3143
|
+
icon: x(bt)
|
|
3126
3144
|
},
|
|
3127
3145
|
{
|
|
3128
3146
|
value: "right",
|
|
3129
3147
|
label: x(r).title.alignRight,
|
|
3130
|
-
icon: x(
|
|
3148
|
+
icon: x(Dt)
|
|
3131
3149
|
}
|
|
3132
3150
|
],
|
|
3133
3151
|
"model-value": e.block.textAlign,
|
|
@@ -3135,19 +3153,19 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3135
3153
|
}, null, 8, ["options", "model-value"])])
|
|
3136
3154
|
], 64));
|
|
3137
3155
|
}
|
|
3138
|
-
}),
|
|
3156
|
+
}), nc = { class: "tpl:mb-3.5" }, rc = {
|
|
3139
3157
|
key: 0,
|
|
3140
3158
|
class: "tpl:mb-3.5"
|
|
3141
|
-
},
|
|
3159
|
+
}, ic = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, ac = [
|
|
3142
3160
|
"value",
|
|
3143
3161
|
"placeholder",
|
|
3144
3162
|
"title"
|
|
3145
|
-
],
|
|
3163
|
+
], oc = { class: "tpl:mb-3.5" }, sc = { class: "tpl:font-normal tpl:text-[var(--tpl-text-dim)]" }, cc = { class: "tpl:mb-3.5" }, lc = { class: "tpl:mb-3.5" }, uc = ["value"], dc = { value: "full" }, fc = { class: "tpl:mb-3.5" }, pc = /* @__PURE__ */ M({
|
|
3146
3164
|
__name: "VideoToolbar",
|
|
3147
3165
|
props: { block: {} },
|
|
3148
3166
|
emits: ["update"],
|
|
3149
3167
|
setup(e, { emit: t }) {
|
|
3150
|
-
let n = e, r = t, { t: i } =
|
|
3168
|
+
let n = e, r = t, { t: i } = U(), a = d(Ie, null), o = d(je, re.liquid), c = Gt(), l = v(() => !!a), u = v(() => V(n.block.url, o)), f = m(!1), { start: p } = ke(() => {
|
|
3151
3169
|
f.value = !1;
|
|
3152
3170
|
}, 1e3, { immediate: !1 });
|
|
3153
3171
|
function h(e, t) {
|
|
@@ -3157,16 +3175,16 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3157
3175
|
let e = await a?.({ accept: ["images"] });
|
|
3158
3176
|
c.alive && e && (h("thumbnailUrl", e.url), f.value = !0, p());
|
|
3159
3177
|
}
|
|
3160
|
-
return (t, n) => (s(), y(
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3178
|
+
return (t, n) => (s(), y(A, null, [
|
|
3179
|
+
E("div", nc, [
|
|
3180
|
+
E("label", { class: O(x(K)) }, C(x(i).video.videoUrl), 3),
|
|
3181
|
+
N($, {
|
|
3164
3182
|
"model-value": e.block.url,
|
|
3165
3183
|
type: "url",
|
|
3166
3184
|
placeholder: x(i).video.videoUrlPlaceholder,
|
|
3167
3185
|
"onUpdate:modelValue": n[0] ||= (e) => h("url", e)
|
|
3168
3186
|
}, null, 8, ["model-value", "placeholder"]),
|
|
3169
|
-
e.block.url ? (s(),
|
|
3187
|
+
e.block.url ? (s(), w(X, {
|
|
3170
3188
|
key: 0,
|
|
3171
3189
|
class: "tpl:mt-2 tpl:text-[12px] tpl:text-[var(--tpl-text-muted)]",
|
|
3172
3190
|
"model-value": e.block.openInNewTab ?? !1,
|
|
@@ -3174,17 +3192,17 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3174
3192
|
"onUpdate:modelValue": n[1] ||= (e) => h("openInNewTab", e)
|
|
3175
3193
|
}, null, 8, ["model-value", "label"])) : b("", !0)
|
|
3176
3194
|
]),
|
|
3177
|
-
u.value ? (s(), y("div",
|
|
3195
|
+
u.value ? (s(), y("div", rc, [E("label", { class: O(x(K)) }, [j(C(x(i).video.placeholderUrl) + " ", 1), E("span", ic, C(x(i).video.optional), 1)], 2), E("input", {
|
|
3178
3196
|
type: "url",
|
|
3179
|
-
class:
|
|
3197
|
+
class: O(x(G)),
|
|
3180
3198
|
value: e.block.placeholderUrl || "",
|
|
3181
3199
|
placeholder: x(i).video.placeholderUrlPlaceholder,
|
|
3182
3200
|
title: x(i).video.placeholderUrlTooltip,
|
|
3183
3201
|
onInput: n[2] ||= (e) => h("placeholderUrl", e.target.value)
|
|
3184
|
-
}, null, 42,
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3202
|
+
}, null, 42, ac)])) : b("", !0),
|
|
3203
|
+
E("div", oc, [
|
|
3204
|
+
E("label", { class: O(x(K)) }, [j(C(x(i).video.customThumbnail) + " ", 1), E("span", sc, C(x(i).video.optional), 1)], 2),
|
|
3205
|
+
N($, {
|
|
3188
3206
|
"model-value": e.block.thumbnailUrl,
|
|
3189
3207
|
type: "url",
|
|
3190
3208
|
placeholder: x(i).video.thumbnailPlaceholder,
|
|
@@ -3204,28 +3222,28 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3204
3222
|
"background-color": "var(--tpl-bg)"
|
|
3205
3223
|
},
|
|
3206
3224
|
onClick: g
|
|
3207
|
-
}, [
|
|
3225
|
+
}, [N(x(Et), {
|
|
3208
3226
|
size: 14,
|
|
3209
3227
|
"stroke-width": 1.5
|
|
3210
|
-
}),
|
|
3228
|
+
}), j(" " + C(x(i).image.browseMedia), 1)])) : b("", !0)
|
|
3211
3229
|
]),
|
|
3212
|
-
|
|
3230
|
+
E("div", cc, [E("label", { class: O(x(K)) }, C(x(i).video.altText), 3), N($, {
|
|
3213
3231
|
"model-value": e.block.alt,
|
|
3214
3232
|
type: "text",
|
|
3215
3233
|
placeholder: x(i).video.altTextPlaceholder,
|
|
3216
3234
|
"onUpdate:modelValue": n[4] ||= (e) => h("alt", e)
|
|
3217
3235
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
3218
|
-
|
|
3219
|
-
class:
|
|
3236
|
+
E("div", lc, [E("label", { class: O(x(K)) }, C(x(i).video.width), 3), E("select", {
|
|
3237
|
+
class: O(x(G)),
|
|
3220
3238
|
value: e.block.width,
|
|
3221
3239
|
onChange: n[5] ||= (e) => h("width", e.target.value === "full" ? "full" : Number(e.target.value))
|
|
3222
3240
|
}, [
|
|
3223
|
-
|
|
3224
|
-
n[7] ||=
|
|
3225
|
-
n[8] ||=
|
|
3226
|
-
n[9] ||=
|
|
3227
|
-
], 42,
|
|
3228
|
-
|
|
3241
|
+
E("option", dc, C(x(i).video.fullWidth), 1),
|
|
3242
|
+
n[7] ||= E("option", { value: "300" }, "300px", -1),
|
|
3243
|
+
n[8] ||= E("option", { value: "400" }, "400px", -1),
|
|
3244
|
+
n[9] ||= E("option", { value: "500" }, "500px", -1)
|
|
3245
|
+
], 42, uc)]),
|
|
3246
|
+
E("div", fc, [E("label", { class: O(x(K)) }, C(x(i).title.align), 3), N(Q, {
|
|
3229
3247
|
options: [
|
|
3230
3248
|
{
|
|
3231
3249
|
value: "left",
|
|
@@ -3245,7 +3263,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3245
3263
|
}, null, 8, ["options", "model-value"])])
|
|
3246
3264
|
], 64));
|
|
3247
3265
|
}
|
|
3248
|
-
}),
|
|
3266
|
+
}), mc = ["aria-label"], hc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3.5" }, gc = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-[var(--tpl-primary)]" }, _c = { class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, vc = { class: "tpl:flex tpl:gap-1" }, yc = ["title"], bc = ["title"], xc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Sc = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
3249
3267
|
__name: "Toolbar",
|
|
3250
3268
|
props: { block: {} },
|
|
3251
3269
|
emits: [
|
|
@@ -3254,141 +3272,141 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3254
3272
|
"duplicate"
|
|
3255
3273
|
],
|
|
3256
3274
|
setup(e, { emit: t }) {
|
|
3257
|
-
let n = h(() => import("./CountdownToolbar-
|
|
3275
|
+
let n = h(() => import("./CountdownToolbar-DPjcgcVR.js")), r = e, i = t, { t: a } = U(), c = Ne(nt, "Toolbar"), l = d(Qe, []), u = v(() => r.block.type), f = v(() => F(r.block)), p = v(() => {
|
|
3258
3276
|
if (f.value) return l.find((e) => e.type === r.block.customType);
|
|
3259
|
-
}), m = v(() => f.value ? p.value?.name ?? r.block.customType :
|
|
3260
|
-
function
|
|
3277
|
+
}), m = v(() => f.value ? p.value?.name ?? r.block.customType : ce(u.value, a)), g = c.fonts;
|
|
3278
|
+
function _(e) {
|
|
3261
3279
|
i("update", e);
|
|
3262
3280
|
}
|
|
3263
3281
|
return (t, r) => (s(), y("aside", {
|
|
3264
3282
|
"aria-label": x(a).landmarks.blockToolbar,
|
|
3265
3283
|
class: "tpl:flex tpl:w-full tpl:flex-1 tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)]"
|
|
3266
|
-
}, [
|
|
3284
|
+
}, [E("div", hc, [E("div", gc, [x(Yt)[u.value] ? (s(), w(o(x(Yt)[u.value]), {
|
|
3267
3285
|
key: 0,
|
|
3268
3286
|
size: 16,
|
|
3269
3287
|
"stroke-width": 1.5
|
|
3270
|
-
})) : f.value ? (s(),
|
|
3288
|
+
})) : f.value ? (s(), w(x(pt), {
|
|
3271
3289
|
key: 1,
|
|
3272
3290
|
size: 16,
|
|
3273
3291
|
"stroke-width": 1.5
|
|
3274
|
-
})) : b("", !0),
|
|
3292
|
+
})) : b("", !0), E("h3", _c, C(m.value), 1)]), E("div", vc, [E("button", {
|
|
3275
3293
|
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:duration-150 tpl:hover:bg-[var(--tpl-bg-active)] tpl:hover:text-[var(--tpl-text)]",
|
|
3276
3294
|
title: x(a).toolbar.duplicate,
|
|
3277
3295
|
onClick: r[0] ||= (e) => i("duplicate")
|
|
3278
|
-
}, [
|
|
3296
|
+
}, [N(x(lt), {
|
|
3279
3297
|
size: 14,
|
|
3280
3298
|
"stroke-width": 2
|
|
3281
|
-
})], 8,
|
|
3299
|
+
})], 8, yc), E("button", {
|
|
3282
3300
|
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:duration-150 tpl:hover:border-[var(--tpl-danger)] tpl:hover:bg-[var(--tpl-danger-light)] tpl:hover:text-[var(--tpl-danger)]",
|
|
3283
3301
|
title: x(a).toolbar.delete,
|
|
3284
3302
|
onClick: r[1] ||= (e) => i("delete")
|
|
3285
|
-
}, [
|
|
3303
|
+
}, [N(x(Ct), {
|
|
3286
3304
|
size: 14,
|
|
3287
3305
|
"stroke-width": 2
|
|
3288
|
-
})], 8,
|
|
3306
|
+
})], 8, bc)])]), E("div", xc, [f.value ? (s(), w(Ua, {
|
|
3289
3307
|
key: 0,
|
|
3290
3308
|
block: e.block,
|
|
3291
3309
|
onUpdateFieldValues: r[2] ||= (e) => i("update", { fieldValues: e }),
|
|
3292
3310
|
onUpdateDataSourceFetched: r[3] ||= (e) => i("update", { dataSourceFetched: e })
|
|
3293
|
-
}, null, 8, ["block"])) : u.value === "section" ? (s(),
|
|
3311
|
+
}, null, 8, ["block"])) : u.value === "section" ? (s(), w(Vo, {
|
|
3294
3312
|
key: 1,
|
|
3295
3313
|
block: e.block,
|
|
3296
|
-
onUpdate:
|
|
3297
|
-
}, null, 8, ["block"])) : u.value === "title" ? (s(),
|
|
3314
|
+
onUpdate: _
|
|
3315
|
+
}, null, 8, ["block"])) : u.value === "title" ? (s(), w(tc, {
|
|
3298
3316
|
key: 2,
|
|
3299
3317
|
block: e.block,
|
|
3300
3318
|
"font-families": x(g),
|
|
3301
|
-
onUpdate:
|
|
3302
|
-
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (s(), y(
|
|
3319
|
+
onUpdate: _
|
|
3320
|
+
}, null, 8, ["block", "font-families"])) : u.value === "paragraph" ? (s(), y(A, { key: 3 }, [], 64)) : u.value === "image" ? (s(), w(go, {
|
|
3303
3321
|
key: 4,
|
|
3304
3322
|
block: e.block,
|
|
3305
|
-
onUpdate:
|
|
3306
|
-
}, null, 8, ["block"])) : u.value === "video" ? (s(),
|
|
3323
|
+
onUpdate: _
|
|
3324
|
+
}, null, 8, ["block"])) : u.value === "video" ? (s(), w(pc, {
|
|
3307
3325
|
key: 5,
|
|
3308
3326
|
block: e.block,
|
|
3309
|
-
onUpdate:
|
|
3310
|
-
}, null, 8, ["block"])) : u.value === "button" ? (s(),
|
|
3327
|
+
onUpdate: _
|
|
3328
|
+
}, null, 8, ["block"])) : u.value === "button" ? (s(), w(hi, {
|
|
3311
3329
|
key: 6,
|
|
3312
3330
|
block: e.block,
|
|
3313
3331
|
"font-families": x(g),
|
|
3314
|
-
onUpdate:
|
|
3315
|
-
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (s(),
|
|
3332
|
+
onUpdate: _
|
|
3333
|
+
}, null, 8, ["block", "font-families"])) : u.value === "divider" ? (s(), w(Ya, {
|
|
3316
3334
|
key: 7,
|
|
3317
3335
|
block: e.block,
|
|
3318
|
-
onUpdate:
|
|
3319
|
-
}, null, 8, ["block"])) : u.value === "social" ? (s(),
|
|
3336
|
+
onUpdate: _
|
|
3337
|
+
}, null, 8, ["block"])) : u.value === "social" ? (s(), w(os, {
|
|
3320
3338
|
key: 8,
|
|
3321
3339
|
block: e.block,
|
|
3322
|
-
onUpdate:
|
|
3323
|
-
}, null, 8, ["block"])) : u.value === "menu" ? (s(),
|
|
3340
|
+
onUpdate: _
|
|
3341
|
+
}, null, 8, ["block"])) : u.value === "menu" ? (s(), w(Do, {
|
|
3324
3342
|
key: 9,
|
|
3325
3343
|
block: e.block,
|
|
3326
3344
|
"font-families": x(g),
|
|
3327
|
-
onUpdate:
|
|
3328
|
-
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (s(),
|
|
3345
|
+
onUpdate: _
|
|
3346
|
+
}, null, 8, ["block", "font-families"])) : u.value === "table" ? (s(), w(Hs, {
|
|
3329
3347
|
key: 10,
|
|
3330
3348
|
block: e.block,
|
|
3331
3349
|
"font-families": x(g),
|
|
3332
|
-
onUpdate:
|
|
3333
|
-
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (s(),
|
|
3350
|
+
onUpdate: _
|
|
3351
|
+
}, null, 8, ["block", "font-families"])) : u.value === "spacer" ? (s(), w(ds, {
|
|
3334
3352
|
key: 11,
|
|
3335
3353
|
block: e.block,
|
|
3336
|
-
onUpdate:
|
|
3337
|
-
}, null, 8, ["block"])) : u.value === "html" ? (s(),
|
|
3354
|
+
onUpdate: _
|
|
3355
|
+
}, null, 8, ["block"])) : u.value === "html" ? (s(), w($a, {
|
|
3338
3356
|
key: 12,
|
|
3339
3357
|
block: e.block,
|
|
3340
|
-
onUpdate:
|
|
3341
|
-
}, null, 8, ["block"])) : u.value === "countdown" ? (s(),
|
|
3358
|
+
onUpdate: _
|
|
3359
|
+
}, null, 8, ["block"])) : u.value === "countdown" ? (s(), w(x(n), {
|
|
3342
3360
|
key: 13,
|
|
3343
3361
|
block: e.block,
|
|
3344
3362
|
"font-families": x(g),
|
|
3345
|
-
onUpdate:
|
|
3346
|
-
}, null, 8, ["block", "font-families"])) : b("", !0),
|
|
3363
|
+
onUpdate: _
|
|
3364
|
+
}, null, 8, ["block", "font-families"])) : b("", !0), N(sa, {
|
|
3347
3365
|
block: e.block,
|
|
3348
3366
|
"is-first-section": u.value === "paragraph",
|
|
3349
|
-
onUpdate:
|
|
3350
|
-
}, null, 8, ["block", "is-first-section"])])], 8,
|
|
3367
|
+
onUpdate: _
|
|
3368
|
+
}, null, 8, ["block", "is-first-section"])])], 8, mc));
|
|
3351
3369
|
}
|
|
3352
|
-
}), [["__scopeId", "data-v-2ac88283"]]),
|
|
3370
|
+
}), [["__scopeId", "data-v-2ac88283"]]), Cc = ["aria-label"], wc = {
|
|
3353
3371
|
role: "tablist",
|
|
3354
3372
|
class: "tpl:relative tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-active)] tpl:p-1.5"
|
|
3355
|
-
},
|
|
3373
|
+
}, Tc = [
|
|
3356
3374
|
"aria-selected",
|
|
3357
3375
|
"aria-label",
|
|
3358
3376
|
"title"
|
|
3359
|
-
],
|
|
3377
|
+
], Ec = { key: 0 }, Dc = [
|
|
3360
3378
|
"aria-selected",
|
|
3361
3379
|
"aria-label",
|
|
3362
3380
|
"title"
|
|
3363
|
-
],
|
|
3381
|
+
], Oc = { key: 0 }, kc = [
|
|
3364
3382
|
"aria-selected",
|
|
3365
3383
|
"aria-label",
|
|
3366
3384
|
"title"
|
|
3367
|
-
],
|
|
3385
|
+
], Ac = { key: 0 }, jc = {
|
|
3368
3386
|
key: 1,
|
|
3369
3387
|
class: "tpl:ml-1 tpl:rounded-full tpl:bg-[var(--tpl-bg-hover)] tpl:px-1.5 tpl:text-[10px]"
|
|
3370
|
-
},
|
|
3388
|
+
}, Mc = {
|
|
3371
3389
|
key: 0,
|
|
3372
3390
|
id: "tpl-tabpanel-content",
|
|
3373
3391
|
role: "tabpanel",
|
|
3374
3392
|
"aria-labelledby": "tpl-tab-content",
|
|
3375
3393
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3376
|
-
},
|
|
3394
|
+
}, Nc = {
|
|
3377
3395
|
key: 1,
|
|
3378
3396
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:px-6 tpl:py-10 tpl:text-center tpl:text-[var(--tpl-text-muted)]"
|
|
3379
|
-
},
|
|
3397
|
+
}, Pc = { class: "tpl:mb-4 tpl:text-[var(--tpl-text-dim)]" }, Fc = { class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ic = { class: "tpl:m-0 tpl:text-sm tpl:leading-normal" }, Lc = {
|
|
3380
3398
|
key: 1,
|
|
3381
3399
|
id: "tpl-tabpanel-settings",
|
|
3382
3400
|
role: "tabpanel",
|
|
3383
3401
|
"aria-labelledby": "tpl-tab-settings",
|
|
3384
3402
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3385
|
-
},
|
|
3403
|
+
}, Rc = {
|
|
3386
3404
|
key: 2,
|
|
3387
3405
|
id: "tpl-tabpanel-issues",
|
|
3388
3406
|
role: "tabpanel",
|
|
3389
3407
|
"aria-labelledby": "tpl-tab-issues",
|
|
3390
3408
|
class: "tpl:flex tpl:flex-1 tpl:flex-col tpl:overflow-y-auto"
|
|
3391
|
-
},
|
|
3409
|
+
}, zc = /* @__PURE__ */ M({
|
|
3392
3410
|
__name: "RightSidebar",
|
|
3393
3411
|
props: {
|
|
3394
3412
|
selectedBlock: {},
|
|
@@ -3402,7 +3420,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3402
3420
|
"update-settings"
|
|
3403
3421
|
],
|
|
3404
3422
|
setup(e, { emit: t }) {
|
|
3405
|
-
let n = h(() => import("./IssuesPanel-
|
|
3423
|
+
let n = h(() => import("./IssuesPanel-DKTS4QVb.js")), r = e, i = t, { t: a } = U(), o = m("content"), c = d(Me, null), l = v(() => c !== null), u = v(() => c?.issues.value.length ?? 0);
|
|
3406
3424
|
function f(e) {
|
|
3407
3425
|
return o.value === e ? "tpl:flex-1 tpl:text-[var(--tpl-primary)]" : "tpl:shrink-0 tpl:text-[var(--tpl-text-muted)] hover:tpl:text-[var(--tpl-text)]";
|
|
3408
3426
|
}
|
|
@@ -3412,41 +3430,41 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3412
3430
|
boxShadow: "var(--tpl-shadow-md)"
|
|
3413
3431
|
} : { backgroundColor: "transparent" };
|
|
3414
3432
|
}
|
|
3415
|
-
return
|
|
3433
|
+
return P(() => r.selectedBlock, (e) => {
|
|
3416
3434
|
e && (o.value = "content");
|
|
3417
3435
|
}), (t, r) => (s(), y("aside", {
|
|
3418
3436
|
"aria-label": x(a).landmarks.rightSidebar,
|
|
3419
|
-
class:
|
|
3437
|
+
class: O(["tpl-right-sidebar tpl:absolute tpl:top-14 tpl:bottom-0 tpl:z-40 tpl:flex tpl:w-[320px] tpl:flex-col tpl:bg-[var(--tpl-bg-elevated)] tpl:transition-all tpl:duration-200 tpl:border-l tpl:border-[var(--tpl-border)]", e.shiftedLeft ? "tpl:right-[360px]" : "tpl:right-0"])
|
|
3420
3438
|
}, [
|
|
3421
|
-
|
|
3422
|
-
|
|
3439
|
+
E("div", wc, [
|
|
3440
|
+
E("button", {
|
|
3423
3441
|
id: "tpl-tab-content",
|
|
3424
3442
|
role: "tab",
|
|
3425
3443
|
"aria-selected": o.value === "content",
|
|
3426
3444
|
"aria-controls": "tpl-tabpanel-content",
|
|
3427
3445
|
"aria-label": x(a).sidebar.content,
|
|
3428
3446
|
title: x(a).sidebar.content,
|
|
3429
|
-
class:
|
|
3430
|
-
style:
|
|
3447
|
+
class: O(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", f("content")]),
|
|
3448
|
+
style: _(p("content")),
|
|
3431
3449
|
onClick: r[0] ||= (e) => o.value = "content"
|
|
3432
|
-
}, [
|
|
3450
|
+
}, [N(x(Ft), {
|
|
3433
3451
|
size: 14,
|
|
3434
3452
|
"stroke-width": 2
|
|
3435
|
-
}), o.value === "content" ? (s(), y("span",
|
|
3436
|
-
|
|
3453
|
+
}), o.value === "content" ? (s(), y("span", Ec, C(x(a).sidebar.content), 1)) : b("", !0)], 14, Tc),
|
|
3454
|
+
E("button", {
|
|
3437
3455
|
id: "tpl-tab-settings",
|
|
3438
3456
|
role: "tab",
|
|
3439
3457
|
"aria-selected": o.value === "settings",
|
|
3440
3458
|
"aria-controls": "tpl-tabpanel-settings",
|
|
3441
3459
|
"aria-label": x(a).sidebar.settings,
|
|
3442
3460
|
title: x(a).sidebar.settings,
|
|
3443
|
-
class:
|
|
3444
|
-
style:
|
|
3461
|
+
class: O(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", f("settings")]),
|
|
3462
|
+
style: _(p("settings")),
|
|
3445
3463
|
onClick: r[1] ||= (e) => o.value = "settings"
|
|
3446
|
-
}, [
|
|
3464
|
+
}, [N(x(kt), {
|
|
3447
3465
|
size: 14,
|
|
3448
3466
|
"stroke-width": 1.5
|
|
3449
|
-
}), o.value === "settings" ? (s(), y("span",
|
|
3467
|
+
}), o.value === "settings" ? (s(), y("span", Oc, C(x(a).sidebar.settings), 1)) : b("", !0)], 14, Dc),
|
|
3450
3468
|
l.value ? (s(), y("button", {
|
|
3451
3469
|
key: 0,
|
|
3452
3470
|
id: "tpl-tab-issues",
|
|
@@ -3455,70 +3473,70 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3455
3473
|
"aria-controls": "tpl-tabpanel-issues",
|
|
3456
3474
|
"aria-label": x(a).issues.panelTabLabel,
|
|
3457
3475
|
title: x(a).issues.panelTabLabel,
|
|
3458
|
-
class:
|
|
3459
|
-
style:
|
|
3476
|
+
class: O(["tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-[120ms] tpl:ease-[cubic-bezier(0.16,1,0.3,1)]", f("issues")]),
|
|
3477
|
+
style: _(p("issues")),
|
|
3460
3478
|
onClick: r[2] ||= (e) => o.value = "issues"
|
|
3461
3479
|
}, [
|
|
3462
|
-
|
|
3480
|
+
N(x(Rt), {
|
|
3463
3481
|
size: 14,
|
|
3464
3482
|
"stroke-width": 1.5
|
|
3465
3483
|
}),
|
|
3466
|
-
o.value === "issues" ? (s(), y("span",
|
|
3467
|
-
u.value > 0 ? (s(), y("span",
|
|
3468
|
-
], 14,
|
|
3484
|
+
o.value === "issues" ? (s(), y("span", Ac, C(x(a).issues.panelTabLabel), 1)) : b("", !0),
|
|
3485
|
+
u.value > 0 ? (s(), y("span", jc, C(u.value), 1)) : b("", !0)
|
|
3486
|
+
], 14, kc)) : b("", !0)
|
|
3469
3487
|
]),
|
|
3470
|
-
o.value === "content" ? (s(), y("div",
|
|
3488
|
+
o.value === "content" ? (s(), y("div", Mc, [e.selectedBlock ? (s(), w(Sc, {
|
|
3471
3489
|
key: 0,
|
|
3472
3490
|
block: e.selectedBlock,
|
|
3473
3491
|
onUpdate: r[3] ||= (e) => i("update-block", e),
|
|
3474
3492
|
onDelete: r[4] ||= (e) => i("delete-block"),
|
|
3475
3493
|
onDuplicate: r[5] ||= (e) => i("duplicate-block")
|
|
3476
|
-
}, null, 8, ["block"])) : (s(), y("div",
|
|
3477
|
-
|
|
3494
|
+
}, null, 8, ["block"])) : (s(), y("div", Nc, [
|
|
3495
|
+
E("div", Pc, [N(x(At), {
|
|
3478
3496
|
size: 40,
|
|
3479
3497
|
"stroke-width": 1.5
|
|
3480
3498
|
})]),
|
|
3481
|
-
|
|
3482
|
-
|
|
3499
|
+
E("h3", Fc, C(x(a).sidebar.noSelection), 1),
|
|
3500
|
+
E("p", Ic, C(x(a).sidebar.noSelectionHint), 1)
|
|
3483
3501
|
]))])) : b("", !0),
|
|
3484
|
-
o.value === "settings" ? (s(), y("div",
|
|
3502
|
+
o.value === "settings" ? (s(), y("div", Lc, [N(Rr, {
|
|
3485
3503
|
settings: e.settings,
|
|
3486
3504
|
onUpdate: r[6] ||= (e) => i("update-settings", e)
|
|
3487
3505
|
}, null, 8, ["settings"])])) : b("", !0),
|
|
3488
|
-
o.value === "issues" && l.value ? (s(), y("div",
|
|
3489
|
-
], 10,
|
|
3506
|
+
o.value === "issues" && l.value ? (s(), y("div", Rc, [N(x(n))])) : b("", !0)
|
|
3507
|
+
], 10, Cc));
|
|
3490
3508
|
}
|
|
3491
|
-
}),
|
|
3509
|
+
}), Bc = {
|
|
3492
3510
|
class: "tpl-small-screen-notice tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-6 tpl:py-10 tpl:text-center tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)]",
|
|
3493
3511
|
style: { "z-index": "10001" },
|
|
3494
3512
|
role: "status",
|
|
3495
3513
|
"data-testid": "small-screen-notice"
|
|
3496
|
-
},
|
|
3514
|
+
}, Vc = { class: "tpl:text-[var(--tpl-text-dim)]" }, Hc = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Uc = { class: "tpl:m-0 tpl:max-w-sm tpl:text-sm tpl:leading-normal" }, Wc = /* @__PURE__ */ M({
|
|
3497
3515
|
__name: "SmallScreenNotice",
|
|
3498
3516
|
setup(e) {
|
|
3499
|
-
let { t } =
|
|
3500
|
-
return (e, n) => (s(), y("div",
|
|
3501
|
-
|
|
3517
|
+
let { t } = U();
|
|
3518
|
+
return (e, n) => (s(), y("div", Bc, [
|
|
3519
|
+
E("div", Vc, [N(x(at), {
|
|
3502
3520
|
size: 48,
|
|
3503
3521
|
"stroke-width": 1.5
|
|
3504
3522
|
})]),
|
|
3505
|
-
|
|
3506
|
-
|
|
3523
|
+
E("h2", Hc, C(x(t).smallScreen.title), 1),
|
|
3524
|
+
E("p", Uc, C(x(t).smallScreen.message), 1)
|
|
3507
3525
|
]));
|
|
3508
3526
|
}
|
|
3509
|
-
}),
|
|
3527
|
+
}), Gc = [
|
|
3510
3528
|
"aria-label",
|
|
3511
3529
|
"title",
|
|
3512
3530
|
"aria-pressed"
|
|
3513
|
-
],
|
|
3531
|
+
], Kc = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
3514
3532
|
__name: "PreviewToggle",
|
|
3515
3533
|
props: { previewMode: { type: Boolean } },
|
|
3516
3534
|
emits: ["change"],
|
|
3517
3535
|
setup(e, { emit: t }) {
|
|
3518
|
-
let n = t, { t: r } =
|
|
3536
|
+
let n = t, { t: r } = U();
|
|
3519
3537
|
return (t, i) => (s(), y("button", {
|
|
3520
3538
|
class: "tpl-preview-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
3521
|
-
style:
|
|
3539
|
+
style: _({
|
|
3522
3540
|
color: e.previewMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3523
3541
|
backgroundColor: e.previewMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3524
3542
|
}),
|
|
@@ -3526,38 +3544,38 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3526
3544
|
title: e.previewMode ? x(r).previewMode.disable : x(r).previewMode.enable,
|
|
3527
3545
|
"aria-pressed": e.previewMode,
|
|
3528
3546
|
onClick: i[0] ||= (t) => n("change", !e.previewMode)
|
|
3529
|
-
}, [
|
|
3547
|
+
}, [N(T, {
|
|
3530
3548
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3531
3549
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3532
3550
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3533
3551
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3534
3552
|
mode: "out-in"
|
|
3535
3553
|
}, {
|
|
3536
|
-
default: f(() => [e.previewMode ? (s(),
|
|
3554
|
+
default: f(() => [e.previewMode ? (s(), w(x(Bt), {
|
|
3537
3555
|
key: "eye",
|
|
3538
3556
|
size: 18,
|
|
3539
3557
|
"stroke-width": 1.5
|
|
3540
|
-
})) : (s(),
|
|
3558
|
+
})) : (s(), w(x(vt), {
|
|
3541
3559
|
key: "eye-off",
|
|
3542
3560
|
size: 18,
|
|
3543
3561
|
"stroke-width": 1.5
|
|
3544
3562
|
}))]),
|
|
3545
3563
|
_: 1
|
|
3546
|
-
})], 12,
|
|
3564
|
+
})], 12, Gc));
|
|
3547
3565
|
}
|
|
3548
|
-
}), [["__scopeId", "data-v-af87d02a"]]),
|
|
3566
|
+
}), [["__scopeId", "data-v-af87d02a"]]), qc = [
|
|
3549
3567
|
"aria-label",
|
|
3550
3568
|
"title",
|
|
3551
3569
|
"aria-pressed"
|
|
3552
|
-
],
|
|
3570
|
+
], Jc = /*#__PURE__*/ Ht(/* @__PURE__ */ M({
|
|
3553
3571
|
__name: "DarkModeToggle",
|
|
3554
3572
|
props: { darkMode: { type: Boolean } },
|
|
3555
3573
|
emits: ["change"],
|
|
3556
3574
|
setup(e, { emit: t }) {
|
|
3557
|
-
let n = t, { t: r } =
|
|
3575
|
+
let n = t, { t: r } = U();
|
|
3558
3576
|
return (t, i) => (s(), y("button", {
|
|
3559
3577
|
class: "tpl-dark-mode-toggle tpl:relative tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:p-2 tpl:transition-all tpl:duration-150",
|
|
3560
|
-
style:
|
|
3578
|
+
style: _({
|
|
3561
3579
|
color: e.darkMode ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
3562
3580
|
backgroundColor: e.darkMode ? "var(--tpl-primary-light)" : "transparent"
|
|
3563
3581
|
}),
|
|
@@ -3565,84 +3583,84 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3565
3583
|
title: e.darkMode ? x(r).darkMode.disable : x(r).darkMode.enable,
|
|
3566
3584
|
"aria-pressed": e.darkMode,
|
|
3567
3585
|
onClick: i[0] ||= (t) => n("change", !e.darkMode)
|
|
3568
|
-
}, [
|
|
3586
|
+
}, [N(T, {
|
|
3569
3587
|
"enter-active-class": "tpl-icon-enter-active",
|
|
3570
3588
|
"leave-active-class": "tpl-icon-leave-active",
|
|
3571
3589
|
"enter-from-class": "tpl-icon-enter-from",
|
|
3572
3590
|
"leave-to-class": "tpl-icon-leave-to",
|
|
3573
3591
|
mode: "out-in"
|
|
3574
3592
|
}, {
|
|
3575
|
-
default: f(() => [e.darkMode ? (s(),
|
|
3593
|
+
default: f(() => [e.darkMode ? (s(), w(x(ht), {
|
|
3576
3594
|
key: "moon",
|
|
3577
3595
|
size: 18,
|
|
3578
3596
|
"stroke-width": 1.5
|
|
3579
|
-
})) : (s(),
|
|
3597
|
+
})) : (s(), w(x(St), {
|
|
3580
3598
|
key: "sun",
|
|
3581
3599
|
size: 18,
|
|
3582
3600
|
"stroke-width": 1.5
|
|
3583
3601
|
}))]),
|
|
3584
3602
|
_: 1
|
|
3585
|
-
})], 12,
|
|
3603
|
+
})], 12, qc));
|
|
3586
3604
|
}
|
|
3587
|
-
}), [["__scopeId", "data-v-f8694f76"]]),
|
|
3605
|
+
}), [["__scopeId", "data-v-f8694f76"]]), Yc = {
|
|
3588
3606
|
class: "tpl:pointer-events-auto tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-tl-lg tpl:p-1",
|
|
3589
3607
|
style: {
|
|
3590
3608
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-canvas-bg) 85%,\n transparent\n )",
|
|
3591
3609
|
"backdrop-filter": "blur(8px)",
|
|
3592
3610
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
3593
3611
|
}
|
|
3594
|
-
},
|
|
3612
|
+
}, Xc = {
|
|
3595
3613
|
href: "https://github.com/templatical/sdk",
|
|
3596
3614
|
target: "_blank",
|
|
3597
3615
|
rel: "noopener noreferrer",
|
|
3598
3616
|
class: "tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-dim)]",
|
|
3599
3617
|
style: { "text-decoration": "none" }
|
|
3600
|
-
},
|
|
3618
|
+
}, Zc = /* @__PURE__ */ M({
|
|
3601
3619
|
__name: "EditorFooter",
|
|
3602
3620
|
props: { positionClass: {} },
|
|
3603
3621
|
setup(e) {
|
|
3604
|
-
let { t } =
|
|
3605
|
-
return (n, r) => (s(), y("footer", { class:
|
|
3606
|
-
|
|
3607
|
-
r[0] ||=
|
|
3622
|
+
let { t } = U();
|
|
3623
|
+
return (n, r) => (s(), y("footer", { class: O(["tpl:pointer-events-none tpl:absolute tpl:bottom-0 tpl:z-50 tpl:flex tpl:h-8 tpl:items-center tpl:justify-end tpl:pr-4 tpl:text-[9px] tpl:opacity-90 tpl:transition-all tpl:duration-300 tpl:text-[var(--tpl-text-dim)]", e.positionClass]) }, [E("div", Yc, [
|
|
3624
|
+
E("span", null, C(x(t).footer.poweredBy), 1),
|
|
3625
|
+
r[0] ||= E("a", {
|
|
3608
3626
|
href: "https://templatical.com",
|
|
3609
3627
|
target: "_blank",
|
|
3610
3628
|
rel: "noopener noreferrer",
|
|
3611
3629
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1 tpl:font-medium tpl:transition-colors tpl:duration-150 hover:tpl:opacity-80 tpl:text-[var(--tpl-text-muted)]",
|
|
3612
3630
|
style: { "text-decoration": "none" }
|
|
3613
|
-
}, [
|
|
3631
|
+
}, [E("img", {
|
|
3614
3632
|
width: "14",
|
|
3615
3633
|
height: "14",
|
|
3616
3634
|
src: "https://templatical.com/logo.svg",
|
|
3617
3635
|
alt: ""
|
|
3618
|
-
}),
|
|
3619
|
-
r[1] ||=
|
|
3620
|
-
|
|
3636
|
+
}), j(" Templatical ")], -1),
|
|
3637
|
+
r[1] ||= E("span", { class: "tpl:text-[var(--tpl-border)]" }, "·", -1),
|
|
3638
|
+
E("a", Xc, C(x(t).footer.openSource), 1)
|
|
3621
3639
|
])], 2));
|
|
3622
3640
|
}
|
|
3623
|
-
}),
|
|
3641
|
+
}), Qc = ["aria-labelledby", "data-tpl-theme"], $c = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, el = ["id"], tl = ["aria-label"], nl = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, rl = [
|
|
3624
3642
|
"id",
|
|
3625
3643
|
"placeholder",
|
|
3626
3644
|
"aria-label",
|
|
3627
3645
|
"aria-activedescendant"
|
|
3628
|
-
],
|
|
3646
|
+
], il = {
|
|
3629
3647
|
key: 0,
|
|
3630
3648
|
class: "tpl:flex tpl:gap-1.5 tpl:overflow-x-auto tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2",
|
|
3631
3649
|
"data-testid": "merge-tag-picker-group-pills"
|
|
3632
|
-
},
|
|
3650
|
+
}, al = ["data-group-name", "onClick"], ol = ["aria-label"], sl = {
|
|
3633
3651
|
key: 0,
|
|
3634
3652
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3635
3653
|
"data-testid": "merge-tag-picker-empty"
|
|
3636
|
-
},
|
|
3654
|
+
}, cl = {
|
|
3637
3655
|
key: 1,
|
|
3638
3656
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3639
3657
|
"data-testid": "merge-tag-picker-empty"
|
|
3640
|
-
},
|
|
3658
|
+
}, ll = [
|
|
3641
3659
|
"aria-expanded",
|
|
3642
3660
|
"data-group-name",
|
|
3643
3661
|
"data-group-collapsed",
|
|
3644
3662
|
"onClick"
|
|
3645
|
-
],
|
|
3663
|
+
], ul = { class: "tpl:ml-1 tpl:font-normal" }, dl = [
|
|
3646
3664
|
"id",
|
|
3647
3665
|
"aria-selected",
|
|
3648
3666
|
"data-selected",
|
|
@@ -3651,42 +3669,42 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3651
3669
|
"title",
|
|
3652
3670
|
"onMousemove",
|
|
3653
3671
|
"onClick"
|
|
3654
|
-
],
|
|
3672
|
+
], fl = { class: "tpl:text-sm tpl:font-medium" }, pl = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, ml = {
|
|
3655
3673
|
key: 0,
|
|
3656
3674
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3657
|
-
},
|
|
3675
|
+
}, hl = {
|
|
3658
3676
|
key: 1,
|
|
3659
3677
|
"data-testid": "merge-tag-picker-sample",
|
|
3660
3678
|
class: "tpl:line-clamp-1 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3661
|
-
},
|
|
3679
|
+
}, gl = "tpl-merge-tag-picker-list", _l = /* @__PURE__ */ M({
|
|
3662
3680
|
__name: "MergeTagPickerModal",
|
|
3663
3681
|
setup(e) {
|
|
3664
|
-
let t =
|
|
3665
|
-
function
|
|
3666
|
-
return
|
|
3682
|
+
let t = Ne(Le, "MergeTagPickerModal"), { t: n, format: i } = U(), a = d(He, null), o = d(Ve, null), c = m(""), p = Ae(c, 200), h = m(null), T = v(() => p.value.trim().length > 0), D = m(0), k = v(() => t.tags.value.some((e) => !!e.group)), j = m(/* @__PURE__ */ new Set());
|
|
3683
|
+
function M(e) {
|
|
3684
|
+
return j.value.has(e);
|
|
3667
3685
|
}
|
|
3668
|
-
function
|
|
3669
|
-
let t = new Set(
|
|
3670
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
3686
|
+
function F(e) {
|
|
3687
|
+
let t = new Set(j.value);
|
|
3688
|
+
t.has(e) ? t.delete(e) : t.add(e), j.value = t, D.value = 0;
|
|
3671
3689
|
}
|
|
3672
|
-
let
|
|
3690
|
+
let te = v(() => {
|
|
3673
3691
|
let e = p.value.trim().toLowerCase();
|
|
3674
3692
|
return e ? t.tags.value.filter((t) => [
|
|
3675
3693
|
t.label,
|
|
3676
3694
|
t.value,
|
|
3677
3695
|
t.description ?? ""
|
|
3678
3696
|
].join(" ").toLowerCase().includes(e)) : t.tags.value;
|
|
3679
|
-
}),
|
|
3680
|
-
if (!
|
|
3697
|
+
}), I = v(() => {
|
|
3698
|
+
if (!k.value) return [];
|
|
3681
3699
|
let e = n.mergeTag.picker.otherGroup, r = /* @__PURE__ */ new Set(), i = [];
|
|
3682
3700
|
for (let n of t.tags.value) {
|
|
3683
3701
|
let t = n.group ?? e;
|
|
3684
3702
|
r.has(t) || (r.add(t), i.push(t));
|
|
3685
3703
|
}
|
|
3686
3704
|
return i;
|
|
3687
|
-
}),
|
|
3688
|
-
let e =
|
|
3689
|
-
if (!
|
|
3705
|
+
}), L = v(() => {
|
|
3706
|
+
let e = te.value;
|
|
3707
|
+
if (!k.value || T.value) return e.map((e, t) => ({
|
|
3690
3708
|
kind: "tag",
|
|
3691
3709
|
tag: e,
|
|
3692
3710
|
index: t
|
|
@@ -3703,49 +3721,49 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3703
3721
|
kind: "header",
|
|
3704
3722
|
group: e,
|
|
3705
3723
|
count: t.length
|
|
3706
|
-
}), !
|
|
3724
|
+
}), !j.value.has(e)) for (let e of t) a.push({
|
|
3707
3725
|
kind: "tag",
|
|
3708
3726
|
tag: e,
|
|
3709
3727
|
index: o
|
|
3710
3728
|
}), o++;
|
|
3711
3729
|
}
|
|
3712
3730
|
return a;
|
|
3713
|
-
}),
|
|
3714
|
-
|
|
3715
|
-
e && (c.value = "",
|
|
3731
|
+
}), R = v(() => L.value.flatMap((e) => e.kind === "tag" ? [e.tag] : []));
|
|
3732
|
+
P(() => t.isOpen.value, (e) => {
|
|
3733
|
+
e && (c.value = "", D.value = 0, j.value = /* @__PURE__ */ new Set(), l(() => {
|
|
3716
3734
|
h.value?.focus();
|
|
3717
3735
|
}));
|
|
3718
|
-
}),
|
|
3719
|
-
|
|
3736
|
+
}), P(R, (e) => {
|
|
3737
|
+
D.value >= e.length && (D.value = Math.max(0, e.length - 1));
|
|
3720
3738
|
});
|
|
3721
|
-
function
|
|
3739
|
+
function z(e) {
|
|
3722
3740
|
t.resolve(e);
|
|
3723
3741
|
}
|
|
3724
|
-
function
|
|
3742
|
+
function B() {
|
|
3725
3743
|
t.resolve(null);
|
|
3726
3744
|
}
|
|
3727
|
-
function
|
|
3728
|
-
if (
|
|
3729
|
-
let t =
|
|
3730
|
-
|
|
3745
|
+
function V(e) {
|
|
3746
|
+
if (R.value.length === 0) return;
|
|
3747
|
+
let t = D.value + e;
|
|
3748
|
+
D.value = Math.max(0, Math.min(R.value.length - 1, t)), ae();
|
|
3731
3749
|
}
|
|
3732
|
-
let
|
|
3733
|
-
function
|
|
3734
|
-
|
|
3750
|
+
let ne = m(null), re = m({});
|
|
3751
|
+
function ie(e, t) {
|
|
3752
|
+
re.value[e] = t ?? null;
|
|
3735
3753
|
}
|
|
3736
|
-
function
|
|
3754
|
+
function ae() {
|
|
3737
3755
|
l(() => {
|
|
3738
|
-
let e =
|
|
3739
|
-
e && e.querySelector(`[data-merge-tag-index="${
|
|
3756
|
+
let e = ne.value;
|
|
3757
|
+
e && e.querySelector(`[data-merge-tag-index="${D.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
3740
3758
|
});
|
|
3741
3759
|
}
|
|
3742
|
-
function
|
|
3743
|
-
if (
|
|
3744
|
-
let t = new Set(
|
|
3745
|
-
t.delete(e),
|
|
3760
|
+
function oe(e) {
|
|
3761
|
+
if (j.value.has(e)) {
|
|
3762
|
+
let t = new Set(j.value);
|
|
3763
|
+
t.delete(e), j.value = t;
|
|
3746
3764
|
}
|
|
3747
3765
|
l(() => {
|
|
3748
|
-
let t =
|
|
3766
|
+
let t = ne.value;
|
|
3749
3767
|
if (!t) return;
|
|
3750
3768
|
let n = 0, r = !1;
|
|
3751
3769
|
for (let i of Array.from(t.children)) {
|
|
@@ -3761,55 +3779,55 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3761
3779
|
});
|
|
3762
3780
|
});
|
|
3763
3781
|
}
|
|
3764
|
-
function
|
|
3765
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
3766
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
3782
|
+
function se(e) {
|
|
3783
|
+
if (e.key === "ArrowDown") e.preventDefault(), V(1);
|
|
3784
|
+
else if (e.key === "ArrowUp") e.preventDefault(), V(-1);
|
|
3767
3785
|
else if (e.key === "Enter") {
|
|
3768
3786
|
e.preventDefault();
|
|
3769
|
-
let t =
|
|
3770
|
-
t &&
|
|
3787
|
+
let t = R.value[D.value];
|
|
3788
|
+
t && z(t);
|
|
3771
3789
|
}
|
|
3772
3790
|
}
|
|
3773
|
-
function
|
|
3774
|
-
if (
|
|
3791
|
+
function H() {
|
|
3792
|
+
if (R.value.length !== 0) return `${gl}-opt-${D.value}`;
|
|
3775
3793
|
}
|
|
3776
|
-
function
|
|
3777
|
-
return `${
|
|
3794
|
+
function ce(e) {
|
|
3795
|
+
return `${gl}-opt-${e}`;
|
|
3778
3796
|
}
|
|
3779
|
-
let
|
|
3780
|
-
return (e, l) => (s(),
|
|
3797
|
+
let le = v(() => t.tags.value.length === 0), ue = v(() => !le.value && te.value.length === 0), de = v(() => k.value && I.value.length > 1 && !T.value);
|
|
3798
|
+
return (e, l) => (s(), w(on, {
|
|
3781
3799
|
visible: x(t).isOpen.value,
|
|
3782
|
-
onClose:
|
|
3783
|
-
onKeydown:
|
|
3800
|
+
onClose: B,
|
|
3801
|
+
onKeydown: se
|
|
3784
3802
|
}, {
|
|
3785
|
-
default: f(() => [
|
|
3803
|
+
default: f(() => [E("div", {
|
|
3786
3804
|
role: "dialog",
|
|
3787
3805
|
"aria-modal": "true",
|
|
3788
|
-
"aria-labelledby": `${
|
|
3806
|
+
"aria-labelledby": `${gl}-title`,
|
|
3789
3807
|
"data-tpl-theme": x(o),
|
|
3790
3808
|
"data-testid": "merge-tag-picker-modal",
|
|
3791
3809
|
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
3792
|
-
style:
|
|
3810
|
+
style: _(x(a))
|
|
3793
3811
|
}, [
|
|
3794
|
-
|
|
3795
|
-
id: `${
|
|
3812
|
+
E("header", $c, [E("h2", {
|
|
3813
|
+
id: `${gl}-title`,
|
|
3796
3814
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
3797
|
-
},
|
|
3815
|
+
}, C(x(n).mergeTag.picker.title), 9, el), E("button", {
|
|
3798
3816
|
type: "button",
|
|
3799
3817
|
class: "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-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3800
3818
|
"aria-label": x(n).mergeTag.picker.close,
|
|
3801
3819
|
"data-testid": "merge-tag-picker-close",
|
|
3802
|
-
onClick:
|
|
3803
|
-
}, [
|
|
3820
|
+
onClick: B
|
|
3821
|
+
}, [N(x(Mt), {
|
|
3804
3822
|
size: 16,
|
|
3805
3823
|
"stroke-width": 2
|
|
3806
|
-
})], 8,
|
|
3807
|
-
|
|
3824
|
+
})], 8, tl)]),
|
|
3825
|
+
E("div", nl, [N(x(ft), {
|
|
3808
3826
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
3809
3827
|
size: 14,
|
|
3810
3828
|
"stroke-width": 2
|
|
3811
|
-
}), r(
|
|
3812
|
-
id: `${
|
|
3829
|
+
}), r(E("input", {
|
|
3830
|
+
id: `${gl}-search`,
|
|
3813
3831
|
ref_key: "searchInputRef",
|
|
3814
3832
|
ref: h,
|
|
3815
3833
|
"onUpdate:modelValue": l[0] ||= (e) => c.value = e,
|
|
@@ -3817,79 +3835,79 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3817
3835
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
3818
3836
|
placeholder: x(n).mergeTag.picker.searchPlaceholder,
|
|
3819
3837
|
"aria-label": x(n).mergeTag.picker.searchAriaLabel,
|
|
3820
|
-
"aria-controls":
|
|
3821
|
-
"aria-activedescendant":
|
|
3838
|
+
"aria-controls": gl,
|
|
3839
|
+
"aria-activedescendant": H(),
|
|
3822
3840
|
"data-testid": "merge-tag-picker-search",
|
|
3823
3841
|
onKeydown: l[1] ||= g(S(() => {}, ["prevent"]), ["enter"])
|
|
3824
|
-
}, null, 40,
|
|
3825
|
-
|
|
3842
|
+
}, null, 40, rl), [[ee, c.value]])]),
|
|
3843
|
+
de.value ? (s(), y("div", il, [(s(!0), y(A, null, u(I.value, (e) => (s(), y("button", {
|
|
3826
3844
|
key: e,
|
|
3827
3845
|
type: "button",
|
|
3828
3846
|
class: "tpl:flex tpl:flex-shrink-0 tpl:cursor-pointer tpl:items-center tpl:rounded-full tpl:border tpl:border-[var(--tpl-border)] tpl:bg-transparent tpl:px-2.5 tpl:py-0.5 tpl:text-[11px] tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
3829
3847
|
"data-testid": "merge-tag-picker-group-pill",
|
|
3830
3848
|
"data-group-name": e,
|
|
3831
|
-
onClick: (t) =>
|
|
3832
|
-
},
|
|
3833
|
-
|
|
3834
|
-
id:
|
|
3849
|
+
onClick: (t) => oe(e)
|
|
3850
|
+
}, C(e), 9, al))), 128))])) : b("", !0),
|
|
3851
|
+
E("div", {
|
|
3852
|
+
id: gl,
|
|
3835
3853
|
ref_key: "listRef",
|
|
3836
|
-
ref:
|
|
3854
|
+
ref: ne,
|
|
3837
3855
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
3838
3856
|
role: "listbox",
|
|
3839
3857
|
"aria-label": x(n).mergeTag.picker.title,
|
|
3840
3858
|
"data-testid": "merge-tag-picker-list"
|
|
3841
|
-
}, [
|
|
3859
|
+
}, [le.value ? (s(), y("div", sl, C(x(n).mergeTag.picker.empty), 1)) : ue.value ? (s(), y("div", cl, C(x(n).mergeTag.picker.noResults), 1)) : (s(!0), y(A, { key: 2 }, u(L.value, (e, t) => (s(), y(A, { key: t }, [e.kind === "header" ? (s(), y("button", {
|
|
3842
3860
|
key: 0,
|
|
3843
3861
|
ref_for: !0,
|
|
3844
|
-
ref: (t) =>
|
|
3862
|
+
ref: (t) => ie(e.group, t),
|
|
3845
3863
|
type: "button",
|
|
3846
|
-
"aria-expanded": !
|
|
3847
|
-
"aria-controls":
|
|
3864
|
+
"aria-expanded": !M(e.group),
|
|
3865
|
+
"aria-controls": gl,
|
|
3848
3866
|
class: "tpl:sticky tpl:top-0 tpl:z-10 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-1.5 tpl:border-none tpl:bg-[var(--tpl-bg-elevated)] tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-left tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)]",
|
|
3849
3867
|
"data-testid": "merge-tag-picker-group-header",
|
|
3850
3868
|
"data-group-name": e.group,
|
|
3851
|
-
"data-group-collapsed":
|
|
3852
|
-
onClick: (t) =>
|
|
3869
|
+
"data-group-collapsed": M(e.group) ? "true" : "false",
|
|
3870
|
+
onClick: (t) => F(e.group)
|
|
3853
3871
|
}, [
|
|
3854
|
-
|
|
3872
|
+
N(x(ut), {
|
|
3855
3873
|
size: 12,
|
|
3856
3874
|
"stroke-width": 2,
|
|
3857
|
-
class:
|
|
3875
|
+
class: O(["tpl:transition-transform", M(e.group) ? "tpl:-rotate-90" : ""])
|
|
3858
3876
|
}, null, 8, ["class"]),
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
], 8,
|
|
3877
|
+
E("span", null, C(e.group), 1),
|
|
3878
|
+
E("span", ul, " (" + C(x(i)(x(n).mergeTag.picker.groupCount, { count: e.count })) + ") ", 1)
|
|
3879
|
+
], 8, ll)) : (s(), y("button", {
|
|
3862
3880
|
key: 1,
|
|
3863
|
-
id:
|
|
3881
|
+
id: ce(e.index),
|
|
3864
3882
|
type: "button",
|
|
3865
3883
|
role: "option",
|
|
3866
|
-
"aria-selected": e.index ===
|
|
3867
|
-
"data-selected": e.index ===
|
|
3884
|
+
"aria-selected": e.index === D.value,
|
|
3885
|
+
"data-selected": e.index === D.value ? "true" : "false",
|
|
3868
3886
|
"data-merge-tag-index": e.index,
|
|
3869
3887
|
"data-merge-tag-value": e.tag.value,
|
|
3870
3888
|
title: e.tag.description ? `${e.tag.value} — ${e.tag.description}` : e.tag.value,
|
|
3871
|
-
class:
|
|
3889
|
+
class: O(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === D.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
3872
3890
|
"data-testid": "merge-tag-picker-item",
|
|
3873
|
-
onMousemove: (t) =>
|
|
3874
|
-
onClick: (t) =>
|
|
3891
|
+
onMousemove: (t) => D.value = e.index,
|
|
3892
|
+
onClick: (t) => z(e.tag)
|
|
3875
3893
|
}, [
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
e.tag.description ? (s(), y("span",
|
|
3879
|
-
e.tag.sample === void 0 ? b("", !0) : (s(), y("span",
|
|
3880
|
-
], 42,
|
|
3881
|
-
], 12,
|
|
3894
|
+
E("span", fl, C(e.tag.label), 1),
|
|
3895
|
+
E("span", pl, C(e.tag.value), 1),
|
|
3896
|
+
e.tag.description ? (s(), y("span", ml, C(e.tag.description), 1)) : b("", !0),
|
|
3897
|
+
e.tag.sample === void 0 ? b("", !0) : (s(), y("span", hl, C(x(i)(x(n).mergeTag.picker.sample, { sample: e.tag.sample })), 1))
|
|
3898
|
+
], 42, dl))], 64))), 128))], 8, ol)
|
|
3899
|
+
], 12, Qc)]),
|
|
3882
3900
|
_: 1
|
|
3883
3901
|
}, 8, ["visible"]));
|
|
3884
3902
|
}
|
|
3885
|
-
}),
|
|
3903
|
+
}), vl = ["data-logic-keyword"], yl = /* @__PURE__ */ M({
|
|
3886
3904
|
__name: "LogicTagBadge",
|
|
3887
3905
|
props: {
|
|
3888
3906
|
value: {},
|
|
3889
3907
|
syntax: {}
|
|
3890
3908
|
},
|
|
3891
3909
|
setup(e) {
|
|
3892
|
-
let t = e, n = v(() =>
|
|
3910
|
+
let t = e, n = v(() => B(t.value, t.syntax)), r = v(() => L(t.value, t.syntax));
|
|
3893
3911
|
return (e, t) => n.value ? (s(), y("span", {
|
|
3894
3912
|
key: 0,
|
|
3895
3913
|
class: "tpl:inline-flex tpl:flex-shrink-0 tpl:items-center tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:leading-none tpl:font-bold tpl:tracking-wide tpl:uppercase",
|
|
@@ -3899,22 +3917,22 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3899
3917
|
},
|
|
3900
3918
|
"data-testid": "merge-tag-logic-badge",
|
|
3901
3919
|
"data-logic-keyword": r.value
|
|
3902
|
-
},
|
|
3920
|
+
}, C(r.value), 9, vl)) : b("", !0);
|
|
3903
3921
|
}
|
|
3904
|
-
}),
|
|
3922
|
+
}), bl = ["aria-labelledby", "data-tpl-theme"], xl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Sl = ["id"], Cl = ["aria-label"], wl = { class: "tpl:relative tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2.5" }, Tl = [
|
|
3905
3923
|
"id",
|
|
3906
3924
|
"placeholder",
|
|
3907
3925
|
"aria-label",
|
|
3908
3926
|
"aria-activedescendant"
|
|
3909
|
-
],
|
|
3927
|
+
], El = ["aria-label"], Dl = {
|
|
3910
3928
|
key: 0,
|
|
3911
3929
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3912
3930
|
"data-testid": "logic-picker-empty"
|
|
3913
|
-
},
|
|
3931
|
+
}, Ol = {
|
|
3914
3932
|
key: 1,
|
|
3915
3933
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
|
|
3916
3934
|
"data-testid": "logic-picker-empty"
|
|
3917
|
-
},
|
|
3935
|
+
}, kl = ["data-group-name"], Al = [
|
|
3918
3936
|
"id",
|
|
3919
3937
|
"aria-selected",
|
|
3920
3938
|
"data-selected",
|
|
@@ -3922,42 +3940,42 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3922
3940
|
"data-logic-kind",
|
|
3923
3941
|
"onMousemove",
|
|
3924
3942
|
"onClick"
|
|
3925
|
-
],
|
|
3943
|
+
], jl = { class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-between tpl:gap-2" }, Ml = { class: "tpl:text-sm tpl:font-medium" }, Nl = {
|
|
3926
3944
|
key: 0,
|
|
3927
3945
|
class: "tpl:flex tpl:items-center"
|
|
3928
|
-
},
|
|
3946
|
+
}, Pl = {
|
|
3929
3947
|
key: 1,
|
|
3930
3948
|
class: "tpl:flex tpl:items-center tpl:gap-1"
|
|
3931
|
-
},
|
|
3949
|
+
}, Fl = { class: "tpl:line-clamp-2 tpl:font-mono tpl:text-xs tpl:text-ellipsis tpl:break-all tpl:text-[var(--tpl-text-dim)]" }, Il = {
|
|
3932
3950
|
key: 0,
|
|
3933
3951
|
class: "tpl:line-clamp-2 tpl:text-xs tpl:text-ellipsis tpl:text-[var(--tpl-text-dim)]"
|
|
3934
|
-
},
|
|
3952
|
+
}, Ll = "tpl-logic-picker-list", Rl = /* @__PURE__ */ M({
|
|
3935
3953
|
__name: "LogicTagPickerModal",
|
|
3936
3954
|
setup(e) {
|
|
3937
|
-
let t =
|
|
3938
|
-
function
|
|
3955
|
+
let t = Ne(Be, "LogicTagPickerModal"), { t: n } = U(), i = d(je, re.liquid), a = d(He, null), o = d(Ve, null), c = m(""), p = Ae(c, 200), h = m(null), T = v(() => p.value.trim().length > 0), D = m(0);
|
|
3956
|
+
function k(e) {
|
|
3939
3957
|
let t = p.value.trim().toLowerCase();
|
|
3940
3958
|
return !t || e.filter(Boolean).join(" ").toLowerCase().includes(t);
|
|
3941
3959
|
}
|
|
3942
|
-
let
|
|
3960
|
+
let j = v(() => t.tags.value.filter((e) => k([
|
|
3943
3961
|
e.label,
|
|
3944
3962
|
e.value,
|
|
3945
3963
|
e.description
|
|
3946
|
-
]))),
|
|
3964
|
+
]))), M = v(() => t.pairs.value.filter((e) => k([
|
|
3947
3965
|
e.label,
|
|
3948
3966
|
e.before,
|
|
3949
3967
|
e.after,
|
|
3950
3968
|
e.description
|
|
3951
|
-
]))),
|
|
3969
|
+
]))), F = v(() => [...M.value.map((e) => ({
|
|
3952
3970
|
kind: "pair",
|
|
3953
3971
|
pair: e,
|
|
3954
3972
|
group: e.group
|
|
3955
|
-
})), ...
|
|
3973
|
+
})), ...j.value.map((e) => ({
|
|
3956
3974
|
kind: "tag",
|
|
3957
3975
|
tag: e,
|
|
3958
3976
|
group: e.group
|
|
3959
|
-
}))]),
|
|
3960
|
-
function
|
|
3977
|
+
}))]), te = v(() => t.tags.value.some((e) => !!e.group) || t.pairs.value.some((e) => !!e.group));
|
|
3978
|
+
function I(e) {
|
|
3961
3979
|
let t = n.logicTag.picker.otherGroup, r = /* @__PURE__ */ new Map(), i = [];
|
|
3962
3980
|
for (let n of e) {
|
|
3963
3981
|
let e = n.group ?? t;
|
|
@@ -3965,7 +3983,7 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3965
3983
|
}
|
|
3966
3984
|
return i.map((e) => [e, r.get(e)]);
|
|
3967
3985
|
}
|
|
3968
|
-
let
|
|
3986
|
+
let L = v(() => {
|
|
3969
3987
|
let e = [], t = [], n = 0, r = (r) => {
|
|
3970
3988
|
r.kind === "tag" ? (e.push({
|
|
3971
3989
|
kind: "tag",
|
|
@@ -3976,9 +3994,9 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3976
3994
|
pair: r.pair,
|
|
3977
3995
|
index: n
|
|
3978
3996
|
}), t.push(r.pair)), n++;
|
|
3979
|
-
}, i =
|
|
3980
|
-
if (
|
|
3981
|
-
else for (let [t, n] of
|
|
3997
|
+
}, i = F.value;
|
|
3998
|
+
if (T.value || !te.value) for (let e of i) r(e);
|
|
3999
|
+
else for (let [t, n] of I(i)) {
|
|
3982
4000
|
e.push({
|
|
3983
4001
|
kind: "header",
|
|
3984
4002
|
label: t
|
|
@@ -3989,72 +4007,72 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
3989
4007
|
rows: e,
|
|
3990
4008
|
items: t
|
|
3991
4009
|
};
|
|
3992
|
-
}),
|
|
3993
|
-
|
|
3994
|
-
e && (c.value = "",
|
|
3995
|
-
}),
|
|
3996
|
-
|
|
4010
|
+
}), R = v(() => L.value.items), z = v(() => t.tags.value.length === 0 && t.pairs.value.length === 0), B = v(() => !z.value && R.value.length === 0);
|
|
4011
|
+
P(() => t.isOpen.value, (e) => {
|
|
4012
|
+
e && (c.value = "", D.value = 0, l(() => h.value?.focus()));
|
|
4013
|
+
}), P(R, (e) => {
|
|
4014
|
+
D.value >= e.length && (D.value = Math.max(0, e.length - 1));
|
|
3997
4015
|
});
|
|
3998
|
-
let
|
|
3999
|
-
function
|
|
4016
|
+
let V = m(null);
|
|
4017
|
+
function ne(e) {
|
|
4000
4018
|
t.resolve(e);
|
|
4001
4019
|
}
|
|
4002
|
-
function
|
|
4020
|
+
function ie() {
|
|
4003
4021
|
t.resolve(null);
|
|
4004
4022
|
}
|
|
4005
|
-
function
|
|
4006
|
-
|
|
4007
|
-
|
|
4023
|
+
function ae(e) {
|
|
4024
|
+
R.value.length !== 0 && (D.value = Math.max(0, Math.min(R.value.length - 1, D.value + e)), l(() => {
|
|
4025
|
+
V.value?.querySelector(`[data-logic-index="${D.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
4008
4026
|
}));
|
|
4009
4027
|
}
|
|
4010
|
-
function
|
|
4011
|
-
if (e.key === "ArrowDown") e.preventDefault(),
|
|
4012
|
-
else if (e.key === "ArrowUp") e.preventDefault(),
|
|
4028
|
+
function oe(e) {
|
|
4029
|
+
if (e.key === "ArrowDown") e.preventDefault(), ae(1);
|
|
4030
|
+
else if (e.key === "ArrowUp") e.preventDefault(), ae(-1);
|
|
4013
4031
|
else if (e.key === "Enter") {
|
|
4014
4032
|
e.preventDefault();
|
|
4015
|
-
let t =
|
|
4016
|
-
t &&
|
|
4033
|
+
let t = R.value[D.value];
|
|
4034
|
+
t && ne(t);
|
|
4017
4035
|
}
|
|
4018
4036
|
}
|
|
4019
|
-
function
|
|
4020
|
-
return `${
|
|
4037
|
+
function se(e) {
|
|
4038
|
+
return `${Ll}-opt-${e}`;
|
|
4021
4039
|
}
|
|
4022
|
-
function
|
|
4023
|
-
return
|
|
4040
|
+
function H() {
|
|
4041
|
+
return R.value.length === 0 ? void 0 : `${Ll}-opt-${D.value}`;
|
|
4024
4042
|
}
|
|
4025
|
-
return (e, l) => (s(),
|
|
4043
|
+
return (e, l) => (s(), w(on, {
|
|
4026
4044
|
visible: x(t).isOpen.value,
|
|
4027
|
-
onClose:
|
|
4028
|
-
onKeydown:
|
|
4045
|
+
onClose: ie,
|
|
4046
|
+
onKeydown: oe
|
|
4029
4047
|
}, {
|
|
4030
|
-
default: f(() => [
|
|
4048
|
+
default: f(() => [E("div", {
|
|
4031
4049
|
role: "dialog",
|
|
4032
4050
|
"aria-modal": "true",
|
|
4033
|
-
"aria-labelledby": `${
|
|
4051
|
+
"aria-labelledby": `${Ll}-title`,
|
|
4034
4052
|
"data-tpl-theme": x(o),
|
|
4035
4053
|
"data-testid": "logic-picker-modal",
|
|
4036
4054
|
class: "tpl tpl:flex tpl:max-h-[80vh] tpl:w-[min(420px,92vw)] tpl:flex-col tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
4037
|
-
style:
|
|
4055
|
+
style: _(x(a))
|
|
4038
4056
|
}, [
|
|
4039
|
-
|
|
4040
|
-
id: `${
|
|
4057
|
+
E("header", xl, [E("h2", {
|
|
4058
|
+
id: `${Ll}-title`,
|
|
4041
4059
|
class: "tpl:m-0 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
4042
|
-
},
|
|
4060
|
+
}, C(x(n).logicTag.picker.title), 9, Sl), E("button", {
|
|
4043
4061
|
type: "button",
|
|
4044
4062
|
class: "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-none tpl:bg-transparent tpl:text-[var(--tpl-text-dim)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:text-[var(--tpl-text)]",
|
|
4045
4063
|
"aria-label": x(n).logicTag.picker.close,
|
|
4046
4064
|
"data-testid": "logic-picker-close",
|
|
4047
|
-
onClick:
|
|
4048
|
-
}, [
|
|
4065
|
+
onClick: ie
|
|
4066
|
+
}, [N(x(Mt), {
|
|
4049
4067
|
size: 16,
|
|
4050
4068
|
"stroke-width": 2
|
|
4051
|
-
})], 8,
|
|
4052
|
-
|
|
4069
|
+
})], 8, Cl)]),
|
|
4070
|
+
E("div", wl, [N(x(ft), {
|
|
4053
4071
|
class: "tpl:pointer-events-none tpl:absolute tpl:top-1/2 tpl:left-5 tpl:-translate-y-1/2 tpl:text-[var(--tpl-text-dim)]",
|
|
4054
4072
|
size: 14,
|
|
4055
4073
|
"stroke-width": 2
|
|
4056
|
-
}), r(
|
|
4057
|
-
id: `${
|
|
4074
|
+
}), r(E("input", {
|
|
4075
|
+
id: `${Ll}-search`,
|
|
4058
4076
|
ref_key: "searchInputRef",
|
|
4059
4077
|
ref: h,
|
|
4060
4078
|
"onUpdate:modelValue": l[0] ||= (e) => c.value = e,
|
|
@@ -4062,61 +4080,61 @@ var ko = { class: "tpl:mb-3.5" }, Ao = ["value"], jo = ["value"], Mo = {
|
|
|
4062
4080
|
class: "tpl:w-full tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-sm tpl:text-[var(--tpl-text)] tpl:outline-none tpl:focus:border-[var(--tpl-primary)]",
|
|
4063
4081
|
placeholder: x(n).logicTag.picker.searchPlaceholder,
|
|
4064
4082
|
"aria-label": x(n).logicTag.picker.searchAriaLabel,
|
|
4065
|
-
"aria-controls":
|
|
4066
|
-
"aria-activedescendant":
|
|
4083
|
+
"aria-controls": Ll,
|
|
4084
|
+
"aria-activedescendant": H(),
|
|
4067
4085
|
"data-testid": "logic-picker-search",
|
|
4068
4086
|
onKeydown: l[1] ||= g(S(() => {}, ["prevent"]), ["enter"])
|
|
4069
|
-
}, null, 40,
|
|
4070
|
-
|
|
4071
|
-
id:
|
|
4087
|
+
}, null, 40, Tl), [[ee, c.value]])]),
|
|
4088
|
+
E("div", {
|
|
4089
|
+
id: Ll,
|
|
4072
4090
|
ref_key: "listRef",
|
|
4073
|
-
ref:
|
|
4091
|
+
ref: V,
|
|
4074
4092
|
class: "tpl:relative tpl:max-h-[60vh] tpl:flex-1 tpl:overflow-y-auto",
|
|
4075
4093
|
role: "listbox",
|
|
4076
4094
|
"aria-label": x(n).logicTag.picker.title,
|
|
4077
4095
|
"data-testid": "logic-picker-list"
|
|
4078
|
-
}, [
|
|
4096
|
+
}, [z.value ? (s(), y("div", Dl, C(x(n).logicTag.picker.empty), 1)) : B.value ? (s(), y("div", Ol, C(x(n).logicTag.picker.noResults), 1)) : (s(!0), y(A, { key: 2 }, u(L.value.rows, (e, t) => (s(), y(A, { key: t }, [e.kind === "header" ? (s(), y("div", {
|
|
4079
4097
|
key: 0,
|
|
4080
4098
|
class: "tpl:px-3 tpl:pt-2.5 tpl:pb-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-dim)]",
|
|
4081
4099
|
"data-testid": "logic-picker-header",
|
|
4082
4100
|
"data-group-name": e.label
|
|
4083
|
-
},
|
|
4101
|
+
}, C(e.label), 9, kl)) : (s(), y("button", {
|
|
4084
4102
|
key: 1,
|
|
4085
|
-
id:
|
|
4103
|
+
id: se(e.index),
|
|
4086
4104
|
type: "button",
|
|
4087
4105
|
role: "option",
|
|
4088
|
-
"aria-selected": e.index ===
|
|
4089
|
-
"data-selected": e.index ===
|
|
4106
|
+
"aria-selected": e.index === D.value,
|
|
4107
|
+
"data-selected": e.index === D.value ? "true" : "false",
|
|
4090
4108
|
"data-logic-index": e.index,
|
|
4091
4109
|
"data-logic-kind": e.kind,
|
|
4092
|
-
class:
|
|
4110
|
+
class: O(["tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:border-none tpl:px-3 tpl:py-1.5 tpl:text-left tpl:transition-colors", e.index === D.value ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:bg-transparent tpl:text-[var(--tpl-text)] tpl:hover:bg-[var(--tpl-bg-hover)]"]),
|
|
4093
4111
|
"data-testid": "logic-picker-item",
|
|
4094
|
-
onMousemove: (t) =>
|
|
4095
|
-
onClick: (t) =>
|
|
4112
|
+
onMousemove: (t) => D.value = e.index,
|
|
4113
|
+
onClick: (t) => ne(e.kind === "tag" ? e.tag : e.pair)
|
|
4096
4114
|
}, [
|
|
4097
|
-
|
|
4115
|
+
E("span", jl, [E("span", Ml, C(e.kind === "tag" ? e.tag.label : e.pair.label), 1), e.kind === "tag" ? (s(), y("span", Nl, [N(yl, {
|
|
4098
4116
|
value: e.tag.value,
|
|
4099
4117
|
syntax: x(i)
|
|
4100
|
-
}, null, 8, ["value", "syntax"])])) : (s(), y("span",
|
|
4101
|
-
|
|
4118
|
+
}, null, 8, ["value", "syntax"])])) : (s(), y("span", Pl, [
|
|
4119
|
+
N(yl, {
|
|
4102
4120
|
value: e.pair.before,
|
|
4103
4121
|
syntax: x(i)
|
|
4104
4122
|
}, null, 8, ["value", "syntax"]),
|
|
4105
|
-
l[2] ||=
|
|
4106
|
-
|
|
4123
|
+
l[2] ||= E("span", { class: "tpl:text-[var(--tpl-text-dim)]" }, "…", -1),
|
|
4124
|
+
N(yl, {
|
|
4107
4125
|
value: e.pair.after,
|
|
4108
4126
|
syntax: x(i)
|
|
4109
4127
|
}, null, 8, ["value", "syntax"])
|
|
4110
4128
|
]))]),
|
|
4111
|
-
|
|
4112
|
-
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), y("span",
|
|
4113
|
-
], 42,
|
|
4114
|
-
], 12,
|
|
4129
|
+
E("span", Fl, C(e.kind === "tag" ? e.tag.value : `${e.pair.before} … ${e.pair.after}`), 1),
|
|
4130
|
+
(e.kind === "tag" ? e.tag.description : e.pair.description) ? (s(), y("span", Il, C(e.kind === "tag" ? e.tag.description : e.pair.description), 1)) : b("", !0)
|
|
4131
|
+
], 42, Al))], 64))), 128))], 8, El)
|
|
4132
|
+
], 12, bl)]),
|
|
4115
4133
|
_: 1
|
|
4116
4134
|
}, 8, ["visible"]));
|
|
4117
4135
|
}
|
|
4118
4136
|
});
|
|
4119
4137
|
//#endregion
|
|
4120
|
-
export {
|
|
4138
|
+
export { Kc as a, Fn as c, fn as d, dn as f, Jc as i, En as l, sn as m, _l as n, Wc as o, ln as p, Zc as r, zc as s, Rl as t, Tn as u };
|
|
4121
4139
|
|
|
4122
|
-
//# sourceMappingURL=styles-
|
|
4140
|
+
//# sourceMappingURL=styles-C7s-VtJi.js.map
|