@depict-ai/ui 2.0.11 → 2.0.13

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/ES10/index.cjs CHANGED
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.11";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.13";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -81,11 +81,12 @@ function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
81
81
  }
82
82
  }));
83
83
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
84
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
84
85
  const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists(what_to_watch, _ref => {
85
86
  let {
86
87
  element: element
87
88
  } = _ref;
88
- return resizeObserver.observe(element);
89
+ return requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
89
90
  });
90
91
  $52FdA$solidjs.onCleanup(() => {
91
92
  resizeObserver.disconnect();
@@ -133,7 +134,7 @@ const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
133
134
  return $5401a6698b0c0658$var$transform_elements(sorted_cols_at_size);
134
135
  };
135
136
  function $8edd3cf30d1fd8b4$export$a2cc176055f8f08() {
136
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
137
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
137
138
  return (0, $52FdA$solidjsweb.isServer) ? {
138
139
  t: "<!-- ".concat(text, " -->")
139
140
  } : document.createComment(text);
@@ -854,17 +855,27 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
854
855
  setSize(Math.round(new_size));
855
856
  }
856
857
  }));
857
- resizeObserver.observe(whatToWatch);
858
- $52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
858
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
859
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
860
+ const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
861
+ let {
862
+ element: element
863
+ } = _ref;
864
+ return requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
865
+ });
866
+ $52FdA$solidjs.onCleanup(() => {
867
+ resizeObserver.disconnect();
868
+ disconnect();
869
+ });
859
870
  return size;
860
871
  }
861
- function $858fdcf73148519f$export$6e5611bc7e57e477(_ref) {
872
+ function $858fdcf73148519f$export$6e5611bc7e57e477(_ref2) {
862
873
  let {
863
874
  src: raw_src,
864
875
  size: size,
865
876
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
866
877
  ...otherOptions
867
- } = _ref;
878
+ } = _ref2;
868
879
  const src = new URL(raw_src, location.origin);
869
880
  const fallbackSrc = $858fdcf73148519f$var$generateImageUrl(src, 400);
870
881
  const srcset = $858fdcf73148519f$var$make_srcset(src, resolutions);
package/ES10/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.11";
10
+ export const version = "2.0.13";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
package/ES10/index.js CHANGED
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.11";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.13";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -22,11 +22,12 @@ function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
22
22
  }
23
23
  }));
24
24
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
25
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
25
26
  const disconnect = (0, $8tj43$observer).onexists(what_to_watch, _ref => {
26
27
  let {
27
28
  element: element
28
29
  } = _ref;
29
- return resizeObserver.observe(element);
30
+ return requestAnimationFrame($8tj43$catchify(() => resizeObserver.observe(element)));
30
31
  });
31
32
  $8tj43$onCleanup(() => {
32
33
  resizeObserver.disconnect();
@@ -74,7 +75,7 @@ const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
74
75
  return $a9c7ba6087881ac2$var$transform_elements(sorted_cols_at_size);
75
76
  };
76
77
  function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
77
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
78
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
78
79
  return (0, $8tj43$isServer) ? {
79
80
  t: "<!-- ".concat(text, " -->")
80
81
  } : document.createComment(text);
@@ -795,17 +796,27 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
795
796
  setSize(Math.round(new_size));
796
797
  }
797
798
  }));
798
- resizeObserver.observe(whatToWatch);
799
- $8tj43$onCleanup(() => resizeObserver.disconnect());
799
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
800
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
801
+ const disconnect = (0, $8tj43$observer).onexists(whatToWatch, _ref => {
802
+ let {
803
+ element: element
804
+ } = _ref;
805
+ return requestAnimationFrame($8tj43$catchify(() => resizeObserver.observe(element)));
806
+ });
807
+ $8tj43$onCleanup(() => {
808
+ resizeObserver.disconnect();
809
+ disconnect();
810
+ });
800
811
  return size;
801
812
  }
802
- function $56047603f9d212b6$export$6e5611bc7e57e477(_ref) {
813
+ function $56047603f9d212b6$export$6e5611bc7e57e477(_ref2) {
803
814
  let {
804
815
  src: raw_src,
805
816
  size: size,
806
817
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
807
818
  ...otherOptions
808
- } = _ref;
819
+ } = _ref2;
809
820
  const src = new URL(raw_src, location.origin);
810
821
  const fallbackSrc = $56047603f9d212b6$var$generateImageUrl(src, 400);
811
822
  const srcset = $56047603f9d212b6$var$make_srcset(src, resolutions);
package/latest/index.cjs CHANGED
@@ -61,7 +61,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
61
61
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
62
62
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
63
63
  /*! Depict.ai search and product listing SDK */
64
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.11";
64
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.13";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -74,9 +74,10 @@ function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
74
74
  }
75
75
  }));
76
76
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
77
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
77
78
  const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(what_to_watch, ({
78
79
  element: element
79
- }) => resizeObserver.observe(element));
80
+ }) => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
80
81
  $gVhhF$solidjs.onCleanup(() => {
81
82
  resizeObserver.disconnect();
82
83
  disconnect();
@@ -119,7 +120,7 @@ const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
119
120
  return $4e04be41243c3d80$var$transform_elements(sorted_cols_at_size);
120
121
  };
121
122
  function $fc23d7668ae0011d$export$a2cc176055f8f08() {
122
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
123
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
123
124
  return (0, $gVhhF$solidjsweb.isServer) ? {
124
125
  t: `<!-- ${text} -->`
125
126
  } : document.createComment(text);
@@ -800,8 +801,15 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
800
801
  setSize(Math.round(new_size));
801
802
  }
802
803
  }));
803
- resizeObserver.observe(whatToWatch);
804
- $gVhhF$solidjs.onCleanup(() => resizeObserver.disconnect());
804
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
805
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
806
+ const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(whatToWatch, ({
807
+ element: element
808
+ }) => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
809
+ $gVhhF$solidjs.onCleanup(() => {
810
+ resizeObserver.disconnect();
811
+ disconnect();
812
+ });
805
813
  return size;
806
814
  }
807
815
  function $19950faaac026e09$export$6e5611bc7e57e477({
package/latest/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.11";
10
+ export const version = "2.0.13";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
package/latest/index.js CHANGED
@@ -5,7 +5,7 @@ import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, i
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.11";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.13";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -18,9 +18,10 @@ function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
18
18
  }
19
19
  }));
20
20
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
21
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
21
22
  const disconnect = (0, $9HbP8$observer).onexists(what_to_watch, ({
22
23
  element: element
23
- }) => resizeObserver.observe(element));
24
+ }) => requestAnimationFrame($9HbP8$catchify(() => resizeObserver.observe(element))));
24
25
  $9HbP8$onCleanup(() => {
25
26
  resizeObserver.disconnect();
26
27
  disconnect();
@@ -63,7 +64,7 @@ const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
63
64
  return $b5cccc8ee7d24677$var$transform_elements(sorted_cols_at_size);
64
65
  };
65
66
  function $a458486f22b22f63$export$a2cc176055f8f08() {
66
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
67
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
67
68
  return (0, $9HbP8$isServer) ? {
68
69
  t: `<!-- ${text} -->`
69
70
  } : document.createComment(text);
@@ -744,8 +745,15 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
744
745
  setSize(Math.round(new_size));
745
746
  }
746
747
  }));
747
- resizeObserver.observe(whatToWatch);
748
- $9HbP8$onCleanup(() => resizeObserver.disconnect());
748
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
749
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
750
+ const disconnect = (0, $9HbP8$observer).onexists(whatToWatch, ({
751
+ element: element
752
+ }) => requestAnimationFrame($9HbP8$catchify(() => resizeObserver.observe(element))));
753
+ $9HbP8$onCleanup(() => {
754
+ resizeObserver.disconnect();
755
+ disconnect();
756
+ });
749
757
  return size;
750
758
  }
751
759
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -238,7 +238,7 @@
238
238
  "@babel/runtime-corejs3": "^7.22.6",
239
239
  "@depict-ai/plp-styling": "^1.2.5",
240
240
  "@depict-ai/types": "^1.0.39",
241
- "@depict-ai/utilishared": "^1.0.43",
241
+ "@depict-ai/utilishared": "^1.0.44",
242
242
  "solid-js": "^1.7.3"
243
243
  },
244
244
  "type": "module",
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.11";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.13";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -81,11 +81,12 @@ function $13671aa5e984acd9$export$9f191182275e9ef(what_to_watch) {
81
81
  }
82
82
  }));
83
83
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
84
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
84
85
  const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(what_to_watch, _ref => {
85
86
  let {
86
87
  element: element
87
88
  } = _ref;
88
- return resizeObserver.observe(element);
89
+ return requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
89
90
  });
90
91
  $3hooq$solidjs.onCleanup(() => {
91
92
  resizeObserver.disconnect();
@@ -133,7 +134,7 @@ const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
133
134
  return $5401a6698b0c0658$var$transform_elements(sorted_cols_at_size);
134
135
  };
135
136
  function $8edd3cf30d1fd8b4$export$a2cc176055f8f08() {
136
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
137
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
137
138
  return (0, $3hooq$solidjsweb.isServer) ? {
138
139
  t: "<!-- ".concat(text, " -->")
139
140
  } : document.createComment(text);
@@ -773,17 +774,27 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
773
774
  setSize(Math.round(new_size));
774
775
  }
775
776
  }));
776
- resizeObserver.observe(whatToWatch);
777
- $3hooq$solidjs.onCleanup(() => resizeObserver.disconnect());
777
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
778
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
779
+ const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
780
+ let {
781
+ element: element
782
+ } = _ref;
783
+ return requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
784
+ });
785
+ $3hooq$solidjs.onCleanup(() => {
786
+ resizeObserver.disconnect();
787
+ disconnect();
788
+ });
778
789
  return size;
779
790
  }
780
- function $858fdcf73148519f$export$6e5611bc7e57e477(_ref) {
791
+ function $858fdcf73148519f$export$6e5611bc7e57e477(_ref2) {
781
792
  let {
782
793
  src: raw_src,
783
794
  size: size,
784
795
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
785
796
  ...otherOptions
786
- } = _ref;
797
+ } = _ref2;
787
798
  const src = new URL(raw_src, location.origin);
788
799
  const fallbackSrc = $858fdcf73148519f$var$generateImageUrl(src, 400);
789
800
  const srcset = $858fdcf73148519f$var$make_srcset(src, resolutions);
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.11";
10
+ export const version = "2.0.13";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.11";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.13";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -22,11 +22,12 @@ function $0dc044cffe1e825b$export$9f191182275e9ef(what_to_watch) {
22
22
  }
23
23
  }));
24
24
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
25
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
25
26
  const disconnect = (0, $b8hua$observer).onexists(what_to_watch, _ref => {
26
27
  let {
27
28
  element: element
28
29
  } = _ref;
29
- return resizeObserver.observe(element);
30
+ return requestAnimationFrame($b8hua$catchify(() => resizeObserver.observe(element)));
30
31
  });
31
32
  $b8hua$onCleanup(() => {
32
33
  resizeObserver.disconnect();
@@ -74,7 +75,7 @@ const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
74
75
  return $a9c7ba6087881ac2$var$transform_elements(sorted_cols_at_size);
75
76
  };
76
77
  function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
77
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
78
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
78
79
  return (0, $b8hua$isServer) ? {
79
80
  t: "<!-- ".concat(text, " -->")
80
81
  } : document.createComment(text);
@@ -714,17 +715,27 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
714
715
  setSize(Math.round(new_size));
715
716
  }
716
717
  }));
717
- resizeObserver.observe(whatToWatch);
718
- $b8hua$onCleanup(() => resizeObserver.disconnect());
718
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
719
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
720
+ const disconnect = (0, $b8hua$observer).onexists(whatToWatch, _ref => {
721
+ let {
722
+ element: element
723
+ } = _ref;
724
+ return requestAnimationFrame($b8hua$catchify(() => resizeObserver.observe(element)));
725
+ });
726
+ $b8hua$onCleanup(() => {
727
+ resizeObserver.disconnect();
728
+ disconnect();
729
+ });
719
730
  return size;
720
731
  }
721
- function $56047603f9d212b6$export$6e5611bc7e57e477(_ref) {
732
+ function $56047603f9d212b6$export$6e5611bc7e57e477(_ref2) {
722
733
  let {
723
734
  src: raw_src,
724
735
  size: size,
725
736
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
726
737
  ...otherOptions
727
- } = _ref;
738
+ } = _ref2;
728
739
  const src = new URL(raw_src, location.origin);
729
740
  const fallbackSrc = $56047603f9d212b6$var$generateImageUrl(src, 400);
730
741
  const srcset = $56047603f9d212b6$var$make_srcset(src, resolutions);
@@ -61,7 +61,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
61
61
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
62
62
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
63
63
  /*! Depict.ai search and product listing SDK */
64
- const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.11";
64
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.13";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -74,9 +74,10 @@ function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
74
74
  }
75
75
  }));
76
76
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
77
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
77
78
  const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(what_to_watch, ({
78
79
  element: element
79
- }) => resizeObserver.observe(element));
80
+ }) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
80
81
  $5vyXB$solidjs.onCleanup(() => {
81
82
  resizeObserver.disconnect();
82
83
  disconnect();
@@ -119,7 +120,7 @@ const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
119
120
  return $4e04be41243c3d80$var$transform_elements(sorted_cols_at_size);
120
121
  };
121
122
  function $fc23d7668ae0011d$export$a2cc176055f8f08() {
122
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
123
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
123
124
  return (0, $5vyXB$solidjsweb.isServer) ? {
124
125
  t: `<!-- ${text} -->`
125
126
  } : document.createComment(text);
@@ -728,8 +729,15 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
728
729
  setSize(Math.round(new_size));
729
730
  }
730
731
  }));
731
- resizeObserver.observe(whatToWatch);
732
- $5vyXB$solidjs.onCleanup(() => resizeObserver.disconnect());
732
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
733
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
734
+ const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(whatToWatch, ({
735
+ element: element
736
+ }) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
737
+ $5vyXB$solidjs.onCleanup(() => {
738
+ resizeObserver.disconnect();
739
+ disconnect();
740
+ });
733
741
  return size;
734
742
  }
735
743
  function $19950faaac026e09$export$6e5611bc7e57e477({
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.11";
10
+ export const version = "2.0.13";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -5,7 +5,7 @@ import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as
5
5
  /*! Depict.ai search and product listing SDK */
6
6
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
7
7
  register_es_version("ui", "latest");
8
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.11";
8
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.13";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -18,9 +18,10 @@ function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
18
18
  }
19
19
  }));
20
20
  // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
21
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
21
22
  const disconnect = (0, $i7OB2$observer).onexists(what_to_watch, ({
22
23
  element: element
23
- }) => resizeObserver.observe(element));
24
+ }) => requestAnimationFrame($i7OB2$catchify(() => resizeObserver.observe(element))));
24
25
  $i7OB2$onCleanup(() => {
25
26
  resizeObserver.disconnect();
26
27
  disconnect();
@@ -63,7 +64,7 @@ const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
63
64
  return $b5cccc8ee7d24677$var$transform_elements(sorted_cols_at_size);
64
65
  };
65
66
  function $a458486f22b22f63$export$a2cc176055f8f08() {
66
- const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
67
+ const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
67
68
  return (0, $i7OB2$isServer) ? {
68
69
  t: `<!-- ${text} -->`
69
70
  } : document.createComment(text);
@@ -672,8 +673,15 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
672
673
  setSize(Math.round(new_size));
673
674
  }
674
675
  }));
675
- resizeObserver.observe(whatToWatch);
676
- $i7OB2$onCleanup(() => resizeObserver.disconnect());
676
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
677
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
678
+ const disconnect = (0, $i7OB2$observer).onexists(whatToWatch, ({
679
+ element: element
680
+ }) => requestAnimationFrame($i7OB2$catchify(() => resizeObserver.observe(element))));
681
+ $i7OB2$onCleanup(() => {
682
+ resizeObserver.disconnect();
683
+ disconnect();
684
+ });
677
685
  return size;
678
686
  }
679
687
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477({