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