@templatical/editor 0.60.4 → 0.61.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/{AiChatPanel-CjUnhJGB.js → AiChatPanel-DF5TvO9H.js} +166 -166
- package/dist/{AiPanels-DwI9KjjI.js → AiPanels-zRqC5DIP.js} +1 -1
- package/dist/{AiRewriteMenu-Bh1cIX8F.js → AiRewriteMenu-CmZKTO-O.js} +1 -1
- package/dist/{BlockPreviewCanvas-C_N6f_FS.js → BlockPreviewCanvas-knSyWaCP.js} +2 -2
- package/dist/{CloudPanels-BS49EsuN.js → CloudPanels-BbHJHZri.js} +1 -1
- package/dist/{CommentsPanel-BSLk23YP.js → CommentsPanel-BMYvXRKK.js} +1 -1
- package/dist/{CommentsSidebar-L-DgP_kM.js → CommentsSidebar-_8at1Rug.js} +139 -139
- package/dist/{CountdownToolbar-B6erqTbz.js → CountdownToolbar-BprSuPJk.js} +2 -2
- package/dist/{LanguageMenu-DsfCHdVi.js → LanguageMenu-CkGqLYjf.js} +122 -122
- package/dist/{LocaleNotices-BxR3xcLl.js → LocaleNotices-D0be8ovO.js} +8 -8
- package/dist/{MergeTagTextarea-q6eeDD2l.js → MergeTagTextarea-BjHlamJv.js} +12 -12
- package/dist/{ParagraphEditor-25SNi_8O.js → ParagraphEditor-Ctu4fSsl.js} +2 -2
- package/dist/{RestoreVersionDialog-BXtCxJF1.js → RestoreVersionDialog-DvZoTJVa.js} +1 -1
- package/dist/{SaveBlockDialog-k1lxEBVW.js → SaveBlockDialog-DHfT-Tpx.js} +3 -3
- package/dist/{SavedBlocksBrowserModal-CV-8mDPj.js → SavedBlocksBrowserModal-BjJuuXQv.js} +3 -3
- package/dist/{SavedBlocksPanels-9nZj1jG_.js → SavedBlocksPanels-D6eiMQZ3.js} +1 -1
- package/dist/{SavedBlocksPickBar-Dy6NN9tm.js → SavedBlocksPickBar-BkgCDSXe.js} +1 -1
- package/dist/{TemplateSettings-DWxdUdM5.js → TemplateSettings-DQAbNsiS.js} +1 -1
- package/dist/{TestEmailModal-BAkkZTaZ.js → TestEmailModal-m_AEa36T.js} +3 -3
- package/dist/{TestEmailPanel-ccT2E3em.js → TestEmailPanel-OApkuaVd.js} +1 -1
- package/dist/{TitleEditor-B19dYnER.js → TitleEditor-Cwdtfk15.js} +1 -1
- package/dist/{Toolbar-DxlZq_36.js → Toolbar-D_T55elL.js} +359 -359
- package/dist/{TplModal-Bp2qPmQw.js → TplModal-2MKm5y6r.js} +1 -1
- package/dist/{VersionHistoryPanels-wAVDmhnP.js → VersionHistoryPanels-CCM0IQBg.js} +1 -1
- package/dist/{WrapperBlock-DHnD6Exl.js → WrapperBlock-BZl10HLy.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiChatPanel-DTYmFRwb.js → AiChatPanel-BYAsgmoC.js} +146 -146
- package/dist/cdn/chunks/AiChatPanel-BYAsgmoC.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js → AiPanels-MY_YPls8.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BW9ze-6O.js.map → AiPanels-MY_YPls8.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js → AiRewriteMenu-BSePiXe_.js} +2 -2
- package/dist/cdn/chunks/{AiRewriteMenu-B9b92d0R.js.map → AiRewriteMenu-BSePiXe_.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js → BlockPreviewCanvas-B153A3hu.js} +3 -3
- package/dist/cdn/chunks/{BlockPreviewCanvas-CLid1x0c.js.map → BlockPreviewCanvas-B153A3hu.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js → CloudPanels-Bv26_Sd8.js} +2 -2
- package/dist/cdn/chunks/{CloudPanels-D4dslsyk.js.map → CloudPanels-Bv26_Sd8.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js → CommentsPanel-R27fqh9O.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BynxXJ-F.js.map → CommentsPanel-R27fqh9O.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-C81N5Hwr.js → CommentsSidebar-BEiOQ_zT.js} +133 -133
- package/dist/cdn/chunks/CommentsSidebar-BEiOQ_zT.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js → CountdownToolbar-DOhXnbsq.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-f1aqEba0.js.map → CountdownToolbar-DOhXnbsq.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-CJp7XdfG.js → LanguageMenu-B6kt8SgX.js} +104 -104
- package/dist/cdn/chunks/LanguageMenu-B6kt8SgX.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-D5vZzcUj.js → LocaleNotices-Bleg4gTu.js} +9 -9
- package/dist/cdn/chunks/LocaleNotices-Bleg4gTu.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-DMXZgGUF.js → MergeTagTextarea-DGDv-pdn.js} +13 -13
- package/dist/cdn/chunks/MergeTagTextarea-DGDv-pdn.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js → ParagraphEditor-D0q36Myd.js} +3 -3
- package/dist/cdn/chunks/{ParagraphEditor-Ce7_Ix0K.js.map → ParagraphEditor-D0q36Myd.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js → RestoreVersionDialog-CJggFdbi.js} +2 -2
- package/dist/cdn/chunks/{RestoreVersionDialog-JmMLhN6G.js.map → RestoreVersionDialog-CJggFdbi.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js → SaveBlockDialog-BzES5tqd.js} +4 -4
- package/dist/cdn/chunks/{SaveBlockDialog-B-2amBN5.js.map → SaveBlockDialog-BzES5tqd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js → SavedBlocksBrowserModal-CLNcZcLd.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BR6fQ222.js.map → SavedBlocksBrowserModal-CLNcZcLd.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js → SavedBlocksPanels-R0W9LElD.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DVNNshfr.js.map → SavedBlocksPanels-R0W9LElD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js → SavedBlocksPickBar-JNi5Rx4V.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPickBar-BfxLHLQV.js.map → SavedBlocksPickBar-JNi5Rx4V.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js → TemplateSettings-C5wsNcgX.js} +2 -2
- package/dist/cdn/chunks/{TemplateSettings-TMFrRV2c.js.map → TemplateSettings-C5wsNcgX.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js → TestEmailModal-BxIAwjww.js} +4 -4
- package/dist/cdn/chunks/{TestEmailModal-tTU35BKZ.js.map → TestEmailModal-BxIAwjww.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js → TestEmailPanel-B8BsWXjE.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BNJBVwx0.js.map → TestEmailPanel-B8BsWXjE.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js → TitleEditor-DhcI1aRS.js} +2 -2
- package/dist/cdn/chunks/{TitleEditor-BbscL_C1.js.map → TitleEditor-DhcI1aRS.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BxzyS69X.js → Toolbar-Ch3h2BUs.js} +194 -194
- package/dist/cdn/chunks/Toolbar-Ch3h2BUs.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js → TplModal-CPOqOxVf.js} +2 -2
- package/dist/cdn/chunks/{TplModal-Bzhc_l8y.js.map → TplModal-CPOqOxVf.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js → VersionHistoryPanels-CVrXHYxT.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-Bbb1xUJs.js.map → VersionHistoryPanels-CVrXHYxT.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js → WrapperBlock-B8SJ7Q4w.js} +2 -2
- package/dist/cdn/chunks/{WrapperBlock-BboijK5T.js.map → WrapperBlock-B8SJ7Q4w.js.map} +1 -1
- package/dist/cdn/chunks/{composables-C77dGo-I.js → composables-CKXPwWo9.js} +148 -148
- package/dist/cdn/chunks/composables-CKXPwWo9.js.map +1 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js.map +1 -1
- package/dist/cdn/chunks/{src-1MSPRtI8.js → src-Bk1LF1np.js} +2 -2
- package/dist/cdn/chunks/{src-1MSPRtI8.js.map → src-Bk1LF1np.js.map} +1 -1
- package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js +41 -0
- package/dist/cdn/chunks/useLanguageName-DDhdVpqh.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +58 -56
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-Bu_OmyjT.js → composables-26aR45W3.js} +1222 -1222
- package/dist/index.d.ts +5 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +57 -55
- package/dist/useLanguageName-CEFzafHB.js +39 -0
- package/package.json +8 -8
- package/dist/cdn/chunks/AiChatPanel-DTYmFRwb.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-C81N5Hwr.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-CJp7XdfG.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-D5vZzcUj.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-DMXZgGUF.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BxzyS69X.js.map +0 -1
- package/dist/cdn/chunks/composables-C77dGo-I.js.map +0 -1
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +0 -12
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +0 -1
- package/dist/languageName-DEEOhDWI.js +0 -10
|
@@ -2,21 +2,21 @@ import { B as e, Ft as t, M as n, Mt as r, O as i, P as a, U as ee, _ as o, c as
|
|
|
2
2
|
import { t as te } from "./dist-B6ptxfPo.js";
|
|
3
3
|
import { t as v } from "./triangle-exclamation-point-Bi7ZKTZU.js";
|
|
4
4
|
import { t as y } from "./createLucideIcon-BKeRiObH.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { Ft as
|
|
5
|
+
import { t as b } from "./check-8ZykoWzl.js";
|
|
6
|
+
import { t as ne } from "./chevron-down-D_CUJHwi.js";
|
|
7
|
+
import { t as re } from "./chevron-right-B2WYkQtG.js";
|
|
8
|
+
import { t as ie } from "./plus-PzFvtj-Z.js";
|
|
9
|
+
import { t as ae } from "./trash-CJsobpw0.js";
|
|
10
|
+
import { Ft as oe, It as se, at as ce, ft as le, ot as ue } from "./dist-DX_IQgcU.js";
|
|
11
11
|
import { t as de } from "./useI18n-Cx9W7OWb.js";
|
|
12
12
|
import { t as fe } from "./useLocalizedDisplay-DfiE-KjV.js";
|
|
13
13
|
import { E as pe, h as me, st as he, t as ge } from "./keys-B4DimcgX.js";
|
|
14
14
|
import { t as x } from "./plural-CyxrJXL1.js";
|
|
15
|
-
import { t as
|
|
16
|
-
import { C as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
var
|
|
15
|
+
import { t as _e } from "./useLanguageName-CEFzafHB.js";
|
|
16
|
+
import { C as ve, b as ye, f as be, u as xe, w as Se } from "./styleConstants-Br6CIRoS.js";
|
|
17
|
+
import { t as Ce } from "./TplModal-2MKm5y6r.js";
|
|
18
|
+
import { t as S } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
19
|
+
var we = y({
|
|
20
20
|
name: "arrow-up-to-line",
|
|
21
21
|
size: 24,
|
|
22
22
|
node: [
|
|
@@ -33,7 +33,7 @@ var Ce = y({
|
|
|
33
33
|
key: "1akyts"
|
|
34
34
|
}]
|
|
35
35
|
]
|
|
36
|
-
}),
|
|
36
|
+
}), Te = y({
|
|
37
37
|
name: "ellipsis",
|
|
38
38
|
size: 24,
|
|
39
39
|
node: [
|
|
@@ -57,87 +57,87 @@ var Ce = y({
|
|
|
57
57
|
}]
|
|
58
58
|
],
|
|
59
59
|
aliases: ["more-horizontal"]
|
|
60
|
-
}),
|
|
60
|
+
}), Ee = [
|
|
61
61
|
"aria-expanded",
|
|
62
62
|
"title",
|
|
63
63
|
"aria-label"
|
|
64
|
-
],
|
|
64
|
+
], De = { class: "tpl-language-name" }, Oe = {
|
|
65
65
|
class: "tpl-language-tag tpl:truncate",
|
|
66
66
|
"aria-hidden": "true"
|
|
67
|
-
},
|
|
67
|
+
}, ke = { class: "tpl-language-count tpl:shrink-0 tpl:tabular-nums" }, Ae = ["aria-label"], je = { class: "tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Me = { class: "tpl:max-h-64 tpl:overflow-y-auto" }, Ne = ["data-active"], Pe = [
|
|
68
68
|
"aria-checked",
|
|
69
69
|
"data-testid",
|
|
70
70
|
"onClick"
|
|
71
|
-
],
|
|
71
|
+
], Fe = { class: "tpl:flex tpl:w-3 tpl:shrink-0" }, Ie = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-0.5" }, Le = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Re = ["data-testid"], ze = [
|
|
72
72
|
"data-testid",
|
|
73
73
|
"aria-expanded",
|
|
74
74
|
"aria-label",
|
|
75
75
|
"onClick"
|
|
76
|
-
],
|
|
76
|
+
], Be = ["aria-label"], Ve = [
|
|
77
77
|
"data-testid",
|
|
78
78
|
"aria-disabled",
|
|
79
79
|
"aria-label",
|
|
80
80
|
"aria-describedby",
|
|
81
81
|
"onClick"
|
|
82
|
-
],
|
|
82
|
+
], He = { class: "tpl:flex tpl:min-w-0 tpl:flex-col tpl:gap-1" }, Ue = ["data-testid", "onClick"], We = {
|
|
83
83
|
key: 0,
|
|
84
84
|
class: "tpl:relative tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
85
|
-
},
|
|
85
|
+
}, Ge = ["aria-expanded"], Ke = ["aria-label"], qe = ["data-testid", "onClick"], Je = ["aria-label"], Ye = { class: "tpl:m-0 tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Xe = {
|
|
86
86
|
key: 0,
|
|
87
87
|
class: "tpl:mb-4 tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
88
|
-
},
|
|
88
|
+
}, Ze = {
|
|
89
89
|
key: 1,
|
|
90
90
|
class: "tpl:mb-4 tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
91
|
-
},
|
|
91
|
+
}, Qe = {
|
|
92
92
|
key: 2,
|
|
93
93
|
role: "alert",
|
|
94
94
|
"data-testid": "language-default-error",
|
|
95
95
|
class: "tpl:mb-4 tpl:flex tpl:items-start tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-danger)]"
|
|
96
|
-
},
|
|
96
|
+
}, $e = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, et = ["data-testid"], tt = ["data-testid", "disabled"], C = "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:border-0 tpl:bg-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50", w = "tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)] tpl:shadow-[var(--tpl-shadow-md)]", T = /*#__PURE__*/ S(/* @__PURE__ */ _({
|
|
97
97
|
__name: "LanguageMenu",
|
|
98
98
|
props: {
|
|
99
99
|
editor: {},
|
|
100
100
|
locales: {}
|
|
101
101
|
},
|
|
102
102
|
setup(_) {
|
|
103
|
-
let y = _, { t:
|
|
103
|
+
let y = _, S = _e(y.editor), { t: T, format: E } = de(), D = g(he, void 0) ?? "en", nt = g(pe, null), O = g(me, []), k = u(null), A = u(null), j = `tpl-language-reason-${le()}`, M = u(!1), N = u(null), P = u(null), F = u(null), I = u(null), L = u(null), R = s(() => ue(y.editor.content.value)), z = s(() => y.editor.activeLocale?.value ?? R.value), B = s(() => y.editor.content.value.settings.locales ?? []), V = s(() => y.locales.filter((e) => e !== R.value && !B.value.includes(e))), H = s(() => z.value === R.value || y.locales.includes(z.value)), U = g(ge, null) ?? fe(y.editor, O), W = s(() => M.value ? [R.value, ...B.value].map((e) => ({
|
|
104
104
|
locale: e,
|
|
105
|
-
coverage: e === R.value ? null : e === z.value ? U.value :
|
|
106
|
-
})) : []),
|
|
105
|
+
coverage: e === R.value ? null : e === z.value ? U.value : oe(y.editor.content.value, e, O)
|
|
106
|
+
})) : []), rt = s(() => N.value && B.value.includes(N.value) && H.value && y.locales.includes(N.value) ? se(y.editor.content.value, N.value) : []), G = s(() => y.locales.includes(R.value)), K = s(() => rt.value.length > 0 || !G.value), q = s(() => (U.value?.missing.length ?? 0) + (U.value?.stale.length ?? 0)), it = s(() => q.value ? E(T.localization.gapTooltip, {
|
|
107
107
|
missing: U.value.missing.length,
|
|
108
108
|
stale: U.value.stale.length
|
|
109
|
-
}) : S(z.value)),
|
|
110
|
-
function
|
|
109
|
+
}) : S(z.value)), at = s(() => q.value ? `${S(z.value)} ${q.value} (${z.value}), ${it.value}` : `${S(z.value)} (${z.value})`);
|
|
110
|
+
function ot(e) {
|
|
111
111
|
let t = [];
|
|
112
|
-
return e.missing.length && t.push(x(
|
|
112
|
+
return e.missing.length && t.push(x(T.localization.missingCount, e.missing.length, D)), e.stale.length && t.push(x(T.localization.staleCount, e.stale.length, D)), t.join(" · ") || T.localization.complete;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function J() {
|
|
115
115
|
M.value = !1, N.value = null, i(() => A.value?.focus());
|
|
116
116
|
}
|
|
117
|
-
async function
|
|
118
|
-
M.value ?
|
|
117
|
+
async function st() {
|
|
118
|
+
M.value ? J() : (M.value = !0, await i(), k.value?.querySelector("[role=\"menuitemradio\"]")?.focus());
|
|
119
119
|
}
|
|
120
|
-
async function
|
|
120
|
+
async function Y(e) {
|
|
121
121
|
N.value = N.value === e ? null : e, await i(), k.value?.querySelector("[data-language-submenu] [role=\"menuitem\"]:not(:disabled)")?.focus();
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function ct() {
|
|
124
124
|
let e = N.value;
|
|
125
125
|
N.value = null, k.value?.querySelector(`[data-testid="${e === "add" ? "language-add" : `language-actions-${e}`}"]`)?.focus();
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function lt(e) {
|
|
128
128
|
let t = e.target;
|
|
129
129
|
if (t.closest("[role=\"dialog\"]")) return;
|
|
130
130
|
if (e.key === "Escape" || e.key === "ArrowLeft" && N.value) {
|
|
131
|
-
e.preventDefault(), e.stopPropagation(), N.value ?
|
|
131
|
+
e.preventDefault(), e.stopPropagation(), N.value ? ct() : J();
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
if (t === A.value && ["ArrowDown", "ArrowUp"].includes(e.key)) {
|
|
135
|
-
e.preventDefault(), M.value ||
|
|
135
|
+
e.preventDefault(), M.value || st();
|
|
136
136
|
return;
|
|
137
137
|
}
|
|
138
138
|
if (e.key === "ArrowRight" && !t.closest("[data-language-submenu]")) {
|
|
139
139
|
let n = t.dataset.testid ?? "", r = n.replace(/^language-(option|actions)-/, "");
|
|
140
|
-
(n === "language-add" || r !== R.value && H.value && y.locales.includes(r)) && (e.preventDefault(),
|
|
140
|
+
(n === "language-add" || r !== R.value && H.value && y.locales.includes(r)) && (e.preventDefault(), Y(n === "language-add" ? "add" : r));
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
143
|
if (![
|
|
@@ -150,31 +150,31 @@ var Ce = y({
|
|
|
150
150
|
let n = t.closest("[role=\"menu\"]"), r = Array.from(n?.querySelectorAll("[role^=\"menuitem\"]:not(:disabled)") ?? []).filter((e) => e.closest("[role=\"menu\"]") === n), i = r.indexOf(t);
|
|
151
151
|
r[e.key === "Home" ? 0 : e.key === "End" ? r.length - 1 : (i + (e.key === "ArrowDown" ? 1 : -1) + r.length) % r.length]?.focus();
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
y.editor.setActiveLocale?.(e === R.value ? null : e),
|
|
153
|
+
function ut(e) {
|
|
154
|
+
y.editor.setActiveLocale?.(e === R.value ? null : e), J();
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
H.value && V.value.includes(e) && (y.editor.addLocale?.(e),
|
|
156
|
+
function dt(e) {
|
|
157
|
+
H.value && V.value.includes(e) && (y.editor.addLocale?.(e), J());
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function X() {
|
|
160
160
|
I.value = null, L.value = {
|
|
161
161
|
templateId: y.editor.state.template?.id ?? null,
|
|
162
162
|
loadVersion: y.editor.loadVersion?.value
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function ft() {
|
|
166
166
|
return L.value !== null && L.value.templateId === (y.editor.state.template?.id ?? null) && L.value.loadVersion === y.editor.loadVersion?.value;
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
|
|
168
|
+
function pt(e) {
|
|
169
|
+
X(), P.value = e, N.value = null;
|
|
170
170
|
}
|
|
171
171
|
function Z(e) {
|
|
172
|
-
return H.value && B.value.includes(e) && y.locales.includes(e) && G.value &&
|
|
172
|
+
return H.value && B.value.includes(e) && y.locales.includes(e) && G.value && se(y.editor.content.value, e).length === 0;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
Z(e) && (
|
|
174
|
+
function mt(e) {
|
|
175
|
+
Z(e) && (X(), F.value = { locale: e }, N.value = null);
|
|
176
176
|
}
|
|
177
|
-
let
|
|
177
|
+
let ht = s(() => F.value ? ce(y.editor.content.value, F.value.locale, O).length : 0), Q = s(() => F.value ? E(T.localization.makeDefaultConfirmation, { language: S(F.value.locale) }) : E(T.localization.removeConfirmation, { language: S(P.value ?? R.value) }));
|
|
178
178
|
function $() {
|
|
179
179
|
let e = F.value?.locale ?? P.value;
|
|
180
180
|
L.value = null, I.value = null, F.value = null, P.value = null, i(() => {
|
|
@@ -186,36 +186,36 @@ var Ce = y({
|
|
|
186
186
|
k.value?.querySelector(`[data-testid="${t}"]`)?.focus();
|
|
187
187
|
});
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
if (!
|
|
189
|
+
function gt() {
|
|
190
|
+
if (!ft()) $(), J();
|
|
191
191
|
else if (H.value) {
|
|
192
192
|
if (F.value) {
|
|
193
193
|
let e = F.value.locale;
|
|
194
194
|
if (!Z(e)) return;
|
|
195
|
-
let t =
|
|
195
|
+
let t = nt?.setDefaultLocale(e);
|
|
196
196
|
if (!t) return;
|
|
197
197
|
if (!t.applied) {
|
|
198
|
-
I.value = E(
|
|
198
|
+
I.value = E(T.localization.defaultRefused, {
|
|
199
199
|
language: S(e),
|
|
200
|
-
reason: t.error.code === "locked_by_others" || t.error.code === "lock_held" ?
|
|
200
|
+
reason: t.error.code === "locked_by_others" || t.error.code === "lock_held" ? T.localization.defaultLockedReason : t.error.message
|
|
201
201
|
});
|
|
202
202
|
return;
|
|
203
203
|
}
|
|
204
204
|
} else P.value && y.locales.includes(P.value) && y.editor.removeLocale?.(P.value);
|
|
205
|
-
$(),
|
|
205
|
+
$(), J();
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
return e([() => y.editor.state.template?.id ?? null, () => y.editor.loadVersion?.value], () => {
|
|
209
|
-
(M.value || L.value !== null) && ($(),
|
|
209
|
+
(M.value || L.value !== null) && ($(), J());
|
|
210
210
|
}, { flush: "sync" }), e(() => F.value !== null && !Z(F.value.locale), (e) => {
|
|
211
|
-
e && ($(),
|
|
211
|
+
e && ($(), J());
|
|
212
212
|
}), te(k, () => {
|
|
213
213
|
M.value = !1, N.value = null;
|
|
214
214
|
}), (e, i) => (n(), d("div", {
|
|
215
215
|
ref_key: "root",
|
|
216
216
|
ref: k,
|
|
217
217
|
class: "tpl-language-control tpl:relative tpl:min-w-0 tpl:shrink-0",
|
|
218
|
-
onKeydown:
|
|
218
|
+
onKeydown: lt
|
|
219
219
|
}, [
|
|
220
220
|
p("button", {
|
|
221
221
|
ref_key: "trigger",
|
|
@@ -224,32 +224,32 @@ var Ce = y({
|
|
|
224
224
|
"data-testid": "language-menu",
|
|
225
225
|
"aria-haspopup": "menu",
|
|
226
226
|
"aria-expanded": M.value,
|
|
227
|
-
title:
|
|
228
|
-
"aria-label":
|
|
229
|
-
class: r([c(
|
|
230
|
-
onClick:
|
|
227
|
+
title: it.value,
|
|
228
|
+
"aria-label": at.value,
|
|
229
|
+
class: r([c(Se), "tpl-language-trigger"]),
|
|
230
|
+
onClick: st
|
|
231
231
|
}, [
|
|
232
|
-
p("span",
|
|
233
|
-
p("span",
|
|
232
|
+
p("span", De, t(c(S)(z.value)), 1),
|
|
233
|
+
p("span", Oe, t(z.value), 1),
|
|
234
234
|
q.value ? (n(), d(m, { key: 0 }, [o(c(v), {
|
|
235
235
|
size: 12,
|
|
236
236
|
"aria-hidden": "true",
|
|
237
237
|
class: "tpl:shrink-0 tpl:text-[var(--tpl-warning)]"
|
|
238
|
-
}), p("span",
|
|
239
|
-
o(c(
|
|
238
|
+
}), p("span", ke, t(q.value), 1)], 64)) : l("", !0),
|
|
239
|
+
o(c(ne), {
|
|
240
240
|
size: 12,
|
|
241
241
|
"aria-hidden": "true",
|
|
242
242
|
class: "tpl-language-chevron tpl:shrink-0"
|
|
243
243
|
})
|
|
244
|
-
], 10,
|
|
244
|
+
], 10, Ee),
|
|
245
245
|
M.value ? (n(), d("div", {
|
|
246
246
|
key: 0,
|
|
247
247
|
role: "menu",
|
|
248
|
-
"aria-label": c(
|
|
249
|
-
class: r([
|
|
248
|
+
"aria-label": c(T).localization.languages,
|
|
249
|
+
class: r([w, "tpl:absolute tpl:left-0 tpl:top-full tpl:z-50 tpl:mt-2 tpl:w-72"])
|
|
250
250
|
}, [
|
|
251
|
-
p("div",
|
|
252
|
-
p("div",
|
|
251
|
+
p("div", je, t(c(T).localization.languages), 1),
|
|
252
|
+
p("div", Me, [(n(!0), d(m, null, a(W.value, (e) => (n(), d("div", {
|
|
253
253
|
key: e.locale,
|
|
254
254
|
class: "tpl-language-row tpl:flex tpl:items-center",
|
|
255
255
|
"data-active": z.value === e.locale
|
|
@@ -258,16 +258,16 @@ var Ce = y({
|
|
|
258
258
|
role: "menuitemradio",
|
|
259
259
|
"aria-checked": z.value === e.locale,
|
|
260
260
|
"data-testid": `language-option-${e.locale}`,
|
|
261
|
-
class: r(
|
|
262
|
-
onClick: (t) =>
|
|
263
|
-
}, [p("span",
|
|
261
|
+
class: r(C),
|
|
262
|
+
onClick: (t) => ut(e.locale)
|
|
263
|
+
}, [p("span", Fe, [z.value === e.locale ? (n(), h(c(b), {
|
|
264
264
|
key: 0,
|
|
265
265
|
size: 12,
|
|
266
266
|
"aria-hidden": "true"
|
|
267
|
-
})) : l("", !0)]), p("span",
|
|
267
|
+
})) : l("", !0)]), p("span", Ie, [p("span", Le, [p("span", null, t(c(S)(e.locale)), 1), e.locale === R.value || !_.locales.includes(e.locale) ? (n(), d("span", {
|
|
268
268
|
key: 0,
|
|
269
|
-
class: r(["tpl-language-pill", c(
|
|
270
|
-
}, t(e.locale === R.value ? c(
|
|
269
|
+
class: r(["tpl-language-pill", c(xe)])
|
|
270
|
+
}, t(e.locale === R.value ? c(T).localization.default : c(T).localization.notEnabled), 3)) : l("", !0)]), e.coverage ? (n(), d("span", {
|
|
271
271
|
key: 0,
|
|
272
272
|
"data-testid": `language-status-${e.locale}`,
|
|
273
273
|
class: "tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
@@ -276,92 +276,92 @@ var Ce = y({
|
|
|
276
276
|
size: 10,
|
|
277
277
|
"aria-hidden": "true",
|
|
278
278
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
279
|
-
})) : (n(), h(c(
|
|
279
|
+
})) : (n(), h(c(b), {
|
|
280
280
|
key: 1,
|
|
281
281
|
size: 10,
|
|
282
282
|
"aria-hidden": "true",
|
|
283
283
|
class: "tpl:text-[var(--tpl-success)]"
|
|
284
|
-
})), f(" " + t(
|
|
284
|
+
})), f(" " + t(ot(e.coverage)), 1)], 8, Re)) : l("", !0)])], 8, Pe), e.locale !== R.value && H.value && _.locales.includes(e.locale) ? (n(), d("button", {
|
|
285
285
|
key: 0,
|
|
286
286
|
type: "button",
|
|
287
287
|
"data-testid": `language-actions-${e.locale}`,
|
|
288
288
|
"aria-haspopup": "menu",
|
|
289
289
|
"aria-expanded": N.value === e.locale,
|
|
290
|
-
"aria-label": c(E)(c(
|
|
290
|
+
"aria-label": c(E)(c(T).localization.moreActions, { language: c(S)(e.locale) }),
|
|
291
291
|
class: "tpl-language-actions tpl:mr-2 tpl:flex tpl:size-7 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-[var(--tpl-radius-sm)] tpl:border-0 tpl:bg-transparent tpl:text-[var(--tpl-text-muted)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)]",
|
|
292
|
-
onClick: (t) =>
|
|
293
|
-
}, [o(c(
|
|
292
|
+
onClick: (t) => Y(e.locale)
|
|
293
|
+
}, [o(c(Te), {
|
|
294
294
|
size: 14,
|
|
295
295
|
"aria-hidden": "true"
|
|
296
|
-
})], 8,
|
|
296
|
+
})], 8, ze)) : l("", !0)], 8, Ne))), 128))]),
|
|
297
297
|
(n(!0), d(m, null, a(W.value.filter((e) => e.locale === N.value && H.value && _.locales.includes(e.locale)), (e) => (n(), d("div", {
|
|
298
298
|
key: e.locale,
|
|
299
299
|
role: "menu",
|
|
300
300
|
"data-language-submenu": "",
|
|
301
|
-
"aria-label": c(E)(c(
|
|
302
|
-
class: r([
|
|
301
|
+
"aria-label": c(E)(c(T).localization.moreActions, { language: c(S)(e.locale) }),
|
|
302
|
+
class: r([w, "tpl-language-submenu tpl:absolute tpl:left-full tpl:top-0 tpl:ml-1 tpl:w-64 tpl:overflow-hidden"])
|
|
303
303
|
}, [p("button", {
|
|
304
304
|
type: "button",
|
|
305
305
|
role: "menuitem",
|
|
306
306
|
"data-testid": `language-make-default-${e.locale}`,
|
|
307
|
-
class: r(
|
|
307
|
+
class: r(C),
|
|
308
308
|
"aria-disabled": K.value,
|
|
309
|
-
"aria-label": c(
|
|
309
|
+
"aria-label": c(T).localization.makeDefaultLanguage,
|
|
310
310
|
"aria-describedby": K.value ? j : void 0,
|
|
311
|
-
onClick: (t) =>
|
|
312
|
-
}, [o(c(
|
|
311
|
+
onClick: (t) => mt(e.locale)
|
|
312
|
+
}, [o(c(we), {
|
|
313
313
|
size: 14,
|
|
314
314
|
"aria-hidden": "true",
|
|
315
315
|
class: "tpl:shrink-0"
|
|
316
|
-
}), p("span",
|
|
316
|
+
}), p("span", He, [p("span", null, t(c(T).localization.makeDefaultLanguage), 1), K.value ? (n(), d("span", {
|
|
317
317
|
key: 0,
|
|
318
318
|
id: j,
|
|
319
319
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-muted)]"
|
|
320
|
-
}, t(G.value ? c(x)(c(
|
|
320
|
+
}, t(G.value ? c(x)(c(T).localization.hiddenBeforeDefault, rt.value.length, c(D), { language: c(S)(e.locale) }) : c(E)(c(T).localization.defaultNotEnabled, { default: c(S)(R.value) })), 1)) : l("", !0)])], 8, Ve), p("button", {
|
|
321
321
|
type: "button",
|
|
322
322
|
role: "menuitem",
|
|
323
323
|
"data-testid": `language-remove-${e.locale}`,
|
|
324
|
-
class: r([
|
|
325
|
-
onClick: (t) =>
|
|
326
|
-
}, [o(c(
|
|
324
|
+
class: r([C, "tpl:text-[var(--tpl-danger)]"]),
|
|
325
|
+
onClick: (t) => pt(e.locale)
|
|
326
|
+
}, [o(c(ae), {
|
|
327
327
|
size: 14,
|
|
328
328
|
"aria-hidden": "true"
|
|
329
|
-
}), f(t(c(E)(c(
|
|
330
|
-
V.value.length && H.value ? (n(), d("div",
|
|
329
|
+
}), f(t(c(E)(c(T).localization.removeLanguage, { language: c(S)(e.locale) })) + "… ", 1)], 8, Ue)], 8, Be))), 128)),
|
|
330
|
+
V.value.length && H.value ? (n(), d("div", We, [p("button", {
|
|
331
331
|
type: "button",
|
|
332
332
|
role: "menuitem",
|
|
333
333
|
"data-testid": "language-add",
|
|
334
334
|
"aria-haspopup": "menu",
|
|
335
335
|
"aria-expanded": N.value === "add",
|
|
336
|
-
class: r(
|
|
337
|
-
onClick: i[0] ||= (e) =>
|
|
336
|
+
class: r(C),
|
|
337
|
+
onClick: i[0] ||= (e) => Y("add")
|
|
338
338
|
}, [
|
|
339
|
-
o(c(
|
|
339
|
+
o(c(ie), {
|
|
340
340
|
size: 14,
|
|
341
341
|
"aria-hidden": "true"
|
|
342
342
|
}),
|
|
343
|
-
f(t(c(
|
|
344
|
-
o(c(
|
|
343
|
+
f(t(c(T).localization.addLanguage), 1),
|
|
344
|
+
o(c(re), {
|
|
345
345
|
size: 12,
|
|
346
346
|
"aria-hidden": "true",
|
|
347
347
|
class: "tpl:ml-auto"
|
|
348
348
|
})
|
|
349
|
-
], 8,
|
|
349
|
+
], 8, Ge), N.value === "add" ? (n(), d("div", {
|
|
350
350
|
key: 0,
|
|
351
351
|
role: "menu",
|
|
352
352
|
"data-language-submenu": "",
|
|
353
|
-
"aria-label": c(
|
|
354
|
-
class: r([
|
|
353
|
+
"aria-label": c(T).localization.addLanguage,
|
|
354
|
+
class: r([w, "tpl-language-submenu tpl:absolute tpl:left-full tpl:bottom-0 tpl:ml-1 tpl:max-h-64 tpl:w-48 tpl:overflow-y-auto"])
|
|
355
355
|
}, [(n(!0), d(m, null, a(V.value, (e) => (n(), d("button", {
|
|
356
356
|
key: e,
|
|
357
357
|
type: "button",
|
|
358
358
|
role: "menuitem",
|
|
359
359
|
"data-testid": `language-add-${e}`,
|
|
360
|
-
class: r(
|
|
361
|
-
onClick: (t) =>
|
|
362
|
-
}, t(c(S)(e)), 9,
|
|
363
|
-
], 8,
|
|
364
|
-
o(
|
|
360
|
+
class: r(C),
|
|
361
|
+
onClick: (t) => dt(e)
|
|
362
|
+
}, t(c(S)(e)), 9, qe))), 128))], 8, Ke)) : l("", !0)])) : l("", !0)
|
|
363
|
+
], 8, Ae)) : l("", !0),
|
|
364
|
+
o(Ce, {
|
|
365
365
|
visible: P.value !== null || F.value !== null,
|
|
366
366
|
onClose: $
|
|
367
367
|
}, {
|
|
@@ -371,33 +371,33 @@ var Ce = y({
|
|
|
371
371
|
"aria-label": Q.value,
|
|
372
372
|
class: "tpl:w-80 tpl:max-w-full tpl:max-h-[90%] tpl:overflow-y-auto tpl:box-border tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-lg)]"
|
|
373
373
|
}, [
|
|
374
|
-
p("h3",
|
|
375
|
-
F.value &&
|
|
374
|
+
p("h3", Ye, t(Q.value), 1),
|
|
375
|
+
F.value && ht.value ? (n(), d("p", Xe, t(c(x)(c(T).localization.defaultGaps, ht.value, c(D), {
|
|
376
376
|
language: c(S)(F.value.locale),
|
|
377
377
|
default: c(S)(R.value)
|
|
378
378
|
})), 1)) : l("", !0),
|
|
379
|
-
P.value ? (n(), d("p",
|
|
380
|
-
I.value ? (n(), d("p",
|
|
379
|
+
P.value ? (n(), d("p", Ze, t(c(E)(c(T).localization.removeDescription, { language: c(S)(P.value) })), 1)) : l("", !0),
|
|
380
|
+
I.value ? (n(), d("p", Qe, [o(c(v), {
|
|
381
381
|
size: 14,
|
|
382
382
|
"aria-hidden": "true",
|
|
383
383
|
class: "tpl:shrink-0"
|
|
384
384
|
}), p("span", null, t(I.value), 1)])) : l("", !0),
|
|
385
|
-
p("div",
|
|
385
|
+
p("div", $e, [p("button", {
|
|
386
386
|
type: "button",
|
|
387
387
|
"data-testid": F.value ? "language-default-cancel" : "language-remove-cancel",
|
|
388
|
-
class: r(c(
|
|
388
|
+
class: r(c(ve)),
|
|
389
389
|
onClick: $
|
|
390
|
-
}, t(c(
|
|
390
|
+
}, t(c(T).localization.cancel), 11, et), p("button", {
|
|
391
391
|
type: "button",
|
|
392
392
|
"data-testid": F.value ? "language-default-confirm" : "language-remove-confirm",
|
|
393
|
-
class: r(P.value ? c(
|
|
393
|
+
class: r(P.value ? c(be) : c(ye)),
|
|
394
394
|
disabled: !H.value,
|
|
395
|
-
onClick:
|
|
396
|
-
}, t(F.value ? c(
|
|
397
|
-
], 8,
|
|
395
|
+
onClick: gt
|
|
396
|
+
}, t(F.value ? c(T).localization.makeDefault : c(E)(c(T).localization.removeLanguage, { language: c(S)(P.value ?? R.value) })), 11, tt)])
|
|
397
|
+
], 8, Je)]),
|
|
398
398
|
_: 1
|
|
399
399
|
}, 8, ["visible"])
|
|
400
400
|
], 544));
|
|
401
401
|
}
|
|
402
|
-
}), [["__scopeId", "data-v-
|
|
403
|
-
export {
|
|
402
|
+
}), [["__scopeId", "data-v-e6e34300"]]);
|
|
403
|
+
export { T as default };
|
|
@@ -5,16 +5,16 @@ import { t as f } from "./useI18n-Cx9W7OWb.js";
|
|
|
5
5
|
import { t as p } from "./noticeTones-D7BPu-Le.js";
|
|
6
6
|
import { t as m } from "./plural-CyxrJXL1.js";
|
|
7
7
|
import { st as h } from "./keys-B4DimcgX.js";
|
|
8
|
-
import { t as g } from "./
|
|
8
|
+
import { t as g } from "./useLanguageName-CEFzafHB.js";
|
|
9
9
|
// src/components/localization/LocaleNotices.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var _ = ["aria-label", "title"], v = /* @__PURE__ */ l({
|
|
11
11
|
__name: "LocaleNotices",
|
|
12
12
|
props: { notice: {} },
|
|
13
13
|
emits: ["dismiss"],
|
|
14
14
|
setup(l, { emit: v }) {
|
|
15
|
-
let y = l, b = v, { t:
|
|
16
|
-
let { notice: e } = y, t = [S
|
|
17
|
-
return e.count && t.push(m(
|
|
15
|
+
let y = l, b = g(), x = v, { t: S, format: C } = f(), w = c(h, void 0) ?? "en", T = i(() => {
|
|
16
|
+
let { notice: e } = y, t = [C(S.localization.defaultChanged, { language: b(e.language) })];
|
|
17
|
+
return e.count && t.push(m(S.localization.defaultRemaining, e.count, w, { old: b(e.old) })), t.join(" ");
|
|
18
18
|
});
|
|
19
19
|
return (i, c) => (t(), o("div", {
|
|
20
20
|
"data-testid": "locale-notice",
|
|
@@ -28,13 +28,13 @@ var _ = ["aria-label", "title"], v = /* @__PURE__ */ l({
|
|
|
28
28
|
"aria-hidden": "true",
|
|
29
29
|
class: "tpl:shrink-0"
|
|
30
30
|
}),
|
|
31
|
-
s("span", null, e(
|
|
31
|
+
s("span", null, e(T.value), 1),
|
|
32
32
|
s("button", {
|
|
33
33
|
type: "button",
|
|
34
34
|
class: "tpl:flex tpl:size-5 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:text-[var(--tpl-text-muted)] tpl:hover:text-[var(--tpl-text)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)]",
|
|
35
|
-
"aria-label": a(
|
|
36
|
-
title: a(
|
|
37
|
-
onClick: c[0] ||= (e) =>
|
|
35
|
+
"aria-label": a(S).localization.dismiss,
|
|
36
|
+
title: a(S).localization.dismiss,
|
|
37
|
+
onClick: c[0] ||= (e) => x("dismiss")
|
|
38
38
|
}, [r(a(d), {
|
|
39
39
|
size: 14,
|
|
40
40
|
"stroke-width": 2,
|
|
@@ -4,7 +4,7 @@ import { i as b, n as x, r as S, t as C } from "./LogicTagInsertButton-BzEZUTRZ.
|
|
|
4
4
|
import { t as w } from "./rotate-ccw-DQZVEj1V.js";
|
|
5
5
|
import { v as T } from "./keys-B4DimcgX.js";
|
|
6
6
|
import { t as E } from "./useI18n-Cx9W7OWb.js";
|
|
7
|
-
import { t as D } from "./
|
|
7
|
+
import { t as D } from "./useLanguageName-CEFzafHB.js";
|
|
8
8
|
import { p as O, u as k } from "./styleConstants-Br6CIRoS.js";
|
|
9
9
|
// src/components/toolbar/FieldRow.vue?vue&type=script&setup=true&lang.ts
|
|
10
10
|
var A = ["data-locale-path"], j = {
|
|
@@ -23,11 +23,11 @@ var A = ["data-locale-path"], j = {
|
|
|
23
23
|
},
|
|
24
24
|
emits: ["reset"],
|
|
25
25
|
setup(l, { emit: p }) {
|
|
26
|
-
let g = O.replace("tpl:text-sm", "tpl:text-xs"), b = l, x = p, S = m(T, null), C = `tpl-field-${v()}`, { t:
|
|
26
|
+
let g = O.replace("tpl:text-sm", "tpl:text-xs"), b = l, x = p, S = m(T, null), C = D(S), F = `tpl-field-${v()}`, { t: I, format: L } = E(), R = o(() => {
|
|
27
27
|
let e = S?.activeLocale?.value;
|
|
28
28
|
if (e) return b.settings ? S?.content.value.settings.l10n?.[e] : S?.selectedBlock?.value?.l10n?.[e];
|
|
29
|
-
}),
|
|
30
|
-
function
|
|
29
|
+
}), z = o(() => b.path ? [...Object.keys(R.value?.set ?? {}), ...Object.keys(R.value?.text ?? {})].filter((e) => e === b.path || e.startsWith(`${b.path}.`) || b.path.startsWith(`${e}.`) && !y(_(R.value?.set?.[e], b.path.slice(e.length + 1)), _(b.settings ? S?.content.value.settings : S?.selectedBlock?.value, b.path))) : []), B = o(() => b.overridden ?? z.value.length > 0), V = o(() => C(S?.activeLocale?.value ?? "")), H = o(() => L(I.localization.resetToDefault, { default: C(S?.content.value.settings.locale ?? "en") }));
|
|
30
|
+
function U() {
|
|
31
31
|
if (b.settings && b.path && S) {
|
|
32
32
|
let e = S.content.value.settings;
|
|
33
33
|
S.updateSettings({ [b.path]: _(e, b.path) });
|
|
@@ -37,26 +37,26 @@ var A = ["data-locale-path"], j = {
|
|
|
37
37
|
return (o, p) => (n(), u("div", {
|
|
38
38
|
class: r(l.settings ? void 0 : "tpl:mb-3.5"),
|
|
39
39
|
"data-locale-path": l.path ? l.settings ? `settings/${l.path}` : l.path : void 0
|
|
40
|
-
}, [l.label || o.$slots.label ||
|
|
40
|
+
}, [l.label || o.$slots.label || B.value ? (n(), u("div", j, [f("div", M, [l.label || o.$slots.label ? (n(), u("label", {
|
|
41
41
|
key: 0,
|
|
42
|
-
for:
|
|
42
|
+
for: F,
|
|
43
43
|
class: "tpl:block tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]"
|
|
44
|
-
}, [e(o.$slots, "label", {}, () => [d(t(l.label), 1)])])) : c("", !0),
|
|
44
|
+
}, [e(o.$slots, "label", {}, () => [d(t(l.label), 1)])])) : c("", !0), B.value ? (n(), u("span", {
|
|
45
45
|
key: 1,
|
|
46
46
|
"data-testid": "field-locale-pill",
|
|
47
47
|
class: r(s(k))
|
|
48
|
-
}, t(
|
|
48
|
+
}, t(V.value), 3)) : c("", !0)]), f("div", N, [e(o.$slots, "label-actions", i(h({ controlId: F }))), B.value ? (n(), u("button", {
|
|
49
49
|
key: 0,
|
|
50
50
|
type: "button",
|
|
51
51
|
"data-testid": "field-reset",
|
|
52
|
-
"aria-label":
|
|
53
|
-
title:
|
|
52
|
+
"aria-label": H.value,
|
|
53
|
+
title: H.value,
|
|
54
54
|
class: r([s(g), "tpl:p-1"]),
|
|
55
|
-
onClick:
|
|
55
|
+
onClick: U
|
|
56
56
|
}, [a(s(w), {
|
|
57
57
|
size: 12,
|
|
58
58
|
"aria-hidden": "true"
|
|
59
|
-
})], 10, P)) : c("", !0)])])) : c("", !0), e(o.$slots, "default", i(h({ controlId:
|
|
59
|
+
})], 10, P)) : c("", !0)])])) : c("", !0), e(o.$slots, "default", i(h({ controlId: F })))], 10, A));
|
|
60
60
|
}
|
|
61
61
|
}), I = { key: 0 }, L = {
|
|
62
62
|
key: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-CGnMp29N.js";
|
|
2
2
|
import { Ft as t, L as n, M as r, Mt as i, P as a, Pt as o, Y as s, _ as c, a as l, c as u, ct as d, d as f, et as p, f as m, g as h, l as g, r as _, u as v, v as y, w as b, y as x } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
3
3
|
import { c as S, s as C } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
4
|
-
import { B as w, H as T, U as E, z as D } from "./composables-
|
|
4
|
+
import { B as w, H as T, U as E, z as D } from "./composables-26aR45W3.js";
|
|
5
5
|
import { n as O } from "./usePopoverPosition-DF0ZYH7g.js";
|
|
6
6
|
import { Kt as ee } from "./dist-DX_IQgcU.js";
|
|
7
7
|
import { n as te } from "./useLocalizedDisplay-DfiE-KjV.js";
|
|
@@ -337,7 +337,7 @@ var Ne = ["data-tpl-theme", "aria-label"], Pe = ["disabled", "inert"], Fe = { cl
|
|
|
337
337
|
"add-logic-tag"
|
|
338
338
|
],
|
|
339
339
|
setup(e, { emit: n }) {
|
|
340
|
-
let i = y(() => import("./AiRewriteMenu-
|
|
340
|
+
let i = y(() => import("./AiRewriteMenu-CmZKTO-O.js")), a = e, s = b(M, {}), p = u(() => s.ai?.isFeatureEnabled("rewrite") ?? !1), x = n, S = b(N, null), C = b(j, null), w = P(A, "ParagraphToolbar"), T = O(), E = b(ne, null), D = b(k, null), ee = b(F, null), te = u(() => (E?.isOpen.value ?? !1) || (D?.isOpen.value ?? !1)), { t: L } = B(), R = w.fonts, z = _e.map((e) => ({
|
|
341
341
|
value: e,
|
|
342
342
|
label: e === "normal" ? L.paragraphEditor.letterSpacingNormal : e
|
|
343
343
|
}));
|
|
@@ -2,7 +2,7 @@ import { Ft as e, M as t, Mt as n, U as r, _ as i, ct as a, d as o, f as s, g as
|
|
|
2
2
|
import { C as f, b as p, f as m } from "./styleConstants-Br6CIRoS.js";
|
|
3
3
|
import { t as h } from "./triangle-exclamation-point-Bi7ZKTZU.js";
|
|
4
4
|
import { t as g } from "./loader-circle-uLY01591.js";
|
|
5
|
-
import { t as _ } from "./TplModal-
|
|
5
|
+
import { t as _ } from "./TplModal-2MKm5y6r.js";
|
|
6
6
|
import { t as v } from "./useI18n-Cx9W7OWb.js";
|
|
7
7
|
// src/components/RestoreVersionDialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var y = ["aria-busy"], b = { class: "tpl:flex tpl:items-center tpl:gap-2" }, x = {
|