@gem-sdk/pages 1.14.0-dev.732 → 1.14.0-dev.763

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,9 +1,8 @@
1
- "use strict";const composeFontMimeType=t=>{let o={};return t?.forEach(t=>{if(!t)return;let e=`${t.fontFamily}_${t.fontStyle}_${t.fontWeight}`,n={font:{fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight},urls:[{url:t.backupFilePath,mimeType:t.mimeType}]};o[e]?o[e]?.urls.push(n?.urls?.[0]):o[e]=n}),o},formatName=t=>({"font/ttf":"truetype","application/x-font-opentype":"opentype","application/font-woff":"woff","application/font-woff2":"woff2"})[t],composeFontFaces=t=>{let o=[];for(let[,e]of Object.entries(t))o.push(`
1
+ "use strict";const composeFontMimeType=t=>{let o={};return t?.forEach(t=>{if(!t)return;let e=`${t.fontFamily}_${t.fontStyle}_${t.fontWeight}`,n={font:{fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight},urls:[{url:t.backupFilePath||t.filePath,mimeType:t.mimeType}]};o[e]?o[e]?.urls.push(n?.urls?.[0]):o[e]=n}),o},formatName=t=>({"font/ttf":"truetype","application/x-font-opentype":"opentype","application/font-woff":"woff","application/font-woff2":"woff2"})[t],composeFontFaces=t=>{let o=[];for(let[,e]of Object.entries(t))o.push(`
2
2
  @font-face {
3
3
  font-family: '${e.font.fontFamily}';
4
- src:
5
- ${e.urls.map(t=>`url('${t.url}') format('${formatName(t.mimeType)}')`).join(",\n")};
4
+ src: ${e.urls.map(t=>`url('${t.url}') format('${formatName(t.mimeType)}')`).join("\n")};
6
5
  font-style: ${e?.font?.fontStyle??"normal"};
7
6
  font-weight: ${e?.font?.fontWeight??"normal"};
8
7
  }
9
- `);return o},getCustomFonts=t=>{if(!t)return null;let o=composeFontMimeType(t);return composeFontFaces(o)};exports.composeFontFaces=composeFontFaces,exports.composeFontMimeType=composeFontMimeType,exports.formatName=formatName,exports.getCustomFonts=getCustomFonts;
8
+ `);return o.map(t=>t).join("\n")},getCustomFonts=t=>{if(!t)return null;let o=composeFontMimeType(t);return composeFontFaces(o)};exports.composeFontFaces=composeFontFaces,exports.composeFontMimeType=composeFontMimeType,exports.formatName=formatName,exports.getCustomFonts=getCustomFonts;
@@ -1,9 +1,8 @@
1
- let composeFontMimeType=t=>{let o={};return t?.forEach(t=>{if(!t)return;let e=`${t.fontFamily}_${t.fontStyle}_${t.fontWeight}`,n={font:{fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight},urls:[{url:t.backupFilePath,mimeType:t.mimeType}]};o[e]?o[e]?.urls.push(n?.urls?.[0]):o[e]=n}),o},formatName=t=>({"font/ttf":"truetype","application/x-font-opentype":"opentype","application/font-woff":"woff","application/font-woff2":"woff2"})[t],composeFontFaces=t=>{let o=[];for(let[,e]of Object.entries(t))o.push(`
1
+ let composeFontMimeType=t=>{let o={};return t?.forEach(t=>{if(!t)return;let e=`${t.fontFamily}_${t.fontStyle}_${t.fontWeight}`,n={font:{fontFamily:t.fontFamily,fontStyle:t.fontStyle,fontWeight:t.fontWeight},urls:[{url:t.backupFilePath||t.filePath,mimeType:t.mimeType}]};o[e]?o[e]?.urls.push(n?.urls?.[0]):o[e]=n}),o},formatName=t=>({"font/ttf":"truetype","application/x-font-opentype":"opentype","application/font-woff":"woff","application/font-woff2":"woff2"})[t],composeFontFaces=t=>{let o=[];for(let[,e]of Object.entries(t))o.push(`
2
2
  @font-face {
3
3
  font-family: '${e.font.fontFamily}';
4
- src:
5
- ${e.urls.map(t=>`url('${t.url}') format('${formatName(t.mimeType)}')`).join(",\n")};
4
+ src: ${e.urls.map(t=>`url('${t.url}') format('${formatName(t.mimeType)}')`).join("\n")};
6
5
  font-style: ${e?.font?.fontStyle??"normal"};
7
6
  font-weight: ${e?.font?.fontWeight??"normal"};
8
7
  }
9
- `);return o},getCustomFonts=t=>{if(!t)return null;let o=composeFontMimeType(t);return composeFontFaces(o)};export{composeFontFaces,composeFontMimeType,formatName,getCustomFonts};
8
+ `);return o.map(t=>t).join("\n")},getCustomFonts=t=>{if(!t)return null;let o=composeFontMimeType(t);return composeFontFaces(o)};export{composeFontFaces,composeFontMimeType,formatName,getCustomFonts};
@@ -39,7 +39,7 @@ type PageBuilderProps = {
39
39
  customCodeHeader?: string | null;
40
40
  customCodeBody?: string | null;
41
41
  isStorefront?: boolean;
42
- customFonts?: string[] | null;
42
+ customFonts?: string | null;
43
43
  };
44
44
  type PageBuilderPropsV2 = {
45
45
  builderData?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "1.14.0-dev.732",
3
+ "version": "1.14.0-dev.763",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -25,7 +25,7 @@
25
25
  "next-seo": "^6.0.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@gem-sdk/core": "1.14.0-dev.732",
28
+ "@gem-sdk/core": "1.14.0-dev.763",
29
29
  "@gem-sdk/plugin-cookie-bar": "1.14.0-dev.619",
30
30
  "@gem-sdk/plugin-quick-view": "1.14.0-dev.619",
31
31
  "@gem-sdk/plugin-sticky-add-to-cart": "1.14.0-dev.619"