@depict-ai/ui 2.0.12 → 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.12";
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);
@@ -855,11 +856,12 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
855
856
  }
856
857
  }));
857
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
858
860
  const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
859
861
  let {
860
862
  element: element
861
863
  } = _ref;
862
- return resizeObserver.observe(element);
864
+ return requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
863
865
  });
864
866
  $52FdA$solidjs.onCleanup(() => {
865
867
  resizeObserver.disconnect();
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.12";
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.12";
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);
@@ -796,11 +797,12 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
796
797
  }
797
798
  }));
798
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
799
801
  const disconnect = (0, $8tj43$observer).onexists(whatToWatch, _ref => {
800
802
  let {
801
803
  element: element
802
804
  } = _ref;
803
- return resizeObserver.observe(element);
805
+ return requestAnimationFrame($8tj43$catchify(() => resizeObserver.observe(element)));
804
806
  });
805
807
  $8tj43$onCleanup(() => {
806
808
  resizeObserver.disconnect();
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.12";
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);
@@ -801,9 +802,10 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
801
802
  }
802
803
  }));
803
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
804
806
  const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(whatToWatch, ({
805
807
  element: element
806
- }) => resizeObserver.observe(element));
808
+ }) => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
807
809
  $gVhhF$solidjs.onCleanup(() => {
808
810
  resizeObserver.disconnect();
809
811
  disconnect();
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.12";
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.12";
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);
@@ -745,9 +746,10 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
745
746
  }
746
747
  }));
747
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
748
750
  const disconnect = (0, $9HbP8$observer).onexists(whatToWatch, ({
749
751
  element: element
750
- }) => resizeObserver.observe(element));
752
+ }) => requestAnimationFrame($9HbP8$catchify(() => resizeObserver.observe(element))));
751
753
  $9HbP8$onCleanup(() => {
752
754
  resizeObserver.disconnect();
753
755
  disconnect();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "2.0.12",
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.12";
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);
@@ -774,11 +775,12 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
774
775
  }
775
776
  }));
776
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
777
779
  const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
778
780
  let {
779
781
  element: element
780
782
  } = _ref;
781
- return resizeObserver.observe(element);
783
+ return requestAnimationFrame($3hooq$depictaiutilishared.catchify(() => resizeObserver.observe(element)));
782
784
  });
783
785
  $3hooq$solidjs.onCleanup(() => {
784
786
  resizeObserver.disconnect();
@@ -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.12";
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.12";
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);
@@ -715,11 +716,12 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
715
716
  }
716
717
  }));
717
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
718
720
  const disconnect = (0, $b8hua$observer).onexists(whatToWatch, _ref => {
719
721
  let {
720
722
  element: element
721
723
  } = _ref;
722
- return resizeObserver.observe(element);
724
+ return requestAnimationFrame($b8hua$catchify(() => resizeObserver.observe(element)));
723
725
  });
724
726
  $b8hua$onCleanup(() => {
725
727
  resizeObserver.disconnect();
@@ -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.12";
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);
@@ -729,9 +730,10 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
729
730
  }
730
731
  }));
731
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
732
734
  const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(whatToWatch, ({
733
735
  element: element
734
- }) => resizeObserver.observe(element));
736
+ }) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
735
737
  $5vyXB$solidjs.onCleanup(() => {
736
738
  resizeObserver.disconnect();
737
739
  disconnect();
@@ -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.12";
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.12";
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);
@@ -673,9 +674,10 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
673
674
  }
674
675
  }));
675
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
676
678
  const disconnect = (0, $i7OB2$observer).onexists(whatToWatch, ({
677
679
  element: element
678
- }) => resizeObserver.observe(element));
680
+ }) => requestAnimationFrame($i7OB2$catchify(() => resizeObserver.observe(element))));
679
681
  $i7OB2$onCleanup(() => {
680
682
  resizeObserver.disconnect();
681
683
  disconnect();