@gem-sdk/pages 2.0.0-dev.709 → 2.0.0-dev.714

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.
@@ -89,7 +89,7 @@ const Toolbox = ()=>{
89
89
  for (const variant of font.variants){
90
90
  const cloneFont = JSON.parse(JSON.stringify(font));
91
91
  cloneFont.variants = [
92
- variant
92
+ variant.toString()
93
93
  ]; // set single variant. Fix error reload font when change href other variant
94
94
  const fontName = cloneFont.family;
95
95
  const variantName = variant;
@@ -142,7 +142,7 @@ const Toolbox = ()=>{
142
142
  const fontWeights = getListFontWeightTypos.getListFontWeightTypos(detail.data?.typography);
143
143
  const font = Object.entries(detail.data?.font).map(([, value])=>({
144
144
  ...value,
145
- variants: value.variants.filter((variant)=>fontWeights.includes(variant) || variant === 'regular' && fontWeights.includes('400')).map((variant)=>variant === 'regular' ? '400' : variant)
145
+ variants: value.variants.filter((variant)=>fontWeights.includes(variant?.toString()) || variant === 'regular' && fontWeights.includes('400')).map((variant)=>variant === 'regular' ? '400' : variant)
146
146
  })).map((item)=>{
147
147
  if (item.type == 'custom') {
148
148
  const isGoogleFont = shopifyCdnWithGoogleFonts.shopifyCdnWithGoogleFonts.find((ggFont)=>ggFont.family == item.family);
@@ -85,7 +85,7 @@ const Toolbox = ()=>{
85
85
  for (const variant of font.variants){
86
86
  const cloneFont = JSON.parse(JSON.stringify(font));
87
87
  cloneFont.variants = [
88
- variant
88
+ variant.toString()
89
89
  ]; // set single variant. Fix error reload font when change href other variant
90
90
  const fontName = cloneFont.family;
91
91
  const variantName = variant;
@@ -138,7 +138,7 @@ const Toolbox = ()=>{
138
138
  const fontWeights = getListFontWeightTypos(detail.data?.typography);
139
139
  const font = Object.entries(detail.data?.font).map(([, value])=>({
140
140
  ...value,
141
- variants: value.variants.filter((variant)=>fontWeights.includes(variant) || variant === 'regular' && fontWeights.includes('400')).map((variant)=>variant === 'regular' ? '400' : variant)
141
+ variants: value.variants.filter((variant)=>fontWeights.includes(variant?.toString()) || variant === 'regular' && fontWeights.includes('400')).map((variant)=>variant === 'regular' ? '400' : variant)
142
142
  })).map((item)=>{
143
143
  if (item.type == 'custom') {
144
144
  const isGoogleFont = shopifyCdnWithGoogleFonts.find((ggFont)=>ggFont.family == item.family);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "2.0.0-dev.709",
3
+ "version": "2.0.0-dev.714",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -26,7 +26,7 @@
26
26
  "next": "14.2.20"
27
27
  },
28
28
  "devDependencies": {
29
- "@gem-sdk/core": "2.0.0-dev.704",
29
+ "@gem-sdk/core": "2.0.0-dev.713",
30
30
  "@gem-sdk/plugin-cookie-bar": "2.0.0-dev.695",
31
31
  "@gem-sdk/plugin-quick-view": "2.0.0-dev.695",
32
32
  "@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.695"