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