@flozy/editor 5.5.5 → 5.5.6
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.
@@ -1,4 +1,6 @@
|
|
1
|
-
export const defaultFonts = [
|
1
|
+
export const defaultFonts = [
|
2
|
+
// "EB Garamond",
|
3
|
+
"Anton", "DM Serif Text", "Libre Baskerville", "Montserrat", "Open Sans", "Public Sans", "Raleway", "Space Mono", "Great Vibes", "Zeyada", "Allura", "Pinyon Script", "Dancing Script", "Gaegu", "Kite One", "Merriweather"];
|
2
4
|
export const otherFonts = ["PoppinsRegular", "PoppinsBold", "Monaco", "Qwitcher Grypen", "Bulgarian Garamond", "Redacted Script", "Herr Von Muellerhoff", "Dawning of a New Day", "Coming Soon", "Engagement", "Ingrid Darling", "La Belle Aurore", "Mea Culpa", "The Girl Next Door", "Helvetica", "Georgia", "Times New Roman", "Courier New", "Impact"];
|
3
5
|
export const googleFontList = ["Roboto", "Noto Sans JP", "Poppins", "Lato", "Inter", "Roboto Condensed", "Roboto Mono", "Oswald", "Noto Sans", "Nunito", "Nunito Sans", "Ubuntu", "Rubik", "Playfair Display", "Noto Sans KR", "Roboto Slab", "PT Sans", "Kanit", "Work Sans", "Lora", "DM Sans", "Mulish", "Quicksand", "Fira Sans", "Noto Sans TC", "Inconsolata", "Barlow", "Manrope", "IBM Plex Sans", "PT Serif", "Karla", "Titillium Web", "Heebo", "Noto Serif", "Nanum Gothic", "Noto Color Emoji", "Agdasima", "Bebas Neue", "Libre Franklin", "Mukta", "Outfit", "Josefin Sans", "Source Code Pro", "Jost", "Space Grotesk", "Hind Siliguri", "Arimo", "Cabin", "Barlow Condensed", "Dosis", "Fira Sans Condensed", "Bitter", "Archivo", "Figtree", "Noto Serif JP", "PT Sans Narrow", "Abel", "Noto Sans SC",
|
4
6
|
// "Source Sans 3",
|
@@ -54,6 +54,20 @@ const overrides = {
|
|
54
54
|
return `${val?.topLeft}px ${val?.topRight}px ${val?.bottomLeft}px ${val?.bottomRight}px`;
|
55
55
|
}
|
56
56
|
};
|
57
|
+
export const checkXS = (val = {}) => {
|
58
|
+
try {
|
59
|
+
if (typeof val === "object") {
|
60
|
+
if (val?.xs === undefined && val?.lg !== undefined) {
|
61
|
+
val.xs = val.lg;
|
62
|
+
}
|
63
|
+
return val;
|
64
|
+
}
|
65
|
+
return val;
|
66
|
+
} catch (err) {
|
67
|
+
console.log(err);
|
68
|
+
return val;
|
69
|
+
}
|
70
|
+
};
|
57
71
|
export const getBreakPointsValue = (value, breakpoint, ot = null, ov = false) => {
|
58
72
|
try {
|
59
73
|
if (breakpoint) {
|
@@ -67,7 +81,7 @@ export const getBreakPointsValue = (value, breakpoint, ot = null, ov = false) =>
|
|
67
81
|
return value ? value[breakpoint] || value["lg"] : value;
|
68
82
|
}
|
69
83
|
} else if (typeof value === "object") {
|
70
|
-
return !breakpoint && value["lg"] ? !ov ? value : overrideValues(value, ot) : value[breakpoint] || copyAllLg(value, ot);
|
84
|
+
return !breakpoint && value["lg"] ? !ov ? value : checkXS(overrideValues(value, ot)) : value[breakpoint] || copyAllLg(value, ot);
|
71
85
|
} else {
|
72
86
|
// consider without breakpoints
|
73
87
|
return copyAllLg(value, ot);
|