@swell/apps-sdk 1.0.185 → 1.0.186

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.
package/dist/index.mjs CHANGED
@@ -12062,6 +12062,31 @@ function makeProductsCollectionResolve(instance, object, mapper) {
12062
12062
  return resolveProducts;
12063
12063
  }
12064
12064
 
12065
+ // src/compatibility/shopify-objects/content.ts
12066
+ import { Drop as Drop6 } from "liquidjs";
12067
+ var ShopifySwellContent = class extends Drop6 {
12068
+ content;
12069
+ description;
12070
+ constructor(product) {
12071
+ super();
12072
+ this.content = product?.content || {};
12073
+ this.description = product?.description || "";
12074
+ }
12075
+ toString() {
12076
+ return this.description;
12077
+ }
12078
+ toObject() {
12079
+ const combined = Object.assign({}, this.content);
12080
+ return combined;
12081
+ }
12082
+ toJSON() {
12083
+ return this.toObject();
12084
+ }
12085
+ toLiquid() {
12086
+ return this.toObject();
12087
+ }
12088
+ };
12089
+
12065
12090
  // src/compatibility/shopify-objects/product.ts
12066
12091
  function ShopifyProduct(instance, product, depth = 0) {
12067
12092
  if (product instanceof ShopifyResource) {
@@ -12095,7 +12120,7 @@ function ShopifyProduct(instance, product, depth = 0) {
12095
12120
  compare_at_price_max: compareAtPrice,
12096
12121
  compare_at_price_min: compareAtPrice,
12097
12122
  compare_at_price_varies: false,
12098
- content: defer(() => product.description),
12123
+ content: defer(() => new ShopifySwellContent(product)),
12099
12124
  created_at: defer(() => product.date_created),
12100
12125
  description: defer(() => product.description),
12101
12126
  featured_image: deferWith(product, (product2) => {
@@ -12973,8 +12998,8 @@ function ShopifyShippingMethod(instance, order) {
12973
12998
  }
12974
12999
 
12975
13000
  // src/compatibility/drops/money.ts
12976
- import { Drop as Drop6 } from "liquidjs";
12977
- var MoneyDrop = class extends Drop6 {
13001
+ import { Drop as Drop7 } from "liquidjs";
13002
+ var MoneyDrop = class extends Drop7 {
12978
13003
  constructor(value, decimals, currency) {
12979
13004
  super();
12980
13005
  this.value = value;
@@ -13575,8 +13600,8 @@ function ShopifyShop(instance, store) {
13575
13600
  }
13576
13601
 
13577
13602
  // src/compatibility/drops/all_products.ts
13578
- import { Drop as Drop7 } from "liquidjs";
13579
- var AllProductsDrop = class extends Drop7 {
13603
+ import { Drop as Drop8 } from "liquidjs";
13604
+ var AllProductsDrop = class extends Drop8 {
13580
13605
  #instance;
13581
13606
  #map;
13582
13607
  constructor(instance) {
@@ -13618,8 +13643,8 @@ var AllProductsDrop = class extends Drop7 {
13618
13643
  };
13619
13644
 
13620
13645
  // src/compatibility/drops/articles.ts
13621
- import { Drop as Drop8 } from "liquidjs";
13622
- var ArticlesDrop = class extends Drop8 {
13646
+ import { Drop as Drop9 } from "liquidjs";
13647
+ var ArticlesDrop = class extends Drop9 {
13623
13648
  #instance;
13624
13649
  #map;
13625
13650
  constructor(instance) {
@@ -13661,8 +13686,8 @@ var ArticlesDrop = class extends Drop8 {
13661
13686
  };
13662
13687
 
13663
13688
  // src/compatibility/drops/blogs.ts
13664
- import { Drop as Drop9 } from "liquidjs";
13665
- var BlogsDrop = class extends Drop9 {
13689
+ import { Drop as Drop10 } from "liquidjs";
13690
+ var BlogsDrop = class extends Drop10 {
13666
13691
  #instance;
13667
13692
  #map;
13668
13693
  constructor(instance) {
@@ -13708,7 +13733,7 @@ var BlogsDrop = class extends Drop9 {
13708
13733
  };
13709
13734
 
13710
13735
  // src/compatibility/drops/collections.ts
13711
- import { Drop as Drop10 } from "liquidjs";
13736
+ import { Drop as Drop11 } from "liquidjs";
13712
13737
  var AllCategoryResource = class extends StorefrontResource {
13713
13738
  constructor(instance) {
13714
13739
  super(() => {
@@ -13722,7 +13747,7 @@ var AllCategoryResource = class extends StorefrontResource {
13722
13747
  });
13723
13748
  }
13724
13749
  };
13725
- var CollectionsDrop = class extends Drop10 {
13750
+ var CollectionsDrop = class extends Drop11 {
13726
13751
  #instance;
13727
13752
  #map;
13728
13753
  constructor(instance) {
@@ -13849,8 +13874,8 @@ var SwellStorefrontProducts = class extends SwellStorefrontCollection {
13849
13874
  };
13850
13875
 
13851
13876
  // src/compatibility/drops/images.ts
13852
- import { Drop as Drop11 } from "liquidjs";
13853
- var ImagesDrop = class extends Drop11 {
13877
+ import { Drop as Drop12 } from "liquidjs";
13878
+ var ImagesDrop = class extends Drop12 {
13854
13879
  #instance;
13855
13880
  #map;
13856
13881
  constructor(instance) {
@@ -13904,8 +13929,8 @@ var SwellImage = class extends StorefrontResource {
13904
13929
  };
13905
13930
 
13906
13931
  // src/compatibility/drops/object-handles.ts
13907
- import { Drop as Drop12 } from "liquidjs";
13908
- var ObjectHandlesDrop = class extends Drop12 {
13932
+ import { Drop as Drop13 } from "liquidjs";
13933
+ var ObjectHandlesDrop = class extends Drop13 {
13909
13934
  #map;
13910
13935
  constructor(map) {
13911
13936
  super();
@@ -13945,8 +13970,8 @@ var ObjectHandlesDrop = class extends Drop12 {
13945
13970
  };
13946
13971
 
13947
13972
  // src/compatibility/drops/pages.ts
13948
- import { Drop as Drop13 } from "liquidjs";
13949
- var PagesDrop = class extends Drop13 {
13973
+ import { Drop as Drop14 } from "liquidjs";
13974
+ var PagesDrop = class extends Drop14 {
13950
13975
  #instance;
13951
13976
  #map;
13952
13977
  constructor(instance) {
@@ -14666,9 +14691,9 @@ ${injects.join("\n")}</script>`;
14666
14691
  };
14667
14692
 
14668
14693
  // src/liquid/drops/render.ts
14669
- import { Drop as Drop14 } from "liquidjs";
14694
+ import { Drop as Drop15 } from "liquidjs";
14670
14695
  import { noop as noop2 } from "lodash-es";
14671
- var RenderDrop = class extends Drop14 {
14696
+ var RenderDrop = class extends Drop15 {
14672
14697
  #result;
14673
14698
  #handler;
14674
14699
  constructor(handler) {
@@ -16708,8 +16733,8 @@ function arrayEqual(lhs, rhs) {
16708
16733
 
16709
16734
  // src/liquid/color.ts
16710
16735
  import Color from "color";
16711
- import { Drop as Drop15 } from "liquidjs";
16712
- var ThemeColor = class _ThemeColor extends Drop15 {
16736
+ import { Drop as Drop16 } from "liquidjs";
16737
+ var ThemeColor = class _ThemeColor extends Drop16 {
16713
16738
  color;
16714
16739
  colorValues;
16715
16740
  red;
@@ -17331,8 +17356,8 @@ var ThemeLoader = class _ThemeLoader {
17331
17356
  import { trimEnd } from "lodash-es";
17332
17357
 
17333
17358
  // src/compatibility/drops/robots-rule.ts
17334
- import { Drop as Drop16 } from "liquidjs";
17335
- var RobotsRule = class _RobotsRule extends Drop16 {
17359
+ import { Drop as Drop17 } from "liquidjs";
17360
+ var RobotsRule = class _RobotsRule extends Drop17 {
17336
17361
  constructor(directive, value) {
17337
17362
  super();
17338
17363
  this.directive = directive;