@depict-ai/ui 4.1.1 → 4.1.3

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
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
98
98
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
99
99
  $parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
100
100
  /*! Depict.ai search and product listing SDK */
101
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.1";
101
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.3";
102
102
  const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
103
103
  let $cfcd56242923775d$var$has_ran = false;
104
104
  function $cfcd56242923775d$export$5162a71f252e6122() {
@@ -2645,8 +2645,12 @@ const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
2645
2645
  const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
2646
2646
  function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
2647
2647
  const src_options = $52FdA$solidjs.createMemo(() => {
2648
- const fallback_src = $858fdcf73148519f$var$generateImageUrl(props.src, 400);
2649
- const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2648
+ const {
2649
+ src: src,
2650
+ customGenerateImageUrl_: customGenerateImageUrl_
2651
+ } = props;
2652
+ const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$var$generateImageUrl)(src, 400);
2653
+ const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
2650
2654
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2651
2655
  return {
2652
2656
  srcset: srcset,
@@ -2786,8 +2790,8 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
2786
2790
  children: img
2787
2791
  });
2788
2792
  }
2789
- function $858fdcf73148519f$var$make_srcset(url, resolutions) {
2790
- return resolutions.map(width => "".concat($858fdcf73148519f$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
2793
+ function $858fdcf73148519f$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2794
+ return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$var$generateImageUrl)(url, width), " ").concat(width, "w")).join(", ");
2791
2795
  }
2792
2796
  function $858fdcf73148519f$var$generateImageUrl(url, width) {
2793
2797
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2852,14 +2856,13 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
2852
2856
  return container;
2853
2857
  }
2854
2858
  function $9e470232a6b789a3$export$9d4a4b669b1929ab(props) {
2855
- const src = $52FdA$solidjs.createMemo(() => {
2856
- const urlObject = new URL("https://img.depict.ai/ResizeImage/".concat(props.merchant_, "?format=webp"));
2857
- urlObject.searchParams.set("url", props.src);
2858
- return urlObject.href;
2859
- });
2860
2859
  return $52FdA$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $52FdA$solidjsweb.mergeProps(props, {
2861
- get src() {
2862
- return src();
2860
+ get imgProps() {
2861
+ return {
2862
+ ...props.imgProps,
2863
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2864
+ ) => "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url)
2865
+ };
2863
2866
  }
2864
2867
  }));
2865
2868
  }
@@ -2912,8 +2915,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
2912
2915
  return _el$;
2913
2916
  })();
2914
2917
  const image_urls = $52FdA$solidjs.createMemo(() => {
2915
- var _listing_2;
2916
- return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : _listing_2.image_urls;
2918
+ var _listing_2, _listing_2$image_urls;
2919
+ return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : (_listing_2$image_urls = _listing_2.image_urls) === null || _listing_2$image_urls === void 0 ? void 0 : _listing_2$image_urls.slice(0, 3);
2917
2920
  });
2918
2921
  const [isSelected, selectedDueToKeyboardNavigation] = $b0f8d9f49e018db9$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2919
2922
  const crumbData = $52FdA$solidjs.createMemo(() => {
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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.1.1";
13
+ export const version = "4.1.3";
14
14
  export const prefixes_to_preserve_in_history_dot_state: Set<string>;
15
15
  /**
16
16
  * Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
@@ -434,10 +434,10 @@ export function makeSizeAccessor(whatToWatch: HTMLElement): Accessor<number>;
434
434
  export function ShopifyResponsiveImg(props: {
435
435
  resolutions?: number[];
436
436
  size: Accessor<number>;
437
- } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading"> & {
438
437
  src: string;
439
438
  loading?: "eager" | "lazy" | "force-lazy";
440
- }): JSX.Element;
439
+ customGenerateImageUrl_?: (url: string, width: number) => string;
440
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading">): JSX.Element;
441
441
  type ImagePlaceholderBaseOptions = {
442
442
  style?: JSX.CSSProperties;
443
443
  class?: string;
@@ -1246,7 +1246,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1246
1246
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1247
1247
  content_blocks_by_row?: ContentBlocksByRow;
1248
1248
  layout?: PossibleLayout;
1249
- }): import("@depict-ai/utilishared/latest").Node_Array;
1249
+ }): import("@depict-ai/utilishared").Node_Array;
1250
1250
  export function BreadCrumbs<T extends Display>({
1251
1251
  depict_category
1252
1252
  }: {
@@ -1386,7 +1386,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1386
1386
  * Open the modal with support for alignment.
1387
1387
  * @returns {void}
1388
1388
  */
1389
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1389
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1390
1390
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1391
1391
  export interface PageReplacer {
1392
1392
  readonly render_: () => Node_Array;
package/ES10/index.js CHANGED
@@ -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 = "4.1.1";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.3";
14
14
  const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
15
15
  let $68e6625c8d51f847$var$has_ran = false;
16
16
  function $68e6625c8d51f847$export$5162a71f252e6122() {
@@ -2557,8 +2557,12 @@ const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
2557
2557
  const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
2558
2558
  function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
2559
2559
  const src_options = $8tj43$createMemo(() => {
2560
- const fallback_src = $56047603f9d212b6$var$generateImageUrl(props.src, 400);
2561
- const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2560
+ const {
2561
+ src: src,
2562
+ customGenerateImageUrl_: customGenerateImageUrl_
2563
+ } = props;
2564
+ const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$var$generateImageUrl)(src, 400);
2565
+ const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
2562
2566
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2563
2567
  return {
2564
2568
  srcset: srcset,
@@ -2698,8 +2702,8 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
2698
2702
  children: img
2699
2703
  });
2700
2704
  }
2701
- function $56047603f9d212b6$var$make_srcset(url, resolutions) {
2702
- return resolutions.map(width => "".concat($56047603f9d212b6$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
2705
+ function $56047603f9d212b6$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2706
+ return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$var$generateImageUrl)(url, width), " ").concat(width, "w")).join(", ");
2703
2707
  }
2704
2708
  function $56047603f9d212b6$var$generateImageUrl(url, width) {
2705
2709
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2764,14 +2768,13 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
2764
2768
  return container;
2765
2769
  }
2766
2770
  function $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab(props) {
2767
- const src = $8tj43$createMemo(() => {
2768
- const urlObject = new URL("https://img.depict.ai/ResizeImage/".concat(props.merchant_, "?format=webp"));
2769
- urlObject.searchParams.set("url", props.src);
2770
- return urlObject.href;
2771
- });
2772
2771
  return $8tj43$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $8tj43$mergeProps(props, {
2773
- get src() {
2774
- return src();
2772
+ get imgProps() {
2773
+ return {
2774
+ ...props.imgProps,
2775
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2776
+ ) => "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url)
2777
+ };
2775
2778
  }
2776
2779
  }));
2777
2780
  }
@@ -2824,8 +2827,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
2824
2827
  return _el$;
2825
2828
  })();
2826
2829
  const image_urls = $8tj43$createMemo(() => {
2827
- var _listing_2;
2828
- return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : _listing_2.image_urls;
2830
+ var _listing_2, _listing_2$image_urls;
2831
+ return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : (_listing_2$image_urls = _listing_2.image_urls) === null || _listing_2$image_urls === void 0 ? void 0 : _listing_2$image_urls.slice(0, 3);
2829
2832
  });
2830
2833
  const [isSelected, selectedDueToKeyboardNavigation] = $d0883254246d3eb6$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2831
2834
  const crumbData = $8tj43$createMemo(() => {
package/latest/index.cjs CHANGED
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
92
92
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
93
93
  $parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
94
94
  /*! Depict.ai search and product listing SDK */
95
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.1";
95
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.3";
96
96
  const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
97
97
  let $d84fe647b84b5dc5$var$has_ran = false;
98
98
  function $d84fe647b84b5dc5$export$5162a71f252e6122() {
@@ -2539,8 +2539,12 @@ const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
2539
2539
  const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
2540
2540
  function $19950faaac026e09$export$6e5611bc7e57e477(props) {
2541
2541
  const src_options = $gVhhF$solidjs.createMemo(() => {
2542
- const fallback_src = $19950faaac026e09$var$generateImageUrl(props.src, 400);
2543
- const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2542
+ const {
2543
+ src: src,
2544
+ customGenerateImageUrl_: customGenerateImageUrl_
2545
+ } = props;
2546
+ const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$var$generateImageUrl)(src, 400);
2547
+ const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
2544
2548
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2545
2549
  return {
2546
2550
  srcset: srcset,
@@ -2677,8 +2681,8 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
2677
2681
  children: img
2678
2682
  });
2679
2683
  }
2680
- function $19950faaac026e09$var$make_srcset(url, resolutions) {
2681
- return resolutions.map(width => `${$19950faaac026e09$var$generateImageUrl(url, width)} ${width}w`).join(", ");
2684
+ function $19950faaac026e09$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2685
+ return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$var$generateImageUrl)(url, width)} ${width}w`).join(", ");
2682
2686
  }
2683
2687
  function $19950faaac026e09$var$generateImageUrl(url, width) {
2684
2688
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2741,14 +2745,13 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
2741
2745
  return container;
2742
2746
  }
2743
2747
  function $e8327f98c8ee28d7$export$9d4a4b669b1929ab(props) {
2744
- const src = $gVhhF$solidjs.createMemo(() => {
2745
- const urlObject = new URL(`https://img.depict.ai/ResizeImage/${props.merchant_}?format=webp`);
2746
- urlObject.searchParams.set("url", props.src);
2747
- return urlObject.href;
2748
- });
2749
2748
  return $gVhhF$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $gVhhF$solidjsweb.mergeProps(props, {
2750
- get src() {
2751
- return src();
2749
+ get imgProps() {
2750
+ return {
2751
+ ...props.imgProps,
2752
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2753
+ ) => `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`
2754
+ };
2752
2755
  }
2753
2756
  }));
2754
2757
  }
@@ -2796,7 +2799,7 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
2796
2799
  $gVhhF$solidjsweb.runHydrationEvents();
2797
2800
  return _el$;
2798
2801
  })();
2799
- const image_urls = $gVhhF$solidjs.createMemo(() => listing_()?.image_urls);
2802
+ const image_urls = $gVhhF$solidjs.createMemo(() => listing_()?.image_urls?.slice(0, 3));
2800
2803
  const [isSelected, selectedDueToKeyboardNavigation] = $f144ea315d9e4caa$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2801
2804
  const crumbData = $gVhhF$solidjs.createMemo(() => listing_()?.ancestors);
2802
2805
  return (() => {
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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.1.1";
13
+ export const version = "4.1.3";
14
14
  export const prefixes_to_preserve_in_history_dot_state: Set<string>;
15
15
  /**
16
16
  * Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
@@ -434,10 +434,10 @@ export function makeSizeAccessor(whatToWatch: HTMLElement): Accessor<number>;
434
434
  export function ShopifyResponsiveImg(props: {
435
435
  resolutions?: number[];
436
436
  size: Accessor<number>;
437
- } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading"> & {
438
437
  src: string;
439
438
  loading?: "eager" | "lazy" | "force-lazy";
440
- }): JSX.Element;
439
+ customGenerateImageUrl_?: (url: string, width: number) => string;
440
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading">): JSX.Element;
441
441
  type ImagePlaceholderBaseOptions = {
442
442
  style?: JSX.CSSProperties;
443
443
  class?: string;
@@ -1246,7 +1246,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1246
1246
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1247
1247
  content_blocks_by_row?: ContentBlocksByRow;
1248
1248
  layout?: PossibleLayout;
1249
- }): import("@depict-ai/utilishared/latest").Node_Array;
1249
+ }): import("@depict-ai/utilishared").Node_Array;
1250
1250
  export function BreadCrumbs<T extends Display>({
1251
1251
  depict_category
1252
1252
  }: {
@@ -1386,7 +1386,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1386
1386
  * Open the modal with support for alignment.
1387
1387
  * @returns {void}
1388
1388
  */
1389
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1389
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1390
1390
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1391
1391
  export interface PageReplacer {
1392
1392
  readonly render_: () => Node_Array;
package/latest/index.js CHANGED
@@ -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 = "4.1.1";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.3";
11
11
  const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
12
12
  let $90980bd87c9960f9$var$has_ran = false;
13
13
  function $90980bd87c9960f9$export$5162a71f252e6122() {
@@ -2454,8 +2454,12 @@ const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
2454
2454
  const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
2455
2455
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
2456
2456
  const src_options = $9HbP8$createMemo(() => {
2457
- const fallback_src = $e8ffe11ed01df0fe$var$generateImageUrl(props.src, 400);
2458
- const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2457
+ const {
2458
+ src: src,
2459
+ customGenerateImageUrl_: customGenerateImageUrl_
2460
+ } = props;
2461
+ const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$var$generateImageUrl)(src, 400);
2462
+ const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
2459
2463
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2460
2464
  return {
2461
2465
  srcset: srcset,
@@ -2592,8 +2596,8 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
2592
2596
  children: img
2593
2597
  });
2594
2598
  }
2595
- function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
2596
- return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
2599
+ function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2600
+ return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$var$generateImageUrl)(url, width)} ${width}w`).join(", ");
2597
2601
  }
2598
2602
  function $e8ffe11ed01df0fe$var$generateImageUrl(url, width) {
2599
2603
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2656,14 +2660,13 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
2656
2660
  return container;
2657
2661
  }
2658
2662
  function $4f16612bea257571$export$9d4a4b669b1929ab(props) {
2659
- const src = $9HbP8$createMemo(() => {
2660
- const urlObject = new URL(`https://img.depict.ai/ResizeImage/${props.merchant_}?format=webp`);
2661
- urlObject.searchParams.set("url", props.src);
2662
- return urlObject.href;
2663
- });
2664
2663
  return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps(props, {
2665
- get src() {
2666
- return src();
2664
+ get imgProps() {
2665
+ return {
2666
+ ...props.imgProps,
2667
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2668
+ ) => `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`
2669
+ };
2667
2670
  }
2668
2671
  }));
2669
2672
  }
@@ -2711,7 +2714,7 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
2711
2714
  $9HbP8$runHydrationEvents();
2712
2715
  return _el$;
2713
2716
  })();
2714
- const image_urls = $9HbP8$createMemo(() => listing_()?.image_urls);
2717
+ const image_urls = $9HbP8$createMemo(() => listing_()?.image_urls?.slice(0, 3));
2715
2718
  const [isSelected, selectedDueToKeyboardNavigation] = $f4125ce4984deee6$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2716
2719
  const crumbData = $9HbP8$createMemo(() => listing_()?.ancestors);
2717
2720
  return (() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.1.1",
3
+ "version": "4.1.3",
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",
@@ -98,7 +98,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447a
98
98
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
99
99
  $parcel$export(module.exports, "SearchField", () => $98aef9965764903d$export$316f6f283ae64765);
100
100
  /*! Depict.ai search and product listing SDK */
101
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.1";
101
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.1.3";
102
102
  const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
103
103
  let $cfcd56242923775d$var$has_ran = false;
104
104
  function $cfcd56242923775d$export$5162a71f252e6122() {
@@ -2075,8 +2075,12 @@ const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
2075
2075
  const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
2076
2076
  function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
2077
2077
  const src_options = $3hooq$solidjs.createMemo(() => {
2078
- const fallback_src = $858fdcf73148519f$var$generateImageUrl(props.src, 400);
2079
- const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
2078
+ const {
2079
+ src: src,
2080
+ customGenerateImageUrl_: customGenerateImageUrl_
2081
+ } = props;
2082
+ const fallback_src = (customGenerateImageUrl_ || $858fdcf73148519f$var$generateImageUrl)(src, 400);
2083
+ const srcset = $858fdcf73148519f$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
2080
2084
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
2081
2085
  return {
2082
2086
  srcset: srcset,
@@ -2216,8 +2220,8 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
2216
2220
  children: img
2217
2221
  });
2218
2222
  }
2219
- function $858fdcf73148519f$var$make_srcset(url, resolutions) {
2220
- return resolutions.map(width => "".concat($858fdcf73148519f$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
2223
+ function $858fdcf73148519f$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2224
+ return resolutions.map(width => "".concat((customGenerateImageUrl_ || $858fdcf73148519f$var$generateImageUrl)(url, width), " ").concat(width, "w")).join(", ");
2221
2225
  }
2222
2226
  function $858fdcf73148519f$var$generateImageUrl(url, width) {
2223
2227
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2282,14 +2286,13 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
2282
2286
  return container;
2283
2287
  }
2284
2288
  function $9e470232a6b789a3$export$9d4a4b669b1929ab(props) {
2285
- const src = $3hooq$solidjs.createMemo(() => {
2286
- const urlObject = new URL("https://img.depict.ai/ResizeImage/".concat(props.merchant_, "?format=webp"));
2287
- urlObject.searchParams.set("url", props.src);
2288
- return urlObject.href;
2289
- });
2290
2289
  return $3hooq$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $3hooq$solidjsweb.mergeProps(props, {
2291
- get src() {
2292
- return src();
2290
+ get imgProps() {
2291
+ return {
2292
+ ...props.imgProps,
2293
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2294
+ ) => "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url)
2295
+ };
2293
2296
  }
2294
2297
  }));
2295
2298
  }
@@ -2325,8 +2328,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
2325
2328
  }
2326
2329
  }), undefined, true);
2327
2330
  const image_urls = $3hooq$solidjs.createMemo(() => {
2328
- var _listing_2;
2329
- return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : _listing_2.image_urls;
2331
+ var _listing_2, _listing_2$image_urls;
2332
+ return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : (_listing_2$image_urls = _listing_2.image_urls) === null || _listing_2$image_urls === void 0 ? void 0 : _listing_2$image_urls.slice(0, 3);
2330
2333
  });
2331
2334
  const [isSelected, selectedDueToKeyboardNavigation] = $b0f8d9f49e018db9$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2332
2335
  const crumbData = $3hooq$solidjs.createMemo(() => {
@@ -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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.1.1";
13
+ export const version = "4.1.3";
14
14
  export const prefixes_to_preserve_in_history_dot_state: Set<string>;
15
15
  /**
16
16
  * Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
@@ -434,10 +434,10 @@ export function makeSizeAccessor(whatToWatch: HTMLElement): Accessor<number>;
434
434
  export function ShopifyResponsiveImg(props: {
435
435
  resolutions?: number[];
436
436
  size: Accessor<number>;
437
- } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading"> & {
438
437
  src: string;
439
438
  loading?: "eager" | "lazy" | "force-lazy";
440
- }): JSX.Element;
439
+ customGenerateImageUrl_?: (url: string, width: number) => string;
440
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading">): JSX.Element;
441
441
  type ImagePlaceholderBaseOptions = {
442
442
  style?: JSX.CSSProperties;
443
443
  class?: string;
@@ -1246,7 +1246,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1246
1246
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1247
1247
  content_blocks_by_row?: ContentBlocksByRow;
1248
1248
  layout?: PossibleLayout;
1249
- }): import("@depict-ai/utilishared/latest").Node_Array;
1249
+ }): import("@depict-ai/utilishared").Node_Array;
1250
1250
  export function BreadCrumbs<T extends Display>({
1251
1251
  depict_category
1252
1252
  }: {
@@ -1386,7 +1386,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1386
1386
  * Open the modal with support for alignment.
1387
1387
  * @returns {void}
1388
1388
  */
1389
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1389
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1390
1390
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1391
1391
  export interface PageReplacer {
1392
1392
  readonly render_: () => Node_Array;
@@ -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 = "4.1.1";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.1.3";
14
14
  const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
15
15
  let $68e6625c8d51f847$var$has_ran = false;
16
16
  function $68e6625c8d51f847$export$5162a71f252e6122() {
@@ -1987,8 +1987,12 @@ const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
1987
1987
  const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
1988
1988
  function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1989
1989
  const src_options = $b8hua$createMemo(() => {
1990
- const fallback_src = $56047603f9d212b6$var$generateImageUrl(props.src, 400);
1991
- const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1990
+ const {
1991
+ src: src,
1992
+ customGenerateImageUrl_: customGenerateImageUrl_
1993
+ } = props;
1994
+ const fallback_src = (customGenerateImageUrl_ || $56047603f9d212b6$var$generateImageUrl)(src, 400);
1995
+ const srcset = $56047603f9d212b6$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
1992
1996
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1993
1997
  return {
1994
1998
  srcset: srcset,
@@ -2128,8 +2132,8 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
2128
2132
  children: img
2129
2133
  });
2130
2134
  }
2131
- function $56047603f9d212b6$var$make_srcset(url, resolutions) {
2132
- return resolutions.map(width => "".concat($56047603f9d212b6$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
2135
+ function $56047603f9d212b6$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2136
+ return resolutions.map(width => "".concat((customGenerateImageUrl_ || $56047603f9d212b6$var$generateImageUrl)(url, width), " ").concat(width, "w")).join(", ");
2133
2137
  }
2134
2138
  function $56047603f9d212b6$var$generateImageUrl(url, width) {
2135
2139
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2194,14 +2198,13 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
2194
2198
  return container;
2195
2199
  }
2196
2200
  function $7fbaab3d3dafb4f5$export$9d4a4b669b1929ab(props) {
2197
- const src = $b8hua$createMemo(() => {
2198
- const urlObject = new URL("https://img.depict.ai/ResizeImage/".concat(props.merchant_, "?format=webp"));
2199
- urlObject.searchParams.set("url", props.src);
2200
- return urlObject.href;
2201
- });
2202
2201
  return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$mergeProps(props, {
2203
- get src() {
2204
- return src();
2202
+ get imgProps() {
2203
+ return {
2204
+ ...props.imgProps,
2205
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2206
+ ) => "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url)
2207
+ };
2205
2208
  }
2206
2209
  }));
2207
2210
  }
@@ -2237,8 +2240,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
2237
2240
  }
2238
2241
  }), undefined, true);
2239
2242
  const image_urls = $b8hua$createMemo(() => {
2240
- var _listing_2;
2241
- return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : _listing_2.image_urls;
2243
+ var _listing_2, _listing_2$image_urls;
2244
+ return (_listing_2 = listing_()) === null || _listing_2 === void 0 ? void 0 : (_listing_2$image_urls = _listing_2.image_urls) === null || _listing_2$image_urls === void 0 ? void 0 : _listing_2$image_urls.slice(0, 3);
2242
2245
  });
2243
2246
  const [isSelected, selectedDueToKeyboardNavigation] = $d0883254246d3eb6$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2244
2247
  const crumbData = $b8hua$createMemo(() => {
@@ -92,7 +92,7 @@ $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad99
92
92
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
93
93
  $parcel$export(module.exports, "SearchField", () => $c0a0659cf97e8eb2$export$316f6f283ae64765);
94
94
  /*! Depict.ai search and product listing SDK */
95
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.1";
95
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.1.3";
96
96
  const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
97
97
  let $d84fe647b84b5dc5$var$has_ran = false;
98
98
  function $d84fe647b84b5dc5$export$5162a71f252e6122() {
@@ -1983,8 +1983,12 @@ const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
1983
1983
  const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
1984
1984
  function $19950faaac026e09$export$6e5611bc7e57e477(props) {
1985
1985
  const src_options = $5vyXB$solidjs.createMemo(() => {
1986
- const fallback_src = $19950faaac026e09$var$generateImageUrl(props.src, 400);
1987
- const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1986
+ const {
1987
+ src: src,
1988
+ customGenerateImageUrl_: customGenerateImageUrl_
1989
+ } = props;
1990
+ const fallback_src = (customGenerateImageUrl_ || $19950faaac026e09$var$generateImageUrl)(src, 400);
1991
+ const srcset = $19950faaac026e09$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
1988
1992
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1989
1993
  return {
1990
1994
  srcset: srcset,
@@ -2121,8 +2125,8 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
2121
2125
  children: img
2122
2126
  });
2123
2127
  }
2124
- function $19950faaac026e09$var$make_srcset(url, resolutions) {
2125
- return resolutions.map(width => `${$19950faaac026e09$var$generateImageUrl(url, width)} ${width}w`).join(", ");
2128
+ function $19950faaac026e09$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2129
+ return resolutions.map(width => `${(customGenerateImageUrl_ || $19950faaac026e09$var$generateImageUrl)(url, width)} ${width}w`).join(", ");
2126
2130
  }
2127
2131
  function $19950faaac026e09$var$generateImageUrl(url, width) {
2128
2132
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2185,14 +2189,13 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
2185
2189
  return container;
2186
2190
  }
2187
2191
  function $e8327f98c8ee28d7$export$9d4a4b669b1929ab(props) {
2188
- const src = $5vyXB$solidjs.createMemo(() => {
2189
- const urlObject = new URL(`https://img.depict.ai/ResizeImage/${props.merchant_}?format=webp`);
2190
- urlObject.searchParams.set("url", props.src);
2191
- return urlObject.href;
2192
- });
2193
2192
  return $5vyXB$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $5vyXB$solidjsweb.mergeProps(props, {
2194
- get src() {
2195
- return src();
2193
+ get imgProps() {
2194
+ return {
2195
+ ...props.imgProps,
2196
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2197
+ ) => `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`
2198
+ };
2196
2199
  }
2197
2200
  }));
2198
2201
  }
@@ -2223,7 +2226,7 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
2223
2226
  return href();
2224
2227
  }
2225
2228
  }), undefined, true);
2226
- const image_urls = $5vyXB$solidjs.createMemo(() => listing_()?.image_urls);
2229
+ const image_urls = $5vyXB$solidjs.createMemo(() => listing_()?.image_urls?.slice(0, 3));
2227
2230
  const [isSelected, selectedDueToKeyboardNavigation] = $f144ea315d9e4caa$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2228
2231
  const crumbData = $5vyXB$solidjs.createMemo(() => listing_()?.ancestors);
2229
2232
  return $5vyXB$solidjsweb.ssr($1f3b5fa875714dea$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), `listing-card ${isSelected() ? "selected" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(LinkToListing, {
@@ -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 _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "4.1.1";
13
+ export const version = "4.1.3";
14
14
  export const prefixes_to_preserve_in_history_dot_state: Set<string>;
15
15
  /**
16
16
  * Prevent, usually SPAs, from deleting our stuff from history.state when they call history.pushState with a new object they have constructed. This will only run once no matter how often it's called.
@@ -434,10 +434,10 @@ export function makeSizeAccessor(whatToWatch: HTMLElement): Accessor<number>;
434
434
  export function ShopifyResponsiveImg(props: {
435
435
  resolutions?: number[];
436
436
  size: Accessor<number>;
437
- } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading"> & {
438
437
  src: string;
439
438
  loading?: "eager" | "lazy" | "force-lazy";
440
- }): JSX.Element;
439
+ customGenerateImageUrl_?: (url: string, width: number) => string;
440
+ } & Omit<JSX.ImgHTMLAttributes<HTMLImageElement>, "srcset" | "src" | "sizes" | "loading">): JSX.Element;
441
441
  type ImagePlaceholderBaseOptions = {
442
442
  style?: JSX.CSSProperties;
443
443
  class?: string;
@@ -1246,7 +1246,7 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1246
1246
  on_listing_query_change?: (new_listing_query?: ListingQuery | undefined, old_listing_query?: ListingQuery | undefined) => void;
1247
1247
  content_blocks_by_row?: ContentBlocksByRow;
1248
1248
  layout?: PossibleLayout;
1249
- }): import("@depict-ai/utilishared/latest").Node_Array;
1249
+ }): import("@depict-ai/utilishared").Node_Array;
1250
1250
  export function BreadCrumbs<T extends Display>({
1251
1251
  depict_category
1252
1252
  }: {
@@ -1386,7 +1386,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1386
1386
  * Open the modal with support for alignment.
1387
1387
  * @returns {void}
1388
1388
  */
1389
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1389
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1390
1390
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1391
1391
  export interface PageReplacer {
1392
1392
  readonly render_: () => Node_Array;
@@ -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 = "4.1.1";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.1.3";
11
11
  const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
12
12
  let $90980bd87c9960f9$var$has_ran = false;
13
13
  function $90980bd87c9960f9$export$5162a71f252e6122() {
@@ -1898,8 +1898,12 @@ const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingCo
1898
1898
  const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
1899
1899
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
1900
1900
  const src_options = $i7OB2$createMemo(() => {
1901
- const fallback_src = $e8ffe11ed01df0fe$var$generateImageUrl(props.src, 400);
1902
- const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096]);
1901
+ const {
1902
+ src: src,
1903
+ customGenerateImageUrl_: customGenerateImageUrl_
1904
+ } = props;
1905
+ const fallback_src = (customGenerateImageUrl_ || $e8ffe11ed01df0fe$var$generateImageUrl)(src, 400);
1906
+ const srcset = $e8ffe11ed01df0fe$var$make_srcset(props.src, props.resolutions || [64, 128, 256, 300, 400, 512, 640, 768, 1024, 1280, 1536, 2048, 2560, 3072, 3584, 4096], customGenerateImageUrl_);
1903
1907
  // The order here *might* matter - I've seen mobile safari always start with loading the 400px version when it was reversed
1904
1908
  return {
1905
1909
  srcset: srcset,
@@ -2036,8 +2040,8 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
2036
2040
  children: img
2037
2041
  });
2038
2042
  }
2039
- function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
2040
- return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
2043
+ function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions, customGenerateImageUrl_) {
2044
+ return resolutions.map(width => `${(customGenerateImageUrl_ || $e8ffe11ed01df0fe$var$generateImageUrl)(url, width)} ${width}w`).join(", ");
2041
2045
  }
2042
2046
  function $e8ffe11ed01df0fe$var$generateImageUrl(url, width) {
2043
2047
  // Even just creating one `URL` object per image src and then setting the search parameter is quite slow (0.25ms to set the width param)
@@ -2100,14 +2104,13 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
2100
2104
  return container;
2101
2105
  }
2102
2106
  function $4f16612bea257571$export$9d4a4b669b1929ab(props) {
2103
- const src = $i7OB2$createMemo(() => {
2104
- const urlObject = new URL(`https://img.depict.ai/ResizeImage/${props.merchant_}?format=webp`);
2105
- urlObject.searchParams.set("url", props.src);
2106
- return urlObject.href;
2107
- });
2108
2107
  return $i7OB2$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $i7OB2$mergeProps(props, {
2109
- get src() {
2110
- return src();
2108
+ get imgProps() {
2109
+ return {
2110
+ ...props.imgProps,
2111
+ customGenerateImageUrl_: (url, width // Apparently don't have to encode url for CF's service
2112
+ ) => `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`
2113
+ };
2111
2114
  }
2112
2115
  }));
2113
2116
  }
@@ -2138,7 +2141,7 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
2138
2141
  return href();
2139
2142
  }
2140
2143
  }), undefined, true);
2141
- const image_urls = $i7OB2$createMemo(() => listing_()?.image_urls);
2144
+ const image_urls = $i7OB2$createMemo(() => listing_()?.image_urls?.slice(0, 3));
2142
2145
  const [isSelected, selectedDueToKeyboardNavigation] = $f4125ce4984deee6$export$fb40a80c530e5f2b(read_selected_index_, keyboardNavigationGroupIndex_, index_);
2143
2146
  const crumbData = $i7OB2$createMemo(() => listing_()?.ancestors);
2144
2147
  return $i7OB2$ssr($4ce5b8892775b62d$var$_tmpl$2, $i7OB2$ssrHydrationKey(), `listing-card ${isSelected() ? "selected" : ""}`, $i7OB2$escape($i7OB2$createComponent(LinkToListing, {