@templatical/editor 0.11.0 → 0.12.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/{AiChatSidebar-Cm5RM5Qh.js → AiChatSidebar-CXH7l1Ar.js} +13 -13
- package/dist/{AiFeatureMenu-D4D2Sqfk.js → AiFeatureMenu-BKbUUc1D.js} +10 -10
- package/dist/{BlockIssueBadge-BF4sdsr4.js → BlockIssueBadge-C-EPqWsh.js} +5 -5
- package/dist/{CloudEditor-CLwyq3kf.js → CloudEditor-F5YV5hE3.js} +166 -165
- package/dist/{CollaboratorBar-DjX-o5Pi.js → CollaboratorBar-ACUA7lBJ.js} +4 -4
- package/dist/{CommentsSidebar-BQJzyCc6.js → CommentsSidebar-CpRLN40c.js} +19 -19
- package/dist/{CountdownBlock-D_AsF4F3.js → CountdownBlock-C-6o19qS.js} +3 -3
- package/dist/{CountdownToolbar-BGTkFky9.js → CountdownToolbar-CDy9_2Yj.js} +3 -3
- package/dist/{DesignReferenceSidebar-O3epZMXD.js → DesignReferenceSidebar-0dTsBW08.js} +9 -9
- package/dist/{IssuesPanel-CPBbR8yp.js → IssuesPanel-I0z6k6-H.js} +11 -11
- package/dist/{LoadingTrack-e67FA0NP.js → LoadingTrack-C7mGWPHS.js} +1 -1
- package/dist/{ModuleBrowserModal-CVS4Sf7H.js → ModuleBrowserModal-Bz9hSjMS.js} +10 -10
- package/dist/{ModulePreviewCanvas-C10YXsL_.js → ModulePreviewCanvas-CpaumPMS.js} +23 -23
- package/dist/{NumberWithSuffix-eI9pPDWT.js → NumberWithSuffix-Cd7bz1Wk.js} +3 -3
- package/dist/{ParagraphEditor-BKoqcKIt.js → ParagraphEditor-BqRFV_Y-.js} +43 -43
- package/dist/{RichTextEditorContent-Dvn4woIt.js → RichTextEditorContent-Q5altsx1.js} +6 -6
- package/dist/{SaveModuleDialog-BMuIjxVn.js → SaveModuleDialog-DmfvH5D0.js} +7 -7
- package/dist/{SnapshotHistory-DZ5_W7e4.js → SnapshotHistory-C052o-8U.js} +13 -13
- package/dist/{TemplateScoringPanel-Bt5Rsgen.js → TemplateScoringPanel-CUs8XmIi.js} +24 -24
- package/dist/{TestEmailModal-EjpH-F-W.js → TestEmailModal-BIIxRWUt.js} +5 -5
- package/dist/{TitleEditor-Rv1deuV7.js → TitleEditor-FMh54Cx5.js} +18 -18
- package/dist/{TplModal-DSmCQIm4.js → TplModal-utMtXzSO.js} +4 -4
- package/dist/{blockTypeIcons-OhEkQhYj.js → blockTypeIcons-C6UGDmrC.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js → AiFeatureMenu-4NhCFeTh.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-Dm9CL3u0.js.map → AiFeatureMenu-4NhCFeTh.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js → BlockIssueBadge-BYKThwhE.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-DjnFAeWq.js.map → BlockIssueBadge-BYKThwhE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js → CloudEditor-OO8hWAVp.js} +177 -176
- package/dist/cdn/chunks/{CloudEditor-XSmLmdgp.js.map → CloudEditor-OO8hWAVp.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js → CollaboratorBar-Dn5gXNDt.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-BfoGJhns.js.map → CollaboratorBar-Dn5gXNDt.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js → CountdownBlock-hYoJdVOt.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-GRio55a1.js.map → CountdownBlock-hYoJdVOt.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js → CountdownToolbar-BXjDFRHI.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-Cd1oEopw.js.map → CountdownToolbar-BXjDFRHI.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js → IssuesPanel-_5fEnivU.js} +10 -10
- package/dist/cdn/chunks/{IssuesPanel-C-BiFQDQ.js.map → IssuesPanel-_5fEnivU.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js → ModuleBrowserModal-DtCksAeW.js} +7 -7
- package/dist/cdn/chunks/{ModuleBrowserModal-Dj7gRT4Q.js.map → ModuleBrowserModal-DtCksAeW.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js → ModulePreviewCanvas-CCOvabZd.js} +31 -31
- package/dist/cdn/chunks/{ModulePreviewCanvas-hwdveKb0.js.map → ModulePreviewCanvas-CCOvabZd.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js → NumberWithSuffix-ZuJ2ePB0.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-bE_6cfiA.js.map → NumberWithSuffix-ZuJ2ePB0.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js → ParagraphEditor-BnhnFOW1.js} +34 -34
- package/dist/cdn/chunks/{ParagraphEditor-y1kGJRBX.js.map → ParagraphEditor-BnhnFOW1.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js → RichTextEditorContent-DV2yknp8.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-DPy9D4hc.js.map → RichTextEditorContent-DV2yknp8.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js → SaveModuleDialog-CCX5U7VA.js} +5 -5
- package/dist/cdn/chunks/{SaveModuleDialog-CPu5e2VG.js.map → SaveModuleDialog-CCX5U7VA.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js → TitleEditor-CQqklX0D.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-CMzzOPye.js.map → TitleEditor-CQqklX0D.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-CpGPHppB.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BC5qpvuV.js.map → blockTypeIcons-CpGPHppB.js.map} +1 -1
- package/dist/{de-DIAGP7yH.js → cdn/chunks/de-DpBN9H7-.js} +13 -1
- package/dist/cdn/chunks/de-DpBN9H7-.js.map +1 -0
- package/dist/cdn/chunks/{draggable-iAb7QVJo.js → draggable-Bci-fq8y.js} +473 -465
- package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +1 -0
- package/dist/{en-nqIW8Q9W.js → cdn/chunks/en-BhHtdIiU.js} +13 -1
- package/dist/cdn/chunks/en-BhHtdIiU.js.map +1 -0
- package/dist/cdn/chunks/{extensions-DH7ESsaz.js → extensions-Ds9GnMcd.js} +4 -4
- package/dist/cdn/chunks/{extensions-DH7ESsaz.js.map → extensions-Ds9GnMcd.js.map} +1 -1
- package/dist/cdn/chunks/{features-DmUOSthI.js → features-DxWz_Enw.js} +1055 -1056
- package/dist/cdn/chunks/features-DxWz_Enw.js.map +1 -0
- package/dist/cdn/chunks/{icons-DguD4x_X.js → icons-BflGUmFY.js} +146 -146
- package/dist/cdn/chunks/icons-BflGUmFY.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DUDc3U21.js → liquid.browser-DKKBzRQu.js} +502 -497
- package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +1 -0
- package/dist/cdn/chunks/{media-library-ClQUPxRM.js → media-library-C479-QcE.js} +364 -364
- package/dist/cdn/chunks/{media-library-ClQUPxRM.js.map → media-library-C479-QcE.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +12 -2
- package/dist/cdn/chunks/pt-BR-Bth5a93y.js.map +1 -0
- package/dist/cdn/chunks/{pusher-CHo5Cua0.js → pusher-BICWUP2j.js} +3 -3
- package/dist/cdn/chunks/{pusher-CHo5Cua0.js.map → pusher-BICWUP2j.js.map} +1 -1
- package/dist/cdn/chunks/{quality-CIw_7cXv.js → quality-BL_pEvFP.js} +20 -20
- package/dist/cdn/chunks/{quality-CIw_7cXv.js.map → quality-BL_pEvFP.js.map} +1 -1
- package/dist/cdn/chunks/readableTextColor-f8Kykfnh.js.map +1 -1
- package/dist/cdn/chunks/{renderer-Bx8I7_Rb.js → renderer-DwPomkBw.js} +42 -39
- package/dist/cdn/chunks/renderer-DwPomkBw.js.map +1 -0
- package/dist/cdn/chunks/{src-C-GlM149.js → src-DzvOWQ9S.js} +62 -62
- package/dist/cdn/chunks/{src-C-GlM149.js.map → src-DzvOWQ9S.js.map} +1 -1
- package/dist/cdn/chunks/{styles-CfqCvq0Z.js → styles-D45rgVq8.js} +712 -624
- package/dist/cdn/chunks/styles-D45rgVq8.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-BAwu9VcJ.js → tiptap-CwScfbsM.js} +5 -4
- package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +105 -104
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BsNM6BDs.js → check-BRzXxFHr.js} +1 -1
- package/dist/{chevron-down-fcsZ5DU7.js → chevron-down-DmEgzmYT.js} +1 -1
- package/dist/{circle-alert-BZTbwc-B.js → circle-alert-BStvZr3O.js} +1 -1
- package/dist/{clock-B7iQRubC.js → clock-Blwp_1R6.js} +1 -1
- package/dist/{cloud-Dom4EH5Z.js → cloud-_olro76D.js} +6 -6
- package/dist/{createLucideIcon-C_fetdGM.js → createLucideIcon-CmPAC-gt.js} +3 -3
- package/dist/{cdn/chunks/de-DIAGP7yH.js → de-DpBN9H7-.js} +11 -3
- package/dist/{dist-ByBVNmRN.js → dist-412xXefB.js} +1 -1
- package/dist/{dist-XdF11ZkX.js → dist-BCQZZUE9.js} +1 -1
- package/dist/{dist-CD3wbUoR.js → dist-BNEdeWub.js} +1 -1
- package/dist/dist-BctFrpeA.js +472 -0
- package/dist/{dist-eVlXvuKI.js → dist-BlG7k25W.js} +1 -1
- package/dist/{dist-BLcYl_de.js → dist-BwgjpLfr.js} +1 -1
- package/dist/{dist-Dhs3W2WW.js → dist-Cz79qrLL.js} +1 -1
- package/dist/{dist-c2sj5PQ5.js → dist-D6x1cQeh.js} +3 -3
- package/dist/{dist-cT52Hh9L.js → dist-DJ9aD8yA.js} +3 -3
- package/dist/{dist-Cwl7XXr4.js → dist-DULfKmTh.js} +3 -3
- package/dist/{dist-Dem8ODLh.js → dist-DhKTdU52.js} +3 -2
- package/dist/{dist-BOHAk4zI.js → dist-b7Ak-CuM.js} +1 -1
- package/dist/{dist-B4NkMBYc.js → dist-o73iaGqy.js} +1 -1
- package/dist/{dist-BsB4nPJD.js → dist-u0iIJH3V.js} +1 -1
- package/dist/{cdn/chunks/en-nqIW8Q9W.js → en-BhHtdIiU.js} +11 -3
- package/dist/{extensions-B2lSGCA8.js → extensions-XPlNAKIL.js} +23 -23
- package/dist/formatRelativeTime-CtUU-QZ8.js +10 -0
- package/dist/{image-up-1xrPPJYH.js → image-up-BFPbw_Zq.js} +1 -1
- package/dist/index.d.ts +32 -0
- package/dist/{info-ByAFxArD.js → info-B_qLEBN2.js} +1 -1
- package/dist/{keys-DsRdOmg3.js → keys-mFiJ5N0_.js} +1 -1
- package/dist/{liquid.browser--qtl1Fqy.js → liquid.browser-CVjP5Mex.js} +501 -496
- package/dist/{list-checks-CKUP4UZU.js → list-checks-CGg7JxPm.js} +1 -1
- package/dist/{loader-circle-BuxX338d.js → loader-circle-CDF8eR_Q.js} +1 -1
- package/dist/{message-circle-nLwqegRi.js → message-circle-C3cHsCJl.js} +1 -1
- package/dist/{pt-BR-DCNnLLx9.js → pt-BR-Bth5a93y.js} +11 -1
- package/dist/{refresh-cw-DAkD6iDI.js → refresh-cw-Butml7Q4.js} +1 -1
- package/dist/{scan-line-DEELRJJ5.js → scan-line-XYEqim_E.js} +1 -1
- package/dist/{send-DCMgrNT4.js → send-k7npFJNO.js} +1 -1
- package/dist/{shield-check-BFtVr_ov.js → shield-check-CV6GbmCu.js} +1 -1
- package/dist/{sparkles-CeYIQ5RJ.js → sparkles-C965Xop4.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-D_ztiOsh.js → styles-Dp4mJuCM.js} +817 -729
- package/dist/templatical-editor.js +117 -116
- package/dist/{text-align-start-BsmIoqLS.js → text-align-start-Bxnps8fH.js} +1 -1
- package/dist/{trash-2-C2S4-CIH.js → trash-2-DpGb7fIt.js} +1 -1
- package/dist/{triangle-alert-DMdedF6W.js → triangle-alert-BKYElAwz.js} +1 -1
- package/dist/{useAliveFlag-DlVvpZxc.js → useAliveFlag-BinvbqQR.js} +1 -1
- package/dist/{useCloudI18n-BEuiZdzs.js → useCloudI18n-L3H2XvdW.js} +2 -2
- package/dist/{useEditorCore-tZGAVvNz.js → useEditorCore-D7dQFRkw.js} +699 -769
- package/dist/{useI18n-DNspT6uw.js → useI18n-CTs_bP9d.js} +2 -2
- package/dist/{useMergeTag-abutjUud.js → useMergeTag-e3RSY-s3.js} +6 -6
- package/dist/usePopoverRoot-DVh7NY1q.js +8 -0
- package/dist/{vue.runtime.esm-bundler-mPytWZFh.js → vue.runtime.esm-bundler-B2k01iQh.js} +345 -337
- package/dist/{x-_9jw816B.js → x-CGjkjdKK.js} +1 -1
- package/package.json +11 -11
- package/dist/cdn/chunks/blockTypeIcons-BC5qpvuV.js +0 -22
- package/dist/cdn/chunks/de-DIAGP7yH.js.map +0 -1
- package/dist/cdn/chunks/draggable-iAb7QVJo.js.map +0 -1
- package/dist/cdn/chunks/en-nqIW8Q9W.js.map +0 -1
- package/dist/cdn/chunks/features-DmUOSthI.js.map +0 -1
- package/dist/cdn/chunks/icons-DguD4x_X.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DUDc3U21.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-DCNnLLx9.js.map +0 -1
- package/dist/cdn/chunks/renderer-Bx8I7_Rb.js.map +0 -1
- package/dist/cdn/chunks/styles-CfqCvq0Z.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +0 -1
- package/dist/dist-D6L_WdRL.js +0 -403
- package/dist/formatRelativeTime-CyDg5cDD.js +0 -12
- package/dist/usePopoverRoot-DG3mlvd1.js +0 -8
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as e, B as t, E as n, M as r, S as i, X as a, a as o, at as s, b as c, c as l, d as u, f as d, h as f, l as p, m, n as h, ot as g, p as _, rt as v, s as y, st as b, z as x } from "./vue.runtime.esm-bundler-
|
|
2
|
-
import {
|
|
3
|
-
import { t as ee } from "./useI18n-
|
|
4
|
-
import { t as E } from "./useMergeTag-
|
|
5
|
-
import { F as D, Sn as O, i as k, o as A, p as j, qt as M, u as te, vn as ne, xn as re, yn as ie } from "./dist-
|
|
6
|
-
import { n as ae, t as oe } from "./dist-
|
|
1
|
+
import { A as e, B as t, E as n, M as r, S as i, X as a, a as o, at as s, b as c, c as l, d as u, f as d, h as f, l as p, m, n as h, ot as g, p as _, rt as v, s as y, st as b, z as x } from "./vue.runtime.esm-bundler-B2k01iQh.js";
|
|
2
|
+
import { O as S, T as C, r as w, w as T } from "./dist-BctFrpeA.js";
|
|
3
|
+
import { t as ee } from "./useI18n-CTs_bP9d.js";
|
|
4
|
+
import { t as E } from "./useMergeTag-e3RSY-s3.js";
|
|
5
|
+
import { F as D, Sn as O, i as k, o as A, p as j, qt as M, u as te, vn as ne, xn as re, yn as ie } from "./dist-DhKTdU52.js";
|
|
6
|
+
import { n as ae, t as oe } from "./dist-D6x1cQeh.js";
|
|
7
7
|
//#region src/extensions/FontSize.ts
|
|
8
8
|
var se = k.create({
|
|
9
9
|
name: "fontSize",
|
|
@@ -85,9 +85,9 @@ var se = k.create({
|
|
|
85
85
|
updateAttributes: { type: Function }
|
|
86
86
|
},
|
|
87
87
|
setup(r) {
|
|
88
|
-
let i = r, { syntax: c } = E(), { t: p } = ee(), h = u(() =>
|
|
88
|
+
let i = r, { syntax: c } = E(), { t: p } = ee(), h = u(() => S(i.node.attrs.value, c)), C = u(() => T(i.node.attrs.value, c)), w = a(!1), D = a(""), O = a(null), k = !1;
|
|
89
89
|
function A() {
|
|
90
|
-
D.value = i.node.attrs.value, k = !1,
|
|
90
|
+
D.value = i.node.attrs.value, k = !1, w.value = !0, n(() => {
|
|
91
91
|
O.value?.focus(), O.value?.select();
|
|
92
92
|
});
|
|
93
93
|
}
|
|
@@ -96,16 +96,16 @@ var se = k.create({
|
|
|
96
96
|
k = !0;
|
|
97
97
|
let e = D.value.trim();
|
|
98
98
|
if (!e) {
|
|
99
|
-
|
|
99
|
+
w.value = !1;
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
e !== i.node.attrs.value && i.updateAttributes({
|
|
103
103
|
value: e,
|
|
104
|
-
keyword:
|
|
105
|
-
}),
|
|
104
|
+
keyword: S(e, c) ? T(e, c) : ""
|
|
105
|
+
}), w.value = !1;
|
|
106
106
|
}
|
|
107
107
|
function M(e) {
|
|
108
|
-
e.key === "Enter" ? (e.preventDefault(), j()) : e.key === "Escape" && (
|
|
108
|
+
e.key === "Enter" ? (e.preventDefault(), j()) : e.key === "Escape" && (w.value = !1);
|
|
109
109
|
}
|
|
110
110
|
return (n, i) => (e(), _(v(oe), {
|
|
111
111
|
as: "span",
|
|
@@ -113,7 +113,7 @@ var se = k.create({
|
|
|
113
113
|
style: g(h.value ? "background-color: transparent; border: 1.5px solid color-mix(in srgb, var(--tpl-primary) 50%, transparent); color: var(--tpl-primary);" : ""),
|
|
114
114
|
contenteditable: "false"
|
|
115
115
|
}, {
|
|
116
|
-
default: x(() => [
|
|
116
|
+
default: x(() => [w.value ? t((e(), f("input", {
|
|
117
117
|
key: 0,
|
|
118
118
|
ref_key: "inputRef",
|
|
119
119
|
ref: O,
|
|
@@ -131,7 +131,7 @@ var se = k.create({
|
|
|
131
131
|
"data-tooltip": r.node.attrs.value,
|
|
132
132
|
onClick: l(A, ["stop"]),
|
|
133
133
|
onKeydown: [y(l(A, ["stop"]), ["enter"]), y(l(A, ["prevent", "stop"]), ["space"])]
|
|
134
|
-
}, b(
|
|
134
|
+
}, b(C.value), 41, ue)) : (e(), f("span", {
|
|
135
135
|
key: 2,
|
|
136
136
|
role: "button",
|
|
137
137
|
tabindex: "0",
|
|
@@ -205,12 +205,12 @@ var he = te.create({
|
|
|
205
205
|
return [{ tag: "span[data-logic-merge-tag]" }];
|
|
206
206
|
},
|
|
207
207
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
208
|
-
if (!
|
|
208
|
+
if (!S(e.attrs.value, this.options.syntax)) return [
|
|
209
209
|
"span",
|
|
210
210
|
{},
|
|
211
211
|
e.attrs.value
|
|
212
212
|
];
|
|
213
|
-
let n =
|
|
213
|
+
let n = T(e.attrs.value, this.options.syntax);
|
|
214
214
|
return [
|
|
215
215
|
"span",
|
|
216
216
|
M(t, {
|
|
@@ -234,8 +234,8 @@ var he = te.create({
|
|
|
234
234
|
find: RegExp(this.options.syntax.logic.source + "$", ""),
|
|
235
235
|
handler: ({ state: e, range: t, match: n }) => {
|
|
236
236
|
let r = n[0];
|
|
237
|
-
if (!
|
|
238
|
-
let i =
|
|
237
|
+
if (!S(r, this.options.syntax)) return;
|
|
238
|
+
let i = T(r, this.options.syntax), a = this.type.create({
|
|
239
239
|
value: r,
|
|
240
240
|
keyword: i
|
|
241
241
|
});
|
|
@@ -248,8 +248,8 @@ var he = te.create({
|
|
|
248
248
|
find: new RegExp(this.options.syntax.logic.source, "g"),
|
|
249
249
|
handler: ({ state: e, range: t, match: n }) => {
|
|
250
250
|
let r = n[0];
|
|
251
|
-
if (!
|
|
252
|
-
let i =
|
|
251
|
+
if (!S(r, this.options.syntax)) return;
|
|
252
|
+
let i = T(r, this.options.syntax), a = this.type.create({
|
|
253
253
|
value: r,
|
|
254
254
|
keyword: i
|
|
255
255
|
});
|
|
@@ -364,7 +364,7 @@ var he = te.create({
|
|
|
364
364
|
return [{ tag: "span[data-merge-tag]" }];
|
|
365
365
|
},
|
|
366
366
|
renderHTML({ node: e, HTMLAttributes: t }) {
|
|
367
|
-
let n =
|
|
367
|
+
let n = C(e.attrs.value, this.options.mergeTags);
|
|
368
368
|
return [
|
|
369
369
|
"span",
|
|
370
370
|
M(t, {
|
|
@@ -396,7 +396,7 @@ var he = te.create({
|
|
|
396
396
|
return [new A({
|
|
397
397
|
find: RegExp(this.options.syntax.value.source + "$", ""),
|
|
398
398
|
handler: ({ state: e, range: t, match: n }) => {
|
|
399
|
-
let r = n[0], i =
|
|
399
|
+
let r = n[0], i = C(r, this.options.mergeTags), a = this.type.create({
|
|
400
400
|
label: i,
|
|
401
401
|
value: r
|
|
402
402
|
});
|
|
@@ -408,7 +408,7 @@ var he = te.create({
|
|
|
408
408
|
return [new j({
|
|
409
409
|
find: new RegExp(this.options.syntax.value.source, "g"),
|
|
410
410
|
handler: ({ state: e, range: t, match: n }) => {
|
|
411
|
-
let r = n[0], i =
|
|
411
|
+
let r = n[0], i = C(r, this.options.mergeTags), a = this.type.create({
|
|
412
412
|
label: i,
|
|
413
413
|
value: r
|
|
414
414
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function e(e, t, n, r) {
|
|
2
|
+
let i = new Date(e).getTime();
|
|
3
|
+
if (Number.isNaN(i)) return null;
|
|
4
|
+
let a = Date.now() - i;
|
|
5
|
+
if (a < -6e4) return null;
|
|
6
|
+
let o = Math.floor(a / 6e4), s = Math.floor(a / 36e5), c = Math.floor(a / 864e5);
|
|
7
|
+
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -147,6 +147,22 @@ export declare interface TemplaticalCloudEditorConfig {
|
|
|
147
147
|
* Cloud white-label plans hide the footer regardless of this setting.
|
|
148
148
|
*/
|
|
149
149
|
branding?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Show a "use a larger screen" notice instead of the editor chrome on
|
|
152
|
+
* viewports narrower than ~768px. Defaults to `true`.
|
|
153
|
+
*
|
|
154
|
+
* The drag-and-drop editor is a desktop-class tool — the block palette,
|
|
155
|
+
* canvas, and properties panel can't lay out usably on a phone, and touch
|
|
156
|
+
* dragging is impractical. Rather than render a broken, cramped layout, the
|
|
157
|
+
* editor shows a clear message below the breakpoint.
|
|
158
|
+
*
|
|
159
|
+
* Set to `false` if you handle small screens yourself (e.g. you embed the
|
|
160
|
+
* editor in a deliberately narrow desktop pane). The check is viewport-based,
|
|
161
|
+
* so it targets actual small devices, not narrow containers on a wide screen.
|
|
162
|
+
*
|
|
163
|
+
* @default true
|
|
164
|
+
*/
|
|
165
|
+
smallScreenNotice?: boolean;
|
|
150
166
|
ai?: AiConfig | false;
|
|
151
167
|
commenting?: boolean;
|
|
152
168
|
collaboration?: CollaborationConfig;
|
|
@@ -280,6 +296,22 @@ export declare interface TemplaticalEditorConfig {
|
|
|
280
296
|
* Set to `false` to hide the footer (no attribution required by the license).
|
|
281
297
|
*/
|
|
282
298
|
branding?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* Show a "use a larger screen" notice instead of the editor chrome on
|
|
301
|
+
* viewports narrower than ~768px. Defaults to `true`.
|
|
302
|
+
*
|
|
303
|
+
* The drag-and-drop editor is a desktop-class tool — the block palette,
|
|
304
|
+
* canvas, and properties panel can't lay out usably on a phone, and touch
|
|
305
|
+
* dragging is impractical. Rather than render a broken, cramped layout, the
|
|
306
|
+
* editor shows a clear message below the breakpoint.
|
|
307
|
+
*
|
|
308
|
+
* Set to `false` if you handle small screens yourself (e.g. you embed the
|
|
309
|
+
* editor in a deliberately narrow desktop pane). The check is viewport-based,
|
|
310
|
+
* so it targets actual small devices, not narrow containers on a wide screen.
|
|
311
|
+
*
|
|
312
|
+
* @default true
|
|
313
|
+
*/
|
|
314
|
+
smallScreenNotice?: boolean;
|
|
283
315
|
/**
|
|
284
316
|
* Template linter (`@templatical/quality`) configuration. Runs every
|
|
285
317
|
* linter exported by the package (accessibility + structure).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as e } from "./vue.runtime.esm-bundler-
|
|
1
|
+
import { w as e } from "./vue.runtime.esm-bundler-B2k01iQh.js";
|
|
2
2
|
//#region src/keys.ts
|
|
3
3
|
var t = Symbol("translations"), n = Symbol("editor"), r = Symbol("history"), i = Symbol("blockActions"), a = Symbol("conditionPreview"), o = Symbol("fontsManager"), s = Symbol("themeStyles"), c = Symbol("tplUiTheme"), l = Symbol("blockDefaults"), u = Symbol("blockRegistry"), d = Symbol("customBlockDefinitions"), f = Symbol("paletteBlocks"), p = Symbol("customBlockStylesheets"), m = Symbol("mergeTags"), h = Symbol("mergeTagSyntax"), g = Symbol("onRequestMergeTag"), _ = Symbol("mergeTagAutocomplete"), v = Symbol("mergeTagPicker"), y = Symbol("onRequestMedia"), b = Symbol("displayConditions"), x = Symbol("allowCustomConditions"), S = Symbol("capabilities"), C = Symbol("keyboardReorder"), w = Symbol("templateLint"), T = Symbol("editorRoot"), E = Symbol("popoverRoot"), D = Symbol("authManager"), O = Symbol("aiConfig"), k = Symbol("comments"), A = Symbol("savedModulesHeadless"), j = Symbol("scoring"), M = Symbol("cloudTranslations");
|
|
4
4
|
function N(t, n) {
|