@depict-ai/ui 2.0.11 → 2.0.12

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.12";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -854,17 +854,26 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
854
854
  setSize(Math.round(new_size));
855
855
  }
856
856
  }));
857
- resizeObserver.observe(whatToWatch);
858
- $52FdA$solidjs.onCleanup(() => resizeObserver.disconnect());
857
+ // 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.
858
+ const disconnect = (0, $52FdA$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
859
+ let {
860
+ element: element
861
+ } = _ref;
862
+ return resizeObserver.observe(element);
863
+ });
864
+ $52FdA$solidjs.onCleanup(() => {
865
+ resizeObserver.disconnect();
866
+ disconnect();
867
+ });
859
868
  return size;
860
869
  }
861
- function $858fdcf73148519f$export$6e5611bc7e57e477(_ref) {
870
+ function $858fdcf73148519f$export$6e5611bc7e57e477(_ref2) {
862
871
  let {
863
872
  src: raw_src,
864
873
  size: size,
865
874
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
866
875
  ...otherOptions
867
- } = _ref;
876
+ } = _ref2;
868
877
  const src = new URL(raw_src, location.origin);
869
878
  const fallbackSrc = $858fdcf73148519f$var$generateImageUrl(src, 400);
870
879
  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.12";
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.12";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -795,17 +795,26 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
795
795
  setSize(Math.round(new_size));
796
796
  }
797
797
  }));
798
- resizeObserver.observe(whatToWatch);
799
- $8tj43$onCleanup(() => resizeObserver.disconnect());
798
+ // 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.
799
+ const disconnect = (0, $8tj43$observer).onexists(whatToWatch, _ref => {
800
+ let {
801
+ element: element
802
+ } = _ref;
803
+ return resizeObserver.observe(element);
804
+ });
805
+ $8tj43$onCleanup(() => {
806
+ resizeObserver.disconnect();
807
+ disconnect();
808
+ });
800
809
  return size;
801
810
  }
802
- function $56047603f9d212b6$export$6e5611bc7e57e477(_ref) {
811
+ function $56047603f9d212b6$export$6e5611bc7e57e477(_ref2) {
803
812
  let {
804
813
  src: raw_src,
805
814
  size: size,
806
815
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
807
816
  ...otherOptions
808
- } = _ref;
817
+ } = _ref2;
809
818
  const src = new URL(raw_src, location.origin);
810
819
  const fallbackSrc = $56047603f9d212b6$var$generateImageUrl(src, 400);
811
820
  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.12";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -800,8 +800,14 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
800
800
  setSize(Math.round(new_size));
801
801
  }
802
802
  }));
803
- resizeObserver.observe(whatToWatch);
804
- $gVhhF$solidjs.onCleanup(() => resizeObserver.disconnect());
803
+ // 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.
804
+ const disconnect = (0, $gVhhF$depictaiutilishared.observer).onexists(whatToWatch, ({
805
+ element: element
806
+ }) => resizeObserver.observe(element));
807
+ $gVhhF$solidjs.onCleanup(() => {
808
+ resizeObserver.disconnect();
809
+ disconnect();
810
+ });
805
811
  return size;
806
812
  }
807
813
  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.12";
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.12";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -744,8 +744,14 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
744
744
  setSize(Math.round(new_size));
745
745
  }
746
746
  }));
747
- resizeObserver.observe(whatToWatch);
748
- $9HbP8$onCleanup(() => resizeObserver.disconnect());
747
+ // 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.
748
+ const disconnect = (0, $9HbP8$observer).onexists(whatToWatch, ({
749
+ element: element
750
+ }) => resizeObserver.observe(element));
751
+ $9HbP8$onCleanup(() => {
752
+ resizeObserver.disconnect();
753
+ disconnect();
754
+ });
749
755
  return size;
750
756
  }
751
757
  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.12",
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",
@@ -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.12";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -773,17 +773,26 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
773
773
  setSize(Math.round(new_size));
774
774
  }
775
775
  }));
776
- resizeObserver.observe(whatToWatch);
777
- $3hooq$solidjs.onCleanup(() => resizeObserver.disconnect());
776
+ // 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.
777
+ const disconnect = (0, $3hooq$depictaiutilishared.observer).onexists(whatToWatch, _ref => {
778
+ let {
779
+ element: element
780
+ } = _ref;
781
+ return resizeObserver.observe(element);
782
+ });
783
+ $3hooq$solidjs.onCleanup(() => {
784
+ resizeObserver.disconnect();
785
+ disconnect();
786
+ });
778
787
  return size;
779
788
  }
780
- function $858fdcf73148519f$export$6e5611bc7e57e477(_ref) {
789
+ function $858fdcf73148519f$export$6e5611bc7e57e477(_ref2) {
781
790
  let {
782
791
  src: raw_src,
783
792
  size: size,
784
793
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
785
794
  ...otherOptions
786
- } = _ref;
795
+ } = _ref2;
787
796
  const src = new URL(raw_src, location.origin);
788
797
  const fallbackSrc = $858fdcf73148519f$var$generateImageUrl(src, 400);
789
798
  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.12";
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.12";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -714,17 +714,26 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
714
714
  setSize(Math.round(new_size));
715
715
  }
716
716
  }));
717
- resizeObserver.observe(whatToWatch);
718
- $b8hua$onCleanup(() => resizeObserver.disconnect());
717
+ // 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.
718
+ const disconnect = (0, $b8hua$observer).onexists(whatToWatch, _ref => {
719
+ let {
720
+ element: element
721
+ } = _ref;
722
+ return resizeObserver.observe(element);
723
+ });
724
+ $b8hua$onCleanup(() => {
725
+ resizeObserver.disconnect();
726
+ disconnect();
727
+ });
719
728
  return size;
720
729
  }
721
- function $56047603f9d212b6$export$6e5611bc7e57e477(_ref) {
730
+ function $56047603f9d212b6$export$6e5611bc7e57e477(_ref2) {
722
731
  let {
723
732
  src: raw_src,
724
733
  size: size,
725
734
  resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
726
735
  ...otherOptions
727
- } = _ref;
736
+ } = _ref2;
728
737
  const src = new URL(raw_src, location.origin);
729
738
  const fallbackSrc = $56047603f9d212b6$var$generateImageUrl(src, 400);
730
739
  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.12";
65
65
 
66
66
  /** @jsxImportSource solid-js */
67
67
 
@@ -728,8 +728,14 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
728
728
  setSize(Math.round(new_size));
729
729
  }
730
730
  }));
731
- resizeObserver.observe(whatToWatch);
732
- $5vyXB$solidjs.onCleanup(() => resizeObserver.disconnect());
731
+ // 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.
732
+ const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(whatToWatch, ({
733
+ element: element
734
+ }) => resizeObserver.observe(element));
735
+ $5vyXB$solidjs.onCleanup(() => {
736
+ resizeObserver.disconnect();
737
+ disconnect();
738
+ });
733
739
  return size;
734
740
  }
735
741
  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.12";
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.12";
9
9
 
10
10
  /** @jsxImportSource solid-js */
11
11
 
@@ -672,8 +672,14 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
672
672
  setSize(Math.round(new_size));
673
673
  }
674
674
  }));
675
- resizeObserver.observe(whatToWatch);
676
- $i7OB2$onCleanup(() => resizeObserver.disconnect());
675
+ // 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.
676
+ const disconnect = (0, $i7OB2$observer).onexists(whatToWatch, ({
677
+ element: element
678
+ }) => resizeObserver.observe(element));
679
+ $i7OB2$onCleanup(() => {
680
+ resizeObserver.disconnect();
681
+ disconnect();
682
+ });
677
683
  return size;
678
684
  }
679
685
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477({