@templatical/editor 0.16.3 → 0.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-EaPCeDXr.js → AiChatSidebar-CYAbVB2G.js} +7 -7
- package/dist/{AiFeatureMenu-CcGRd1xE.js → AiFeatureMenu-BPCkrHAS.js} +4 -4
- package/dist/{BlockIssueBadge-CZYgn-qg.js → BlockIssueBadge-BLytBabN.js} +2 -2
- package/dist/{CloudEditor-CUIWUMp5.js → CloudEditor-v8ARYaFW.js} +14 -14
- package/dist/{CollaboratorBar-DmxqeBYZ.js → CollaboratorBar-BQzKZ2zo.js} +2 -2
- package/dist/{ColorPicker-Gs4BMVog.js → ColorPicker-Cab6U2sH.js} +1 -1
- package/dist/{CommentsSidebar-DDKiFsSq.js → CommentsSidebar-C_XLBbo3.js} +8 -8
- package/dist/{CountdownToolbar-92w1YySJ.js → CountdownToolbar-q3umZ7TZ.js} +53 -67
- package/dist/{DesignReferenceSidebar-D6TfC176.js → DesignReferenceSidebar-Bh9uAZ4B.js} +5 -5
- package/dist/{IssuesPanel-CQQipLQP.js → IssuesPanel-DltSuU6H.js} +5 -5
- package/dist/{ModuleBrowserModal-DsehjLvh.js → ModuleBrowserModal-CzzChPmN.js} +6 -6
- package/dist/{ModulePreviewCanvas-BBfuS8VW.js → ModulePreviewCanvas-C0Q2n3FL.js} +1 -1
- package/dist/{NumberWithSuffix-BxSRfI8b.js → NumberWithSuffix-Bhm2ByHs.js} +1 -1
- package/dist/{ParagraphEditor-vgvQxicC.js → ParagraphEditor-BhsBi8p8.js} +25 -25
- package/dist/{RichTextEditorContent-Dza2oPvh.js → RichTextEditorContent-ef0fdj6e.js} +3 -3
- package/dist/{SaveModuleDialog-DNWGCHlS.js → SaveModuleDialog-BNN3dcxD.js} +24 -23
- package/dist/{SnapshotHistory-BLmnNLg1.js → SnapshotHistory-tWvgMCe6.js} +5 -5
- package/dist/{TemplateScoringPanel-C8VOC6gn.js → TemplateScoringPanel-ZhObHWeb.js} +10 -10
- package/dist/{TestEmailModal-D6v1hgY2.js → TestEmailModal-EdwEcsrD.js} +3 -3
- package/dist/{TitleEditor-DPdzOQpq.js → TitleEditor-DdvRepBq.js} +4 -4
- package/dist/ToggleSwitch-DUNuUPsZ.js +37 -0
- package/dist/{TplModal-DObT0uxf.js → TplModal-Niu4Y96-.js} +1 -1
- package/dist/{blockTypeIcons-B9f5fH_5.js → blockTypeIcons-DHcYPMB8.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-B3eR47lE.js → ca-DI1ViqMa.js} +2 -1
- package/dist/cdn/chunks/{AiFeatureMenu-CyUCHd9I.js → AiFeatureMenu-AoUwsqor.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CyUCHd9I.js.map → AiFeatureMenu-AoUwsqor.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BAa_dI-c.js → BlockIssueBadge-DZU3CfEN.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-BAa_dI-c.js.map → BlockIssueBadge-DZU3CfEN.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-ClfgLU48.js → CloudEditor-BrZLF_m1.js} +9 -9
- package/dist/cdn/chunks/{CloudEditor-ClfgLU48.js.map → CloudEditor-BrZLF_m1.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DCc5SL0P.js → CollaboratorBar-BAC56ez6.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-DCc5SL0P.js.map → CollaboratorBar-BAC56ez6.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-Pi-1fR8c.js → ColorPicker-DLEoT419.js} +2 -2
- package/dist/cdn/chunks/{ColorPicker-Pi-1fR8c.js.map → ColorPicker-DLEoT419.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Bj7aoBUU.js → CountdownBlock-BOF9aTXF.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-Bj7aoBUU.js.map → CountdownBlock-BOF9aTXF.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-C9bQ5k4E.js +198 -0
- package/dist/cdn/chunks/CountdownToolbar-C9bQ5k4E.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BXLVRo-c.js → IssuesPanel-CHwYahKK.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-BXLVRo-c.js.map → IssuesPanel-CHwYahKK.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-C7BkJvzf.js → ModuleBrowserModal-iSXXpAUk.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-C7BkJvzf.js.map → ModuleBrowserModal-iSXXpAUk.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BJn-ZHlC.js → ModulePreviewCanvas-DIy0MZj2.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BJn-ZHlC.js.map → ModulePreviewCanvas-DIy0MZj2.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CkOxH3F7.js → NumberWithSuffix-vPdOG2lO.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-CkOxH3F7.js.map → NumberWithSuffix-vPdOG2lO.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-4cMKKC-V.js → ParagraphEditor-D7znI_X1.js} +10 -10
- package/dist/cdn/chunks/{ParagraphEditor-4cMKKC-V.js.map → ParagraphEditor-D7znI_X1.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-7RZe4tbj.js → RichTextEditorContent-DVwGHbO6.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-7RZe4tbj.js.map → RichTextEditorContent-DVwGHbO6.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-mr9A4j6G.js → SaveModuleDialog-D2_qPtE9.js} +32 -31
- package/dist/cdn/chunks/SaveModuleDialog-D2_qPtE9.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-Cqw2jvuc.js → TitleEditor-CKjZ6Cgp.js} +5 -5
- package/dist/cdn/chunks/{TitleEditor-Cqw2jvuc.js.map → TitleEditor-CKjZ6Cgp.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-B_xRBxSU.js → blockTypeIcons-BKecgdgr.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-B_xRBxSU.js.map → blockTypeIcons-BKecgdgr.js.map} +1 -1
- package/dist/cdn/chunks/{ca-B3eR47lE.js → ca-DI1ViqMa.js} +3 -2
- package/dist/cdn/chunks/ca-DI1ViqMa.js.map +1 -0
- package/dist/cdn/chunks/{de-Cy8FB-Ii.js → de-q9lTCMre.js} +3 -2
- package/dist/cdn/chunks/de-q9lTCMre.js.map +1 -0
- package/dist/cdn/chunks/{en-Bu-zS_5o.js → en-CR4LItrX.js} +3 -2
- package/dist/cdn/chunks/en-CR4LItrX.js.map +1 -0
- package/dist/cdn/chunks/{es-CD3ZD6hK.js → es-CEt-lrGd.js} +3 -2
- package/dist/cdn/chunks/es-CEt-lrGd.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Btyx_IMf.js → extensions-OZTN_skA.js} +2 -2
- package/dist/cdn/chunks/{extensions-Btyx_IMf.js.map → extensions-OZTN_skA.js.map} +1 -1
- package/dist/cdn/chunks/{features-Dwb5aTLg.js → features-Bo7H8WNI.js} +359 -359
- package/dist/cdn/chunks/features-Bo7H8WNI.js.map +1 -0
- package/dist/cdn/chunks/{icons-Dhqh5lYQ.js → icons-BrNSrnyT.js} +26 -26
- package/dist/cdn/chunks/{icons-Dhqh5lYQ.js.map → icons-BrNSrnyT.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-DRodsf2D.js → media-library-Cec5DMR3.js} +3 -3
- package/dist/cdn/chunks/{media-library-DRodsf2D.js.map → media-library-Cec5DMR3.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-CgICL-CQ.js → pt-BR-DvBHY0AA.js} +3 -2
- package/dist/cdn/chunks/pt-BR-DvBHY0AA.js.map +1 -0
- package/dist/cdn/chunks/{quality-A_V2Iqu_.js → quality-Dd2iYgRf.js} +2 -2
- package/dist/cdn/chunks/{quality-A_V2Iqu_.js.map → quality-Dd2iYgRf.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-BM_-zceB.js → renderer-Br-qXdnQ.js} +7 -4
- package/dist/cdn/chunks/{renderer-BM_-zceB.js.map → renderer-Br-qXdnQ.js.map} +1 -1
- package/dist/cdn/chunks/{src-DSomxPI-.js → src-BH8PABpF.js} +4 -4
- package/dist/cdn/chunks/{src-DSomxPI-.js.map → src-BH8PABpF.js.map} +1 -1
- package/dist/cdn/chunks/{styles--UXn88wH.js → styles-nqo5BynI.js} +887 -885
- package/dist/cdn/chunks/styles-nqo5BynI.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +11 -11
- package/dist/{check-D1zYtCPK.js → check-Cg6Mc2pP.js} +1 -1
- package/dist/{chevron-down-ByXpufZD.js → chevron-down-dClfxKrJ.js} +1 -1
- package/dist/{circle-alert-CjcAORUw.js → circle-alert-Bhzm-fNA.js} +1 -1
- package/dist/{clock-5lWLadUn.js → clock-m7TwQw4b.js} +1 -1
- package/dist/{createLucideIcon-Bh9xOmlW.js → createLucideIcon-FSF4peHQ.js} +2 -2
- package/dist/{de-Cy8FB-Ii.js → de-q9lTCMre.js} +2 -1
- package/dist/{en-Bu-zS_5o.js → en-CR4LItrX.js} +2 -1
- package/dist/{es-CD3ZD6hK.js → es-CEt-lrGd.js} +2 -1
- package/dist/{image-up-Bj_nes3f.js → image-up-CDEgJqwA.js} +1 -1
- package/dist/{info-BhSQCxBV.js → info-BNP8yGsK.js} +1 -1
- package/dist/{list-checks-CgxyUg7i.js → list-checks-jepi4iYr.js} +1 -1
- package/dist/{loader-circle-DFU0HPAa.js → loader-circle-BT38qSm3.js} +1 -1
- package/dist/{message-circle-BEBsCHnk.js → message-circle-BAHcL9S-.js} +1 -1
- package/dist/{pt-BR-CgICL-CQ.js → pt-BR-DvBHY0AA.js} +2 -1
- package/dist/{refresh-cw--lvWGy0_.js → refresh-cw-as5Bmg4X.js} +1 -1
- package/dist/{scan-line-QgyDIgn_.js → scan-line-IAMjPtRw.js} +1 -1
- package/dist/{send-BMyisUim.js → send-DvMay6bt.js} +1 -1
- package/dist/{shield-check-C49M20le.js → shield-check-YYDhGroE.js} +1 -1
- package/dist/{sparkles-DV7Dman6.js → sparkles-CCwQMMMZ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-CPt6RYEc.js → styles-DN4J7w-C.js} +717 -715
- package/dist/templatical-editor.js +9 -9
- package/dist/{text-align-start-BMU70uAm.js → text-align-start-BwsA6QzC.js} +11 -11
- package/dist/{trash-2-B6M659Ey.js → trash-2-CRBDolnR.js} +1 -1
- package/dist/{triangle-alert-D1lzx6ds.js → triangle-alert-B2g0ALvq.js} +1 -1
- package/dist/{upload-3A1oZtOR.js → upload-BKg6hDRW.js} +1 -1
- package/dist/{useEditorCore-CSfeEwCj.js → useEditorCore-DBq2689h.js} +69 -69
- package/dist/{x-CG_NV3nP.js → x-Ctg_250T.js} +1 -1
- package/package.json +8 -8
- package/dist/cdn/chunks/CountdownToolbar-B1oniVq1.js +0 -212
- package/dist/cdn/chunks/CountdownToolbar-B1oniVq1.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-mr9A4j6G.js.map +0 -1
- package/dist/cdn/chunks/ca-B3eR47lE.js.map +0 -1
- package/dist/cdn/chunks/de-Cy8FB-Ii.js.map +0 -1
- package/dist/cdn/chunks/en-Bu-zS_5o.js.map +0 -1
- package/dist/cdn/chunks/es-CD3ZD6hK.js.map +0 -1
- package/dist/cdn/chunks/features-Dwb5aTLg.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-CgICL-CQ.js.map +0 -1
- package/dist/cdn/chunks/styles--UXn88wH.js.map +0 -1
|
@@ -5,12 +5,12 @@ import { f as Be, g as Ve, h as He, m as Ue } from "./dist-DYv_Pttj.js";
|
|
|
5
5
|
import { a as We, i as Ge, o as Ke, r as qe, t as Je } from "./color-DhoxCSMv.js";
|
|
6
6
|
import { A as Ye, C as Xe, D as Ze, E as Qe, F as $e, I as et, L as tt, N as nt, O as rt, P as it, S as at, T as ot, _ as st, a as ct, b as lt, d as ut, f as dt, g as ft, h as pt, i as mt, k as ht, m as gt, n as _t, o as vt, p as yt, s as bt, u as xt, v as St, w as Ct, x as wt, y as Tt } from "./keys-BbDgCU6K.js";
|
|
7
7
|
import { t as Et } from "./useI18n-eR1yVW0v.js";
|
|
8
|
-
import { t as F } from "./createLucideIcon-
|
|
9
|
-
import { t as Dt } from "./loader-circle-
|
|
10
|
-
import { t as Ot } from "./message-circle-
|
|
11
|
-
import { t as kt } from "./trash-2-
|
|
12
|
-
import { t as At } from "./triangle-alert-
|
|
13
|
-
import { t as jt } from "./upload-
|
|
8
|
+
import { t as F } from "./createLucideIcon-FSF4peHQ.js";
|
|
9
|
+
import { t as Dt } from "./loader-circle-BT38qSm3.js";
|
|
10
|
+
import { t as Ot } from "./message-circle-BAHcL9S-.js";
|
|
11
|
+
import { t as kt } from "./trash-2-CRBDolnR.js";
|
|
12
|
+
import { t as At } from "./triangle-alert-B2g0ALvq.js";
|
|
13
|
+
import { t as jt } from "./upload-BKg6hDRW.js";
|
|
14
14
|
import { t as Mt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
15
|
import { t as Nt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
16
|
import "./useCloudI18n-WbfVWq5k.js";
|
|
@@ -2009,7 +2009,7 @@ var Kr = ["innerHTML"], qr = /* @__PURE__ */ y({
|
|
|
2009
2009
|
viewport: {}
|
|
2010
2010
|
},
|
|
2011
2011
|
setup(e) {
|
|
2012
|
-
let t = e, n = C(() => import("./ParagraphEditor-
|
|
2012
|
+
let t = e, n = C(() => import("./ParagraphEditor-BhsBi8p8.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Gr(() => t.block.content);
|
|
2013
2013
|
return (t, l) => (f(), x("div", {
|
|
2014
2014
|
ref_key: "blockRef",
|
|
2015
2015
|
ref: i,
|
|
@@ -2077,7 +2077,7 @@ var Zr = ["data-block-id", "data-block-type"], Qr = ["aria-label"], $r = [
|
|
|
2077
2077
|
},
|
|
2078
2078
|
emits: ["select"],
|
|
2079
2079
|
setup(e, { emit: t }) {
|
|
2080
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2080
|
+
let n = C(() => import("./BlockIssueBadge-BLytBabN.js")), r = e, a = t, { t: s, format: c } = Et(), l = N(St, null), u = _(null), d = j(() => l?.liftedBlockId.value === r.block.id), m = j(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2081
2081
|
async function h() {
|
|
2082
2082
|
await ie(), u.value?.focus();
|
|
2083
2083
|
}
|
|
@@ -2236,7 +2236,7 @@ var di = /* @__PURE__ */ y({
|
|
|
2236
2236
|
viewport: {}
|
|
2237
2237
|
},
|
|
2238
2238
|
setup(e) {
|
|
2239
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2239
|
+
let t = e, n = C(() => import("./TitleEditor-DdvRepBq.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Gr(() => t.block.content), u = j(() => {
|
|
2240
2240
|
let e = {
|
|
2241
2241
|
fontSize: `${Pe[t.block.level]}px`,
|
|
2242
2242
|
textAlign: t.block.textAlign
|
|
@@ -3656,11 +3656,11 @@ var Zo = [
|
|
|
3656
3656
|
$o.mounted, $o.unmounted;
|
|
3657
3657
|
//#endregion
|
|
3658
3658
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3659
|
-
var es = { class: "tpl:w-full" }, ts = {
|
|
3659
|
+
var es = { class: "tpl:w-full" }, ts = {
|
|
3660
3660
|
key: 0,
|
|
3661
3661
|
"data-testid": "section-drop-hint",
|
|
3662
3662
|
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-text-dim)]"
|
|
3663
|
-
},
|
|
3663
|
+
}, ns = /* @__PURE__ */ y({
|
|
3664
3664
|
__name: "SectionBlock",
|
|
3665
3665
|
props: {
|
|
3666
3666
|
block: {},
|
|
@@ -3690,30 +3690,30 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3690
3690
|
let e = u.value.length, t = [...r.block.children];
|
|
3691
3691
|
for (; t.length < e;) t.push([]);
|
|
3692
3692
|
return t.slice(0, e);
|
|
3693
|
-
});
|
|
3694
|
-
function
|
|
3693
|
+
}), g = j(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
|
|
3694
|
+
function _(e) {
|
|
3695
3695
|
return h.value[e] || [];
|
|
3696
3696
|
}
|
|
3697
|
-
function
|
|
3697
|
+
function v(e, t) {
|
|
3698
3698
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
|
|
3699
3699
|
for (; i.length <= e;) i.push([]);
|
|
3700
3700
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3701
3701
|
}
|
|
3702
|
-
function
|
|
3702
|
+
function y(e) {
|
|
3703
3703
|
return Jr(e, l, n);
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function S(e, t) {
|
|
3706
3706
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
3707
3707
|
fieldValues: t.fieldValues,
|
|
3708
3708
|
dataSourceFetched: t.dataSourceFetched
|
|
3709
3709
|
});
|
|
3710
3710
|
}
|
|
3711
|
-
return (n, r) => (f(), x("div", es, [b("div",
|
|
3711
|
+
return (n, r) => (f(), x("div", es, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": g.value }]) }, [(f(!0), x(A, null, t(h.value, (n, r) => (f(), x("div", {
|
|
3712
3712
|
key: r,
|
|
3713
|
-
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded",
|
|
3714
|
-
style: i({ width: u.value[r] })
|
|
3713
|
+
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", _(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3714
|
+
style: i({ width: g.value ? "100%" : u.value[r] })
|
|
3715
3715
|
}, [w(k(Qo), {
|
|
3716
|
-
"model-value":
|
|
3716
|
+
"model-value": _(r),
|
|
3717
3717
|
group: {
|
|
3718
3718
|
name: "blocks",
|
|
3719
3719
|
pull: !0,
|
|
@@ -3728,19 +3728,19 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3728
3728
|
"empty-insert-threshold": 20,
|
|
3729
3729
|
"force-fallback": !0,
|
|
3730
3730
|
class: "tpl:min-h-[60px]",
|
|
3731
|
-
"onUpdate:modelValue": (e) =>
|
|
3731
|
+
"onUpdate:modelValue": (e) => v(r, e)
|
|
3732
3732
|
}, {
|
|
3733
|
-
default: m(() => [(f(!0), x(A, null, t(
|
|
3733
|
+
default: m(() => [(f(!0), x(A, null, t(_(r), (t) => oe((f(), x("div", { key: t.id }, [w(li, {
|
|
3734
3734
|
block: t,
|
|
3735
3735
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3736
3736
|
viewport: e.viewport,
|
|
3737
3737
|
"preview-mode": k(s).state.previewMode,
|
|
3738
3738
|
onSelect: (e) => k(s).selectBlock(t.id)
|
|
3739
3739
|
}, {
|
|
3740
|
-
default: m(() => [(f(), D(d(
|
|
3740
|
+
default: m(() => [(f(), D(d(y(t)), {
|
|
3741
3741
|
block: t,
|
|
3742
3742
|
viewport: e.viewport,
|
|
3743
|
-
onFetchData: (e) =>
|
|
3743
|
+
onFetchData: (e) => S(t, e),
|
|
3744
3744
|
onUpdate: (e) => k(s).updateBlock(t.id, e)
|
|
3745
3745
|
}, null, 40, [
|
|
3746
3746
|
"block",
|
|
@@ -3761,13 +3761,13 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3761
3761
|
"model-value",
|
|
3762
3762
|
"group",
|
|
3763
3763
|
"onUpdate:modelValue"
|
|
3764
|
-
]),
|
|
3764
|
+
]), _(r).length === 0 ? (f(), x("div", ts, [b("span", null, p(k(a).section.dropHere), 1)])) : M("", !0)], 6))), 128))], 2)]));
|
|
3765
3765
|
}
|
|
3766
|
-
}),
|
|
3766
|
+
}), rs = ke, is = {
|
|
3767
3767
|
small: 24,
|
|
3768
3768
|
medium: 32,
|
|
3769
3769
|
large: 48
|
|
3770
|
-
},
|
|
3770
|
+
}, as = [
|
|
3771
3771
|
"facebook",
|
|
3772
3772
|
"twitter",
|
|
3773
3773
|
"instagram",
|
|
@@ -3785,11 +3785,11 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3785
3785
|
"github",
|
|
3786
3786
|
"dribbble",
|
|
3787
3787
|
"behance"
|
|
3788
|
-
],
|
|
3788
|
+
], os = [
|
|
3789
3789
|
"width",
|
|
3790
3790
|
"height",
|
|
3791
3791
|
"fill"
|
|
3792
|
-
],
|
|
3792
|
+
], ss = ["d"], cs = /* @__PURE__ */ y({
|
|
3793
3793
|
__name: "SocialIconSvg",
|
|
3794
3794
|
props: {
|
|
3795
3795
|
platform: {},
|
|
@@ -3797,7 +3797,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3797
3797
|
iconSize: {}
|
|
3798
3798
|
},
|
|
3799
3799
|
setup(e) {
|
|
3800
|
-
let t = e, n = j(() =>
|
|
3800
|
+
let t = e, n = j(() => rs[t.platform]), r = j(() => is[t.iconSize]), a = j(() => {
|
|
3801
3801
|
let e = {
|
|
3802
3802
|
display: "inline-flex",
|
|
3803
3803
|
alignItems: "center",
|
|
@@ -3841,12 +3841,12 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3841
3841
|
viewBox: "0 0 24 24",
|
|
3842
3842
|
fill: s.value,
|
|
3843
3843
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3844
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
3844
|
+
}, [b("path", { d: n.value.path }, null, 8, ss)], 8, os))], 4));
|
|
3845
3845
|
}
|
|
3846
|
-
}),
|
|
3846
|
+
}), ls = { class: "tpl:w-full" }, us = ["href"], ds = {
|
|
3847
3847
|
key: 1,
|
|
3848
3848
|
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)]"
|
|
3849
|
-
},
|
|
3849
|
+
}, fs = /* @__PURE__ */ y({
|
|
3850
3850
|
__name: "SocialIconsBlock",
|
|
3851
3851
|
props: {
|
|
3852
3852
|
block: {},
|
|
@@ -3859,7 +3859,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3859
3859
|
gap: `${n.block.spacing}px`,
|
|
3860
3860
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
3861
3861
|
})), o = j(() => n.block.icons.length > 0);
|
|
3862
|
-
return (n, s) => (f(), x("div",
|
|
3862
|
+
return (n, s) => (f(), x("div", ls, [o.value ? (f(), x("div", {
|
|
3863
3863
|
key: 0,
|
|
3864
3864
|
style: i(a.value)
|
|
3865
3865
|
}, [(f(!0), x(A, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -3867,7 +3867,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3867
3867
|
href: t.url || "#",
|
|
3868
3868
|
class: "tpl:cursor-default",
|
|
3869
3869
|
onClick: s[0] ||= P(() => {}, ["prevent"])
|
|
3870
|
-
}, [w(
|
|
3870
|
+
}, [w(cs, {
|
|
3871
3871
|
platform: t.platform,
|
|
3872
3872
|
"icon-style": e.block.iconStyle,
|
|
3873
3873
|
"icon-size": e.block.iconSize
|
|
@@ -3875,16 +3875,16 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3875
3875
|
"platform",
|
|
3876
3876
|
"icon-style",
|
|
3877
3877
|
"icon-size"
|
|
3878
|
-
])], 8,
|
|
3878
|
+
])], 8, us))), 128))], 4)) : (f(), x("div", ds, [w(k(Pn), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
3879
3879
|
}
|
|
3880
|
-
}),
|
|
3880
|
+
}), ps = { class: "tpl:w-full" }, ms = {
|
|
3881
3881
|
key: 0,
|
|
3882
3882
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3883
3883
|
style: {
|
|
3884
3884
|
"background-color": "var(--tpl-bg-hover)",
|
|
3885
3885
|
color: "var(--tpl-text-dim)"
|
|
3886
3886
|
}
|
|
3887
|
-
},
|
|
3887
|
+
}, hs = /* @__PURE__ */ y({
|
|
3888
3888
|
__name: "SpacerBlock",
|
|
3889
3889
|
props: {
|
|
3890
3890
|
block: {},
|
|
@@ -3896,23 +3896,23 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3896
3896
|
minHeight: `${t.block.height}px`,
|
|
3897
3897
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3898
3898
|
}));
|
|
3899
|
-
return (t, a) => (f(), x("div",
|
|
3899
|
+
return (t, a) => (f(), x("div", ps, [b("div", {
|
|
3900
3900
|
style: i(r.value),
|
|
3901
3901
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
3902
|
-
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span",
|
|
3902
|
+
}, [k(n).state.previewMode ? M("", !0) : (f(), x("span", ms, p(e.block.height) + "px ", 1))], 6)]));
|
|
3903
3903
|
}
|
|
3904
|
-
}),
|
|
3904
|
+
}), gs = { class: "tpl:w-full" }, _s = { key: 0 }, vs = [
|
|
3905
3905
|
"aria-label",
|
|
3906
3906
|
"data-placeholder",
|
|
3907
3907
|
"onBlur"
|
|
3908
|
-
],
|
|
3908
|
+
], ys = [
|
|
3909
3909
|
"aria-label",
|
|
3910
3910
|
"data-placeholder",
|
|
3911
3911
|
"onBlur"
|
|
3912
|
-
],
|
|
3912
|
+
], bs = {
|
|
3913
3913
|
key: 1,
|
|
3914
3914
|
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)]"
|
|
3915
|
-
},
|
|
3915
|
+
}, xs = /*#__PURE__*/ Nt(/* @__PURE__ */ y({
|
|
3916
3916
|
__name: "TableBlock",
|
|
3917
3917
|
props: {
|
|
3918
3918
|
block: {},
|
|
@@ -3957,11 +3957,11 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3957
3957
|
} : n);
|
|
3958
3958
|
o.updateBlock(r.block.id, { rows: a });
|
|
3959
3959
|
}
|
|
3960
|
-
return (e, r) => (f(), x("div",
|
|
3960
|
+
return (e, r) => (f(), x("div", gs, [s.value ? (f(), x("table", {
|
|
3961
3961
|
key: 0,
|
|
3962
3962
|
style: i(c.value),
|
|
3963
3963
|
class: "tpl-table-editable"
|
|
3964
|
-
}, [d.value ? (f(), x("thead",
|
|
3964
|
+
}, [d.value ? (f(), x("thead", _s, [b("tr", null, [(f(!0), x(A, null, t(d.value.cells, (e) => oe((f(), x("th", {
|
|
3965
3965
|
key: e.id,
|
|
3966
3966
|
style: i(u.value),
|
|
3967
3967
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3970,7 +3970,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3970
3970
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
3971
3971
|
onKeydown: r[0] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3972
3972
|
onClick: P(h, ["stop"])
|
|
3973
|
-
}, null, 44,
|
|
3973
|
+
}, null, 44, vs)), [[n, e.content]])), 128))])])) : M("", !0), b("tbody", null, [(f(!0), x(A, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(A, null, t(e.cells, (t) => oe((f(), x("td", {
|
|
3974
3974
|
key: t.id,
|
|
3975
3975
|
style: i(l.value),
|
|
3976
3976
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -3979,9 +3979,9 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3979
3979
|
onBlur: (n) => g(e.id, t.id, n),
|
|
3980
3980
|
onKeydown: r[1] ||= ce(P((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3981
3981
|
onClick: P(h, ["stop"])
|
|
3982
|
-
}, null, 44,
|
|
3982
|
+
}, null, 44, ys)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", bs, [w(k(Fn), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
3983
3983
|
}
|
|
3984
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3984
|
+
}), [["__scopeId", "data-v-963ac422"]]), Ss = /* @__PURE__ */ y({
|
|
3985
3985
|
__name: "VideoPlayButton",
|
|
3986
3986
|
props: { hoverEffect: {
|
|
3987
3987
|
type: Boolean,
|
|
@@ -3999,7 +3999,7 @@ var es = { class: "tpl:w-full" }, ts = { class: "tpl:flex tpl:gap-0" }, ns = {
|
|
|
3999
3999
|
});
|
|
4000
4000
|
//#endregion
|
|
4001
4001
|
//#region src/utils/videoThumbnail.ts
|
|
4002
|
-
function
|
|
4002
|
+
function Cs(e) {
|
|
4003
4003
|
if (!e) return {
|
|
4004
4004
|
platform: "unknown",
|
|
4005
4005
|
videoId: null,
|
|
@@ -4031,25 +4031,25 @@ function ws(e) {
|
|
|
4031
4031
|
thumbnailUrl: null
|
|
4032
4032
|
};
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4035
|
-
return t ||
|
|
4034
|
+
function ws(e, t) {
|
|
4035
|
+
return t || Cs(e).thumbnailUrl;
|
|
4036
4036
|
}
|
|
4037
4037
|
//#endregion
|
|
4038
4038
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4039
|
-
var
|
|
4039
|
+
var Ts = ["src", "alt"], Es = {
|
|
4040
4040
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4041
4041
|
style: { opacity: "0.7" }
|
|
4042
|
-
},
|
|
4042
|
+
}, Ds = ["href"], Os = ["src", "alt"], ks = ["src", "alt"], As = {
|
|
4043
4043
|
key: 3,
|
|
4044
4044
|
class: "tpl:flex 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)]"
|
|
4045
|
-
},
|
|
4045
|
+
}, js = /* @__PURE__ */ y({
|
|
4046
4046
|
__name: "VideoBlock",
|
|
4047
4047
|
props: {
|
|
4048
4048
|
block: {},
|
|
4049
4049
|
viewport: {}
|
|
4050
4050
|
},
|
|
4051
4051
|
setup(e) {
|
|
4052
|
-
let t = e, { t: n } = Et(), { syntax: r } = Pt(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null :
|
|
4052
|
+
let t = e, { t: n } = Et(), { syntax: r } = Pt(), a = j(() => Ae(t.block.url, r) || Ae(t.block.thumbnailUrl, r)), o = j(() => a.value ? null : ws(t.block.url, t.block.thumbnailUrl)), s = j(() => ({ textAlign: t.block.align })), c = j(() => {
|
|
4053
4053
|
let e = t.block.align;
|
|
4054
4054
|
return {
|
|
4055
4055
|
maxWidth: "100%",
|
|
@@ -4070,7 +4070,7 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4070
4070
|
class: "tpl:w-full tpl:border-0",
|
|
4071
4071
|
src: e.block.placeholderUrl,
|
|
4072
4072
|
alt: e.block.alt
|
|
4073
|
-
}, null, 8,
|
|
4073
|
+
}, null, 8, Ts), w(Ss)], 4)) : a.value ? (f(), x("div", {
|
|
4074
4074
|
key: 1,
|
|
4075
4075
|
class: "tpl:relative tpl:!flex 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)]",
|
|
4076
4076
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, c.value])
|
|
@@ -4079,7 +4079,7 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4079
4079
|
"stroke-width": 1.5,
|
|
4080
4080
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4081
4081
|
style: { opacity: "0.5" }
|
|
4082
|
-
}), b("span",
|
|
4082
|
+
}), b("span", Es, [w(bn, { text: l.value }, null, 8, ["text"])])], 4)) : o.value ? (f(), x(A, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4083
4083
|
key: 0,
|
|
4084
4084
|
href: e.block.url,
|
|
4085
4085
|
target: "_blank",
|
|
@@ -4091,7 +4091,7 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4091
4091
|
class: "tpl:w-full tpl:border-0",
|
|
4092
4092
|
src: o.value,
|
|
4093
4093
|
alt: e.block.alt
|
|
4094
|
-
}, null, 8,
|
|
4094
|
+
}, null, 8, Os), w(Ss, { "hover-effect": "" })], 12, Ds)) : (f(), x("div", {
|
|
4095
4095
|
key: 1,
|
|
4096
4096
|
class: "tpl:relative tpl:inline-block",
|
|
4097
4097
|
style: i(c.value)
|
|
@@ -4099,28 +4099,28 @@ var Es = ["src", "alt"], Ds = {
|
|
|
4099
4099
|
class: "tpl:w-full tpl:border-0",
|
|
4100
4100
|
src: o.value,
|
|
4101
4101
|
alt: e.block.alt
|
|
4102
|
-
}, null, 8,
|
|
4102
|
+
}, null, 8, ks), w(Ss)], 4))], 64)) : (f(), x("div", As, [w(k(In), {
|
|
4103
4103
|
size: 40,
|
|
4104
4104
|
"stroke-width": 1.5,
|
|
4105
4105
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4106
4106
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4107
4107
|
}
|
|
4108
|
-
}),
|
|
4109
|
-
section:
|
|
4108
|
+
}), Ms = {
|
|
4109
|
+
section: ns,
|
|
4110
4110
|
title: di,
|
|
4111
4111
|
paragraph: qr,
|
|
4112
4112
|
image: Pr,
|
|
4113
4113
|
button: Cn,
|
|
4114
4114
|
divider: hr,
|
|
4115
|
-
video:
|
|
4116
|
-
social:
|
|
4115
|
+
video: js,
|
|
4116
|
+
social: fs,
|
|
4117
4117
|
menu: Rr,
|
|
4118
|
-
table:
|
|
4119
|
-
spacer:
|
|
4118
|
+
table: xs,
|
|
4119
|
+
spacer: hs,
|
|
4120
4120
|
html: br,
|
|
4121
4121
|
countdown: C(() => import("./CountdownBlock-173fiO5Z.js").then((e) => e.n))
|
|
4122
4122
|
};
|
|
4123
|
-
function
|
|
4123
|
+
function Ns(e) {
|
|
4124
4124
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Et(r);
|
|
4125
4125
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4126
4126
|
let { resolvedTheme: l } = an(j(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = sn({
|
|
@@ -4152,7 +4152,7 @@ function Ps(e) {
|
|
|
4152
4152
|
t: a,
|
|
4153
4153
|
format: o
|
|
4154
4154
|
}), b = dn();
|
|
4155
|
-
if (gn(b,
|
|
4155
|
+
if (gn(b, Ms), n.customBlocks?.length) for (let e of n.customBlocks) b.registerCustom(e, pr);
|
|
4156
4156
|
function x(e) {
|
|
4157
4157
|
for (let t of e) b.registerCustom(t, pr);
|
|
4158
4158
|
}
|
|
@@ -4209,4 +4209,4 @@ function Ps(e) {
|
|
|
4209
4209
|
};
|
|
4210
4210
|
}
|
|
4211
4211
|
//#endregion
|
|
4212
|
-
export { Pn as A, Lt as B, Yn as C, Hn as D, Un as E, En as F, Cn as I, un as L, jn as M, On as N, zn as O, Dn as P, nn as R, er as S, Wn as T, br as _,
|
|
4212
|
+
export { Pn as A, Lt as B, Yn as C, Hn as D, Un as E, En as F, Cn as I, un as L, jn as M, On as N, zn as O, Dn as P, nn as R, er as S, Wn as T, br as _, fs as a, ir as b, Qo as c, Yr as d, Jr as f, Sr as g, Pr as h, hs as i, Mn as j, Fn as k, di as l, Rr as m, js as n, as as o, qr as p, xs as r, ns as s, Ns as t, li as u, hr as v, Jn as w, nr as x, pr as y, Kt as z };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@templatical/editor",
|
|
3
3
|
"description": "Vue 3 visual drag-and-drop email editor powered by Templatical",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.4",
|
|
5
5
|
"bugs": "https://github.com/templatical/sdk/issues",
|
|
6
6
|
"devDependencies": {
|
|
7
|
-
"@lucide/vue": "^1.
|
|
7
|
+
"@lucide/vue": "^1.25.0",
|
|
8
8
|
"@tiptap/core": "^3.28.0",
|
|
9
9
|
"@tiptap/extension-color": "^3.28.0",
|
|
10
10
|
"@tiptap/extension-font-family": "^3.28.0",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"vue": "^3.5.40",
|
|
33
33
|
"vue-draggable-plus": "^0.6.1",
|
|
34
34
|
"vue-tsc": "^3.3.7",
|
|
35
|
-
"@templatical/core": "0.16.
|
|
36
|
-
"@templatical/quality": "0.16.
|
|
37
|
-
"@templatical/types": "0.16.
|
|
35
|
+
"@templatical/core": "0.16.4",
|
|
36
|
+
"@templatical/quality": "0.16.4",
|
|
37
|
+
"@templatical/types": "0.16.4"
|
|
38
38
|
},
|
|
39
39
|
"exports": {
|
|
40
40
|
".": {
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"license": "SEE LICENSE IN LICENSE",
|
|
63
63
|
"module": "./dist/templatical-editor.js",
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@templatical/media-library": "0.16.
|
|
66
|
-
"@templatical/quality": "0.16.
|
|
67
|
-
"@templatical/renderer": "0.16.
|
|
65
|
+
"@templatical/media-library": "0.16.4",
|
|
66
|
+
"@templatical/quality": "0.16.4",
|
|
67
|
+
"@templatical/renderer": "0.16.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependenciesMeta": {
|
|
70
70
|
"@templatical/renderer": {
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { M as e, P as t, V as n, ct as r, f as i, g as a, it as o, m as s, ot as c, p as l, u, v as d, x as f, y as p } from "./draggable-D840DIZB.js";
|
|
2
|
-
import { zt as m } from "./features-Dwb5aTLg.js";
|
|
3
|
-
import { f as h, t as g } from "./ColorPicker-Pi-1fR8c.js";
|
|
4
|
-
import { n as _, r as v, t as y } from "./NumberWithSuffix-CkOxH3F7.js";
|
|
5
|
-
//#region src/components/toolbar/CheckboxItem.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var b = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, x = ["checked"], S = /* @__PURE__ */ f({
|
|
7
|
-
__name: "CheckboxItem",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: { type: Boolean },
|
|
10
|
-
label: {}
|
|
11
|
-
},
|
|
12
|
-
emits: ["update:modelValue"],
|
|
13
|
-
setup(t, { emit: n }) {
|
|
14
|
-
let i = n;
|
|
15
|
-
return (n, o) => (e(), a("label", b, [l("input", {
|
|
16
|
-
type: "checkbox",
|
|
17
|
-
class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
|
|
18
|
-
checked: t.modelValue,
|
|
19
|
-
onChange: o[0] ||= (e) => i("update:modelValue", e.target.checked)
|
|
20
|
-
}, null, 40, x), d(" " + r(t.label), 1)]));
|
|
21
|
-
}
|
|
22
|
-
}), C = ["value"], w = ["value"], T = ["value"], E = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, D = ["value"], O = { value: "" }, k = ["value"], A = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, j = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, M = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, N = [
|
|
23
|
-
"value",
|
|
24
|
-
"placeholder",
|
|
25
|
-
"onInput"
|
|
26
|
-
], P = ["value", "placeholder"], F = ["value"], I = /* @__PURE__ */ f({
|
|
27
|
-
__name: "CountdownToolbar",
|
|
28
|
-
props: {
|
|
29
|
-
block: {},
|
|
30
|
-
fontFamilies: {}
|
|
31
|
-
},
|
|
32
|
-
emits: ["update"],
|
|
33
|
-
setup(d, { emit: f }) {
|
|
34
|
-
let b = f, { t: x } = m(), I = [
|
|
35
|
-
"UTC",
|
|
36
|
-
"America/New_York",
|
|
37
|
-
"America/Chicago",
|
|
38
|
-
"America/Denver",
|
|
39
|
-
"America/Los_Angeles",
|
|
40
|
-
"Europe/London",
|
|
41
|
-
"Europe/Berlin",
|
|
42
|
-
"Europe/Paris",
|
|
43
|
-
"Europe/Moscow",
|
|
44
|
-
"Asia/Dubai",
|
|
45
|
-
"Asia/Kolkata",
|
|
46
|
-
"Asia/Shanghai",
|
|
47
|
-
"Asia/Tokyo",
|
|
48
|
-
"Australia/Sydney",
|
|
49
|
-
"Pacific/Auckland"
|
|
50
|
-
], L = [
|
|
51
|
-
{
|
|
52
|
-
value: ":",
|
|
53
|
-
label: ":"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
value: "-",
|
|
57
|
-
label: "-"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
value: " ",
|
|
61
|
-
label: "␣"
|
|
62
|
-
}
|
|
63
|
-
], R = [
|
|
64
|
-
"Days",
|
|
65
|
-
"Hours",
|
|
66
|
-
"Minutes",
|
|
67
|
-
"Seconds"
|
|
68
|
-
], z = i(() => R.map((e) => ({
|
|
69
|
-
unit: e,
|
|
70
|
-
showKey: `show${e}`,
|
|
71
|
-
labelKey: `label${e}`,
|
|
72
|
-
translationKey: e.toLowerCase()
|
|
73
|
-
})));
|
|
74
|
-
function B(e, t) {
|
|
75
|
-
b("update", { [e]: t });
|
|
76
|
-
}
|
|
77
|
-
return (i, f) => (e(), a(u, null, [
|
|
78
|
-
p(_, { label: o(x).countdown.targetDate }, {
|
|
79
|
-
default: n(() => [l("input", {
|
|
80
|
-
type: "datetime-local",
|
|
81
|
-
class: c(o(h)),
|
|
82
|
-
value: d.block.targetDate,
|
|
83
|
-
onInput: f[0] ||= (e) => B("targetDate", e.target.value)
|
|
84
|
-
}, null, 42, C)]),
|
|
85
|
-
_: 1
|
|
86
|
-
}, 8, ["label"]),
|
|
87
|
-
p(_, { label: o(x).countdown.timezone }, {
|
|
88
|
-
default: n(() => [l("select", {
|
|
89
|
-
class: c(o(h)),
|
|
90
|
-
value: d.block.timezone,
|
|
91
|
-
onChange: f[1] ||= (e) => B("timezone", e.target.value)
|
|
92
|
-
}, [(e(), a(u, null, t(I, (e) => l("option", {
|
|
93
|
-
key: e,
|
|
94
|
-
value: e
|
|
95
|
-
}, r(e), 9, T)), 64))], 42, w)]),
|
|
96
|
-
_: 1
|
|
97
|
-
}, 8, ["label"]),
|
|
98
|
-
p(_, { label: o(x).countdown.display }, {
|
|
99
|
-
default: n(() => [l("div", E, [(e(!0), a(u, null, t(z.value, (t) => (e(), s(S, {
|
|
100
|
-
key: t.unit,
|
|
101
|
-
"model-value": d.block[t.showKey],
|
|
102
|
-
label: o(x).countdown[t.translationKey],
|
|
103
|
-
"onUpdate:modelValue": (e) => B(t.showKey, e)
|
|
104
|
-
}, null, 8, [
|
|
105
|
-
"model-value",
|
|
106
|
-
"label",
|
|
107
|
-
"onUpdate:modelValue"
|
|
108
|
-
]))), 128))])]),
|
|
109
|
-
_: 1
|
|
110
|
-
}, 8, ["label"]),
|
|
111
|
-
p(_, { label: o(x).countdown.separator }, {
|
|
112
|
-
default: n(() => [p(v, {
|
|
113
|
-
options: L,
|
|
114
|
-
"model-value": d.block.separator,
|
|
115
|
-
"onUpdate:modelValue": f[2] ||= (e) => B("separator", e)
|
|
116
|
-
}, null, 8, ["model-value"])]),
|
|
117
|
-
_: 1
|
|
118
|
-
}, 8, ["label"]),
|
|
119
|
-
p(_, { label: o(x).countdown.fontFamily }, {
|
|
120
|
-
default: n(() => [l("select", {
|
|
121
|
-
class: c(o(h)),
|
|
122
|
-
value: d.block.fontFamily || "",
|
|
123
|
-
onChange: f[3] ||= (e) => B("fontFamily", e.target.value || void 0)
|
|
124
|
-
}, [l("option", O, r(o(x).countdown.inheritFont), 1), (e(!0), a(u, null, t(d.fontFamilies, (t) => (e(), a("option", {
|
|
125
|
-
key: t.value,
|
|
126
|
-
value: t.value
|
|
127
|
-
}, r(t.label), 9, k))), 128))], 42, D)]),
|
|
128
|
-
_: 1
|
|
129
|
-
}, 8, ["label"]),
|
|
130
|
-
l("div", A, [p(_, { label: o(x).countdown.digitFontSize }, {
|
|
131
|
-
default: n(() => [p(y, {
|
|
132
|
-
"model-value": d.block.digitFontSize,
|
|
133
|
-
min: 12,
|
|
134
|
-
max: 72,
|
|
135
|
-
suffix: "px",
|
|
136
|
-
"onUpdate:modelValue": f[4] ||= (e) => B("digitFontSize", e)
|
|
137
|
-
}, null, 8, ["model-value"])]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["label"]), p(_, { label: o(x).countdown.labelFontSize }, {
|
|
140
|
-
default: n(() => [p(y, {
|
|
141
|
-
"model-value": d.block.labelFontSize,
|
|
142
|
-
min: 8,
|
|
143
|
-
max: 24,
|
|
144
|
-
suffix: "px",
|
|
145
|
-
"onUpdate:modelValue": f[5] ||= (e) => B("labelFontSize", e)
|
|
146
|
-
}, null, 8, ["model-value"])]),
|
|
147
|
-
_: 1
|
|
148
|
-
}, 8, ["label"])]),
|
|
149
|
-
l("div", j, [p(_, { label: o(x).countdown.digitColor }, {
|
|
150
|
-
default: n(() => [p(g, {
|
|
151
|
-
"model-value": d.block.digitColor,
|
|
152
|
-
"onUpdate:modelValue": f[6] ||= (e) => B("digitColor", e)
|
|
153
|
-
}, null, 8, ["model-value"])]),
|
|
154
|
-
_: 1
|
|
155
|
-
}, 8, ["label"]), p(_, { label: o(x).countdown.labelColor }, {
|
|
156
|
-
default: n(() => [p(g, {
|
|
157
|
-
"model-value": d.block.labelColor,
|
|
158
|
-
"onUpdate:modelValue": f[7] ||= (e) => B("labelColor", e)
|
|
159
|
-
}, null, 8, ["model-value"])]),
|
|
160
|
-
_: 1
|
|
161
|
-
}, 8, ["label"])]),
|
|
162
|
-
p(_, { label: o(x).countdown.background }, {
|
|
163
|
-
default: n(() => [p(g, {
|
|
164
|
-
"model-value": d.block.backgroundColor,
|
|
165
|
-
"onUpdate:modelValue": f[8] ||= (e) => B("backgroundColor", e)
|
|
166
|
-
}, null, 8, ["model-value"])]),
|
|
167
|
-
_: 1
|
|
168
|
-
}, 8, ["label"]),
|
|
169
|
-
p(_, { label: o(x).countdown.labels }, {
|
|
170
|
-
default: n(() => [l("div", M, [(e(!0), a(u, null, t(z.value, (t) => (e(), a("input", {
|
|
171
|
-
key: t.unit,
|
|
172
|
-
type: "text",
|
|
173
|
-
class: c(o(h)),
|
|
174
|
-
value: d.block[t.labelKey],
|
|
175
|
-
placeholder: o(x).countdown[t.translationKey],
|
|
176
|
-
onInput: (e) => B(t.labelKey, e.target.value)
|
|
177
|
-
}, null, 42, N))), 128))])]),
|
|
178
|
-
_: 1
|
|
179
|
-
}, 8, ["label"]),
|
|
180
|
-
p(_, { label: o(x).countdown.expiry }, {
|
|
181
|
-
default: n(() => [l("input", {
|
|
182
|
-
type: "text",
|
|
183
|
-
class: c(o(h)),
|
|
184
|
-
value: d.block.expiredMessage,
|
|
185
|
-
placeholder: o(x).countdown.expiredMessagePlaceholder,
|
|
186
|
-
onInput: f[9] ||= (e) => B("expiredMessage", e.target.value)
|
|
187
|
-
}, null, 42, P)]),
|
|
188
|
-
_: 1
|
|
189
|
-
}, 8, ["label"]),
|
|
190
|
-
p(_, { label: o(x).countdown.expiredImageUrl }, {
|
|
191
|
-
default: n(() => [l("input", {
|
|
192
|
-
type: "url",
|
|
193
|
-
class: c(o(h)),
|
|
194
|
-
value: d.block.expiredImageUrl,
|
|
195
|
-
placeholder: "https://...",
|
|
196
|
-
onInput: f[10] ||= (e) => B("expiredImageUrl", e.target.value)
|
|
197
|
-
}, null, 42, F)]),
|
|
198
|
-
_: 1
|
|
199
|
-
}, 8, ["label"]),
|
|
200
|
-
p(S, {
|
|
201
|
-
"model-value": d.block.hideOnExpiry,
|
|
202
|
-
label: o(x).countdown.hideOnExpiry,
|
|
203
|
-
class: "tpl:mb-3.5",
|
|
204
|
-
"onUpdate:modelValue": f[11] ||= (e) => B("hideOnExpiry", e)
|
|
205
|
-
}, null, 8, ["model-value", "label"])
|
|
206
|
-
], 64));
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
//#endregion
|
|
210
|
-
export { I as default };
|
|
211
|
-
|
|
212
|
-
//# sourceMappingURL=CountdownToolbar-B1oniVq1.js.map
|