vdc-editor 0.1.70 → 0.1.71
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/lib/vdc-editor.mjs +23 -19
- package/lib/vdc-editor.mjs.map +1 -1
- package/lib/vdc-editor.umd.js +1 -1
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
package/lib/vdc-editor.mjs
CHANGED
|
@@ -42750,46 +42750,50 @@ const Sw = (t) => t.command(({ tr: e }) => {
|
|
|
42750
42750
|
value: "Gungsuh"
|
|
42751
42751
|
}
|
|
42752
42752
|
], i = pr("fontFamily"), s = J(() => {
|
|
42753
|
-
const
|
|
42754
|
-
return Kt.isEmpty(
|
|
42753
|
+
const p = e.editor.extensionManager.extensions.find((m) => m.name === "fontFamily").options;
|
|
42754
|
+
return Kt.isEmpty(p.fontFamilyMap) && (p.fontFamilyMap = o), [
|
|
42755
42755
|
{
|
|
42756
42756
|
label: r("editor.fontFamily.default"),
|
|
42757
42757
|
value: r("editor.fontFamily.default")
|
|
42758
42758
|
},
|
|
42759
|
-
...
|
|
42759
|
+
...p.fontFamilyMap
|
|
42760
42760
|
];
|
|
42761
42761
|
}), a = J(() => {
|
|
42762
|
-
const
|
|
42762
|
+
const p = {
|
|
42763
42763
|
label: r("editor.fontFamily.default"),
|
|
42764
42764
|
value: r("editor.fontFamily.default")
|
|
42765
42765
|
};
|
|
42766
|
-
return n.value ? _2(e.editor.state, "textStyle").fontFamily ||
|
|
42766
|
+
return n.value ? _2(e.editor.state, "textStyle").fontFamily || p.value : i.value || p.value;
|
|
42767
42767
|
}), l = sr("fontFamily");
|
|
42768
|
-
function u(
|
|
42769
|
-
|
|
42768
|
+
function u(p) {
|
|
42769
|
+
p.value === a.value || p.value === r("editor.fontFamily.default") ? (e.editor.commands.unsetFontFamily(), i.value = null) : (i.value = p.value, e.editor.commands.setFontFamily(p.value), l.emit());
|
|
42770
42770
|
}
|
|
42771
|
-
|
|
42772
|
-
|
|
42773
|
-
|
|
42774
|
-
|
|
42775
|
-
|
|
42771
|
+
const d = J(() => {
|
|
42772
|
+
var p;
|
|
42773
|
+
return (p = s.value.find((h) => h.value === a.value)) == null ? void 0 : p.label;
|
|
42774
|
+
});
|
|
42775
|
+
return (p, h) => (M(), P(ja, {
|
|
42776
|
+
disabled: p.disabled,
|
|
42777
|
+
tooltip: p.tooltip,
|
|
42778
|
+
title: d.value,
|
|
42779
|
+
btn_class: `min-w-24 ${p.customClass}`
|
|
42776
42780
|
}, {
|
|
42777
42781
|
default: O(() => [
|
|
42778
|
-
(M(!0), xe(tt, null, $t(s.value, (
|
|
42782
|
+
(M(!0), xe(tt, null, $t(s.value, (m, g) => (M(), xe(tt, { key: g }, [
|
|
42779
42783
|
I(v(lu), {
|
|
42780
|
-
checked: a.value ===
|
|
42781
|
-
onClick: (
|
|
42784
|
+
checked: a.value === m.value,
|
|
42785
|
+
onClick: (y) => u(m)
|
|
42782
42786
|
}, {
|
|
42783
42787
|
default: O(() => [
|
|
42784
42788
|
ne("span", {
|
|
42785
42789
|
class: "ml-1 h-full",
|
|
42786
|
-
"data-font":
|
|
42787
|
-
style: Jt({ fontFamily:
|
|
42788
|
-
}, Fe(
|
|
42790
|
+
"data-font": m.label,
|
|
42791
|
+
style: Jt({ fontFamily: m.value ?? void 0 })
|
|
42792
|
+
}, Fe(m.label), 13, Eee)
|
|
42789
42793
|
]),
|
|
42790
42794
|
_: 2
|
|
42791
42795
|
}, 1032, ["checked", "onClick"]),
|
|
42792
|
-
|
|
42796
|
+
m.label === v(r)("editor.fontFamily.default") ? (M(), P(v(H2), { key: 0 })) : He("", !0)
|
|
42793
42797
|
], 64))), 128))
|
|
42794
42798
|
]),
|
|
42795
42799
|
_: 1
|