@gem-sdk/pages 2.0.0-dev.618 → 2.0.0-dev.656

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.
@@ -9,4 +9,6 @@ exports.PublishedThemePageMetafields = void 0;
9
9
  PublishedThemePageMetafields["ANALYTICS_TIKTOK_PIXEL_ID"] = 'analytics_tiktok_pixel_id';
10
10
  PublishedThemePageMetafields["GLOBAL_META_DESCRIPTION"] = 'global-meta-description';
11
11
  PublishedThemePageMetafields["GLOBAL_META_THUMBNAIL"] = 'global-meta-thumbnail';
12
+ PublishedThemePageMetafields["NOINDEX_KEY"] = 'noindex';
13
+ PublishedThemePageMetafields["NOFOLLOW_KEY"] = 'nofollow';
12
14
  })(exports.PublishedThemePageMetafields || (exports.PublishedThemePageMetafields = {}));
@@ -62,6 +62,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
62
62
  const mobileOnly = dataBuilder.isMobile ?? false;
63
63
  const description = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
64
64
  const thumbnail = parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
65
+ const noindex = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOINDEX_KEY, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.NOINDEX_KEY)?.value;
66
+ const nofollow = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.NOFOLLOW_KEY, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.NOFOLLOW_KEY)?.value;
65
67
  const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
66
68
  const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
67
69
  const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
@@ -78,6 +80,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
78
80
  thumbnail
79
81
  ] : []
80
82
  },
83
+ noindex: noindex === 'true',
84
+ nofollow: nofollow === 'true',
81
85
  canonical: `https://${shopData?.storeProperty?.primaryDomain}/${slug}`,
82
86
  additionalMetaTags: [
83
87
  {
@@ -74,7 +74,8 @@ function normalizePageSectionResponseV2(sections, orders) {
74
74
  const parseBuilderTemplateV2 = (data)=>{
75
75
  return normalizePageSectionResponseV2([
76
76
  ...data?.pageSections ?? [],
77
- ...data?.themePageCustomSections ?? []
77
+ ...data?.themePageCustomSections ?? [],
78
+ ...data?.themeSections ?? []
78
79
  ], data?.sectionPosition);
79
80
  };
80
81
  const parseBuilderTemplate = (data)=>{
@@ -7,6 +7,8 @@ var PublishedThemePageMetafields;
7
7
  PublishedThemePageMetafields["ANALYTICS_TIKTOK_PIXEL_ID"] = 'analytics_tiktok_pixel_id';
8
8
  PublishedThemePageMetafields["GLOBAL_META_DESCRIPTION"] = 'global-meta-description';
9
9
  PublishedThemePageMetafields["GLOBAL_META_THUMBNAIL"] = 'global-meta-thumbnail';
10
+ PublishedThemePageMetafields["NOINDEX_KEY"] = 'noindex';
11
+ PublishedThemePageMetafields["NOFOLLOW_KEY"] = 'nofollow';
10
12
  })(PublishedThemePageMetafields || (PublishedThemePageMetafields = {}));
11
13
 
12
14
  export { PublishedThemePageMetafields };
@@ -60,6 +60,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
60
60
  const mobileOnly = dataBuilder.isMobile ?? false;
61
61
  const description = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
62
62
  const thumbnail = parseJson(getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
63
+ const noindex = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.NOINDEX_KEY, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.NOINDEX_KEY)?.value;
64
+ const nofollow = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.NOFOLLOW_KEY, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.NOFOLLOW_KEY)?.value;
63
65
  const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
64
66
  const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
65
67
  const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
@@ -76,6 +78,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
76
78
  thumbnail
77
79
  ] : []
78
80
  },
81
+ noindex: noindex === 'true',
82
+ nofollow: nofollow === 'true',
79
83
  canonical: `https://${shopData?.storeProperty?.primaryDomain}/${slug}`,
80
84
  additionalMetaTags: [
81
85
  {
@@ -72,7 +72,8 @@ function normalizePageSectionResponseV2(sections, orders) {
72
72
  const parseBuilderTemplateV2 = (data)=>{
73
73
  return normalizePageSectionResponseV2([
74
74
  ...data?.pageSections ?? [],
75
- ...data?.themePageCustomSections ?? []
75
+ ...data?.themePageCustomSections ?? [],
76
+ ...data?.themeSections ?? []
76
77
  ], data?.sectionPosition);
77
78
  };
78
79
  const parseBuilderTemplate = (data)=>{
@@ -163,7 +163,14 @@ declare function normalizePageSectionResponseV2(sections?: ShopType.Maybe<Sectio
163
163
  priority: boolean;
164
164
  data: any;
165
165
  }[];
166
- declare const parseBuilderTemplateV2: (data?: PublishedThemePageSelectFragment) => {
166
+ type ParseBuilderTemplateV2Props = PublishedThemePageSelectFragment & {
167
+ themeSections?: {
168
+ id: string;
169
+ name: string;
170
+ content: string;
171
+ }[];
172
+ };
173
+ declare const parseBuilderTemplateV2: (data?: ParseBuilderTemplateV2Props) => {
167
174
  uid: string;
168
175
  lazy: boolean;
169
176
  priority: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/pages",
3
- "version": "2.0.0-dev.618",
3
+ "version": "2.0.0-dev.656",
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.604",
29
+ "@gem-sdk/core": "2.0.0-dev.649",
30
30
  "@gem-sdk/plugin-cookie-bar": "2.0.0-dev.348",
31
31
  "@gem-sdk/plugin-quick-view": "2.0.0-dev.348",
32
32
  "@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.348"