@templatical/editor 0.56.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{AiAltTextPopover-DdsvhE78.js → AiAltTextPopover-BjClNscQ.js} +6 -6
- package/dist/{AiAltTextReview-P6to1_0t.js → AiAltTextReview-DeMdVbtT.js} +7 -7
- package/dist/{AiChatPanel-BSlmzMRC.js → AiChatPanel-Cros4ZCM.js} +64 -67
- package/dist/AiPanels-D_CdHqFZ.js +26 -0
- package/dist/{AiRewriteMenu-DIISOR6U.js → AiRewriteMenu-BSzj1dKC.js} +53 -53
- package/dist/{BlockIssueBadge-Bmtc50BQ.js → BlockIssueBadge-i2cZy5PB.js} +6 -6
- package/dist/{BlockPreviewCanvas-BYIzNn-9.js → BlockPreviewCanvas-D-If_vd_.js} +58 -58
- package/dist/{CloudHeaderExtras-Cqhw-jMz.js → CloudHeaderExtras-CJsXi4Ku.js} +2 -2
- package/dist/{CloudPanels-w34W8_BP.js → CloudPanels-DPeK_siQ.js} +14 -14
- package/dist/{CollaborationNotices-HTbCebjV.js → CollaborationNotices-DkYX-ose.js} +9 -9
- package/dist/{CollaboratorBar-CLQjksX-.js → CollaboratorBar-xDweDvB6.js} +3 -3
- package/dist/CommentsPanel-t3w16YUl.js +23 -0
- package/dist/CommentsSidebar-B3M90RY_.js +516 -0
- package/dist/{CountdownBlock-BTXcCvjZ.js → CountdownBlock-BrR2uqM3.js} +7 -7
- package/dist/{CountdownToolbar-CP-pkntQ.js → CountdownToolbar-DBu2ZqC6.js} +32 -32
- package/dist/{IssuesPanel-CiiNBzH0.js → IssuesPanel-BnUut-p-.js} +89 -89
- package/dist/LanguageMenu-DfTxrbvp.js +403 -0
- package/dist/{LoadingTrack-BG8cg9xi.js → LoadingTrack-c4SeD16s.js} +1 -1
- package/dist/{LocaleNotices-CTCZ7BYv.js → LocaleNotices-D6zk-QCL.js} +11 -11
- package/dist/{LogicTagInsertButton-DEOPc4RC.js → LogicTagInsertButton-CJ1Jk6jv.js} +65 -65
- package/dist/{MediaEditModal-DJsPLTwP.js → MediaEditModal-BxbwZxnf.js} +10 -10
- package/dist/{MediaPanels-D2WD2aE2.js → MediaPanels-BiUxsTMM.js} +2 -2
- package/dist/{MergeTagInput-C9icdxw7.js → MergeTagInput-CV-z85s9.js} +13 -13
- package/dist/{MergeTagModeToggle-DXvb80OE.js → MergeTagModeToggle-CixgX5C_.js} +7 -7
- package/dist/{MergeTagTextarea-CrAcmT3A.js → MergeTagTextarea-B1zOC_Nr.js} +9 -9
- package/dist/{ParagraphEditor-BWBQ3jKz.js → ParagraphEditor-C9UhWvRB.js} +174 -174
- package/dist/{RestoreVersionDialog-CqAp16yQ.js → RestoreVersionDialog-Do7fZWpT.js} +13 -13
- package/dist/{RichTextEditorContent-xbBjVPVQ.js → RichTextEditorContent-wW_SMun2.js} +10 -10
- package/dist/{SaveBlockDialog-pebNJBTc.js → SaveBlockDialog-CCHIUfR-.js} +49 -49
- package/dist/{SavedBlocksBrowserModal-CvagMcv7.js → SavedBlocksBrowserModal-DtPHhfw9.js} +26 -26
- package/dist/{SavedBlocksPanels-B9AAVBDm.js → SavedBlocksPanels-CYIby5pR.js} +2 -2
- package/dist/{SavedBlocksPickBar-BIANWe3i.js → SavedBlocksPickBar-CCwBugqN.js} +10 -10
- package/dist/{TemplateSettings-ORq4PbCN.js → TemplateSettings-B8IVy5q9.js} +42 -42
- package/dist/{TestEmailModal-DRjCpcPl.js → TestEmailModal-CS5JoKRH.js} +22 -22
- package/dist/{TestEmailPanel-H0v8El__.js → TestEmailPanel-sOIZfKzc.js} +2 -2
- package/dist/{TitleEditor-CEGbJXeU.js → TitleEditor-ZlBcq9_P.js} +22 -22
- package/dist/{ToggleSwitch-R3wCCYE6.js → ToggleSwitch-BIPdFWUr.js} +1 -1
- package/dist/{Toolbar-XT-uGA9J.js → Toolbar-c4_rLLJT.js} +659 -659
- package/dist/{TplModal-7NQq5-VW.js → TplModal-DnFFEulp.js} +6 -6
- package/dist/{VersionHistoryMenu-C8BE3Pr-.js → VersionHistoryMenu-Cd2IaHgT.js} +19 -19
- package/dist/{VersionHistoryPanels-CuKuOSJG.js → VersionHistoryPanels-TdGaMaa_.js} +2 -2
- package/dist/{VersionPreviewBanner-BVFBkveR.js → VersionPreviewBanner-lkAf7tc8.js} +8 -8
- package/dist/{WrapperBlock-Bdw-072t.js → WrapperBlock-BiW4ye3w.js} +12 -12
- package/dist/{blockTypeIcons-CGplGmmr.js → blockTypeIcons-D1aYMC1M.js} +3 -3
- package/dist/bundle-stats.json +7 -7
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js → AiAltTextPopover-CfGJNBOb.js} +6 -6
- package/dist/cdn/chunks/{AiAltTextPopover-x999Gimz.js.map → AiAltTextPopover-CfGJNBOb.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js → AiAltTextReview-PKe31R_g.js} +7 -7
- package/dist/cdn/chunks/{AiAltTextReview-DjnFz1wO.js.map → AiAltTextReview-PKe31R_g.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DKDu9cs7.js → AiChatPanel-DNCUpV8n.js} +112 -115
- package/dist/cdn/chunks/AiChatPanel-DNCUpV8n.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-IV0VEkBL.js +27 -0
- package/dist/cdn/chunks/AiPanels-IV0VEkBL.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-s79rmHFy.js → AiRewriteMenu-ZDBwReuU.js} +61 -61
- package/dist/cdn/chunks/AiRewriteMenu-ZDBwReuU.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-Bnmq_M4G.js → BlockIssueBadge-DIlFDDwh.js} +6 -6
- package/dist/cdn/chunks/BlockIssueBadge-DIlFDDwh.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-D7U6nQ7t.js +156 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-D7U6nQ7t.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js → CloudHeaderExtras-CazfMn6A.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-uUJYJFJ6.js.map → CloudHeaderExtras-CazfMn6A.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DQnlH_YJ.js → CloudPanels-EXXNMLbs.js} +5 -5
- package/dist/cdn/chunks/CloudPanels-EXXNMLbs.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js → CollaborationNotices-DGA8XRZJ.js} +10 -10
- package/dist/cdn/chunks/{CollaborationNotices-CHqUGhOZ.js.map → CollaborationNotices-DGA8XRZJ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js → CollaboratorBar-BWL1Shc1.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-C1ZI2xwa.js.map → CollaboratorBar-BWL1Shc1.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js +24 -0
- package/dist/cdn/chunks/CommentsPanel-4mrl4zMK.js.map +1 -0
- package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js +486 -0
- package/dist/cdn/chunks/CommentsSidebar-BJ87vc7i.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js → CountdownBlock-Do6oItNW.js} +8 -8
- package/dist/cdn/chunks/{CountdownBlock-DyGsh92b.js.map → CountdownBlock-Do6oItNW.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js → CountdownToolbar-BN2_zvRj.js} +52 -52
- package/dist/cdn/chunks/{CountdownToolbar-Ddj2erNm.js.map → CountdownToolbar-BN2_zvRj.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DnSnEh1X.js → IssuesPanel-BDwegn0s.js} +14 -14
- package/dist/cdn/chunks/IssuesPanel-BDwegn0s.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-C2I_yTL5.js → LanguageMenu-DXq9cXUd.js} +58 -58
- package/dist/cdn/chunks/LanguageMenu-DXq9cXUd.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js → LoadingTrack-o-89hApJ.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DUYcDHOV.js.map → LoadingTrack-o-89hApJ.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js → LocaleNotices-CUN5K5QJ.js} +11 -11
- package/dist/cdn/chunks/{LocaleNotices-Dr9LRCAg.js.map → LocaleNotices-CUN5K5QJ.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js → LogicTagInsertButton-BEArlbra.js} +12 -12
- package/dist/cdn/chunks/{LogicTagInsertButton-BdzE9-l7.js.map → LogicTagInsertButton-BEArlbra.js.map} +1 -1
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js → MediaEditModal-BHTMNHx0.js} +10 -10
- package/dist/cdn/chunks/{MediaEditModal-CMJFXu_o.js.map → MediaEditModal-BHTMNHx0.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js → MediaPanels-BlianNRh.js} +3 -3
- package/dist/cdn/chunks/{MediaPanels-C790ZXuY.js.map → MediaPanels-BlianNRh.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js → MergeTagInput-B3SLXXzL.js} +14 -14
- package/dist/cdn/chunks/{MergeTagInput-CmrX8Md6.js.map → MergeTagInput-B3SLXXzL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js → MergeTagModeToggle-Dywp9ntA.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-D7maMGIM.js.map → MergeTagModeToggle-Dywp9ntA.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js → MergeTagTextarea-B9TM7FgM.js} +7 -7
- package/dist/cdn/chunks/{MergeTagTextarea-KOnd2teB.js.map → MergeTagTextarea-B9TM7FgM.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js → ParagraphEditor-CVGtTYta.js} +107 -107
- package/dist/cdn/chunks/{ParagraphEditor-I9lbKaPk.js.map → ParagraphEditor-CVGtTYta.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DqbULAbc.js → RestoreVersionDialog-Dt_0qOOW.js} +13 -13
- package/dist/cdn/chunks/RestoreVersionDialog-Dt_0qOOW.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js → RichTextEditorContent-BjN4mnzL.js} +9 -9
- package/dist/cdn/chunks/{RichTextEditorContent-_O22z0pn.js.map → RichTextEditorContent-BjN4mnzL.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js → SaveBlockDialog-D9eBjE99.js} +51 -51
- package/dist/cdn/chunks/{SaveBlockDialog-CClRLXgF.js.map → SaveBlockDialog-D9eBjE99.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js → SavedBlocksBrowserModal-ClsTpkdk.js} +24 -24
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BIaxaxw9.js.map → SavedBlocksBrowserModal-ClsTpkdk.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js → SavedBlocksPanels-CxlNHhUs.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-Dfu9N6YW.js.map → SavedBlocksPanels-CxlNHhUs.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js → SavedBlocksPickBar-C7_Z8phX.js} +12 -12
- package/dist/cdn/chunks/{SavedBlocksPickBar-DiMW_dbJ.js.map → SavedBlocksPickBar-C7_Z8phX.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js → TemplateSettings-B6zDtjSs.js} +102 -102
- package/dist/cdn/chunks/{TemplateSettings-JMUo0LIV.js.map → TemplateSettings-B6zDtjSs.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js → TestEmailModal-CJ_QYFua.js} +21 -21
- package/dist/cdn/chunks/{TestEmailModal-D52VtwBZ.js.map → TestEmailModal-CJ_QYFua.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js → TestEmailPanel-CsFrTq_a.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-D9ezVDHd.js.map → TestEmailPanel-CsFrTq_a.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js → TitleEditor-CuKJptyw.js} +20 -20
- package/dist/cdn/chunks/{TitleEditor-D04vvbUc.js.map → TitleEditor-CuKJptyw.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js → ToggleSwitch-C0w0srN_.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-BSkySwA1.js.map → ToggleSwitch-C0w0srN_.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-C_Hfsher.js → Toolbar-TS2WwlPW.js} +542 -542
- package/dist/cdn/chunks/Toolbar-TS2WwlPW.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js → TplModal-CsadClrH.js} +7 -7
- package/dist/cdn/chunks/{TplModal-d6fEZGJ5.js.map → TplModal-CsadClrH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js → VersionHistoryMenu-BNPxnWiO.js} +16 -16
- package/dist/cdn/chunks/{VersionHistoryMenu-C8ucm43v.js.map → VersionHistoryMenu-BNPxnWiO.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js → VersionHistoryPanels-CieY91f0.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-BAdzmhvH.js.map → VersionHistoryPanels-CieY91f0.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js → VersionPreviewBanner-BldFvgxJ.js} +9 -9
- package/dist/cdn/chunks/{VersionPreviewBanner-BWuovbFc.js.map → VersionPreviewBanner-BldFvgxJ.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js → WrapperBlock-DtnRuKWE.js} +13 -13
- package/dist/cdn/chunks/{WrapperBlock-TXDSDXUP.js.map → WrapperBlock-DtnRuKWE.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js → blockTypeIcons-19xd5ZPi.js} +6 -6
- package/dist/cdn/chunks/{blockTypeIcons-CzYA5DF9.js.map → blockTypeIcons-19xd5ZPi.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CsfQlmcf.js → composables-CUIiW9OD.js} +1190 -1170
- package/dist/cdn/chunks/composables-CUIiW9OD.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-PpIFCDfj.js → createCloudRuntime-B7D04wKf.js} +161 -147
- package/dist/cdn/chunks/createCloudRuntime-B7D04wKf.js.map +1 -0
- package/dist/cdn/chunks/da-CYWJkrTg.js +97 -0
- package/dist/cdn/chunks/da-CYWJkrTg.js.map +1 -0
- package/dist/cdn/chunks/da-qQzj0QGy.js +950 -0
- package/dist/cdn/chunks/da-qQzj0QGy.js.map +1 -0
- package/dist/cdn/chunks/{dist-BzXULHvI.js → dist-BtWMy7UQ.js} +3 -3
- package/dist/cdn/chunks/{dist-BzXULHvI.js.map → dist-BtWMy7UQ.js.map} +1 -1
- package/dist/cdn/chunks/dist-zu1jwYIS.js +405 -0
- package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-zu1jwYIS.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-DepKdldn.js → draggable-IRVFEZ-b.js} +1535 -1500
- package/dist/cdn/chunks/draggable-IRVFEZ-b.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js → editor-modal-CarOiAYJ.js} +137 -136
- package/dist/cdn/chunks/{editor-modal-B8UE9V8B.js.map → editor-modal-CarOiAYJ.js.map} +1 -1
- package/dist/cdn/chunks/en-B4s_0ryk.js +1 -0
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js → extensions-Cbvk9i08.js} +96 -96
- package/dist/cdn/chunks/{extensions-BM6ZSnsQ.js.map → extensions-Cbvk9i08.js.map} +1 -1
- package/dist/cdn/chunks/{icons-DHExFLlT.js → icons-Cl4oR2mf.js} +73 -73
- package/dist/cdn/chunks/icons-Cl4oR2mf.js.map +1 -0
- package/dist/cdn/chunks/keys-BQqbBUag.js +11 -0
- package/dist/cdn/chunks/keys-BQqbBUag.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js → normalizeMergeTagMarkup-BJ-MnCqF.js} +55 -55
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-aWjkotui.js.map → normalizeMergeTagMarkup-BJ-MnCqF.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js → preRenderCustomBlocks-D2wISRHq.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dn6dFUwx.js.map → preRenderCustomBlocks-D2wISRHq.js.map} +1 -1
- package/dist/cdn/chunks/sanitizeHtml-CB7fjHFs.js +72 -0
- package/dist/cdn/chunks/sanitizeHtml-CB7fjHFs.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-Qw9rHc8C.js → socialIcons-C_yggK1_.js} +575 -524
- package/dist/cdn/chunks/socialIcons-C_yggK1_.js.map +1 -0
- package/dist/cdn/chunks/{src-C9JWWxAk.js → src-Bp7bZcuD.js} +108 -95
- package/dist/cdn/chunks/src-Bp7bZcuD.js.map +1 -0
- package/dist/cdn/chunks/{src-mXG-Of9A.js → src-CdVAke9t.js} +721 -696
- package/dist/cdn/chunks/src-CdVAke9t.js.map +1 -0
- package/dist/cdn/chunks/{src-Bfj1jHnn.js → src-D-URHI0Z.js} +232 -228
- package/dist/cdn/chunks/src-D-URHI0Z.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-BPiZqxCt.js} +42 -33
- package/dist/cdn/chunks/tiptap-BPiZqxCt.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js → useCloudI18n-Dr4S2TRW.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-Xsih9yRH.js.map → useCloudI18n-Dr4S2TRW.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-B_kf_k-g.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-Beau2Z_T.js.map → useEditorRoot-B_kf_k-g.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-D8s7HtTn.js → useI18n-CSf-ZpcM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-D8s7HtTn.js.map → useI18n-CSf-ZpcM.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-slFOCPrh.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-Bgg4qpev.js.map → useLocalizedDisplay-slFOCPrh.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js → useLogicTag-lPjCGeGC.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-DLvWzWsp.js.map → useLogicTag-lPjCGeGC.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js → useMergeTag-BKNBwIry.js} +8 -8
- package/dist/cdn/chunks/{useMergeTag-B4FHCGGm.js.map → useMergeTag-BKNBwIry.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js → usePopoverPosition-BJFFi8x6.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-esO6wjvU.js.map → usePopoverPosition-BJFFi8x6.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js → useScrollToBlock-MI4PP5lk.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-CJuUu7Xj.js.map → useScrollToBlock-MI4PP5lk.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js → withCurrentFont-CzTFFaJA.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-QqBilClC.js.map → withCurrentFont-CzTFFaJA.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +784 -762
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CcuCoJDh.js → check-C7ua4TAK.js} +1 -1
- package/dist/{chevron-down-BfYIbFbC.js → chevron-down-DftQrAkI.js} +1 -1
- package/dist/{chevron-right-DyjFqY35.js → chevron-right-B-DULGbg.js} +1 -1
- package/dist/{chevron-up-BHEIxuS-.js → chevron-up-CeYsyD8c.js} +1 -1
- package/dist/{circle-alert-Tq7kAh9S.js → circle-exclamation-point-DHjORV_I.js} +3 -3
- package/dist/{clock-Df0ZiXwQ.js → clock-CajOtLEZ.js} +1 -1
- package/dist/{composables-CRX6rncm.js → composables-DbjgUQlV.js} +1663 -1643
- package/dist/{createCloudRuntime-DplyIlsy.js → createCloudRuntime-Cnh2M6iT.js} +54 -40
- package/dist/{createLucideIcon-CfBdtoUw.js → createLucideIcon-D-mELTSY.js} +6 -6
- package/dist/da-CYWJkrTg.js +95 -0
- package/dist/da-qQzj0QGy.js +948 -0
- package/dist/{dist-CX7skkvG.js → dist-A328tG0Z.js} +2 -2
- package/dist/{dist-B8dY8drK.js → dist-B15BvV94.js} +2 -2
- package/dist/{dist-TAv500j6.js → dist-B3G4Yvpd.js} +3 -3
- package/dist/dist-B6ptxfPo.js +406 -0
- package/dist/{dist-ChOb5XHW.js → dist-BmV-2uBJ.js} +2 -2
- package/dist/{dist-fqSers8_.js → dist-BxKFi2h_.js} +199 -199
- package/dist/{dist-BMUUt3zJ.js → dist-CAvsz9cW.js} +680 -655
- package/dist/{dist-D_XrUEET.js → dist-CMBOqk9I.js} +7 -7
- package/dist/{dist-DZ3X-uB8.js → dist-CXTsTO5h.js} +2 -2
- package/dist/{dist-B9a7iVye.js → dist-D5BUcCjv.js} +2 -2
- package/dist/dist-D9cbSSSx.js +4 -0
- package/dist/{dist-54VCNoC0.js → dist-DAdrn64r.js} +2 -2
- package/dist/{dist-BWflWcpW.js → dist-DENg3ORe.js} +33 -24
- package/dist/{dist-C3hu_C3w.js → dist-DI_8rB1X.js} +2 -2
- package/dist/dist-ELLEk-lS.js +4 -0
- package/dist/{editor-modal-D9HT9bD6.js → editor-modal-CgsaLpwB.js} +110 -109
- package/dist/en-DBLcB-CW.js +1 -0
- package/dist/{extensions-Cm6K4SRX.js → extensions-7fb-XtNJ.js} +180 -180
- package/dist/{eye-B3psrAqd.js → eye-fe5sKF_K.js} +1 -1
- package/dist/{image-C3yuPDxx.js → image-CUC7SZiW.js} +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/{info-DKja7A68.js → info-DDbLU4pT.js} +1 -1
- package/dist/keys-D9oKZN1h.js +9 -0
- package/dist/{link-DhzPI4Hn.js → link-C2icj0iH.js} +1 -1
- package/dist/{list-DVGn7Ik2.js → list-KYC_Jb5A.js} +1 -1
- package/dist/{loader-circle-DqKWsMHO.js → loader-circle-DmyagWpc.js} +1 -1
- package/dist/{message-circle-C4TonoBs.js → message-circle-ijyWn6UJ.js} +1 -1
- package/dist/{normalizeMergeTagMarkup-Da9JAgx7.js → normalizeMergeTagMarkup-GrXJfXsQ.js} +82 -82
- package/dist/{package-9OkiEO4S.js → package-CKYm_jQY.js} +1 -1
- package/dist/{pencil-M9vkOB7C.js → pencil-C2TRSR-Y.js} +1 -1
- package/dist/{plus-DxZiv9YC.js → plus-CotJVDxb.js} +1 -1
- package/dist/{preRenderCustomBlocks-CdqSp2P7.js → preRenderCustomBlocks-DuXtzD-F.js} +3 -3
- package/dist/{refresh-cw-UY8_sdFG.js → refresh-cw-CuCRV6D5.js} +1 -1
- package/dist/{rotate-ccw-BFTGCpHn.js → rotate-ccw-BlnQ3y6R.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-DlHp8xgy.js → runtime-dom.esm-bundler-nN-jsqr1.js} +20 -20
- package/dist/{sanitizeHtml-wBibnBF4.js → sanitizeHtml-eV4_BpI6.js} +25 -14
- package/dist/{search-RuGJnMEn.js → search-Dxw6oFrZ.js} +1 -1
- package/dist/{send-DGB1ar02.js → send-C-blQBZ9.js} +1 -1
- package/dist/{smartphone-CVA29CU_.js → smartphone-rLz4X-Dd.js} +1 -1
- package/dist/{socialIcons-CJD6OsI7.js → socialIcons-brRkK9Om.js} +600 -549
- package/dist/{sparkles-IHfEwEcd.js → sparkles-JWQlUiSn.js} +1 -1
- package/dist/{square-_Cl44UU6.js → square-DshDy1Il.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +976 -954
- package/dist/{text-align-start-Dqk2Xt_Q.js → text-align-start-CyasaQtr.js} +13 -13
- package/dist/{trash-Cr7rD5Hh.js → trash-B1lZp2Tv.js} +1 -1
- package/dist/{triangle-alert-CKcpwtUj.js → triangle-exclamation-point-BhJvBEoT.js} +3 -3
- package/dist/{upload-DR9pqVON.js → upload-CNK8JX38.js} +1 -1
- package/dist/{useCloudI18n-BczJoFf4.js → useCloudI18n-HhCZYRV6.js} +2 -2
- package/dist/useEditorRoot-B0Njczhx.js +7 -0
- package/dist/{useI18n-zeWYtWSv.js → useI18n-CM9vKbYc.js} +2 -2
- package/dist/{cdn/chunks/useLocalizedDisplay-Bgg4qpev.js → useLocalizedDisplay-DoaT7nWk.js} +2 -4
- package/dist/{useLogicTag-DLkYos2Q.js → useLogicTag-cTC2KbWd.js} +4 -4
- package/dist/{useMergeTag-IoWOO679.js → useMergeTag-D2YDZ8vR.js} +8 -8
- package/dist/{usePopoverPosition-Br3zt_MQ.js → usePopoverPosition-CVRzzLkC.js} +2 -2
- package/dist/{useScrollToBlock-BfOzc1Z6.js → useScrollToBlock-vf_KD0FM.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BJXc_Mri.js → vue.runtime.esm-bundler-BE5V8ADU.js} +414 -362
- package/dist/{withCurrentFont-m_PHcOD0.js → withCurrentFont-DAmED4fN.js} +1 -1
- package/dist/{x-DZSFHafL.js → x-DbLX5Qdm.js} +1 -1
- package/package.json +23 -23
- package/dist/AiPanels-DAsnX-a3.js +0 -31
- package/dist/CommentsPanel-C5qG17Ki.js +0 -16
- package/dist/CommentsSidebar-C7CWcUYZ.js +0 -526
- package/dist/LanguageMenu-B981Av-6.js +0 -403
- package/dist/cdn/chunks/AiChatPanel-DKDu9cs7.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-jMLVaiKx.js +0 -32
- package/dist/cdn/chunks/AiPanels-jMLVaiKx.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-s79rmHFy.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-Bnmq_M4G.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js +0 -156
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-DQnlH_YJ.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-EtdTzTmq.js +0 -18
- package/dist/cdn/chunks/CommentsPanel-EtdTzTmq.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-Qmj049QX.js +0 -496
- package/dist/cdn/chunks/CommentsSidebar-Qmj049QX.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-DnSnEh1X.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-C2I_yTL5.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-DqbULAbc.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +0 -1
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-PpIFCDfj.js.map +0 -1
- package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +0 -1
- package/dist/cdn/chunks/en-CVxNoHww.js +0 -1
- package/dist/cdn/chunks/icons-DHExFLlT.js.map +0 -1
- package/dist/cdn/chunks/keys-BUmIvYy3.js +0 -11
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-DJI7vvET.js +0 -61
- package/dist/cdn/chunks/sanitizeHtml-DJI7vvET.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-Qw9rHc8C.js.map +0 -1
- package/dist/cdn/chunks/src-Bfj1jHnn.js.map +0 -1
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +0 -1
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Dipw_zOQ.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-Beau2Z_T.js +0 -9
- package/dist/dist-0alKVRc_.js +0 -406
- package/dist/dist-6DU0me3E.js +0 -4
- package/dist/dist-CcOn7WCo.js +0 -4
- package/dist/en-De3uAutQ.js +0 -1
- package/dist/keys-w_VRjoMu.js +0 -9
- package/dist/useEditorRoot-BcXKhM_8.js +0 -7
- package/dist/useLocalizedDisplay-Cbhx208c.js +0 -31
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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";
|
|
1
|
+
import { a as e, c as t, i as n, l as r } from "./dist-zu1jwYIS.js";
|
|
2
|
+
import { A as i, B as a, C as o, E as s, F as c, G as l, H as u, I as d, K as f, L as p, M as m, N as h, O as g, P as _, Q as v, R as y, S as b, W as x, X as S, Y as C, _ as w, b as T, c as E, ct as D, dt as O, f as ee, g as k, h as A, j, l as M, m as N, mt as P, ot as F, p as I, pt as L, rt as R, s as z, st as B, t as V, tt as H, u as U, x as W } from "./draggable-IRVFEZ-b.js";
|
|
3
|
+
import { t as te } from "./useEditorRoot-B_kf_k-g.js";
|
|
4
|
+
import { t as G } from "./useI18n-CSf-ZpcM.js";
|
|
5
|
+
import "./useCloudI18n-Dr4S2TRW.js";
|
|
6
|
+
import { t as K } from "./useMergeTag-BKNBwIry.js";
|
|
7
|
+
import { _ as ne, h as q, v as J, y as re } from "./dist-BtWMy7UQ.js";
|
|
8
|
+
import { $ as ie, $t as ae, A as Y, B as X, C as Z, Cn as Q, D as oe, E as se, G as ce, H as le, I as ue, K as de, L as fe, M as pe, N as me, O as he, P as ge, Q as _e, Qt as ve, R as ye, S as be, Sn as xe, T as Se, Tn as Ce, W as we, X as Te, Y as Ee, Z as De, a as Oe, at as ke, b as Ae, bn as je, cn as Me, ct as Ne, d as Pe, dn as Fe, dt as Ie, et as Le, gn as Re, hn as ze, ht as Be, i as Ve, in as He, it as Ue, j as We, jt as Ge, ln as Ke, lt as qe, mt as Je, nt as Ye, p as Xe, pt as Ze, q as Qe, qt as $e, rt as et, sn as tt, st as nt, t as rt, tt as it, u as at, vt as ot, w as st, wn as ct, x as lt, xn as ut, y as dt, yn as ft } from "./src-CdVAke9t.js";
|
|
17
9
|
import { t as $ } from "./logger-CqQTfJGx.js";
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
10
|
+
import { a as pt, c as mt, i as ht, n as gt, o as _t, t as vt } from "./usePopoverPosition-BJFFi8x6.js";
|
|
11
|
+
import { n as yt } from "./useLocalizedDisplay-slFOCPrh.js";
|
|
12
|
+
import { A as bt, B as xt, C as St, D as Ct, F as wt, G as Tt, H as Et, I as Dt, J as Ot, K as kt, L as At, M as jt, N as Mt, O as Nt, P as Pt, Q as Ft, R as It, S as Lt, T as Rt, U as zt, V as Bt, W as Vt, X as Ht, Y as Ut, _ as Wt, a as Gt, at as Kt, b as qt, c as Jt, ct as Yt, d as Xt, et as Zt, g as Qt, h as $t, i as en, it as tn, j as nn, k as rn, l as an, m as on, nt as sn, ot as cn, p as ln, q as un, r as dn, rt as fn, s as pn, st as mn, tt as hn, u as gn, v as _n, w as vn, x as yn, y as bn, z as xn } from "./keys-BQqbBUag.js";
|
|
13
|
+
import { t as Sn } from "./useLogicTag-lPjCGeGC.js";
|
|
14
|
+
import { B as Cn, C as wn, F as Tn, I as En, P as Dn, R as On, T as kn, _ as An, a as jn, f as Mn, h as Nn, n as Pn, o as Fn, t as In, u as Ln, v as Rn, w as zn, x as Bn, y as Vn, z as Hn } from "./socialIcons-C_yggK1_.js";
|
|
15
|
+
import { r as Un, t as Wn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
16
|
+
import { r as Gn, t as Kn } from "./sanitizeHtml-CB7fjHFs.js";
|
|
17
|
+
import { At as qn, G as Jn, Mt as Yn, Nt as Xn, Ot as Zn, St as Qn, Ut as $n, V as er, Wt as tr, X as nr, _t as rr, d as ir, f as ar, k as or, mt as sr, nt as cr, o as lr, y as ur, yt as dr } from "./icons-Cl4oR2mf.js";
|
|
18
|
+
import { t as fr } from "./LoadingTrack-o-89hApJ.js";
|
|
19
|
+
import { t as pr } from "./languageName-DEEOhDWI.js";
|
|
20
|
+
import { t as mr } from "./plural-CyxrJXL1.js";
|
|
21
|
+
import { m as hr, w as gr, x as _r } from "./styleConstants-CgiNKdnc.js";
|
|
22
|
+
import { t as vr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
23
|
+
import { t as yr } from "./readableTextColor-BfZUGnVj.js";
|
|
24
24
|
// src/composables/useFocusTrap.ts
|
|
25
|
-
var
|
|
26
|
-
function
|
|
27
|
-
let
|
|
25
|
+
var br = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
26
|
+
function xr(t, n) {
|
|
27
|
+
let r = te(), i = null, a = null, o = null;
|
|
28
28
|
function s() {
|
|
29
|
-
return
|
|
29
|
+
return t.value ? Array.from(t.value.querySelectorAll(br)).filter((e) => e.offsetParent !== null) : [];
|
|
30
30
|
}
|
|
31
31
|
function c(e) {
|
|
32
32
|
if (e.key !== "Tab") return;
|
|
33
33
|
let t = s();
|
|
34
34
|
if (t.length === 0) return;
|
|
35
|
-
let
|
|
36
|
-
e.shiftKey ?
|
|
35
|
+
let n = t[0], i = t[t.length - 1];
|
|
36
|
+
e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
|
|
37
37
|
}
|
|
38
38
|
function l() {
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let
|
|
43
|
-
|
|
44
|
-
}),
|
|
45
|
-
}
|
|
46
|
-
function
|
|
39
|
+
let n = a !== null || o !== null;
|
|
40
|
+
n && d({ restoreFocus: !1 }), n || (i = r.activeElement), o = requestAnimationFrame(() => {
|
|
41
|
+
o = null;
|
|
42
|
+
let e = s();
|
|
43
|
+
e.length > 0 && (t.value?.querySelector("[autofocus], input:not([disabled])") ?? e[0]).focus();
|
|
44
|
+
}), a = e(t, "keydown", c);
|
|
45
|
+
}
|
|
46
|
+
function d(e = {}) {
|
|
47
47
|
let t = e.restoreFocus !== !1;
|
|
48
|
-
|
|
48
|
+
o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
e && t ? l() :
|
|
50
|
+
let f = u([n, t], ([e, t]) => {
|
|
51
|
+
e && t ? l() : d();
|
|
52
52
|
}, { flush: "post" });
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
v(() => {
|
|
54
|
+
f(), d();
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// src/composables/useEmoji.ts
|
|
58
|
-
function
|
|
59
|
-
let [e, t] =
|
|
60
|
-
|
|
58
|
+
function Sr() {
|
|
59
|
+
let [e, t] = J(!1), n = R([]), r = !1;
|
|
60
|
+
v(() => {
|
|
61
61
|
r = !0;
|
|
62
|
-
}),
|
|
62
|
+
}), u(e, async (e) => {
|
|
63
63
|
if (e && n.value.length === 0) {
|
|
64
64
|
let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
|
|
65
65
|
if (r) return;
|
|
@@ -80,18 +80,18 @@ function br() {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
// src/composables/useBlockRegistry.ts
|
|
83
|
-
function
|
|
84
|
-
let e =
|
|
83
|
+
function Cr() {
|
|
84
|
+
let e = R(/* @__PURE__ */ new Map());
|
|
85
85
|
function t(t, n) {
|
|
86
|
-
e.value.set(t, n),
|
|
86
|
+
e.value.set(t, n), B(e);
|
|
87
87
|
}
|
|
88
88
|
function n(t, n) {
|
|
89
89
|
let r = `custom:${t.type}`;
|
|
90
90
|
e.value.set(r, {
|
|
91
91
|
component: n,
|
|
92
|
-
createBlock: () =>
|
|
92
|
+
createBlock: () => be(t),
|
|
93
93
|
definition: t
|
|
94
|
-
}),
|
|
94
|
+
}), B(e);
|
|
95
95
|
}
|
|
96
96
|
function r(t) {
|
|
97
97
|
if (t.type === "custom") {
|
|
@@ -114,7 +114,7 @@ function xr() {
|
|
|
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 fe(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 xr() {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
// src/composables/useFonts.ts
|
|
136
|
-
var
|
|
136
|
+
var wr = [
|
|
137
137
|
{
|
|
138
138
|
value: "Arial",
|
|
139
139
|
label: "Arial"
|
|
@@ -162,19 +162,19 @@ var Sr = [
|
|
|
162
162
|
value: "Courier New",
|
|
163
163
|
label: "Courier New"
|
|
164
164
|
}
|
|
165
|
-
],
|
|
166
|
-
function
|
|
167
|
-
if (e === void 0 || e === !0) return [...
|
|
165
|
+
], Tr = "Arial, sans-serif";
|
|
166
|
+
function Er(e) {
|
|
167
|
+
if (e === void 0 || e === !0) return [...wr];
|
|
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 = wr.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: ${wr.map((e) => e.value).join(", ")}.`));
|
|
173
173
|
}
|
|
174
174
|
return t;
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
let t =
|
|
176
|
+
function Dr(e) {
|
|
177
|
+
let t = H(e?.customFonts ?? []), n = H(!1), r = Er(e?.builtIns), i = I(() => e?.defaultFallback ?? Tr), a = I(() => {
|
|
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 Tr(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 ?? Tr.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 Tr;
|
|
196
196
|
}
|
|
197
|
-
let l =
|
|
197
|
+
let l = I(() => c());
|
|
198
198
|
function u(e) {
|
|
199
|
-
return
|
|
199
|
+
return Ve(e, {
|
|
200
200
|
customFonts: t.value,
|
|
201
201
|
defaultFallback: i.value
|
|
202
202
|
});
|
|
@@ -218,14 +218,14 @@ function Tr(e) {
|
|
|
218
218
|
$.warn(`Failed to load custom font "${e.name}":`, t);
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
await Promise.allSettled(e),
|
|
221
|
+
await Promise.allSettled(e), f || (n.value = !0);
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function m() {
|
|
224
224
|
for (let e of d) e.remove();
|
|
225
225
|
d.length = 0;
|
|
226
226
|
}
|
|
227
|
-
return
|
|
228
|
-
f = !0,
|
|
227
|
+
return C() && v(() => {
|
|
228
|
+
f = !0, m();
|
|
229
229
|
}), {
|
|
230
230
|
fonts: a,
|
|
231
231
|
defaultFont: l,
|
|
@@ -233,13 +233,13 @@ function Tr(e) {
|
|
|
233
233
|
customFonts: t,
|
|
234
234
|
isLoaded: n,
|
|
235
235
|
loadCustomFonts: p,
|
|
236
|
-
cleanupFontLinks:
|
|
236
|
+
cleanupFontLinks: m,
|
|
237
237
|
resolveFontFamily: u,
|
|
238
238
|
getDefaultFont: c
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
241
|
// src/composables/useThemeStyles.ts
|
|
242
|
-
var
|
|
242
|
+
var Or = {
|
|
243
243
|
bg: "--tpl-bg",
|
|
244
244
|
bgElevated: "--tpl-bg-elevated",
|
|
245
245
|
bgHover: "--tpl-bg-hover",
|
|
@@ -263,10 +263,10 @@ var Er = {
|
|
|
263
263
|
dangerLight: "--tpl-danger-light",
|
|
264
264
|
canvasBg: "--tpl-canvas-bg"
|
|
265
265
|
};
|
|
266
|
-
function
|
|
267
|
-
return { themeStyles:
|
|
266
|
+
function kr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
267
|
+
return { themeStyles: I(() => {
|
|
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(Or)) {
|
|
270
270
|
let n = a[e];
|
|
271
271
|
n && (r[t] = n);
|
|
272
272
|
}
|
|
@@ -274,12 +274,12 @@ function Dr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
274
274
|
}) };
|
|
275
275
|
}
|
|
276
276
|
// src/utils/mergeTagNodeSpec.ts
|
|
277
|
-
function
|
|
278
|
-
return
|
|
277
|
+
function Ar(e, t, n) {
|
|
278
|
+
return De(e, n) ? {
|
|
279
279
|
type: "logicMergeTagNode",
|
|
280
280
|
attrs: {
|
|
281
281
|
value: e,
|
|
282
|
-
keyword:
|
|
282
|
+
keyword: ce(e, n)
|
|
283
283
|
}
|
|
284
284
|
} : {
|
|
285
285
|
type: "mergeTagNode",
|
|
@@ -290,32 +290,32 @@ function Or(e, t, n) {
|
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
292
|
// src/utils/insertLogicTag.ts
|
|
293
|
-
function
|
|
293
|
+
function jr(e) {
|
|
294
294
|
return "before" in e && "after" in e;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
297
|
-
if (!
|
|
298
|
-
e.chain().focus().insertContent(
|
|
296
|
+
function Mr(e, t, n) {
|
|
297
|
+
if (!jr(t)) {
|
|
298
|
+
e.chain().focus().insertContent(Ar(t.value, t.label, n)).run();
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
|
-
let r =
|
|
301
|
+
let r = Ar(t.before, t.label, n), i = Ar(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 Nr(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 Pr(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) => Nr(_t(e.style.color)),
|
|
317
317
|
renderHTML: (e) => {
|
|
318
|
-
let t =
|
|
318
|
+
let t = Nr(e.color);
|
|
319
319
|
return t ? { style: `color: ${t}` } : {};
|
|
320
320
|
}
|
|
321
321
|
}
|
|
@@ -323,9 +323,9 @@ function Mr(e) {
|
|
|
323
323
|
} });
|
|
324
324
|
}
|
|
325
325
|
// src/composables/useRichTextLinkDialog.ts
|
|
326
|
-
function
|
|
327
|
-
let r =
|
|
328
|
-
|
|
326
|
+
function Fr(e, t = le.liquid, n = () => !0) {
|
|
327
|
+
let r = H(!1), i = H(""), a = H(""), o = H(null);
|
|
328
|
+
xr(o, r);
|
|
329
329
|
function s() {
|
|
330
330
|
if (!n()) return;
|
|
331
331
|
let t = e.value?.getAttributes("link") ?? {};
|
|
@@ -336,7 +336,7 @@ function Nr(e, t = te.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 = Nr(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 Nr(e, t = te.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 = Pe(t);
|
|
357
|
+
return n ? at.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,131 +378,131 @@ function Nr(e, t = te.liquid, n = () => !0) {
|
|
|
378
378
|
};
|
|
379
379
|
}
|
|
380
380
|
// src/composables/useRichTextEditor.ts
|
|
381
|
-
function
|
|
382
|
-
let
|
|
383
|
-
|
|
384
|
-
let t =
|
|
381
|
+
function Ir(t) {
|
|
382
|
+
let n = g(_n, null), r = mt(), i = g(Ut, null), a = I(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: c, requestMergeTag: l, syntax: d, autocomplete: f } = K(), { canInsertLogicTag: p, isRequesting: h, requestLogicTag: _ } = Sn(), v = g(fn, null), y = (S(v) ? v.value : v)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", b = Ee(d), x = R(null), C = n?.content ? yt(n) : null, w = () => Ie(C?.settings.value ?? { locale: "en" });
|
|
383
|
+
u(w, (e) => {
|
|
384
|
+
let t = x.value?.view.dom;
|
|
385
385
|
t && t.setAttribute("dir", e);
|
|
386
386
|
});
|
|
387
|
-
let { showLinkDialog:
|
|
388
|
-
|
|
389
|
-
if (
|
|
390
|
-
|
|
391
|
-
let e =
|
|
387
|
+
let { showLinkDialog: T, linkUrl: E, linkColor: D, linkDialogRef: O, openLinkDialog: ee, insertLink: k, removeLink: A, closeLinkDialog: j, handleLinkKeydown: M } = Fr(x, d, () => a.value);
|
|
388
|
+
u(a, (e) => {
|
|
389
|
+
if (x.value?.setEditable(e, !1), !e) {
|
|
390
|
+
j();
|
|
391
|
+
let e = x.value;
|
|
392
392
|
e && e.view.dispatch(e.state.tr);
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
|
-
let { start:
|
|
396
|
-
async function
|
|
397
|
-
|
|
395
|
+
let { start: N, stop: P } = ne(() => x.value?.commands.focus("end"), 0, { immediate: !1 }), F = R(null), L = H(!0), z = H(null), B = !1, V = null;
|
|
396
|
+
async function U() {
|
|
397
|
+
z.value = null, L.value = !0;
|
|
398
398
|
try {
|
|
399
|
-
let { TiptapEditor:
|
|
400
|
-
mergeTags:
|
|
401
|
-
syntax:
|
|
402
|
-
triggerChar:
|
|
403
|
-
autocompleteEnabled:
|
|
404
|
-
suggestionEmptyText:
|
|
399
|
+
let { TiptapEditor: e, EC: r, extensions: i } = await t.loadExtensions({
|
|
400
|
+
mergeTags: o,
|
|
401
|
+
syntax: d,
|
|
402
|
+
triggerChar: b,
|
|
403
|
+
autocompleteEnabled: f,
|
|
404
|
+
suggestionEmptyText: y
|
|
405
405
|
});
|
|
406
|
-
if (
|
|
407
|
-
|
|
406
|
+
if (B) return;
|
|
407
|
+
F.value = r;
|
|
408
408
|
let s = /* @__PURE__ */ new Map();
|
|
409
|
-
|
|
410
|
-
let
|
|
411
|
-
extensions:
|
|
412
|
-
content:
|
|
413
|
-
editable:
|
|
414
|
-
editorProps: { attributes: { dir:
|
|
415
|
-
onUpdate: ({ editor:
|
|
416
|
-
!
|
|
409
|
+
i.forEach((e, t) => s.set(e.name, t));
|
|
410
|
+
let c = new e({
|
|
411
|
+
extensions: i.filter((e, t) => s.get(e.name) === t),
|
|
412
|
+
content: t.blockContent(),
|
|
413
|
+
editable: a.value,
|
|
414
|
+
editorProps: { attributes: { dir: w() } },
|
|
415
|
+
onUpdate: ({ editor: e }) => {
|
|
416
|
+
!B && a.value && n && (V = e.getHTML(), n.updateBlock(t.blockId(), { content: V }));
|
|
417
417
|
}
|
|
418
418
|
});
|
|
419
|
-
if (
|
|
420
|
-
|
|
419
|
+
if (B) {
|
|
420
|
+
c.destroy();
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
|
|
424
|
-
} catch (
|
|
425
|
-
if (
|
|
426
|
-
$.error(`[${
|
|
423
|
+
x.value = c, L.value = !1, N();
|
|
424
|
+
} catch (e) {
|
|
425
|
+
if (B) return;
|
|
426
|
+
$.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), z.value = e instanceof Error ? e.message : "Failed to load editor", L.value = !1;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
|
|
429
|
+
function W() {
|
|
430
|
+
x.value?.destroy(), x.value = null, U();
|
|
431
431
|
}
|
|
432
|
-
|
|
433
|
-
let
|
|
434
|
-
|
|
432
|
+
U();
|
|
433
|
+
let te = u(() => t.blockContent(), (e) => {
|
|
434
|
+
x.value && e !== V && (V = e, x.value.getHTML() !== e && x.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
435
435
|
});
|
|
436
|
-
function
|
|
437
|
-
if (
|
|
438
|
-
let n =
|
|
436
|
+
function G(e) {
|
|
437
|
+
if (c.value || h.value) return;
|
|
438
|
+
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
439
439
|
if (!r) return;
|
|
440
|
-
|
|
440
|
+
t.onClickOutsideSideEffect?.(r);
|
|
441
441
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
442
|
-
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i ||
|
|
442
|
+
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
443
443
|
}
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
e(document, "mousedown", G), m(() => {
|
|
445
|
+
B = !0, te(), P(), x.value?.destroy();
|
|
446
446
|
});
|
|
447
|
-
async function
|
|
448
|
-
if (!
|
|
449
|
-
let e = await
|
|
450
|
-
!
|
|
447
|
+
async function q() {
|
|
448
|
+
if (!a.value) return;
|
|
449
|
+
let e = await l();
|
|
450
|
+
!B && a.value && (e && x.value ? x.value.chain().focus().insertMergeTag({
|
|
451
451
|
label: e.label,
|
|
452
452
|
value: e.value
|
|
453
|
-
}).run() :
|
|
453
|
+
}).run() : x.value?.commands.focus());
|
|
454
454
|
}
|
|
455
|
-
async function
|
|
456
|
-
if (!
|
|
457
|
-
let e = await
|
|
458
|
-
!
|
|
455
|
+
async function J() {
|
|
456
|
+
if (!a.value) return;
|
|
457
|
+
let e = await _();
|
|
458
|
+
!B && a.value && (e && x.value ? Mr(x.value, e, d) : x.value?.commands.focus());
|
|
459
459
|
}
|
|
460
460
|
return {
|
|
461
|
-
editor:
|
|
462
|
-
EditorContent:
|
|
463
|
-
isLoading:
|
|
464
|
-
isEditable:
|
|
465
|
-
initError:
|
|
466
|
-
retry:
|
|
467
|
-
showLinkDialog:
|
|
468
|
-
linkUrl:
|
|
469
|
-
linkColor:
|
|
470
|
-
linkDialogRef:
|
|
471
|
-
mergeTags:
|
|
472
|
-
canRequestMergeTag:
|
|
473
|
-
isRequestingMergeTag:
|
|
474
|
-
syntax:
|
|
475
|
-
canInsertLogicTag:
|
|
476
|
-
isRequestingLogicTag:
|
|
477
|
-
openLinkDialog:
|
|
478
|
-
insertLink:
|
|
479
|
-
removeLink:
|
|
480
|
-
closeLinkDialog:
|
|
481
|
-
handleLinkKeydown:
|
|
482
|
-
handleAddMergeTag:
|
|
483
|
-
handleAddLogicTag:
|
|
461
|
+
editor: x,
|
|
462
|
+
EditorContent: F,
|
|
463
|
+
isLoading: L,
|
|
464
|
+
isEditable: a,
|
|
465
|
+
initError: z,
|
|
466
|
+
retry: W,
|
|
467
|
+
showLinkDialog: T,
|
|
468
|
+
linkUrl: E,
|
|
469
|
+
linkColor: D,
|
|
470
|
+
linkDialogRef: O,
|
|
471
|
+
mergeTags: o,
|
|
472
|
+
canRequestMergeTag: s,
|
|
473
|
+
isRequestingMergeTag: c,
|
|
474
|
+
syntax: d,
|
|
475
|
+
canInsertLogicTag: p,
|
|
476
|
+
isRequestingLogicTag: h,
|
|
477
|
+
openLinkDialog: ee,
|
|
478
|
+
insertLink: k,
|
|
479
|
+
removeLink: A,
|
|
480
|
+
closeLinkDialog: j,
|
|
481
|
+
handleLinkKeydown: M,
|
|
482
|
+
handleAddMergeTag: q,
|
|
483
|
+
handleAddLogicTag: J
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
486
|
// src/utils/activeEditorTracker.ts
|
|
487
|
-
var
|
|
488
|
-
function
|
|
489
|
-
let e = ++
|
|
490
|
-
return
|
|
487
|
+
var Lr = /* @__PURE__ */ new Set(), Rr = 0, zr = 0;
|
|
488
|
+
function Br() {
|
|
489
|
+
let e = ++zr;
|
|
490
|
+
return Lr.add(e), Rr === 0 && (Rr = e), {
|
|
491
491
|
id: e,
|
|
492
|
-
isActive: () =>
|
|
492
|
+
isActive: () => Lr.size <= 1 || Rr === e,
|
|
493
493
|
claim: () => {
|
|
494
|
-
|
|
494
|
+
Rr = e;
|
|
495
495
|
},
|
|
496
496
|
dispose: () => {
|
|
497
|
-
if (
|
|
498
|
-
let e = Array.from(
|
|
499
|
-
|
|
497
|
+
if (Lr.delete(e), Rr === e) {
|
|
498
|
+
let e = Array.from(Lr);
|
|
499
|
+
Rr = e[e.length - 1] ?? 0;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
};
|
|
503
503
|
}
|
|
504
504
|
// src/utils/resolveLintOptions.ts
|
|
505
|
-
function
|
|
505
|
+
function Vr(e) {
|
|
506
506
|
let t = e.contentLocale ?? e.content?.settings.locale;
|
|
507
507
|
return {
|
|
508
508
|
...e.lint,
|
|
@@ -511,25 +511,25 @@ function zr(e) {
|
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
// src/composables/usePreviewResolution.ts
|
|
514
|
-
var
|
|
515
|
-
function
|
|
516
|
-
let t = typeof e.resolvePreview == "function", n =
|
|
517
|
-
function
|
|
518
|
-
|
|
514
|
+
var Hr = 500;
|
|
515
|
+
function Ur(e) {
|
|
516
|
+
let t = typeof e.resolvePreview == "function", n = H(null), r = H(!1), i = H(!1), a = 0, o = null;
|
|
517
|
+
function s() {
|
|
518
|
+
o !== null && (clearTimeout(o), o = null);
|
|
519
519
|
}
|
|
520
|
-
async function
|
|
520
|
+
async function c() {
|
|
521
521
|
let t = e.resolvePreview;
|
|
522
522
|
if (!t) return;
|
|
523
523
|
let o = ++a;
|
|
524
524
|
r.value = !0;
|
|
525
525
|
let s = {
|
|
526
|
-
content:
|
|
526
|
+
content: He(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 (!rt(e)) {
|
|
533
533
|
i.value = !0;
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
@@ -541,34 +541,34 @@ function Vr(e) {
|
|
|
541
541
|
o === a && (r.value = !1);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
545
|
-
t && (
|
|
546
|
-
|
|
547
|
-
},
|
|
544
|
+
function l() {
|
|
545
|
+
t && (s(), n.value === null ? c() : o = setTimeout(() => {
|
|
546
|
+
o = null, c();
|
|
547
|
+
}, Hr));
|
|
548
548
|
}
|
|
549
|
-
return
|
|
549
|
+
return u(() => [
|
|
550
550
|
e.isActive(),
|
|
551
551
|
e.getRecipient?.(),
|
|
552
552
|
e.getLocale?.()
|
|
553
553
|
], ([e, , t], o) => {
|
|
554
|
-
o && t !== o[2] && (
|
|
554
|
+
o && t !== o[2] && (s(), a++, n.value = null, r.value = !1, i.value = !1), e ? l() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
555
555
|
}, {
|
|
556
556
|
immediate: !0,
|
|
557
557
|
flush: "sync"
|
|
558
|
-
}),
|
|
559
|
-
|
|
558
|
+
}), v(() => {
|
|
559
|
+
s(), a++;
|
|
560
560
|
}), {
|
|
561
561
|
isConfigured: t,
|
|
562
|
-
content:
|
|
562
|
+
content: I(() => n.value ?? e.getContent()),
|
|
563
563
|
isResolving: r,
|
|
564
|
-
isInitialResolve:
|
|
564
|
+
isInitialResolve: I(() => r.value && n.value === null),
|
|
565
565
|
hasFailed: i,
|
|
566
|
-
supersedesSamples:
|
|
566
|
+
supersedesSamples: I(() => t)
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
569
|
// src/composables/useMergeTagPicker.ts
|
|
570
|
-
function
|
|
571
|
-
let e =
|
|
570
|
+
function Wr() {
|
|
571
|
+
let e = H(!1), t = H([]), n = H(null), r = null;
|
|
572
572
|
function i(i, a) {
|
|
573
573
|
if (r) {
|
|
574
574
|
let e = r;
|
|
@@ -582,7 +582,7 @@ function Hr() {
|
|
|
582
582
|
let a = r;
|
|
583
583
|
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
584
584
|
}
|
|
585
|
-
return
|
|
585
|
+
return C() && v(() => {
|
|
586
586
|
if (r) {
|
|
587
587
|
let e = r;
|
|
588
588
|
r = null, e(null);
|
|
@@ -597,8 +597,8 @@ function Hr() {
|
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
// src/composables/useLogicTagPicker.ts
|
|
600
|
-
function
|
|
601
|
-
let e =
|
|
600
|
+
function Gr() {
|
|
601
|
+
let e = H(!1), t = H([]), n = H([]), r = null;
|
|
602
602
|
function i(i, a) {
|
|
603
603
|
if (r) {
|
|
604
604
|
let e = r;
|
|
@@ -612,7 +612,7 @@ function Ur() {
|
|
|
612
612
|
let a = r;
|
|
613
613
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
614
614
|
}
|
|
615
|
-
return
|
|
615
|
+
return C() && v(() => {
|
|
616
616
|
if (r) {
|
|
617
617
|
let e = r;
|
|
618
618
|
r = null, e(null);
|
|
@@ -627,36 +627,36 @@ function Ur() {
|
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
629
|
// src/composables/useTemplateLint.ts
|
|
630
|
-
function
|
|
630
|
+
function Kr(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
|
|
635
|
-
let t =
|
|
633
|
+
var qr = !1;
|
|
634
|
+
function Jr(e) {
|
|
635
|
+
let t = H([]), n = H(0), r = H(-1), i = u(e.content, () => {
|
|
636
636
|
n.value++;
|
|
637
|
-
}, { deep: !0 }), a =
|
|
638
|
-
|
|
637
|
+
}, { deep: !0 }), a = H(!1), o = H(!1), s = R(null), c = Kr(e.options), l = null, d = !1;
|
|
638
|
+
c || f();
|
|
639
639
|
async function f() {
|
|
640
640
|
try {
|
|
641
|
-
let t = await import("./src-
|
|
641
|
+
let t = await import("./src-Bp7bZcuD.js");
|
|
642
642
|
if (d) return;
|
|
643
|
-
|
|
643
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = re(n, p, { debounce: e.debounce ?? 500 });
|
|
644
644
|
} catch {
|
|
645
645
|
if (d) return;
|
|
646
|
-
|
|
646
|
+
o.value = !0, qr || (qr = !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() {
|
|
650
|
-
if (!
|
|
651
|
-
let i =
|
|
650
|
+
if (!s.value) return;
|
|
651
|
+
let i = s.value.lintTemplate(e.content.value, {
|
|
652
652
|
...e.options,
|
|
653
653
|
...e.customBlocks === void 0 ? {} : { customBlocks: e.customBlocks },
|
|
654
654
|
...e.mergeTagSyntax === void 0 ? {} : { mergeTagSyntax: e.mergeTagSyntax }
|
|
655
655
|
});
|
|
656
656
|
r.value = n.value, t.value = i;
|
|
657
657
|
}
|
|
658
|
-
let m =
|
|
659
|
-
|
|
658
|
+
let m = u(() => e.options, () => {
|
|
659
|
+
s.value && p();
|
|
660
660
|
}, { deep: !0 });
|
|
661
661
|
function h(t) {
|
|
662
662
|
t.fix && t.fix.apply({
|
|
@@ -669,21 +669,21 @@ function Kr(e) {
|
|
|
669
669
|
});
|
|
670
670
|
}
|
|
671
671
|
function g() {
|
|
672
|
-
d = !0,
|
|
672
|
+
d = !0, l?.(), i(), m();
|
|
673
673
|
}
|
|
674
674
|
return {
|
|
675
675
|
issues: t,
|
|
676
676
|
contentVersion: n,
|
|
677
677
|
lintVersion: r,
|
|
678
678
|
ready: a,
|
|
679
|
-
unavailable:
|
|
679
|
+
unavailable: o,
|
|
680
680
|
applyFix: h,
|
|
681
681
|
destroy: g
|
|
682
682
|
};
|
|
683
683
|
}
|
|
684
684
|
// src/composables/useKeyboardReorder.ts
|
|
685
|
-
function
|
|
686
|
-
let r =
|
|
685
|
+
function Yr(e, t, n = []) {
|
|
686
|
+
let r = H(null), i = H(""), a = null;
|
|
687
687
|
function o(t) {
|
|
688
688
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
689
689
|
if (r !== -1) return {
|
|
@@ -709,7 +709,7 @@ function qr(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 ? Vn(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 qr(e, t, n = []) {
|
|
|
777
777
|
};
|
|
778
778
|
}
|
|
779
779
|
// src/composables/useUiTheme.ts
|
|
780
|
-
function
|
|
781
|
-
let
|
|
782
|
-
return { resolvedTheme:
|
|
780
|
+
function Xr(e) {
|
|
781
|
+
let n = t("(prefers-color-scheme: dark)");
|
|
782
|
+
return { resolvedTheme: I(() => e.value === "auto" ? n.value ? "dark" : "light" : e.value) };
|
|
783
783
|
}
|
|
784
784
|
// src/composables/useCustomBlockStylesheets.ts
|
|
785
|
-
function
|
|
786
|
-
return
|
|
787
|
-
let n =
|
|
785
|
+
function Zr(e, t) {
|
|
786
|
+
return I(() => {
|
|
787
|
+
let n = Qr(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 Yr(e, t) {
|
|
|
796
796
|
return i;
|
|
797
797
|
});
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function Qr(e) {
|
|
800
800
|
let t = /* @__PURE__ */ new Set();
|
|
801
|
-
return
|
|
801
|
+
return $r(e, t), t;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
for (let n of e) if (
|
|
803
|
+
function $r(e, t) {
|
|
804
|
+
for (let n of e) if (ot(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) $r(n, t);
|
|
809
|
+
} else Ge(n) && $r(n.children, t);
|
|
810
810
|
}
|
|
811
811
|
// src/utils/registerBuiltInBlocks.ts
|
|
812
|
-
var
|
|
812
|
+
var ei = [
|
|
813
813
|
{
|
|
814
814
|
type: "section",
|
|
815
|
-
createBlock:
|
|
815
|
+
createBlock: he
|
|
816
816
|
},
|
|
817
817
|
{
|
|
818
818
|
type: "title",
|
|
819
|
-
createBlock:
|
|
819
|
+
createBlock: me
|
|
820
820
|
},
|
|
821
821
|
{
|
|
822
822
|
type: "paragraph",
|
|
823
|
-
createBlock:
|
|
823
|
+
createBlock: oe
|
|
824
824
|
},
|
|
825
825
|
{
|
|
826
826
|
type: "image",
|
|
827
|
-
createBlock:
|
|
827
|
+
createBlock: Se
|
|
828
828
|
},
|
|
829
829
|
{
|
|
830
830
|
type: "button",
|
|
831
|
-
createBlock:
|
|
831
|
+
createBlock: Ae
|
|
832
832
|
},
|
|
833
833
|
{
|
|
834
834
|
type: "divider",
|
|
835
|
-
createBlock:
|
|
835
|
+
createBlock: Z
|
|
836
836
|
},
|
|
837
837
|
{
|
|
838
838
|
type: "video",
|
|
839
|
-
createBlock:
|
|
839
|
+
createBlock: ge
|
|
840
840
|
},
|
|
841
841
|
{
|
|
842
842
|
type: "social",
|
|
843
|
-
createBlock:
|
|
843
|
+
createBlock: Y
|
|
844
844
|
},
|
|
845
845
|
{
|
|
846
846
|
type: "menu",
|
|
847
|
-
createBlock:
|
|
847
|
+
createBlock: se
|
|
848
848
|
},
|
|
849
849
|
{
|
|
850
850
|
type: "table",
|
|
851
|
-
createBlock:
|
|
851
|
+
createBlock: pe
|
|
852
852
|
},
|
|
853
853
|
{
|
|
854
854
|
type: "spacer",
|
|
855
|
-
createBlock:
|
|
855
|
+
createBlock: We
|
|
856
856
|
},
|
|
857
857
|
{
|
|
858
858
|
type: "html",
|
|
859
|
-
createBlock:
|
|
859
|
+
createBlock: st
|
|
860
860
|
},
|
|
861
861
|
{
|
|
862
862
|
type: "countdown",
|
|
863
|
-
createBlock:
|
|
863
|
+
createBlock: lt
|
|
864
864
|
}
|
|
865
865
|
];
|
|
866
|
-
function
|
|
867
|
-
for (let n of
|
|
866
|
+
function ti(e, t) {
|
|
867
|
+
for (let n of ei) {
|
|
868
868
|
let r = t[n.type];
|
|
869
869
|
r && e.registerBuiltIn(n.type, {
|
|
870
870
|
component: r,
|
|
@@ -873,31 +873,31 @@ function $r(e, t) {
|
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
// src/utils/resolveHtmlBlockPreview.ts
|
|
876
|
-
function
|
|
876
|
+
function ni(e) {
|
|
877
877
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
878
878
|
}
|
|
879
879
|
// src/utils/collectOffPaletteDefaults.ts
|
|
880
|
-
function
|
|
880
|
+
function ri(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 ii(e, t, n) {
|
|
884
|
+
let r = new Set(e.map((e) => pt(e))), i = [], a = (e, t) => {
|
|
885
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(pt(o)) && i.push(`${t}.${n}: ${o}`) : ri(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
|
+
...ri(n) ? n : {}
|
|
892
892
|
}, e);
|
|
893
893
|
}
|
|
894
894
|
return a({
|
|
895
|
-
...
|
|
895
|
+
...Je,
|
|
896
896
|
...n ?? {}
|
|
897
897
|
}, "template"), i;
|
|
898
898
|
}
|
|
899
899
|
// src/utils/localizedBlockDefaults.ts
|
|
900
|
-
function
|
|
900
|
+
function ai(e) {
|
|
901
901
|
return {
|
|
902
902
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
903
903
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -905,8 +905,9 @@ function ri(e) {
|
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
907
|
// src/i18n/index.ts
|
|
908
|
-
var
|
|
908
|
+
var oi = /* #__PURE__ */ Object.assign({
|
|
909
909
|
"./locales/ca.ts": () => import("./ca-BJn8lcJx.js"),
|
|
910
|
+
"./locales/da.ts": () => import("./da-qQzj0QGy.js"),
|
|
910
911
|
"./locales/de.ts": () => import("./de-BLFp3nWx.js"),
|
|
911
912
|
"./locales/en.ts": () => import("./en-DGGQJGbm.js"),
|
|
912
913
|
"./locales/es.ts": () => import("./es-DTY9qgLv.js"),
|
|
@@ -914,53 +915,53 @@ var ii = /* #__PURE__ */ Object.assign({
|
|
|
914
915
|
"./locales/ja.ts": () => import("./ja-6uOXkh4v.js"),
|
|
915
916
|
"./locales/nl.ts": () => import("./nl-DCxuxwNq.js"),
|
|
916
917
|
"./locales/pt-BR.ts": () => import("./pt-BR-CBkcrebr.js")
|
|
917
|
-
}),
|
|
918
|
+
}), si = /* #__PURE__ */ Object.assign({
|
|
918
919
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
919
920
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
920
921
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
921
922
|
});
|
|
922
|
-
function
|
|
923
|
+
function ci(e) {
|
|
923
924
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
924
925
|
}
|
|
925
|
-
var
|
|
926
|
-
function
|
|
926
|
+
var li = ci(oi), ui = ci(si);
|
|
927
|
+
function di(e) {
|
|
927
928
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
928
929
|
}
|
|
929
|
-
function
|
|
930
|
-
let n =
|
|
931
|
-
return t.find((e) =>
|
|
930
|
+
function fi(e, t) {
|
|
931
|
+
let n = di(e);
|
|
932
|
+
return t.find((e) => di(e) === n);
|
|
932
933
|
}
|
|
933
|
-
function
|
|
934
|
-
return
|
|
934
|
+
function pi(e) {
|
|
935
|
+
return di(e).split("-")[0];
|
|
935
936
|
}
|
|
936
|
-
function
|
|
937
|
-
return
|
|
937
|
+
function mi(e, t) {
|
|
938
|
+
return fi(e, t) ?? fi(pi(e), t);
|
|
938
939
|
}
|
|
939
|
-
function
|
|
940
|
-
return
|
|
940
|
+
function hi(e, t) {
|
|
941
|
+
return mi(e, t) ?? "en";
|
|
941
942
|
}
|
|
942
|
-
async function
|
|
943
|
-
let t =
|
|
943
|
+
async function gi(e) {
|
|
944
|
+
let t = oi[`./locales/${hi(e, li)}.ts`];
|
|
944
945
|
return (await t()).default;
|
|
945
946
|
}
|
|
946
|
-
async function
|
|
947
|
-
let t =
|
|
947
|
+
async function _i(e) {
|
|
948
|
+
let t = si[`./locales/cloud/${hi(e, ui)}.ts`];
|
|
948
949
|
return (await t()).default;
|
|
949
950
|
}
|
|
950
|
-
function
|
|
951
|
-
return
|
|
951
|
+
function vi(e) {
|
|
952
|
+
return mi(e, li) !== void 0;
|
|
952
953
|
}
|
|
953
|
-
function
|
|
954
|
-
return
|
|
954
|
+
function yi(e) {
|
|
955
|
+
return mi(e, ui) !== void 0;
|
|
955
956
|
}
|
|
956
|
-
function
|
|
957
|
-
return [...
|
|
957
|
+
function bi() {
|
|
958
|
+
return [...li];
|
|
958
959
|
}
|
|
959
|
-
function
|
|
960
|
-
return [...
|
|
960
|
+
function xi() {
|
|
961
|
+
return [...ui];
|
|
961
962
|
}
|
|
962
963
|
// src/i18n/contentDefaults.ts
|
|
963
|
-
var
|
|
964
|
+
var Si = {
|
|
964
965
|
en: {
|
|
965
966
|
video: "Video",
|
|
966
967
|
days: "Days",
|
|
@@ -1024,17 +1025,25 @@ var bi = {
|
|
|
1024
1025
|
minutes: "分",
|
|
1025
1026
|
seconds: "秒",
|
|
1026
1027
|
expired: "このオファーは終了しました"
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1028
|
+
},
|
|
1029
|
+
da: {
|
|
1030
|
+
video: "Video",
|
|
1031
|
+
days: "Dage",
|
|
1032
|
+
hours: "Timer",
|
|
1033
|
+
minutes: "Minutter",
|
|
1034
|
+
seconds: "Sekunder",
|
|
1035
|
+
expired: "Dette tilbud er udløbet"
|
|
1036
|
+
}
|
|
1037
|
+
}, Ci = new Map(Object.keys(Si).map((e) => [e.toLowerCase(), e]));
|
|
1038
|
+
function wi(e) {
|
|
1039
|
+
if (!e) return Si.en;
|
|
1040
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Ci.get(t);
|
|
1041
|
+
if (n) return Si[n];
|
|
1042
|
+
let r = Ci.get(pi(t));
|
|
1043
|
+
return r ? Si[r] : Si.en;
|
|
1035
1044
|
}
|
|
1036
|
-
function
|
|
1037
|
-
let t =
|
|
1045
|
+
function Ti(e) {
|
|
1046
|
+
let t = wi(e);
|
|
1038
1047
|
return {
|
|
1039
1048
|
video: { alt: t.video },
|
|
1040
1049
|
countdown: {
|
|
@@ -1047,9 +1056,9 @@ function Ci(e) {
|
|
|
1047
1056
|
};
|
|
1048
1057
|
}
|
|
1049
1058
|
// src/utils/collectColorFieldIssues.ts
|
|
1050
|
-
function
|
|
1059
|
+
function Ei(e, t) {
|
|
1051
1060
|
let n = [], r = (r, i) => {
|
|
1052
|
-
let a =
|
|
1061
|
+
let a = Rn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1053
1062
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1054
1063
|
id: s("invalid-presets"),
|
|
1055
1064
|
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 +1069,8 @@ function wi(e, t) {
|
|
|
1060
1069
|
id: s("allow-custom-ignored"),
|
|
1061
1070
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1062
1071
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1063
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1064
|
-
e !== "" && !t.has(
|
|
1072
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => pt(e)));
|
|
1073
|
+
e !== "" && !t.has(pt(e)) && n.push({
|
|
1065
1074
|
id: s("off-palette-default"),
|
|
1066
1075
|
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
1076
|
});
|
|
@@ -1072,7 +1081,7 @@ function wi(e, t) {
|
|
|
1072
1081
|
return n;
|
|
1073
1082
|
}
|
|
1074
1083
|
// src/utils/keyboardShortcuts.ts
|
|
1075
|
-
function
|
|
1084
|
+
function Di(e) {
|
|
1076
1085
|
for (let t of e.composedPath()) {
|
|
1077
1086
|
if (!(t instanceof HTMLElement)) continue;
|
|
1078
1087
|
if (t.isContentEditable) return !0;
|
|
@@ -1081,14 +1090,14 @@ function Ti(e) {
|
|
|
1081
1090
|
}
|
|
1082
1091
|
return !1;
|
|
1083
1092
|
}
|
|
1084
|
-
function
|
|
1093
|
+
function Oi(e, t) {
|
|
1085
1094
|
let n = e.metaKey || e.ctrlKey;
|
|
1086
1095
|
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
1087
1096
|
else if (n && e.key.toLowerCase() === "z") {
|
|
1088
|
-
if (
|
|
1097
|
+
if (Di(e)) return;
|
|
1089
1098
|
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
1090
1099
|
} else {
|
|
1091
|
-
if (t.isPicking?.() && !
|
|
1100
|
+
if (t.isPicking?.() && !Di(e)) {
|
|
1092
1101
|
if (e.key === "Escape") {
|
|
1093
1102
|
e.preventDefault(), t.onCancelPick?.();
|
|
1094
1103
|
return;
|
|
@@ -1102,139 +1111,139 @@ function Ei(e, t) {
|
|
|
1102
1111
|
return;
|
|
1103
1112
|
}
|
|
1104
1113
|
}
|
|
1105
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1114
|
+
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Di(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1106
1115
|
}
|
|
1107
1116
|
}
|
|
1108
1117
|
// src/utils/blockComponentResolver.ts
|
|
1109
|
-
function
|
|
1118
|
+
function ki(e, t) {
|
|
1110
1119
|
let n = { fontFamily: t(e.fontFamily) };
|
|
1111
1120
|
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
1121
|
}
|
|
1113
|
-
function
|
|
1122
|
+
function Ai(e, t, n) {
|
|
1114
1123
|
if (t) {
|
|
1115
1124
|
let n = t.getComponent(e);
|
|
1116
1125
|
if (n) return n;
|
|
1117
1126
|
}
|
|
1118
1127
|
return n[e.type] ?? null;
|
|
1119
1128
|
}
|
|
1120
|
-
var
|
|
1121
|
-
function
|
|
1129
|
+
var ji = "--tpl-block-bg-layer", Mi = "--tpl-email-frame-width", Ni = "tpl-has-bg-image";
|
|
1130
|
+
function Pi(e, t) {
|
|
1122
1131
|
if (t === null) return {};
|
|
1123
|
-
let n =
|
|
1132
|
+
let n = Re(e);
|
|
1124
1133
|
if (n === null) return {};
|
|
1125
|
-
let r = t?.trim(), i = r ?
|
|
1134
|
+
let r = t?.trim(), i = r ? ze(r) : n.url;
|
|
1126
1135
|
return {
|
|
1127
1136
|
backgroundImage: `url("${i}")`,
|
|
1128
1137
|
backgroundSize: n.size,
|
|
1129
1138
|
backgroundPosition: n.position,
|
|
1130
1139
|
backgroundRepeat: n.repeat,
|
|
1131
|
-
[
|
|
1140
|
+
[ji]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
1132
1141
|
};
|
|
1133
1142
|
}
|
|
1134
|
-
function
|
|
1135
|
-
return e &&
|
|
1143
|
+
function Fi(e) {
|
|
1144
|
+
return e && ji in e ? Ni : void 0;
|
|
1136
1145
|
}
|
|
1137
|
-
var
|
|
1146
|
+
var Ii = {
|
|
1138
1147
|
top: "flex-start",
|
|
1139
1148
|
middle: "center",
|
|
1140
1149
|
bottom: "flex-end"
|
|
1141
1150
|
};
|
|
1142
|
-
function
|
|
1143
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${
|
|
1151
|
+
function Li(e, t) {
|
|
1152
|
+
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Ri(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
1144
1153
|
return {
|
|
1145
1154
|
display: "flex",
|
|
1146
1155
|
flexDirection: "column",
|
|
1147
|
-
justifyContent:
|
|
1156
|
+
justifyContent: Ii[e.verticalAlign],
|
|
1148
1157
|
boxSizing: "border-box",
|
|
1149
1158
|
...n
|
|
1150
1159
|
};
|
|
1151
1160
|
}
|
|
1152
|
-
function
|
|
1161
|
+
function Ri(e, t) {
|
|
1153
1162
|
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
1154
1163
|
}
|
|
1155
|
-
function
|
|
1164
|
+
function zi(e, t = {}) {
|
|
1156
1165
|
if (e.type === "wrapper") return {};
|
|
1157
1166
|
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
1158
1167
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1159
1168
|
backgroundColor: r || "transparent"
|
|
1160
1169
|
};
|
|
1161
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1162
|
-
let n =
|
|
1170
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? ut.paragraphGap : ut.paragraphGap}px`), e.type === "section") {
|
|
1171
|
+
let n = Ce(e.borderRadius);
|
|
1163
1172
|
n !== null && (i.borderRadius = n);
|
|
1164
|
-
let r =
|
|
1165
|
-
r?.applied && e.backgroundImage ? (Object.assign(i,
|
|
1173
|
+
let r = Fe(e);
|
|
1174
|
+
r?.applied && e.backgroundImage ? (Object.assign(i, Li(r, t.heroBoxWidth)), Object.assign(i, Pi({
|
|
1166
1175
|
...e.backgroundImage,
|
|
1167
1176
|
size: "cover",
|
|
1168
1177
|
repeat: !1
|
|
1169
|
-
}, t.backgroundImageUrl))) : (Object.assign(i,
|
|
1178
|
+
}, t.backgroundImageUrl))) : (Object.assign(i, Vi(e.border)), Object.assign(i, Pi(e.backgroundImage, t.backgroundImageUrl)));
|
|
1170
1179
|
}
|
|
1171
1180
|
return i;
|
|
1172
1181
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return e.type === "section" ?
|
|
1175
|
-
backgroundImageUrl:
|
|
1182
|
+
function Bi(e, t, n, r) {
|
|
1183
|
+
return e.type === "section" ? zi(e, {
|
|
1184
|
+
backgroundImageUrl: wn(t, e.backgroundImage, n),
|
|
1176
1185
|
heroBoxWidth: r
|
|
1177
|
-
}) :
|
|
1186
|
+
}) : zi(e);
|
|
1178
1187
|
}
|
|
1179
|
-
function
|
|
1188
|
+
function Vi(e) {
|
|
1180
1189
|
let t = {};
|
|
1181
|
-
for (let [n, r] of Object.entries(
|
|
1190
|
+
for (let [n, r] of Object.entries(ct(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1182
1191
|
return t;
|
|
1183
1192
|
}
|
|
1184
|
-
var
|
|
1193
|
+
var Hi = {
|
|
1185
1194
|
width: "100cqw",
|
|
1186
1195
|
maxWidth: "none",
|
|
1187
1196
|
marginInline: "calc(50% - 50cqw)",
|
|
1188
1197
|
boxSizing: "border-box"
|
|
1189
1198
|
};
|
|
1190
|
-
function
|
|
1199
|
+
function Ui(e) {
|
|
1191
1200
|
return `${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`;
|
|
1192
1201
|
}
|
|
1193
|
-
function
|
|
1202
|
+
function Wi(e) {
|
|
1194
1203
|
let t = {
|
|
1195
1204
|
width: "var(--tpl-email-frame-width)",
|
|
1196
1205
|
maxWidth: "100%",
|
|
1197
1206
|
marginInline: "auto",
|
|
1198
1207
|
boxSizing: "border-box"
|
|
1199
1208
|
};
|
|
1200
|
-
return e && (t.padding =
|
|
1209
|
+
return e && (t.padding = Ui(e)), t;
|
|
1201
1210
|
}
|
|
1202
|
-
function
|
|
1211
|
+
function Gi(e, t = {}) {
|
|
1203
1212
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1204
1213
|
let n = e.wrapper, r = {};
|
|
1205
|
-
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding =
|
|
1206
|
-
let e =
|
|
1214
|
+
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = Ui(n.padding)), !n.fullWidth) {
|
|
1215
|
+
let e = Ce(n.borderRadius);
|
|
1207
1216
|
e !== null && (r.borderRadius = e);
|
|
1208
1217
|
}
|
|
1209
|
-
return Object.assign(r,
|
|
1218
|
+
return Object.assign(r, Pi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, Hi), r;
|
|
1210
1219
|
}
|
|
1211
|
-
function
|
|
1220
|
+
function Ki(e, t = {}) {
|
|
1212
1221
|
if (e.type !== "wrapper") return null;
|
|
1213
1222
|
let n = {};
|
|
1214
|
-
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding =
|
|
1223
|
+
return e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding && !e.fullWidth && (n.padding = Ui(e.styles.padding)), !e.fullWidth && e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Pi(e.backgroundImage, t.backgroundImageUrl)), e.fullWidth && Object.assign(n, Hi), n;
|
|
1215
1224
|
}
|
|
1216
1225
|
// src/utils/mergeTagLabelSegments.ts
|
|
1217
|
-
function
|
|
1226
|
+
function qi(e, t, n, r = !1) {
|
|
1218
1227
|
if (!e) return [];
|
|
1219
1228
|
let i = [], a = 0;
|
|
1220
|
-
for (let o of
|
|
1229
|
+
for (let o of Ye(e, n)) {
|
|
1221
1230
|
o.index > a && i.push({
|
|
1222
1231
|
type: "text",
|
|
1223
1232
|
value: e.slice(a, o.index)
|
|
1224
1233
|
});
|
|
1225
1234
|
let s = o.value;
|
|
1226
|
-
if (
|
|
1227
|
-
let e = r ?
|
|
1235
|
+
if (_e(s, n)) {
|
|
1236
|
+
let e = r ? Qe(s, t) : void 0;
|
|
1228
1237
|
i.push(e === void 0 ? {
|
|
1229
1238
|
type: "tag",
|
|
1230
|
-
value:
|
|
1239
|
+
value: de(s, t)
|
|
1231
1240
|
} : {
|
|
1232
1241
|
type: "text",
|
|
1233
1242
|
value: e
|
|
1234
1243
|
});
|
|
1235
|
-
} else
|
|
1244
|
+
} else De(s, n) ? i.push({
|
|
1236
1245
|
type: "tag",
|
|
1237
|
-
value:
|
|
1246
|
+
value: ce(s, n)
|
|
1238
1247
|
}) : i.push({
|
|
1239
1248
|
type: "text",
|
|
1240
1249
|
value: s
|
|
@@ -1247,98 +1256,99 @@ function Gi(e, t, n, r = !1) {
|
|
|
1247
1256
|
}), i;
|
|
1248
1257
|
}
|
|
1249
1258
|
// src/components/MergeTagPreviewText.vue
|
|
1250
|
-
var
|
|
1259
|
+
var Ji = o({
|
|
1251
1260
|
name: "MergeTagPreviewText",
|
|
1252
1261
|
props: { text: {
|
|
1253
1262
|
type: String,
|
|
1254
1263
|
required: !0
|
|
1255
1264
|
} },
|
|
1256
1265
|
setup(e) {
|
|
1257
|
-
let t =
|
|
1258
|
-
return () =>
|
|
1266
|
+
let t = g(Pt, Bt), n = g(xt, le.liquid), r = g(mn, null), i = I(() => qi(e.text, t.value, n, r?.value ?? !1));
|
|
1267
|
+
return () => i.value.map((e, t) => e.type === "tag" ? s("span", {
|
|
1259
1268
|
key: t,
|
|
1260
1269
|
class: "tpl-merge-tag-label"
|
|
1261
1270
|
}, e.value) : e.value);
|
|
1262
1271
|
}
|
|
1263
|
-
}),
|
|
1272
|
+
}), Yi = ["href"], Xi = /* @__PURE__ */ o({
|
|
1264
1273
|
__name: "ButtonBlock",
|
|
1265
1274
|
props: {
|
|
1266
1275
|
block: {},
|
|
1267
1276
|
viewport: {}
|
|
1268
1277
|
},
|
|
1269
1278
|
setup(e) {
|
|
1270
|
-
let t = e, n =
|
|
1279
|
+
let t = e, n = Yt(qt, "ButtonBlock");
|
|
1271
1280
|
function r(e) {
|
|
1272
1281
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1273
1282
|
}
|
|
1274
|
-
let
|
|
1283
|
+
let i = I(() => {
|
|
1275
1284
|
let e = {
|
|
1276
1285
|
display: "inline-block",
|
|
1277
1286
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
1278
1287
|
backgroundColor: t.block.backgroundColor,
|
|
1279
1288
|
color: t.block.textColor,
|
|
1280
1289
|
fontSize: `${t.block.fontSize}px`,
|
|
1290
|
+
lineHeight: String(ft),
|
|
1281
1291
|
fontWeight: r(t.block.fontWeight),
|
|
1282
1292
|
textDecoration: "none",
|
|
1283
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1293
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : Ce(t.block.borderRadius) ?? "0px",
|
|
1284
1294
|
textAlign: "center"
|
|
1285
1295
|
};
|
|
1286
|
-
return Object.assign(e,
|
|
1287
|
-
}),
|
|
1288
|
-
return (t, n) => (
|
|
1296
|
+
return Object.assign(e, Vi(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;
|
|
1297
|
+
}), a = I(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1298
|
+
return (t, n) => (c(), w("div", { style: L(a.value) }, [N("a", {
|
|
1289
1299
|
href: e.block.url || "#",
|
|
1290
|
-
style:
|
|
1300
|
+
style: L(i.value),
|
|
1291
1301
|
class: "tpl:cursor-default",
|
|
1292
|
-
onClick: n[0] ||=
|
|
1293
|
-
}, [
|
|
1302
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1303
|
+
}, [W(Ji, { text: e.block.text }, null, 8, ["text"])], 12, Yi)], 4));
|
|
1294
1304
|
}
|
|
1295
|
-
}),
|
|
1305
|
+
}), Zi = ["innerHTML"], Qi = [
|
|
1296
1306
|
"src",
|
|
1297
1307
|
"width",
|
|
1298
1308
|
"height"
|
|
1299
|
-
],
|
|
1309
|
+
], $i = /* @__PURE__ */ o({
|
|
1300
1310
|
__name: "CustomBlockIcon",
|
|
1301
1311
|
props: {
|
|
1302
1312
|
icon: {},
|
|
1303
1313
|
size: {}
|
|
1304
1314
|
},
|
|
1305
1315
|
setup(e) {
|
|
1306
|
-
let t = e, n =
|
|
1307
|
-
return (t,
|
|
1316
|
+
let t = e, n = I(() => t.size ?? 20), r = I(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = I(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = I(() => r.value ? Gn(t.icon ?? "") : "");
|
|
1317
|
+
return (t, o) => r.value ? (c(), w("span", {
|
|
1308
1318
|
key: 0,
|
|
1309
1319
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
1310
|
-
style:
|
|
1320
|
+
style: L({
|
|
1311
1321
|
width: `${n.value}px`,
|
|
1312
1322
|
height: `${n.value}px`
|
|
1313
1323
|
}),
|
|
1314
|
-
innerHTML:
|
|
1315
|
-
}, null, 12,
|
|
1324
|
+
innerHTML: a.value
|
|
1325
|
+
}, null, 12, Zi)) : i.value ? (c(), w("img", {
|
|
1316
1326
|
key: 1,
|
|
1317
1327
|
src: e.icon,
|
|
1318
1328
|
width: n.value,
|
|
1319
1329
|
height: n.value,
|
|
1320
1330
|
class: "tpl:inline-block",
|
|
1321
1331
|
alt: ""
|
|
1322
|
-
}, null, 8,
|
|
1332
|
+
}, null, 8, Qi)) : (c(), A(D($n), {
|
|
1323
1333
|
key: 2,
|
|
1324
1334
|
size: n.value,
|
|
1325
1335
|
"stroke-width": 1.5
|
|
1326
1336
|
}, null, 8, ["size"]));
|
|
1327
1337
|
}
|
|
1328
|
-
}),
|
|
1338
|
+
}), ea = { class: "tpl:w-full" }, ta = {
|
|
1329
1339
|
key: 0,
|
|
1330
1340
|
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)]"
|
|
1331
|
-
},
|
|
1341
|
+
}, na = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ra = {
|
|
1332
1342
|
key: 1,
|
|
1333
1343
|
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)]"
|
|
1334
|
-
},
|
|
1344
|
+
}, ia = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, aa = {
|
|
1335
1345
|
key: 2,
|
|
1336
1346
|
class: "tpl:relative"
|
|
1337
|
-
},
|
|
1347
|
+
}, oa = ["innerHTML"], sa = {
|
|
1338
1348
|
key: 0,
|
|
1339
1349
|
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]",
|
|
1340
1350
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1341
|
-
},
|
|
1351
|
+
}, ca = /* @__PURE__ */ o({
|
|
1342
1352
|
__name: "CustomBlock",
|
|
1343
1353
|
props: {
|
|
1344
1354
|
block: {},
|
|
@@ -1346,131 +1356,131 @@ var Ki = n({
|
|
|
1346
1356
|
},
|
|
1347
1357
|
emits: ["fetchData"],
|
|
1348
1358
|
setup(e, { emit: t }) {
|
|
1349
|
-
let n = e, r = t, { t:
|
|
1350
|
-
definition:
|
|
1351
|
-
block:
|
|
1359
|
+
let n = e, r = t, { t: i } = G(), a = g(an, null), o = H(""), s = I(() => Kn(o.value)), l = H(!1), d = I(() => a?.getDefinition(n.block.customType)), f = I(() => !!d.value), p = I(() => n.block), { isFetching: m, fetch: _, needsFetch: v, hasDataSource: y } = Tn({
|
|
1360
|
+
definition: d,
|
|
1361
|
+
block: p,
|
|
1352
1362
|
onUpdate: (e, t) => {
|
|
1353
1363
|
r("fetchData", {
|
|
1354
1364
|
fieldValues: e,
|
|
1355
1365
|
dataSourceFetched: t
|
|
1356
1366
|
});
|
|
1357
1367
|
}
|
|
1358
|
-
}),
|
|
1359
|
-
if (!
|
|
1368
|
+
}), b = g(Pt, Bt), x = g(mn, null), S = I(() => {
|
|
1369
|
+
if (!x?.value) return n.block;
|
|
1360
1370
|
let e = {};
|
|
1361
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1371
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? ke(r, b.value) : r;
|
|
1362
1372
|
return {
|
|
1363
1373
|
...n.block,
|
|
1364
1374
|
fieldValues: e
|
|
1365
1375
|
};
|
|
1366
1376
|
});
|
|
1367
|
-
async function
|
|
1368
|
-
if (
|
|
1369
|
-
|
|
1377
|
+
async function C() {
|
|
1378
|
+
if (a) {
|
|
1379
|
+
l.value = !1;
|
|
1370
1380
|
try {
|
|
1371
|
-
let e = await
|
|
1372
|
-
e.includes("Template render error:") && (
|
|
1381
|
+
let e = await a.renderCustomBlock(S.value);
|
|
1382
|
+
e.includes("Template render error:") && (l.value = !0), o.value = e;
|
|
1373
1383
|
} catch {
|
|
1374
|
-
|
|
1384
|
+
l.value = !0, o.value = "";
|
|
1375
1385
|
}
|
|
1376
1386
|
}
|
|
1377
1387
|
}
|
|
1378
|
-
let
|
|
1379
|
-
return
|
|
1380
|
-
|
|
1381
|
-
}),
|
|
1382
|
-
|
|
1383
|
-
}, { deep: !0 }),
|
|
1384
|
-
|
|
1385
|
-
}), (e, t) => (
|
|
1388
|
+
let E = q(C, 150);
|
|
1389
|
+
return h(() => {
|
|
1390
|
+
C();
|
|
1391
|
+
}), u(() => n.block.fieldValues, () => {
|
|
1392
|
+
E();
|
|
1393
|
+
}, { deep: !0 }), u(() => x?.value, () => {
|
|
1394
|
+
E();
|
|
1395
|
+
}), (e, t) => (c(), w("div", ea, [f.value ? l.value ? (c(), w("div", ra, [W(D(ir), {
|
|
1386
1396
|
size: 24,
|
|
1387
1397
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1388
|
-
}),
|
|
1398
|
+
}), N("span", ia, P(D(i).customBlocks.renderError), 1)])) : (c(), w("div", aa, [N("div", { innerHTML: s.value }, null, 8, oa), D(y) && D(v) ? (c(), w("div", sa, [D(m) ? (c(), A(fr, {
|
|
1389
1399
|
key: 1,
|
|
1390
1400
|
class: "tpl:w-48"
|
|
1391
|
-
})) : (
|
|
1401
|
+
})) : (c(), w("button", {
|
|
1392
1402
|
key: 0,
|
|
1393
1403
|
type: "button",
|
|
1394
1404
|
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)]",
|
|
1395
|
-
onClick: t[0] ||=
|
|
1396
|
-
}, [
|
|
1405
|
+
onClick: t[0] ||= M((...e) => D(_) && D(_)(...e), ["stop"])
|
|
1406
|
+
}, [d.value?.icon ? (c(), A($i, {
|
|
1397
1407
|
key: 0,
|
|
1398
|
-
icon:
|
|
1408
|
+
icon: d.value.icon,
|
|
1399
1409
|
size: 16
|
|
1400
|
-
}, null, 8, ["icon"])) :
|
|
1410
|
+
}, null, 8, ["icon"])) : k("", !0), T(" " + P(d.value?.dataSource?.label || D(i).customBlocks.dataSource.fetchButton), 1)]))])) : k("", !0)])) : (c(), w("div", ta, [W(D(er), {
|
|
1401
1411
|
size: 24,
|
|
1402
1412
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1403
|
-
}),
|
|
1413
|
+
}), N("span", na, P(D(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1404
1414
|
}
|
|
1405
|
-
}),
|
|
1415
|
+
}), la = { class: "tpl:w-full" }, ua = /* @__PURE__ */ o({
|
|
1406
1416
|
__name: "DividerBlock",
|
|
1407
1417
|
props: {
|
|
1408
1418
|
block: {},
|
|
1409
1419
|
viewport: {}
|
|
1410
1420
|
},
|
|
1411
1421
|
setup(e) {
|
|
1412
|
-
let t = e, n =
|
|
1422
|
+
let t = e, n = I(() => ({
|
|
1413
1423
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1414
1424
|
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1415
1425
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1416
1426
|
}));
|
|
1417
|
-
return (e, t) => (
|
|
1427
|
+
return (e, t) => (c(), w("div", la, [N("hr", {
|
|
1418
1428
|
class: "tpl:m-0 tpl:border-none",
|
|
1419
|
-
style:
|
|
1429
|
+
style: L(n.value)
|
|
1420
1430
|
}, null, 4)]));
|
|
1421
1431
|
}
|
|
1422
|
-
}),
|
|
1432
|
+
}), da = { class: "tpl:w-full" }, fa = ["srcdoc", "title"], pa = {
|
|
1423
1433
|
key: 1,
|
|
1424
1434
|
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)]"
|
|
1425
|
-
},
|
|
1435
|
+
}, ma = {
|
|
1426
1436
|
key: 0,
|
|
1427
1437
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1428
|
-
},
|
|
1438
|
+
}, ha = {
|
|
1429
1439
|
key: 1,
|
|
1430
1440
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1431
|
-
},
|
|
1441
|
+
}, ga = /* @__PURE__ */ o({
|
|
1432
1442
|
__name: "HtmlBlock",
|
|
1433
1443
|
props: {
|
|
1434
1444
|
block: {},
|
|
1435
1445
|
viewport: {}
|
|
1436
1446
|
},
|
|
1437
1447
|
setup(e) {
|
|
1438
|
-
let t = e, { t: n } =
|
|
1439
|
-
function
|
|
1440
|
-
let e =
|
|
1441
|
-
e && (
|
|
1448
|
+
let t = e, { t: n } = G(), r = g(Lt, !1), i = I(() => t.block.content.trim().length > 0), a = I(() => r && i.value), o = g(Pt, Bt), s = g(mn, null), l = I(() => s?.value ? ke(t.block.content, o.value) : t.block.content), d = H(null), f = H(60), p = null;
|
|
1449
|
+
function h() {
|
|
1450
|
+
let e = d.value?.contentDocument;
|
|
1451
|
+
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1442
1452
|
}
|
|
1443
1453
|
function _() {
|
|
1444
|
-
|
|
1445
|
-
let e =
|
|
1446
|
-
e && typeof ResizeObserver < "u" && (
|
|
1447
|
-
}
|
|
1448
|
-
return
|
|
1449
|
-
e || (
|
|
1450
|
-
}),
|
|
1451
|
-
|
|
1452
|
-
}), (e, t) => (
|
|
1454
|
+
p?.disconnect(), p = null, h();
|
|
1455
|
+
let e = d.value?.contentDocument?.documentElement;
|
|
1456
|
+
e && typeof ResizeObserver < "u" && (p = new ResizeObserver(() => h()), p.observe(e));
|
|
1457
|
+
}
|
|
1458
|
+
return u(a, (e) => {
|
|
1459
|
+
e || (p?.disconnect(), p = null);
|
|
1460
|
+
}), m(() => {
|
|
1461
|
+
p?.disconnect(), p = null;
|
|
1462
|
+
}), (e, t) => (c(), w("div", da, [a.value ? (c(), w("iframe", {
|
|
1453
1463
|
key: 0,
|
|
1454
1464
|
ref_key: "iframeRef",
|
|
1455
|
-
ref:
|
|
1456
|
-
srcdoc:
|
|
1465
|
+
ref: d,
|
|
1466
|
+
srcdoc: l.value,
|
|
1457
1467
|
sandbox: "allow-same-origin",
|
|
1458
|
-
title:
|
|
1468
|
+
title: D(n).html.preview,
|
|
1459
1469
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1460
|
-
style:
|
|
1470
|
+
style: L({ height: `${f.value}px` }),
|
|
1461
1471
|
onLoad: _
|
|
1462
|
-
}, null, 44,
|
|
1472
|
+
}, null, 44, fa)) : (c(), w("div", pa, [W(D(Yn), {
|
|
1463
1473
|
size: 24,
|
|
1464
1474
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1465
|
-
}),
|
|
1475
|
+
}), i.value ? (c(), w("span", ma, P(D(n).html.preview), 1)) : (c(), w("span", ha, P(D(n).html.empty), 1))]))]));
|
|
1466
1476
|
}
|
|
1467
|
-
}),
|
|
1477
|
+
}), _a = ["data-drop-enabled"], va = ["href"], ya = ["src", "alt"], ba = ["src", "alt"], xa = {
|
|
1468
1478
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1469
1479
|
style: { opacity: "0.7" }
|
|
1470
|
-
},
|
|
1480
|
+
}, Sa = ["href"], Ca = ["src", "alt"], wa = ["src", "alt"], Ta = {
|
|
1471
1481
|
key: 4,
|
|
1472
1482
|
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)]"
|
|
1473
|
-
},
|
|
1483
|
+
}, Ea = ["aria-label"], Da = { key: 1 }, Oa = /* @__PURE__ */ o({
|
|
1474
1484
|
__name: "ImageBlock",
|
|
1475
1485
|
props: {
|
|
1476
1486
|
block: {},
|
|
@@ -1478,111 +1488,111 @@ var Ki = n({
|
|
|
1478
1488
|
},
|
|
1479
1489
|
emits: ["update"],
|
|
1480
1490
|
setup(e, { emit: t }) {
|
|
1481
|
-
let n = e, r = t, { t:
|
|
1482
|
-
function
|
|
1491
|
+
let n = e, r = t, { t: i } = G(), { syntax: a } = K(), o = I(() => we(n.block.src, a));
|
|
1492
|
+
function s(e) {
|
|
1483
1493
|
let t = {
|
|
1484
1494
|
src: e.url,
|
|
1485
|
-
...
|
|
1495
|
+
...Nn(An(e.width, e.height))
|
|
1486
1496
|
};
|
|
1487
1497
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
1488
1498
|
}
|
|
1489
|
-
let l =
|
|
1499
|
+
let l = H(), { canBrowse: u, dropEnabled: d, isUploading: f, showOverlay: p, openMediaBrowser: m } = Ln({
|
|
1490
1500
|
target: l,
|
|
1491
|
-
blocked:
|
|
1492
|
-
apply:
|
|
1493
|
-
}), h =
|
|
1494
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1501
|
+
blocked: o,
|
|
1502
|
+
apply: s
|
|
1503
|
+
}), h = I(() => ({ textAlign: n.block.align })), g = I(() => {
|
|
1504
|
+
let e = n.block.border, t = ["left", "right"].map((t) => Q(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1495
1505
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1496
|
-
}), _ =
|
|
1506
|
+
}), _ = I(() => {
|
|
1497
1507
|
let e = n.block.align;
|
|
1498
1508
|
return {
|
|
1499
1509
|
maxWidth: "100%",
|
|
1500
1510
|
width: n.block.width === "full" ? g.value : `${n.block.width}px`,
|
|
1501
1511
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1502
|
-
borderRadius:
|
|
1503
|
-
...
|
|
1512
|
+
borderRadius: Ce(n.block.borderRadius) ?? void 0,
|
|
1513
|
+
...Vi(n.block.border),
|
|
1504
1514
|
display: "block",
|
|
1505
1515
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1506
1516
|
marginRight: e === "center" ? "auto" : void 0
|
|
1507
1517
|
};
|
|
1508
|
-
}), v =
|
|
1509
|
-
return (t, n) => (
|
|
1518
|
+
}), v = kn(() => o.value ? void 0 : n.block.src), y = kn(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1519
|
+
return (t, n) => (c(), w("div", {
|
|
1510
1520
|
ref_key: "dropZoneRef",
|
|
1511
1521
|
ref: l,
|
|
1512
1522
|
"data-testid": "image-drop-zone",
|
|
1513
|
-
"data-drop-enabled":
|
|
1523
|
+
"data-drop-enabled": D(d),
|
|
1514
1524
|
class: "tpl:relative tpl:w-full",
|
|
1515
|
-
style:
|
|
1516
|
-
}, [
|
|
1525
|
+
style: L(h.value)
|
|
1526
|
+
}, [D(p) ? (c(), A(Mn, {
|
|
1517
1527
|
key: 0,
|
|
1518
|
-
uploading:
|
|
1528
|
+
uploading: D(f),
|
|
1519
1529
|
size: "canvas"
|
|
1520
|
-
}, null, 8, ["uploading"])) :
|
|
1530
|
+
}, null, 8, ["uploading"])) : k("", !0), e.block.src && o.value && e.block.placeholderUrl ? (c(), w(U, { key: 1 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1521
1531
|
key: 0,
|
|
1522
1532
|
href: e.block.linkUrl,
|
|
1523
1533
|
target: "_blank",
|
|
1524
1534
|
rel: "noopener noreferrer",
|
|
1525
|
-
onClick: n[0] ||=
|
|
1526
|
-
}, [
|
|
1535
|
+
onClick: n[0] ||= M(() => {}, ["prevent"])
|
|
1536
|
+
}, [N("img", {
|
|
1527
1537
|
class: "tpl:border-0",
|
|
1528
1538
|
loading: "lazy",
|
|
1529
|
-
src:
|
|
1530
|
-
alt: e.block.alt ||
|
|
1531
|
-
style:
|
|
1532
|
-
}, null, 12,
|
|
1539
|
+
src: D(y),
|
|
1540
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1541
|
+
style: L(_.value)
|
|
1542
|
+
}, null, 12, ya)], 8, va)) : (c(), w("img", {
|
|
1533
1543
|
key: 1,
|
|
1534
1544
|
class: "tpl:border-0",
|
|
1535
|
-
src:
|
|
1545
|
+
src: D(y),
|
|
1536
1546
|
alt: e.block.alt,
|
|
1537
|
-
style:
|
|
1538
|
-
}, null, 12,
|
|
1547
|
+
style: L(_.value)
|
|
1548
|
+
}, null, 12, ba))], 64)) : e.block.src && o.value ? (c(), w("div", {
|
|
1539
1549
|
key: 2,
|
|
1540
1550
|
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)]",
|
|
1541
|
-
style:
|
|
1542
|
-
}, [
|
|
1551
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
|
|
1552
|
+
}, [W(D(rr), {
|
|
1543
1553
|
size: 32,
|
|
1544
1554
|
"stroke-width": 1.5,
|
|
1545
1555
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1546
1556
|
style: { opacity: "0.5" }
|
|
1547
|
-
}),
|
|
1557
|
+
}), N("span", xa, [W(Ji, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (c(), w(U, { key: 3 }, [e.block.linkUrl ? (c(), w("a", {
|
|
1548
1558
|
key: 0,
|
|
1549
1559
|
href: e.block.linkUrl,
|
|
1550
1560
|
target: "_blank",
|
|
1551
1561
|
rel: "noopener noreferrer",
|
|
1552
|
-
onClick: n[1] ||=
|
|
1553
|
-
}, [
|
|
1562
|
+
onClick: n[1] ||= M(() => {}, ["prevent"])
|
|
1563
|
+
}, [N("img", {
|
|
1554
1564
|
class: "tpl:border-0",
|
|
1555
1565
|
loading: "lazy",
|
|
1556
|
-
src:
|
|
1557
|
-
alt: e.block.alt ||
|
|
1558
|
-
style:
|
|
1559
|
-
}, null, 12,
|
|
1566
|
+
src: D(v),
|
|
1567
|
+
alt: e.block.alt || D(i).image.altTextPlaceholder,
|
|
1568
|
+
style: L(_.value)
|
|
1569
|
+
}, null, 12, Ca)], 8, Sa)) : (c(), w("img", {
|
|
1560
1570
|
key: 1,
|
|
1561
1571
|
class: "tpl:border-0",
|
|
1562
|
-
src:
|
|
1572
|
+
src: D(v),
|
|
1563
1573
|
alt: e.block.alt,
|
|
1564
|
-
style:
|
|
1565
|
-
}, null, 12,
|
|
1574
|
+
style: L(_.value)
|
|
1575
|
+
}, null, 12, wa))], 64)) : (c(), w("div", Ta, [D(u) ? (c(), w("button", {
|
|
1566
1576
|
key: 0,
|
|
1567
|
-
"aria-label":
|
|
1577
|
+
"aria-label": D(i).image.browseMedia,
|
|
1568
1578
|
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)]",
|
|
1569
|
-
onClick: n[2] ||=
|
|
1570
|
-
}, [
|
|
1579
|
+
onClick: n[2] ||= M((...e) => D(m) && D(m)(...e), ["stop"])
|
|
1580
|
+
}, [W(D(rr), {
|
|
1571
1581
|
size: 14,
|
|
1572
1582
|
"stroke-width": 1.5
|
|
1573
|
-
}),
|
|
1583
|
+
}), T(" " + P(D(i).image.browseMedia), 1)], 8, Ea)) : (c(), w("span", Da, P(D(i).image.clickToAdd), 1))]))], 12, _a));
|
|
1574
1584
|
}
|
|
1575
|
-
}),
|
|
1585
|
+
}), ka = { class: "tpl:w-full" }, Aa = ["href"], ja = {
|
|
1576
1586
|
key: 1,
|
|
1577
1587
|
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)]"
|
|
1578
|
-
},
|
|
1588
|
+
}, Ma = /* @__PURE__ */ o({
|
|
1579
1589
|
__name: "MenuBlock",
|
|
1580
1590
|
props: {
|
|
1581
1591
|
block: {},
|
|
1582
1592
|
viewport: {}
|
|
1583
1593
|
},
|
|
1584
1594
|
setup(e) {
|
|
1585
|
-
let t = e, { t: n } =
|
|
1595
|
+
let t = e, { t: n } = G(), r = Yt(qt, "MenuBlock"), i = I(() => ({
|
|
1586
1596
|
display: "flex",
|
|
1587
1597
|
flexWrap: "wrap",
|
|
1588
1598
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1590,84 +1600,88 @@ var Ki = n({
|
|
|
1590
1600
|
fontSize: `${t.block.fontSize}px`,
|
|
1591
1601
|
fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1592
1602
|
alignItems: "center"
|
|
1593
|
-
})),
|
|
1594
|
-
function
|
|
1603
|
+
})), a = I(() => t.block.items.length > 0);
|
|
1604
|
+
function o(e) {
|
|
1595
1605
|
return e || t.block.linkColor || t.block.color;
|
|
1596
1606
|
}
|
|
1597
|
-
return (t, r) => (
|
|
1607
|
+
return (t, r) => (c(), w("div", ka, [a.value ? (c(), w("div", {
|
|
1598
1608
|
key: 0,
|
|
1599
|
-
style:
|
|
1600
|
-
}, [(
|
|
1609
|
+
style: L(i.value)
|
|
1610
|
+
}, [(c(!0), w(U, null, p(e.block.items, (t, n) => (c(), w(U, { key: t.id }, [N("a", {
|
|
1601
1611
|
href: t.url || "#",
|
|
1602
1612
|
class: "tpl:cursor-default tpl:no-underline",
|
|
1603
|
-
style:
|
|
1604
|
-
color:
|
|
1613
|
+
style: L({
|
|
1614
|
+
color: o(t.color),
|
|
1605
1615
|
fontWeight: t.bold ? "bold" : "normal",
|
|
1606
1616
|
textDecoration: t.underline ? "underline" : "none"
|
|
1607
1617
|
}),
|
|
1608
|
-
onClick: r[0] ||=
|
|
1609
|
-
}, [
|
|
1618
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1619
|
+
}, [W(Ji, { text: t.text || "..." }, null, 8, ["text"])], 12, Aa), n < e.block.items.length - 1 ? (c(), w("span", {
|
|
1610
1620
|
key: 0,
|
|
1611
|
-
style:
|
|
1621
|
+
style: L({
|
|
1612
1622
|
color: e.block.separatorColor,
|
|
1613
1623
|
padding: `0 ${e.block.spacing}px`
|
|
1614
1624
|
})
|
|
1615
|
-
},
|
|
1625
|
+
}, P(e.block.separator), 5)) : k("", !0)], 64))), 128))], 4)) : (c(), w("div", ja, [W(D(nr), { size: 16 }), N("span", null, P(D(n).menu.addLinks), 1)]))]));
|
|
1616
1626
|
}
|
|
1617
1627
|
});
|
|
1618
1628
|
// src/composables/useEditableTextBlock.ts
|
|
1619
|
-
function
|
|
1620
|
-
let t =
|
|
1621
|
-
|
|
1622
|
-
|
|
1629
|
+
function Na(e) {
|
|
1630
|
+
let t = g(Pt, Bt), r = g(mn, null), i = g(Ut, null), { syntax: a } = K(), o = I(() => r?.value ? Ue(e(), t.value) : Le(e(), t.value)), s = I(() => Oe(Kn(ie(o.value, a)))), c = H(!1);
|
|
1631
|
+
u(() => i?.value, (e) => {
|
|
1632
|
+
e && (c.value = !1);
|
|
1633
|
+
});
|
|
1634
|
+
let l = H(null), { top: d, left: f } = n(l), { toLocal: p } = vt(), m = I(() => p({
|
|
1635
|
+
top: d.value - 8,
|
|
1636
|
+
left: f.value
|
|
1623
1637
|
}));
|
|
1624
|
-
function
|
|
1625
|
-
|
|
1638
|
+
function h() {
|
|
1639
|
+
i?.value || (c.value = !0);
|
|
1626
1640
|
}
|
|
1627
|
-
function
|
|
1628
|
-
|
|
1641
|
+
function _() {
|
|
1642
|
+
c.value = !1;
|
|
1629
1643
|
}
|
|
1630
1644
|
return {
|
|
1631
|
-
isEditing:
|
|
1632
|
-
blockRef:
|
|
1633
|
-
toolbarPosition:
|
|
1634
|
-
resolvedContent:
|
|
1635
|
-
handleDoubleClick:
|
|
1636
|
-
handleEditorDone:
|
|
1645
|
+
isEditing: c,
|
|
1646
|
+
blockRef: l,
|
|
1647
|
+
toolbarPosition: m,
|
|
1648
|
+
resolvedContent: s,
|
|
1649
|
+
handleDoubleClick: h,
|
|
1650
|
+
handleEditorDone: _
|
|
1637
1651
|
};
|
|
1638
1652
|
}
|
|
1639
1653
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1640
|
-
var
|
|
1654
|
+
var Pa = ["innerHTML"], Fa = /* @__PURE__ */ o({
|
|
1641
1655
|
__name: "ParagraphBlock",
|
|
1642
1656
|
props: {
|
|
1643
1657
|
block: {},
|
|
1644
1658
|
viewport: {}
|
|
1645
1659
|
},
|
|
1646
1660
|
setup(e) {
|
|
1647
|
-
let t = e, n =
|
|
1648
|
-
return (t, u) => (
|
|
1661
|
+
let t = e, n = b(() => import("./ParagraphEditor-CVGtTYta.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: l } = Na(() => t.block.content);
|
|
1662
|
+
return (t, u) => (c(), w("div", {
|
|
1649
1663
|
ref_key: "blockRef",
|
|
1650
|
-
ref:
|
|
1664
|
+
ref: i,
|
|
1651
1665
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1652
|
-
onDblclick: u[0] ||= (...e) =>
|
|
1653
|
-
}, [
|
|
1666
|
+
onDblclick: u[0] ||= (...e) => D(s) && D(s)(...e)
|
|
1667
|
+
}, [D(r) ? (c(), A(D(n), {
|
|
1654
1668
|
key: 0,
|
|
1655
1669
|
block: e.block,
|
|
1656
|
-
"toolbar-position":
|
|
1657
|
-
onDone:
|
|
1670
|
+
"toolbar-position": D(a),
|
|
1671
|
+
onDone: D(l)
|
|
1658
1672
|
}, null, 8, [
|
|
1659
1673
|
"block",
|
|
1660
1674
|
"toolbar-position",
|
|
1661
1675
|
"onDone"
|
|
1662
|
-
])) : (
|
|
1676
|
+
])) : (c(), w("div", {
|
|
1663
1677
|
key: 1,
|
|
1664
1678
|
class: "tpl-text-content tpl:outline-none",
|
|
1665
|
-
innerHTML:
|
|
1666
|
-
}, null, 8,
|
|
1679
|
+
innerHTML: D(o)
|
|
1680
|
+
}, null, 8, Pa))], 544));
|
|
1667
1681
|
}
|
|
1668
1682
|
});
|
|
1669
1683
|
// src/utils/updateBlockList.ts
|
|
1670
|
-
function
|
|
1684
|
+
function Ia(e, t, n, r = 0, i) {
|
|
1671
1685
|
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);
|
|
1672
1686
|
if (o.some((e) => !s.includes(e.id))) return;
|
|
1673
1687
|
let c = t.filter((e) => !o.some((t) => t.id === e.id)), l, u = -1;
|
|
@@ -1680,19 +1694,19 @@ function Pa(e, t, n, r = 0, i) {
|
|
|
1680
1694
|
l && (e.findBlockLocation(l.id) ? e.moveBlock(l.id, u, n, r) : e.addBlock(JSON.parse(JSON.stringify(l)), n, r, u));
|
|
1681
1695
|
}
|
|
1682
1696
|
// src/utils/mergeTagTokens.ts
|
|
1683
|
-
function
|
|
1697
|
+
function La(e, t, n) {
|
|
1684
1698
|
let r = [], i = "\0MT";
|
|
1685
1699
|
for (; e.includes(i);) i += "_";
|
|
1686
|
-
let a = n === "html" ?
|
|
1700
|
+
let a = n === "html" ? nt(e, (e) => {
|
|
1687
1701
|
let t = r.push(e) - 1;
|
|
1688
1702
|
return `${i}${t}\u0000`;
|
|
1689
1703
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1690
1704
|
start: e.index,
|
|
1691
1705
|
end: e.index + e[0].length
|
|
1692
|
-
})), s = [], c =
|
|
1706
|
+
})), s = [], c = et(a, t, "logic"), l = [], u = 0;
|
|
1693
1707
|
for (let e of ["logic", "value"]) {
|
|
1694
1708
|
let r = 0;
|
|
1695
|
-
for (let i of e === "logic" ? c :
|
|
1709
|
+
for (let i of e === "logic" ? c : et(a, t, "value")) {
|
|
1696
1710
|
let t = i.index, a = t + i.value.length;
|
|
1697
1711
|
for (; o[r]?.end <= t;) r++;
|
|
1698
1712
|
let c = o[r];
|
|
@@ -1708,51 +1722,51 @@ function Fa(e, t, n) {
|
|
|
1708
1722
|
}), s.push({
|
|
1709
1723
|
start: t,
|
|
1710
1724
|
end: a,
|
|
1711
|
-
value: n === "html" ?
|
|
1725
|
+
value: n === "html" ? Ne(i.value) : i.value
|
|
1712
1726
|
});
|
|
1713
1727
|
}
|
|
1714
1728
|
}
|
|
1715
1729
|
}
|
|
1716
1730
|
return [...r, ...s.map((e) => e.value)].sort();
|
|
1717
1731
|
}
|
|
1718
|
-
function
|
|
1719
|
-
return JSON.stringify(
|
|
1732
|
+
function Ra(e, t, n, r) {
|
|
1733
|
+
return JSON.stringify(La(e, n, r)) !== JSON.stringify(La(t, n, r));
|
|
1720
1734
|
}
|
|
1721
1735
|
// src/components/localization/LocaleStatusChip.vue?vue&type=script&setup=true&lang.ts
|
|
1722
|
-
var
|
|
1736
|
+
var za = [
|
|
1723
1737
|
"data-state",
|
|
1724
1738
|
"aria-label",
|
|
1725
1739
|
"title",
|
|
1726
1740
|
"aria-expanded",
|
|
1727
1741
|
"aria-controls",
|
|
1728
1742
|
"onKeydown"
|
|
1729
|
-
],
|
|
1743
|
+
], Ba = [
|
|
1730
1744
|
"aria-label",
|
|
1731
1745
|
"aria-labelledby",
|
|
1732
1746
|
"aria-describedby",
|
|
1733
1747
|
"onKeydown"
|
|
1734
|
-
],
|
|
1748
|
+
], Va = ["id"], Ha = ["id"], Ua = { class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:justify-end tpl:gap-2" }, Wa = ["disabled"], Ga = {
|
|
1735
1749
|
key: 0,
|
|
1736
1750
|
class: "tpl:m-0 tpl:mb-2 tpl:text-xs tpl:font-medium"
|
|
1737
|
-
},
|
|
1751
|
+
}, Ka = {
|
|
1738
1752
|
key: 1,
|
|
1739
1753
|
class: "tpl:m-0"
|
|
1740
|
-
},
|
|
1754
|
+
}, qa = { class: "tpl:m-0" }, Ja = { class: "tpl:mt-2 tpl:mb-0 tpl:break-words tpl:text-[var(--tpl-chrome-text-muted)]" }, Ya = {
|
|
1741
1755
|
key: 3,
|
|
1742
1756
|
class: "tpl:m-0"
|
|
1743
|
-
},
|
|
1757
|
+
}, Xa = {
|
|
1744
1758
|
key: 4,
|
|
1745
1759
|
class: "tpl:m-0"
|
|
1746
|
-
},
|
|
1760
|
+
}, Za = {
|
|
1747
1761
|
key: 5,
|
|
1748
1762
|
class: "tpl:m-0"
|
|
1749
|
-
},
|
|
1763
|
+
}, Qa = {
|
|
1750
1764
|
key: 6,
|
|
1751
1765
|
class: "tpl:m-0 tpl:list-none tpl:p-0"
|
|
1752
|
-
},
|
|
1766
|
+
}, $a = ["onClick"], eo = {
|
|
1753
1767
|
key: 7,
|
|
1754
1768
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1755
|
-
},
|
|
1769
|
+
}, to = ["data-testid", "disabled"], no = /*#__PURE__*/ vr(/* @__PURE__ */ o({
|
|
1756
1770
|
__name: "LocaleStatusChip",
|
|
1757
1771
|
props: {
|
|
1758
1772
|
blockId: {},
|
|
@@ -1771,233 +1785,233 @@ var La = [
|
|
|
1771
1785
|
editable: { type: Boolean }
|
|
1772
1786
|
},
|
|
1773
1787
|
emits: ["target"],
|
|
1774
|
-
setup(e, { emit:
|
|
1775
|
-
let
|
|
1788
|
+
setup(e, { emit: t }) {
|
|
1789
|
+
let n = e, r = t, i = g(_n, null), o = g(tn, null), s = g(Ct, null), l = g(Kt, "en") ?? "en", { t: d, format: f } = G(), m = te(), h = gt(), { toLocal: v } = vt(), y = H(null), b = H(null), x = H(!1), S = H(!1), C = H(null), T = H(null), F = null, R = H({
|
|
1776
1790
|
top: 0,
|
|
1777
1791
|
left: 0
|
|
1778
|
-
}),
|
|
1792
|
+
}), z = H({
|
|
1779
1793
|
maxHeight: 0,
|
|
1780
1794
|
maxWidth: 0
|
|
1781
|
-
}),
|
|
1795
|
+
}), B = `tpl-locale-popover-${ue()}`, V = I(() => pr(i?.activeLocale?.value ?? "")), W = I(() => pr(i?.content.value.settings.locale ?? "en"));
|
|
1782
1796
|
function K(e, t) {
|
|
1783
1797
|
switch (e) {
|
|
1784
|
-
case "tags-differ": return
|
|
1785
|
-
case "hidden": return
|
|
1786
|
-
case "changed": return
|
|
1787
|
-
case "default-stale": return
|
|
1788
|
-
case "missing": return t === 1 ?
|
|
1789
|
-
default: return t === 1 ?
|
|
1798
|
+
case "tags-differ": return d.localization.tagsDiffer;
|
|
1799
|
+
case "hidden": return f(d.localization.hidden, { language: V.value });
|
|
1800
|
+
case "changed": return f(d.localization.changed, { language: V.value });
|
|
1801
|
+
case "default-stale": return mr(d.localization.staleLanguages, t, l);
|
|
1802
|
+
case "missing": return t === 1 ? d.localization.notTranslated : mr(d.localization.notTranslatedCount, t, l);
|
|
1803
|
+
default: return t === 1 ? d.localization.outOfDate : mr(d.localization.staleCount, t, l);
|
|
1790
1804
|
}
|
|
1791
1805
|
}
|
|
1792
|
-
let
|
|
1806
|
+
let ne = I(() => K(n.state, n.count)), q = I(() => n.popoverState ?? n.state), J = I(() => n.popoverCount ?? n.count), re = I(() => K(q.value, J.value)), ie = I(() => n.state === "hidden" ? Zn : n.state === "changed" ? Jn : n.state === "default-stale" ? sr : n.state === "stale" ? Xn : ir), ae = I(() => q.value === "default-stale" || (q.value === "missing" || q.value === "stale") && J.value > 1), Y = I(() => n.editable && n.eligibleGaps && o?.isAvailable.value);
|
|
1793
1807
|
function X(e = !1) {
|
|
1794
|
-
|
|
1808
|
+
x.value = !1, S.value = !1, F = null, e && y.value?.focus({ preventScroll: !0 });
|
|
1795
1809
|
}
|
|
1796
|
-
async function
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1810
|
+
async function Z() {
|
|
1811
|
+
if (x.value) return X();
|
|
1812
|
+
h.value && (x.value = !0, await Q());
|
|
1799
1813
|
}
|
|
1800
|
-
async function
|
|
1801
|
-
let e =
|
|
1802
|
-
if (!e || !
|
|
1814
|
+
async function Q() {
|
|
1815
|
+
let e = h.value;
|
|
1816
|
+
if (!e || !x.value) return;
|
|
1803
1817
|
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);
|
|
1804
|
-
|
|
1818
|
+
z.value = {
|
|
1805
1819
|
maxHeight: u - c,
|
|
1806
1820
|
maxWidth: d - l
|
|
1807
1821
|
};
|
|
1808
1822
|
let f = y.value.getBoundingClientRect();
|
|
1809
|
-
if (
|
|
1823
|
+
if (F = f, R.value = v({
|
|
1810
1824
|
top: c,
|
|
1811
1825
|
left: l
|
|
1812
|
-
}), await
|
|
1813
|
-
let p =
|
|
1814
|
-
|
|
1815
|
-
top: Math.max(c, Math.min(
|
|
1816
|
-
left: Math.max(l, Math.min(f.left, d -
|
|
1817
|
-
}), await
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
|
|
1826
|
+
}), await j(), !x.value || !b.value) return;
|
|
1827
|
+
let p = b.value.getBoundingClientRect(), m = Math.min(p.height, z.value.maxHeight), g = Math.min(p.width, z.value.maxWidth), _ = f.bottom + 4, C = _ + m <= u ? _ : f.top - m - 4;
|
|
1828
|
+
R.value = v({
|
|
1829
|
+
top: Math.max(c, Math.min(C, u - m)),
|
|
1830
|
+
left: Math.max(l, Math.min(f.left, d - g))
|
|
1831
|
+
}), await j(), x.value && (S.value ? T.value : b.value)?.focus({ preventScroll: !0 });
|
|
1832
|
+
}
|
|
1833
|
+
u(S, async () => {
|
|
1834
|
+
x.value && (await Q(), x.value && !S.value && C.value?.focus({ preventScroll: !0 }));
|
|
1821
1835
|
});
|
|
1822
|
-
function
|
|
1836
|
+
function oe(e) {
|
|
1823
1837
|
let t = e.composedPath();
|
|
1824
|
-
!t.includes(y.value) && !t.includes(
|
|
1838
|
+
!t.includes(y.value) && !t.includes(b.value) && X();
|
|
1825
1839
|
}
|
|
1826
|
-
function
|
|
1827
|
-
if (e.composedPath().includes(
|
|
1840
|
+
function se(e) {
|
|
1841
|
+
if (e.composedPath().includes(b.value)) return;
|
|
1828
1842
|
let t = y.value?.getBoundingClientRect();
|
|
1829
|
-
t &&
|
|
1830
|
-
}
|
|
1831
|
-
function
|
|
1832
|
-
|
|
1833
|
-
}
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
}, { flush: "sync" }),
|
|
1837
|
-
|
|
1838
|
-
}),
|
|
1839
|
-
() =>
|
|
1840
|
-
() =>
|
|
1841
|
-
() =>
|
|
1842
|
-
() =>
|
|
1843
|
-
() =>
|
|
1844
|
-
], () => X()),
|
|
1843
|
+
t && F && t.top === F.top && t.right === F.right || X();
|
|
1844
|
+
}
|
|
1845
|
+
function ce() {
|
|
1846
|
+
m.removeEventListener("click", oe, !0), m.removeEventListener("scroll", se, !0);
|
|
1847
|
+
}
|
|
1848
|
+
u(x, (e) => {
|
|
1849
|
+
ce(), e ? (m.addEventListener("click", oe, !0), m.addEventListener("scroll", se, !0)) : r("target", null);
|
|
1850
|
+
}, { flush: "sync" }), u(q, () => {
|
|
1851
|
+
S.value = !1, x.value && Q();
|
|
1852
|
+
}), u([
|
|
1853
|
+
() => n.blockId,
|
|
1854
|
+
() => n.state,
|
|
1855
|
+
() => i?.activeLocale?.value,
|
|
1856
|
+
() => i?.state.template?.id,
|
|
1857
|
+
() => i?.loadVersion?.value
|
|
1858
|
+
], () => X()), _(ce);
|
|
1845
1859
|
let le = (e) => {
|
|
1846
|
-
(
|
|
1860
|
+
(x.value || h.value) && (r("target", e ?? null), x.value || Z());
|
|
1847
1861
|
};
|
|
1848
|
-
|
|
1849
|
-
t &&
|
|
1850
|
-
}, { immediate: !0 }),
|
|
1851
|
-
|
|
1862
|
+
u(() => n.blockId, (e, t) => {
|
|
1863
|
+
t && s?.get(t) === le && s.delete(t), s?.set(e, le);
|
|
1864
|
+
}, { immediate: !0 }), _(() => {
|
|
1865
|
+
s?.get(n.blockId) === le && s.delete(n.blockId);
|
|
1852
1866
|
});
|
|
1853
|
-
function
|
|
1854
|
-
|
|
1867
|
+
function de() {
|
|
1868
|
+
i?.keepTranslations?.(n.blockId, n.stale), X(!0);
|
|
1855
1869
|
}
|
|
1856
|
-
function
|
|
1857
|
-
|
|
1870
|
+
function fe(e) {
|
|
1871
|
+
i?.resetLocaleFields?.(n.blockId, e), X(!0);
|
|
1858
1872
|
}
|
|
1859
|
-
function
|
|
1860
|
-
|
|
1873
|
+
function pe() {
|
|
1874
|
+
i?.setBlockHidden?.(n.blockId, !1), X(!0);
|
|
1861
1875
|
}
|
|
1862
|
-
function
|
|
1863
|
-
|
|
1876
|
+
function me(e) {
|
|
1877
|
+
i?.setActiveLocale?.(e), X();
|
|
1864
1878
|
}
|
|
1865
|
-
function
|
|
1866
|
-
Y.value && !
|
|
1879
|
+
function he() {
|
|
1880
|
+
Y.value && !o?.running.value && (q.value === "tags-differ" && n.replacesCurrent ? S.value = !0 : o?.translate({
|
|
1867
1881
|
only: q.value === "tags-differ" ? "all" : "gaps",
|
|
1868
|
-
blockId:
|
|
1882
|
+
blockId: n.blockId
|
|
1869
1883
|
}));
|
|
1870
1884
|
}
|
|
1871
|
-
function he() {
|
|
1872
|
-
F.value = !1;
|
|
1873
|
-
}
|
|
1874
1885
|
function ge() {
|
|
1875
|
-
|
|
1886
|
+
S.value = !1;
|
|
1876
1887
|
}
|
|
1877
1888
|
function _e() {
|
|
1878
|
-
|
|
1889
|
+
S.value ? ge() : X(!0);
|
|
1890
|
+
}
|
|
1891
|
+
function ve() {
|
|
1892
|
+
Y.value && !o?.running.value && n.translationCount && (S.value = !1, o?.translate({
|
|
1879
1893
|
only: "all",
|
|
1880
|
-
blockId:
|
|
1894
|
+
blockId: n.blockId
|
|
1881
1895
|
}));
|
|
1882
1896
|
}
|
|
1883
|
-
return (
|
|
1897
|
+
return (t, n) => (c(), w(U, null, [N("button", {
|
|
1884
1898
|
ref_key: "trigger",
|
|
1885
1899
|
ref: y,
|
|
1886
1900
|
type: "button",
|
|
1887
1901
|
"data-testid": "locale-chip",
|
|
1888
1902
|
"data-state": e.state,
|
|
1889
|
-
"aria-label":
|
|
1890
|
-
title:
|
|
1891
|
-
"aria-expanded":
|
|
1892
|
-
"aria-controls":
|
|
1903
|
+
"aria-label": ne.value,
|
|
1904
|
+
title: ne.value,
|
|
1905
|
+
"aria-expanded": x.value,
|
|
1906
|
+
"aria-controls": x.value ? B : void 0,
|
|
1893
1907
|
"aria-haspopup": "dialog",
|
|
1894
1908
|
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)]",
|
|
1895
|
-
onClick:
|
|
1896
|
-
onKeydown: [
|
|
1897
|
-
}, [(
|
|
1909
|
+
onClick: M(Z, ["stop"]),
|
|
1910
|
+
onKeydown: [E(M(Z, ["stop", "prevent"]), ["enter"]), E(M(_e, ["stop", "prevent"]), ["esc"])]
|
|
1911
|
+
}, [(c(), A(a(ie.value), {
|
|
1898
1912
|
size: 12,
|
|
1899
1913
|
"stroke-width": 2,
|
|
1900
1914
|
"aria-hidden": "true"
|
|
1901
|
-
}))], 40,
|
|
1915
|
+
}))], 40, za), D(h) && x.value ? (c(), A(ee, {
|
|
1902
1916
|
key: 0,
|
|
1903
|
-
to:
|
|
1904
|
-
}, [
|
|
1905
|
-
id:
|
|
1917
|
+
to: D(h)
|
|
1918
|
+
}, [N("div", {
|
|
1919
|
+
id: B,
|
|
1906
1920
|
ref_key: "popover",
|
|
1907
|
-
ref:
|
|
1921
|
+
ref: b,
|
|
1908
1922
|
role: "dialog",
|
|
1909
|
-
"aria-label":
|
|
1910
|
-
"aria-labelledby":
|
|
1911
|
-
"aria-describedby":
|
|
1923
|
+
"aria-label": S.value ? void 0 : re.value,
|
|
1924
|
+
"aria-labelledby": S.value ? `${B}-question` : void 0,
|
|
1925
|
+
"aria-describedby": S.value ? `${B}-warning` : void 0,
|
|
1912
1926
|
tabindex: "-1",
|
|
1913
1927
|
"data-testid": "locale-popover",
|
|
1914
1928
|
class: "tpl-locale-popover tpl:absolute tpl:z-[10000] tpl:w-[300px] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-3 tpl:text-sm tpl:text-[var(--tpl-chrome-text)] tpl:shadow-[var(--tpl-shadow-md)] tpl:outline-none",
|
|
1915
|
-
style:
|
|
1916
|
-
top: `${
|
|
1917
|
-
left: `${
|
|
1918
|
-
maxHeight: `${
|
|
1919
|
-
maxWidth: `${
|
|
1929
|
+
style: L({
|
|
1930
|
+
top: `${R.value.top}px`,
|
|
1931
|
+
left: `${R.value.left}px`,
|
|
1932
|
+
maxHeight: `${z.value.maxHeight}px`,
|
|
1933
|
+
maxWidth: `${z.value.maxWidth}px`
|
|
1920
1934
|
}),
|
|
1921
|
-
onClick:
|
|
1922
|
-
onKeydown:
|
|
1923
|
-
}, [
|
|
1924
|
-
|
|
1925
|
-
id: `${
|
|
1935
|
+
onClick: n[2] ||= M(() => {}, ["stop"]),
|
|
1936
|
+
onKeydown: E(M(_e, ["stop", "prevent"]), ["esc"])
|
|
1937
|
+
}, [S.value ? (c(), w(U, { key: 0 }, [
|
|
1938
|
+
N("h3", {
|
|
1939
|
+
id: `${B}-question`,
|
|
1926
1940
|
class: "tpl:m-0 tpl:mb-2 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
1927
|
-
},
|
|
1928
|
-
|
|
1929
|
-
id: `${
|
|
1941
|
+
}, P(D(mr)(D(d).localization.translationConfirmation, e.translationCount ?? 0, D(l))), 9, Va),
|
|
1942
|
+
N("p", {
|
|
1943
|
+
id: `${B}-warning`,
|
|
1930
1944
|
class: "tpl:m-0 tpl:text-[var(--tpl-text-muted)]"
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1945
|
+
}, P(D(f)(D(d).localization.translationDescription, { language: V.value })), 9, Ha),
|
|
1946
|
+
N("div", Ua, [N("button", {
|
|
1933
1947
|
ref_key: "confirmationCancel",
|
|
1934
|
-
ref:
|
|
1948
|
+
ref: T,
|
|
1935
1949
|
type: "button",
|
|
1936
1950
|
"data-testid": "translation-confirm-cancel",
|
|
1937
|
-
class:
|
|
1938
|
-
onClick:
|
|
1939
|
-
},
|
|
1951
|
+
class: O(D(gr)),
|
|
1952
|
+
onClick: ge
|
|
1953
|
+
}, P(D(d).localization.cancel), 3), N("button", {
|
|
1940
1954
|
type: "button",
|
|
1941
1955
|
"data-testid": "translation-confirm",
|
|
1942
|
-
class:
|
|
1943
|
-
disabled: !Y.value || !!
|
|
1944
|
-
onClick:
|
|
1945
|
-
},
|
|
1946
|
-
], 64)) : (
|
|
1947
|
-
|
|
1948
|
-
q.value === "missing" ? (
|
|
1956
|
+
class: O(D(_r)),
|
|
1957
|
+
disabled: !Y.value || !!D(o)?.running.value || !e.translationCount,
|
|
1958
|
+
onClick: ve
|
|
1959
|
+
}, P(D(mr)(D(d).localization.translateAllFields, e.translationCount ?? 0, D(l))), 11, Wa)])
|
|
1960
|
+
], 64)) : (c(), w(U, { key: 1 }, [
|
|
1961
|
+
ae.value ? (c(), w("p", Ga, P(re.value), 1)) : k("", !0),
|
|
1962
|
+
q.value === "missing" ? (c(), w("p", Ka, P(D(f)(D(d).localization.missingExplanation, { default: W.value })), 1)) : q.value === "stale" ? (c(), w(U, { key: 2 }, [N("p", qa, P(D(f)(D(d).localization.staleExplanation, { default: W.value })), 1), N("p", Ja, P(D(f)(D(d).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : q.value === "tags-differ" ? (c(), w("p", Ya, P(D(f)(D(d).localization.tagsDifferExplanation, { default: W.value })), 1)) : q.value === "changed" ? (c(), w("p", Xa, P(D(mr)(D(d).localization.changedProperties, J.value, D(l), { default: W.value })), 1)) : q.value === "hidden" ? (c(), w("p", Za, P(D(f)(D(d).localization.hiddenExplanation, { language: V.value })), 1)) : (c(), w("ul", Qa, [(c(!0), w(U, null, p(e.staleLocales, (e) => (c(), w("li", {
|
|
1949
1963
|
key: e,
|
|
1950
1964
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
1951
|
-
}, [
|
|
1965
|
+
}, [N("span", null, P(D(pr)(e)), 1), N("button", {
|
|
1952
1966
|
type: "button",
|
|
1953
|
-
class:
|
|
1954
|
-
onClick: (t) =>
|
|
1955
|
-
},
|
|
1956
|
-
e.editable && q.value !== "default-stale" ? (
|
|
1957
|
-
Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (
|
|
1967
|
+
class: O(D(hr)),
|
|
1968
|
+
onClick: (t) => me(e)
|
|
1969
|
+
}, P(D(d).localization.open), 11, $a)]))), 128))])),
|
|
1970
|
+
e.editable && q.value !== "default-stale" ? (c(), w("div", eo, [
|
|
1971
|
+
Y.value && (q.value === "missing" || q.value === "stale" || q.value === "tags-differ") ? (c(), w("button", {
|
|
1958
1972
|
key: 0,
|
|
1959
1973
|
type: "button",
|
|
1960
1974
|
ref_key: "retranslate",
|
|
1961
|
-
ref:
|
|
1975
|
+
ref: C,
|
|
1962
1976
|
"data-testid": q.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
1963
|
-
class:
|
|
1964
|
-
disabled: !!
|
|
1965
|
-
onClick:
|
|
1966
|
-
},
|
|
1967
|
-
q.value === "stale" || q.value === "tags-differ" ? (
|
|
1977
|
+
class: O(D(gr)),
|
|
1978
|
+
disabled: !!D(o)?.running.value,
|
|
1979
|
+
onClick: he
|
|
1980
|
+
}, P(q.value === "missing" ? D(d).localization.translate : D(d).localization.retranslate), 11, to)) : k("", !0),
|
|
1981
|
+
q.value === "stale" || q.value === "tags-differ" ? (c(), w(U, { key: 1 }, [q.value === "stale" ? (c(), w("button", {
|
|
1968
1982
|
key: 0,
|
|
1969
1983
|
type: "button",
|
|
1970
1984
|
"data-testid": "locale-keep",
|
|
1971
|
-
class:
|
|
1972
|
-
onClick:
|
|
1973
|
-
},
|
|
1985
|
+
class: O(D(Y.value ? hr : gr)),
|
|
1986
|
+
onClick: de
|
|
1987
|
+
}, P(D(d).localization.keep), 3)) : k("", !0), N("button", {
|
|
1974
1988
|
type: "button",
|
|
1975
1989
|
"data-testid": "locale-use-default",
|
|
1976
|
-
class:
|
|
1977
|
-
onClick:
|
|
1978
|
-
},
|
|
1979
|
-
q.value === "changed" ? (
|
|
1990
|
+
class: O(D(q.value === "tags-differ" && !Y.value ? gr : hr)),
|
|
1991
|
+
onClick: n[0] ||= (t) => fe(q.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
1992
|
+
}, P(D(f)(D(d).localization.useDefaultLanguage, { default: W.value })), 3)], 64)) : k("", !0),
|
|
1993
|
+
q.value === "changed" ? (c(), w("button", {
|
|
1980
1994
|
key: 2,
|
|
1981
1995
|
type: "button",
|
|
1982
1996
|
"data-testid": "locale-reset",
|
|
1983
|
-
class:
|
|
1984
|
-
onClick:
|
|
1985
|
-
},
|
|
1986
|
-
q.value === "hidden" ? (
|
|
1997
|
+
class: O(D(gr)),
|
|
1998
|
+
onClick: n[1] ||= (t) => fe(e.setPaths)
|
|
1999
|
+
}, P(D(d).localization.resetChanges), 3)) : k("", !0),
|
|
2000
|
+
q.value === "hidden" ? (c(), w("button", {
|
|
1987
2001
|
key: 3,
|
|
1988
2002
|
type: "button",
|
|
1989
2003
|
"data-testid": "locale-show",
|
|
1990
|
-
class:
|
|
1991
|
-
onClick:
|
|
1992
|
-
},
|
|
1993
|
-
])) :
|
|
1994
|
-
], 64))], 44,
|
|
2004
|
+
class: O(D(gr)),
|
|
2005
|
+
onClick: pe
|
|
2006
|
+
}, P(D(d).localization.show), 3)) : k("", !0)
|
|
2007
|
+
])) : k("", !0)
|
|
2008
|
+
], 64))], 44, Ba)], 8, ["to"])) : k("", !0)], 64));
|
|
1995
2009
|
}
|
|
1996
|
-
}), [["__scopeId", "data-v-3343ae7d"]]),
|
|
2010
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), ro = /* @__PURE__ */ o({
|
|
1997
2011
|
__name: "LocaleMarkers",
|
|
1998
2012
|
props: { block: {} },
|
|
1999
2013
|
setup(e) {
|
|
2000
|
-
let t = e, n =
|
|
2014
|
+
let t = e, n = g(_n, null), r = g(Nt, void 0), i = g($t, []), a = g(xt, le.liquid), o = g(en, I(() => /* @__PURE__ */ new Set())), s = I(() => n?.activeLocale?.value), l = I(() => s.value ? t.block.l10n?.[s.value] : void 0), d = I(() => ({
|
|
2001
2015
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2002
2016
|
...t.block,
|
|
2003
2017
|
children: []
|
|
@@ -2006,56 +2020,56 @@ var La = [
|
|
|
2006
2020
|
locale: n.content.value.settings.locale,
|
|
2007
2021
|
locales: n.content.value.settings.locales
|
|
2008
2022
|
}
|
|
2009
|
-
})),
|
|
2023
|
+
})), f = I(() => n && s.value && !o.value.has(s.value) ? $e(d.value, s.value, i) : {
|
|
2010
2024
|
missing: [],
|
|
2011
2025
|
stale: [],
|
|
2012
2026
|
translated: []
|
|
2013
|
-
}),
|
|
2014
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2015
|
-
return typeof r == "string" && i !== void 0 &&
|
|
2016
|
-
})),
|
|
2017
|
-
syntax:
|
|
2018
|
-
definitions:
|
|
2027
|
+
}), p = I(() => f.value.stale.map((e) => e.slice(t.block.id.length + 1))), m = I(() => f.value.translated.flatMap((e) => {
|
|
2028
|
+
let n = e.slice(t.block.id.length + 1), r = ve(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || ye[t.block.type]?.includes(n) ? "html" : "text";
|
|
2029
|
+
return typeof r == "string" && i !== void 0 && Ra(r, i, a, o) ? [n] : [];
|
|
2030
|
+
})), h = H(null), _ = I(() => n && s.value && !o.value.has(s.value) ? X(d.value, s.value, {
|
|
2031
|
+
syntax: a,
|
|
2032
|
+
definitions: i,
|
|
2019
2033
|
doNotTranslate: r?.doNotTranslate,
|
|
2020
2034
|
blockId: t.block.id,
|
|
2021
|
-
only:
|
|
2022
|
-
}).strings : []), v =
|
|
2035
|
+
only: w.value === "tags-differ" ? "all" : "gaps"
|
|
2036
|
+
}).strings : []), v = I(() => _.value.some(({ id: e }) => {
|
|
2023
2037
|
let n = e.slice(t.block.id.length + 1);
|
|
2024
|
-
return
|
|
2025
|
-
})), y =
|
|
2026
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2027
|
-
return Array.isArray(i) ?
|
|
2028
|
-
})), b =
|
|
2038
|
+
return f.value.translated.includes(e) && !m.value.includes(n);
|
|
2039
|
+
})), y = I(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2040
|
+
let n = e.split("."), r = n.pop(), i = n.length ? ve(t.block, n.join(".")) : t.block;
|
|
2041
|
+
return Array.isArray(i) ? ve(i, r) !== void 0 : i !== void 0;
|
|
2042
|
+
})), b = I(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && $e(d.value, e, i).stale.length > 0) : []), x = I(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : f.value.missing.length ? "missing" : p.value.length ? "stale" : m.value.length ? "tags-differ" : y.value.length ? "changed" : null : b.value.length ? "default-stale" : null);
|
|
2029
2043
|
function S(e) {
|
|
2030
|
-
return e === "missing" ?
|
|
2044
|
+
return e === "missing" ? f.value.missing.length : e === "stale" ? p.value.length : e === "tags-differ" ? m.value.length : e === "default-stale" ? b.value.length : y.value.length;
|
|
2031
2045
|
}
|
|
2032
|
-
let
|
|
2033
|
-
|
|
2034
|
-
|
|
2046
|
+
let C = I(() => S(x.value)), w = I(() => h.value && S(h.value) > 0 ? h.value : x.value), T = I(() => S(w.value));
|
|
2047
|
+
u([x, () => w.value !== (h.value ?? x.value)], () => {
|
|
2048
|
+
h.value = null;
|
|
2035
2049
|
});
|
|
2036
|
-
let
|
|
2037
|
-
let e =
|
|
2050
|
+
let E = I(() => {
|
|
2051
|
+
let e = ve(t.block, p.value[0] ?? "");
|
|
2038
2052
|
if (typeof e != "string") return "";
|
|
2039
2053
|
let n = e.split(/<[^>]*>/).join("");
|
|
2040
2054
|
return Array.from(n).slice(0, 60).join("");
|
|
2041
2055
|
});
|
|
2042
|
-
return (t, n) =>
|
|
2056
|
+
return (t, n) => D(r) && x.value ? (c(), A(no, {
|
|
2043
2057
|
key: 0,
|
|
2044
2058
|
"block-id": e.block.id,
|
|
2045
2059
|
state: x.value,
|
|
2046
|
-
count:
|
|
2047
|
-
"popover-state":
|
|
2048
|
-
"popover-count":
|
|
2049
|
-
stale:
|
|
2050
|
-
"tags-differ":
|
|
2060
|
+
count: C.value,
|
|
2061
|
+
"popover-state": w.value ?? void 0,
|
|
2062
|
+
"popover-count": T.value,
|
|
2063
|
+
stale: p.value,
|
|
2064
|
+
"tags-differ": m.value,
|
|
2051
2065
|
"set-paths": y.value,
|
|
2052
2066
|
"stale-locales": b.value,
|
|
2053
|
-
excerpt:
|
|
2067
|
+
excerpt: E.value,
|
|
2054
2068
|
"eligible-gaps": _.value.length > 0,
|
|
2055
2069
|
"translation-count": _.value.length,
|
|
2056
2070
|
"replaces-current": v.value,
|
|
2057
|
-
editable: !!
|
|
2058
|
-
onTarget: n[0] ||= (e) =>
|
|
2071
|
+
editable: !!s.value && D(r).locales.includes(s.value),
|
|
2072
|
+
onTarget: n[0] ||= (e) => h.value = e
|
|
2059
2073
|
}, null, 8, [
|
|
2060
2074
|
"block-id",
|
|
2061
2075
|
"state",
|
|
@@ -2071,23 +2085,23 @@ var La = [
|
|
|
2071
2085
|
"translation-count",
|
|
2072
2086
|
"replaces-current",
|
|
2073
2087
|
"editable"
|
|
2074
|
-
])) :
|
|
2088
|
+
])) : k("", !0);
|
|
2075
2089
|
}
|
|
2076
|
-
}),
|
|
2090
|
+
}), io = [
|
|
2077
2091
|
"data-block-id",
|
|
2078
2092
|
"data-block-type",
|
|
2079
2093
|
"data-tpl-picked"
|
|
2080
|
-
],
|
|
2094
|
+
], ao = ["aria-label"], oo = ["data-lock-holder"], so = ["aria-label"], co = [
|
|
2081
2095
|
"aria-label",
|
|
2082
2096
|
"aria-pressed",
|
|
2083
2097
|
"title"
|
|
2084
|
-
],
|
|
2098
|
+
], lo = ["aria-label", "title"], uo = ["aria-label", "title"], fo = ["aria-label", "title"], po = {
|
|
2085
2099
|
key: 3,
|
|
2086
2100
|
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"
|
|
2087
|
-
},
|
|
2101
|
+
}, mo = { 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)]" }, ho = {
|
|
2088
2102
|
key: 4,
|
|
2089
2103
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2090
|
-
},
|
|
2104
|
+
}, go = ["aria-label", "title"], _o = /*#__PURE__*/ vr(/* @__PURE__ */ o({
|
|
2091
2105
|
__name: "BlockWrapper",
|
|
2092
2106
|
props: {
|
|
2093
2107
|
block: {},
|
|
@@ -2099,34 +2113,34 @@ var La = [
|
|
|
2099
2113
|
picked: { type: Boolean }
|
|
2100
2114
|
},
|
|
2101
2115
|
emits: ["select"],
|
|
2102
|
-
setup(
|
|
2103
|
-
let
|
|
2104
|
-
async function
|
|
2105
|
-
await
|
|
2106
|
-
}
|
|
2107
|
-
function
|
|
2108
|
-
|
|
2109
|
-
}
|
|
2110
|
-
let S =
|
|
2111
|
-
desktop:
|
|
2112
|
-
mobile:
|
|
2113
|
-
}[
|
|
2116
|
+
setup(t, { emit: n }) {
|
|
2117
|
+
let i = b(() => import("./BlockIssueBadge-DIlFDDwh.js")), a = t, o = I(() => a.displayBlock ?? a.block), s = n, { t: l, format: d } = G(), f = g(vn, null), p = H(null), m = I(() => f?.liftedBlockId.value === a.block.id), h = I(() => m.value ? d(l.blockActions.dragLifted, { block: a.block.type }) : l.blockActions.drag);
|
|
2118
|
+
async function _() {
|
|
2119
|
+
await j(), p.value?.focus();
|
|
2120
|
+
}
|
|
2121
|
+
function v(e) {
|
|
2122
|
+
f && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), m.value ? f.drop(a.block.id) : f.lift(a.block.id)) : m.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f.cancel(), _()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), f.moveUp(a.block.id), _()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), f.moveDown(a.block.id), _())));
|
|
2123
|
+
}
|
|
2124
|
+
let S = I(() => !a.viewport || !o.value.visibility ? !1 : o.value.visibility[a.viewport] === !1), C = I(() => !!(ue?.activeLocale?.value && a.block.l10n?.[ue.activeLocale.value]?.hidden)), E = I(() => a.previewMode === !0 && (S.value || C.value)), ee = I(() => a.viewport ? {
|
|
2125
|
+
desktop: l.viewport.desktop,
|
|
2126
|
+
mobile: l.viewport.mobile
|
|
2127
|
+
}[a.viewport] ?? a.viewport : ""), F = I(() => !!o.value.displayCondition), R = g(pn, null), z = g(on, null), B = g(Xt, {}), V = I(() => B.savedBlocks?.isPicking.value === !0), U = I(() => !a.nested && B.savedBlocks?.isAvailable.value === !0 && B.savedBlocks?.canCreate.value === !0), te = I(() => a.isSelected && !V.value), K = I(() => B.comments?.getBlockCount(a.block.id) ?? 0), ne = H(null), q = H(null), J = H(null), re = H(null), ie = H({
|
|
2114
2128
|
left: "calc(100% + 8px)",
|
|
2115
2129
|
top: "50%"
|
|
2116
|
-
}),
|
|
2117
|
-
function
|
|
2118
|
-
let e =
|
|
2130
|
+
}), ae = H(!1), Y = I(() => q.value ?? re.value), X = I(() => Y.value?.closest(".tpl-body"));
|
|
2131
|
+
function Z() {
|
|
2132
|
+
let e = ae.value, t = q.value, n = re.value, r = ne.value;
|
|
2119
2133
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2120
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2134
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = X.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2121
2135
|
if (n?.offsetWidth) {
|
|
2122
2136
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2123
2137
|
if (e === i) {
|
|
2124
|
-
|
|
2138
|
+
ae.value = !i, j(Z);
|
|
2125
2139
|
return;
|
|
2126
2140
|
}
|
|
2127
2141
|
}
|
|
2128
2142
|
if (!t?.offsetWidth) return;
|
|
2129
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2143
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = J.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%";
|
|
2130
2144
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2131
2145
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2132
2146
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2138,195 +2152,195 @@ var La = [
|
|
|
2138
2152
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2139
2153
|
}
|
|
2140
2154
|
}
|
|
2141
|
-
(
|
|
2155
|
+
(ie.value.left !== `${u}px` || ie.value.top !== m) && (ie.value = {
|
|
2142
2156
|
left: `${u}px`,
|
|
2143
2157
|
top: m
|
|
2144
2158
|
});
|
|
2145
2159
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
ee.value,
|
|
2160
|
+
x(Z), r(I(() => Y.value ? [
|
|
2161
|
+
ne.value,
|
|
2149
2162
|
q.value,
|
|
2150
2163
|
J.value,
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2164
|
+
re.value,
|
|
2165
|
+
X.value
|
|
2166
|
+
].filter((e) => !!e) : []), Z), e(X, "scroll", Z, { passive: !0 });
|
|
2167
|
+
let Q = I(() => B.collaboration?.lockOf(a.block.id) ?? null), oe = I(() => Q.value?.holder.type === "guest" ? l.collaboration.guest : Q.value?.holder.name ?? ""), se = I(() => B.collaboration?.agentHighlightOf(a.block.id) ?? B.ai?.highlightOf(a.block.id) ?? null), ce = zn(() => o.value.type === "section" ? o.value.backgroundImage : void 0), le = zn(() => o.value.type === "section" ? o.value.wrapper?.backgroundImage : void 0), ue = g(_n, null), de = ue ? yt(ue) : null, fe = g(rn, null) ?? de?.content ?? null;
|
|
2168
|
+
u([() => ue?.activeLocale?.value, () => de && Ie(de.settings.value)], Z, { flush: "post" });
|
|
2169
|
+
let pe = g(Rt, void 0), me = I(() => zi(o.value, {
|
|
2170
|
+
backgroundImageUrl: ce.value,
|
|
2171
|
+
heroBoxWidth: jn(o.value) ? Fn(o.value, fe?.value, pe) : void 0
|
|
2172
|
+
})), he = I(() => Gi(o.value, { backgroundImageUrl: le.value })), ge = I(() => {
|
|
2173
|
+
let e = o.value;
|
|
2160
2174
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2161
|
-
}),
|
|
2162
|
-
function
|
|
2163
|
-
|
|
2164
|
-
}
|
|
2165
|
-
function _e() {
|
|
2166
|
-
L?.deleteBlock(r.block.id);
|
|
2167
|
-
}
|
|
2168
|
-
function ve() {
|
|
2169
|
-
L?.duplicateBlock(r.block);
|
|
2175
|
+
}), _e = I(() => Wi(ge.value?.wrapper?.padding));
|
|
2176
|
+
function ve(e) {
|
|
2177
|
+
a.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
2170
2178
|
}
|
|
2171
2179
|
function ye() {
|
|
2172
|
-
|
|
2180
|
+
R?.deleteBlock(a.block.id);
|
|
2173
2181
|
}
|
|
2174
2182
|
function be() {
|
|
2175
|
-
R?.
|
|
2183
|
+
R?.duplicateBlock(a.block);
|
|
2176
2184
|
}
|
|
2177
|
-
|
|
2185
|
+
function xe() {
|
|
2186
|
+
B.savedBlocks?.startPicking(a.block.id);
|
|
2187
|
+
}
|
|
2188
|
+
function Se() {
|
|
2189
|
+
z?.toggleBlock(a.block.id);
|
|
2190
|
+
}
|
|
2191
|
+
return (e, n) => E.value ? k("", !0) : (c(), w("div", {
|
|
2178
2192
|
key: 0,
|
|
2179
2193
|
ref_key: "blockElement",
|
|
2180
|
-
ref:
|
|
2181
|
-
class:
|
|
2182
|
-
"tpl-block--selected":
|
|
2183
|
-
"tpl-block--locale-hidden":
|
|
2184
|
-
"tpl-block--picked":
|
|
2185
|
-
"tpl-block--idle": !
|
|
2186
|
-
"tpl-block--lifted":
|
|
2194
|
+
ref: ne,
|
|
2195
|
+
class: O(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2196
|
+
"tpl-block--selected": t.isSelected,
|
|
2197
|
+
"tpl-block--locale-hidden": C.value,
|
|
2198
|
+
"tpl-block--picked": t.picked,
|
|
2199
|
+
"tpl-block--idle": !t.isSelected && !t.picked,
|
|
2200
|
+
"tpl-block--lifted": m.value
|
|
2187
2201
|
}]),
|
|
2188
|
-
"data-block-id":
|
|
2189
|
-
"data-block-type":
|
|
2190
|
-
"data-tpl-picked":
|
|
2191
|
-
onClick:
|
|
2202
|
+
"data-block-id": t.block.id,
|
|
2203
|
+
"data-block-type": t.block.type,
|
|
2204
|
+
"data-tpl-picked": t.picked || void 0,
|
|
2205
|
+
onClick: ve
|
|
2192
2206
|
}, [
|
|
2193
|
-
|
|
2207
|
+
N("div", {
|
|
2194
2208
|
ref_key: "badgesElement",
|
|
2195
|
-
ref:
|
|
2209
|
+
ref: J,
|
|
2196
2210
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2197
2211
|
}, [
|
|
2198
|
-
|
|
2212
|
+
K.value > 0 && !S.value ? (c(), w("button", {
|
|
2199
2213
|
key: 0,
|
|
2200
2214
|
ref_key: "commentElement",
|
|
2201
|
-
ref:
|
|
2202
|
-
class:
|
|
2203
|
-
"aria-label":
|
|
2204
|
-
onClick:
|
|
2205
|
-
}, [
|
|
2215
|
+
ref: re,
|
|
2216
|
+
class: O(["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)]", ae.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2217
|
+
"aria-label": D(d)(D(l).blockActions.comments, { count: String(K.value) }),
|
|
2218
|
+
onClick: n[0] ||= M((e) => D(B).comments?.openForBlock(t.block.id), ["stop"])
|
|
2219
|
+
}, [W(D(cr), {
|
|
2206
2220
|
size: 12,
|
|
2207
2221
|
"stroke-width": 2.5
|
|
2208
|
-
}),
|
|
2209
|
-
|
|
2210
|
-
|
|
2222
|
+
}), T(" " + P(K.value), 1)], 10, ao)) : k("", !0),
|
|
2223
|
+
W(D(i), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2224
|
+
t.previewMode ? k("", !0) : (c(), A(ro, {
|
|
2211
2225
|
key: 1,
|
|
2212
|
-
block:
|
|
2226
|
+
block: t.block
|
|
2213
2227
|
}, null, 8, ["block"]))
|
|
2214
2228
|
], 512),
|
|
2215
|
-
|
|
2229
|
+
Q.value ? (c(), w("div", {
|
|
2216
2230
|
key: 0,
|
|
2217
2231
|
"data-testid": "block-lock",
|
|
2218
|
-
"data-lock-holder":
|
|
2232
|
+
"data-lock-holder": Q.value.holder.sessionId,
|
|
2219
2233
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2220
|
-
style:
|
|
2221
|
-
outline: `2px solid ${
|
|
2234
|
+
style: L({
|
|
2235
|
+
outline: `2px solid ${Q.value.holder.color}`,
|
|
2222
2236
|
outlineOffset: "-1px"
|
|
2223
2237
|
})
|
|
2224
|
-
}, [
|
|
2238
|
+
}, [N("span", {
|
|
2225
2239
|
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",
|
|
2226
|
-
style:
|
|
2227
|
-
backgroundColor:
|
|
2228
|
-
color:
|
|
2240
|
+
style: L({
|
|
2241
|
+
backgroundColor: Q.value.holder.color,
|
|
2242
|
+
color: D(yr)(Q.value.holder.color)
|
|
2229
2243
|
})
|
|
2230
|
-
},
|
|
2231
|
-
|
|
2232
|
-
key:
|
|
2244
|
+
}, P(D(d)(D(l).collaboration.editing, { name: oe.value })), 5)], 12, oo)) : k("", !0),
|
|
2245
|
+
se.value === null ? k("", !0) : (c(), w("div", {
|
|
2246
|
+
key: se.value,
|
|
2233
2247
|
"data-testid": "block-agent-highlight",
|
|
2234
2248
|
"aria-hidden": "true",
|
|
2235
2249
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
2236
2250
|
})),
|
|
2237
|
-
|
|
2251
|
+
te.value ? (c(), w("div", {
|
|
2238
2252
|
key: 2,
|
|
2239
2253
|
ref_key: "actionsElement",
|
|
2240
|
-
ref:
|
|
2241
|
-
style:
|
|
2254
|
+
ref: q,
|
|
2255
|
+
style: L(ie.value),
|
|
2242
2256
|
role: "toolbar",
|
|
2243
|
-
"aria-label":
|
|
2257
|
+
"aria-label": D(l).blockActions.drag,
|
|
2244
2258
|
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)]"
|
|
2245
2259
|
}, [
|
|
2246
|
-
|
|
2260
|
+
N("button", {
|
|
2247
2261
|
ref_key: "dragButtonRef",
|
|
2248
|
-
ref:
|
|
2262
|
+
ref: p,
|
|
2249
2263
|
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
2250
|
-
"aria-label":
|
|
2251
|
-
"aria-pressed":
|
|
2264
|
+
"aria-label": h.value,
|
|
2265
|
+
"aria-pressed": m.value,
|
|
2252
2266
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2253
|
-
title:
|
|
2254
|
-
onKeydown:
|
|
2255
|
-
}, [
|
|
2267
|
+
title: D(l).blockActions.drag,
|
|
2268
|
+
onKeydown: v
|
|
2269
|
+
}, [W(D(dr), {
|
|
2256
2270
|
size: 14,
|
|
2257
2271
|
"stroke-width": 1.5
|
|
2258
|
-
})], 40,
|
|
2259
|
-
|
|
2272
|
+
})], 40, co),
|
|
2273
|
+
N("button", {
|
|
2260
2274
|
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",
|
|
2261
|
-
"aria-label":
|
|
2262
|
-
title:
|
|
2263
|
-
onClick:
|
|
2264
|
-
}, [
|
|
2275
|
+
"aria-label": D(l).blockActions.duplicate,
|
|
2276
|
+
title: D(l).blockActions.duplicate,
|
|
2277
|
+
onClick: M(be, ["stop"])
|
|
2278
|
+
}, [W(D(qn), {
|
|
2265
2279
|
size: 14,
|
|
2266
2280
|
"stroke-width": 1.5
|
|
2267
|
-
})], 8,
|
|
2268
|
-
U.value ? (
|
|
2281
|
+
})], 8, lo),
|
|
2282
|
+
U.value ? (c(), w("button", {
|
|
2269
2283
|
key: 0,
|
|
2270
2284
|
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",
|
|
2271
|
-
"aria-label":
|
|
2272
|
-
title:
|
|
2273
|
-
onClick:
|
|
2274
|
-
}, [
|
|
2285
|
+
"aria-label": D(l).blockActions.saveAsBlock,
|
|
2286
|
+
title: D(l).blockActions.saveAsBlock,
|
|
2287
|
+
onClick: M(xe, ["stop"])
|
|
2288
|
+
}, [W(D(tr), {
|
|
2275
2289
|
size: 14,
|
|
2276
2290
|
"stroke-width": 1.5
|
|
2277
|
-
})], 8,
|
|
2278
|
-
|
|
2291
|
+
})], 8, uo)) : k("", !0),
|
|
2292
|
+
N("button", {
|
|
2279
2293
|
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",
|
|
2280
|
-
"aria-label":
|
|
2281
|
-
title:
|
|
2282
|
-
onClick:
|
|
2283
|
-
}, [
|
|
2294
|
+
"aria-label": D(l).blockActions.delete,
|
|
2295
|
+
title: D(l).blockActions.delete,
|
|
2296
|
+
onClick: M(ye, ["stop"])
|
|
2297
|
+
}, [W(D(ar), {
|
|
2284
2298
|
size: 14,
|
|
2285
2299
|
"stroke-width": 1.5
|
|
2286
|
-
})], 8,
|
|
2287
|
-
], 12,
|
|
2288
|
-
S.value ? (
|
|
2300
|
+
})], 8, fo)
|
|
2301
|
+
], 12, so)) : k("", !0),
|
|
2302
|
+
S.value ? (c(), w("div", po, [N("span", mo, [W(D(Zn), {
|
|
2289
2303
|
size: 12,
|
|
2290
2304
|
"stroke-width": 1.5
|
|
2291
|
-
}),
|
|
2292
|
-
|
|
2305
|
+
}), T(" " + P(D(d)(D(l).blockActions.hiddenOnViewport, { viewport: ee.value })), 1)])])) : k("", !0),
|
|
2306
|
+
F.value && !S.value ? (c(), w("div", ho, [N("button", {
|
|
2293
2307
|
"data-testid": "condition-toggle",
|
|
2294
2308
|
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)]",
|
|
2295
|
-
"aria-label":
|
|
2296
|
-
title:
|
|
2297
|
-
onClick:
|
|
2298
|
-
}, [
|
|
2309
|
+
"aria-label": D(l).blockActions.conditionToggle,
|
|
2310
|
+
title: t.block.displayCondition?.label,
|
|
2311
|
+
onClick: M(Se, ["stop"])
|
|
2312
|
+
}, [W(D(Qn), {
|
|
2299
2313
|
size: 12,
|
|
2300
2314
|
"stroke-width": 2
|
|
2301
|
-
})], 8,
|
|
2302
|
-
|
|
2315
|
+
})], 8, go)])) : k("", !0),
|
|
2316
|
+
he.value ? (c(), w("div", {
|
|
2303
2317
|
key: 5,
|
|
2304
|
-
class:
|
|
2305
|
-
style:
|
|
2306
|
-
}, [
|
|
2318
|
+
class: O(["tpl-section-wrapper tpl-email-surface", D(Fi)(he.value)]),
|
|
2319
|
+
style: L(he.value)
|
|
2320
|
+
}, [ge.value ? (c(), w("div", {
|
|
2307
2321
|
key: 0,
|
|
2308
2322
|
class: "tpl-band-frame",
|
|
2309
|
-
style:
|
|
2310
|
-
}, [
|
|
2311
|
-
class:
|
|
2312
|
-
style:
|
|
2313
|
-
}, [
|
|
2323
|
+
style: L(_e.value)
|
|
2324
|
+
}, [N("div", {
|
|
2325
|
+
class: O(["tpl-block-content tpl-email-surface", D(Fi)(me.value)]),
|
|
2326
|
+
style: L(me.value)
|
|
2327
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (c(), w("div", {
|
|
2314
2328
|
key: 1,
|
|
2315
|
-
class:
|
|
2316
|
-
style:
|
|
2317
|
-
}, [
|
|
2329
|
+
class: O(["tpl-block-content tpl-email-surface", D(Fi)(me.value)]),
|
|
2330
|
+
style: L(me.value)
|
|
2331
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (c(), w("div", {
|
|
2318
2332
|
key: 6,
|
|
2319
|
-
class:
|
|
2320
|
-
style:
|
|
2321
|
-
}, [
|
|
2322
|
-
], 10,
|
|
2333
|
+
class: O(["tpl-block-content tpl-email-surface", D(Fi)(me.value)]),
|
|
2334
|
+
style: L(me.value)
|
|
2335
|
+
}, [y(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2336
|
+
], 10, io));
|
|
2323
2337
|
}
|
|
2324
2338
|
}), [["__scopeId", "data-v-872194d3"]]);
|
|
2325
2339
|
// src/utils/unwrapParagraph.ts
|
|
2326
|
-
function
|
|
2340
|
+
function vo(e) {
|
|
2327
2341
|
let t = /^\s*<p\b/.exec(e);
|
|
2328
2342
|
if (!t) return e;
|
|
2329
|
-
let n =
|
|
2343
|
+
let n = qe(e, t[0].length);
|
|
2330
2344
|
if (n === -1) return e;
|
|
2331
2345
|
let r = /<\/p>\s*$/.exec(e);
|
|
2332
2346
|
if (!r || r.index <= n) return e;
|
|
@@ -2334,38 +2348,38 @@ function go(e) {
|
|
|
2334
2348
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2335
2349
|
}
|
|
2336
2350
|
// src/components/blocks/TitleBlock.vue
|
|
2337
|
-
var
|
|
2351
|
+
var yo = /* @__PURE__ */ o({
|
|
2338
2352
|
__name: "TitleBlock",
|
|
2339
2353
|
props: {
|
|
2340
2354
|
block: {},
|
|
2341
2355
|
viewport: {}
|
|
2342
2356
|
},
|
|
2343
2357
|
setup(e) {
|
|
2344
|
-
let
|
|
2358
|
+
let t = e, n = b(() => import("./TitleEditor-CuKJptyw.js")), r = Yt(qt, "TitleBlock"), { isEditing: i, blockRef: o, toolbarPosition: s, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Na(() => t.block.content), f = I(() => {
|
|
2345
2359
|
let e = {
|
|
2346
|
-
fontSize: `${
|
|
2360
|
+
fontSize: `${je[t.block.level]}px`,
|
|
2347
2361
|
lineHeight: String(xe),
|
|
2348
2362
|
fontWeight: "700",
|
|
2349
|
-
textAlign:
|
|
2363
|
+
textAlign: t.block.textAlign
|
|
2350
2364
|
};
|
|
2351
|
-
return
|
|
2352
|
-
}), p =
|
|
2353
|
-
return (
|
|
2365
|
+
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
2366
|
+
}), p = I(() => `h${t.block.level}`), m = I(() => Kn(vo(l.value)));
|
|
2367
|
+
return (t, r) => (c(), w("div", {
|
|
2354
2368
|
ref_key: "blockRef",
|
|
2355
|
-
ref:
|
|
2369
|
+
ref: o,
|
|
2356
2370
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2357
|
-
style:
|
|
2358
|
-
onDblclick:
|
|
2359
|
-
}, [
|
|
2371
|
+
style: L(f.value),
|
|
2372
|
+
onDblclick: r[0] ||= (...e) => D(u) && D(u)(...e)
|
|
2373
|
+
}, [D(i) ? (c(), A(D(n), {
|
|
2360
2374
|
key: 0,
|
|
2361
2375
|
block: e.block,
|
|
2362
|
-
"toolbar-position":
|
|
2363
|
-
onDone:
|
|
2376
|
+
"toolbar-position": D(s),
|
|
2377
|
+
onDone: D(d)
|
|
2364
2378
|
}, null, 8, [
|
|
2365
2379
|
"block",
|
|
2366
2380
|
"toolbar-position",
|
|
2367
2381
|
"onDone"
|
|
2368
|
-
])) : (
|
|
2382
|
+
])) : (c(), A(a(p.value), {
|
|
2369
2383
|
key: 1,
|
|
2370
2384
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2371
2385
|
style: {
|
|
@@ -2375,14 +2389,14 @@ var _o = /* @__PURE__ */ n({
|
|
|
2375
2389
|
innerHTML: m.value
|
|
2376
2390
|
}, null, 8, ["innerHTML"]))], 36));
|
|
2377
2391
|
}
|
|
2378
|
-
}),
|
|
2379
|
-
function
|
|
2380
|
-
let n =
|
|
2381
|
-
n.color =
|
|
2382
|
-
let r =
|
|
2383
|
-
r.content = `<p style="text-align: center"><span style="color: ${
|
|
2384
|
-
let i =
|
|
2385
|
-
return i.align = "center",
|
|
2392
|
+
}), bo = "hero", xo = "#1f2937", So = "#ffffff";
|
|
2393
|
+
function Co(e, t) {
|
|
2394
|
+
let n = dt("title", e);
|
|
2395
|
+
n.color = So, n.textAlign = "center";
|
|
2396
|
+
let r = dt("paragraph", e);
|
|
2397
|
+
r.content = `<p style="text-align: center"><span style="color: ${So}">${wo(t)}</span></p>`;
|
|
2398
|
+
let i = dt("button", e);
|
|
2399
|
+
return i.align = "center", he({
|
|
2386
2400
|
columns: "1",
|
|
2387
2401
|
children: [[
|
|
2388
2402
|
n,
|
|
@@ -2400,51 +2414,52 @@ function xo(e, t) {
|
|
|
2400
2414
|
bottom: 48,
|
|
2401
2415
|
left: 24
|
|
2402
2416
|
},
|
|
2403
|
-
backgroundColor:
|
|
2417
|
+
backgroundColor: xo
|
|
2404
2418
|
}
|
|
2405
2419
|
});
|
|
2406
2420
|
}
|
|
2407
|
-
function
|
|
2421
|
+
function wo(e) {
|
|
2408
2422
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2409
2423
|
}
|
|
2410
2424
|
// src/utils/sectionColumnDrop.ts
|
|
2411
|
-
var
|
|
2412
|
-
function
|
|
2413
|
-
return e.dataset.blockType !== "section" && !
|
|
2425
|
+
var To = /* @__PURE__ */ new Set(["section", bo]);
|
|
2426
|
+
function Eo(e) {
|
|
2427
|
+
return e.dataset.blockType !== "section" && !To.has(e.dataset.paletteType ?? "");
|
|
2414
2428
|
}
|
|
2415
2429
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2416
|
-
var
|
|
2430
|
+
var Do = { class: "tpl:relative tpl:w-full" }, Oo = {
|
|
2417
2431
|
key: 0,
|
|
2418
2432
|
"data-testid": "hero-image-hint",
|
|
2419
2433
|
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)]"
|
|
2420
|
-
},
|
|
2434
|
+
}, ko = {
|
|
2421
2435
|
key: 0,
|
|
2422
2436
|
"data-testid": "section-drop-hint",
|
|
2423
2437
|
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)]"
|
|
2424
|
-
},
|
|
2438
|
+
}, Ao = /* @__PURE__ */ o({
|
|
2425
2439
|
__name: "SectionBlock",
|
|
2426
2440
|
props: {
|
|
2427
2441
|
block: {},
|
|
2428
2442
|
sourceBlock: {},
|
|
2429
2443
|
viewport: {}
|
|
2430
2444
|
},
|
|
2431
|
-
setup(
|
|
2432
|
-
let
|
|
2433
|
-
title:
|
|
2434
|
-
paragraph:
|
|
2435
|
-
image:
|
|
2436
|
-
button:
|
|
2437
|
-
divider:
|
|
2438
|
-
custom:
|
|
2439
|
-
},
|
|
2440
|
-
|
|
2441
|
-
let
|
|
2445
|
+
setup(e) {
|
|
2446
|
+
let t = {
|
|
2447
|
+
title: yo,
|
|
2448
|
+
paragraph: Fa,
|
|
2449
|
+
image: Oa,
|
|
2450
|
+
button: Xi,
|
|
2451
|
+
divider: ua,
|
|
2452
|
+
custom: ca
|
|
2453
|
+
}, n = e, { t: r } = G(), o = Yt(_n, "SectionBlock"), { displayBlock: s } = yt(o), u = I(() => n.sourceBlock ?? n.block), m = g(en, I(() => /* @__PURE__ */ new Set()));
|
|
2454
|
+
d(en, I(() => /* @__PURE__ */ new Set([...m.value, ...Object.entries(u.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
2455
|
+
let h = g(on, null), _ = g(an, null), v = g(Xt, {}), y = g(Ut, null), b = g(Gt, null);
|
|
2442
2456
|
function x(e) {
|
|
2457
|
+
if (y?.value) return;
|
|
2443
2458
|
let t = v.savedBlocks;
|
|
2444
|
-
t?.isPicking.value ? t.togglePick(
|
|
2459
|
+
t?.isPicking.value ? t.togglePick(n.block.id) : o.selectBlock(e);
|
|
2445
2460
|
}
|
|
2446
|
-
let S =
|
|
2447
|
-
switch (
|
|
2461
|
+
let S = I(() => {
|
|
2462
|
+
switch (n.block.columns) {
|
|
2448
2463
|
case "2": return ["50%", "50%"];
|
|
2449
2464
|
case "3": return [
|
|
2450
2465
|
"33.33%",
|
|
@@ -2468,57 +2483,58 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2468
2483
|
];
|
|
2469
2484
|
default: return ["100%"];
|
|
2470
2485
|
}
|
|
2471
|
-
}),
|
|
2472
|
-
let e = S.value.length, t = [...(
|
|
2486
|
+
}), C = I(() => {
|
|
2487
|
+
let e = S.value.length, t = [...(o.state.previewMode ? n.block : u.value).children];
|
|
2473
2488
|
for (; t.length < e;) t.push([]);
|
|
2474
2489
|
return t.slice(0, e);
|
|
2475
|
-
}),
|
|
2476
|
-
function
|
|
2477
|
-
return
|
|
2490
|
+
}), T = I(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
|
|
2491
|
+
function E(e) {
|
|
2492
|
+
return C.value[e] || [];
|
|
2478
2493
|
}
|
|
2479
|
-
function
|
|
2480
|
-
return
|
|
2494
|
+
function ee(e) {
|
|
2495
|
+
return b?.value === !1 || !h?.isHidden(e);
|
|
2481
2496
|
}
|
|
2482
|
-
function
|
|
2483
|
-
return !
|
|
2497
|
+
function j(e) {
|
|
2498
|
+
return !E(e).some((e) => ee(e.id));
|
|
2484
2499
|
}
|
|
2485
|
-
let
|
|
2486
|
-
function
|
|
2487
|
-
return
|
|
2500
|
+
let M = H(null);
|
|
2501
|
+
function F(e) {
|
|
2502
|
+
return o.state.previewMode ? !1 : j(e) ? !0 : M.value === e && E(e).filter((e) => ee(e.id)).length <= 1;
|
|
2488
2503
|
}
|
|
2489
|
-
let
|
|
2490
|
-
if (
|
|
2491
|
-
let e =
|
|
2504
|
+
let R = I(() => {
|
|
2505
|
+
if (o.state.previewMode) return !1;
|
|
2506
|
+
let e = Fe(n.block);
|
|
2492
2507
|
return e !== null && !e.applied && e.reason === "image";
|
|
2493
2508
|
});
|
|
2494
|
-
function
|
|
2495
|
-
return
|
|
2509
|
+
function B(e) {
|
|
2510
|
+
return E(e).length === 0 && !o.state.previewMode;
|
|
2496
2511
|
}
|
|
2497
|
-
function
|
|
2498
|
-
return
|
|
2512
|
+
function te(e) {
|
|
2513
|
+
return E(e).length === 0 && o.state.previewMode;
|
|
2499
2514
|
}
|
|
2500
2515
|
function K(e, t) {
|
|
2501
|
-
|
|
2516
|
+
y?.value || Ia(o, t, n.block.id, e);
|
|
2502
2517
|
}
|
|
2503
|
-
function
|
|
2504
|
-
return
|
|
2518
|
+
function ne(e) {
|
|
2519
|
+
return Ai(e, _, t);
|
|
2505
2520
|
}
|
|
2506
2521
|
function q(e, t) {
|
|
2507
|
-
e.type
|
|
2522
|
+
y?.value || e.type !== "custom" || o.updateBlock(e.id, {
|
|
2508
2523
|
fieldValues: t.fieldValues,
|
|
2509
2524
|
dataSourceFetched: t.dataSourceFetched
|
|
2510
2525
|
});
|
|
2511
2526
|
}
|
|
2512
|
-
return (
|
|
2513
|
-
key:
|
|
2514
|
-
class:
|
|
2515
|
-
style:
|
|
2516
|
-
}, [
|
|
2517
|
-
|
|
2527
|
+
return (t, u) => (c(), w("div", Do, [R.value ? (c(), w("div", Oo, [N("span", null, P(D(r).section.heroAddImage), 1)])) : k("", !0), N("div", { class: O(["tpl:flex tpl:gap-0", { "tpl:flex-col": T.value }]) }, [(c(!0), w(U, null, p(C.value, (t, d) => (c(), w("div", {
|
|
2528
|
+
key: d,
|
|
2529
|
+
class: O(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", B(d) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
2530
|
+
style: L({ width: T.value ? "100%" : S.value[d] })
|
|
2531
|
+
}, [W(D(V), {
|
|
2532
|
+
disabled: D(y) ?? !1,
|
|
2533
|
+
"model-value": E(d),
|
|
2518
2534
|
group: {
|
|
2519
2535
|
name: "blocks",
|
|
2520
2536
|
pull: !0,
|
|
2521
|
-
put: (e, t, n) =>
|
|
2537
|
+
put: (e, t, n) => D(Eo)(n)
|
|
2522
2538
|
},
|
|
2523
2539
|
animation: 150,
|
|
2524
2540
|
"ghost-class": "tpl-ghost",
|
|
@@ -2528,28 +2544,28 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2528
2544
|
"inverted-swap-threshold": .65,
|
|
2529
2545
|
"empty-insert-threshold": 20,
|
|
2530
2546
|
"force-fallback": !0,
|
|
2531
|
-
class:
|
|
2532
|
-
"tpl:min-h-[60px]":
|
|
2533
|
-
"tpl:min-h-[34px]":
|
|
2547
|
+
class: O(["tpl:grow", {
|
|
2548
|
+
"tpl:min-h-[60px]": F(d),
|
|
2549
|
+
"tpl:min-h-[34px]": te(d)
|
|
2534
2550
|
}]),
|
|
2535
|
-
onUpdate: (e) =>
|
|
2536
|
-
onStart: (e) =>
|
|
2537
|
-
onEnd:
|
|
2538
|
-
"onUpdate:modelValue": (e) => K(
|
|
2551
|
+
onUpdate: (e) => !D(y) && D(Ia)(D(o), E(d), n.block.id, d, e),
|
|
2552
|
+
onStart: (e) => M.value = d,
|
|
2553
|
+
onEnd: u[0] ||= (e) => M.value = null,
|
|
2554
|
+
"onUpdate:modelValue": (e) => K(d, e)
|
|
2539
2555
|
}, {
|
|
2540
|
-
default:
|
|
2541
|
-
block:
|
|
2542
|
-
"display-block":
|
|
2543
|
-
"is-selected":
|
|
2544
|
-
viewport:
|
|
2545
|
-
"preview-mode":
|
|
2556
|
+
default: l(() => [(c(!0), w(U, null, p(E(d), (t) => f((c(), w("div", { key: t.id }, [W(_o, {
|
|
2557
|
+
block: t,
|
|
2558
|
+
"display-block": D(s)(t),
|
|
2559
|
+
"is-selected": D(o).state.selectedBlockId === t.id,
|
|
2560
|
+
viewport: e.viewport,
|
|
2561
|
+
"preview-mode": D(o).state.previewMode,
|
|
2546
2562
|
nested: "",
|
|
2547
|
-
onSelect: (e) => x(
|
|
2563
|
+
onSelect: (e) => x(t.id)
|
|
2548
2564
|
}, {
|
|
2549
|
-
default:
|
|
2550
|
-
viewport:
|
|
2551
|
-
onFetchData: (e) => q(
|
|
2552
|
-
onUpdate: (e) =>
|
|
2565
|
+
default: l(() => [(c(), A(a(ne(t)), i({ block: D(s)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
2566
|
+
viewport: e.viewport,
|
|
2567
|
+
onFetchData: (e) => q(t, e),
|
|
2568
|
+
onUpdate: (e) => !D(y) && D(o).updateBlock(t.id, e)
|
|
2553
2569
|
}), null, 16, [
|
|
2554
2570
|
"block",
|
|
2555
2571
|
"viewport",
|
|
@@ -2564,23 +2580,24 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2564
2580
|
"viewport",
|
|
2565
2581
|
"preview-mode",
|
|
2566
2582
|
"onSelect"
|
|
2567
|
-
])])), [[
|
|
2583
|
+
])])), [[z, ee(t.id)]])), 128))]),
|
|
2568
2584
|
_: 2
|
|
2569
2585
|
}, 1032, [
|
|
2586
|
+
"disabled",
|
|
2570
2587
|
"model-value",
|
|
2571
2588
|
"group",
|
|
2572
2589
|
"class",
|
|
2573
2590
|
"onUpdate",
|
|
2574
2591
|
"onStart",
|
|
2575
2592
|
"onUpdate:modelValue"
|
|
2576
|
-
]),
|
|
2593
|
+
]), B(d) ? (c(), w("div", ko, [N("span", null, P(D(r).section.dropHere), 1)])) : k("", !0)], 6))), 128))], 2)]));
|
|
2577
2594
|
}
|
|
2578
|
-
}),
|
|
2595
|
+
}), jo = ["width", "height"], Mo = [
|
|
2579
2596
|
"d",
|
|
2580
2597
|
"stroke",
|
|
2581
2598
|
"stroke-opacity",
|
|
2582
2599
|
"stroke-width"
|
|
2583
|
-
],
|
|
2600
|
+
], No = ["d", "fill"], Po = /* @__PURE__ */ o({
|
|
2584
2601
|
__name: "SocialIconSvg",
|
|
2585
2602
|
props: {
|
|
2586
2603
|
platform: {},
|
|
@@ -2589,14 +2606,14 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2589
2606
|
iconSize: {}
|
|
2590
2607
|
},
|
|
2591
2608
|
setup(e) {
|
|
2592
|
-
let t = e, n =
|
|
2609
|
+
let t = e, n = I(() => Pn[t.platform]), r = I(() => In[t.iconSize]), i = I(() => tt(t.platform, t.iconTone)), a = I(() => Ke(t.iconStyle, t.iconTone)), o = I(() => {
|
|
2593
2610
|
let e = {
|
|
2594
2611
|
display: "inline-flex",
|
|
2595
2612
|
alignItems: "center",
|
|
2596
2613
|
justifyContent: "center",
|
|
2597
2614
|
width: `${r.value}px`,
|
|
2598
2615
|
height: `${r.value}px`
|
|
2599
|
-
}, n =
|
|
2616
|
+
}, n = i.value.fill;
|
|
2600
2617
|
switch (t.iconStyle) {
|
|
2601
2618
|
case "solid": return {
|
|
2602
2619
|
...e,
|
|
@@ -2608,7 +2625,7 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2608
2625
|
backgroundColor: "transparent",
|
|
2609
2626
|
border: `2px solid ${n}`,
|
|
2610
2627
|
borderRadius: "4px",
|
|
2611
|
-
...
|
|
2628
|
+
...a.value && { boxShadow: u(a.value) }
|
|
2612
2629
|
};
|
|
2613
2630
|
case "rounded": return {
|
|
2614
2631
|
...e,
|
|
@@ -2627,57 +2644,57 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2627
2644
|
};
|
|
2628
2645
|
default: return e;
|
|
2629
2646
|
}
|
|
2630
|
-
}),
|
|
2647
|
+
}), s = I(() => Me(t.iconStyle)), l = I(() => Math.floor(r.value * s.value));
|
|
2631
2648
|
function u(e) {
|
|
2632
2649
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
2633
2650
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
2634
2651
|
}
|
|
2635
|
-
let d =
|
|
2636
|
-
return (e, t) => (
|
|
2652
|
+
let d = I(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
2653
|
+
return (e, t) => (c(), w("span", { style: L(o.value) }, [(c(), w("svg", {
|
|
2637
2654
|
width: l.value,
|
|
2638
2655
|
height: l.value,
|
|
2639
2656
|
viewBox: "0 0 24 24",
|
|
2640
2657
|
overflow: "visible",
|
|
2641
2658
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2642
|
-
}, [
|
|
2659
|
+
}, [a.value ? (c(), w("path", {
|
|
2643
2660
|
key: 0,
|
|
2644
2661
|
"data-testid": "social-icon-halo",
|
|
2645
2662
|
d: n.value.path,
|
|
2646
2663
|
fill: "none",
|
|
2647
|
-
stroke:
|
|
2648
|
-
"stroke-opacity":
|
|
2649
|
-
"stroke-width":
|
|
2664
|
+
stroke: a.value.color,
|
|
2665
|
+
"stroke-opacity": a.value.opacity,
|
|
2666
|
+
"stroke-width": a.value.width / s.value,
|
|
2650
2667
|
"stroke-linejoin": "round"
|
|
2651
|
-
}, null, 8,
|
|
2668
|
+
}, null, 8, Mo)) : k("", !0), N("path", {
|
|
2652
2669
|
d: n.value.path,
|
|
2653
2670
|
fill: d.value
|
|
2654
|
-
}, null, 8,
|
|
2671
|
+
}, null, 8, No)], 8, jo))], 4));
|
|
2655
2672
|
}
|
|
2656
|
-
}),
|
|
2673
|
+
}), Fo = { class: "tpl:w-full" }, Io = ["href"], Lo = {
|
|
2657
2674
|
key: 1,
|
|
2658
2675
|
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)]"
|
|
2659
|
-
},
|
|
2676
|
+
}, Ro = /* @__PURE__ */ o({
|
|
2660
2677
|
__name: "SocialIconsBlock",
|
|
2661
2678
|
props: {
|
|
2662
2679
|
block: {},
|
|
2663
2680
|
viewport: {}
|
|
2664
2681
|
},
|
|
2665
2682
|
setup(e) {
|
|
2666
|
-
let t = e, { t: n } =
|
|
2683
|
+
let t = e, { t: n } = G(), r = I(() => ({
|
|
2667
2684
|
display: "flex",
|
|
2668
2685
|
flexWrap: "wrap",
|
|
2669
2686
|
gap: `${t.block.spacing}px`,
|
|
2670
2687
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
2671
|
-
})),
|
|
2672
|
-
return (t,
|
|
2688
|
+
})), i = I(() => t.block.icons.length > 0);
|
|
2689
|
+
return (t, a) => (c(), w("div", Fo, [i.value ? (c(), w("div", {
|
|
2673
2690
|
key: 0,
|
|
2674
|
-
style:
|
|
2675
|
-
}, [(
|
|
2691
|
+
style: L(r.value)
|
|
2692
|
+
}, [(c(!0), w(U, null, p(e.block.icons, (t) => (c(), w("a", {
|
|
2676
2693
|
key: t.id,
|
|
2677
2694
|
href: t.url || "#",
|
|
2678
2695
|
class: "tpl:cursor-default",
|
|
2679
|
-
onClick:
|
|
2680
|
-
}, [
|
|
2696
|
+
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
2697
|
+
}, [W(Po, {
|
|
2681
2698
|
platform: t.platform,
|
|
2682
2699
|
"icon-style": e.block.iconStyle,
|
|
2683
2700
|
"icon-tone": e.block.iconTone,
|
|
@@ -2687,44 +2704,46 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2687
2704
|
"icon-style",
|
|
2688
2705
|
"icon-tone",
|
|
2689
2706
|
"icon-size"
|
|
2690
|
-
])], 8,
|
|
2707
|
+
])], 8, Io))), 128))], 4)) : (c(), w("div", Lo, [W(D(or), { size: 16 }), N("span", null, P(D(n).social.addIcons), 1)]))]));
|
|
2691
2708
|
}
|
|
2692
|
-
}),
|
|
2709
|
+
}), zo = { class: "tpl:w-full" }, Bo = {
|
|
2693
2710
|
key: 0,
|
|
2694
2711
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
2695
2712
|
style: {
|
|
2696
2713
|
"background-color": "var(--tpl-bg-hover)",
|
|
2697
2714
|
color: "var(--tpl-text-dim)"
|
|
2698
2715
|
}
|
|
2699
|
-
},
|
|
2716
|
+
}, Vo = /* @__PURE__ */ o({
|
|
2700
2717
|
__name: "SpacerBlock",
|
|
2701
2718
|
props: {
|
|
2702
2719
|
block: {},
|
|
2703
2720
|
viewport: {}
|
|
2704
2721
|
},
|
|
2705
2722
|
setup(e) {
|
|
2706
|
-
let t = e, n =
|
|
2723
|
+
let t = e, n = Yt(_n, "SpacerBlock"), r = I(() => ({
|
|
2707
2724
|
height: `${t.block.height}px`,
|
|
2708
2725
|
minHeight: `${t.block.height}px`,
|
|
2709
2726
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
2710
2727
|
}));
|
|
2711
|
-
return (t,
|
|
2712
|
-
style:
|
|
2713
|
-
class:
|
|
2714
|
-
}, [
|
|
2728
|
+
return (t, i) => (c(), w("div", zo, [N("div", {
|
|
2729
|
+
style: L(r.value),
|
|
2730
|
+
class: O(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !D(n).state.previewMode }])
|
|
2731
|
+
}, [D(n).state.previewMode ? k("", !0) : (c(), w("span", Bo, P(e.block.height) + "px ", 1))], 6)]));
|
|
2715
2732
|
}
|
|
2716
|
-
}),
|
|
2733
|
+
}), Ho = { class: "tpl:w-full" }, Uo = { key: 0 }, Wo = [
|
|
2717
2734
|
"aria-label",
|
|
2735
|
+
"contenteditable",
|
|
2718
2736
|
"data-placeholder",
|
|
2719
2737
|
"onBlur"
|
|
2720
|
-
],
|
|
2738
|
+
], Go = [
|
|
2721
2739
|
"aria-label",
|
|
2740
|
+
"contenteditable",
|
|
2722
2741
|
"data-placeholder",
|
|
2723
2742
|
"onBlur"
|
|
2724
|
-
],
|
|
2743
|
+
], Ko = {
|
|
2725
2744
|
key: 1,
|
|
2726
2745
|
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)]"
|
|
2727
|
-
},
|
|
2746
|
+
}, qo = /*#__PURE__*/ vr(/* @__PURE__ */ o({
|
|
2728
2747
|
__name: "TableBlock",
|
|
2729
2748
|
props: {
|
|
2730
2749
|
block: {},
|
|
@@ -2738,79 +2757,80 @@ var To = { class: "tpl:relative tpl:w-full" }, Eo = {
|
|
|
2738
2757
|
updated(e, t) {
|
|
2739
2758
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
2740
2759
|
}
|
|
2741
|
-
}, n = e, { t: r } =
|
|
2760
|
+
}, n = e, { t: r } = G(), i = Yt(_n, "TableBlock"), a = Yt(qt, "TableBlock"), o = g(Ut, null), s = I(() => n.block.rows.length > 0), l = I(() => {
|
|
2742
2761
|
let e = {
|
|
2743
2762
|
width: "100%",
|
|
2744
2763
|
borderCollapse: "collapse",
|
|
2745
2764
|
fontSize: `${n.block.fontSize}px`,
|
|
2746
2765
|
textAlign: n.block.textAlign,
|
|
2747
|
-
fontFamily: n.block.fontFamily ?
|
|
2766
|
+
fontFamily: n.block.fontFamily ? a.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
2748
2767
|
};
|
|
2749
2768
|
return n.block.color && (e.color = n.block.color), e;
|
|
2750
|
-
}),
|
|
2769
|
+
}), u = I(() => ({
|
|
2751
2770
|
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
2752
2771
|
padding: `${n.block.cellPadding}px`,
|
|
2753
2772
|
textAlign: n.block.textAlign
|
|
2754
|
-
})),
|
|
2755
|
-
...
|
|
2773
|
+
})), d = I(() => ({
|
|
2774
|
+
...u.value,
|
|
2756
2775
|
fontWeight: "bold",
|
|
2757
2776
|
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
2758
|
-
})),
|
|
2759
|
-
function
|
|
2760
|
-
|
|
2777
|
+
})), m = I(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), h = I(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
2778
|
+
function _() {
|
|
2779
|
+
o?.value || i.selectBlock(n.block.id);
|
|
2761
2780
|
}
|
|
2762
|
-
function
|
|
2763
|
-
|
|
2781
|
+
function v(e, t, r) {
|
|
2782
|
+
if (o?.value) return;
|
|
2783
|
+
let a = r.target.innerText.trim(), s = n.block.rows.map((n) => n.id === e ? {
|
|
2764
2784
|
...n,
|
|
2765
2785
|
cells: n.cells.map((e) => e.id === t ? {
|
|
2766
2786
|
...e,
|
|
2767
|
-
content:
|
|
2787
|
+
content: a
|
|
2768
2788
|
} : e)
|
|
2769
2789
|
} : n);
|
|
2770
|
-
|
|
2790
|
+
i.updateBlock(n.block.id, { rows: s });
|
|
2771
2791
|
}
|
|
2772
|
-
return (e, n) => (
|
|
2792
|
+
return (e, n) => (c(), w("div", Ho, [s.value ? (c(), w("table", {
|
|
2773
2793
|
key: 0,
|
|
2774
|
-
style:
|
|
2794
|
+
style: L(l.value),
|
|
2775
2795
|
class: "tpl-table-editable"
|
|
2776
|
-
}, [
|
|
2796
|
+
}, [m.value ? (c(), w("thead", Uo, [N("tr", null, [(c(!0), w(U, null, p(m.value.cells, (e) => f((c(), w("th", {
|
|
2777
2797
|
key: e.id,
|
|
2778
|
-
style:
|
|
2779
|
-
"aria-label":
|
|
2780
|
-
contenteditable: "true",
|
|
2781
|
-
"data-placeholder":
|
|
2782
|
-
onBlur: (t) =>
|
|
2783
|
-
onKeydown: n[0] ||=
|
|
2784
|
-
onClick:
|
|
2785
|
-
}, null, 44,
|
|
2786
|
-
key:
|
|
2787
|
-
style:
|
|
2788
|
-
"aria-label":
|
|
2789
|
-
contenteditable: "true",
|
|
2790
|
-
"data-placeholder":
|
|
2791
|
-
onBlur: (t) =>
|
|
2792
|
-
onKeydown: n[1] ||=
|
|
2793
|
-
onClick:
|
|
2794
|
-
}, null, 44,
|
|
2795
|
-
}
|
|
2796
|
-
}), [["__scopeId", "data-v-
|
|
2798
|
+
style: L(d.value),
|
|
2799
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2800
|
+
contenteditable: D(o) ? "false" : "true",
|
|
2801
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2802
|
+
onBlur: (t) => v(m.value.id, e.id, t),
|
|
2803
|
+
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2804
|
+
onClick: M(_, ["stop"])
|
|
2805
|
+
}, null, 44, Wo)), [[t, e.content]])), 128))])])) : k("", !0), N("tbody", null, [(c(!0), w(U, null, p(h.value, (e) => (c(), w("tr", { key: e.id }, [(c(!0), w(U, null, p(e.cells, (i) => f((c(), w("td", {
|
|
2806
|
+
key: i.id,
|
|
2807
|
+
style: L(u.value),
|
|
2808
|
+
"aria-label": D(r).table.cellPlaceholder,
|
|
2809
|
+
contenteditable: D(o) ? "false" : "true",
|
|
2810
|
+
"data-placeholder": D(r).table.cellPlaceholder,
|
|
2811
|
+
onBlur: (t) => v(e.id, i.id, t),
|
|
2812
|
+
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
2813
|
+
onClick: M(_, ["stop"])
|
|
2814
|
+
}, null, 44, Go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (c(), w("div", Ko, [W(D(ur), { size: 16 }), N("span", null, P(D(r).table.empty), 1)]))]));
|
|
2815
|
+
}
|
|
2816
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), Jo = /* @__PURE__ */ o({
|
|
2797
2817
|
__name: "VideoPlayButton",
|
|
2798
2818
|
props: { hoverEffect: {
|
|
2799
2819
|
type: Boolean,
|
|
2800
2820
|
default: !1
|
|
2801
2821
|
} },
|
|
2802
2822
|
setup(e) {
|
|
2803
|
-
return (t, n) => (
|
|
2823
|
+
return (t, n) => (c(), w("div", { class: O(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [N("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [N("svg", {
|
|
2804
2824
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
2805
2825
|
width: "28",
|
|
2806
2826
|
height: "28",
|
|
2807
2827
|
viewBox: "0 0 24 24",
|
|
2808
2828
|
fill: "currentColor"
|
|
2809
|
-
}, [
|
|
2829
|
+
}, [N("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
2810
2830
|
}
|
|
2811
2831
|
});
|
|
2812
2832
|
// src/utils/videoThumbnail.ts
|
|
2813
|
-
function
|
|
2833
|
+
function Yo(e) {
|
|
2814
2834
|
if (!e) return {
|
|
2815
2835
|
platform: "unknown",
|
|
2816
2836
|
videoId: null,
|
|
@@ -2842,24 +2862,24 @@ function qo(e) {
|
|
|
2842
2862
|
thumbnailUrl: null
|
|
2843
2863
|
};
|
|
2844
2864
|
}
|
|
2845
|
-
function
|
|
2846
|
-
return t ||
|
|
2865
|
+
function Xo(e, t) {
|
|
2866
|
+
return t || Yo(e).thumbnailUrl;
|
|
2847
2867
|
}
|
|
2848
2868
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2849
|
-
var
|
|
2869
|
+
var Zo = ["src", "alt"], Qo = {
|
|
2850
2870
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2851
2871
|
style: { opacity: "0.7" }
|
|
2852
|
-
},
|
|
2872
|
+
}, $o = ["href"], es = ["src", "alt"], ts = ["src", "alt"], ns = {
|
|
2853
2873
|
key: 3,
|
|
2854
2874
|
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)]"
|
|
2855
|
-
},
|
|
2875
|
+
}, rs = /* @__PURE__ */ o({
|
|
2856
2876
|
__name: "VideoBlock",
|
|
2857
2877
|
props: {
|
|
2858
2878
|
block: {},
|
|
2859
2879
|
viewport: {}
|
|
2860
2880
|
},
|
|
2861
2881
|
setup(e) {
|
|
2862
|
-
let t = e, { t: n } =
|
|
2882
|
+
let t = e, { t: n } = G(), { syntax: r } = K(), i = I(() => we(t.block.url, r) || we(t.block.thumbnailUrl, r)), a = kn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = kn(() => i.value ? t.block.placeholderUrl : void 0), s = I(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Xo(t.block.url)), l = I(() => ({ textAlign: t.block.align })), u = I(() => {
|
|
2863
2883
|
let e = t.block.align;
|
|
2864
2884
|
return {
|
|
2865
2885
|
maxWidth: "100%",
|
|
@@ -2869,233 +2889,233 @@ var Yo = ["src", "alt"], Xo = {
|
|
|
2869
2889
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2870
2890
|
marginRight: e === "center" ? "auto" : void 0
|
|
2871
2891
|
};
|
|
2872
|
-
}), d =
|
|
2873
|
-
return (t, r) => (
|
|
2892
|
+
}), d = I(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = I(() => we(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
2893
|
+
return (t, r) => (c(), w("div", {
|
|
2874
2894
|
class: "tpl:w-full",
|
|
2875
|
-
style:
|
|
2876
|
-
}, [
|
|
2895
|
+
style: L(l.value)
|
|
2896
|
+
}, [i.value && e.block.placeholderUrl ? (c(), w("div", {
|
|
2877
2897
|
key: 0,
|
|
2878
2898
|
class: "tpl:relative tpl:inline-block",
|
|
2879
|
-
style:
|
|
2880
|
-
}, [
|
|
2899
|
+
style: L(u.value)
|
|
2900
|
+
}, [N("img", {
|
|
2881
2901
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2882
|
-
src:
|
|
2902
|
+
src: D(o),
|
|
2883
2903
|
alt: e.block.alt,
|
|
2884
|
-
style:
|
|
2885
|
-
}, null, 12,
|
|
2904
|
+
style: L(d.value)
|
|
2905
|
+
}, null, 12, Zo), W(Jo)], 4)) : i.value ? (c(), w("div", {
|
|
2886
2906
|
key: 1,
|
|
2887
2907
|
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)]",
|
|
2888
|
-
style:
|
|
2889
|
-
}, [
|
|
2908
|
+
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
2909
|
+
}, [W(D(lr), {
|
|
2890
2910
|
size: 36,
|
|
2891
2911
|
"stroke-width": 1.5,
|
|
2892
2912
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2893
2913
|
style: { opacity: "0.5" }
|
|
2894
|
-
}),
|
|
2914
|
+
}), N("span", Qo, [W(Ji, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (c(), w(U, { key: 2 }, [e.block.url ? (c(), w("a", {
|
|
2895
2915
|
key: 0,
|
|
2896
2916
|
href: e.block.url,
|
|
2897
2917
|
target: "_blank",
|
|
2898
2918
|
rel: "noopener noreferrer",
|
|
2899
2919
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
2900
|
-
style:
|
|
2901
|
-
onClick: r[0] ||=
|
|
2902
|
-
}, [
|
|
2920
|
+
style: L(u.value),
|
|
2921
|
+
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
2922
|
+
}, [N("img", {
|
|
2903
2923
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2904
|
-
src:
|
|
2924
|
+
src: s.value,
|
|
2905
2925
|
alt: e.block.alt,
|
|
2906
|
-
style:
|
|
2907
|
-
}, null, 12,
|
|
2926
|
+
style: L(d.value)
|
|
2927
|
+
}, null, 12, es), W(Jo, { "hover-effect": "" })], 12, $o)) : (c(), w("div", {
|
|
2908
2928
|
key: 1,
|
|
2909
2929
|
class: "tpl:relative tpl:inline-block",
|
|
2910
|
-
style:
|
|
2911
|
-
}, [
|
|
2930
|
+
style: L(u.value)
|
|
2931
|
+
}, [N("img", {
|
|
2912
2932
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2913
|
-
src:
|
|
2933
|
+
src: s.value,
|
|
2914
2934
|
alt: e.block.alt,
|
|
2915
|
-
style:
|
|
2916
|
-
}, null, 12,
|
|
2935
|
+
style: L(d.value)
|
|
2936
|
+
}, null, 12, ts), W(Jo)], 4))], 64)) : (c(), w("div", ns, [W(D(lr), {
|
|
2917
2937
|
size: 40,
|
|
2918
2938
|
"stroke-width": 1.5,
|
|
2919
2939
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
2920
|
-
}),
|
|
2921
|
-
}
|
|
2922
|
-
}),
|
|
2923
|
-
section:
|
|
2924
|
-
title:
|
|
2925
|
-
paragraph:
|
|
2926
|
-
image:
|
|
2927
|
-
button:
|
|
2928
|
-
divider:
|
|
2929
|
-
video:
|
|
2930
|
-
social:
|
|
2931
|
-
menu:
|
|
2932
|
-
table:
|
|
2933
|
-
spacer:
|
|
2934
|
-
html:
|
|
2935
|
-
countdown:
|
|
2940
|
+
}), N("span", null, P(D(n).video.addVideo), 1)]))], 4));
|
|
2941
|
+
}
|
|
2942
|
+
}), is = {
|
|
2943
|
+
section: Ao,
|
|
2944
|
+
title: yo,
|
|
2945
|
+
paragraph: Fa,
|
|
2946
|
+
image: Oa,
|
|
2947
|
+
button: Xi,
|
|
2948
|
+
divider: ua,
|
|
2949
|
+
video: rs,
|
|
2950
|
+
social: Ro,
|
|
2951
|
+
menu: Ma,
|
|
2952
|
+
table: qo,
|
|
2953
|
+
spacer: Vo,
|
|
2954
|
+
html: ga,
|
|
2955
|
+
countdown: b(() => import("./CountdownBlock-Do6oItNW.js"))
|
|
2936
2956
|
};
|
|
2937
|
-
function
|
|
2938
|
-
let { editor:
|
|
2957
|
+
function as(t) {
|
|
2958
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = G(i), c = I(() => Be(Be(Be(ai(i), Ti(n.content.value.settings?.locale)), Ie(n.content.value.settings) === "rtl" ? {
|
|
2939
2959
|
title: { textAlign: "right" },
|
|
2940
2960
|
table: { textAlign: "right" }
|
|
2941
|
-
} : {}),
|
|
2942
|
-
|
|
2943
|
-
let { resolvedTheme:
|
|
2944
|
-
themeOverrides:
|
|
2945
|
-
resolvedTheme:
|
|
2961
|
+
} : {}), r.blockDefaults ?? {}));
|
|
2962
|
+
n.setUiTheme(r.uiTheme ?? "auto");
|
|
2963
|
+
let { resolvedTheme: l } = Xr(I(() => n.state.uiTheme)), f = H(r.theme ?? {}), { themeStyles: p } = kr({
|
|
2964
|
+
themeOverrides: f,
|
|
2965
|
+
resolvedTheme: l,
|
|
2946
2966
|
extraStyles: () => ({
|
|
2947
|
-
"--tpl-drop-text": `"${
|
|
2948
|
-
...
|
|
2967
|
+
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
2968
|
+
...t.themeExtraStyles?.()
|
|
2949
2969
|
})
|
|
2950
|
-
}),
|
|
2951
|
-
content:
|
|
2952
|
-
setContent: (e,
|
|
2970
|
+
}), m = t.history ?? Cn({
|
|
2971
|
+
content: n.content,
|
|
2972
|
+
setContent: (e, t) => n.setContent(e, t)
|
|
2953
2973
|
});
|
|
2954
|
-
|
|
2955
|
-
let h =
|
|
2956
|
-
addBlock:
|
|
2957
|
-
removeBlock:
|
|
2958
|
-
updateBlock:
|
|
2959
|
-
selectBlock:
|
|
2960
|
-
findBlockLocation:
|
|
2961
|
-
blockDefaults: () =>
|
|
2962
|
-
}), g =
|
|
2963
|
-
content:
|
|
2964
|
-
isDirty: () =>
|
|
2965
|
-
...
|
|
2966
|
-
}) : null,
|
|
2967
|
-
_ && (
|
|
2974
|
+
t.history || Dn(n, m);
|
|
2975
|
+
let h = Hn({
|
|
2976
|
+
addBlock: n.addBlock,
|
|
2977
|
+
removeBlock: n.removeBlock,
|
|
2978
|
+
updateBlock: n.updateBlock,
|
|
2979
|
+
selectBlock: n.selectBlock,
|
|
2980
|
+
findBlockLocation: n.findBlockLocation,
|
|
2981
|
+
blockDefaults: () => c.value
|
|
2982
|
+
}), g = En(n), _ = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? On({
|
|
2983
|
+
content: n.content,
|
|
2984
|
+
isDirty: () => n.state.isDirty,
|
|
2985
|
+
...t.autoSaveOptions
|
|
2986
|
+
}) : null, y = null;
|
|
2987
|
+
_ && (y = u(m.isNavigating, (e) => {
|
|
2968
2988
|
e ? _.pause() : _.resume();
|
|
2969
2989
|
}));
|
|
2970
|
-
let b =
|
|
2971
|
-
t:
|
|
2972
|
-
format:
|
|
2973
|
-
},
|
|
2990
|
+
let b = Yr(n, {
|
|
2991
|
+
t: o,
|
|
2992
|
+
format: s
|
|
2993
|
+
}, r.customBlocks ?? []), x = ht(r.colors);
|
|
2974
2994
|
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) {
|
|
2975
|
-
let e =
|
|
2995
|
+
let e = ii(x.presets, r.blockDefaults, r.templateDefaults);
|
|
2976
2996
|
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.`);
|
|
2977
2997
|
}
|
|
2978
|
-
let S =
|
|
2979
|
-
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${
|
|
2980
|
-
let
|
|
2981
|
-
|
|
2982
|
-
let
|
|
2983
|
-
function
|
|
2998
|
+
let S = Un(r.templateSettings);
|
|
2999
|
+
for (let e of S.unknown) $.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Wn.join(", ")}) — skipping it.`);
|
|
3000
|
+
let w = Cr();
|
|
3001
|
+
ti(w, is);
|
|
3002
|
+
let T = /* @__PURE__ */ new Set();
|
|
3003
|
+
function E(e) {
|
|
2984
3004
|
for (let t of e) {
|
|
2985
|
-
|
|
2986
|
-
for (let e of
|
|
3005
|
+
w.registerCustom(t, ca);
|
|
3006
|
+
for (let e of Ei(t, x)) T.has(e.id) || (T.add(e.id), $.warn(e.message));
|
|
2987
3007
|
}
|
|
2988
3008
|
}
|
|
2989
|
-
|
|
2990
|
-
let
|
|
2991
|
-
if (
|
|
2992
|
-
let
|
|
2993
|
-
|
|
2994
|
-
let
|
|
2995
|
-
|
|
3009
|
+
r.customBlocks?.length && E(r.customBlocks);
|
|
3010
|
+
let D = Br();
|
|
3011
|
+
if (C() && v(D.dispose), t.containerEl) {
|
|
3012
|
+
let n = t.containerEl;
|
|
3013
|
+
e(document, "pointerdown", (e) => {
|
|
3014
|
+
let t = n.value;
|
|
3015
|
+
t && (e.composedPath?.() ?? []).includes(t) && D.claim();
|
|
2996
3016
|
}, { capture: !0 });
|
|
2997
3017
|
}
|
|
2998
|
-
function
|
|
2999
|
-
let
|
|
3000
|
-
|
|
3001
|
-
}
|
|
3002
|
-
function
|
|
3003
|
-
|
|
3004
|
-
history:
|
|
3005
|
-
selectBlock: (e) =>
|
|
3006
|
-
getSelectedBlockId: () =>
|
|
3007
|
-
removeBlock: (e) =>
|
|
3008
|
-
onSave:
|
|
3009
|
-
isPicking: () =>
|
|
3010
|
-
onConfirmPick: () =>
|
|
3011
|
-
onCancelPick: () =>
|
|
3018
|
+
function O() {
|
|
3019
|
+
let e = t.capabilities?.templates;
|
|
3020
|
+
e ? e.save() : _?.flush();
|
|
3021
|
+
}
|
|
3022
|
+
function ee(e) {
|
|
3023
|
+
D.isActive() && Oi(e, {
|
|
3024
|
+
history: m,
|
|
3025
|
+
selectBlock: (e) => n.selectBlock(e),
|
|
3026
|
+
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
3027
|
+
removeBlock: (e) => n.removeBlock(e),
|
|
3028
|
+
onSave: O,
|
|
3029
|
+
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
3030
|
+
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
3031
|
+
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
3012
3032
|
});
|
|
3013
3033
|
}
|
|
3014
|
-
|
|
3015
|
-
let k =
|
|
3016
|
-
|
|
3017
|
-
let j =
|
|
3034
|
+
e(document, "keydown", ee);
|
|
3035
|
+
let k = H(null), A = t.editorRoot ?? document;
|
|
3036
|
+
d(bn, A), d(un, k), d(Ct, /* @__PURE__ */ new Map()), d(fn, i), d(_n, n), d(yn, m), d(pn, h), d(on, g), d(qt, a), d(sn, p), d(cn, l), d(Jt, c), d(Kt, r.locale), d(an, w), d($t, r.customBlocks ?? []), d(kt, r.paletteBlocks), d(Lt, ni(r.htmlBlockPreview)), d(Rt, r.layout), d(Ft, r.sectionWrapper), d(ln, x), d(hn, S.fields), d(Qt, Zr(n.content, w));
|
|
3037
|
+
let j = it(r.mergeTags?.syntax);
|
|
3018
3038
|
for (let e of ["opener", "closer"]) {
|
|
3019
3039
|
let t = j[e];
|
|
3020
3040
|
typeof t == "string" && t.trim() === "" && $.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3021
3041
|
}
|
|
3022
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
3023
|
-
let M =
|
|
3024
|
-
function
|
|
3042
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && Ee(j) === null && $.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3043
|
+
let M = R(r.mergeTags?.tags ?? []);
|
|
3044
|
+
function N(e) {
|
|
3025
3045
|
Array.isArray(e) ? M.value = e : $.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3026
3046
|
}
|
|
3027
|
-
|
|
3028
|
-
let
|
|
3029
|
-
|
|
3030
|
-
let
|
|
3031
|
-
resolvePreview:
|
|
3047
|
+
d(Pt, M), d(xt, j), d(Tt, r.mergeTags?.onRequest ?? null), d(wt, r.mergeTags?.autocomplete !== !1), d(xn, r.mergeTags?.showRawValue !== !1);
|
|
3048
|
+
let P = H(Te(r.mergeTags?.tags ?? []));
|
|
3049
|
+
d(It, P);
|
|
3050
|
+
let F = Ur({
|
|
3051
|
+
resolvePreview: r.resolvePreview,
|
|
3032
3052
|
getContent: () => {
|
|
3033
|
-
let e =
|
|
3034
|
-
if (!
|
|
3035
|
-
let
|
|
3036
|
-
return
|
|
3053
|
+
let e = n.content.value;
|
|
3054
|
+
if (!n.state.previewMode) return e;
|
|
3055
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = ae(e, t);
|
|
3056
|
+
return r.layout ? Xe(ae(r.layout, t, { missing: "default" }), i) : i;
|
|
3037
3057
|
},
|
|
3038
|
-
isActive: () =>
|
|
3039
|
-
getLocale: () =>
|
|
3058
|
+
isActive: () => n.state.previewMode,
|
|
3059
|
+
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
3040
3060
|
});
|
|
3041
|
-
|
|
3042
|
-
let
|
|
3043
|
-
|
|
3044
|
-
let
|
|
3045
|
-
|
|
3046
|
-
let
|
|
3047
|
-
content:
|
|
3061
|
+
d(Ot, F), d(Ht, r.resolvePreview);
|
|
3062
|
+
let L = I(() => !(n.state.previewMode && F.isConfigured));
|
|
3063
|
+
d(Gt, L);
|
|
3064
|
+
let z = Wr();
|
|
3065
|
+
d(Dt, z), d(At, H(!1)), d(Mt, H(!1)), d(nn, r.logicTags?.tags ?? []), d(bt, r.logicTags?.pairs ?? []), d(zt, r.logicTags?.onRequest ?? null), d(jt, Gr()), d(Vt, r.onRequestMedia ?? null), d(gn, r.canDropMedia ?? null), d(St, r.resolveImageUrl ? Bn(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && $.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), d(Wt, r.displayConditions?.conditions ?? []), d(dn, r.displayConditions?.allowCustom ?? !1), d(Et, r.displayConditions?.onRequest ?? null), d(Xt, t.capabilities ?? {}), d(vn, b);
|
|
3066
|
+
let B = Kr(r.lint) ? null : Jr({
|
|
3067
|
+
content: n.content,
|
|
3048
3068
|
get options() {
|
|
3049
|
-
return
|
|
3050
|
-
...
|
|
3051
|
-
content:
|
|
3052
|
-
contentLocale:
|
|
3069
|
+
return Vr({
|
|
3070
|
+
...r,
|
|
3071
|
+
content: n.content.value,
|
|
3072
|
+
contentLocale: n.activeLocale?.value ?? void 0
|
|
3053
3073
|
});
|
|
3054
3074
|
},
|
|
3055
|
-
customBlocks:
|
|
3075
|
+
customBlocks: r.customBlocks,
|
|
3056
3076
|
mergeTagSyntax: j,
|
|
3057
|
-
updateBlock:
|
|
3058
|
-
updateSettings:
|
|
3059
|
-
removeBlock:
|
|
3077
|
+
updateBlock: n.updateBlock,
|
|
3078
|
+
updateSettings: n.updateSettings,
|
|
3079
|
+
removeBlock: n.removeBlock
|
|
3060
3080
|
});
|
|
3061
|
-
|
|
3062
|
-
function
|
|
3063
|
-
|
|
3081
|
+
d(Zt, B);
|
|
3082
|
+
function V() {
|
|
3083
|
+
y?.(), B?.destroy(), _?.destroy(), m.destroy();
|
|
3064
3084
|
}
|
|
3065
3085
|
return {
|
|
3066
|
-
t:
|
|
3067
|
-
format:
|
|
3086
|
+
t: o,
|
|
3087
|
+
format: s,
|
|
3068
3088
|
editorRoot: A,
|
|
3069
|
-
history:
|
|
3089
|
+
history: m,
|
|
3070
3090
|
blockActions: h,
|
|
3071
3091
|
conditionPreview: g,
|
|
3072
3092
|
autoSave: _,
|
|
3073
|
-
resolvedTheme:
|
|
3074
|
-
themeStyles:
|
|
3075
|
-
themeOverrides:
|
|
3076
|
-
registry:
|
|
3093
|
+
resolvedTheme: l,
|
|
3094
|
+
themeStyles: p,
|
|
3095
|
+
themeOverrides: f,
|
|
3096
|
+
registry: w,
|
|
3077
3097
|
keyboardReorder: b,
|
|
3078
|
-
templateLint:
|
|
3098
|
+
templateLint: B,
|
|
3079
3099
|
popoverRoot: k,
|
|
3080
|
-
mergeTagSampleMode:
|
|
3081
|
-
previewResolution:
|
|
3082
|
-
appliesConditionFilter:
|
|
3083
|
-
registerCustomBlocks:
|
|
3084
|
-
setMergeTags:
|
|
3100
|
+
mergeTagSampleMode: P,
|
|
3101
|
+
previewResolution: F,
|
|
3102
|
+
appliesConditionFilter: L,
|
|
3103
|
+
registerCustomBlocks: E,
|
|
3104
|
+
setMergeTags: N,
|
|
3085
3105
|
mergeTags: M,
|
|
3086
3106
|
mergeTagSyntax: j,
|
|
3087
|
-
destroy:
|
|
3107
|
+
destroy: V
|
|
3088
3108
|
};
|
|
3089
3109
|
}
|
|
3090
3110
|
// src/composables/useSmallScreenNotice.ts
|
|
3091
|
-
var
|
|
3092
|
-
function
|
|
3093
|
-
let
|
|
3111
|
+
var os = "(max-width: 767px)";
|
|
3112
|
+
function ss(e) {
|
|
3113
|
+
let n = t(os);
|
|
3094
3114
|
return {
|
|
3095
|
-
isSmallScreen:
|
|
3096
|
-
showNotice:
|
|
3115
|
+
isSmallScreen: n,
|
|
3116
|
+
showNotice: I(() => (F(e) ?? !0) && n.value)
|
|
3097
3117
|
};
|
|
3098
3118
|
}
|
|
3099
|
-
export {
|
|
3119
|
+
export { xi as A, Dr as B, Wi as C, Ki as D, ki as E, gi as F, xr as H, Ur as I, Vr as L, yi as M, vi as N, Ai as O, _i as P, Ir as R, Fi as S, Bi as T, Sr as V, ua as _, Vo as a, Xi as b, bo as c, _o as d, Ia as f, ga as g, Oa as h, qo as i, bi as j, pi as k, Co as l, Ma as m, as as n, Ro as o, Fa as p, rs as r, Ao as s, ss as t, yo as u, ca as v, zi as w, Mi as x, $i as y, Pr as z };
|
|
3100
3120
|
|
|
3101
|
-
//# sourceMappingURL=composables-
|
|
3121
|
+
//# sourceMappingURL=composables-CUIiW9OD.js.map
|