@gem-sdk/pages 2.0.0-dev.701 → 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);
@@ -166,7 +166,9 @@ const Toolbox = ()=>{
166
166
  } catch {
167
167
  //
168
168
  }
169
- }, []);
169
+ }, [
170
+ fontType
171
+ ]);
170
172
  // Init builder data
171
173
  const onInitBuilder = react.useCallback((e)=>{
172
174
  clearModal();
@@ -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);
@@ -162,7 +162,9 @@ const Toolbox = ()=>{
162
162
  } catch {
163
163
  //
164
164
  }
165
- }, []);
165
+ }, [
166
+ fontType
167
+ ]);
166
168
  // Init builder data
167
169
  const onInitBuilder = useCallback((e)=>{
168
170
  clearModal();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "2.0.0-dev.701",
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.701",
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"