@depict-ai/ui 3.0.25 → 3.0.27

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
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.25";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.27";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -2006,9 +2006,7 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
2006
2006
  width: width
2007
2007
  } = records[j].contentRect;
2008
2008
  if (!width) continue;
2009
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
2010
- const new_size = width * 1.05 * ((0, $52FdA$depictaiutilishared.is_safari) ? 4 / 3 : 1);
2011
- setSize(Math.round(new_size));
2009
+ setSize(Math.round(width));
2012
2010
  }
2013
2011
  }));
2014
2012
  // 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.
@@ -2042,10 +2040,11 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
2042
2040
  const src_options = $52FdA$solidjs.createMemo(() => {
2043
2041
  const src = new URL(props.src, location.origin);
2044
2042
  const fallback_src = $858fdcf73148519f$var$generateImageUrl(src, 400);
2045
- const srcset = $858fdcf73148519f$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2043
+ const srcset = $858fdcf73148519f$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2044
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2046
2045
  return {
2047
- src: fallback_src,
2048
- srcset: srcset
2046
+ srcset: srcset,
2047
+ src: fallback_src
2049
2048
  };
2050
2049
  });
2051
2050
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -2179,7 +2178,7 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
2179
2178
  $52FdA$depictaiutilishared.queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
2180
2179
  });
2181
2180
 
2182
- $52FdA$solidjsweb.insert(container, $52FdA$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), {
2181
+ $52FdA$solidjsweb.insert(container, $52FdA$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $52FdA$solidjsweb.mergeProps({
2183
2182
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
2184
2183
  get size() {
2185
2184
  return $52FdA$solidjs.createMemo(() => {
@@ -2189,11 +2188,8 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
2189
2188
  },
2190
2189
  get src() {
2191
2190
  return props.src;
2192
- },
2193
- get alt() {
2194
- return props.alt;
2195
2191
  }
2196
- }));
2192
+ }, () => props.imgProps)));
2197
2193
  return container;
2198
2194
  }
2199
2195
 
package/ES10/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.25";
13
+ export const version = "3.0.27";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -559,12 +559,13 @@ export const shopifyContainedImageContextSymbol: unique symbol;
559
559
  * @property aspectRatio aspect ratio of the image
560
560
  * @property class extra class to add to the container
561
561
  * @property alt alt text for the image
562
+ * @property imgProps props to pass to ShopifyResponsiveImg to add to the <img> element
562
563
  */
563
564
  export function ShopifyContainedImage(props: {
564
565
  src: string;
565
566
  aspectRatio: number;
566
567
  class?: string;
567
- alt?: string;
568
+ imgProps?: Omit<Parameters<typeof ShopifyResponsiveImg>[0], "size" | "src">;
568
569
  }): HTMLDivElement;
569
570
  /**
570
571
  * Returns accessor with the size of the provided element, including padding and border (I think)
package/ES10/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $8tj43$add_to_version_info, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, catchify as $8tj43$catchify1, observer as $8tj43$observer, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, report as $8tj43$report, dlog as $8tj43$dlog, ContainedImage as $8tj43$ContainedImage, use_href_accessor as $8tj43$use_href_accessor1, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_safari as $8tj43$is_safari, slider_fractional_factory as $8tj43$slider_fractional_factory, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, fetch_retry as $8tj43$fetch_retry, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, javascript_media_query as $8tj43$javascript_media_query, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet1, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $8tj43$add_to_version_info, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, catchify as $8tj43$catchify1, observer as $8tj43$observer, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, report as $8tj43$report, dlog as $8tj43$dlog, ContainedImage as $8tj43$ContainedImage, use_href_accessor as $8tj43$use_href_accessor1, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, slider_fractional_factory as $8tj43$slider_fractional_factory, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, fetch_retry as $8tj43$fetch_retry, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, javascript_media_query as $8tj43$javascript_media_query, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet1, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
2
  import { template as $8tj43$template, createComponent as $8tj43$createComponent, mergeProps as $8tj43$mergeProps, Dynamic as $8tj43$Dynamic, memo as $8tj43$memo, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, isServer as $8tj43$isServer, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, use as $8tj43$use, addEventListener as $8tj43$addEventListener, getNextMarker as $8tj43$getNextMarker, delegateEvents as $8tj43$delegateEvents, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, setProperty as $8tj43$setProperty } from "solid-js/web";
3
3
  import { createContext as $8tj43$createContext, useContext as $8tj43$useContext, createSignal as $8tj43$createSignal, createSelector as $8tj43$createSelector, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, Index as $8tj43$Index, createMemo as $8tj43$createMemo, children as $8tj43$children, onCleanup as $8tj43$onCleanup, createEffect as $8tj43$createEffect, untrack as $8tj43$untrack, Show as $8tj43$Show, createUniqueId as $8tj43$createUniqueId, mergeProps as $8tj43$mergeProps1, ErrorBoundary as $8tj43$ErrorBoundary, createResource as $8tj43$createResource, splitProps as $8tj43$splitProps, createRoot as $8tj43$createRoot, createRenderEffect as $8tj43$createRenderEffect, batch as $8tj43$batch, Suspense as $8tj43$Suspense, on as $8tj43$on, For as $8tj43$For, createComputed as $8tj43$createComputed, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
4
4
  import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify, use_href_accessor as $8tj43$use_href_accessor, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.25";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.27";
14
14
  const $ca6ab5f08bd28bca$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
15
15
  function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
16
16
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -1933,9 +1933,7 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
1933
1933
  width: width
1934
1934
  } = records[j].contentRect;
1935
1935
  if (!width) continue;
1936
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1937
- const new_size = width * 1.05 * ((0, $8tj43$is_safari) ? 4 / 3 : 1);
1938
- setSize(Math.round(new_size));
1936
+ setSize(Math.round(width));
1939
1937
  }
1940
1938
  }));
1941
1939
  // 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.
@@ -1969,10 +1967,11 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1969
1967
  const src_options = $8tj43$createMemo(() => {
1970
1968
  const src = new URL(props.src, location.origin);
1971
1969
  const fallback_src = $56047603f9d212b6$var$generateImageUrl(src, 400);
1972
- const srcset = $56047603f9d212b6$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1970
+ const srcset = $56047603f9d212b6$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1971
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1973
1972
  return {
1974
- src: fallback_src,
1975
- srcset: srcset
1973
+ srcset: srcset,
1974
+ src: fallback_src
1976
1975
  };
1977
1976
  });
1978
1977
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -2106,7 +2105,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
2106
2105
  $8tj43$queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
2107
2106
  });
2108
2107
 
2109
- $8tj43$insert(container, $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), {
2108
+ $8tj43$insert(container, $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $8tj43$mergeProps({
2110
2109
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
2111
2110
  get size() {
2112
2111
  return $8tj43$createMemo(() => {
@@ -2116,11 +2115,8 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
2116
2115
  },
2117
2116
  get src() {
2118
2117
  return props.src;
2119
- },
2120
- get alt() {
2121
- return props.alt;
2122
2118
  }
2123
- }));
2119
+ }, () => props.imgProps)));
2124
2120
  return container;
2125
2121
  }
2126
2122
 
package/latest/index.cjs CHANGED
@@ -77,7 +77,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
77
77
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
78
78
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
79
79
  /*! Depict.ai search and product listing SDK */
80
- const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.25";
80
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.27";
81
81
  const $0f313083912e447a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
82
82
  function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
83
83
  return (() => {
@@ -1902,9 +1902,7 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
1902
1902
  width: width
1903
1903
  } = records[j].contentRect;
1904
1904
  if (!width) continue;
1905
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1906
- const new_size = width * 1.05 * ((0, $gVhhF$depictaiutilishared.is_safari) ? 4 / 3 : 1);
1907
- setSize(Math.round(new_size));
1905
+ setSize(Math.round(width));
1908
1906
  }
1909
1907
  }));
1910
1908
  // 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.
@@ -1935,10 +1933,11 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1935
1933
  const src_options = $gVhhF$solidjs.createMemo(() => {
1936
1934
  const src = new URL(props.src, location.origin);
1937
1935
  const fallback_src = $19950faaac026e09$var$generateImageUrl(src, 400);
1938
- const srcset = $19950faaac026e09$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1936
+ const srcset = $19950faaac026e09$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1937
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1939
1938
  return {
1940
- src: fallback_src,
1941
- srcset: srcset
1939
+ srcset: srcset,
1940
+ src: fallback_src
1942
1941
  };
1943
1942
  });
1944
1943
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -2072,18 +2071,15 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
2072
2071
  $gVhhF$depictaiutilishared.queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
2073
2072
  });
2074
2073
 
2075
- $gVhhF$solidjsweb.insert(container, $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
2074
+ $gVhhF$solidjsweb.insert(container, $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $gVhhF$solidjsweb.mergeProps({
2076
2075
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
2077
2076
  get size() {
2078
2077
  return $gVhhF$solidjs.createMemo(() => currentImageSize()?.() || 0);
2079
2078
  },
2080
2079
  get src() {
2081
2080
  return props.src;
2082
- },
2083
- get alt() {
2084
- return props.alt;
2085
2081
  }
2086
- }));
2082
+ }, () => props.imgProps)));
2087
2083
  return container;
2088
2084
  }
2089
2085
 
package/latest/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.25";
13
+ export const version = "3.0.27";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -559,12 +559,13 @@ export const shopifyContainedImageContextSymbol: unique symbol;
559
559
  * @property aspectRatio aspect ratio of the image
560
560
  * @property class extra class to add to the container
561
561
  * @property alt alt text for the image
562
+ * @property imgProps props to pass to ShopifyResponsiveImg to add to the <img> element
562
563
  */
563
564
  export function ShopifyContainedImage(props: {
564
565
  src: string;
565
566
  aspectRatio: number;
566
567
  class?: string;
567
- alt?: string;
568
+ imgProps?: Omit<Parameters<typeof ShopifyResponsiveImg>[0], "size" | "src">;
568
569
  }): HTMLDivElement;
569
570
  /**
570
571
  * Returns accessor with the size of the provided element, including padding and border (I think)
package/latest/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $9HbP8$add_to_version_info, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, catchify as $9HbP8$catchify1, observer as $9HbP8$observer, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, report as $9HbP8$report, dlog as $9HbP8$dlog, ContainedImage as $9HbP8$ContainedImage, use_href_accessor as $9HbP8$use_href_accessor1, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_safari as $9HbP8$is_safari, slider_fractional_factory as $9HbP8$slider_fractional_factory, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, fetch_retry as $9HbP8$fetch_retry, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, javascript_media_query as $9HbP8$javascript_media_query, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
1
+ import { add_to_version_info as $9HbP8$add_to_version_info, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, catchify as $9HbP8$catchify1, observer as $9HbP8$observer, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, report as $9HbP8$report, dlog as $9HbP8$dlog, ContainedImage as $9HbP8$ContainedImage, use_href_accessor as $9HbP8$use_href_accessor1, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, slider_fractional_factory as $9HbP8$slider_fractional_factory, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, fetch_retry as $9HbP8$fetch_retry, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, javascript_media_query as $9HbP8$javascript_media_query, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
2
2
  import { template as $9HbP8$template, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, Dynamic as $9HbP8$Dynamic, memo as $9HbP8$memo, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, effect as $9HbP8$effect, setAttribute as $9HbP8$setAttribute, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, use as $9HbP8$use, addEventListener as $9HbP8$addEventListener, getNextMarker as $9HbP8$getNextMarker, delegateEvents as $9HbP8$delegateEvents, classList as $9HbP8$classList, className as $9HbP8$className, style as $9HbP8$style, setProperty as $9HbP8$setProperty } from "solid-js/web";
3
3
  import { createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createSignal as $9HbP8$createSignal, createSelector as $9HbP8$createSelector, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, Index as $9HbP8$Index, createMemo as $9HbP8$createMemo, children as $9HbP8$children, onCleanup as $9HbP8$onCleanup, createEffect as $9HbP8$createEffect, untrack as $9HbP8$untrack, Show as $9HbP8$Show, createUniqueId as $9HbP8$createUniqueId, mergeProps as $9HbP8$mergeProps1, ErrorBoundary as $9HbP8$ErrorBoundary, createResource as $9HbP8$createResource, splitProps as $9HbP8$splitProps, createRoot as $9HbP8$createRoot, createRenderEffect as $9HbP8$createRenderEffect, batch as $9HbP8$batch, Suspense as $9HbP8$Suspense, on as $9HbP8$on, For as $9HbP8$For, createComputed as $9HbP8$createComputed, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
4
4
  import { ListenableSet as $9HbP8$ListenableSet, catchify as $9HbP8$catchify, use_href_accessor as $9HbP8$use_href_accessor, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.25";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.27";
11
11
  const $fbbadcb080ad1d4a$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0"fill=#0f0f0f>`);
12
12
  function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
13
13
  return (() => {
@@ -1832,9 +1832,7 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
1832
1832
  width: width
1833
1833
  } = records[j].contentRect;
1834
1834
  if (!width) continue;
1835
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1836
- const new_size = width * 1.05 * ((0, $9HbP8$is_safari) ? 4 / 3 : 1);
1837
- setSize(Math.round(new_size));
1835
+ setSize(Math.round(width));
1838
1836
  }
1839
1837
  }));
1840
1838
  // 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.
@@ -1865,10 +1863,11 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
1865
1863
  const src_options = $9HbP8$createMemo(() => {
1866
1864
  const src = new URL(props.src, location.origin);
1867
1865
  const fallback_src = $e8ffe11ed01df0fe$var$generateImageUrl(src, 400);
1868
- const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1866
+ const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1867
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1869
1868
  return {
1870
- src: fallback_src,
1871
- srcset: srcset
1869
+ srcset: srcset,
1870
+ src: fallback_src
1872
1871
  };
1873
1872
  });
1874
1873
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -2002,18 +2001,15 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
2002
2001
  $9HbP8$queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
2003
2002
  });
2004
2003
 
2005
- $9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
2004
+ $9HbP8$insert(container, $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps({
2006
2005
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
2007
2006
  get size() {
2008
2007
  return $9HbP8$createMemo(() => currentImageSize()?.() || 0);
2009
2008
  },
2010
2009
  get src() {
2011
2010
  return props.src;
2012
- },
2013
- get alt() {
2014
- return props.alt;
2015
2011
  }
2016
- }));
2012
+ }, () => props.imgProps)));
2017
2013
  return container;
2018
2014
  }
2019
2015
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "3.0.25",
3
+ "version": "3.0.27",
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",
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.25";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.27";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  var _$escape2, _$escape3;
@@ -1753,9 +1753,7 @@ function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
1753
1753
  width: width
1754
1754
  } = records[j].contentRect;
1755
1755
  if (!width) continue;
1756
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1757
- const new_size = width * 1.05 * ((0, $3hooq$depictaiutilishared.is_safari) ? 4 / 3 : 1);
1758
- setSize(Math.round(new_size));
1756
+ setSize(Math.round(width));
1759
1757
  }
1760
1758
  }));
1761
1759
  // 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.
@@ -1789,10 +1787,11 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
1789
1787
  const src_options = $3hooq$solidjs.createMemo(() => {
1790
1788
  const src = new URL(props.src, location.origin);
1791
1789
  const fallback_src = $858fdcf73148519f$var$generateImageUrl(src, 400);
1792
- const srcset = $858fdcf73148519f$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1790
+ const srcset = $858fdcf73148519f$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1791
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1793
1792
  return {
1794
- src: fallback_src,
1795
- srcset: srcset
1793
+ srcset: srcset,
1794
+ src: fallback_src
1796
1795
  };
1797
1796
  });
1798
1797
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -1926,7 +1925,7 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
1926
1925
  $3hooq$depictaiutilishared.queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
1927
1926
  });
1928
1927
 
1929
- $3hooq$solidjsweb.insert(container, $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), {
1928
+ $3hooq$solidjsweb.insert(container, $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $3hooq$solidjsweb.mergeProps({
1930
1929
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
1931
1930
  get size() {
1932
1931
  return $3hooq$solidjs.createMemo(() => {
@@ -1936,11 +1935,8 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
1936
1935
  },
1937
1936
  get src() {
1938
1937
  return props.src;
1939
- },
1940
- get alt() {
1941
- return props.alt;
1942
1938
  }
1943
- }));
1939
+ }, () => props.imgProps)));
1944
1940
  return container;
1945
1941
  }
1946
1942
 
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.25";
13
+ export const version = "3.0.27";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -559,12 +559,13 @@ export const shopifyContainedImageContextSymbol: unique symbol;
559
559
  * @property aspectRatio aspect ratio of the image
560
560
  * @property class extra class to add to the container
561
561
  * @property alt alt text for the image
562
+ * @property imgProps props to pass to ShopifyResponsiveImg to add to the <img> element
562
563
  */
563
564
  export function ShopifyContainedImage(props: {
564
565
  src: string;
565
566
  aspectRatio: number;
566
567
  class?: string;
567
- alt?: string;
568
+ imgProps?: Omit<Parameters<typeof ShopifyResponsiveImg>[0], "size" | "src">;
568
569
  }): HTMLDivElement;
569
570
  /**
570
571
  * Returns accessor with the size of the provided element, including padding and border (I think)
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $b8hua$add_to_version_info, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, catchify as $b8hua$catchify1, observer as $b8hua$observer, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, report as $b8hua$report, dlog as $b8hua$dlog, ContainedImage as $b8hua$ContainedImage, use_href_accessor as $b8hua$use_href_accessor1, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, is_safari as $b8hua$is_safari, slider_fractional_factory as $b8hua$slider_fractional_factory, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, fetch_retry as $b8hua$fetch_retry, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, javascript_media_query as $b8hua$javascript_media_query, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $b8hua$add_to_version_info, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, catchify as $b8hua$catchify1, observer as $b8hua$observer, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, report as $b8hua$report, dlog as $b8hua$dlog, ContainedImage as $b8hua$ContainedImage, use_href_accessor as $b8hua$use_href_accessor1, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, slider_fractional_factory as $b8hua$slider_fractional_factory, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, fetch_retry as $b8hua$fetch_retry, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, javascript_media_query as $b8hua$javascript_media_query, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
2
  import { createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, Dynamic as $b8hua$Dynamic, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, ssrAttribute as $b8hua$ssrAttribute, isServer as $b8hua$isServer, insert as $b8hua$insert, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, ssrStyle as $b8hua$ssrStyle, spread as $b8hua$spread } from "solid-js/web";
3
3
  import { createContext as $b8hua$createContext, useContext as $b8hua$useContext, createSignal as $b8hua$createSignal, createSelector as $b8hua$createSelector, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, Index as $b8hua$Index, createMemo as $b8hua$createMemo, children as $b8hua$children, onCleanup as $b8hua$onCleanup, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, Show as $b8hua$Show, createUniqueId as $b8hua$createUniqueId, mergeProps as $b8hua$mergeProps1, ErrorBoundary as $b8hua$ErrorBoundary, createResource as $b8hua$createResource, splitProps as $b8hua$splitProps, createRoot as $b8hua$createRoot, createRenderEffect as $b8hua$createRenderEffect, batch as $b8hua$batch, Suspense as $b8hua$Suspense, on as $b8hua$on, For as $b8hua$For, createComputed as $b8hua$createComputed, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
4
4
  import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify, use_href_accessor as $b8hua$use_href_accessor, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.25";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.27";
14
14
  const $ca6ab5f08bd28bca$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
15
15
  function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
16
16
  var _$escape2, _$escape3;
@@ -1680,9 +1680,7 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
1680
1680
  width: width
1681
1681
  } = records[j].contentRect;
1682
1682
  if (!width) continue;
1683
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1684
- const new_size = width * 1.05 * ((0, $b8hua$is_safari) ? 4 / 3 : 1);
1685
- setSize(Math.round(new_size));
1683
+ setSize(Math.round(width));
1686
1684
  }
1687
1685
  }));
1688
1686
  // 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.
@@ -1716,10 +1714,11 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1716
1714
  const src_options = $b8hua$createMemo(() => {
1717
1715
  const src = new URL(props.src, location.origin);
1718
1716
  const fallback_src = $56047603f9d212b6$var$generateImageUrl(src, 400);
1719
- const srcset = $56047603f9d212b6$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1717
+ const srcset = $56047603f9d212b6$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1718
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1720
1719
  return {
1721
- src: fallback_src,
1722
- srcset: srcset
1720
+ srcset: srcset,
1721
+ src: fallback_src
1723
1722
  };
1724
1723
  });
1725
1724
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -1853,7 +1852,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
1853
1852
  $b8hua$queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
1854
1853
  });
1855
1854
 
1856
- $b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), {
1855
+ $b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$mergeProps({
1857
1856
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
1858
1857
  get size() {
1859
1858
  return $b8hua$createMemo(() => {
@@ -1863,11 +1862,8 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
1863
1862
  },
1864
1863
  get src() {
1865
1864
  return props.src;
1866
- },
1867
- get alt() {
1868
- return props.alt;
1869
1865
  }
1870
- }));
1866
+ }, () => props.imgProps)));
1871
1867
  return container;
1872
1868
  }
1873
1869
 
@@ -77,7 +77,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
77
77
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
78
78
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
79
79
  /*! Depict.ai search and product listing SDK */
80
- const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.25";
80
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.27";
81
81
  const $0f313083912e447a$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
82
82
  function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
83
83
  return $5vyXB$solidjsweb.ssr($0f313083912e447a$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("width", $5vyXB$solidjsweb.escape(props.width_, true) ?? 14, false) + $5vyXB$solidjsweb.ssrAttribute("height", $5vyXB$solidjsweb.escape(props.height_, true) ?? 26, false));
@@ -1664,9 +1664,7 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
1664
1664
  width: width
1665
1665
  } = records[j].contentRect;
1666
1666
  if (!width) continue;
1667
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1668
- const new_size = width * 1.05 * ((0, $5vyXB$depictaiutilishared.is_safari) ? 4 / 3 : 1);
1669
- setSize(Math.round(new_size));
1667
+ setSize(Math.round(width));
1670
1668
  }
1671
1669
  }));
1672
1670
  // 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.
@@ -1697,10 +1695,11 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1697
1695
  const src_options = $5vyXB$solidjs.createMemo(() => {
1698
1696
  const src = new URL(props.src, location.origin);
1699
1697
  const fallback_src = $19950faaac026e09$var$generateImageUrl(src, 400);
1700
- const srcset = $19950faaac026e09$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1698
+ const srcset = $19950faaac026e09$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1699
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1701
1700
  return {
1702
- src: fallback_src,
1703
- srcset: srcset
1701
+ srcset: srcset,
1702
+ src: fallback_src
1704
1703
  };
1705
1704
  });
1706
1705
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -1834,18 +1833,15 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
1834
1833
  $5vyXB$depictaiutilishared.queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
1835
1834
  });
1836
1835
 
1837
- $5vyXB$solidjsweb.insert(container, $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
1836
+ $5vyXB$solidjsweb.insert(container, $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $5vyXB$solidjsweb.mergeProps({
1838
1837
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
1839
1838
  get size() {
1840
1839
  return $5vyXB$solidjs.createMemo(() => currentImageSize()?.() || 0);
1841
1840
  },
1842
1841
  get src() {
1843
1842
  return props.src;
1844
- },
1845
- get alt() {
1846
- return props.alt;
1847
1843
  }
1848
- }));
1844
+ }, () => props.imgProps)));
1849
1845
  return container;
1850
1846
  }
1851
1847
 
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.25";
13
+ export const version = "3.0.27";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -559,12 +559,13 @@ export const shopifyContainedImageContextSymbol: unique symbol;
559
559
  * @property aspectRatio aspect ratio of the image
560
560
  * @property class extra class to add to the container
561
561
  * @property alt alt text for the image
562
+ * @property imgProps props to pass to ShopifyResponsiveImg to add to the <img> element
562
563
  */
563
564
  export function ShopifyContainedImage(props: {
564
565
  src: string;
565
566
  aspectRatio: number;
566
567
  class?: string;
567
- alt?: string;
568
+ imgProps?: Omit<Parameters<typeof ShopifyResponsiveImg>[0], "size" | "src">;
568
569
  }): HTMLDivElement;
569
570
  /**
570
571
  * Returns accessor with the size of the provided element, including padding and border (I think)
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $i7OB2$add_to_version_info, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, catchify as $i7OB2$catchify1, observer as $i7OB2$observer, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, report as $i7OB2$report, dlog as $i7OB2$dlog, ContainedImage as $i7OB2$ContainedImage, use_href_accessor as $i7OB2$use_href_accessor1, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, queueMacroTask as $i7OB2$queueMacroTask, is_safari as $i7OB2$is_safari, slider_fractional_factory as $i7OB2$slider_fractional_factory, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, fetch_retry as $i7OB2$fetch_retry, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, javascript_media_query as $i7OB2$javascript_media_query, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
1
+ import { add_to_version_info as $i7OB2$add_to_version_info, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, catchify as $i7OB2$catchify1, observer as $i7OB2$observer, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, report as $i7OB2$report, dlog as $i7OB2$dlog, ContainedImage as $i7OB2$ContainedImage, use_href_accessor as $i7OB2$use_href_accessor1, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, queueMacroTask as $i7OB2$queueMacroTask, slider_fractional_factory as $i7OB2$slider_fractional_factory, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, fetch_retry as $i7OB2$fetch_retry, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, javascript_media_query as $i7OB2$javascript_media_query, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
2
  import { createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, Dynamic as $i7OB2$Dynamic, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, ssrAttribute as $i7OB2$ssrAttribute, isServer as $i7OB2$isServer, insert as $i7OB2$insert, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, ssrStyle as $i7OB2$ssrStyle, spread as $i7OB2$spread } from "solid-js/web";
3
3
  import { createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createSignal as $i7OB2$createSignal, createSelector as $i7OB2$createSelector, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, Index as $i7OB2$Index, createMemo as $i7OB2$createMemo, children as $i7OB2$children, onCleanup as $i7OB2$onCleanup, createEffect as $i7OB2$createEffect, untrack as $i7OB2$untrack, Show as $i7OB2$Show, createUniqueId as $i7OB2$createUniqueId, mergeProps as $i7OB2$mergeProps1, ErrorBoundary as $i7OB2$ErrorBoundary, createResource as $i7OB2$createResource, splitProps as $i7OB2$splitProps, createRoot as $i7OB2$createRoot, createRenderEffect as $i7OB2$createRenderEffect, batch as $i7OB2$batch, Suspense as $i7OB2$Suspense, on as $i7OB2$on, For as $i7OB2$For, createComputed as $i7OB2$createComputed, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
4
4
  import { ListenableSet as $i7OB2$ListenableSet, catchify as $i7OB2$catchify, use_href_accessor as $i7OB2$use_href_accessor, report as $i7OB2$report1 } from "@depict-ai/utilishared/latest";
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.25";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.27";
11
11
  const $fbbadcb080ad1d4a$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg"', ' viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>'];
12
12
  function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
13
13
  return $i7OB2$ssr($fbbadcb080ad1d4a$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("width", $i7OB2$escape(props.width_, true) ?? 14, false) + $i7OB2$ssrAttribute("height", $i7OB2$escape(props.height_, true) ?? 26, false));
@@ -1594,9 +1594,7 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
1594
1594
  width: width
1595
1595
  } = records[j].contentRect;
1596
1596
  if (!width) continue;
1597
- // add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
1598
- const new_size = width * 1.05 * ((0, $i7OB2$is_safari) ? 4 / 3 : 1);
1599
- setSize(Math.round(new_size));
1597
+ setSize(Math.round(width));
1600
1598
  }
1601
1599
  }));
1602
1600
  // 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.
@@ -1627,10 +1625,11 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
1627
1625
  const src_options = $i7OB2$createMemo(() => {
1628
1626
  const src = new URL(props.src, location.origin);
1629
1627
  const fallback_src = $e8ffe11ed01df0fe$var$generateImageUrl(src, 400);
1630
- const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1628
+ const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1629
+ // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1631
1630
  return {
1632
- src: fallback_src,
1633
- srcset: srcset
1631
+ srcset: srcset,
1632
+ src: fallback_src
1634
1633
  };
1635
1634
  });
1636
1635
  // Work around https://github.com/solidjs/solid/issues/1828
@@ -1764,18 +1763,15 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1764
1763
  $i7OB2$queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
1765
1764
  });
1766
1765
 
1767
- $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
1766
+ $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $i7OB2$mergeProps({
1768
1767
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
1769
1768
  get size() {
1770
1769
  return $i7OB2$createMemo(() => currentImageSize()?.() || 0);
1771
1770
  },
1772
1771
  get src() {
1773
1772
  return props.src;
1774
- },
1775
- get alt() {
1776
- return props.alt;
1777
1773
  }
1778
- }));
1774
+ }, () => props.imgProps)));
1779
1775
  return container;
1780
1776
  }
1781
1777