@templatical/editor 0.54.2 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-DdsvhE78.js} +4 -4
- package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-P6to1_0t.js} +3 -3
- package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-BSlmzMRC.js} +10 -10
- package/dist/{AiPanels-CR6zphjP.js → AiPanels-DAsnX-a3.js} +1 -1
- package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-DIISOR6U.js} +11 -11
- package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-Bmtc50BQ.js} +4 -4
- package/dist/BlockPreviewCanvas-BYIzNn-9.js +154 -0
- package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
- package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-w34W8_BP.js} +4 -4
- package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-HTbCebjV.js} +2 -2
- package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
- package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-C5qG17Ki.js} +1 -1
- package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-C7CWcUYZ.js} +12 -12
- package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-BTXcCvjZ.js} +2 -2
- package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CP-pkntQ.js} +5 -5
- package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-CiiNBzH0.js} +12 -12
- package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-B981Av-6.js} +15 -15
- package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CTCZ7BYv.js} +4 -4
- package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-DEOPc4RC.js} +284 -279
- package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-DJsPLTwP.js} +1 -1
- package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-D2WD2aE2.js} +1 -1
- package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-C9icdxw7.js} +1 -1
- package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
- package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-CrAcmT3A.js} +5 -5
- package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-BWBQ3jKz.js} +55 -55
- package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-CqAp16yQ.js} +4 -4
- package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-xbBjVPVQ.js} +8 -8
- package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-pebNJBTc.js} +9 -9
- package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-CvagMcv7.js} +11 -11
- package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-B9AAVBDm.js} +1 -1
- package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BIANWe3i.js} +3 -3
- package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-ORq4PbCN.js} +12 -12
- package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-DRjCpcPl.js} +11 -11
- package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-H0v8El__.js} +1 -1
- package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-CEGbJXeU.js} +11 -11
- package/dist/{Toolbar-BppchV2k.js → Toolbar-XT-uGA9J.js} +1134 -852
- package/dist/{TplModal-BFWOoK8l.js → TplModal-7NQq5-VW.js} +4 -4
- package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu-C8BE3Pr-.js} +7 -7
- package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-CuKuOSJG.js} +1 -1
- package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-BVFBkveR.js} +2 -2
- package/dist/WrapperBlock-Bdw-072t.js +56 -0
- package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CGplGmmr.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +18 -1
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-x999Gimz.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-x999Gimz.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-DjnFz1wO.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-DjnFz1wO.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-DKDu9cs7.js} +4 -4
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-DKDu9cs7.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-jMLVaiKx.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-jMLVaiKx.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-s79rmHFy.js} +10 -10
- package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-s79rmHFy.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-Bnmq_M4G.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-Bnmq_M4G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-B3HkuENF.js} +46 -32
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-DQnlH_YJ.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-DQnlH_YJ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-CHqUGhOZ.js} +3 -3
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-CHqUGhOZ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-EtdTzTmq.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-EtdTzTmq.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-Qmj049QX.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-Qmj049QX.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-DyGsh92b.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-DyGsh92b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-Ddj2erNm.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-Ddj2erNm.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-DnSnEh1X.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-DnSnEh1X.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-C2I_yTL5.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-C2I_yTL5.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-Dr9LRCAg.js} +4 -4
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-Dr9LRCAg.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-BdzE9-l7.js} +260 -255
- package/dist/cdn/chunks/LogicTagInsertButton-BdzE9-l7.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-CMJFXu_o.js} +2 -2
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-CMJFXu_o.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-C790ZXuY.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-C790ZXuY.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-CmrX8Md6.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-CmrX8Md6.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-KOnd2teB.js} +8 -8
- package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-KOnd2teB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-I9lbKaPk.js} +19 -19
- package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-I9lbKaPk.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-DqbULAbc.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-DqbULAbc.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-_O22z0pn.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-_O22z0pn.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-CClRLXgF.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-CClRLXgF.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-BIaxaxw9.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-BIaxaxw9.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-Dfu9N6YW.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-Dfu9N6YW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DiMW_dbJ.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DiMW_dbJ.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-JMUo0LIV.js} +10 -10
- package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-JMUo0LIV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-D52VtwBZ.js} +12 -12
- package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-D52VtwBZ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-D9ezVDHd.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-D9ezVDHd.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-D04vvbUc.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-D04vvbUc.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-C_Hfsher.js} +1196 -914
- package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-d6fEZGJ5.js} +5 -5
- package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-d6fEZGJ5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-C8ucm43v.js} +7 -7
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-C8ucm43v.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-BAdzmhvH.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-BAdzmhvH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-BWuovbFc.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-BWuovbFc.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js +58 -0
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DOuIxWRv.js → ca-BJn8lcJx.js} +19 -2
- package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
- package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-CsfQlmcf.js} +676 -620
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-PpIFCDfj.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-PpIFCDfj.js.map} +1 -1
- package/dist/{de-DaOUfYBX.js → cdn/chunks/de-BLFp3nWx.js} +20 -1
- package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-B8UE9V8B.js} +90 -90
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-B8UE9V8B.js.map} +1 -1
- package/dist/cdn/chunks/en-CVxNoHww.js +1 -0
- package/dist/cdn/chunks/{en-C0pHHMiR.js → en-DGGQJGbm.js} +19 -2
- package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
- package/dist/{es-CxyEKr6n.js → cdn/chunks/es-DTY9qgLv.js} +20 -1
- package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BM6ZSnsQ.js} +82 -76
- package/dist/cdn/chunks/extensions-BM6ZSnsQ.js.map +1 -0
- package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-L4FqO9Gp.js} +20 -1
- package/dist/cdn/chunks/fr-L4FqO9Gp.js.map +1 -0
- package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
- package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
- package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +19 -2
- package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
- package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
- package/dist/cdn/chunks/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +19 -2
- package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js +300 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Dn6dFUwx.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +19 -2
- package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-DJI7vvET.js} +3 -3
- package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-DJI7vvET.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-Qw9rHc8C.js} +420 -406
- package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-Qw9rHc8C.js.map} +1 -1
- package/dist/cdn/chunks/src-Bfj1jHnn.js +710 -0
- package/dist/cdn/chunks/src-Bfj1jHnn.js.map +1 -0
- package/dist/cdn/chunks/{src-712f3ofG.js → src-C9JWWxAk.js} +683 -568
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
- package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-mXG-Of9A.js} +892 -735
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-Bgg4qpev.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-DLvWzWsp.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-DLvWzWsp.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-B4FHCGGm.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-B4FHCGGm.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-QqBilClC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +761 -764
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
- package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
- package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
- package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
- package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
- package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
- package/dist/{composables-BbPFRlBf.js → composables-CRX6rncm.js} +1044 -988
- package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-DplyIlsy.js} +3 -3
- package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
- package/dist/{cdn/chunks/de-DaOUfYBX.js → de-BLFp3nWx.js} +18 -3
- package/dist/{dist-C34cYI5S.js → dist-BMUUt3zJ.js} +964 -807
- package/dist/{editor-modal-BeX6otLk.js → editor-modal-D9HT9bD6.js} +15 -15
- package/dist/{en-C0pHHMiR.js → en-DGGQJGbm.js} +18 -1
- package/dist/en-De3uAutQ.js +1 -0
- package/dist/{cdn/chunks/es-CxyEKr6n.js → es-DTY9qgLv.js} +18 -3
- package/dist/{extensions-xCiyqSg7.js → extensions-Cm6K4SRX.js} +344 -338
- package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
- package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-L4FqO9Gp.js} +18 -3
- package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
- package/dist/index.d.ts +74 -13
- package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
- package/dist/{ja-DfaIAoGI.js → ja-6uOXkh4v.js} +18 -1
- package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
- package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
- package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
- package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
- package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
- package/dist/{nl-DkrB-VKZ.js → nl-DCxuxwNq.js} +18 -1
- package/dist/normalizeMergeTagMarkup-Da9JAgx7.js +298 -0
- package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
- package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
- package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
- package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
- package/dist/{pt-BR-CY5Ye7eP.js → pt-BR-CBkcrebr.js} +18 -1
- package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
- package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
- package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-wBibnBF4.js} +6 -6
- package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
- package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
- package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
- package/dist/{socialIcons-DhAolBjt.js → socialIcons-CJD6OsI7.js} +283 -269
- package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
- package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +851 -854
- package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
- package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
- package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
- package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
- package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
- package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
- package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
- package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
- package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-DLkYos2Q.js} +3 -3
- package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-IoWOO679.js} +5 -5
- package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
- package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
- package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-m_PHcOD0.js} +1 -1
- package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
- package/package.json +10 -10
- package/dist/BlockPreviewCanvas-DtOo5y3U.js +0 -140
- package/dist/WrapperBlock-BUzQTZuu.js +0 -44
- package/dist/cdn/chunks/BlockPreviewCanvas-B6ndvof2.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-C_uE5rPJ.js.map +0 -1
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +0 -1
- package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
- package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
- package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js +0 -290
- package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
- package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
- package/dist/cdn/chunks/src-B2tQbzf6.js +0 -677
- package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
- package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
- package/dist/en-Do0SU6tR.js +0 -1
- package/dist/normalizeMergeTagMarkup-C7FGNURu.js +0 -288
- package/dist/useLocalizedDisplay-C9MBFUr4.js +0 -31
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { A as e, B as t, C as n, E as r, F as i, G as a, H as o, I as s, K as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, S as g, W as _, X as v, Y as y, _ as b, b as x, c as S, ct as C, dt as w, f as T, g as E, h as D, j as O, l as k, m as A, mt as j, ot as M, p as N, pt as P, rt as F, s as I, st as L, t as R, tt as z, u as B, x as V } from "./draggable-DepKdldn.js";
|
|
2
|
-
import { $ as H,
|
|
3
|
-
import { B as
|
|
4
|
-
import { t as
|
|
5
|
-
import { At as
|
|
6
|
-
import { $ as
|
|
7
|
-
import { t as Q } from "./useI18n-
|
|
8
|
-
import { n as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { m as
|
|
12
|
-
import { _ as
|
|
13
|
-
import { a as
|
|
14
|
-
import { t as
|
|
15
|
-
import "./useCloudI18n-
|
|
16
|
-
import { t as
|
|
2
|
+
import { $ as H, A as U, B as W, C as G, Cn as K, D as ee, E as q, G as J, H as te, I as ne, K as re, Kt as ie, L as Y, M as X, N as ae, O as oe, P as se, Q as ce, Qt as Z, R as le, S as ue, Sn as de, T as fe, W as pe, X as me, Y as he, Z as ge, Zt as _e, a as ve, at as ye, b as be, bn as xe, cn as Se, ct as Ce, d as we, dt as Te, et as Ee, hn as De, ht as Oe, i as ke, it as Ae, j as je, jt as Me, lt as Ne, mn as Pe, mt as Fe, nt as Ie, on as Le, p as Re, pt as ze, q as Be, rn as Ve, rt as He, sn as Ue, st as We, t as Ge, tt as Ke, u as qe, un as Je, vn as Ye, vt as Xe, w as Ze, x as Qe, xn as $e, y as et, yn as tt } from "./src-mXG-Of9A.js";
|
|
3
|
+
import { B as nt, C as rt, F as it, I as at, P as ot, R as st, T as ct, _ as lt, a as ut, f as dt, h as ft, n as pt, o as mt, t as ht, u as gt, v as _t, w as vt, x as yt, y as bt, z as xt } from "./socialIcons-Qw9rHc8C.js";
|
|
4
|
+
import { t as St } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
5
|
+
import { At as Ct, G as wt, Mt as Tt, Nt as Et, Ot as Dt, St as Ot, Ut as kt, V as At, Wt as jt, X as Mt, _t as Nt, d as Pt, f as Ft, k as It, mt as Lt, nt as Rt, o as zt, y as Bt, yt as Vt } from "./icons-DHExFLlT.js";
|
|
6
|
+
import { $ as Ht, A as Ut, B as Wt, C as Gt, D as Kt, F as qt, G as Jt, H as Yt, I as Xt, J as Zt, K as Qt, L as $t, M as en, N as tn, O as nn, P as rn, R as an, S as on, T as sn, U as cn, V as ln, W as un, Y as dn, Z as fn, _ as pn, a as mn, at as hn, b as gn, c as _n, d as vn, et as yn, g as bn, h as xn, i as Sn, it as Cn, j as wn, k as Tn, l as En, m as Dn, nt as On, ot as kn, p as An, q as jn, r as Mn, rt as Nn, s as Pn, st as Fn, tt as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./keys-BUmIvYy3.js";
|
|
7
|
+
import { t as Q } from "./useI18n-D8s7HtTn.js";
|
|
8
|
+
import { n as Un } from "./useLocalizedDisplay-Bgg4qpev.js";
|
|
9
|
+
import { t as Wn } from "./plural-CyxrJXL1.js";
|
|
10
|
+
import { t as Gn } from "./languageName-DEEOhDWI.js";
|
|
11
|
+
import { m as Kn, w as qn, x as Jn } from "./styleConstants-CgiNKdnc.js";
|
|
12
|
+
import { _ as Yn, h as Xn, v as Zn, y as Qn } from "./dist-BzXULHvI.js";
|
|
13
|
+
import { a as $n, c as er, i as tr, l as nr } from "./dist-DqGgijFI.js";
|
|
14
|
+
import { t as rr } from "./useEditorRoot-Beau2Z_T.js";
|
|
15
|
+
import "./useCloudI18n-Xsih9yRH.js";
|
|
16
|
+
import { t as ir } from "./useMergeTag-B4FHCGGm.js";
|
|
17
17
|
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
18
|
-
import { a as
|
|
19
|
-
import { t as
|
|
20
|
-
import { r as
|
|
21
|
-
import { n as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
18
|
+
import { a as ar, c as or, i as sr, n as cr, o as lr, t as ur } from "./usePopoverPosition-esO6wjvU.js";
|
|
19
|
+
import { t as dr } from "./useLogicTag-DLvWzWsp.js";
|
|
20
|
+
import { r as fr, t as pr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
21
|
+
import { n as mr, t as hr } from "./sanitizeHtml-DJI7vvET.js";
|
|
22
|
+
import { t as gr } from "./LoadingTrack-DUYcDHOV.js";
|
|
23
|
+
import { t as _r } from "./readableTextColor-BfZUGnVj.js";
|
|
24
24
|
// src/composables/useFocusTrap.ts
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
let n =
|
|
25
|
+
var vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
+
function yr(e, t) {
|
|
27
|
+
let n = rr(), r = null, i = null, a = null;
|
|
28
28
|
function s() {
|
|
29
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
29
|
+
return e.value ? Array.from(e.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
|
|
30
30
|
}
|
|
31
31
|
function c(e) {
|
|
32
32
|
if (e.key !== "Tab") return;
|
|
@@ -41,7 +41,7 @@ function gr(e, t) {
|
|
|
41
41
|
a = null;
|
|
42
42
|
let t = s();
|
|
43
43
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
44
|
-
}), i =
|
|
44
|
+
}), i = $n(e, "keydown", c);
|
|
45
45
|
}
|
|
46
46
|
function u(e = {}) {
|
|
47
47
|
let t = e.restoreFocus !== !1;
|
|
@@ -55,8 +55,8 @@ function gr(e, t) {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// src/composables/useEmoji.ts
|
|
58
|
-
function
|
|
59
|
-
let [e, t] =
|
|
58
|
+
function br() {
|
|
59
|
+
let [e, t] = Zn(!1), n = F([]), r = !1;
|
|
60
60
|
m(() => {
|
|
61
61
|
r = !0;
|
|
62
62
|
}), o(e, async (e) => {
|
|
@@ -80,7 +80,7 @@ function _r() {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
// src/composables/useBlockRegistry.ts
|
|
83
|
-
function
|
|
83
|
+
function xr() {
|
|
84
84
|
let e = F(/* @__PURE__ */ new Map());
|
|
85
85
|
function t(t, n) {
|
|
86
86
|
e.value.set(t, n), L(e);
|
|
@@ -89,7 +89,7 @@ function vr() {
|
|
|
89
89
|
let r = `custom:${t.type}`;
|
|
90
90
|
e.value.set(r, {
|
|
91
91
|
component: n,
|
|
92
|
-
createBlock: () =>
|
|
92
|
+
createBlock: () => ue(t),
|
|
93
93
|
definition: t
|
|
94
94
|
}), L(e);
|
|
95
95
|
}
|
|
@@ -114,7 +114,7 @@ function vr() {
|
|
|
114
114
|
let t = a(e.customType);
|
|
115
115
|
if (!t) return o("Block definition not found");
|
|
116
116
|
try {
|
|
117
|
-
return await
|
|
117
|
+
return await Y(await import("./liquid.browser-rubac0VA.js")).parseAndRender(t.template, e.fieldValues);
|
|
118
118
|
} catch (t) {
|
|
119
119
|
return $.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
120
120
|
}
|
|
@@ -133,7 +133,7 @@ function vr() {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
// src/composables/useFonts.ts
|
|
136
|
-
var
|
|
136
|
+
var Sr = [
|
|
137
137
|
{
|
|
138
138
|
value: "Arial",
|
|
139
139
|
label: "Arial"
|
|
@@ -162,19 +162,19 @@ var yr = [
|
|
|
162
162
|
value: "Courier New",
|
|
163
163
|
label: "Courier New"
|
|
164
164
|
}
|
|
165
|
-
],
|
|
166
|
-
function
|
|
167
|
-
if (e === void 0 || e === !0) return [...
|
|
165
|
+
], Cr = "Arial, sans-serif";
|
|
166
|
+
function wr(e) {
|
|
167
|
+
if (e === void 0 || e === !0) return [...Sr];
|
|
168
168
|
if (e === !1) return [];
|
|
169
169
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
170
170
|
for (let i of e) {
|
|
171
|
-
let e = i.toLowerCase(), a =
|
|
172
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${
|
|
171
|
+
let e = i.toLowerCase(), a = Sr.find((t) => t.value.toLowerCase() === e);
|
|
172
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Sr.map((e) => e.value).join(", ")}.`));
|
|
173
173
|
}
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
let t = z(e?.customFonts ?? []), n = z(!1), r =
|
|
176
|
+
function Tr(e) {
|
|
177
|
+
let t = z(e?.customFonts ?? []), n = z(!1), r = wr(e?.builtIns), i = N(() => e?.defaultFallback ?? Cr), a = N(() => {
|
|
178
178
|
let e = [...r], n = t.value.map((e) => ({
|
|
179
179
|
value: e.name,
|
|
180
180
|
label: e.name,
|
|
@@ -185,18 +185,18 @@ function Sr(e) {
|
|
|
185
185
|
function o(e) {
|
|
186
186
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
187
187
|
}
|
|
188
|
-
let s = e?.defaultFont ??
|
|
188
|
+
let s = e?.defaultFont ?? Cr.split(",")[0].trim();
|
|
189
189
|
o(s) || $.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
190
190
|
function c() {
|
|
191
191
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
192
192
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
193
193
|
if (t) return t.value;
|
|
194
194
|
}
|
|
195
|
-
return
|
|
195
|
+
return Cr;
|
|
196
196
|
}
|
|
197
197
|
let l = N(() => c());
|
|
198
198
|
function u(e) {
|
|
199
|
-
return
|
|
199
|
+
return ke(e, {
|
|
200
200
|
customFonts: t.value,
|
|
201
201
|
defaultFallback: i.value
|
|
202
202
|
});
|
|
@@ -239,7 +239,7 @@ function Sr(e) {
|
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
// src/composables/useThemeStyles.ts
|
|
242
|
-
var
|
|
242
|
+
var Er = {
|
|
243
243
|
bg: "--tpl-bg",
|
|
244
244
|
bgElevated: "--tpl-bg-elevated",
|
|
245
245
|
bgHover: "--tpl-bg-hover",
|
|
@@ -263,10 +263,10 @@ var Cr = {
|
|
|
263
263
|
dangerLight: "--tpl-danger-light",
|
|
264
264
|
canvasBg: "--tpl-canvas-bg"
|
|
265
265
|
};
|
|
266
|
-
function
|
|
266
|
+
function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
267
|
return { themeStyles: N(() => {
|
|
268
268
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
269
|
-
if (a) for (let [e, t] of Object.entries(
|
|
269
|
+
if (a) for (let [e, t] of Object.entries(Er)) {
|
|
270
270
|
let n = a[e];
|
|
271
271
|
n && (r[t] = n);
|
|
272
272
|
}
|
|
@@ -274,12 +274,12 @@ function wr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
274
274
|
}) };
|
|
275
275
|
}
|
|
276
276
|
// src/utils/mergeTagNodeSpec.ts
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function Or(e, t, n) {
|
|
278
|
+
return ge(e, n) ? {
|
|
279
279
|
type: "logicMergeTagNode",
|
|
280
280
|
attrs: {
|
|
281
281
|
value: e,
|
|
282
|
-
keyword:
|
|
282
|
+
keyword: J(e, n)
|
|
283
283
|
}
|
|
284
284
|
} : {
|
|
285
285
|
type: "mergeTagNode",
|
|
@@ -290,32 +290,32 @@ function Tr(e, t, n) {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
// src/utils/insertLogicTag.ts
|
|
293
|
-
function
|
|
293
|
+
function kr(e) {
|
|
294
294
|
return "before" in e && "after" in e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
298
|
-
e.chain().focus().insertContent(
|
|
296
|
+
function Ar(e, t, n) {
|
|
297
|
+
if (!kr(t)) {
|
|
298
|
+
e.chain().focus().insertContent(Or(t.value, t.label, n)).run();
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
let r =
|
|
301
|
+
let r = Or(t.before, t.label, n), i = Or(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
302
302
|
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
303
303
|
}
|
|
304
304
|
// src/utils/linkColorExtension.ts
|
|
305
|
-
function
|
|
305
|
+
function jr(e) {
|
|
306
306
|
if (!e) return null;
|
|
307
307
|
let t = e.trim();
|
|
308
308
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function Mr(e) {
|
|
311
311
|
return e.extend({ addAttributes() {
|
|
312
312
|
return {
|
|
313
313
|
...this.parent?.(),
|
|
314
314
|
color: {
|
|
315
315
|
default: null,
|
|
316
|
-
parseHTML: (e) =>
|
|
316
|
+
parseHTML: (e) => jr(lr(e.style.color)),
|
|
317
317
|
renderHTML: (e) => {
|
|
318
|
-
let t =
|
|
318
|
+
let t = jr(e.color);
|
|
319
319
|
return t ? { style: `color: ${t}` } : {};
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -323,9 +323,9 @@ function kr(e) {
|
|
|
323
323
|
} });
|
|
324
324
|
}
|
|
325
325
|
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
-
function
|
|
326
|
+
function Nr(e, t = te.liquid, n = () => !0) {
|
|
327
327
|
let r = z(!1), i = z(""), a = z(""), o = z(null);
|
|
328
|
-
|
|
328
|
+
yr(o, r);
|
|
329
329
|
function s() {
|
|
330
330
|
if (!n()) return;
|
|
331
331
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -336,7 +336,7 @@ function Ar(e, t = Re.liquid, n = () => !0) {
|
|
|
336
336
|
if (i.value) {
|
|
337
337
|
let t = d(i.value);
|
|
338
338
|
if (t !== null) {
|
|
339
|
-
let n =
|
|
339
|
+
let n = jr(a.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
340
340
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
341
341
|
}
|
|
342
342
|
}
|
|
@@ -353,8 +353,8 @@ function Ar(e, t = Re.liquid, n = () => !0) {
|
|
|
353
353
|
if (t.startsWith("#")) return t;
|
|
354
354
|
if (t.startsWith("//")) return `https:${t}`;
|
|
355
355
|
if (l.test(t)) return t;
|
|
356
|
-
let n =
|
|
357
|
-
return n ?
|
|
356
|
+
let n = we(t);
|
|
357
|
+
return n ? qe.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
358
358
|
}
|
|
359
359
|
function f() {
|
|
360
360
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -378,13 +378,13 @@ function Ar(e, t = Re.liquid, n = () => !0) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/composables/useRichTextEditor.ts
|
|
381
|
-
function
|
|
382
|
-
let t = f(
|
|
381
|
+
function Pr(e) {
|
|
382
|
+
let t = f(Rn, null), n = or(), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: s, syntax: c, autocomplete: l } = ir(), { canInsertLogicTag: d, isRequesting: p, requestLogicTag: m } = dr(), h = f(On, null), g = (v(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = he(c), y = F(null), b = t?.content ? Un(t) : null, x = () => Te(b?.settings.value ?? { locale: "en" });
|
|
383
383
|
o(x, (e) => {
|
|
384
384
|
let t = y.value?.view.dom;
|
|
385
385
|
t && t.setAttribute("dir", e);
|
|
386
386
|
});
|
|
387
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } =
|
|
387
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = Nr(y, c, () => n.value);
|
|
388
388
|
o(n, (e) => {
|
|
389
389
|
if (y.value?.setEditable(e, !1), !e) {
|
|
390
390
|
k();
|
|
@@ -392,7 +392,7 @@ function jr(e) {
|
|
|
392
392
|
e && e.view.dispatch(e.state.tr);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
|
-
let { start: j, stop: M } =
|
|
395
|
+
let { start: j, stop: M } = Yn(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), N = F(null), P = z(!0), I = z(null), L = !1, R = null;
|
|
396
396
|
async function B() {
|
|
397
397
|
I.value = null, P.value = !0;
|
|
398
398
|
try {
|
|
@@ -441,7 +441,7 @@ function jr(e) {
|
|
|
441
441
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
442
442
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
$n(document, "mousedown", U), u(() => {
|
|
445
445
|
L = !0, H(), M(), y.value?.destroy();
|
|
446
446
|
});
|
|
447
447
|
async function W() {
|
|
@@ -455,7 +455,7 @@ function jr(e) {
|
|
|
455
455
|
async function G() {
|
|
456
456
|
if (!n.value) return;
|
|
457
457
|
let e = await m();
|
|
458
|
-
!L && n.value && (e && y.value ?
|
|
458
|
+
!L && n.value && (e && y.value ? Ar(y.value, e, c) : y.value?.commands.focus());
|
|
459
459
|
}
|
|
460
460
|
return {
|
|
461
461
|
editor: y,
|
|
@@ -484,25 +484,25 @@ function jr(e) {
|
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
// src/utils/activeEditorTracker.ts
|
|
487
|
-
var
|
|
488
|
-
function
|
|
489
|
-
let e = ++
|
|
490
|
-
return
|
|
487
|
+
var Fr = /* @__PURE__ */ new Set(), Ir = 0, Lr = 0;
|
|
488
|
+
function Rr() {
|
|
489
|
+
let e = ++Lr;
|
|
490
|
+
return Fr.add(e), Ir === 0 && (Ir = e), {
|
|
491
491
|
id: e,
|
|
492
|
-
isActive: () =>
|
|
492
|
+
isActive: () => Fr.size <= 1 || Ir === e,
|
|
493
493
|
claim: () => {
|
|
494
|
-
|
|
494
|
+
Ir = e;
|
|
495
495
|
},
|
|
496
496
|
dispose: () => {
|
|
497
|
-
if (
|
|
498
|
-
let e = Array.from(
|
|
499
|
-
|
|
497
|
+
if (Fr.delete(e), Ir === e) {
|
|
498
|
+
let e = Array.from(Fr);
|
|
499
|
+
Ir = e[e.length - 1] ?? 0;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
// src/utils/resolveLintOptions.ts
|
|
505
|
-
function
|
|
505
|
+
function zr(e) {
|
|
506
506
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
507
507
|
return {
|
|
508
508
|
...e.lint,
|
|
@@ -511,8 +511,8 @@ function Ir(e) {
|
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
// src/composables/usePreviewResolution.ts
|
|
514
|
-
var
|
|
515
|
-
function
|
|
514
|
+
var Br = 500;
|
|
515
|
+
function Vr(e) {
|
|
516
516
|
let t = typeof e.resolvePreview == "function", n = z(null), r = z(!1), i = z(!1), a = 0, s = null;
|
|
517
517
|
function c() {
|
|
518
518
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -523,13 +523,13 @@ function Rr(e) {
|
|
|
523
523
|
let o = ++a;
|
|
524
524
|
r.value = !0;
|
|
525
525
|
let s = {
|
|
526
|
-
content:
|
|
526
|
+
content: Ve(e.getContent()),
|
|
527
527
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
528
528
|
};
|
|
529
529
|
try {
|
|
530
530
|
let e = await t(s);
|
|
531
531
|
if (o !== a) return;
|
|
532
|
-
if (!
|
|
532
|
+
if (!Ge(e)) {
|
|
533
533
|
i.value = !0;
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
@@ -544,7 +544,7 @@ function Rr(e) {
|
|
|
544
544
|
function u() {
|
|
545
545
|
t && (c(), n.value === null ? l() : s = setTimeout(() => {
|
|
546
546
|
s = null, l();
|
|
547
|
-
},
|
|
547
|
+
}, Br));
|
|
548
548
|
}
|
|
549
549
|
return o(() => [
|
|
550
550
|
e.isActive(),
|
|
@@ -567,7 +567,7 @@ function Rr(e) {
|
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
569
|
// src/composables/useMergeTagPicker.ts
|
|
570
|
-
function
|
|
570
|
+
function Hr() {
|
|
571
571
|
let e = z(!1), t = z([]), n = z(null), r = null;
|
|
572
572
|
function i(i, a) {
|
|
573
573
|
if (r) {
|
|
@@ -597,7 +597,7 @@ function zr() {
|
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
// src/composables/useLogicTagPicker.ts
|
|
600
|
-
function
|
|
600
|
+
function Ur() {
|
|
601
601
|
let e = z(!1), t = z([]), n = z([]), r = null;
|
|
602
602
|
function i(i, a) {
|
|
603
603
|
if (r) {
|
|
@@ -627,23 +627,23 @@ function Br() {
|
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
// src/composables/useTemplateLint.ts
|
|
630
|
-
function
|
|
630
|
+
function Wr(e) {
|
|
631
631
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 && e.localization === !1 : !1;
|
|
632
632
|
}
|
|
633
|
-
var
|
|
634
|
-
function
|
|
633
|
+
var Gr = !1;
|
|
634
|
+
function Kr(e) {
|
|
635
635
|
let t = z([]), n = z(0), r = z(-1), i = o(e.content, () => {
|
|
636
636
|
n.value++;
|
|
637
|
-
}, { deep: !0 }), a = z(!1), s = z(!1), c = F(null), l =
|
|
637
|
+
}, { deep: !0 }), a = z(!1), s = z(!1), c = F(null), l = Wr(e.options), u = null, d = !1;
|
|
638
638
|
l || f();
|
|
639
639
|
async function f() {
|
|
640
640
|
try {
|
|
641
|
-
let t = await import("./src-
|
|
641
|
+
let t = await import("./src-C9JWWxAk.js");
|
|
642
642
|
if (d) return;
|
|
643
|
-
c.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u =
|
|
643
|
+
c.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = Qn(n, p, { debounce: e.debounce ?? 500 });
|
|
644
644
|
} catch {
|
|
645
645
|
if (d) return;
|
|
646
|
-
s.value = !0,
|
|
646
|
+
s.value = !0, Gr || (Gr = !0, $.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
649
|
function p() {
|
|
@@ -682,7 +682,7 @@ function Ur(e) {
|
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
684
|
// src/composables/useKeyboardReorder.ts
|
|
685
|
-
function
|
|
685
|
+
function qr(e, t, n = []) {
|
|
686
686
|
let r = z(null), i = z(""), a = null;
|
|
687
687
|
function o(t) {
|
|
688
688
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -709,7 +709,7 @@ function Wr(e, t, n = []) {
|
|
|
709
709
|
let i = o(r);
|
|
710
710
|
if (!i) return "";
|
|
711
711
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
712
|
-
return a ?
|
|
712
|
+
return a ? bt(a, t.t, n) : "";
|
|
713
713
|
}
|
|
714
714
|
function c(t, n) {
|
|
715
715
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -777,14 +777,14 @@ function Wr(e, t, n = []) {
|
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
779
|
// src/composables/useUiTheme.ts
|
|
780
|
-
function
|
|
781
|
-
let t =
|
|
780
|
+
function Jr(e) {
|
|
781
|
+
let t = er("(prefers-color-scheme: dark)");
|
|
782
782
|
return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
783
783
|
}
|
|
784
784
|
// src/composables/useCustomBlockStylesheets.ts
|
|
785
|
-
function
|
|
785
|
+
function Yr(e, t) {
|
|
786
786
|
return N(() => {
|
|
787
|
-
let n =
|
|
787
|
+
let n = Xr(e.value.blocks);
|
|
788
788
|
if (n.size === 0) return [];
|
|
789
789
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
790
790
|
for (let e of n) {
|
|
@@ -796,75 +796,75 @@ function Kr(e, t) {
|
|
|
796
796
|
return i;
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Xr(e) {
|
|
800
800
|
let t = /* @__PURE__ */ new Set();
|
|
801
|
-
return
|
|
801
|
+
return Zr(e, t), t;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
for (let n of e) if (
|
|
803
|
+
function Zr(e, t) {
|
|
804
|
+
for (let n of e) if (Xe(n)) t.add(n.customType);
|
|
805
805
|
else if (n.type === "section") {
|
|
806
806
|
let e = n.children;
|
|
807
807
|
if (!e) continue;
|
|
808
|
-
for (let n of e)
|
|
809
|
-
} else
|
|
808
|
+
for (let n of e) Zr(n, t);
|
|
809
|
+
} else Me(n) && Zr(n.children, t);
|
|
810
810
|
}
|
|
811
811
|
// src/utils/registerBuiltInBlocks.ts
|
|
812
|
-
var
|
|
812
|
+
var Qr = [
|
|
813
813
|
{
|
|
814
814
|
type: "section",
|
|
815
|
-
createBlock:
|
|
815
|
+
createBlock: oe
|
|
816
816
|
},
|
|
817
817
|
{
|
|
818
818
|
type: "title",
|
|
819
|
-
createBlock:
|
|
819
|
+
createBlock: ae
|
|
820
820
|
},
|
|
821
821
|
{
|
|
822
822
|
type: "paragraph",
|
|
823
|
-
createBlock:
|
|
823
|
+
createBlock: ee
|
|
824
824
|
},
|
|
825
825
|
{
|
|
826
826
|
type: "image",
|
|
827
|
-
createBlock:
|
|
827
|
+
createBlock: fe
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
type: "button",
|
|
831
|
-
createBlock:
|
|
831
|
+
createBlock: be
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
type: "divider",
|
|
835
|
-
createBlock:
|
|
835
|
+
createBlock: G
|
|
836
836
|
},
|
|
837
837
|
{
|
|
838
838
|
type: "video",
|
|
839
|
-
createBlock:
|
|
839
|
+
createBlock: se
|
|
840
840
|
},
|
|
841
841
|
{
|
|
842
842
|
type: "social",
|
|
843
|
-
createBlock:
|
|
843
|
+
createBlock: U
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
type: "menu",
|
|
847
|
-
createBlock:
|
|
847
|
+
createBlock: q
|
|
848
848
|
},
|
|
849
849
|
{
|
|
850
850
|
type: "table",
|
|
851
|
-
createBlock:
|
|
851
|
+
createBlock: X
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
type: "spacer",
|
|
855
|
-
createBlock:
|
|
855
|
+
createBlock: je
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
858
|
type: "html",
|
|
859
|
-
createBlock:
|
|
859
|
+
createBlock: Ze
|
|
860
860
|
},
|
|
861
861
|
{
|
|
862
862
|
type: "countdown",
|
|
863
|
-
createBlock:
|
|
863
|
+
createBlock: Qe
|
|
864
864
|
}
|
|
865
865
|
];
|
|
866
|
-
function
|
|
867
|
-
for (let n of
|
|
866
|
+
function $r(e, t) {
|
|
867
|
+
for (let n of Qr) {
|
|
868
868
|
let r = t[n.type];
|
|
869
869
|
r && e.registerBuiltIn(n.type, {
|
|
870
870
|
component: r,
|
|
@@ -873,31 +873,31 @@ function Xr(e, t) {
|
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
876
|
-
function
|
|
876
|
+
function ei(e) {
|
|
877
877
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
878
878
|
}
|
|
879
879
|
// src/utils/collectOffPaletteDefaults.ts
|
|
880
|
-
function
|
|
880
|
+
function ti(e) {
|
|
881
881
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
884
|
-
let r = new Set(e.map((e) =>
|
|
885
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
883
|
+
function ni(e, t, n) {
|
|
884
|
+
let r = new Set(e.map((e) => ar(e))), i = [], a = (e, t) => {
|
|
885
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(ar(o)) && i.push(`${t}.${n}: ${o}`) : ti(o) && a(o, `${t}.${n}`);
|
|
886
886
|
}, o = t;
|
|
887
|
-
for (let [e, t] of Object.entries(
|
|
887
|
+
for (let [e, t] of Object.entries(ze)) {
|
|
888
888
|
let n = o?.[e];
|
|
889
889
|
a({
|
|
890
890
|
...t,
|
|
891
|
-
...
|
|
891
|
+
...ti(n) ? n : {}
|
|
892
892
|
}, e);
|
|
893
893
|
}
|
|
894
894
|
return a({
|
|
895
|
-
...
|
|
895
|
+
...Fe,
|
|
896
896
|
...n ?? {}
|
|
897
897
|
}, "template"), i;
|
|
898
898
|
}
|
|
899
899
|
// src/utils/localizedBlockDefaults.ts
|
|
900
|
-
function
|
|
900
|
+
function ri(e) {
|
|
901
901
|
return {
|
|
902
902
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
903
903
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -905,62 +905,62 @@ function ei(e) {
|
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
907
|
// src/i18n/index.ts
|
|
908
|
-
var
|
|
909
|
-
"./locales/ca.ts": () => import("./ca-
|
|
910
|
-
"./locales/de.ts": () => import("./de-
|
|
911
|
-
"./locales/en.ts": () => import("./en-
|
|
912
|
-
"./locales/es.ts": () => import("./es-
|
|
913
|
-
"./locales/fr.ts": () => import("./fr-
|
|
914
|
-
"./locales/ja.ts": () => import("./ja-
|
|
915
|
-
"./locales/nl.ts": () => import("./nl-
|
|
916
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
917
|
-
}),
|
|
908
|
+
var ii = /* #__PURE__ */ Object.assign({
|
|
909
|
+
"./locales/ca.ts": () => import("./ca-BJn8lcJx.js"),
|
|
910
|
+
"./locales/de.ts": () => import("./de-BLFp3nWx.js"),
|
|
911
|
+
"./locales/en.ts": () => import("./en-DGGQJGbm.js"),
|
|
912
|
+
"./locales/es.ts": () => import("./es-DTY9qgLv.js"),
|
|
913
|
+
"./locales/fr.ts": () => import("./fr-L4FqO9Gp.js"),
|
|
914
|
+
"./locales/ja.ts": () => import("./ja-6uOXkh4v.js"),
|
|
915
|
+
"./locales/nl.ts": () => import("./nl-DCxuxwNq.js"),
|
|
916
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-CBkcrebr.js")
|
|
917
|
+
}), ai = /* #__PURE__ */ Object.assign({
|
|
918
918
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
919
919
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
920
920
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
921
921
|
});
|
|
922
|
-
function
|
|
922
|
+
function oi(e) {
|
|
923
923
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
924
924
|
}
|
|
925
|
-
var
|
|
926
|
-
function
|
|
925
|
+
var si = oi(ii), ci = oi(ai);
|
|
926
|
+
function li(e) {
|
|
927
927
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
let n =
|
|
931
|
-
return t.find((e) =>
|
|
929
|
+
function ui(e, t) {
|
|
930
|
+
let n = li(e);
|
|
931
|
+
return t.find((e) => li(e) === n);
|
|
932
932
|
}
|
|
933
|
-
function
|
|
934
|
-
return
|
|
933
|
+
function di(e) {
|
|
934
|
+
return li(e).split("-")[0];
|
|
935
935
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
936
|
+
function fi(e, t) {
|
|
937
|
+
return ui(e, t) ?? ui(di(e), t);
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return
|
|
939
|
+
function pi(e, t) {
|
|
940
|
+
return fi(e, t) ?? "en";
|
|
941
941
|
}
|
|
942
|
-
async function
|
|
943
|
-
let t =
|
|
942
|
+
async function mi(e) {
|
|
943
|
+
let t = ii[`./locales/${pi(e, si)}.ts`];
|
|
944
944
|
return (await t()).default;
|
|
945
945
|
}
|
|
946
|
-
async function
|
|
947
|
-
let t =
|
|
946
|
+
async function hi(e) {
|
|
947
|
+
let t = ai[`./locales/cloud/${pi(e, ci)}.ts`];
|
|
948
948
|
return (await t()).default;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
950
|
+
function gi(e) {
|
|
951
|
+
return fi(e, si) !== void 0;
|
|
952
952
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
953
|
+
function _i(e) {
|
|
954
|
+
return fi(e, ci) !== void 0;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
957
|
-
return [...
|
|
956
|
+
function vi() {
|
|
957
|
+
return [...si];
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
return [...
|
|
959
|
+
function yi() {
|
|
960
|
+
return [...ci];
|
|
961
961
|
}
|
|
962
962
|
// src/i18n/contentDefaults.ts
|
|
963
|
-
var
|
|
963
|
+
var bi = {
|
|
964
964
|
en: {
|
|
965
965
|
video: "Video",
|
|
966
966
|
days: "Days",
|
|
@@ -1025,16 +1025,16 @@ var _i = {
|
|
|
1025
1025
|
seconds: "秒",
|
|
1026
1026
|
expired: "このオファーは終了しました"
|
|
1027
1027
|
}
|
|
1028
|
-
},
|
|
1029
|
-
function
|
|
1030
|
-
if (!e) return
|
|
1031
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
1032
|
-
if (n) return
|
|
1033
|
-
let r =
|
|
1034
|
-
return r ?
|
|
1035
|
-
}
|
|
1036
|
-
function
|
|
1037
|
-
let t =
|
|
1028
|
+
}, xi = new Map(Object.keys(bi).map((e) => [e.toLowerCase(), e]));
|
|
1029
|
+
function Si(e) {
|
|
1030
|
+
if (!e) return bi.en;
|
|
1031
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = xi.get(t);
|
|
1032
|
+
if (n) return bi[n];
|
|
1033
|
+
let r = xi.get(di(t));
|
|
1034
|
+
return r ? bi[r] : bi.en;
|
|
1035
|
+
}
|
|
1036
|
+
function Ci(e) {
|
|
1037
|
+
let t = Si(e);
|
|
1038
1038
|
return {
|
|
1039
1039
|
video: { alt: t.video },
|
|
1040
1040
|
countdown: {
|
|
@@ -1047,9 +1047,9 @@ function bi(e) {
|
|
|
1047
1047
|
};
|
|
1048
1048
|
}
|
|
1049
1049
|
// src/utils/collectColorFieldIssues.ts
|
|
1050
|
-
function
|
|
1050
|
+
function wi(e, t) {
|
|
1051
1051
|
let n = [], r = (r, i) => {
|
|
1052
|
-
let a =
|
|
1052
|
+
let a = _t(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1053
1053
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1054
1054
|
id: s("invalid-presets"),
|
|
1055
1055
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1060,8 +1060,8 @@ function xi(e, t) {
|
|
|
1060
1060
|
id: s("allow-custom-ignored"),
|
|
1061
1061
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1062
1062
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1063
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1064
|
-
e !== "" && !t.has(
|
|
1063
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => ar(e)));
|
|
1064
|
+
e !== "" && !t.has(ar(e)) && n.push({
|
|
1065
1065
|
id: s("off-palette-default"),
|
|
1066
1066
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1067
1067
|
});
|
|
@@ -1072,7 +1072,7 @@ function xi(e, t) {
|
|
|
1072
1072
|
return n;
|
|
1073
1073
|
}
|
|
1074
1074
|
// src/utils/keyboardShortcuts.ts
|
|
1075
|
-
function
|
|
1075
|
+
function Ti(e) {
|
|
1076
1076
|
for (let t of e.composedPath()) {
|
|
1077
1077
|
if (!(t instanceof HTMLElement)) continue;
|
|
1078
1078
|
if (t.isContentEditable) return !0;
|
|
@@ -1081,14 +1081,14 @@ function Si(e) {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
return !1;
|
|
1083
1083
|
}
|
|
1084
|
-
function
|
|
1084
|
+
function Ei(e, t) {
|
|
1085
1085
|
let n = e.metaKey || e.ctrlKey;
|
|
1086
1086
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1087
1087
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1088
|
-
if (
|
|
1088
|
+
if (Ti(e)) return;
|
|
1089
1089
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1090
1090
|
} else {
|
|
1091
|
-
if (t.isPicking?.() && !
|
|
1091
|
+
if (t.isPicking?.() && !Ti(e)) {
|
|
1092
1092
|
if (e.key === "Escape") {
|
|
1093
1093
|
e.preventDefault(), t.onCancelPick?.();
|
|
1094
1094
|
return;
|
|
@@ -1102,188 +1102,208 @@ function Ci(e, t) {
|
|
|
1102
1102
|
return;
|
|
1103
1103
|
}
|
|
1104
1104
|
}
|
|
1105
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1105
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ti(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
// src/utils/blockComponentResolver.ts
|
|
1109
|
-
function
|
|
1109
|
+
function Di(e, t) {
|
|
1110
1110
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1111
1111
|
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Oi(e, t, n) {
|
|
1114
1114
|
if (t) {
|
|
1115
1115
|
let n = t.getComponent(e);
|
|
1116
1116
|
if (n) return n;
|
|
1117
1117
|
}
|
|
1118
1118
|
return n[e.type] ?? null;
|
|
1119
1119
|
}
|
|
1120
|
-
var
|
|
1121
|
-
function
|
|
1120
|
+
var ki = "--tpl-block-bg-layer", Ai = "--tpl-email-frame-width", ji = "tpl-has-bg-image";
|
|
1121
|
+
function Mi(e, t) {
|
|
1122
1122
|
if (t === null) return {};
|
|
1123
|
-
let n =
|
|
1123
|
+
let n = De(e);
|
|
1124
1124
|
if (n === null) return {};
|
|
1125
|
-
let r = t?.trim(), i = r ?
|
|
1125
|
+
let r = t?.trim(), i = r ? Pe(r) : n.url;
|
|
1126
1126
|
return {
|
|
1127
1127
|
backgroundImage: `url("${i}")`,
|
|
1128
1128
|
backgroundSize: n.size,
|
|
1129
1129
|
backgroundPosition: n.position,
|
|
1130
1130
|
backgroundRepeat: n.repeat,
|
|
1131
|
-
[
|
|
1131
|
+
[ki]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1132
1132
|
};
|
|
1133
1133
|
}
|
|
1134
|
-
function
|
|
1135
|
-
return e &&
|
|
1134
|
+
function Ni(e) {
|
|
1135
|
+
return e && ki in e ? ji : void 0;
|
|
1136
1136
|
}
|
|
1137
|
-
var
|
|
1137
|
+
var Pi = {
|
|
1138
1138
|
top: "flex-start",
|
|
1139
1139
|
middle: "center",
|
|
1140
1140
|
bottom: "flex-end"
|
|
1141
1141
|
};
|
|
1142
|
-
function
|
|
1143
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1142
|
+
function Fi(e, t) {
|
|
1143
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Ii(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1144
1144
|
return {
|
|
1145
1145
|
display: "flex",
|
|
1146
1146
|
flexDirection: "column",
|
|
1147
|
-
justifyContent:
|
|
1147
|
+
justifyContent: Pi[e.verticalAlign],
|
|
1148
1148
|
boxSizing: "border-box",
|
|
1149
1149
|
...n
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Ii(e, t) {
|
|
1153
1153
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function Li(e, t = {}) {
|
|
1156
1156
|
if (e.type === "wrapper") return {};
|
|
1157
1157
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1158
1158
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1159
1159
|
backgroundColor: r || "transparent"
|
|
1160
1160
|
};
|
|
1161
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1162
|
-
let n =
|
|
1161
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? tt.paragraphGap : tt.paragraphGap}px`), e.type === "section") {
|
|
1162
|
+
let n = K(e.borderRadius);
|
|
1163
1163
|
n !== null && (i.borderRadius = n);
|
|
1164
|
-
let r =
|
|
1165
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1164
|
+
let r = Je(e);
|
|
1165
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Fi(r, t.heroBoxWidth)), Object.assign(i, Mi({
|
|
1166
1166
|
...e.backgroundImage,
|
|
1167
1167
|
size: "cover",
|
|
1168
1168
|
repeat: !1
|
|
1169
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1169
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, zi(e.border)), Object.assign(i, Mi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1170
1170
|
}
|
|
1171
1171
|
return i;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return e.type === "section" ?
|
|
1175
|
-
backgroundImageUrl:
|
|
1173
|
+
function Ri(e, t, n, r) {
|
|
1174
|
+
return e.type === "section" ? Li(e, {
|
|
1175
|
+
backgroundImageUrl: rt(t, e.backgroundImage, n),
|
|
1176
1176
|
heroBoxWidth: r
|
|
1177
|
-
}) :
|
|
1177
|
+
}) : Li(e);
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function zi(e) {
|
|
1180
1180
|
let t = {};
|
|
1181
|
-
for (let [n, r] of Object.entries(
|
|
1181
|
+
for (let [n, r] of Object.entries(de(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1182
1182
|
return t;
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1184
|
+
var Bi = {
|
|
1185
|
+
width: "100cqw",
|
|
1186
|
+
maxWidth: "none",
|
|
1187
|
+
marginInline: "calc(50% - 50cqw)",
|
|
1188
|
+
boxSizing: "border-box"
|
|
1189
|
+
};
|
|
1190
|
+
function Vi(e) {
|
|
1191
|
+
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1192
|
+
}
|
|
1193
|
+
function Hi(e) {
|
|
1194
|
+
let t = {
|
|
1195
|
+
width: "var(--tpl-email-frame-width)",
|
|
1196
|
+
maxWidth: "100%",
|
|
1197
|
+
marginInline: "auto",
|
|
1198
|
+
boxSizing: "border-box"
|
|
1199
|
+
};
|
|
1200
|
+
return e && (t.padding = Vi(e)), t;
|
|
1201
|
+
}
|
|
1202
|
+
function Ui(e, t = {}) {
|
|
1185
1203
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1186
1204
|
let n = e.wrapper, r = {};
|
|
1187
|
-
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding =
|
|
1188
|
-
|
|
1189
|
-
|
|
1205
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Vi(n.padding)), !n.fullWidth) {
|
|
1206
|
+
let e = K(n.borderRadius);
|
|
1207
|
+
e !== null && (r.borderRadius = e);
|
|
1208
|
+
}
|
|
1209
|
+
return Object.assign(r, Mi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Bi), r;
|
|
1190
1210
|
}
|
|
1191
|
-
function
|
|
1211
|
+
function Wi(e, t = {}) {
|
|
1192
1212
|
if (e.type !== "wrapper") return null;
|
|
1193
1213
|
let n = {};
|
|
1194
|
-
|
|
1195
|
-
let t = e.styles.padding;
|
|
1196
|
-
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
1197
|
-
}
|
|
1198
|
-
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Oi(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
1214
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = Vi(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Mi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, Bi), n;
|
|
1199
1215
|
}
|
|
1200
1216
|
// src/utils/mergeTagLabelSegments.ts
|
|
1201
|
-
function
|
|
1217
|
+
function Gi(e, t, n, r = !1) {
|
|
1202
1218
|
if (!e) return [];
|
|
1203
|
-
let i =
|
|
1204
|
-
for (
|
|
1205
|
-
|
|
1219
|
+
let i = [], a = 0;
|
|
1220
|
+
for (let o of Ie(e, n)) {
|
|
1221
|
+
o.index > a && i.push({
|
|
1206
1222
|
type: "text",
|
|
1207
|
-
value: e.slice(
|
|
1223
|
+
value: e.slice(a, o.index)
|
|
1208
1224
|
});
|
|
1209
|
-
let
|
|
1210
|
-
if (
|
|
1211
|
-
let e = r ?
|
|
1212
|
-
|
|
1225
|
+
let s = o.value;
|
|
1226
|
+
if (ce(s, n)) {
|
|
1227
|
+
let e = r ? Be(s, t) : void 0;
|
|
1228
|
+
i.push(e === void 0 ? {
|
|
1213
1229
|
type: "tag",
|
|
1214
|
-
value:
|
|
1230
|
+
value: re(s, t)
|
|
1215
1231
|
} : {
|
|
1216
1232
|
type: "text",
|
|
1217
1233
|
value: e
|
|
1218
1234
|
});
|
|
1219
|
-
} else
|
|
1235
|
+
} else ge(s, n) ? i.push({
|
|
1220
1236
|
type: "tag",
|
|
1221
|
-
value:
|
|
1222
|
-
}) :
|
|
1237
|
+
value: J(s, n)
|
|
1238
|
+
}) : i.push({
|
|
1223
1239
|
type: "text",
|
|
1224
|
-
value:
|
|
1240
|
+
value: s
|
|
1225
1241
|
});
|
|
1226
|
-
|
|
1242
|
+
a = o.index + s.length;
|
|
1227
1243
|
}
|
|
1228
|
-
return
|
|
1244
|
+
return a < e.length && i.push({
|
|
1229
1245
|
type: "text",
|
|
1230
|
-
value: e.slice(
|
|
1231
|
-
}),
|
|
1246
|
+
value: e.slice(a)
|
|
1247
|
+
}), i;
|
|
1232
1248
|
}
|
|
1233
1249
|
// src/components/MergeTagPreviewText.vue
|
|
1234
|
-
var
|
|
1250
|
+
var Ki = n({
|
|
1235
1251
|
name: "MergeTagPreviewText",
|
|
1236
1252
|
props: { text: {
|
|
1237
1253
|
type: String,
|
|
1238
1254
|
required: !0
|
|
1239
1255
|
} },
|
|
1240
1256
|
setup(e) {
|
|
1241
|
-
let t = f(
|
|
1257
|
+
let t = f(rn, ln), n = f(Wt, te.liquid), i = f(kn, null), a = N(() => Gi(e.text, t.value, n, i?.value ?? !1));
|
|
1242
1258
|
return () => a.value.map((e, t) => e.type === "tag" ? r("span", {
|
|
1243
1259
|
key: t,
|
|
1244
1260
|
class: "tpl-merge-tag-label"
|
|
1245
1261
|
}, e.value) : e.value);
|
|
1246
1262
|
}
|
|
1247
|
-
}),
|
|
1263
|
+
}), qi = ["href"], Ji = /* @__PURE__ */ n({
|
|
1248
1264
|
__name: "ButtonBlock",
|
|
1249
1265
|
props: {
|
|
1250
1266
|
block: {},
|
|
1251
1267
|
viewport: {}
|
|
1252
1268
|
},
|
|
1253
1269
|
setup(e) {
|
|
1254
|
-
let t = e, n =
|
|
1270
|
+
let t = e, n = Fn(gn, "ButtonBlock");
|
|
1271
|
+
function r(e) {
|
|
1272
|
+
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1273
|
+
}
|
|
1274
|
+
let a = N(() => {
|
|
1255
1275
|
let e = {
|
|
1256
1276
|
display: "inline-block",
|
|
1257
1277
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
1258
1278
|
backgroundColor: t.block.backgroundColor,
|
|
1259
1279
|
color: t.block.textColor,
|
|
1260
1280
|
fontSize: `${t.block.fontSize}px`,
|
|
1261
|
-
fontWeight:
|
|
1281
|
+
fontWeight: r(t.block.fontWeight),
|
|
1262
1282
|
textDecoration: "none",
|
|
1263
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1283
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : K(t.block.borderRadius) ?? "0px",
|
|
1264
1284
|
textAlign: "center"
|
|
1265
1285
|
};
|
|
1266
|
-
return Object.assign(e,
|
|
1267
|
-
}),
|
|
1268
|
-
return (t, n) => (i(), b("div", { style: P(
|
|
1286
|
+
return Object.assign(e, zi(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1287
|
+
}), o = N(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1288
|
+
return (t, n) => (i(), b("div", { style: P(o.value) }, [A("a", {
|
|
1269
1289
|
href: e.block.url || "#",
|
|
1270
|
-
style: P(
|
|
1290
|
+
style: P(a.value),
|
|
1271
1291
|
class: "tpl:cursor-default",
|
|
1272
1292
|
onClick: n[0] ||= k(() => {}, ["prevent"])
|
|
1273
|
-
}, [V(
|
|
1293
|
+
}, [V(Ki, { text: e.block.text }, null, 8, ["text"])], 12, qi)], 4));
|
|
1274
1294
|
}
|
|
1275
|
-
}),
|
|
1295
|
+
}), Yi = ["innerHTML"], Xi = [
|
|
1276
1296
|
"src",
|
|
1277
1297
|
"width",
|
|
1278
1298
|
"height"
|
|
1279
|
-
],
|
|
1299
|
+
], Zi = /* @__PURE__ */ n({
|
|
1280
1300
|
__name: "CustomBlockIcon",
|
|
1281
1301
|
props: {
|
|
1282
1302
|
icon: {},
|
|
1283
1303
|
size: {}
|
|
1284
1304
|
},
|
|
1285
1305
|
setup(e) {
|
|
1286
|
-
let t = e, n = N(() => t.size ?? 20), r = N(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = N(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), o = N(() => r.value ?
|
|
1306
|
+
let t = e, n = N(() => t.size ?? 20), r = N(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), a = N(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), o = N(() => r.value ? mr(t.icon ?? "") : "");
|
|
1287
1307
|
return (t, s) => r.value ? (i(), b("span", {
|
|
1288
1308
|
key: 0,
|
|
1289
1309
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1292,33 +1312,33 @@ var zi = n({
|
|
|
1292
1312
|
height: `${n.value}px`
|
|
1293
1313
|
}),
|
|
1294
1314
|
innerHTML: o.value
|
|
1295
|
-
}, null, 12,
|
|
1315
|
+
}, null, 12, Yi)) : a.value ? (i(), b("img", {
|
|
1296
1316
|
key: 1,
|
|
1297
1317
|
src: e.icon,
|
|
1298
1318
|
width: n.value,
|
|
1299
1319
|
height: n.value,
|
|
1300
1320
|
class: "tpl:inline-block",
|
|
1301
1321
|
alt: ""
|
|
1302
|
-
}, null, 8,
|
|
1322
|
+
}, null, 8, Xi)) : (i(), D(C(kt), {
|
|
1303
1323
|
key: 2,
|
|
1304
1324
|
size: n.value,
|
|
1305
1325
|
"stroke-width": 1.5
|
|
1306
1326
|
}, null, 8, ["size"]));
|
|
1307
1327
|
}
|
|
1308
|
-
}),
|
|
1328
|
+
}), Qi = { class: "tpl:w-full" }, $i = {
|
|
1309
1329
|
key: 0,
|
|
1310
1330
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
1311
|
-
},
|
|
1331
|
+
}, ea = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ta = {
|
|
1312
1332
|
key: 1,
|
|
1313
1333
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
1314
|
-
},
|
|
1334
|
+
}, na = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ra = {
|
|
1315
1335
|
key: 2,
|
|
1316
1336
|
class: "tpl:relative"
|
|
1317
|
-
},
|
|
1337
|
+
}, ia = ["innerHTML"], aa = {
|
|
1318
1338
|
key: 0,
|
|
1319
1339
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1320
1340
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1321
|
-
},
|
|
1341
|
+
}, oa = /* @__PURE__ */ n({
|
|
1322
1342
|
__name: "CustomBlock",
|
|
1323
1343
|
props: {
|
|
1324
1344
|
block: {},
|
|
@@ -1326,7 +1346,7 @@ var zi = n({
|
|
|
1326
1346
|
},
|
|
1327
1347
|
emits: ["fetchData"],
|
|
1328
1348
|
setup(e, { emit: t }) {
|
|
1329
|
-
let n = e, r = t, { t: a } = Q(), s = f(
|
|
1349
|
+
let n = e, r = t, { t: a } = Q(), s = f(En, null), c = z(""), l = N(() => hr(c.value)), u = z(!1), p = N(() => s?.getDefinition(n.block.customType)), m = N(() => !!p.value), h = N(() => n.block), { isFetching: g, fetch: _, needsFetch: v, hasDataSource: y } = it({
|
|
1330
1350
|
definition: p,
|
|
1331
1351
|
block: h,
|
|
1332
1352
|
onUpdate: (e, t) => {
|
|
@@ -1335,10 +1355,10 @@ var zi = n({
|
|
|
1335
1355
|
dataSourceFetched: t
|
|
1336
1356
|
});
|
|
1337
1357
|
}
|
|
1338
|
-
}), S = f(
|
|
1358
|
+
}), S = f(rn, ln), w = f(kn, null), T = N(() => {
|
|
1339
1359
|
if (!w?.value) return n.block;
|
|
1340
1360
|
let e = {};
|
|
1341
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1361
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ye(r, S.value) : r;
|
|
1342
1362
|
return {
|
|
1343
1363
|
...n.block,
|
|
1344
1364
|
fieldValues: e
|
|
@@ -1355,17 +1375,17 @@ var zi = n({
|
|
|
1355
1375
|
}
|
|
1356
1376
|
}
|
|
1357
1377
|
}
|
|
1358
|
-
let M =
|
|
1378
|
+
let M = Xn(O, 150);
|
|
1359
1379
|
return d(() => {
|
|
1360
1380
|
O();
|
|
1361
1381
|
}), o(() => n.block.fieldValues, () => {
|
|
1362
1382
|
M();
|
|
1363
1383
|
}, { deep: !0 }), o(() => w?.value, () => {
|
|
1364
1384
|
M();
|
|
1365
|
-
}), (e, t) => (i(), b("div",
|
|
1385
|
+
}), (e, t) => (i(), b("div", Qi, [m.value ? u.value ? (i(), b("div", ta, [V(C(Pt), {
|
|
1366
1386
|
size: 24,
|
|
1367
1387
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1368
|
-
}), A("span",
|
|
1388
|
+
}), A("span", na, j(C(a).customBlocks.renderError), 1)])) : (i(), b("div", ra, [A("div", { innerHTML: l.value }, null, 8, ia), C(y) && C(v) ? (i(), b("div", aa, [C(g) ? (i(), D(gr, {
|
|
1369
1389
|
key: 1,
|
|
1370
1390
|
class: "tpl:w-48"
|
|
1371
1391
|
})) : (i(), b("button", {
|
|
@@ -1373,16 +1393,16 @@ var zi = n({
|
|
|
1373
1393
|
type: "button",
|
|
1374
1394
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1375
1395
|
onClick: t[0] ||= k((...e) => C(_) && C(_)(...e), ["stop"])
|
|
1376
|
-
}, [p.value?.icon ? (i(), D(
|
|
1396
|
+
}, [p.value?.icon ? (i(), D(Zi, {
|
|
1377
1397
|
key: 0,
|
|
1378
1398
|
icon: p.value.icon,
|
|
1379
1399
|
size: 16
|
|
1380
|
-
}, null, 8, ["icon"])) : E("", !0), x(" " + j(p.value?.dataSource?.label || C(a).customBlocks.dataSource.fetchButton), 1)]))])) : E("", !0)])) : (i(), b("div",
|
|
1400
|
+
}, null, 8, ["icon"])) : E("", !0), x(" " + j(p.value?.dataSource?.label || C(a).customBlocks.dataSource.fetchButton), 1)]))])) : E("", !0)])) : (i(), b("div", $i, [V(C(At), {
|
|
1381
1401
|
size: 24,
|
|
1382
1402
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1383
|
-
}), A("span",
|
|
1403
|
+
}), A("span", ea, j(C(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1384
1404
|
}
|
|
1385
|
-
}),
|
|
1405
|
+
}), sa = { class: "tpl:w-full" }, ca = /* @__PURE__ */ n({
|
|
1386
1406
|
__name: "DividerBlock",
|
|
1387
1407
|
props: {
|
|
1388
1408
|
block: {},
|
|
@@ -1394,28 +1414,28 @@ var zi = n({
|
|
|
1394
1414
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1395
1415
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1396
1416
|
}));
|
|
1397
|
-
return (e, t) => (i(), b("div",
|
|
1417
|
+
return (e, t) => (i(), b("div", sa, [A("hr", {
|
|
1398
1418
|
class: "tpl:m-0 tpl:border-none",
|
|
1399
1419
|
style: P(n.value)
|
|
1400
1420
|
}, null, 4)]));
|
|
1401
1421
|
}
|
|
1402
|
-
}),
|
|
1422
|
+
}), la = { class: "tpl:w-full" }, ua = ["srcdoc", "title"], da = {
|
|
1403
1423
|
key: 1,
|
|
1404
1424
|
class: "tpl:flex tpl:box-border tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
1405
|
-
},
|
|
1425
|
+
}, fa = {
|
|
1406
1426
|
key: 0,
|
|
1407
1427
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1408
|
-
},
|
|
1428
|
+
}, pa = {
|
|
1409
1429
|
key: 1,
|
|
1410
1430
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1411
|
-
},
|
|
1431
|
+
}, ma = /* @__PURE__ */ n({
|
|
1412
1432
|
__name: "HtmlBlock",
|
|
1413
1433
|
props: {
|
|
1414
1434
|
block: {},
|
|
1415
1435
|
viewport: {}
|
|
1416
1436
|
},
|
|
1417
1437
|
setup(e) {
|
|
1418
|
-
let t = e, { t: n } = Q(), r = f(
|
|
1438
|
+
let t = e, { t: n } = Q(), r = f(on, !1), a = N(() => t.block.content.trim().length > 0), s = N(() => r && a.value), c = f(rn, ln), l = f(kn, null), d = N(() => l?.value ? ye(t.block.content, c.value) : t.block.content), p = z(null), m = z(60), h = null;
|
|
1419
1439
|
function g() {
|
|
1420
1440
|
let e = p.value?.contentDocument;
|
|
1421
1441
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1429,7 +1449,7 @@ var zi = n({
|
|
|
1429
1449
|
e || (h?.disconnect(), h = null);
|
|
1430
1450
|
}), u(() => {
|
|
1431
1451
|
h?.disconnect(), h = null;
|
|
1432
|
-
}), (e, t) => (i(), b("div",
|
|
1452
|
+
}), (e, t) => (i(), b("div", la, [s.value ? (i(), b("iframe", {
|
|
1433
1453
|
key: 0,
|
|
1434
1454
|
ref_key: "iframeRef",
|
|
1435
1455
|
ref: p,
|
|
@@ -1439,18 +1459,18 @@ var zi = n({
|
|
|
1439
1459
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1440
1460
|
style: P({ height: `${m.value}px` }),
|
|
1441
1461
|
onLoad: _
|
|
1442
|
-
}, null, 44,
|
|
1462
|
+
}, null, 44, ua)) : (i(), b("div", da, [V(C(Tt), {
|
|
1443
1463
|
size: 24,
|
|
1444
1464
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1445
|
-
}), a.value ? (i(), b("span",
|
|
1465
|
+
}), a.value ? (i(), b("span", fa, j(C(n).html.preview), 1)) : (i(), b("span", pa, j(C(n).html.empty), 1))]))]));
|
|
1446
1466
|
}
|
|
1447
|
-
}),
|
|
1467
|
+
}), ha = ["data-drop-enabled"], ga = ["href"], _a = ["src", "alt"], va = ["src", "alt"], ya = {
|
|
1448
1468
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1449
1469
|
style: { opacity: "0.7" }
|
|
1450
|
-
},
|
|
1470
|
+
}, ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
1451
1471
|
key: 4,
|
|
1452
1472
|
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1453
|
-
},
|
|
1473
|
+
}, wa = ["aria-label"], Ta = { key: 1 }, Ea = /* @__PURE__ */ n({
|
|
1454
1474
|
__name: "ImageBlock",
|
|
1455
1475
|
props: {
|
|
1456
1476
|
block: {},
|
|
@@ -1458,20 +1478,20 @@ var zi = n({
|
|
|
1458
1478
|
},
|
|
1459
1479
|
emits: ["update"],
|
|
1460
1480
|
setup(e, { emit: t }) {
|
|
1461
|
-
let n = e, r = t, { t: a } = Q(), { syntax: o } =
|
|
1481
|
+
let n = e, r = t, { t: a } = Q(), { syntax: o } = ir(), s = N(() => pe(n.block.src, o));
|
|
1462
1482
|
function c(e) {
|
|
1463
1483
|
let t = {
|
|
1464
1484
|
src: e.url,
|
|
1465
|
-
...
|
|
1485
|
+
...ft(lt(e.width, e.height))
|
|
1466
1486
|
};
|
|
1467
1487
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1468
1488
|
}
|
|
1469
|
-
let l = z(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } =
|
|
1489
|
+
let l = z(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = gt({
|
|
1470
1490
|
target: l,
|
|
1471
1491
|
blocked: s,
|
|
1472
1492
|
apply: c
|
|
1473
1493
|
}), h = N(() => ({ textAlign: n.block.align })), g = N(() => {
|
|
1474
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1494
|
+
let e = n.block.border, t = ["left", "right"].map((t) => $e(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1475
1495
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1476
1496
|
}), _ = N(() => {
|
|
1477
1497
|
let e = n.block.align;
|
|
@@ -1479,13 +1499,13 @@ var zi = n({
|
|
|
1479
1499
|
maxWidth: "100%",
|
|
1480
1500
|
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1481
1501
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1482
|
-
borderRadius:
|
|
1483
|
-
...
|
|
1502
|
+
borderRadius: K(n.block.borderRadius) ?? void 0,
|
|
1503
|
+
...zi(n.block.border),
|
|
1484
1504
|
display: "block",
|
|
1485
1505
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1486
1506
|
marginRight: e === "center" ? "auto" : void 0
|
|
1487
1507
|
};
|
|
1488
|
-
}), v =
|
|
1508
|
+
}), v = ct(() => s.value ? void 0 : n.block.src), y = ct(() => s.value ? n.block.placeholderUrl : void 0);
|
|
1489
1509
|
return (t, n) => (i(), b("div", {
|
|
1490
1510
|
ref_key: "dropZoneRef",
|
|
1491
1511
|
ref: l,
|
|
@@ -1493,7 +1513,7 @@ var zi = n({
|
|
|
1493
1513
|
"data-drop-enabled": C(d),
|
|
1494
1514
|
class: "tpl:relative tpl:w-full",
|
|
1495
1515
|
style: P(h.value)
|
|
1496
|
-
}, [C(p) ? (i(), D(
|
|
1516
|
+
}, [C(p) ? (i(), D(dt, {
|
|
1497
1517
|
key: 0,
|
|
1498
1518
|
uploading: C(f),
|
|
1499
1519
|
size: "canvas"
|
|
@@ -1509,22 +1529,22 @@ var zi = n({
|
|
|
1509
1529
|
src: C(y),
|
|
1510
1530
|
alt: e.block.alt || C(a).image.altTextPlaceholder,
|
|
1511
1531
|
style: P(_.value)
|
|
1512
|
-
}, null, 12,
|
|
1532
|
+
}, null, 12, _a)], 8, ga)) : (i(), b("img", {
|
|
1513
1533
|
key: 1,
|
|
1514
1534
|
class: "tpl:border-0",
|
|
1515
1535
|
src: C(y),
|
|
1516
1536
|
alt: e.block.alt,
|
|
1517
1537
|
style: P(_.value)
|
|
1518
|
-
}, null, 12,
|
|
1538
|
+
}, null, 12, va))], 64)) : e.block.src && s.value ? (i(), b("div", {
|
|
1519
1539
|
key: 2,
|
|
1520
1540
|
class: "tpl:!flex tpl:box-border tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
1521
1541
|
style: P([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1522
|
-
}, [V(C(
|
|
1542
|
+
}, [V(C(Nt), {
|
|
1523
1543
|
size: 32,
|
|
1524
1544
|
"stroke-width": 1.5,
|
|
1525
1545
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1526
1546
|
style: { opacity: "0.5" }
|
|
1527
|
-
}), A("span",
|
|
1547
|
+
}), A("span", ya, [V(Ki, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (i(), b(B, { key: 3 }, [e.block.linkUrl ? (i(), b("a", {
|
|
1528
1548
|
key: 0,
|
|
1529
1549
|
href: e.block.linkUrl,
|
|
1530
1550
|
target: "_blank",
|
|
@@ -1536,33 +1556,33 @@ var zi = n({
|
|
|
1536
1556
|
src: C(v),
|
|
1537
1557
|
alt: e.block.alt || C(a).image.altTextPlaceholder,
|
|
1538
1558
|
style: P(_.value)
|
|
1539
|
-
}, null, 12,
|
|
1559
|
+
}, null, 12, xa)], 8, ba)) : (i(), b("img", {
|
|
1540
1560
|
key: 1,
|
|
1541
1561
|
class: "tpl:border-0",
|
|
1542
1562
|
src: C(v),
|
|
1543
1563
|
alt: e.block.alt,
|
|
1544
1564
|
style: P(_.value)
|
|
1545
|
-
}, null, 12,
|
|
1565
|
+
}, null, 12, Sa))], 64)) : (i(), b("div", Ca, [C(u) ? (i(), b("button", {
|
|
1546
1566
|
key: 0,
|
|
1547
1567
|
"aria-label": C(a).image.browseMedia,
|
|
1548
1568
|
class: "tpl:flex tpl:items-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:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1549
1569
|
onClick: n[2] ||= k((...e) => C(m) && C(m)(...e), ["stop"])
|
|
1550
|
-
}, [V(C(
|
|
1570
|
+
}, [V(C(Nt), {
|
|
1551
1571
|
size: 14,
|
|
1552
1572
|
"stroke-width": 1.5
|
|
1553
|
-
}), x(" " + j(C(a).image.browseMedia), 1)], 8,
|
|
1573
|
+
}), x(" " + j(C(a).image.browseMedia), 1)], 8, wa)) : (i(), b("span", Ta, j(C(a).image.clickToAdd), 1))]))], 12, ha));
|
|
1554
1574
|
}
|
|
1555
|
-
}),
|
|
1575
|
+
}), Da = { class: "tpl:w-full" }, Oa = ["href"], ka = {
|
|
1556
1576
|
key: 1,
|
|
1557
1577
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1558
|
-
},
|
|
1578
|
+
}, Aa = /* @__PURE__ */ n({
|
|
1559
1579
|
__name: "MenuBlock",
|
|
1560
1580
|
props: {
|
|
1561
1581
|
block: {},
|
|
1562
1582
|
viewport: {}
|
|
1563
1583
|
},
|
|
1564
1584
|
setup(e) {
|
|
1565
|
-
let t = e, { t: n } = Q(), r =
|
|
1585
|
+
let t = e, { t: n } = Q(), r = Fn(gn, "MenuBlock"), a = N(() => ({
|
|
1566
1586
|
display: "flex",
|
|
1567
1587
|
flexWrap: "wrap",
|
|
1568
1588
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1574,7 +1594,7 @@ var zi = n({
|
|
|
1574
1594
|
function s(e) {
|
|
1575
1595
|
return e || t.block.linkColor || t.block.color;
|
|
1576
1596
|
}
|
|
1577
|
-
return (t, r) => (i(), b("div",
|
|
1597
|
+
return (t, r) => (i(), b("div", Da, [o.value ? (i(), b("div", {
|
|
1578
1598
|
key: 0,
|
|
1579
1599
|
style: P(a.value)
|
|
1580
1600
|
}, [(i(!0), b(B, null, l(e.block.items, (t, n) => (i(), b(B, { key: t.id }, [A("a", {
|
|
@@ -1586,18 +1606,18 @@ var zi = n({
|
|
|
1586
1606
|
textDecoration: t.underline ? "underline" : "none"
|
|
1587
1607
|
}),
|
|
1588
1608
|
onClick: r[0] ||= k(() => {}, ["prevent"])
|
|
1589
|
-
}, [V(
|
|
1609
|
+
}, [V(Ki, { text: t.text || "..." }, null, 8, ["text"])], 12, Oa), n < e.block.items.length - 1 ? (i(), b("span", {
|
|
1590
1610
|
key: 0,
|
|
1591
1611
|
style: P({
|
|
1592
1612
|
color: e.block.separatorColor,
|
|
1593
1613
|
padding: `0 ${e.block.spacing}px`
|
|
1594
1614
|
})
|
|
1595
|
-
}, j(e.block.separator), 5)) : E("", !0)], 64))), 128))], 4)) : (i(), b("div",
|
|
1615
|
+
}, j(e.block.separator), 5)) : E("", !0)], 64))), 128))], 4)) : (i(), b("div", ka, [V(C(Mt), { size: 16 }), A("span", null, j(C(n).menu.addLinks), 1)]))]));
|
|
1596
1616
|
}
|
|
1597
1617
|
});
|
|
1598
1618
|
// src/composables/useEditableTextBlock.ts
|
|
1599
|
-
function
|
|
1600
|
-
let t = f(
|
|
1619
|
+
function ja(e) {
|
|
1620
|
+
let t = f(rn, ln), n = f(kn, null), { syntax: r } = ir(), i = N(() => n?.value ? Ae(e(), t.value) : Ee(e(), t.value)), a = N(() => ve(hr(H(i.value, r)))), o = z(!1), s = z(null), { top: c, left: l } = tr(s), { toLocal: u } = ur(), d = N(() => u({
|
|
1601
1621
|
top: c.value - 8,
|
|
1602
1622
|
left: l.value
|
|
1603
1623
|
}));
|
|
@@ -1617,14 +1637,14 @@ function wa(e) {
|
|
|
1617
1637
|
};
|
|
1618
1638
|
}
|
|
1619
1639
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1620
|
-
var
|
|
1640
|
+
var Ma = ["innerHTML"], Na = /* @__PURE__ */ n({
|
|
1621
1641
|
__name: "ParagraphBlock",
|
|
1622
1642
|
props: {
|
|
1623
1643
|
block: {},
|
|
1624
1644
|
viewport: {}
|
|
1625
1645
|
},
|
|
1626
1646
|
setup(e) {
|
|
1627
|
-
let t = e, n = g(() => import("./ParagraphEditor-
|
|
1647
|
+
let t = e, n = g(() => import("./ParagraphEditor-I9lbKaPk.js").then((e) => e.t)), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = ja(() => t.block.content);
|
|
1628
1648
|
return (t, u) => (i(), b("div", {
|
|
1629
1649
|
ref_key: "blockRef",
|
|
1630
1650
|
ref: a,
|
|
@@ -1643,11 +1663,11 @@ var Ta = ["innerHTML"], Ea = /* @__PURE__ */ n({
|
|
|
1643
1663
|
key: 1,
|
|
1644
1664
|
class: "tpl-text-content tpl:outline-none",
|
|
1645
1665
|
innerHTML: C(s)
|
|
1646
|
-
}, null, 8,
|
|
1666
|
+
}, null, 8, Ma))], 544));
|
|
1647
1667
|
}
|
|
1648
1668
|
});
|
|
1649
1669
|
// src/utils/updateBlockList.ts
|
|
1650
|
-
function
|
|
1670
|
+
function Pa(e, t, n, r = 0, i) {
|
|
1651
1671
|
let a = n ? e.content.value.blocks.find((e) => e.id === n) : void 0, o = n ? a?.type === "section" ? a.children[r] ?? [] : [] : e.content.value.blocks, s = t.map((e) => e.id);
|
|
1652
1672
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1653
1673
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1660,67 +1680,79 @@ function Da(e, t, n, r = 0, i) {
|
|
|
1660
1680
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1661
1681
|
}
|
|
1662
1682
|
// src/utils/mergeTagTokens.ts
|
|
1663
|
-
function
|
|
1683
|
+
function Fa(e, t, n) {
|
|
1664
1684
|
let r = [], i = "\0MT";
|
|
1665
1685
|
for (; e.includes(i);) i += "_";
|
|
1666
|
-
let a = n === "html" ?
|
|
1686
|
+
let a = n === "html" ? We(e, (e) => {
|
|
1667
1687
|
let t = r.push(e) - 1;
|
|
1668
1688
|
return `${i}${t}\u0000`;
|
|
1669
1689
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1670
1690
|
start: e.index,
|
|
1671
1691
|
end: e.index + e[0].length
|
|
1672
|
-
})), s = [];
|
|
1673
|
-
for (let e of [
|
|
1674
|
-
let
|
|
1675
|
-
for (let
|
|
1676
|
-
let t =
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1692
|
+
})), s = [], c = He(a, t, "logic"), l = [], u = 0;
|
|
1693
|
+
for (let e of ["logic", "value"]) {
|
|
1694
|
+
let r = 0;
|
|
1695
|
+
for (let i of e === "logic" ? c : He(a, t, "value")) {
|
|
1696
|
+
let t = i.index, a = t + i.value.length;
|
|
1697
|
+
for (; o[r]?.end <= t;) r++;
|
|
1698
|
+
let c = o[r];
|
|
1699
|
+
if (!(c && t < c.end && a > c.start)) {
|
|
1700
|
+
if (e === "value") {
|
|
1701
|
+
for (; l[u]?.end <= t;) u++;
|
|
1702
|
+
let e = l[u];
|
|
1703
|
+
if (e && t < e.end && a > e.start) continue;
|
|
1704
|
+
}
|
|
1705
|
+
e === "logic" && l.push({
|
|
1706
|
+
start: t,
|
|
1707
|
+
end: a
|
|
1708
|
+
}), s.push({
|
|
1709
|
+
start: t,
|
|
1710
|
+
end: a,
|
|
1711
|
+
value: n === "html" ? Ce(i.value) : i.value
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1682
1714
|
}
|
|
1683
1715
|
}
|
|
1684
1716
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1685
1717
|
}
|
|
1686
|
-
function
|
|
1687
|
-
return JSON.stringify(
|
|
1718
|
+
function Ia(e, t, n, r) {
|
|
1719
|
+
return JSON.stringify(Fa(e, n, r)) !== JSON.stringify(Fa(t, n, r));
|
|
1688
1720
|
}
|
|
1689
1721
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1690
|
-
var
|
|
1722
|
+
var La = [
|
|
1691
1723
|
"data-state",
|
|
1692
1724
|
"aria-label",
|
|
1693
1725
|
"title",
|
|
1694
1726
|
"aria-expanded",
|
|
1695
1727
|
"aria-controls",
|
|
1696
1728
|
"onKeydown"
|
|
1697
|
-
],
|
|
1729
|
+
], Ra = [
|
|
1698
1730
|
"aria-label",
|
|
1699
1731
|
"aria-labelledby",
|
|
1700
1732
|
"aria-describedby",
|
|
1701
1733
|
"onKeydown"
|
|
1702
|
-
],
|
|
1734
|
+
], za = ["id"], Ba = ["id"], Va = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, Ha = ["disabled"], Ua = {
|
|
1703
1735
|
key: 0,
|
|
1704
1736
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1705
|
-
},
|
|
1737
|
+
}, Wa = {
|
|
1706
1738
|
key: 1,
|
|
1707
1739
|
class: "tpl:m-0"
|
|
1708
|
-
},
|
|
1740
|
+
}, Ga = { class: "tpl:m-0" }, Ka = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, qa = {
|
|
1709
1741
|
key: 3,
|
|
1710
1742
|
class: "tpl:m-0"
|
|
1711
|
-
},
|
|
1743
|
+
}, Ja = {
|
|
1712
1744
|
key: 4,
|
|
1713
1745
|
class: "tpl:m-0"
|
|
1714
|
-
},
|
|
1746
|
+
}, Ya = {
|
|
1715
1747
|
key: 5,
|
|
1716
1748
|
class: "tpl:m-0"
|
|
1717
|
-
},
|
|
1749
|
+
}, Xa = {
|
|
1718
1750
|
key: 6,
|
|
1719
1751
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1720
|
-
},
|
|
1752
|
+
}, Za = ["onClick"], Qa = {
|
|
1721
1753
|
key: 7,
|
|
1722
1754
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1723
|
-
},
|
|
1755
|
+
}, $a = ["data-testid", "disabled"], eo = /*#__PURE__*/ St(/* @__PURE__ */ n({
|
|
1724
1756
|
__name: "LocaleStatusChip",
|
|
1725
1757
|
props: {
|
|
1726
1758
|
blockId: {},
|
|
@@ -1740,32 +1772,32 @@ var Aa = [
|
|
|
1740
1772
|
},
|
|
1741
1773
|
emits: ["target"],
|
|
1742
1774
|
setup(e, { emit: n }) {
|
|
1743
|
-
let r = e, a = n, s = f(
|
|
1775
|
+
let r = e, a = n, s = f(Rn, null), c = f(Nn, null), u = f(Kt, null), d = f(Cn, "en") ?? "en", { t: m, format: h } = Q(), g = rr(), _ = cr(), { toLocal: v } = ur(), y = z(null), x = z(null), M = z(!1), F = z(!1), I = z(null), L = z(null), R = null, V = z({
|
|
1744
1776
|
top: 0,
|
|
1745
1777
|
left: 0
|
|
1746
1778
|
}), H = z({
|
|
1747
1779
|
maxHeight: 0,
|
|
1748
1780
|
maxWidth: 0
|
|
1749
|
-
}), U = `tpl-locale-popover-${
|
|
1750
|
-
function
|
|
1781
|
+
}), U = `tpl-locale-popover-${ne()}`, W = N(() => Gn(s?.activeLocale?.value ?? "")), G = N(() => Gn(s?.content.value.settings.locale ?? "en"));
|
|
1782
|
+
function K(e, t) {
|
|
1751
1783
|
switch (e) {
|
|
1752
1784
|
case "tags-differ": return m.localization.tagsDiffer;
|
|
1753
1785
|
case "hidden": return h(m.localization.hidden, { language: W.value });
|
|
1754
1786
|
case "changed": return h(m.localization.changed, { language: W.value });
|
|
1755
|
-
case "default-stale": return
|
|
1756
|
-
case "missing": return t === 1 ? m.localization.notTranslated :
|
|
1757
|
-
default: return t === 1 ? m.localization.outOfDate :
|
|
1787
|
+
case "default-stale": return Wn(m.localization.staleLanguages, t, d);
|
|
1788
|
+
case "missing": return t === 1 ? m.localization.notTranslated : Wn(m.localization.notTranslatedCount, t, d);
|
|
1789
|
+
default: return t === 1 ? m.localization.outOfDate : Wn(m.localization.staleCount, t, d);
|
|
1758
1790
|
}
|
|
1759
1791
|
}
|
|
1760
|
-
let
|
|
1761
|
-
function
|
|
1792
|
+
let ee = N(() => K(r.state, r.count)), q = N(() => r.popoverState ?? r.state), J = N(() => r.popoverCount ?? r.count), te = N(() => K(q.value, J.value)), re = N(() => r.state === "hidden" ? Dt : r.state === "changed" ? wt : r.state === "default-stale" ? Lt : r.state === "stale" ? Et : Pt), ie = N(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && J.value > 1), Y = N(() => r.editable && r.eligibleGaps && c?.isAvailable.value);
|
|
1793
|
+
function X(e = !1) {
|
|
1762
1794
|
M.value = !1, F.value = !1, R = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1763
1795
|
}
|
|
1764
|
-
async function X() {
|
|
1765
|
-
if (M.value) return Y();
|
|
1766
|
-
_.value && (M.value = !0, await ae());
|
|
1767
|
-
}
|
|
1768
1796
|
async function ae() {
|
|
1797
|
+
if (M.value) return X();
|
|
1798
|
+
_.value && (M.value = !0, await oe());
|
|
1799
|
+
}
|
|
1800
|
+
async function oe() {
|
|
1769
1801
|
let e = _.value;
|
|
1770
1802
|
if (!e || !M.value) return;
|
|
1771
1803
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
@@ -1785,54 +1817,54 @@ var Aa = [
|
|
|
1785
1817
|
}), await O(), M.value && (F.value ? L.value : x.value)?.focus({ preventScroll: !0 });
|
|
1786
1818
|
}
|
|
1787
1819
|
o(F, async () => {
|
|
1788
|
-
M.value && (await
|
|
1820
|
+
M.value && (await oe(), M.value && !F.value && I.value?.focus({ preventScroll: !0 }));
|
|
1789
1821
|
});
|
|
1790
|
-
function
|
|
1822
|
+
function se(e) {
|
|
1791
1823
|
let t = e.composedPath();
|
|
1792
|
-
!t.includes(y.value) && !t.includes(x.value) &&
|
|
1824
|
+
!t.includes(y.value) && !t.includes(x.value) && X();
|
|
1793
1825
|
}
|
|
1794
|
-
function
|
|
1826
|
+
function ce(e) {
|
|
1795
1827
|
if (e.composedPath().includes(x.value)) return;
|
|
1796
1828
|
let t = y.value?.getBoundingClientRect();
|
|
1797
|
-
t && R && t.top === R.top && t.right === R.right ||
|
|
1829
|
+
t && R && t.top === R.top && t.right === R.right || X();
|
|
1798
1830
|
}
|
|
1799
|
-
function
|
|
1800
|
-
g.removeEventListener("click",
|
|
1831
|
+
function Z() {
|
|
1832
|
+
g.removeEventListener("click", se, !0), g.removeEventListener("scroll", ce, !0);
|
|
1801
1833
|
}
|
|
1802
1834
|
o(M, (e) => {
|
|
1803
|
-
|
|
1804
|
-
}, { flush: "sync" }), o(
|
|
1805
|
-
F.value = !1, M.value &&
|
|
1835
|
+
Z(), e ? (g.addEventListener("click", se, !0), g.addEventListener("scroll", ce, !0)) : a("target", null);
|
|
1836
|
+
}, { flush: "sync" }), o(q, () => {
|
|
1837
|
+
F.value = !1, M.value && oe();
|
|
1806
1838
|
}), o([
|
|
1807
1839
|
() => r.blockId,
|
|
1808
1840
|
() => r.state,
|
|
1809
1841
|
() => s?.activeLocale?.value,
|
|
1810
1842
|
() => s?.state.template?.id,
|
|
1811
1843
|
() => s?.loadVersion?.value
|
|
1812
|
-
], () =>
|
|
1813
|
-
let
|
|
1814
|
-
(M.value || _.value) && (a("target", e ?? null), M.value ||
|
|
1844
|
+
], () => X()), p(Z);
|
|
1845
|
+
let le = (e) => {
|
|
1846
|
+
(M.value || _.value) && (a("target", e ?? null), M.value || ae());
|
|
1815
1847
|
};
|
|
1816
1848
|
o(() => r.blockId, (e, t) => {
|
|
1817
|
-
t && u?.get(t) ===
|
|
1849
|
+
t && u?.get(t) === le && u.delete(t), u?.set(e, le);
|
|
1818
1850
|
}, { immediate: !0 }), p(() => {
|
|
1819
|
-
u?.get(r.blockId) ===
|
|
1851
|
+
u?.get(r.blockId) === le && u.delete(r.blockId);
|
|
1820
1852
|
});
|
|
1821
|
-
function
|
|
1822
|
-
s?.keepTranslations?.(r.blockId, r.stale),
|
|
1853
|
+
function ue() {
|
|
1854
|
+
s?.keepTranslations?.(r.blockId, r.stale), X(!0);
|
|
1823
1855
|
}
|
|
1824
|
-
function
|
|
1825
|
-
s?.resetLocaleFields?.(r.blockId, e),
|
|
1856
|
+
function de(e) {
|
|
1857
|
+
s?.resetLocaleFields?.(r.blockId, e), X(!0);
|
|
1826
1858
|
}
|
|
1827
|
-
function
|
|
1828
|
-
s?.setBlockHidden?.(r.blockId, !1),
|
|
1859
|
+
function fe() {
|
|
1860
|
+
s?.setBlockHidden?.(r.blockId, !1), X(!0);
|
|
1829
1861
|
}
|
|
1830
1862
|
function pe(e) {
|
|
1831
|
-
s?.setActiveLocale?.(e),
|
|
1863
|
+
s?.setActiveLocale?.(e), X();
|
|
1832
1864
|
}
|
|
1833
1865
|
function me() {
|
|
1834
|
-
|
|
1835
|
-
only:
|
|
1866
|
+
Y.value && !c?.running.value && (q.value === "tags-differ" && r.replacesCurrent ? F.value = !0 : c?.translate({
|
|
1867
|
+
only: q.value === "tags-differ" ? "all" : "gaps",
|
|
1836
1868
|
blockId: r.blockId
|
|
1837
1869
|
}));
|
|
1838
1870
|
}
|
|
@@ -1840,10 +1872,10 @@ var Aa = [
|
|
|
1840
1872
|
F.value = !1;
|
|
1841
1873
|
}
|
|
1842
1874
|
function ge() {
|
|
1843
|
-
F.value ? he() :
|
|
1875
|
+
F.value ? he() : X(!0);
|
|
1844
1876
|
}
|
|
1845
1877
|
function _e() {
|
|
1846
|
-
|
|
1878
|
+
Y.value && !c?.running.value && r.translationCount && (F.value = !1, c?.translate({
|
|
1847
1879
|
only: "all",
|
|
1848
1880
|
blockId: r.blockId
|
|
1849
1881
|
}));
|
|
@@ -1854,19 +1886,19 @@ var Aa = [
|
|
|
1854
1886
|
type: "button",
|
|
1855
1887
|
"data-testid": "locale-chip",
|
|
1856
1888
|
"data-state": e.state,
|
|
1857
|
-
"aria-label":
|
|
1858
|
-
title:
|
|
1889
|
+
"aria-label": ee.value,
|
|
1890
|
+
title: ee.value,
|
|
1859
1891
|
"aria-expanded": M.value,
|
|
1860
1892
|
"aria-controls": M.value ? U : void 0,
|
|
1861
1893
|
"aria-haspopup": "dialog",
|
|
1862
1894
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
1863
|
-
onClick: k(
|
|
1864
|
-
onKeydown: [S(k(
|
|
1895
|
+
onClick: k(ae, ["stop"]),
|
|
1896
|
+
onKeydown: [S(k(ae, ["stop", "prevent"]), ["enter"]), S(k(ge, ["stop", "prevent"]), ["esc"])]
|
|
1865
1897
|
}, [(i(), D(t(re.value), {
|
|
1866
1898
|
size: 12,
|
|
1867
1899
|
"stroke-width": 2,
|
|
1868
1900
|
"aria-hidden": "true"
|
|
1869
|
-
}))], 40,
|
|
1901
|
+
}))], 40, La), C(_) && M.value ? (i(), D(T, {
|
|
1870
1902
|
key: 0,
|
|
1871
1903
|
to: C(_)
|
|
1872
1904
|
}, [A("div", {
|
|
@@ -1874,7 +1906,7 @@ var Aa = [
|
|
|
1874
1906
|
ref_key: "popover",
|
|
1875
1907
|
ref: x,
|
|
1876
1908
|
role: "dialog",
|
|
1877
|
-
"aria-label": F.value ? void 0 :
|
|
1909
|
+
"aria-label": F.value ? void 0 : te.value,
|
|
1878
1910
|
"aria-labelledby": F.value ? `${U}-question` : void 0,
|
|
1879
1911
|
"aria-describedby": F.value ? `${U}-warning` : void 0,
|
|
1880
1912
|
tabindex: "-1",
|
|
@@ -1892,80 +1924,80 @@ var Aa = [
|
|
|
1892
1924
|
A("h3", {
|
|
1893
1925
|
id: `${U}-question`,
|
|
1894
1926
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1895
|
-
}, j(C(
|
|
1927
|
+
}, j(C(Wn)(C(m).localization.translationConfirmation, e.translationCount ?? 0, C(d))), 9, za),
|
|
1896
1928
|
A("p", {
|
|
1897
1929
|
id: `${U}-warning`,
|
|
1898
1930
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1899
|
-
}, j(C(h)(C(m).localization.translationDescription, { language: W.value })), 9,
|
|
1900
|
-
A("div",
|
|
1931
|
+
}, j(C(h)(C(m).localization.translationDescription, { language: W.value })), 9, Ba),
|
|
1932
|
+
A("div", Va, [A("button", {
|
|
1901
1933
|
ref_key: "confirmationCancel",
|
|
1902
1934
|
ref: L,
|
|
1903
1935
|
type: "button",
|
|
1904
1936
|
"data-testid": "translation-confirm-cancel",
|
|
1905
|
-
class: w(C(
|
|
1937
|
+
class: w(C(qn)),
|
|
1906
1938
|
onClick: he
|
|
1907
1939
|
}, j(C(m).localization.cancel), 3), A("button", {
|
|
1908
1940
|
type: "button",
|
|
1909
1941
|
"data-testid": "translation-confirm",
|
|
1910
|
-
class: w(C(
|
|
1911
|
-
disabled: !
|
|
1942
|
+
class: w(C(Jn)),
|
|
1943
|
+
disabled: !Y.value || !!C(c)?.running.value || !e.translationCount,
|
|
1912
1944
|
onClick: _e
|
|
1913
|
-
}, j(C(
|
|
1945
|
+
}, j(C(Wn)(C(m).localization.translateAllFields, e.translationCount ?? 0, C(d))), 11, Ha)])
|
|
1914
1946
|
], 64)) : (i(), b(B, { key: 1 }, [
|
|
1915
|
-
ie.value ? (i(), b("p",
|
|
1916
|
-
|
|
1947
|
+
ie.value ? (i(), b("p", Ua, j(te.value), 1)) : E("", !0),
|
|
1948
|
+
q.value === "missing" ? (i(), b("p", Wa, j(C(h)(C(m).localization.missingExplanation, { default: G.value })), 1)) : q.value === "stale" ? (i(), b(B, { key: 2 }, [A("p", Ga, j(C(h)(C(m).localization.staleExplanation, { default: G.value })), 1), A("p", Ka, j(C(h)(C(m).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (i(), b("p", qa, j(C(h)(C(m).localization.tagsDifferExplanation, { default: G.value })), 1)) : q.value === "changed" ? (i(), b("p", Ja, j(C(Wn)(C(m).localization.changedProperties, J.value, C(d), { default: G.value })), 1)) : q.value === "hidden" ? (i(), b("p", Ya, j(C(h)(C(m).localization.hiddenExplanation, { language: W.value })), 1)) : (i(), b("ul", Xa, [(i(!0), b(B, null, l(e.staleLocales, (e) => (i(), b("li", {
|
|
1917
1949
|
key: e,
|
|
1918
1950
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1919
|
-
}, [A("span", null, j(C(
|
|
1951
|
+
}, [A("span", null, j(C(Gn)(e)), 1), A("button", {
|
|
1920
1952
|
type: "button",
|
|
1921
|
-
class: w(C(
|
|
1953
|
+
class: w(C(Kn)),
|
|
1922
1954
|
onClick: (t) => pe(e)
|
|
1923
|
-
}, j(C(m).localization.open), 11,
|
|
1924
|
-
e.editable &&
|
|
1925
|
-
|
|
1955
|
+
}, j(C(m).localization.open), 11, Za)]))), 128))])),
|
|
1956
|
+
e.editable && q.value !== "default-stale" ? (i(), b("div", Qa, [
|
|
1957
|
+
Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (i(), b("button", {
|
|
1926
1958
|
key: 0,
|
|
1927
1959
|
type: "button",
|
|
1928
1960
|
ref_key: "retranslate",
|
|
1929
1961
|
ref: I,
|
|
1930
|
-
"data-testid":
|
|
1931
|
-
class: w(C(
|
|
1962
|
+
"data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1963
|
+
class: w(C(qn)),
|
|
1932
1964
|
disabled: !!C(c)?.running.value,
|
|
1933
1965
|
onClick: me
|
|
1934
|
-
}, j(
|
|
1935
|
-
|
|
1966
|
+
}, j(q.value === "missing" ? C(m).localization.translate : C(m).localization.retranslate), 11, $a)) : E("", !0),
|
|
1967
|
+
q.value === "stale" || q.value === "tags-differ" ? (i(), b(B, { key: 1 }, [q.value === "stale" ? (i(), b("button", {
|
|
1936
1968
|
key: 0,
|
|
1937
1969
|
type: "button",
|
|
1938
1970
|
"data-testid": "locale-keep",
|
|
1939
|
-
class: w(C(
|
|
1940
|
-
onClick:
|
|
1971
|
+
class: w(C(Y.value ? Kn : qn)),
|
|
1972
|
+
onClick: ue
|
|
1941
1973
|
}, j(C(m).localization.keep), 3)) : E("", !0), A("button", {
|
|
1942
1974
|
type: "button",
|
|
1943
1975
|
"data-testid": "locale-use-default",
|
|
1944
|
-
class: w(C(
|
|
1945
|
-
onClick: r[0] ||= (t) =>
|
|
1976
|
+
class: w(C(q.value === "tags-differ" && !Y.value ? qn : Kn)),
|
|
1977
|
+
onClick: r[0] ||= (t) => de(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
1946
1978
|
}, j(C(h)(C(m).localization.useDefaultLanguage, { default: G.value })), 3)], 64)) : E("", !0),
|
|
1947
|
-
|
|
1979
|
+
q.value === "changed" ? (i(), b("button", {
|
|
1948
1980
|
key: 2,
|
|
1949
1981
|
type: "button",
|
|
1950
1982
|
"data-testid": "locale-reset",
|
|
1951
|
-
class: w(C(
|
|
1952
|
-
onClick: r[1] ||= (t) =>
|
|
1983
|
+
class: w(C(qn)),
|
|
1984
|
+
onClick: r[1] ||= (t) => de(e.setPaths)
|
|
1953
1985
|
}, j(C(m).localization.resetChanges), 3)) : E("", !0),
|
|
1954
|
-
|
|
1986
|
+
q.value === "hidden" ? (i(), b("button", {
|
|
1955
1987
|
key: 3,
|
|
1956
1988
|
type: "button",
|
|
1957
1989
|
"data-testid": "locale-show",
|
|
1958
|
-
class: w(C(
|
|
1959
|
-
onClick:
|
|
1990
|
+
class: w(C(qn)),
|
|
1991
|
+
onClick: fe
|
|
1960
1992
|
}, j(C(m).localization.show), 3)) : E("", !0)
|
|
1961
1993
|
])) : E("", !0)
|
|
1962
|
-
], 64))], 44,
|
|
1994
|
+
], 64))], 44, Ra)], 8, ["to"])) : E("", !0)], 64));
|
|
1963
1995
|
}
|
|
1964
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
1996
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), to = /* @__PURE__ */ n({
|
|
1965
1997
|
__name: "LocaleMarkers",
|
|
1966
1998
|
props: { block: {} },
|
|
1967
1999
|
setup(e) {
|
|
1968
|
-
let t = e, n = f(
|
|
2000
|
+
let t = e, n = f(Rn, null), r = f(nn, void 0), a = f(xn, []), s = f(Wt, te.liquid), c = f(Sn, N(() => /* @__PURE__ */ new Set())), l = N(() => n?.activeLocale?.value), u = N(() => l.value ? t.block.l10n?.[l.value] : void 0), d = N(() => ({
|
|
1969
2001
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
1970
2002
|
...t.block,
|
|
1971
2003
|
children: []
|
|
@@ -1974,14 +2006,14 @@ var Aa = [
|
|
|
1974
2006
|
locale: n.content.value.settings.locale,
|
|
1975
2007
|
locales: n.content.value.settings.locales
|
|
1976
2008
|
}
|
|
1977
|
-
})), p = N(() => n && l.value && !c.value.has(l.value) ?
|
|
2009
|
+
})), p = N(() => n && l.value && !c.value.has(l.value) ? ie(d.value, l.value, a) : {
|
|
1978
2010
|
missing: [],
|
|
1979
2011
|
stale: [],
|
|
1980
2012
|
translated: []
|
|
1981
2013
|
}), m = N(() => p.value.stale.map((e) => e.slice(t.block.id.length + 1))), h = N(() => p.value.translated.flatMap((e) => {
|
|
1982
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
1983
|
-
return typeof r == "string" && i !== void 0 &&
|
|
1984
|
-
})), g = z(null), _ = N(() => n && l.value && !c.value.has(l.value) ?
|
|
2014
|
+
let n = e.slice(t.block.id.length + 1), r = _e(t.block, n), i = u.value?.text?.[n]?.value, a = t.block.type === "html" || le[t.block.type]?.includes(n) ? "html" : "text";
|
|
2015
|
+
return typeof r == "string" && i !== void 0 && Ia(r, i, s, a) ? [n] : [];
|
|
2016
|
+
})), g = z(null), _ = N(() => n && l.value && !c.value.has(l.value) ? W(d.value, l.value, {
|
|
1985
2017
|
syntax: s,
|
|
1986
2018
|
definitions: a,
|
|
1987
2019
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -1991,9 +2023,9 @@ var Aa = [
|
|
|
1991
2023
|
let n = e.slice(t.block.id.length + 1);
|
|
1992
2024
|
return p.value.translated.includes(e) && !h.value.includes(n);
|
|
1993
2025
|
})), y = N(() => Object.keys(u.value?.set ?? {}).filter((e) => {
|
|
1994
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
1995
|
-
return Array.isArray(i) ?
|
|
1996
|
-
})), b = N(() => !l.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !c.value.has(e) &&
|
|
2026
|
+
let n = e.split("."), r = n.pop(), i = n.length ? _e(t.block, n.join(".")) : t.block;
|
|
2027
|
+
return Array.isArray(i) ? _e(i, r) !== void 0 : i !== void 0;
|
|
2028
|
+
})), b = N(() => !l.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !c.value.has(e) && ie(d.value, e, a).stale.length > 0) : []), x = N(() => l.value ? c.value.has(l.value) ? null : u.value?.hidden ? "hidden" : p.value.missing.length ? "missing" : m.value.length ? "stale" : h.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
|
|
1997
2029
|
function S(e) {
|
|
1998
2030
|
return e === "missing" ? p.value.missing.length : e === "stale" ? m.value.length : e === "tags-differ" ? h.value.length : e === "default-stale" ? b.value.length : y.value.length;
|
|
1999
2031
|
}
|
|
@@ -2002,12 +2034,12 @@ var Aa = [
|
|
|
2002
2034
|
g.value = null;
|
|
2003
2035
|
});
|
|
2004
2036
|
let k = N(() => {
|
|
2005
|
-
let e =
|
|
2037
|
+
let e = _e(t.block, m.value[0] ?? "");
|
|
2006
2038
|
if (typeof e != "string") return "";
|
|
2007
2039
|
let n = e.split(/<[^>]*>/).join("");
|
|
2008
2040
|
return Array.from(n).slice(0, 60).join("");
|
|
2009
2041
|
});
|
|
2010
|
-
return (t, n) => C(r) && x.value ? (i(), D(
|
|
2042
|
+
return (t, n) => C(r) && x.value ? (i(), D(eo, {
|
|
2011
2043
|
key: 0,
|
|
2012
2044
|
"block-id": e.block.id,
|
|
2013
2045
|
state: x.value,
|
|
@@ -2041,21 +2073,21 @@ var Aa = [
|
|
|
2041
2073
|
"editable"
|
|
2042
2074
|
])) : E("", !0);
|
|
2043
2075
|
}
|
|
2044
|
-
}),
|
|
2076
|
+
}), no = [
|
|
2045
2077
|
"data-block-id",
|
|
2046
2078
|
"data-block-type",
|
|
2047
2079
|
"data-tpl-picked"
|
|
2048
|
-
],
|
|
2080
|
+
], ro = ["aria-label"], io = ["data-lock-holder"], ao = ["aria-label"], oo = [
|
|
2049
2081
|
"aria-label",
|
|
2050
2082
|
"aria-pressed",
|
|
2051
2083
|
"title"
|
|
2052
|
-
],
|
|
2084
|
+
], so = ["aria-label", "title"], co = ["aria-label", "title"], lo = ["aria-label", "title"], uo = {
|
|
2053
2085
|
key: 3,
|
|
2054
2086
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2055
|
-
},
|
|
2087
|
+
}, fo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, po = {
|
|
2056
2088
|
key: 4,
|
|
2057
2089
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2058
|
-
},
|
|
2090
|
+
}, mo = ["aria-label", "title"], ho = /*#__PURE__*/ St(/* @__PURE__ */ n({
|
|
2059
2091
|
__name: "BlockWrapper",
|
|
2060
2092
|
props: {
|
|
2061
2093
|
block: {},
|
|
@@ -2068,7 +2100,7 @@ var Aa = [
|
|
|
2068
2100
|
},
|
|
2069
2101
|
emits: ["select"],
|
|
2070
2102
|
setup(e, { emit: t }) {
|
|
2071
|
-
let n = g(() => import("./BlockIssueBadge-
|
|
2103
|
+
let n = g(() => import("./BlockIssueBadge-Bnmq_M4G.js")), r = e, a = N(() => r.displayBlock ?? r.block), s = t, { t: c, format: l } = Q(), u = f(zn, null), d = z(null), p = N(() => u?.liftedBlockId.value === r.block.id), m = N(() => p.value ? l(c.blockActions.dragLifted, { block: r.block.type }) : c.blockActions.drag);
|
|
2072
2104
|
async function v() {
|
|
2073
2105
|
await O(), d.value?.focus();
|
|
2074
2106
|
}
|
|
@@ -2078,23 +2110,23 @@ var Aa = [
|
|
|
2078
2110
|
let S = N(() => !r.viewport || !a.value.visibility ? !1 : a.value.visibility[r.viewport] === !1), T = N(() => !!(Z?.activeLocale?.value && r.block.l10n?.[Z.activeLocale.value]?.hidden)), M = N(() => r.previewMode === !0 && (S.value || T.value)), F = N(() => r.viewport ? {
|
|
2079
2111
|
desktop: c.viewport.desktop,
|
|
2080
2112
|
mobile: c.viewport.mobile
|
|
2081
|
-
}[r.viewport] ?? r.viewport : ""), I = N(() => !!a.value.displayCondition), L = f(
|
|
2113
|
+
}[r.viewport] ?? r.viewport : ""), I = N(() => !!a.value.displayCondition), L = f(Pn, null), R = f(Dn, null), B = f(vn, {}), H = N(() => B.savedBlocks?.isPicking.value === !0), U = N(() => !r.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), W = N(() => r.isSelected && !H.value), G = N(() => B.comments?.getBlockCount(r.block.id) ?? 0), K = z(null), ee = z(null), q = z(null), J = z(null), te = z({
|
|
2082
2114
|
left: "calc(100% + 8px)",
|
|
2083
2115
|
top: "50%"
|
|
2084
|
-
}),
|
|
2116
|
+
}), ne = z(!1), re = N(() => ee.value ?? J.value), ie = N(() => re.value?.closest(".tpl-body"));
|
|
2085
2117
|
function Y() {
|
|
2086
|
-
let e =
|
|
2118
|
+
let e = ne.value, t = ee.value, n = J.value, r = K.value;
|
|
2087
2119
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2088
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2120
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = ie.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2089
2121
|
if (n?.offsetWidth) {
|
|
2090
2122
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2091
2123
|
if (e === i) {
|
|
2092
|
-
|
|
2124
|
+
ne.value = !i, O(Y);
|
|
2093
2125
|
return;
|
|
2094
2126
|
}
|
|
2095
2127
|
}
|
|
2096
2128
|
if (!t?.offsetWidth) return;
|
|
2097
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2129
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = q.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2098
2130
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2099
2131
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2100
2132
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2106,43 +2138,46 @@ var Aa = [
|
|
|
2106
2138
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2107
2139
|
}
|
|
2108
2140
|
}
|
|
2109
|
-
(
|
|
2141
|
+
(te.value.left !== `${u}px` || te.value.top !== m) && (te.value = {
|
|
2110
2142
|
left: `${u}px`,
|
|
2111
2143
|
top: m
|
|
2112
2144
|
});
|
|
2113
2145
|
}
|
|
2114
|
-
_(Y),
|
|
2115
|
-
ee.value,
|
|
2116
|
-
te.value,
|
|
2146
|
+
_(Y), nr(N(() => re.value ? [
|
|
2117
2147
|
K.value,
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
let
|
|
2148
|
+
ee.value,
|
|
2149
|
+
q.value,
|
|
2150
|
+
J.value,
|
|
2151
|
+
ie.value
|
|
2152
|
+
].filter((e) => !!e) : []), Y), $n(ie, "scroll", Y, { passive: !0 });
|
|
2153
|
+
let X = N(() => B.collaboration?.lockOf(r.block.id) ?? null), ae = N(() => X.value?.holder.type === "guest" ? c.collaboration.guest : X.value?.holder.name ?? ""), oe = N(() => B.collaboration?.agentHighlightOf(r.block.id) ?? B.ai?.highlightOf(r.block.id) ?? null), se = vt(() => a.value.type === "section" ? a.value.backgroundImage : void 0), ce = vt(() => a.value.type === "section" ? a.value.wrapper?.backgroundImage : void 0), Z = f(Rn, null), le = Z ? Un(Z) : null, ue = f(Tn, null) ?? le?.content ?? null;
|
|
2154
|
+
o([() => Z?.activeLocale?.value, () => le && Te(le.settings.value)], Y, { flush: "post" });
|
|
2155
|
+
let de = f(sn, void 0), fe = N(() => Li(a.value, {
|
|
2124
2156
|
backgroundImageUrl: se.value,
|
|
2125
|
-
heroBoxWidth:
|
|
2126
|
-
})), pe = N(() =>
|
|
2127
|
-
|
|
2157
|
+
heroBoxWidth: ut(a.value) ? mt(a.value, ue?.value, de) : void 0
|
|
2158
|
+
})), pe = N(() => Ui(a.value, { backgroundImageUrl: ce.value })), me = N(() => {
|
|
2159
|
+
let e = a.value;
|
|
2160
|
+
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2161
|
+
}), he = N(() => Hi(me.value?.wrapper?.padding));
|
|
2162
|
+
function ge(e) {
|
|
2128
2163
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2129
2164
|
}
|
|
2130
|
-
function
|
|
2165
|
+
function _e() {
|
|
2131
2166
|
L?.deleteBlock(r.block.id);
|
|
2132
2167
|
}
|
|
2133
|
-
function
|
|
2168
|
+
function ve() {
|
|
2134
2169
|
L?.duplicateBlock(r.block);
|
|
2135
2170
|
}
|
|
2136
|
-
function
|
|
2171
|
+
function ye() {
|
|
2137
2172
|
B.savedBlocks?.startPicking(r.block.id);
|
|
2138
2173
|
}
|
|
2139
|
-
function
|
|
2174
|
+
function be() {
|
|
2140
2175
|
R?.toggleBlock(r.block.id);
|
|
2141
2176
|
}
|
|
2142
2177
|
return (t, r) => M.value ? E("", !0) : (i(), b("div", {
|
|
2143
2178
|
key: 0,
|
|
2144
2179
|
ref_key: "blockElement",
|
|
2145
|
-
ref:
|
|
2180
|
+
ref: K,
|
|
2146
2181
|
class: w(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2147
2182
|
"tpl-block--selected": e.isSelected,
|
|
2148
2183
|
"tpl-block--locale-hidden": T.value,
|
|
@@ -2153,26 +2188,26 @@ var Aa = [
|
|
|
2153
2188
|
"data-block-id": e.block.id,
|
|
2154
2189
|
"data-block-type": e.block.type,
|
|
2155
2190
|
"data-tpl-picked": e.picked || void 0,
|
|
2156
|
-
onClick:
|
|
2191
|
+
onClick: ge
|
|
2157
2192
|
}, [
|
|
2158
2193
|
A("div", {
|
|
2159
2194
|
ref_key: "badgesElement",
|
|
2160
|
-
ref:
|
|
2195
|
+
ref: q,
|
|
2161
2196
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2162
2197
|
}, [
|
|
2163
2198
|
G.value > 0 && !S.value ? (i(), b("button", {
|
|
2164
2199
|
key: 0,
|
|
2165
2200
|
ref_key: "commentElement",
|
|
2166
|
-
ref:
|
|
2167
|
-
class: w(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2201
|
+
ref: J,
|
|
2202
|
+
class: w(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", ne.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2168
2203
|
"aria-label": C(l)(C(c).blockActions.comments, { count: String(G.value) }),
|
|
2169
2204
|
onClick: r[0] ||= k((t) => C(B).comments?.openForBlock(e.block.id), ["stop"])
|
|
2170
|
-
}, [V(C(
|
|
2205
|
+
}, [V(C(Rt), {
|
|
2171
2206
|
size: 12,
|
|
2172
2207
|
"stroke-width": 2.5
|
|
2173
|
-
}), x(" " + j(G.value), 1)], 10,
|
|
2208
|
+
}), x(" " + j(G.value), 1)], 10, ro)) : E("", !0),
|
|
2174
2209
|
V(C(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2175
|
-
e.previewMode ? E("", !0) : (i(), D(
|
|
2210
|
+
e.previewMode ? E("", !0) : (i(), D(to, {
|
|
2176
2211
|
key: 1,
|
|
2177
2212
|
block: e.block
|
|
2178
2213
|
}, null, 8, ["block"]))
|
|
@@ -2190,9 +2225,9 @@ var Aa = [
|
|
|
2190
2225
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2191
2226
|
style: P({
|
|
2192
2227
|
backgroundColor: X.value.holder.color,
|
|
2193
|
-
color: C(
|
|
2228
|
+
color: C(_r)(X.value.holder.color)
|
|
2194
2229
|
})
|
|
2195
|
-
}, j(C(l)(C(c).collaboration.editing, { name: ae.value })), 5)], 12,
|
|
2230
|
+
}, j(C(l)(C(c).collaboration.editing, { name: ae.value })), 5)], 12, io)) : E("", !0),
|
|
2196
2231
|
oe.value === null ? E("", !0) : (i(), b("div", {
|
|
2197
2232
|
key: oe.value,
|
|
2198
2233
|
"data-testid": "block-agent-highlight",
|
|
@@ -2202,8 +2237,8 @@ var Aa = [
|
|
|
2202
2237
|
W.value ? (i(), b("div", {
|
|
2203
2238
|
key: 2,
|
|
2204
2239
|
ref_key: "actionsElement",
|
|
2205
|
-
ref:
|
|
2206
|
-
style: P(
|
|
2240
|
+
ref: ee,
|
|
2241
|
+
style: P(te.value),
|
|
2207
2242
|
role: "toolbar",
|
|
2208
2243
|
"aria-label": C(c).blockActions.drag,
|
|
2209
2244
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
@@ -2217,73 +2252,81 @@ var Aa = [
|
|
|
2217
2252
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2218
2253
|
title: C(c).blockActions.drag,
|
|
2219
2254
|
onKeydown: y
|
|
2220
|
-
}, [V(C(
|
|
2255
|
+
}, [V(C(Vt), {
|
|
2221
2256
|
size: 14,
|
|
2222
2257
|
"stroke-width": 1.5
|
|
2223
|
-
})], 40,
|
|
2258
|
+
})], 40, oo),
|
|
2224
2259
|
A("button", {
|
|
2225
2260
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2226
2261
|
"aria-label": C(c).blockActions.duplicate,
|
|
2227
2262
|
title: C(c).blockActions.duplicate,
|
|
2228
|
-
onClick: k(
|
|
2229
|
-
}, [V(C(
|
|
2263
|
+
onClick: k(ve, ["stop"])
|
|
2264
|
+
}, [V(C(Ct), {
|
|
2230
2265
|
size: 14,
|
|
2231
2266
|
"stroke-width": 1.5
|
|
2232
|
-
})], 8,
|
|
2267
|
+
})], 8, so),
|
|
2233
2268
|
U.value ? (i(), b("button", {
|
|
2234
2269
|
key: 0,
|
|
2235
2270
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2236
2271
|
"aria-label": C(c).blockActions.saveAsBlock,
|
|
2237
2272
|
title: C(c).blockActions.saveAsBlock,
|
|
2238
|
-
onClick: k(
|
|
2239
|
-
}, [V(C(
|
|
2273
|
+
onClick: k(ye, ["stop"])
|
|
2274
|
+
}, [V(C(jt), {
|
|
2240
2275
|
size: 14,
|
|
2241
2276
|
"stroke-width": 1.5
|
|
2242
|
-
})], 8,
|
|
2277
|
+
})], 8, co)) : E("", !0),
|
|
2243
2278
|
A("button", {
|
|
2244
2279
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2245
2280
|
"aria-label": C(c).blockActions.delete,
|
|
2246
2281
|
title: C(c).blockActions.delete,
|
|
2247
|
-
onClick: k(
|
|
2248
|
-
}, [V(C(
|
|
2282
|
+
onClick: k(_e, ["stop"])
|
|
2283
|
+
}, [V(C(Ft), {
|
|
2249
2284
|
size: 14,
|
|
2250
2285
|
"stroke-width": 1.5
|
|
2251
|
-
})], 8,
|
|
2252
|
-
], 12,
|
|
2253
|
-
S.value ? (i(), b("div",
|
|
2286
|
+
})], 8, lo)
|
|
2287
|
+
], 12, ao)) : E("", !0),
|
|
2288
|
+
S.value ? (i(), b("div", uo, [A("span", fo, [V(C(Dt), {
|
|
2254
2289
|
size: 12,
|
|
2255
2290
|
"stroke-width": 1.5
|
|
2256
2291
|
}), x(" " + j(C(l)(C(c).blockActions.hiddenOnViewport, { viewport: F.value })), 1)])])) : E("", !0),
|
|
2257
|
-
I.value && !S.value ? (i(), b("div",
|
|
2292
|
+
I.value && !S.value ? (i(), b("div", po, [A("button", {
|
|
2258
2293
|
"data-testid": "condition-toggle",
|
|
2259
2294
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2260
2295
|
"aria-label": C(c).blockActions.conditionToggle,
|
|
2261
2296
|
title: e.block.displayCondition?.label,
|
|
2262
|
-
onClick: k(
|
|
2263
|
-
}, [V(C(
|
|
2297
|
+
onClick: k(be, ["stop"])
|
|
2298
|
+
}, [V(C(Ot), {
|
|
2264
2299
|
size: 12,
|
|
2265
2300
|
"stroke-width": 2
|
|
2266
|
-
})], 8,
|
|
2301
|
+
})], 8, mo)])) : E("", !0),
|
|
2267
2302
|
pe.value ? (i(), b("div", {
|
|
2268
2303
|
key: 5,
|
|
2269
|
-
class: w(["tpl-section-wrapper tpl-email-surface", C(
|
|
2304
|
+
class: w(["tpl-section-wrapper tpl-email-surface", C(Ni)(pe.value)]),
|
|
2270
2305
|
style: P(pe.value)
|
|
2306
|
+
}, [me.value ? (i(), b("div", {
|
|
2307
|
+
key: 0,
|
|
2308
|
+
class: "tpl-band-frame",
|
|
2309
|
+
style: P(he.value)
|
|
2271
2310
|
}, [A("div", {
|
|
2272
|
-
class: w(["tpl-block-content tpl-email-surface", C(
|
|
2311
|
+
class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
|
|
2273
2312
|
style: P(fe.value)
|
|
2274
|
-
}, [h(t.$slots, "default", {}, void 0, !0)], 6)],
|
|
2313
|
+
}, [h(t.$slots, "default", {}, void 0, !0)], 6)], 4)) : (i(), b("div", {
|
|
2314
|
+
key: 1,
|
|
2315
|
+
class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
|
|
2316
|
+
style: P(fe.value)
|
|
2317
|
+
}, [h(t.$slots, "default", {}, void 0, !0)], 6))], 6)) : (i(), b("div", {
|
|
2275
2318
|
key: 6,
|
|
2276
|
-
class: w(["tpl-block-content tpl-email-surface", C(
|
|
2319
|
+
class: w(["tpl-block-content tpl-email-surface", C(Ni)(fe.value)]),
|
|
2277
2320
|
style: P(fe.value)
|
|
2278
2321
|
}, [h(t.$slots, "default", {}, void 0, !0)], 6))
|
|
2279
|
-
], 10,
|
|
2322
|
+
], 10, no));
|
|
2280
2323
|
}
|
|
2281
|
-
}), [["__scopeId", "data-v-
|
|
2324
|
+
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2282
2325
|
// src/utils/unwrapParagraph.ts
|
|
2283
|
-
function
|
|
2326
|
+
function go(e) {
|
|
2284
2327
|
let t = /^\s*<p\b/.exec(e);
|
|
2285
2328
|
if (!t) return e;
|
|
2286
|
-
let n =
|
|
2329
|
+
let n = Ne(e, t[0].length);
|
|
2287
2330
|
if (n === -1) return e;
|
|
2288
2331
|
let r = /<\/p>\s*$/.exec(e);
|
|
2289
2332
|
if (!r || r.index <= n) return e;
|
|
@@ -2291,22 +2334,22 @@ function co(e) {
|
|
|
2291
2334
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2292
2335
|
}
|
|
2293
2336
|
// src/components/blocks/TitleBlock.vue
|
|
2294
|
-
var
|
|
2337
|
+
var _o = /* @__PURE__ */ n({
|
|
2295
2338
|
__name: "TitleBlock",
|
|
2296
2339
|
props: {
|
|
2297
2340
|
block: {},
|
|
2298
2341
|
viewport: {}
|
|
2299
2342
|
},
|
|
2300
2343
|
setup(e) {
|
|
2301
|
-
let n = e, r = g(() => import("./TitleEditor-
|
|
2344
|
+
let n = e, r = g(() => import("./TitleEditor-D04vvbUc.js")), a = Fn(gn, "TitleBlock"), { isEditing: o, blockRef: s, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = ja(() => n.block.content), f = N(() => {
|
|
2302
2345
|
let e = {
|
|
2303
|
-
fontSize: `${
|
|
2304
|
-
lineHeight: String(
|
|
2346
|
+
fontSize: `${Ye[n.block.level]}px`,
|
|
2347
|
+
lineHeight: String(xe),
|
|
2305
2348
|
fontWeight: "700",
|
|
2306
2349
|
textAlign: n.block.textAlign
|
|
2307
2350
|
};
|
|
2308
2351
|
return n.block.color && (e.color = n.block.color), n.block.fontFamily && (e.fontFamily = a.resolveFontFamily(n.block.fontFamily)), e;
|
|
2309
|
-
}), p = N(() => `h${n.block.level}`), m = N(() =>
|
|
2352
|
+
}), p = N(() => `h${n.block.level}`), m = N(() => hr(go(l.value)));
|
|
2310
2353
|
return (n, a) => (i(), b("div", {
|
|
2311
2354
|
ref_key: "blockRef",
|
|
2312
2355
|
ref: s,
|
|
@@ -2332,14 +2375,14 @@ var lo = /* @__PURE__ */ n({
|
|
|
2332
2375
|
innerHTML: m.value
|
|
2333
2376
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2334
2377
|
}
|
|
2335
|
-
}),
|
|
2336
|
-
function
|
|
2337
|
-
let n =
|
|
2338
|
-
n.color =
|
|
2339
|
-
let r =
|
|
2340
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2341
|
-
let i =
|
|
2342
|
-
return i.align = "center",
|
|
2378
|
+
}), vo = "hero", yo = "#1f2937", bo = "#ffffff";
|
|
2379
|
+
function xo(e, t) {
|
|
2380
|
+
let n = et("title", e);
|
|
2381
|
+
n.color = bo, n.textAlign = "center";
|
|
2382
|
+
let r = et("paragraph", e);
|
|
2383
|
+
r.content = `<p style="text-align: center"><span style="color: ${bo}">${So(t)}</span></p>`;
|
|
2384
|
+
let i = et("button", e);
|
|
2385
|
+
return i.align = "center", oe({
|
|
2343
2386
|
columns: "1",
|
|
2344
2387
|
children: [[
|
|
2345
2388
|
n,
|
|
@@ -2357,28 +2400,28 @@ function mo(e, t) {
|
|
|
2357
2400
|
bottom: 48,
|
|
2358
2401
|
left: 24
|
|
2359
2402
|
},
|
|
2360
|
-
backgroundColor:
|
|
2403
|
+
backgroundColor: yo
|
|
2361
2404
|
}
|
|
2362
2405
|
});
|
|
2363
2406
|
}
|
|
2364
|
-
function
|
|
2407
|
+
function So(e) {
|
|
2365
2408
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2366
2409
|
}
|
|
2367
2410
|
// src/utils/sectionColumnDrop.ts
|
|
2368
|
-
var
|
|
2369
|
-
function
|
|
2370
|
-
return e.dataset.blockType !== "section" && !
|
|
2411
|
+
var Co = /* @__PURE__ */ new Set(["section", vo]);
|
|
2412
|
+
function wo(e) {
|
|
2413
|
+
return e.dataset.blockType !== "section" && !Co.has(e.dataset.paletteType ?? "");
|
|
2371
2414
|
}
|
|
2372
2415
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2373
|
-
var
|
|
2416
|
+
var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
2374
2417
|
key: 0,
|
|
2375
2418
|
"data-testid": "hero-image-hint",
|
|
2376
2419
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2377
|
-
},
|
|
2420
|
+
}, Do = {
|
|
2378
2421
|
key: 0,
|
|
2379
2422
|
"data-testid": "section-drop-hint",
|
|
2380
2423
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
2381
|
-
},
|
|
2424
|
+
}, Oo = /* @__PURE__ */ n({
|
|
2382
2425
|
__name: "SectionBlock",
|
|
2383
2426
|
props: {
|
|
2384
2427
|
block: {},
|
|
@@ -2387,15 +2430,15 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2387
2430
|
},
|
|
2388
2431
|
setup(n) {
|
|
2389
2432
|
let r = {
|
|
2390
|
-
title:
|
|
2391
|
-
paragraph:
|
|
2392
|
-
image:
|
|
2393
|
-
button:
|
|
2394
|
-
divider:
|
|
2395
|
-
custom:
|
|
2396
|
-
}, o = n, { t: u } = Q(), d =
|
|
2397
|
-
s(
|
|
2398
|
-
let g = f(
|
|
2433
|
+
title: _o,
|
|
2434
|
+
paragraph: Na,
|
|
2435
|
+
image: Ea,
|
|
2436
|
+
button: Ji,
|
|
2437
|
+
divider: ca,
|
|
2438
|
+
custom: oa
|
|
2439
|
+
}, o = n, { t: u } = Q(), d = Fn(Rn, "SectionBlock"), { displayBlock: p } = Un(d), m = N(() => o.sourceBlock ?? o.block), h = f(Sn, N(() => /* @__PURE__ */ new Set()));
|
|
2440
|
+
s(Sn, N(() => /* @__PURE__ */ new Set([...h.value, ...Object.entries(m.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2441
|
+
let g = f(Dn, null), _ = f(En, null), v = f(vn, {}), y = f(mn, null);
|
|
2399
2442
|
function x(e) {
|
|
2400
2443
|
let t = v.savedBlocks;
|
|
2401
2444
|
t?.isPicking.value ? t.togglePick(o.block.id) : d.selectBlock(e);
|
|
@@ -2408,8 +2451,21 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2408
2451
|
"33.33%",
|
|
2409
2452
|
"33.33%"
|
|
2410
2453
|
];
|
|
2454
|
+
case "4": return [
|
|
2455
|
+
"25%",
|
|
2456
|
+
"25%",
|
|
2457
|
+
"25%",
|
|
2458
|
+
"25%"
|
|
2459
|
+
];
|
|
2411
2460
|
case "1-2": return ["33.33%", "66.67%"];
|
|
2412
2461
|
case "2-1": return ["66.67%", "33.33%"];
|
|
2462
|
+
case "1-3": return ["25%", "75%"];
|
|
2463
|
+
case "3-1": return ["75%", "25%"];
|
|
2464
|
+
case "1-2-1": return [
|
|
2465
|
+
"25%",
|
|
2466
|
+
"50%",
|
|
2467
|
+
"25%"
|
|
2468
|
+
];
|
|
2413
2469
|
default: return ["100%"];
|
|
2414
2470
|
}
|
|
2415
2471
|
}), T = N(() => {
|
|
@@ -2432,7 +2488,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2432
2488
|
}
|
|
2433
2489
|
let U = N(() => {
|
|
2434
2490
|
if (d.state.previewMode) return !1;
|
|
2435
|
-
let e =
|
|
2491
|
+
let e = Je(o.block);
|
|
2436
2492
|
return e !== null && !e.applied && e.reason === "image";
|
|
2437
2493
|
});
|
|
2438
2494
|
function W(e) {
|
|
@@ -2441,19 +2497,19 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2441
2497
|
function G(e) {
|
|
2442
2498
|
return k(e).length === 0 && d.state.previewMode;
|
|
2443
2499
|
}
|
|
2444
|
-
function
|
|
2445
|
-
|
|
2500
|
+
function K(e, t) {
|
|
2501
|
+
Pa(d, t, o.block.id, e);
|
|
2446
2502
|
}
|
|
2447
|
-
function
|
|
2448
|
-
return
|
|
2503
|
+
function ee(e) {
|
|
2504
|
+
return Oi(e, _, r);
|
|
2449
2505
|
}
|
|
2450
|
-
function
|
|
2506
|
+
function q(e, t) {
|
|
2451
2507
|
e.type === "custom" && d.updateBlock(e.id, {
|
|
2452
2508
|
fieldValues: t.fieldValues,
|
|
2453
2509
|
dataSourceFetched: t.dataSourceFetched
|
|
2454
2510
|
});
|
|
2455
2511
|
}
|
|
2456
|
-
return (r, s) => (i(), b("div",
|
|
2512
|
+
return (r, s) => (i(), b("div", To, [U.value ? (i(), b("div", Eo, [A("span", null, j(C(u).section.heroAddImage), 1)])) : E("", !0), A("div", { class: w(["tpl:flex tpl:gap-0", { "tpl:flex-col": O.value }]) }, [(i(!0), b(B, null, l(T.value, (r, f) => (i(), b("div", {
|
|
2457
2513
|
key: f,
|
|
2458
2514
|
class: w(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", W(f) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2459
2515
|
style: P({ width: O.value ? "100%" : S.value[f] })
|
|
@@ -2462,7 +2518,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2462
2518
|
group: {
|
|
2463
2519
|
name: "blocks",
|
|
2464
2520
|
pull: !0,
|
|
2465
|
-
put: (e, t, n) => C(
|
|
2521
|
+
put: (e, t, n) => C(wo)(n)
|
|
2466
2522
|
},
|
|
2467
2523
|
animation: 150,
|
|
2468
2524
|
"ghost-class": "tpl-ghost",
|
|
@@ -2476,12 +2532,12 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2476
2532
|
"tpl:min-h-[60px]": H(f),
|
|
2477
2533
|
"tpl:min-h-[34px]": G(f)
|
|
2478
2534
|
}]),
|
|
2479
|
-
onUpdate: (e) => C(
|
|
2535
|
+
onUpdate: (e) => C(Pa)(C(d), k(f), o.block.id, f, e),
|
|
2480
2536
|
onStart: (e) => L.value = f,
|
|
2481
2537
|
onEnd: s[0] ||= (e) => L.value = null,
|
|
2482
|
-
"onUpdate:modelValue": (e) =>
|
|
2538
|
+
"onUpdate:modelValue": (e) => K(f, e)
|
|
2483
2539
|
}, {
|
|
2484
|
-
default: a(() => [(i(!0), b(B, null, l(k(f), (r) => c((i(), b("div", { key: r.id }, [V(
|
|
2540
|
+
default: a(() => [(i(!0), b(B, null, l(k(f), (r) => c((i(), b("div", { key: r.id }, [V(ho, {
|
|
2485
2541
|
block: r,
|
|
2486
2542
|
"display-block": C(p)(r),
|
|
2487
2543
|
"is-selected": C(d).state.selectedBlockId === r.id,
|
|
@@ -2490,9 +2546,9 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2490
2546
|
nested: "",
|
|
2491
2547
|
onSelect: (e) => x(r.id)
|
|
2492
2548
|
}, {
|
|
2493
|
-
default: a(() => [(i(), D(t(
|
|
2549
|
+
default: a(() => [(i(), D(t(ee(r)), e({ block: C(p)(r) }, { ref_for: !0 }, r.type === "section" ? { sourceBlock: r } : {}, {
|
|
2494
2550
|
viewport: n.viewport,
|
|
2495
|
-
onFetchData: (e) =>
|
|
2551
|
+
onFetchData: (e) => q(r, e),
|
|
2496
2552
|
onUpdate: (e) => C(d).updateBlock(r.id, e)
|
|
2497
2553
|
}), null, 16, [
|
|
2498
2554
|
"block",
|
|
@@ -2517,14 +2573,14 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2517
2573
|
"onUpdate",
|
|
2518
2574
|
"onStart",
|
|
2519
2575
|
"onUpdate:modelValue"
|
|
2520
|
-
]), W(f) ? (i(), b("div",
|
|
2576
|
+
]), W(f) ? (i(), b("div", Do, [A("span", null, j(C(u).section.dropHere), 1)])) : E("", !0)], 6))), 128))], 2)]));
|
|
2521
2577
|
}
|
|
2522
|
-
}),
|
|
2578
|
+
}), ko = ["width", "height"], Ao = [
|
|
2523
2579
|
"d",
|
|
2524
2580
|
"stroke",
|
|
2525
2581
|
"stroke-opacity",
|
|
2526
2582
|
"stroke-width"
|
|
2527
|
-
],
|
|
2583
|
+
], jo = ["d", "fill"], Mo = /* @__PURE__ */ n({
|
|
2528
2584
|
__name: "SocialIconSvg",
|
|
2529
2585
|
props: {
|
|
2530
2586
|
platform: {},
|
|
@@ -2533,7 +2589,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2533
2589
|
iconSize: {}
|
|
2534
2590
|
},
|
|
2535
2591
|
setup(e) {
|
|
2536
|
-
let t = e, n = N(() =>
|
|
2592
|
+
let t = e, n = N(() => pt[t.platform]), r = N(() => ht[t.iconSize]), a = N(() => Le(t.platform, t.iconTone)), o = N(() => Se(t.iconStyle, t.iconTone)), s = N(() => {
|
|
2537
2593
|
let e = {
|
|
2538
2594
|
display: "inline-flex",
|
|
2539
2595
|
alignItems: "center",
|
|
@@ -2571,7 +2627,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2571
2627
|
};
|
|
2572
2628
|
default: return e;
|
|
2573
2629
|
}
|
|
2574
|
-
}), c = N(() =>
|
|
2630
|
+
}), c = N(() => Ue(t.iconStyle)), l = N(() => Math.floor(r.value * c.value));
|
|
2575
2631
|
function u(e) {
|
|
2576
2632
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2577
2633
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -2592,15 +2648,15 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2592
2648
|
"stroke-opacity": o.value.opacity,
|
|
2593
2649
|
"stroke-width": o.value.width / c.value,
|
|
2594
2650
|
"stroke-linejoin": "round"
|
|
2595
|
-
}, null, 8,
|
|
2651
|
+
}, null, 8, Ao)) : E("", !0), A("path", {
|
|
2596
2652
|
d: n.value.path,
|
|
2597
2653
|
fill: d.value
|
|
2598
|
-
}, null, 8,
|
|
2654
|
+
}, null, 8, jo)], 8, ko))], 4));
|
|
2599
2655
|
}
|
|
2600
|
-
}),
|
|
2656
|
+
}), No = { class: "tpl:w-full" }, Po = ["href"], Fo = {
|
|
2601
2657
|
key: 1,
|
|
2602
2658
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2603
|
-
},
|
|
2659
|
+
}, Io = /* @__PURE__ */ n({
|
|
2604
2660
|
__name: "SocialIconsBlock",
|
|
2605
2661
|
props: {
|
|
2606
2662
|
block: {},
|
|
@@ -2613,7 +2669,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2613
2669
|
gap: `${t.block.spacing}px`,
|
|
2614
2670
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2615
2671
|
})), a = N(() => t.block.icons.length > 0);
|
|
2616
|
-
return (t, o) => (i(), b("div",
|
|
2672
|
+
return (t, o) => (i(), b("div", No, [a.value ? (i(), b("div", {
|
|
2617
2673
|
key: 0,
|
|
2618
2674
|
style: P(r.value)
|
|
2619
2675
|
}, [(i(!0), b(B, null, l(e.block.icons, (t) => (i(), b("a", {
|
|
@@ -2621,7 +2677,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2621
2677
|
href: t.url || "#",
|
|
2622
2678
|
class: "tpl:cursor-default",
|
|
2623
2679
|
onClick: o[0] ||= k(() => {}, ["prevent"])
|
|
2624
|
-
}, [V(
|
|
2680
|
+
}, [V(Mo, {
|
|
2625
2681
|
platform: t.platform,
|
|
2626
2682
|
"icon-style": e.block.iconStyle,
|
|
2627
2683
|
"icon-tone": e.block.iconTone,
|
|
@@ -2631,44 +2687,44 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2631
2687
|
"icon-style",
|
|
2632
2688
|
"icon-tone",
|
|
2633
2689
|
"icon-size"
|
|
2634
|
-
])], 8,
|
|
2690
|
+
])], 8, Po))), 128))], 4)) : (i(), b("div", Fo, [V(C(It), { size: 16 }), A("span", null, j(C(n).social.addIcons), 1)]))]));
|
|
2635
2691
|
}
|
|
2636
|
-
}),
|
|
2692
|
+
}), Lo = { class: "tpl:w-full" }, Ro = {
|
|
2637
2693
|
key: 0,
|
|
2638
2694
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2639
2695
|
style: {
|
|
2640
2696
|
"background-color": "var(--tpl-bg-hover)",
|
|
2641
2697
|
color: "var(--tpl-text-dim)"
|
|
2642
2698
|
}
|
|
2643
|
-
},
|
|
2699
|
+
}, zo = /* @__PURE__ */ n({
|
|
2644
2700
|
__name: "SpacerBlock",
|
|
2645
2701
|
props: {
|
|
2646
2702
|
block: {},
|
|
2647
2703
|
viewport: {}
|
|
2648
2704
|
},
|
|
2649
2705
|
setup(e) {
|
|
2650
|
-
let t = e, n =
|
|
2706
|
+
let t = e, n = Fn(Rn, "SpacerBlock"), r = N(() => ({
|
|
2651
2707
|
height: `${t.block.height}px`,
|
|
2652
2708
|
minHeight: `${t.block.height}px`,
|
|
2653
2709
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2654
2710
|
}));
|
|
2655
|
-
return (t, a) => (i(), b("div",
|
|
2711
|
+
return (t, a) => (i(), b("div", Lo, [A("div", {
|
|
2656
2712
|
style: P(r.value),
|
|
2657
2713
|
class: w(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !C(n).state.previewMode }])
|
|
2658
|
-
}, [C(n).state.previewMode ? E("", !0) : (i(), b("span",
|
|
2714
|
+
}, [C(n).state.previewMode ? E("", !0) : (i(), b("span", Ro, j(e.block.height) + "px ", 1))], 6)]));
|
|
2659
2715
|
}
|
|
2660
|
-
}),
|
|
2716
|
+
}), Bo = { class: "tpl:w-full" }, Vo = { key: 0 }, Ho = [
|
|
2661
2717
|
"aria-label",
|
|
2662
2718
|
"data-placeholder",
|
|
2663
2719
|
"onBlur"
|
|
2664
|
-
],
|
|
2720
|
+
], Uo = [
|
|
2665
2721
|
"aria-label",
|
|
2666
2722
|
"data-placeholder",
|
|
2667
2723
|
"onBlur"
|
|
2668
|
-
],
|
|
2724
|
+
], Wo = {
|
|
2669
2725
|
key: 1,
|
|
2670
2726
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2671
|
-
},
|
|
2727
|
+
}, Go = /*#__PURE__*/ St(/* @__PURE__ */ n({
|
|
2672
2728
|
__name: "TableBlock",
|
|
2673
2729
|
props: {
|
|
2674
2730
|
block: {},
|
|
@@ -2682,7 +2738,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2682
2738
|
updated(e, t) {
|
|
2683
2739
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2684
2740
|
}
|
|
2685
|
-
}, n = e, { t: r } = Q(), a =
|
|
2741
|
+
}, n = e, { t: r } = Q(), a = Fn(Rn, "TableBlock"), o = Fn(gn, "TableBlock"), s = N(() => n.block.rows.length > 0), u = N(() => {
|
|
2686
2742
|
let e = {
|
|
2687
2743
|
width: "100%",
|
|
2688
2744
|
borderCollapse: "collapse",
|
|
@@ -2713,11 +2769,11 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2713
2769
|
} : n);
|
|
2714
2770
|
a.updateBlock(n.block.id, { rows: o });
|
|
2715
2771
|
}
|
|
2716
|
-
return (e, n) => (i(), b("div",
|
|
2772
|
+
return (e, n) => (i(), b("div", Bo, [s.value ? (i(), b("table", {
|
|
2717
2773
|
key: 0,
|
|
2718
2774
|
style: P(u.value),
|
|
2719
2775
|
class: "tpl-table-editable"
|
|
2720
|
-
}, [p.value ? (i(), b("thead",
|
|
2776
|
+
}, [p.value ? (i(), b("thead", Vo, [A("tr", null, [(i(!0), b(B, null, l(p.value.cells, (e) => c((i(), b("th", {
|
|
2721
2777
|
key: e.id,
|
|
2722
2778
|
style: P(f.value),
|
|
2723
2779
|
"aria-label": C(r).table.cellPlaceholder,
|
|
@@ -2726,7 +2782,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2726
2782
|
onBlur: (t) => g(p.value.id, e.id, t),
|
|
2727
2783
|
onKeydown: n[0] ||= S(k((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2728
2784
|
onClick: k(h, ["stop"])
|
|
2729
|
-
}, null, 44,
|
|
2785
|
+
}, null, 44, Ho)), [[t, e.content]])), 128))])])) : E("", !0), A("tbody", null, [(i(!0), b(B, null, l(m.value, (e) => (i(), b("tr", { key: e.id }, [(i(!0), b(B, null, l(e.cells, (a) => c((i(), b("td", {
|
|
2730
2786
|
key: a.id,
|
|
2731
2787
|
style: P(d.value),
|
|
2732
2788
|
"aria-label": C(r).table.cellPlaceholder,
|
|
@@ -2735,9 +2791,9 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2735
2791
|
onBlur: (t) => g(e.id, a.id, t),
|
|
2736
2792
|
onKeydown: n[1] ||= S(k((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2737
2793
|
onClick: k(h, ["stop"])
|
|
2738
|
-
}, null, 44,
|
|
2794
|
+
}, null, 44, Uo)), [[t, a.content]])), 128))]))), 128))])], 4)) : (i(), b("div", Wo, [V(C(Bt), { size: 16 }), A("span", null, j(C(r).table.empty), 1)]))]));
|
|
2739
2795
|
}
|
|
2740
|
-
}), [["__scopeId", "data-v-6751d456"]]),
|
|
2796
|
+
}), [["__scopeId", "data-v-6751d456"]]), Ko = /* @__PURE__ */ n({
|
|
2741
2797
|
__name: "VideoPlayButton",
|
|
2742
2798
|
props: { hoverEffect: {
|
|
2743
2799
|
type: Boolean,
|
|
@@ -2754,7 +2810,7 @@ var vo = { class: "tpl:relative tpl:w-full" }, yo = {
|
|
|
2754
2810
|
}
|
|
2755
2811
|
});
|
|
2756
2812
|
// src/utils/videoThumbnail.ts
|
|
2757
|
-
function
|
|
2813
|
+
function qo(e) {
|
|
2758
2814
|
if (!e) return {
|
|
2759
2815
|
platform: "unknown",
|
|
2760
2816
|
videoId: null,
|
|
@@ -2786,24 +2842,24 @@ function Bo(e) {
|
|
|
2786
2842
|
thumbnailUrl: null
|
|
2787
2843
|
};
|
|
2788
2844
|
}
|
|
2789
|
-
function
|
|
2790
|
-
return t ||
|
|
2845
|
+
function Jo(e, t) {
|
|
2846
|
+
return t || qo(e).thumbnailUrl;
|
|
2791
2847
|
}
|
|
2792
2848
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2793
|
-
var
|
|
2849
|
+
var Yo = ["src", "alt"], Xo = {
|
|
2794
2850
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2795
2851
|
style: { opacity: "0.7" }
|
|
2796
|
-
},
|
|
2852
|
+
}, Zo = ["href"], Qo = ["src", "alt"], $o = ["src", "alt"], es = {
|
|
2797
2853
|
key: 3,
|
|
2798
2854
|
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2799
|
-
},
|
|
2855
|
+
}, ts = /* @__PURE__ */ n({
|
|
2800
2856
|
__name: "VideoBlock",
|
|
2801
2857
|
props: {
|
|
2802
2858
|
block: {},
|
|
2803
2859
|
viewport: {}
|
|
2804
2860
|
},
|
|
2805
2861
|
setup(e) {
|
|
2806
|
-
let t = e, { t: n } = Q(), { syntax: r } =
|
|
2862
|
+
let t = e, { t: n } = Q(), { syntax: r } = ir(), a = N(() => pe(t.block.url, r) || pe(t.block.thumbnailUrl, r)), o = ct(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = ct(() => a.value ? t.block.placeholderUrl : void 0), c = N(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Jo(t.block.url)), l = N(() => ({ textAlign: t.block.align })), u = N(() => {
|
|
2807
2863
|
let e = t.block.align;
|
|
2808
2864
|
return {
|
|
2809
2865
|
maxWidth: "100%",
|
|
@@ -2813,7 +2869,7 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
2813
2869
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2814
2870
|
marginRight: e === "center" ? "auto" : void 0
|
|
2815
2871
|
};
|
|
2816
|
-
}), d = N(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = N(() =>
|
|
2872
|
+
}), d = N(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = N(() => pe(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2817
2873
|
return (t, r) => (i(), b("div", {
|
|
2818
2874
|
class: "tpl:w-full",
|
|
2819
2875
|
style: P(l.value)
|
|
@@ -2826,16 +2882,16 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
2826
2882
|
src: C(s),
|
|
2827
2883
|
alt: e.block.alt,
|
|
2828
2884
|
style: P(d.value)
|
|
2829
|
-
}, null, 12,
|
|
2885
|
+
}, null, 12, Yo), V(Ko)], 4)) : a.value ? (i(), b("div", {
|
|
2830
2886
|
key: 1,
|
|
2831
2887
|
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2832
2888
|
style: P([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2833
|
-
}, [V(C(
|
|
2889
|
+
}, [V(C(zt), {
|
|
2834
2890
|
size: 36,
|
|
2835
2891
|
"stroke-width": 1.5,
|
|
2836
2892
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2837
2893
|
style: { opacity: "0.5" }
|
|
2838
|
-
}), A("span",
|
|
2894
|
+
}), A("span", Xo, [V(Ki, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (i(), b(B, { key: 2 }, [e.block.url ? (i(), b("a", {
|
|
2839
2895
|
key: 0,
|
|
2840
2896
|
href: e.block.url,
|
|
2841
2897
|
target: "_blank",
|
|
@@ -2848,7 +2904,7 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
2848
2904
|
src: c.value,
|
|
2849
2905
|
alt: e.block.alt,
|
|
2850
2906
|
style: P(d.value)
|
|
2851
|
-
}, null, 12,
|
|
2907
|
+
}, null, 12, Qo), V(Ko, { "hover-effect": "" })], 12, Zo)) : (i(), b("div", {
|
|
2852
2908
|
key: 1,
|
|
2853
2909
|
class: "tpl:relative tpl:inline-block",
|
|
2854
2910
|
style: P(u.value)
|
|
@@ -2857,53 +2913,53 @@ var Ho = ["src", "alt"], Uo = {
|
|
|
2857
2913
|
src: c.value,
|
|
2858
2914
|
alt: e.block.alt,
|
|
2859
2915
|
style: P(d.value)
|
|
2860
|
-
}, null, 12,
|
|
2916
|
+
}, null, 12, $o), V(Ko)], 4))], 64)) : (i(), b("div", es, [V(C(zt), {
|
|
2861
2917
|
size: 40,
|
|
2862
2918
|
"stroke-width": 1.5,
|
|
2863
2919
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2864
2920
|
}), A("span", null, j(C(n).video.addVideo), 1)]))], 4));
|
|
2865
2921
|
}
|
|
2866
|
-
}),
|
|
2867
|
-
section:
|
|
2868
|
-
title:
|
|
2869
|
-
paragraph:
|
|
2870
|
-
image:
|
|
2871
|
-
button:
|
|
2872
|
-
divider:
|
|
2873
|
-
video:
|
|
2874
|
-
social:
|
|
2875
|
-
menu:
|
|
2876
|
-
table:
|
|
2877
|
-
spacer:
|
|
2878
|
-
html:
|
|
2879
|
-
countdown: g(() => import("./CountdownBlock-
|
|
2922
|
+
}), ns = {
|
|
2923
|
+
section: Oo,
|
|
2924
|
+
title: _o,
|
|
2925
|
+
paragraph: Na,
|
|
2926
|
+
image: Ea,
|
|
2927
|
+
button: Ji,
|
|
2928
|
+
divider: ca,
|
|
2929
|
+
video: ts,
|
|
2930
|
+
social: Io,
|
|
2931
|
+
menu: Aa,
|
|
2932
|
+
table: Go,
|
|
2933
|
+
spacer: zo,
|
|
2934
|
+
html: ma,
|
|
2935
|
+
countdown: g(() => import("./CountdownBlock-DyGsh92b.js"))
|
|
2880
2936
|
};
|
|
2881
|
-
function
|
|
2882
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: c } = Q(r), l = N(() =>
|
|
2937
|
+
function rs(e) {
|
|
2938
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: c } = Q(r), l = N(() => Oe(Oe(Oe(ri(r), Ci(t.content.value.settings?.locale)), Te(t.content.value.settings) === "rtl" ? {
|
|
2883
2939
|
title: { textAlign: "right" },
|
|
2884
2940
|
table: { textAlign: "right" }
|
|
2885
2941
|
} : {}), n.blockDefaults ?? {}));
|
|
2886
2942
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
2887
|
-
let { resolvedTheme: u } =
|
|
2943
|
+
let { resolvedTheme: u } = Jr(N(() => t.state.uiTheme)), d = z(n.theme ?? {}), { themeStyles: f } = Dr({
|
|
2888
2944
|
themeOverrides: d,
|
|
2889
2945
|
resolvedTheme: u,
|
|
2890
2946
|
extraStyles: () => ({
|
|
2891
2947
|
"--tpl-drop-text": `"${r.canvas.dropHere}"`,
|
|
2892
2948
|
...e.themeExtraStyles?.()
|
|
2893
2949
|
})
|
|
2894
|
-
}), p = e.history ??
|
|
2950
|
+
}), p = e.history ?? nt({
|
|
2895
2951
|
content: t.content,
|
|
2896
2952
|
setContent: (e, n) => t.setContent(e, n)
|
|
2897
2953
|
});
|
|
2898
|
-
e.history ||
|
|
2899
|
-
let h =
|
|
2954
|
+
e.history || ot(t, p);
|
|
2955
|
+
let h = xt({
|
|
2900
2956
|
addBlock: t.addBlock,
|
|
2901
2957
|
removeBlock: t.removeBlock,
|
|
2902
2958
|
updateBlock: t.updateBlock,
|
|
2903
2959
|
selectBlock: t.selectBlock,
|
|
2904
2960
|
findBlockLocation: t.findBlockLocation,
|
|
2905
2961
|
blockDefaults: () => l.value
|
|
2906
|
-
}), g =
|
|
2962
|
+
}), g = at(t), _ = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? st({
|
|
2907
2963
|
content: t.content,
|
|
2908
2964
|
isDirty: () => t.state.isDirty,
|
|
2909
2965
|
...e.autoSaveOptions
|
|
@@ -2911,30 +2967,30 @@ function Xo(e) {
|
|
|
2911
2967
|
_ && (v = o(p.isNavigating, (e) => {
|
|
2912
2968
|
e ? _.pause() : _.resume();
|
|
2913
2969
|
}));
|
|
2914
|
-
let b =
|
|
2970
|
+
let b = qr(t, {
|
|
2915
2971
|
t: a,
|
|
2916
2972
|
format: c
|
|
2917
|
-
}, n.customBlocks ?? []), x =
|
|
2973
|
+
}, n.customBlocks ?? []), x = sr(n.colors);
|
|
2918
2974
|
if (x.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
2919
|
-
let e =
|
|
2975
|
+
let e = ni(x.presets, n.blockDefaults, n.templateDefaults);
|
|
2920
2976
|
e.length > 0 && $.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
2921
2977
|
}
|
|
2922
|
-
let S =
|
|
2923
|
-
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
2924
|
-
let C =
|
|
2925
|
-
|
|
2978
|
+
let S = fr(n.templateSettings);
|
|
2979
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${pr.join(", ")}) — skipping it.`);
|
|
2980
|
+
let C = xr();
|
|
2981
|
+
$r(C, ns);
|
|
2926
2982
|
let w = /* @__PURE__ */ new Set();
|
|
2927
2983
|
function T(e) {
|
|
2928
2984
|
for (let t of e) {
|
|
2929
|
-
C.registerCustom(t,
|
|
2930
|
-
for (let e of
|
|
2985
|
+
C.registerCustom(t, oa);
|
|
2986
|
+
for (let e of wi(t, x)) w.has(e.id) || (w.add(e.id), $.warn(e.message));
|
|
2931
2987
|
}
|
|
2932
2988
|
}
|
|
2933
2989
|
n.customBlocks?.length && T(n.customBlocks);
|
|
2934
|
-
let E =
|
|
2990
|
+
let E = Rr();
|
|
2935
2991
|
if (y() && m(E.dispose), e.containerEl) {
|
|
2936
2992
|
let t = e.containerEl;
|
|
2937
|
-
|
|
2993
|
+
$n(document, "pointerdown", (e) => {
|
|
2938
2994
|
let n = t.value;
|
|
2939
2995
|
n && (e.composedPath?.() ?? []).includes(n) && E.claim();
|
|
2940
2996
|
}, { capture: !0 });
|
|
@@ -2944,7 +3000,7 @@ function Xo(e) {
|
|
|
2944
3000
|
t ? t.save() : _?.flush();
|
|
2945
3001
|
}
|
|
2946
3002
|
function O(n) {
|
|
2947
|
-
E.isActive() &&
|
|
3003
|
+
E.isActive() && Ei(n, {
|
|
2948
3004
|
history: p,
|
|
2949
3005
|
selectBlock: (e) => t.selectBlock(e),
|
|
2950
3006
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -2955,42 +3011,42 @@ function Xo(e) {
|
|
|
2955
3011
|
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
2956
3012
|
});
|
|
2957
3013
|
}
|
|
2958
|
-
|
|
3014
|
+
$n(document, "keydown", O);
|
|
2959
3015
|
let k = z(null), A = e.editorRoot ?? document;
|
|
2960
|
-
s(
|
|
2961
|
-
let j =
|
|
3016
|
+
s(Vn, A), s(jn, k), s(Kt, /* @__PURE__ */ new Map()), s(On, r), s(Rn, t), s(Bn, p), s(Pn, h), s(Dn, g), s(gn, i), s(In, f), s(hn, u), s(_n, l), s(Cn, n.locale), s(En, C), s(xn, n.customBlocks ?? []), s(Qt, n.paletteBlocks), s(on, ei(n.htmlBlockPreview)), s(sn, n.layout), s(fn, n.sectionWrapper), s(An, x), s(yn, S.fields), s(bn, Yr(t.content, C));
|
|
3017
|
+
let j = Ke(n.mergeTags?.syntax);
|
|
2962
3018
|
for (let e of ["opener", "closer"]) {
|
|
2963
3019
|
let t = j[e];
|
|
2964
3020
|
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
2965
3021
|
}
|
|
2966
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
3022
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && he(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
2967
3023
|
let M = F(n.mergeTags?.tags ?? []);
|
|
2968
3024
|
function P(e) {
|
|
2969
3025
|
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
2970
3026
|
}
|
|
2971
|
-
s(
|
|
2972
|
-
let I = z(
|
|
2973
|
-
s(
|
|
2974
|
-
let L =
|
|
3027
|
+
s(rn, M), s(Wt, j), s(Jt, n.mergeTags?.onRequest ?? null), s(qt, n.mergeTags?.autocomplete !== !1), s(Hn, n.mergeTags?.showRawValue !== !1);
|
|
3028
|
+
let I = z(me(n.mergeTags?.tags ?? []));
|
|
3029
|
+
s(an, I);
|
|
3030
|
+
let L = Vr({
|
|
2975
3031
|
resolvePreview: n.resolvePreview,
|
|
2976
3032
|
getContent: () => {
|
|
2977
3033
|
let e = t.content.value;
|
|
2978
3034
|
if (!t.state.previewMode) return e;
|
|
2979
|
-
let r = t.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
2980
|
-
return n.layout ?
|
|
3035
|
+
let r = t.activeLocale?.value ?? e.settings.locale ?? "en", i = Z(e, r);
|
|
3036
|
+
return n.layout ? Re(Z(n.layout, r, { missing: "default" }), i) : i;
|
|
2981
3037
|
},
|
|
2982
3038
|
isActive: () => t.state.previewMode,
|
|
2983
3039
|
getLocale: () => t.activeLocale?.value ?? t.content.value.settings.locale
|
|
2984
3040
|
});
|
|
2985
|
-
s(
|
|
3041
|
+
s(Zt, L), s(dn, n.resolvePreview);
|
|
2986
3042
|
let R = N(() => !(t.state.previewMode && L.isConfigured));
|
|
2987
|
-
s(
|
|
2988
|
-
let B =
|
|
2989
|
-
s(
|
|
2990
|
-
let V =
|
|
3043
|
+
s(mn, R);
|
|
3044
|
+
let B = Hr();
|
|
3045
|
+
s(Xt, B), s($t, z(!1)), s(tn, z(!1)), s(wn, n.logicTags?.tags ?? []), s(Ut, n.logicTags?.pairs ?? []), s(cn, n.logicTags?.onRequest ?? null), s(en, Ur()), s(un, n.onRequestMedia ?? null), s(Ln, n.canDropMedia ?? null), s(Gt, n.resolveImageUrl ? yt(n.resolveImageUrl) : null), n.displayConditions?.onRequest && (n.displayConditions.conditions !== void 0 || n.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), s(pn, n.displayConditions?.conditions ?? []), s(Mn, n.displayConditions?.allowCustom ?? !1), s(Yt, n.displayConditions?.onRequest ?? null), s(vn, e.capabilities ?? {}), s(zn, b);
|
|
3046
|
+
let V = Wr(n.lint) ? null : Kr({
|
|
2991
3047
|
content: t.content,
|
|
2992
3048
|
get options() {
|
|
2993
|
-
return
|
|
3049
|
+
return zr({
|
|
2994
3050
|
...n,
|
|
2995
3051
|
content: t.content.value,
|
|
2996
3052
|
contentLocale: t.activeLocale?.value ?? void 0
|
|
@@ -3002,7 +3058,7 @@ function Xo(e) {
|
|
|
3002
3058
|
updateSettings: t.updateSettings,
|
|
3003
3059
|
removeBlock: t.removeBlock
|
|
3004
3060
|
});
|
|
3005
|
-
s(
|
|
3061
|
+
s(Ht, V);
|
|
3006
3062
|
function H() {
|
|
3007
3063
|
v?.(), V?.destroy(), _?.destroy(), p.destroy();
|
|
3008
3064
|
}
|
|
@@ -3032,14 +3088,14 @@ function Xo(e) {
|
|
|
3032
3088
|
};
|
|
3033
3089
|
}
|
|
3034
3090
|
// src/composables/useSmallScreenNotice.ts
|
|
3035
|
-
var
|
|
3036
|
-
function
|
|
3037
|
-
let t =
|
|
3091
|
+
var is = "(max-width: 767px)";
|
|
3092
|
+
function as(e) {
|
|
3093
|
+
let t = er(is);
|
|
3038
3094
|
return {
|
|
3039
3095
|
isSmallScreen: t,
|
|
3040
3096
|
showNotice: N(() => (M(e) ?? !0) && t.value)
|
|
3041
3097
|
};
|
|
3042
3098
|
}
|
|
3043
|
-
export {
|
|
3099
|
+
export { yi as A, Tr as B, Hi as C, Wi as D, Di as E, mi as F, yr as H, Vr as I, zr as L, _i as M, gi as N, Oi as O, hi as P, Pr as R, Ni as S, Ri as T, br as V, ca as _, zo as a, Ji as b, vo as c, ho as d, Pa as f, ma as g, Ea as h, Go as i, vi as j, di as k, xo as l, Aa as m, rs as n, Io as o, Na as p, ts as r, Oo as s, as as t, _o as u, oa as v, Li as w, Ai as x, Zi as y, Mr as z };
|
|
3044
3100
|
|
|
3045
|
-
//# sourceMappingURL=composables-
|
|
3101
|
+
//# sourceMappingURL=composables-CsfQlmcf.js.map
|