@depict-ai/ui 4.7.32 → 4.7.33

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
@@ -18,6 +18,8 @@ function $parcel$export(e, n, v, s) {
18
18
  function $parcel$interopDefault(a) {
19
19
  return a && a.__esModule ? a.default : a;
20
20
  }
21
+ $parcel$export(module.exports, "setExtraDisplayTransformers", () => $cc9aacef898ccc9a$export$f98b8d5ea7207a1);
22
+ $parcel$export(module.exports, "getExtraDisplayTransformers", () => $cc9aacef898ccc9a$export$b2d94be4f02525b2);
21
23
  $parcel$export(module.exports, "remap_blocks_to_index", () => $f8f375d6245ffff2$export$92aa5d691d588f3f);
22
24
  $parcel$export(module.exports, "useMobileHover", () => $0deb6ff75e3d67c6$export$d4d96868197be50e);
23
25
  $parcel$export(module.exports, "useVisibilityState", () => $e7a7d2fe8a8217d8$export$54299a3c81f5425);
@@ -111,7 +113,14 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
111
113
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
112
114
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
113
115
  /*! Depict.ai search and product listing SDK */
114
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.32";
116
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.33";
117
+
118
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
119
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
120
+ // Them being here is value first too because this can be easily imported in the product card editor
121
+ let $cc9aacef898ccc9a$var$extraDisplayTransformers;
122
+ const $cc9aacef898ccc9a$export$b2d94be4f02525b2 = () => $cc9aacef898ccc9a$var$extraDisplayTransformers;
123
+ const $cc9aacef898ccc9a$export$f98b8d5ea7207a1 = displayTransformers => $cc9aacef898ccc9a$var$extraDisplayTransformers = displayTransformers;
115
124
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
116
125
  const signal = $52FdA$solidjs.createSignal(false);
117
126
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -1848,25 +1857,30 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
1848
1857
  })));
1849
1858
  return container;
1850
1859
  }
1860
+ const $f3db423dc84bc35d$var$customUrls = (url, width) => {
1861
+ var _url$startsWith;
1862
+ if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1863
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1864
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1865
+ return $858fdcf73148519f$export$1d6267828870adda(url, width);
1866
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1867
+ return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1868
+ };
1851
1869
  function $f3db423dc84bc35d$export$9d4a4b669b1929ab(props) {
1852
1870
  return $52FdA$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $52FdA$solidjsweb.mergeProps(props, {
1853
1871
  get imgProps() {
1854
1872
  return {
1855
1873
  ...props.imgProps,
1856
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1857
- ) => {
1858
- var _url$startsWith;
1859
- if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1860
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1861
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1862
- return $858fdcf73148519f$export$1d6267828870adda(url, width);
1863
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1864
- return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1865
- }
1874
+ customUrls: $f3db423dc84bc35d$var$customUrls
1866
1875
  };
1867
1876
  }
1868
1877
  }));
1869
1878
  }
1879
+ function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
1880
+ return $52FdA$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $52FdA$solidjsweb.mergeProps(props, {
1881
+ customUrls: $f3db423dc84bc35d$var$customUrls
1882
+ }));
1883
+ }
1870
1884
  function $f38f2e64ebe2da86$export$a71e92cfbb498adc(props) {
1871
1885
  return $52FdA$solidjs.createMemo(() => {
1872
1886
  const price_formatting = props.price_formatting_;
@@ -15958,7 +15972,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
15958
15972
  href: link
15959
15973
  }, {
15960
15974
  get children() {
15961
- return $52FdA$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), {
15975
+ return $52FdA$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$140423fa4bfb6d63), {
15962
15976
  get size() {
15963
15977
  return $52FdA$solidjs.createMemo(() => {
15964
15978
  var _wrapperSize;
package/ES10/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { JSX, Accessor, Setter, Signal } from "solid-js";
2
- import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
3
- import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
1
+ import { Display, ModernDisplay, report, Amazing_Slider, useExpandingContainer, ColsAtSize, Elem, Node_Array } from "@depict-ai/utilishared/ES10";
4
2
  import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
5
3
  import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
6
4
  import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
5
+ import { JSX, Accessor, Setter, Signal } from "solid-js";
6
+ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
7
7
  import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
8
8
  import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
9
9
  import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
@@ -11,7 +11,61 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.7.32";
14
+ export const version = "4.7.33";
15
+ type DisplayTransformerAlwaysThereData = {
16
+ merchant: string;
17
+ market: string;
18
+ locale: string;
19
+ };
20
+ type CanBePromiseWrapped<T> = T | Promise<T>;
21
+ export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
22
+ page_url: string;
23
+ })[] : T[K] };
24
+ /**
25
+ * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
26
+ */
27
+ type ProductListingWithAncestors = ProductListing & {
28
+ ancestors: Ancestors;
29
+ };
30
+ /**
31
+ * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
32
+ */
33
+ type ListingSuggestionForTransformer = (ListingSuggestion & {
34
+ is_suggestion: true;
35
+ }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
36
+ is_suggestion: false;
37
+ });
38
+ /**
39
+ * DisplayTransformers supersede pageURLCreator
40
+ * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
41
+ */
42
+ export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
43
+ products?: (options: DisplayTransformerAlwaysThereData & {
44
+ displays: InputDisplay[];
45
+ }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
46
+ categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
47
+ data: T[];
48
+ }) => CanBePromiseWrapped<(T & {
49
+ page_url: string;
50
+ })[]>;
51
+ contentResults?: (options: DisplayTransformerAlwaysThereData & {
52
+ data: ContentLink[];
53
+ }) => CanBePromiseWrapped<ContentLink[]>;
54
+ };
55
+ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
56
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
57
+ } : {
58
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
59
+ } : {
60
+ page_url_creator?: never;
61
+ display_transformers?: never;
62
+ };
63
+ export const getExtraDisplayTransformers: () => DisplayTransformers<any, any> | undefined;
64
+ /**
65
+ *
66
+ * @param displayTransformers
67
+ */
68
+ export const setExtraDisplayTransformers: <InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay = ModernDisplayWithPageUrl<InputDisplay>>(displayTransformers: DisplayTransformers<InputDisplay, OutputDisplay>) => DisplayTransformers<InputDisplay, OutputDisplay>;
15
69
  /**
16
70
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
71
  */
@@ -434,54 +488,6 @@ export function SolidFormatPrice(props: {
434
488
  places_after_comma_: number | "auto";
435
489
  };
436
490
  }): JSX.Element;
437
- type DisplayTransformerAlwaysThereData = {
438
- merchant: string;
439
- market: string;
440
- locale: string;
441
- };
442
- type CanBePromiseWrapped<T> = T | Promise<T>;
443
- export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
444
- page_url: string;
445
- })[] : T[K] };
446
- /**
447
- * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
448
- */
449
- type ProductListingWithAncestors = ProductListing & {
450
- ancestors: Ancestors;
451
- };
452
- /**
453
- * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
454
- */
455
- type ListingSuggestionForTransformer = (ListingSuggestion & {
456
- is_suggestion: true;
457
- }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
458
- is_suggestion: false;
459
- });
460
- /**
461
- * DisplayTransformers supersede pageURLCreator
462
- * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
463
- */
464
- export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
465
- products?: (options: DisplayTransformerAlwaysThereData & {
466
- displays: InputDisplay[];
467
- }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
468
- categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
469
- data: T[];
470
- }) => CanBePromiseWrapped<(T & {
471
- page_url: string;
472
- })[]>;
473
- contentResults?: (options: DisplayTransformerAlwaysThereData & {
474
- data: ContentLink[];
475
- }) => CanBePromiseWrapped<ContentLink[]>;
476
- };
477
- export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
478
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
479
- } : {
480
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
481
- } : {
482
- page_url_creator?: never;
483
- display_transformers?: never;
484
- };
485
491
  type ListingSuggestionAfterURLCreator = { [K in keyof ListingSuggestion]: K extends "ancestors" ? (ListingSuggestion & {
486
492
  page_url: string;
487
493
  })[] : ListingSuggestion[K] } & {
package/ES10/index.js CHANGED
@@ -10,7 +10,14 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
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.7.32";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.33";
14
+
15
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
16
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
17
+ // Them being here is value first too because this can be easily imported in the product card editor
18
+ let $80c7883e020be192$var$extraDisplayTransformers;
19
+ const $80c7883e020be192$export$b2d94be4f02525b2 = () => $80c7883e020be192$var$extraDisplayTransformers;
20
+ const $80c7883e020be192$export$f98b8d5ea7207a1 = displayTransformers => $80c7883e020be192$var$extraDisplayTransformers = displayTransformers;
14
21
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
22
  const signal = $8tj43$createSignal(false);
16
23
  $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
@@ -1747,25 +1754,30 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
1747
1754
  })));
1748
1755
  return container;
1749
1756
  }
1757
+ const $98688279b9059f50$var$customUrls = (url, width) => {
1758
+ var _url$startsWith;
1759
+ if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1760
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1761
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1762
+ return $56047603f9d212b6$export$1d6267828870adda(url, width);
1763
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1764
+ return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1765
+ };
1750
1766
  function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
1751
1767
  return $8tj43$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $8tj43$mergeProps1(props, {
1752
1768
  get imgProps() {
1753
1769
  return {
1754
1770
  ...props.imgProps,
1755
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1756
- ) => {
1757
- var _url$startsWith;
1758
- if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1759
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1760
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1761
- return $56047603f9d212b6$export$1d6267828870adda(url, width);
1762
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1763
- return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1764
- }
1771
+ customUrls: $98688279b9059f50$var$customUrls
1765
1772
  };
1766
1773
  }
1767
1774
  }));
1768
1775
  }
1776
+ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
1777
+ return $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $8tj43$mergeProps1(props, {
1778
+ customUrls: $98688279b9059f50$var$customUrls
1779
+ }));
1780
+ }
1769
1781
  function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
1770
1782
  return $8tj43$createMemo(() => {
1771
1783
  const price_formatting = props.price_formatting_;
@@ -15857,7 +15869,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
15857
15869
  href: link
15858
15870
  }, {
15859
15871
  get children() {
15860
- return $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), {
15872
+ return $8tj43$createComponent((0, $98688279b9059f50$export$140423fa4bfb6d63), {
15861
15873
  get size() {
15862
15874
  return $8tj43$createMemo(() => {
15863
15875
  var _wrapperSize;
@@ -16469,4 +16481,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
16469
16481
  }, "Entire CategoryPage failed");
16470
16482
  }
16471
16483
  $8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
16472
- export { $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
16484
+ export { $80c7883e020be192$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $80c7883e020be192$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
package/latest/index.cjs CHANGED
@@ -12,6 +12,8 @@ function $parcel$export(e, n, v, s) {
12
12
  configurable: true
13
13
  });
14
14
  }
15
+ $parcel$export(module.exports, "setExtraDisplayTransformers", () => $606c221d98ba4d92$export$f98b8d5ea7207a1);
16
+ $parcel$export(module.exports, "getExtraDisplayTransformers", () => $606c221d98ba4d92$export$b2d94be4f02525b2);
15
17
  $parcel$export(module.exports, "remap_blocks_to_index", () => $d92f338ba8f9da9b$export$92aa5d691d588f3f);
16
18
  $parcel$export(module.exports, "useMobileHover", () => $8bf678c45948a297$export$d4d96868197be50e);
17
19
  $parcel$export(module.exports, "useVisibilityState", () => $55cbacb79d3e0cea$export$54299a3c81f5425);
@@ -105,7 +107,14 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
105
107
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
106
108
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
107
109
  /*! Depict.ai search and product listing SDK */
108
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.32";
110
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.33";
111
+
112
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
113
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
114
+ // Them being here is value first too because this can be easily imported in the product card editor
115
+ let $606c221d98ba4d92$var$extraDisplayTransformers;
116
+ const $606c221d98ba4d92$export$b2d94be4f02525b2 = () => $606c221d98ba4d92$var$extraDisplayTransformers;
117
+ const $606c221d98ba4d92$export$f98b8d5ea7207a1 = displayTransformers => $606c221d98ba4d92$var$extraDisplayTransformers = displayTransformers;
109
118
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
110
119
  const signal = $gVhhF$solidjs.createSignal(false);
111
120
  $gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
@@ -1770,24 +1779,29 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
1770
1779
  })));
1771
1780
  return container;
1772
1781
  }
1782
+ const $d212a67662c5cf38$var$customUrls = (url, width) => {
1783
+ if (url?.startsWith?.("https://cdn.shopify.com"))
1784
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1785
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1786
+ return $19950faaac026e09$export$1d6267828870adda(url, width);
1787
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1788
+ return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1789
+ };
1773
1790
  function $d212a67662c5cf38$export$9d4a4b669b1929ab(props) {
1774
1791
  return $gVhhF$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $gVhhF$solidjsweb.mergeProps(props, {
1775
1792
  get imgProps() {
1776
1793
  return {
1777
1794
  ...props.imgProps,
1778
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1779
- ) => {
1780
- if (url?.startsWith?.("https://cdn.shopify.com"))
1781
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1782
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1783
- return $19950faaac026e09$export$1d6267828870adda(url, width);
1784
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1785
- return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1786
- }
1795
+ customUrls: $d212a67662c5cf38$var$customUrls
1787
1796
  };
1788
1797
  }
1789
1798
  }));
1790
1799
  }
1800
+ function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
1801
+ return $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $gVhhF$solidjsweb.mergeProps(props, {
1802
+ customUrls: $d212a67662c5cf38$var$customUrls
1803
+ }));
1804
+ }
1791
1805
  function $d659702496cb72ea$export$a71e92cfbb498adc(props) {
1792
1806
  return $gVhhF$solidjs.createMemo(() => {
1793
1807
  const price_formatting = props.price_formatting_;
@@ -14919,7 +14933,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
14919
14933
  href: link
14920
14934
  }, {
14921
14935
  get children() {
14922
- return $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
14936
+ return $gVhhF$solidjsweb.createComponent((0, $d212a67662c5cf38$export$140423fa4bfb6d63), {
14923
14937
  get size() {
14924
14938
  return $gVhhF$solidjs.createMemo(() => wrapperSize()?.() || 0);
14925
14939
  },
package/latest/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { JSX, Accessor, Setter, Signal } from "solid-js";
2
- import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/latest";
3
- import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
1
+ import { Display, ModernDisplay, report, Amazing_Slider, useExpandingContainer, ColsAtSize, Elem, Node_Array } from "@depict-ai/utilishared/latest";
4
2
  import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
5
3
  import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
6
4
  import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
5
+ import { JSX, Accessor, Setter, Signal } from "solid-js";
6
+ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
7
7
  import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
8
8
  import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
9
9
  import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
@@ -11,7 +11,61 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.7.32";
14
+ export const version = "4.7.33";
15
+ type DisplayTransformerAlwaysThereData = {
16
+ merchant: string;
17
+ market: string;
18
+ locale: string;
19
+ };
20
+ type CanBePromiseWrapped<T> = T | Promise<T>;
21
+ export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
22
+ page_url: string;
23
+ })[] : T[K] };
24
+ /**
25
+ * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
26
+ */
27
+ type ProductListingWithAncestors = ProductListing & {
28
+ ancestors: Ancestors;
29
+ };
30
+ /**
31
+ * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
32
+ */
33
+ type ListingSuggestionForTransformer = (ListingSuggestion & {
34
+ is_suggestion: true;
35
+ }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
36
+ is_suggestion: false;
37
+ });
38
+ /**
39
+ * DisplayTransformers supersede pageURLCreator
40
+ * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
41
+ */
42
+ export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
43
+ products?: (options: DisplayTransformerAlwaysThereData & {
44
+ displays: InputDisplay[];
45
+ }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
46
+ categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
47
+ data: T[];
48
+ }) => CanBePromiseWrapped<(T & {
49
+ page_url: string;
50
+ })[]>;
51
+ contentResults?: (options: DisplayTransformerAlwaysThereData & {
52
+ data: ContentLink[];
53
+ }) => CanBePromiseWrapped<ContentLink[]>;
54
+ };
55
+ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
56
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
57
+ } : {
58
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
59
+ } : {
60
+ page_url_creator?: never;
61
+ display_transformers?: never;
62
+ };
63
+ export const getExtraDisplayTransformers: () => DisplayTransformers<any, any> | undefined;
64
+ /**
65
+ *
66
+ * @param displayTransformers
67
+ */
68
+ export const setExtraDisplayTransformers: <InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay = ModernDisplayWithPageUrl<InputDisplay>>(displayTransformers: DisplayTransformers<InputDisplay, OutputDisplay>) => DisplayTransformers<InputDisplay, OutputDisplay>;
15
69
  /**
16
70
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
71
  */
@@ -434,54 +488,6 @@ export function SolidFormatPrice(props: {
434
488
  places_after_comma_: number | "auto";
435
489
  };
436
490
  }): JSX.Element;
437
- type DisplayTransformerAlwaysThereData = {
438
- merchant: string;
439
- market: string;
440
- locale: string;
441
- };
442
- type CanBePromiseWrapped<T> = T | Promise<T>;
443
- export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
444
- page_url: string;
445
- })[] : T[K] };
446
- /**
447
- * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
448
- */
449
- type ProductListingWithAncestors = ProductListing & {
450
- ancestors: Ancestors;
451
- };
452
- /**
453
- * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
454
- */
455
- type ListingSuggestionForTransformer = (ListingSuggestion & {
456
- is_suggestion: true;
457
- }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
458
- is_suggestion: false;
459
- });
460
- /**
461
- * DisplayTransformers supersede pageURLCreator
462
- * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
463
- */
464
- export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
465
- products?: (options: DisplayTransformerAlwaysThereData & {
466
- displays: InputDisplay[];
467
- }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
468
- categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
469
- data: T[];
470
- }) => CanBePromiseWrapped<(T & {
471
- page_url: string;
472
- })[]>;
473
- contentResults?: (options: DisplayTransformerAlwaysThereData & {
474
- data: ContentLink[];
475
- }) => CanBePromiseWrapped<ContentLink[]>;
476
- };
477
- export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
478
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
479
- } : {
480
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
481
- } : {
482
- page_url_creator?: never;
483
- display_transformers?: never;
484
- };
485
491
  type ListingSuggestionAfterURLCreator = { [K in keyof ListingSuggestion]: K extends "ancestors" ? (ListingSuggestion & {
486
492
  page_url: string;
487
493
  })[] : ListingSuggestion[K] } & {
package/latest/index.js CHANGED
@@ -7,7 +7,14 @@ import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify, ListenableSet as $9Hb
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.7.32";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.33";
11
+
12
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
13
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
14
+ // Them being here is value first too because this can be easily imported in the product card editor
15
+ let $a63fa9cb46ed211b$var$extraDisplayTransformers;
16
+ const $a63fa9cb46ed211b$export$b2d94be4f02525b2 = () => $a63fa9cb46ed211b$var$extraDisplayTransformers;
17
+ const $a63fa9cb46ed211b$export$f98b8d5ea7207a1 = displayTransformers => $a63fa9cb46ed211b$var$extraDisplayTransformers = displayTransformers;
11
18
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
19
  const signal = $9HbP8$createSignal(false);
13
20
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -1672,24 +1679,29 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1672
1679
  })));
1673
1680
  return container;
1674
1681
  }
1682
+ const $70bb27cc6be01fc7$var$customUrls = (url, width) => {
1683
+ if (url?.startsWith?.("https://cdn.shopify.com"))
1684
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1685
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1686
+ return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
1687
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1688
+ return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1689
+ };
1675
1690
  function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1676
1691
  return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps1(props, {
1677
1692
  get imgProps() {
1678
1693
  return {
1679
1694
  ...props.imgProps,
1680
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1681
- ) => {
1682
- if (url?.startsWith?.("https://cdn.shopify.com"))
1683
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1684
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1685
- return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
1686
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1687
- return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1688
- }
1695
+ customUrls: $70bb27cc6be01fc7$var$customUrls
1689
1696
  };
1690
1697
  }
1691
1698
  }));
1692
1699
  }
1700
+ function $70bb27cc6be01fc7$export$140423fa4bfb6d63(props) {
1701
+ return $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps1(props, {
1702
+ customUrls: $70bb27cc6be01fc7$var$customUrls
1703
+ }));
1704
+ }
1693
1705
  function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1694
1706
  return $9HbP8$createMemo(() => {
1695
1707
  const price_formatting = props.price_formatting_;
@@ -14821,7 +14833,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
14821
14833
  href: link
14822
14834
  }, {
14823
14835
  get children() {
14824
- return $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
14836
+ return $9HbP8$createComponent((0, $70bb27cc6be01fc7$export$140423fa4bfb6d63), {
14825
14837
  get size() {
14826
14838
  return $9HbP8$createMemo(() => wrapperSize()?.() || 0);
14827
14839
  },
@@ -15392,4 +15404,4 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
15392
15404
  }, "Entire CategoryPage failed");
15393
15405
  }
15394
15406
  $9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
15395
- export { $e7a7eb102ddc0c79$export$92aa5d691d588f3f as remap_blocks_to_index, $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };
15407
+ export { $a63fa9cb46ed211b$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $a63fa9cb46ed211b$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $e7a7eb102ddc0c79$export$92aa5d691d588f3f as remap_blocks_to_index, $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.7.32",
3
+ "version": "4.7.33",
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",
@@ -18,6 +18,8 @@ function $parcel$export(e, n, v, s) {
18
18
  function $parcel$interopDefault(a) {
19
19
  return a && a.__esModule ? a.default : a;
20
20
  }
21
+ $parcel$export(module.exports, "setExtraDisplayTransformers", () => $cc9aacef898ccc9a$export$f98b8d5ea7207a1);
22
+ $parcel$export(module.exports, "getExtraDisplayTransformers", () => $cc9aacef898ccc9a$export$b2d94be4f02525b2);
21
23
  $parcel$export(module.exports, "remap_blocks_to_index", () => $f8f375d6245ffff2$export$92aa5d691d588f3f);
22
24
  $parcel$export(module.exports, "useMobileHover", () => $0deb6ff75e3d67c6$export$d4d96868197be50e);
23
25
  $parcel$export(module.exports, "useVisibilityState", () => $e7a7d2fe8a8217d8$export$54299a3c81f5425);
@@ -111,7 +113,14 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
111
113
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
112
114
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
113
115
  /*! Depict.ai search and product listing SDK */
114
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.32";
116
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.33";
117
+
118
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
119
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
120
+ // Them being here is value first too because this can be easily imported in the product card editor
121
+ let $cc9aacef898ccc9a$var$extraDisplayTransformers;
122
+ const $cc9aacef898ccc9a$export$b2d94be4f02525b2 = () => $cc9aacef898ccc9a$var$extraDisplayTransformers;
123
+ const $cc9aacef898ccc9a$export$f98b8d5ea7207a1 = displayTransformers => $cc9aacef898ccc9a$var$extraDisplayTransformers = displayTransformers;
115
124
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
116
125
  const signal = $3hooq$solidjs.createSignal(false);
117
126
  $3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -1619,25 +1628,30 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
1619
1628
  })));
1620
1629
  return container;
1621
1630
  }
1631
+ const $f3db423dc84bc35d$var$customUrls = (url, width) => {
1632
+ var _url$startsWith;
1633
+ if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1634
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1635
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1636
+ return $858fdcf73148519f$export$1d6267828870adda(url, width);
1637
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1638
+ return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1639
+ };
1622
1640
  function $f3db423dc84bc35d$export$9d4a4b669b1929ab(props) {
1623
1641
  return $3hooq$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $3hooq$solidjsweb.mergeProps(props, {
1624
1642
  get imgProps() {
1625
1643
  return {
1626
1644
  ...props.imgProps,
1627
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1628
- ) => {
1629
- var _url$startsWith;
1630
- if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1631
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1632
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1633
- return $858fdcf73148519f$export$1d6267828870adda(url, width);
1634
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1635
- return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1636
- }
1645
+ customUrls: $f3db423dc84bc35d$var$customUrls
1637
1646
  };
1638
1647
  }
1639
1648
  }));
1640
1649
  }
1650
+ function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
1651
+ return $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $3hooq$solidjsweb.mergeProps(props, {
1652
+ customUrls: $f3db423dc84bc35d$var$customUrls
1653
+ }));
1654
+ }
1641
1655
  function $f38f2e64ebe2da86$export$a71e92cfbb498adc(props) {
1642
1656
  return $3hooq$solidjs.createMemo(() => {
1643
1657
  const price_formatting = props.price_formatting_;
@@ -13325,7 +13339,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
13325
13339
  href: link
13326
13340
  }, {
13327
13341
  get children() {
13328
- return $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), {
13342
+ return $3hooq$solidjsweb.createComponent((0, $f3db423dc84bc35d$export$140423fa4bfb6d63), {
13329
13343
  get size() {
13330
13344
  return $3hooq$solidjs.createMemo(() => {
13331
13345
  var _wrapperSize;
@@ -1,9 +1,9 @@
1
- import { JSX, Accessor, Setter, Signal } from "solid-js";
2
- import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/ES10";
3
- import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
1
+ import { Display, ModernDisplay, report, Amazing_Slider, useExpandingContainer, ColsAtSize, Elem, Node_Array } from "@depict-ai/utilishared/ES10";
4
2
  import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
5
3
  import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
6
4
  import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
5
+ import { JSX, Accessor, Setter, Signal } from "solid-js";
6
+ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
7
7
  import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
8
8
  import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
9
9
  import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
@@ -11,7 +11,61 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.7.32";
14
+ export const version = "4.7.33";
15
+ type DisplayTransformerAlwaysThereData = {
16
+ merchant: string;
17
+ market: string;
18
+ locale: string;
19
+ };
20
+ type CanBePromiseWrapped<T> = T | Promise<T>;
21
+ export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
22
+ page_url: string;
23
+ })[] : T[K] };
24
+ /**
25
+ * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
26
+ */
27
+ type ProductListingWithAncestors = ProductListing & {
28
+ ancestors: Ancestors;
29
+ };
30
+ /**
31
+ * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
32
+ */
33
+ type ListingSuggestionForTransformer = (ListingSuggestion & {
34
+ is_suggestion: true;
35
+ }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
36
+ is_suggestion: false;
37
+ });
38
+ /**
39
+ * DisplayTransformers supersede pageURLCreator
40
+ * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
41
+ */
42
+ export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
43
+ products?: (options: DisplayTransformerAlwaysThereData & {
44
+ displays: InputDisplay[];
45
+ }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
46
+ categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
47
+ data: T[];
48
+ }) => CanBePromiseWrapped<(T & {
49
+ page_url: string;
50
+ })[]>;
51
+ contentResults?: (options: DisplayTransformerAlwaysThereData & {
52
+ data: ContentLink[];
53
+ }) => CanBePromiseWrapped<ContentLink[]>;
54
+ };
55
+ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
56
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
57
+ } : {
58
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
59
+ } : {
60
+ page_url_creator?: never;
61
+ display_transformers?: never;
62
+ };
63
+ export const getExtraDisplayTransformers: () => DisplayTransformers<any, any> | undefined;
64
+ /**
65
+ *
66
+ * @param displayTransformers
67
+ */
68
+ export const setExtraDisplayTransformers: <InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay = ModernDisplayWithPageUrl<InputDisplay>>(displayTransformers: DisplayTransformers<InputDisplay, OutputDisplay>) => DisplayTransformers<InputDisplay, OutputDisplay>;
15
69
  /**
16
70
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
71
  */
@@ -434,54 +488,6 @@ export function SolidFormatPrice(props: {
434
488
  places_after_comma_: number | "auto";
435
489
  };
436
490
  }): JSX.Element;
437
- type DisplayTransformerAlwaysThereData = {
438
- merchant: string;
439
- market: string;
440
- locale: string;
441
- };
442
- type CanBePromiseWrapped<T> = T | Promise<T>;
443
- export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
444
- page_url: string;
445
- })[] : T[K] };
446
- /**
447
- * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
448
- */
449
- type ProductListingWithAncestors = ProductListing & {
450
- ancestors: Ancestors;
451
- };
452
- /**
453
- * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
454
- */
455
- type ListingSuggestionForTransformer = (ListingSuggestion & {
456
- is_suggestion: true;
457
- }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
458
- is_suggestion: false;
459
- });
460
- /**
461
- * DisplayTransformers supersede pageURLCreator
462
- * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
463
- */
464
- export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
465
- products?: (options: DisplayTransformerAlwaysThereData & {
466
- displays: InputDisplay[];
467
- }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
468
- categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
469
- data: T[];
470
- }) => CanBePromiseWrapped<(T & {
471
- page_url: string;
472
- })[]>;
473
- contentResults?: (options: DisplayTransformerAlwaysThereData & {
474
- data: ContentLink[];
475
- }) => CanBePromiseWrapped<ContentLink[]>;
476
- };
477
- export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
478
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
479
- } : {
480
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
481
- } : {
482
- page_url_creator?: never;
483
- display_transformers?: never;
484
- };
485
491
  type ListingSuggestionAfterURLCreator = { [K in keyof ListingSuggestion]: K extends "ancestors" ? (ListingSuggestion & {
486
492
  page_url: string;
487
493
  })[] : ListingSuggestion[K] } & {
@@ -10,7 +10,14 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
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.7.32";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.33";
14
+
15
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
16
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
17
+ // Them being here is value first too because this can be easily imported in the product card editor
18
+ let $80c7883e020be192$var$extraDisplayTransformers;
19
+ const $80c7883e020be192$export$b2d94be4f02525b2 = () => $80c7883e020be192$var$extraDisplayTransformers;
20
+ const $80c7883e020be192$export$f98b8d5ea7207a1 = displayTransformers => $80c7883e020be192$var$extraDisplayTransformers = displayTransformers;
14
21
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
22
  const signal = $b8hua$createSignal(false);
16
23
  $b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
@@ -1518,25 +1525,30 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
1518
1525
  })));
1519
1526
  return container;
1520
1527
  }
1528
+ const $98688279b9059f50$var$customUrls = (url, width) => {
1529
+ var _url$startsWith;
1530
+ if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1531
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1532
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1533
+ return $56047603f9d212b6$export$1d6267828870adda(url, width);
1534
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1535
+ return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1536
+ };
1521
1537
  function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
1522
1538
  return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$mergeProps1(props, {
1523
1539
  get imgProps() {
1524
1540
  return {
1525
1541
  ...props.imgProps,
1526
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1527
- ) => {
1528
- var _url$startsWith;
1529
- if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
1530
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1531
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1532
- return $56047603f9d212b6$export$1d6267828870adda(url, width);
1533
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1534
- return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
1535
- }
1542
+ customUrls: $98688279b9059f50$var$customUrls
1536
1543
  };
1537
1544
  }
1538
1545
  }));
1539
1546
  }
1547
+ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
1548
+ return $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$mergeProps1(props, {
1549
+ customUrls: $98688279b9059f50$var$customUrls
1550
+ }));
1551
+ }
1540
1552
  function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
1541
1553
  return $b8hua$createMemo(() => {
1542
1554
  const price_formatting = props.price_formatting_;
@@ -13224,7 +13236,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
13224
13236
  href: link
13225
13237
  }, {
13226
13238
  get children() {
13227
- return $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), {
13239
+ return $b8hua$createComponent((0, $98688279b9059f50$export$140423fa4bfb6d63), {
13228
13240
  get size() {
13229
13241
  return $b8hua$createMemo(() => {
13230
13242
  var _wrapperSize;
@@ -13770,4 +13782,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
13770
13782
  }, "Entire CategoryPage failed");
13771
13783
  }
13772
13784
  $b8hua$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
13773
- export { $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
13785
+ export { $80c7883e020be192$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $80c7883e020be192$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
@@ -12,6 +12,8 @@ function $parcel$export(e, n, v, s) {
12
12
  configurable: true
13
13
  });
14
14
  }
15
+ $parcel$export(module.exports, "setExtraDisplayTransformers", () => $606c221d98ba4d92$export$f98b8d5ea7207a1);
16
+ $parcel$export(module.exports, "getExtraDisplayTransformers", () => $606c221d98ba4d92$export$b2d94be4f02525b2);
15
17
  $parcel$export(module.exports, "remap_blocks_to_index", () => $d92f338ba8f9da9b$export$92aa5d691d588f3f);
16
18
  $parcel$export(module.exports, "useMobileHover", () => $8bf678c45948a297$export$d4d96868197be50e);
17
19
  $parcel$export(module.exports, "useVisibilityState", () => $55cbacb79d3e0cea$export$54299a3c81f5425);
@@ -105,7 +107,14 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
105
107
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
106
108
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
107
109
  /*! Depict.ai search and product listing SDK */
108
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.32";
110
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.33";
111
+
112
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
113
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
114
+ // Them being here is value first too because this can be easily imported in the product card editor
115
+ let $606c221d98ba4d92$var$extraDisplayTransformers;
116
+ const $606c221d98ba4d92$export$b2d94be4f02525b2 = () => $606c221d98ba4d92$var$extraDisplayTransformers;
117
+ const $606c221d98ba4d92$export$f98b8d5ea7207a1 = displayTransformers => $606c221d98ba4d92$var$extraDisplayTransformers = displayTransformers;
109
118
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
110
119
  const signal = $5vyXB$solidjs.createSignal(false);
111
120
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -1555,24 +1564,29 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
1555
1564
  })));
1556
1565
  return container;
1557
1566
  }
1567
+ const $d212a67662c5cf38$var$customUrls = (url, width) => {
1568
+ if (url?.startsWith?.("https://cdn.shopify.com"))
1569
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1570
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1571
+ return $19950faaac026e09$export$1d6267828870adda(url, width);
1572
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1573
+ return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1574
+ };
1558
1575
  function $d212a67662c5cf38$export$9d4a4b669b1929ab(props) {
1559
1576
  return $5vyXB$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $5vyXB$solidjsweb.mergeProps(props, {
1560
1577
  get imgProps() {
1561
1578
  return {
1562
1579
  ...props.imgProps,
1563
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1564
- ) => {
1565
- if (url?.startsWith?.("https://cdn.shopify.com"))
1566
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1567
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1568
- return $19950faaac026e09$export$1d6267828870adda(url, width);
1569
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1570
- return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1571
- }
1580
+ customUrls: $d212a67662c5cf38$var$customUrls
1572
1581
  };
1573
1582
  }
1574
1583
  }));
1575
1584
  }
1585
+ function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
1586
+ return $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $5vyXB$solidjsweb.mergeProps(props, {
1587
+ customUrls: $d212a67662c5cf38$var$customUrls
1588
+ }));
1589
+ }
1576
1590
  function $d659702496cb72ea$export$a71e92cfbb498adc(props) {
1577
1591
  return $5vyXB$solidjs.createMemo(() => {
1578
1592
  const price_formatting = props.price_formatting_;
@@ -12362,7 +12376,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
12362
12376
  href: link
12363
12377
  }, {
12364
12378
  get children() {
12365
- return $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), {
12379
+ return $5vyXB$solidjsweb.createComponent((0, $d212a67662c5cf38$export$140423fa4bfb6d63), {
12366
12380
  get size() {
12367
12381
  return $5vyXB$solidjs.createMemo(() => wrapperSize()?.() || 0);
12368
12382
  },
@@ -1,9 +1,9 @@
1
- import { JSX, Accessor, Setter, Signal } from "solid-js";
2
- import { report, Amazing_Slider, Display, useExpandingContainer, ColsAtSize, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/latest";
3
- import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
1
+ import { Display, ModernDisplay, report, Amazing_Slider, useExpandingContainer, ColsAtSize, Elem, Node_Array } from "@depict-ai/utilishared/latest";
4
2
  import { ContentLink, SearchResponse, SearchFilter as _SearchFilter1 } from "@depict-ai/types/api/SearchResponse";
5
3
  import { Ancestors, ListingSuggestion, SearchSuggestionsResponseV3 } from "@depict-ai/types/api/SearchSuggestionsResponseV3";
6
4
  import { ProductListing, GetListingResponse, ContentBlock as _ContentBlock1 } from "@depict-ai/types/api/GetListingResponse";
5
+ import { JSX, Accessor, Setter, Signal } from "solid-js";
6
+ import { SearchFilter, SearchRequestV3, SortModel } from "@depict-ai/types/api/SearchRequestV3";
7
7
  import { ProductListingResponseV3, SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/ProductListingResponseV3";
8
8
  import { SearchSuggestionsRequestV3 } from "@depict-ai/types/api/SearchSuggestionsRequestV3";
9
9
  import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequestV3";
@@ -11,7 +11,61 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.7.32";
14
+ export const version = "4.7.33";
15
+ type DisplayTransformerAlwaysThereData = {
16
+ merchant: string;
17
+ market: string;
18
+ locale: string;
19
+ };
20
+ type CanBePromiseWrapped<T> = T | Promise<T>;
21
+ export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
22
+ page_url: string;
23
+ })[] : T[K] };
24
+ /**
25
+ * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
26
+ */
27
+ type ProductListingWithAncestors = ProductListing & {
28
+ ancestors: Ancestors;
29
+ };
30
+ /**
31
+ * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
32
+ */
33
+ type ListingSuggestionForTransformer = (ListingSuggestion & {
34
+ is_suggestion: true;
35
+ }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
36
+ is_suggestion: false;
37
+ });
38
+ /**
39
+ * DisplayTransformers supersede pageURLCreator
40
+ * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
41
+ */
42
+ export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
43
+ products?: (options: DisplayTransformerAlwaysThereData & {
44
+ displays: InputDisplay[];
45
+ }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
46
+ categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
47
+ data: T[];
48
+ }) => CanBePromiseWrapped<(T & {
49
+ page_url: string;
50
+ })[]>;
51
+ contentResults?: (options: DisplayTransformerAlwaysThereData & {
52
+ data: ContentLink[];
53
+ }) => CanBePromiseWrapped<ContentLink[]>;
54
+ };
55
+ export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
56
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
57
+ } : {
58
+ display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
59
+ } : {
60
+ page_url_creator?: never;
61
+ display_transformers?: never;
62
+ };
63
+ export const getExtraDisplayTransformers: () => DisplayTransformers<any, any> | undefined;
64
+ /**
65
+ *
66
+ * @param displayTransformers
67
+ */
68
+ export const setExtraDisplayTransformers: <InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay = ModernDisplayWithPageUrl<InputDisplay>>(displayTransformers: DisplayTransformers<InputDisplay, OutputDisplay>) => DisplayTransformers<InputDisplay, OutputDisplay>;
15
69
  /**
16
70
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
71
  */
@@ -434,54 +488,6 @@ export function SolidFormatPrice(props: {
434
488
  places_after_comma_: number | "auto";
435
489
  };
436
490
  }): JSX.Element;
437
- type DisplayTransformerAlwaysThereData = {
438
- merchant: string;
439
- market: string;
440
- locale: string;
441
- };
442
- type CanBePromiseWrapped<T> = T | Promise<T>;
443
- export type ModernDisplayWithPageUrl<T extends ModernDisplay> = { [K in keyof T]: K extends "variant_displays" ? (T[K][number] & {
444
- page_url: string;
445
- })[] : T[K] };
446
- /**
447
- * A ProductListing with ancestors added in, this is what we pass to the display transformers as the ancestors might be required to construct the URL
448
- */
449
- type ProductListingWithAncestors = ProductListing & {
450
- ancestors: Ancestors;
451
- };
452
- /**
453
- * The displayTransformer for categories does not only get a list of ListingSuggestions, when a search query has listing suggestions, but also their ancestors since we show breadcrumbs for the listing suggestions. To let the user differentiate (since the suggestion ones can be added/removed but not the ancestors) we add a boolean is_suggestion to the listing suggestions passed to the displayTransformer.
454
- */
455
- type ListingSuggestionForTransformer = (ListingSuggestion & {
456
- is_suggestion: true;
457
- }) | (Omit<ListingSuggestion, "suggestions_result_id"> & {
458
- is_suggestion: false;
459
- });
460
- /**
461
- * DisplayTransformers supersede pageURLCreator
462
- * DisplayTransformers are functions that take in a list of categories, content search results or products and then can transform or enrich the data for each category, content search result or product card in a batched way.
463
- */
464
- export type DisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay extends ModernDisplay | never> = {
465
- products?: (options: DisplayTransformerAlwaysThereData & {
466
- displays: InputDisplay[];
467
- }) => CanBePromiseWrapped<OutputDisplay extends ModernDisplay ? ModernDisplayWithPageUrl<OutputDisplay>[] : never>;
468
- categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
469
- data: T[];
470
- }) => CanBePromiseWrapped<(T & {
471
- page_url: string;
472
- })[]>;
473
- contentResults?: (options: DisplayTransformerAlwaysThereData & {
474
- data: ContentLink[];
475
- }) => CanBePromiseWrapped<ContentLink[]>;
476
- };
477
- export type SomethingTakingADisplayTransformers<InputDisplay extends Display, OutputDisplay extends ModernDisplay | never> = InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
478
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
479
- } : {
480
- display_transformers: DisplayTransformers<InputDisplay, OutputDisplay>;
481
- } : {
482
- page_url_creator?: never;
483
- display_transformers?: never;
484
- };
485
491
  type ListingSuggestionAfterURLCreator = { [K in keyof ListingSuggestion]: K extends "ancestors" ? (ListingSuggestion & {
486
492
  page_url: string;
487
493
  })[] : ListingSuggestion[K] } & {
@@ -7,7 +7,14 @@ import { dlog as $i7OB2$dlog, catchify as $i7OB2$catchify, ListenableSet as $i7O
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.7.32";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.7.33";
11
+
12
+ // Value first so shopify merchants can set (extra) display transformers in the shopify app
13
+ // Calling these functions normally doesn't do anything, but our shopify app respects them
14
+ // Them being here is value first too because this can be easily imported in the product card editor
15
+ let $a63fa9cb46ed211b$var$extraDisplayTransformers;
16
+ const $a63fa9cb46ed211b$export$b2d94be4f02525b2 = () => $a63fa9cb46ed211b$var$extraDisplayTransformers;
17
+ const $a63fa9cb46ed211b$export$f98b8d5ea7207a1 = displayTransformers => $a63fa9cb46ed211b$var$extraDisplayTransformers = displayTransformers;
11
18
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
19
  const signal = $i7OB2$createSignal(false);
13
20
  $i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
@@ -1457,24 +1464,29 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
1457
1464
  })));
1458
1465
  return container;
1459
1466
  }
1467
+ const $70bb27cc6be01fc7$var$customUrls = (url, width) => {
1468
+ if (url?.startsWith?.("https://cdn.shopify.com"))
1469
+ // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1470
+ // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1471
+ return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
1472
+ // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1473
+ return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1474
+ };
1460
1475
  function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
1461
1476
  return $i7OB2$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $i7OB2$mergeProps1(props, {
1462
1477
  get imgProps() {
1463
1478
  return {
1464
1479
  ...props.imgProps,
1465
- customUrls: (url, width // Apparently don't have to encode url for CF's service
1466
- ) => {
1467
- if (url?.startsWith?.("https://cdn.shopify.com"))
1468
- // The shopify image resizing CDN blocks Cloudflare's image resizer. It's possible that we can't detect shopify image URLs sometimes because they go to the merchant's domain,
1469
- // but it seems like the URLs returned by the Depict API always goes to the cdn.shopify.com version of an image, so this simple workaround works.
1470
- return $e8ffe11ed01df0fe$export$1d6267828870adda(url, width);
1471
- // Use cloudflare image resizer instead of img.depict.ai because it's a lot faster (and also auto-chooses other formats if webp is not supported)
1472
- return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
1473
- }
1480
+ customUrls: $70bb27cc6be01fc7$var$customUrls
1474
1481
  };
1475
1482
  }
1476
1483
  }));
1477
1484
  }
1485
+ function $70bb27cc6be01fc7$export$140423fa4bfb6d63(props) {
1486
+ return $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $i7OB2$mergeProps1(props, {
1487
+ customUrls: $70bb27cc6be01fc7$var$customUrls
1488
+ }));
1489
+ }
1478
1490
  function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1479
1491
  return $i7OB2$createMemo(() => {
1480
1492
  const price_formatting = props.price_formatting_;
@@ -12264,7 +12276,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
12264
12276
  href: link
12265
12277
  }, {
12266
12278
  get children() {
12267
- return $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
12279
+ return $i7OB2$createComponent((0, $70bb27cc6be01fc7$export$140423fa4bfb6d63), {
12268
12280
  get size() {
12269
12281
  return $i7OB2$createMemo(() => wrapperSize()?.() || 0);
12270
12282
  },
@@ -12769,4 +12781,4 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
12769
12781
  }, "Entire CategoryPage failed");
12770
12782
  }
12771
12783
  $i7OB2$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
12772
- export { $e7a7eb102ddc0c79$export$92aa5d691d588f3f as remap_blocks_to_index, $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };
12784
+ export { $a63fa9cb46ed211b$export$f98b8d5ea7207a1 as setExtraDisplayTransformers, $a63fa9cb46ed211b$export$b2d94be4f02525b2 as getExtraDisplayTransformers, $e7a7eb102ddc0c79$export$92aa5d691d588f3f as remap_blocks_to_index, $4eb0a704f8f30273$export$d4d96868197be50e as useMobileHover, $5e3d278ef4c80cd7$export$54299a3c81f5425 as useVisibilityState, $f32e14878e75af51$export$eaa625fb39439e37 as useSlidableInformation, $f091294da861020c$export$80bb7300ce6a8be3 as useProductCardIsVisible, $f091294da861020c$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $24e27fab9c821b86$export$5bad61ecde080b1f as useExpandingContainerReactive, $07ef910e8ef6b783$export$2c9f9bf2092486aa as LooksSliderOrGrid, $e9d1d09be9e6471e$export$44809a8a3e867e30 as LookCard, $4fd2ba03703a7d92$export$7e1297a3a19f10d8 as PseudoRouter, $de6ccd37192b5fc2$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $90980bd87c9960f9$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $90980bd87c9960f9$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $a281666e5c15c2ec$export$29d28dadc2d6b631 as allowNativeNavigation, $66db7a014e20802e$export$1ea76ea778b880dd as modalVersionSymbol, $136f1d4d6c7ba6ac$export$e417c49320921907 as createDeparallelizedNoDropResource, $d8dbf52fea1773e2$export$f50b88e2a00918b5 as throw_globally, $42912431795f188e$export$9265e66f26f8e383 as ClassicSearchModal, $500a16dd18ee5a71$export$b0c55aa2e87c4be7 as SearchModalV2, $70bb27cc6be01fc7$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $024fbc0a2d796fad$export$3e41faf802a29e71 as Tab, $024fbc0a2d796fad$export$b2539bed5023c21c as Tabs, $8560c919ff763930$export$d4973c31938cbfd1 as ShopTheLookButton, $ca6f574bd8772184$export$e183a13865960371 as history_dot_state_to_state, $4147651646da990a$export$916e6850778505f6 as strip_encoded_filter_and_sort, $4147651646da990a$export$58aa3f171519b6d7 as encode_filters, $4147651646da990a$export$f934fa24c3a86811 as decode_filters, $4147651646da990a$export$62acb285a7579555 as encode_sorting, $4147651646da990a$export$766e9676e74997d3 as decode_sorting, $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $b6440e72ed83671a$export$11354f017ddc9790 as ProductCardIndexProvider, $b6440e72ed83671a$export$e3faf4d95300054f as useProductCardIndex, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $2449872a62a75a20$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $b7436a6d1fd64e3b$export$240ecf5363d76c0f as ExtraSentryContextProvider, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $c8d5ff4524619fcd$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $a0f0e923bad68a9b$export$58e808b1db15d3bc as fetchDepictRecommendations, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $4b2134398dfa83fa$export$c1a6b039e689a58e as get_listings, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b6d5529b253681aa$export$3f238c96c45e6cc6 as ALIGN_TOP, $b6d5529b253681aa$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $b6d5529b253681aa$export$7895aadd1956b1c7 as ALIGN_LEFT, $b6d5529b253681aa$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version, $58b3487626e85ece$export$316f6f283ae64765 as SearchField, $feffae76d8dc0135$export$5b7c3ce0ebe51f86 as BreadCrumbs, $feffae76d8dc0135$export$de035477d6fef996 as QuickLinks, $442f32a4d80abbde$export$e2bf8ce7779e827e as CategoryPage };