@gem-sdk/core 2.1.17 → 2.1.20

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.
@@ -294,6 +294,8 @@ const RenderChildren = (props)=>{
294
294
  const WrapRenderChildren = ({ uid, customProps }, codes)=>{
295
295
  let liquid = '';
296
296
  if (codes?.length) {
297
+ // Limit each child item of an element (e.g., marquee, ...) to ensure the total element size does not exceed 256KB.
298
+ const itemMaxSize = 200 / codes.length;
297
299
  for(let i = 0; i < codes.length; i++){
298
300
  const code = codes[i];
299
301
  if (code) {
@@ -301,7 +303,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
301
303
  // Fix limit 256kb
302
304
  const textEncoder = new TextEncoder();
303
305
  const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
304
- if (Math.ceil(size / 1024) >= 180) {
306
+ if (Math.ceil(size / 1024) >= itemMaxSize) {
305
307
  const fileName = `gp-section-snippet-${uid + i}`;
306
308
  customProps.extraFiles[fileName] = code;
307
309
  liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
@@ -324,6 +324,12 @@ const HextomFreeShippingBarConfig = {
324
324
  appId: '7ef5d9af-75a2-45c7-9b1b-f9240ee488e9'
325
325
  }
326
326
  };
327
+ const ShopifySubscriptionsConfig = {
328
+ ShopifySubscriptions: {
329
+ appName: 'subscriptions',
330
+ appId: 'a3bfe9ec-96f8-4508-a003-df608a36d2ad'
331
+ }
332
+ };
327
333
 
328
334
  exports.AftershipEmailMarketingsmsConfig = AftershipEmailMarketingsmsConfig;
329
335
  exports.AppointmentBookingCowlendarConfig = AppointmentBookingCowlendarConfig;
@@ -365,6 +371,7 @@ exports.SegunoEmailMarketingConfig = SegunoEmailMarketingConfig;
365
371
  exports.SelleasyConfig = SelleasyConfig;
366
372
  exports.SeoantTrustBadgesIconConfig = SeoantTrustBadgesIconConfig;
367
373
  exports.ShopifyFormsConfig = ShopifyFormsConfig;
374
+ exports.ShopifySubscriptionsConfig = ShopifySubscriptionsConfig;
368
375
  exports.SimpleBundlesKitsConfig = SimpleBundlesKitsConfig;
369
376
  exports.SkioSubscriptionsYcS20Config = SkioSubscriptionsYcS20Config;
370
377
  exports.SproutPlantTreesGrowSalesConfig = SproutPlantTreesGrowSalesConfig;
@@ -232,6 +232,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
232
232
  'tm-type': appSetting?.trustId
233
233
  };
234
234
  }
235
+ case 'ShopifySubscriptions':
236
+ {
237
+ return {
238
+ ...currentSetting,
239
+ product: appSetting?.['productHandle'] || '{{ product }}'
240
+ };
241
+ }
235
242
  default:
236
243
  return currentSetting;
237
244
  }
@@ -1130,6 +1137,21 @@ const HextomFreeShippingBar = {
1130
1137
  'fsb-custom-placement': null
1131
1138
  }
1132
1139
  };
1140
+ const ShopifySubscriptions = {
1141
+ ShopifySubscriptions: {
1142
+ 'app-block': {
1143
+ color_text_title: '#6D7175',
1144
+ color_text_body: '#6D7175',
1145
+ dividers_color: '#8F8D8D',
1146
+ bacgkround_color: '#FFFFFF',
1147
+ border_thickness: 1,
1148
+ border_radius: 0,
1149
+ supporting_text_title: 'Purchase options',
1150
+ subscription_policy_url: '',
1151
+ product: '{{product}}'
1152
+ }
1153
+ }
1154
+ };
1133
1155
  const composeSettingsByWidgetType = {
1134
1156
  ...HextomCountdownTimerBar,
1135
1157
  ...EstimatedDeliveryDatePlus,
@@ -1184,7 +1206,8 @@ const composeSettingsByWidgetType = {
1184
1206
  ...TrustedsiteTrustBadges,
1185
1207
  ...GloColorSwatchvariantImage,
1186
1208
  ...BfSizeChartSizeGuide,
1187
- ...HextomFreeShippingBar
1209
+ ...HextomFreeShippingBar,
1210
+ ...ShopifySubscriptions
1188
1211
  };
1189
1212
 
1190
1213
  exports.composeSettingsByWidgetType = composeSettingsByWidgetType;
@@ -56,7 +56,8 @@ const mapShopifyAppMeta = {
56
56
  ...appConfig.TrustedsiteTrustBadgesConfig,
57
57
  ...appConfig.GloColorSwatchvariantImageConfig,
58
58
  ...appConfig.BfSizeChartSizeGuideConfig,
59
- ...appConfig.HextomFreeShippingBarConfig
59
+ ...appConfig.HextomFreeShippingBarConfig,
60
+ ...appConfig.ShopifySubscriptionsConfig
60
61
  };
61
62
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
62
63
 
@@ -290,6 +290,8 @@ const RenderChildren = (props)=>{
290
290
  const WrapRenderChildren = ({ uid, customProps }, codes)=>{
291
291
  let liquid = '';
292
292
  if (codes?.length) {
293
+ // Limit each child item of an element (e.g., marquee, ...) to ensure the total element size does not exceed 256KB.
294
+ const itemMaxSize = 200 / codes.length;
293
295
  for(let i = 0; i < codes.length; i++){
294
296
  const code = codes[i];
295
297
  if (code) {
@@ -297,7 +299,7 @@ const WrapRenderChildren = ({ uid, customProps }, codes)=>{
297
299
  // Fix limit 256kb
298
300
  const textEncoder = new TextEncoder();
299
301
  const size = newLiquid ? textEncoder.encode(newLiquid).length : 0;
300
- if (Math.ceil(size / 1024) >= 180) {
302
+ if (Math.ceil(size / 1024) >= itemMaxSize) {
301
303
  const fileName = `gp-section-snippet-${uid + i}`;
302
304
  customProps.extraFiles[fileName] = code;
303
305
  liquid += `{% render '${fileName}', product: product, variant: variant, product_form_id: product_form_id, productSelectedVariant: productSelectedVariant, form: form %}`;
@@ -322,5 +322,11 @@ const HextomFreeShippingBarConfig = {
322
322
  appId: '7ef5d9af-75a2-45c7-9b1b-f9240ee488e9'
323
323
  }
324
324
  };
325
+ const ShopifySubscriptionsConfig = {
326
+ ShopifySubscriptions: {
327
+ appName: 'subscriptions',
328
+ appId: 'a3bfe9ec-96f8-4508-a003-df608a36d2ad'
329
+ }
330
+ };
325
331
 
326
- export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BfSizeChartSizeGuideConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, BoostAISearchDiscoveryConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloColorSwatchvariantImageConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HextomCountdownTimerBarConfig, HextomFreeShippingBarConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PowrContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
332
+ export { AftershipEmailMarketingsmsConfig, AppointmentBookingCowlendarConfig, BestBuyFulfillmentConfig, BfSizeChartSizeGuideConfig, BoldSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, BoostAISearchDiscoveryConfig, EasyBundleBuilderSkailamaConfig, EssentialAnnouncementBarConfig, EssentialCountdownTimerBarConfig, EstimatedDeliveryDatePlusConfig, FastBundleBundlesDiscountsConfig, FlyBundlesUpsellsFbtConfig, GloColorSwatchvariantImageConfig, GloboProductOptionsVariantConfig, GrowaveConfig, HextomCountdownTimerBarConfig, HextomFreeShippingBarConfig, HulkProductOptionsConfig, InstasellShoppableInstagramConfig, JunipProductReviewsUgcConfig, KachingBundlesConfig, KiteFreeGiftDiscountConfig, LoloyalLoyaltyReferralsConfig, LoopSubscriptionsConfig, LooxReviewsConfig, MyappgurusProductReviewsConfig, OkendoReviewsLoyaltyConfig, PowerfulContactFormBuilderConfig, PowrContactFormBuilderConfig, PreorderNowPreOrderPqConfig, PreorderNowWodPresaleConfig, ProductOptionsCustomizerConfig, PumperBundlesVolumeDiscountConfig, RechargeSubscriptionsConfig, ReviewxpoProductReviewsAppConfig, SegunoEmailMarketingConfig, SelleasyConfig, SeoantTrustBadgesIconConfig, ShopifyFormsConfig, ShopifySubscriptionsConfig, SimpleBundlesKitsConfig, SkioSubscriptionsYcS20Config, SproutPlantTreesGrowSalesConfig, StampedConfig, SubifySubscriptionsConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, TrustooConfig, TrustreviewsProductReviewsConfig, TrustshopProductReviewsConfig, UnlimitedBundlesDiscountsConfig, WhatmoreShoppableVideosreelConfig, WishlistKingConfig, YotpoReviewsV3UgcConfig };
@@ -230,6 +230,13 @@ const overrideSettings = (tag, currentSetting, appSetting)=>{
230
230
  'tm-type': appSetting?.trustId
231
231
  };
232
232
  }
233
+ case 'ShopifySubscriptions':
234
+ {
235
+ return {
236
+ ...currentSetting,
237
+ product: appSetting?.['productHandle'] || '{{ product }}'
238
+ };
239
+ }
233
240
  default:
234
241
  return currentSetting;
235
242
  }
@@ -1128,6 +1135,21 @@ const HextomFreeShippingBar = {
1128
1135
  'fsb-custom-placement': null
1129
1136
  }
1130
1137
  };
1138
+ const ShopifySubscriptions = {
1139
+ ShopifySubscriptions: {
1140
+ 'app-block': {
1141
+ color_text_title: '#6D7175',
1142
+ color_text_body: '#6D7175',
1143
+ dividers_color: '#8F8D8D',
1144
+ bacgkround_color: '#FFFFFF',
1145
+ border_thickness: 1,
1146
+ border_radius: 0,
1147
+ supporting_text_title: 'Purchase options',
1148
+ subscription_policy_url: '',
1149
+ product: '{{product}}'
1150
+ }
1151
+ }
1152
+ };
1131
1153
  const composeSettingsByWidgetType = {
1132
1154
  ...HextomCountdownTimerBar,
1133
1155
  ...EstimatedDeliveryDatePlus,
@@ -1182,7 +1204,8 @@ const composeSettingsByWidgetType = {
1182
1204
  ...TrustedsiteTrustBadges,
1183
1205
  ...GloColorSwatchvariantImage,
1184
1206
  ...BfSizeChartSizeGuide,
1185
- ...HextomFreeShippingBar
1207
+ ...HextomFreeShippingBar,
1208
+ ...ShopifySubscriptions
1186
1209
  };
1187
1210
 
1188
1211
  export { composeSettingsByWidgetType, overrideSettings };
@@ -1,4 +1,4 @@
1
- import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, TrustooConfig, LooxReviewsConfig, PowrContactFormBuilderConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, BoostAISearchDiscoveryConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig, HextomCountdownTimerBarConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, GloColorSwatchvariantImageConfig, BfSizeChartSizeGuideConfig, HextomFreeShippingBarConfig } from './appConfig.js';
1
+ import { RechargeSubscriptionsConfig, BonLoyaltyRewardsReferralsConfig, SubifySubscriptionsConfig, SelleasyConfig, LoopSubscriptionsConfig, SkioSubscriptionsYcS20Config, ShopifyFormsConfig, ReviewxpoProductReviewsAppConfig, PumperBundlesVolumeDiscountConfig, UnlimitedBundlesDiscountsConfig, KiteFreeGiftDiscountConfig, FastBundleBundlesDiscountsConfig, SimpleBundlesKitsConfig, EasyBundleBuilderSkailamaConfig, PreorderNowPreOrderPqConfig, FlyBundlesUpsellsFbtConfig, JunipProductReviewsUgcConfig, PreorderNowWodPresaleConfig, YotpoReviewsV3UgcConfig, WhatmoreShoppableVideosreelConfig, ProductOptionsCustomizerConfig, AppointmentBookingCowlendarConfig, BoldSubscriptionsConfig, SproutPlantTreesGrowSalesConfig, InstasellShoppableInstagramConfig, GrowaveConfig, LoloyalLoyaltyReferralsConfig, PowerfulContactFormBuilderConfig, WishlistKingConfig, GloboProductOptionsVariantConfig, KachingBundlesConfig, TrustooConfig, LooxReviewsConfig, PowrContactFormBuilderConfig, BestBuyFulfillmentConfig, AftershipEmailMarketingsmsConfig, SegunoEmailMarketingConfig, SeoantTrustBadgesIconConfig, TrustreviewsProductReviewsConfig, MyappgurusProductReviewsConfig, HulkProductOptionsConfig, TrustshopProductReviewsConfig, StampedConfig, BoostAISearchDiscoveryConfig, EssentialCountdownTimerBarConfig, EssentialAnnouncementBarConfig, OkendoReviewsLoyaltyConfig, EstimatedDeliveryDatePlusConfig, HextomCountdownTimerBarConfig, TrustBadgesBearConfig, TrustedsiteTrustBadgesConfig, GloColorSwatchvariantImageConfig, BfSizeChartSizeGuideConfig, HextomFreeShippingBarConfig, ShopifySubscriptionsConfig } from './appConfig.js';
2
2
 
3
3
  const mapShopifyAppMeta = {
4
4
  ...RechargeSubscriptionsConfig,
@@ -54,7 +54,8 @@ const mapShopifyAppMeta = {
54
54
  ...TrustedsiteTrustBadgesConfig,
55
55
  ...GloColorSwatchvariantImageConfig,
56
56
  ...BfSizeChartSizeGuideConfig,
57
- ...HextomFreeShippingBarConfig
57
+ ...HextomFreeShippingBarConfig,
58
+ ...ShopifySubscriptionsConfig
58
59
  };
59
60
  const THIRD_PARTY_APP_BLOCK_ID_PREFIX = 'gp_app';
60
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "2.1.17",
3
+ "version": "2.1.20",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",