@gem-sdk/pages 2.6.0-staging.21 → 3.0.0-pre-production.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.
|
@@ -35,9 +35,6 @@ const getFontFromGroupSetting = (fonts, groupSetting)=>{
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
const uniqueArray = (arr)=>{
|
|
39
|
-
return Array.from(new Set(arr));
|
|
40
|
-
};
|
|
41
38
|
const getFontValue = (fonts, value)=>{
|
|
42
39
|
let customFontFamily = value.custom?.fontFamily;
|
|
43
40
|
if (typeof customFontFamily === 'string') {
|
|
@@ -63,18 +60,15 @@ const getFontValue = (fonts, value)=>{
|
|
|
63
60
|
});
|
|
64
61
|
const customFontWeight = value.custom?.fontWeight && variants.includes(value.custom?.fontWeight) ? value.custom?.fontWeight : variants[0];
|
|
65
62
|
if (customFontWeight) {
|
|
66
|
-
const fontVariants = uniqueArray([
|
|
67
|
-
customFontWeight,
|
|
68
|
-
...value?.attrs?.isAlwaysLoadBold ? [
|
|
69
|
-
'700'
|
|
70
|
-
] : []
|
|
71
|
-
]);
|
|
72
63
|
const isExist = fonts.find((item)=>item.family == fontFamily && item.variants.includes(customFontWeight));
|
|
73
64
|
if (!isExist) {
|
|
74
65
|
const isFontFamily = fonts.find((item)=>item.family == fontFamily);
|
|
75
66
|
if (isFontFamily) {
|
|
76
67
|
isFontFamily.variants.push(customFontWeight);
|
|
77
68
|
} else {
|
|
69
|
+
const fontVariants = [
|
|
70
|
+
customFontWeight
|
|
71
|
+
];
|
|
78
72
|
if (customFontWeight !== '700') {
|
|
79
73
|
if (variants.includes('700')) {
|
|
80
74
|
fontVariants.push('700'); // Auto add 700 for bold in editor inline
|
|
@@ -33,9 +33,6 @@ const getFontFromGroupSetting = (fonts, groupSetting)=>{
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const uniqueArray = (arr)=>{
|
|
37
|
-
return Array.from(new Set(arr));
|
|
38
|
-
};
|
|
39
36
|
const getFontValue = (fonts, value)=>{
|
|
40
37
|
let customFontFamily = value.custom?.fontFamily;
|
|
41
38
|
if (typeof customFontFamily === 'string') {
|
|
@@ -61,18 +58,15 @@ const getFontValue = (fonts, value)=>{
|
|
|
61
58
|
});
|
|
62
59
|
const customFontWeight = value.custom?.fontWeight && variants.includes(value.custom?.fontWeight) ? value.custom?.fontWeight : variants[0];
|
|
63
60
|
if (customFontWeight) {
|
|
64
|
-
const fontVariants = uniqueArray([
|
|
65
|
-
customFontWeight,
|
|
66
|
-
...value?.attrs?.isAlwaysLoadBold ? [
|
|
67
|
-
'700'
|
|
68
|
-
] : []
|
|
69
|
-
]);
|
|
70
61
|
const isExist = fonts.find((item)=>item.family == fontFamily && item.variants.includes(customFontWeight));
|
|
71
62
|
if (!isExist) {
|
|
72
63
|
const isFontFamily = fonts.find((item)=>item.family == fontFamily);
|
|
73
64
|
if (isFontFamily) {
|
|
74
65
|
isFontFamily.variants.push(customFontWeight);
|
|
75
66
|
} else {
|
|
67
|
+
const fontVariants = [
|
|
68
|
+
customFontWeight
|
|
69
|
+
];
|
|
76
70
|
if (customFontWeight !== '700') {
|
|
77
71
|
if (variants.includes('700')) {
|
|
78
72
|
fontVariants.push('700'); // Auto add 700 for bold in editor inline
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-pre-production.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "
|
|
29
|
+
"@gem-sdk/core": "3.0.0-pre-production.0",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "3.0.0-pre-production.0",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "3.0.0-pre-production.0",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "3.0.0-pre-production.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|