@depict-ai/ui 4.10.10 → 4.10.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ES10/index.cjs +56 -27
- package/ES10/index.d.ts +27 -7
- package/ES10/index.js +56 -27
- package/latest/index.cjs +54 -27
- package/latest/index.d.ts +27 -7
- package/latest/index.js +54 -27
- package/package.json +5 -5
- package/server/ES10/index.cjs +56 -27
- package/server/ES10/index.d.ts +27 -7
- package/server/ES10/index.js +56 -27
- package/server/latest/index.cjs +54 -27
- package/server/latest/index.d.ts +27 -7
- package/server/latest/index.js +54 -27
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ 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.10.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.12";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -7907,7 +7907,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
7907
7907
|
})));
|
|
7908
7908
|
return container;
|
|
7909
7909
|
}
|
|
7910
|
-
const $98688279b9059f50$var$
|
|
7910
|
+
const $98688279b9059f50$var$defaultCustomUrls = (url, width) => {
|
|
7911
7911
|
var _url$startsWith;
|
|
7912
7912
|
if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
|
|
7913
7913
|
// 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,
|
|
@@ -7917,18 +7917,23 @@ const $98688279b9059f50$var$customUrls = (url, width) => {
|
|
|
7917
7917
|
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
7918
7918
|
};
|
|
7919
7919
|
function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
7920
|
+
var _props$imageResizer_;
|
|
7921
|
+
const resolvedCustomUrls = (_props$imageResizer_ = props.imageResizer_) !== null && _props$imageResizer_ !== void 0 ? _props$imageResizer_ : $98688279b9059f50$var$defaultCustomUrls;
|
|
7920
7922
|
return $8tj43$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $8tj43$mergeProps1(props, {
|
|
7921
7923
|
get imgProps() {
|
|
7922
7924
|
return {
|
|
7923
7925
|
...props.imgProps,
|
|
7924
|
-
customUrls:
|
|
7926
|
+
customUrls: resolvedCustomUrls
|
|
7925
7927
|
};
|
|
7926
7928
|
}
|
|
7927
7929
|
}));
|
|
7928
7930
|
}
|
|
7929
7931
|
function $98688279b9059f50$export$140423fa4bfb6d63(props) {
|
|
7930
7932
|
return $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $8tj43$mergeProps1(props, {
|
|
7931
|
-
customUrls
|
|
7933
|
+
get customUrls() {
|
|
7934
|
+
var _props$imageResizer_2;
|
|
7935
|
+
return (_props$imageResizer_2 = props.imageResizer_) !== null && _props$imageResizer_2 !== void 0 ? _props$imageResizer_2 : $98688279b9059f50$var$defaultCustomUrls;
|
|
7936
|
+
}
|
|
7932
7937
|
}));
|
|
7933
7938
|
}
|
|
7934
7939
|
let $e92c154db502596d$var$cachedHlsModule;
|
|
@@ -7954,7 +7959,8 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
7954
7959
|
router_: router_,
|
|
7955
7960
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
7956
7961
|
mediaUrl_: mediaUrl_,
|
|
7957
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
7962
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
7963
|
+
imageResizer_: imageResizer_
|
|
7958
7964
|
} = _ref;
|
|
7959
7965
|
let wroteAspectRatioToContainer = false; // Only write this once so we don't get into a aspect ratio changed -> size changed -> image source changed -> aspect ratio slightly changed infinite loop
|
|
7960
7966
|
const [wrapperSize, setWrapperSize] = $8tj43$createSignal();
|
|
@@ -8010,7 +8016,8 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8010
8016
|
src: mediaUrl_,
|
|
8011
8017
|
"class": "d-standard-content",
|
|
8012
8018
|
onDecoded: () => setHasLoaded(true),
|
|
8013
|
-
ref: el => el.addEventListener("load", $8tj43$catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
8019
|
+
ref: el => el.addEventListener("load", $8tj43$catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight))),
|
|
8020
|
+
imageResizer_: imageResizer_
|
|
8014
8021
|
});
|
|
8015
8022
|
}
|
|
8016
8023
|
}), $8tj43$createComponent((0, $8tj43$Match), {
|
|
@@ -8061,7 +8068,7 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
8061
8068
|
}
|
|
8062
8069
|
}));
|
|
8063
8070
|
}
|
|
8064
|
-
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
8071
|
+
function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
8065
8072
|
let hasSeenContentBlock = false;
|
|
8066
8073
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
8067
8074
|
const contentComponents = new Map();
|
|
@@ -8117,7 +8124,8 @@ function $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
8117
8124
|
...prev.aspectRatios,
|
|
8118
8125
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
8119
8126
|
}
|
|
8120
|
-
}))
|
|
8127
|
+
})),
|
|
8128
|
+
imageResizer_: imageResizer_
|
|
8121
8129
|
});
|
|
8122
8130
|
contentComponents.set(componentCacheKey, component);
|
|
8123
8131
|
}
|
|
@@ -8182,7 +8190,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8182
8190
|
filterModalParent_: filterModalParent_,
|
|
8183
8191
|
showSliderArrow_: showSliderArrow_,
|
|
8184
8192
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
8185
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
8193
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
8194
|
+
imageResizer_: imageResizer_
|
|
8186
8195
|
} = _ref;
|
|
8187
8196
|
let results_for;
|
|
8188
8197
|
let only_show_filters_opener_;
|
|
@@ -8278,7 +8287,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
8278
8287
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
8279
8288
|
return result;
|
|
8280
8289
|
}));
|
|
8281
|
-
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
8290
|
+
const contentBlocksByRow = $12ff24fdc4b26d88$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
8282
8291
|
const countOfProductsForUI = $0728458b46ee9d32$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
8283
8292
|
const available_sortings_ = $8tj43$createMemo(() => {
|
|
8284
8293
|
var _plp_products_, _plp_products_$sorts;
|
|
@@ -8864,7 +8873,8 @@ function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
|
8864
8873
|
outerRef_: outerRef_,
|
|
8865
8874
|
animationDuration_: animationDuration_,
|
|
8866
8875
|
priceFormatting_: priceFormatting_,
|
|
8867
|
-
pseudoRouter_: pseudoRouter_
|
|
8876
|
+
pseudoRouter_: pseudoRouter_,
|
|
8877
|
+
imageResizer_: imageResizer_
|
|
8868
8878
|
} = _ref;
|
|
8869
8879
|
const variantToUse = $8tj43$createMemo(() => {
|
|
8870
8880
|
const display = display_();
|
|
@@ -8953,7 +8963,8 @@ function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
|
8953
8963
|
},
|
|
8954
8964
|
imgProps: {
|
|
8955
8965
|
keyRatioUpdating: true
|
|
8956
|
-
}
|
|
8966
|
+
},
|
|
8967
|
+
imageResizer_: imageResizer_
|
|
8957
8968
|
});
|
|
8958
8969
|
}
|
|
8959
8970
|
}));
|
|
@@ -9159,7 +9170,8 @@ function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
9159
9170
|
supportsHover_: supportsHover_,
|
|
9160
9171
|
priceFormatting_: priceFormatting_,
|
|
9161
9172
|
pseudoRouter_: pseudoRouter_,
|
|
9162
|
-
containerHeight_: containerHeight_
|
|
9173
|
+
containerHeight_: containerHeight_,
|
|
9174
|
+
imageResizer_: imageResizer_
|
|
9163
9175
|
} = _ref;
|
|
9164
9176
|
let isAffectedByChromeBug = false;
|
|
9165
9177
|
// If the user requests the drawer to be expanded or not
|
|
@@ -9227,6 +9239,7 @@ function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
9227
9239
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
9228
9240
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
9229
9241
|
priceFormatting_: priceFormatting_,
|
|
9242
|
+
imageResizer_: imageResizer_,
|
|
9230
9243
|
outerRef_: el => $8tj43$createEffect(() => {
|
|
9231
9244
|
if (index !== 0) return;
|
|
9232
9245
|
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -9286,7 +9299,8 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
9286
9299
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
9287
9300
|
animationDuration_: animationDuration_,
|
|
9288
9301
|
priceFormatting_: priceFormatting_,
|
|
9289
|
-
pseudoRouter_: pseudoRouter_
|
|
9302
|
+
pseudoRouter_: pseudoRouter_,
|
|
9303
|
+
imageResizer_: imageResizer_
|
|
9290
9304
|
} = _ref;
|
|
9291
9305
|
let container;
|
|
9292
9306
|
const useWantsExpandedSignal_ = $8tj43$createSignal(false);
|
|
@@ -9376,7 +9390,8 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
9376
9390
|
return (_display_ = display_()) === null || _display_ === void 0 ? void 0 : (_display_$image_urls = _display_.image_urls) === null || _display_$image_urls === void 0 ? void 0 : _display_$image_urls[0];
|
|
9377
9391
|
},
|
|
9378
9392
|
aspectRatio: placeholderImageAspectRatio_,
|
|
9379
|
-
autoAdjustAspectRatio: true
|
|
9393
|
+
autoAdjustAspectRatio: true,
|
|
9394
|
+
imageResizer_: imageResizer_
|
|
9380
9395
|
});
|
|
9381
9396
|
}
|
|
9382
9397
|
}), _el$3, _co$);
|
|
@@ -9392,7 +9407,8 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
9392
9407
|
FavoriteButton_: FavoriteButton_,
|
|
9393
9408
|
priceFormatting_: priceFormatting_,
|
|
9394
9409
|
pseudoRouter_: pseudoRouter_,
|
|
9395
|
-
containerHeight_: containerHeight_
|
|
9410
|
+
containerHeight_: containerHeight_,
|
|
9411
|
+
imageResizer_: imageResizer_
|
|
9396
9412
|
}), _el$5, _co$2);
|
|
9397
9413
|
$8tj43$effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
9398
9414
|
$8tj43$runHydrationEvents();
|
|
@@ -9677,7 +9693,8 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
9677
9693
|
animationDuration_: expandingAnimationDuration,
|
|
9678
9694
|
expandedLooksSignal_: $bb34cd283e904784$var$expandedLooksSignal_,
|
|
9679
9695
|
priceFormatting_: () => props.priceFormatting_,
|
|
9680
|
-
pseudoRouter_: pseudoRouter
|
|
9696
|
+
pseudoRouter_: pseudoRouter,
|
|
9697
|
+
imageResizer_: props.imageResizer_
|
|
9681
9698
|
}),
|
|
9682
9699
|
recommendations_resource_: looksResource,
|
|
9683
9700
|
title_: () => props.title_,
|
|
@@ -11652,7 +11669,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
11652
11669
|
merchant_: merchant_,
|
|
11653
11670
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
11654
11671
|
index_: index_,
|
|
11655
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
11672
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
11673
|
+
imageResizer_: imageResizer_
|
|
11656
11674
|
} = _ref;
|
|
11657
11675
|
const href = $8tj43$createMemo(() => {
|
|
11658
11676
|
var _listing_;
|
|
@@ -11719,7 +11737,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
11719
11737
|
get children() {
|
|
11720
11738
|
var _el$3 = $8tj43$getNextElement($26db6925469636a4$var$_tmpl$2);
|
|
11721
11739
|
$8tj43$insert(_el$3, $8tj43$createComponent($26db6925469636a4$export$ea41102db9bd68c3, {
|
|
11722
|
-
image_urls_: image_urls
|
|
11740
|
+
image_urls_: image_urls,
|
|
11741
|
+
imageResizer_: imageResizer_
|
|
11723
11742
|
}));
|
|
11724
11743
|
return _el$3;
|
|
11725
11744
|
}
|
|
@@ -11765,7 +11784,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
11765
11784
|
}
|
|
11766
11785
|
function $26db6925469636a4$export$ea41102db9bd68c3(_ref3) {
|
|
11767
11786
|
let {
|
|
11768
|
-
image_urls_: image_urls_
|
|
11787
|
+
image_urls_: image_urls_,
|
|
11788
|
+
imageResizer_: imageResizer_
|
|
11769
11789
|
} = _ref3;
|
|
11770
11790
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
11771
11791
|
get when() {
|
|
@@ -11789,7 +11809,8 @@ function $26db6925469636a4$export$ea41102db9bd68c3(_ref3) {
|
|
|
11789
11809
|
},
|
|
11790
11810
|
imgProps: {
|
|
11791
11811
|
style: "object-fit: cover;"
|
|
11792
|
-
}
|
|
11812
|
+
},
|
|
11813
|
+
imageResizer_: imageResizer_
|
|
11793
11814
|
})
|
|
11794
11815
|
});
|
|
11795
11816
|
}
|
|
@@ -11820,7 +11841,8 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
11820
11841
|
selected_index_: selected_index_,
|
|
11821
11842
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
11822
11843
|
showPlaceholders_: showPlaceholders_,
|
|
11823
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
11844
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
11845
|
+
imageResizer_: imageResizer_
|
|
11824
11846
|
} = _ref;
|
|
11825
11847
|
const listings_by_id = $8tj43$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
11826
11848
|
const productCards = $8tj43$createComponent((0, $8tj43$For), {
|
|
@@ -11838,7 +11860,8 @@ function $ab401afaded322ab$export$c8d7e00464029b45(_ref) {
|
|
|
11838
11860
|
merchant_: merchant_,
|
|
11839
11861
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
11840
11862
|
index_: index,
|
|
11841
|
-
selected_index_: selected_index_
|
|
11863
|
+
selected_index_: selected_index_,
|
|
11864
|
+
imageResizer_: imageResizer_
|
|
11842
11865
|
});
|
|
11843
11866
|
}
|
|
11844
11867
|
});
|
|
@@ -12231,7 +12254,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12231
12254
|
sorting_query_param_: sorting_query_param_,
|
|
12232
12255
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
12233
12256
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
12234
|
-
forceUseDiv_: forceUseDiv_
|
|
12257
|
+
forceUseDiv_: forceUseDiv_,
|
|
12258
|
+
imageResizer_: imageResizer_
|
|
12235
12259
|
} = _ref;
|
|
12236
12260
|
let on_enter_in_search_field_function;
|
|
12237
12261
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -12449,7 +12473,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12449
12473
|
},
|
|
12450
12474
|
imgProps: {
|
|
12451
12475
|
alt: "Product image"
|
|
12452
|
-
}
|
|
12476
|
+
},
|
|
12477
|
+
imageResizer_: imageResizer_
|
|
12453
12478
|
}),
|
|
12454
12479
|
...instant_results_options_
|
|
12455
12480
|
}), _el$4, _co$);
|
|
@@ -12480,7 +12505,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12480
12505
|
selected_index_: selected_index_,
|
|
12481
12506
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
12482
12507
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
12483
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
12508
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
12509
|
+
imageResizer_: imageResizer_
|
|
12484
12510
|
});
|
|
12485
12511
|
}
|
|
12486
12512
|
});
|
|
@@ -15853,6 +15879,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
15853
15879
|
display_transformers: display_transformers,
|
|
15854
15880
|
api: api,
|
|
15855
15881
|
searchModalComponent: searchModalComponent,
|
|
15882
|
+
imageResizer_: imageResizer_,
|
|
15856
15883
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
15857
15884
|
disable_scrolling_during_modal = true,
|
|
15858
15885
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -16016,6 +16043,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
16016
16043
|
},
|
|
16017
16044
|
i18n_: i18n_,
|
|
16018
16045
|
enable_category_suggestions_: enable_category_suggestions,
|
|
16046
|
+
imageResizer_: imageResizer_,
|
|
16019
16047
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
16020
16048
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
16021
16049
|
}, override_modal_element);
|
|
@@ -16926,7 +16954,8 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16926
16954
|
product_card_template_: product_card_template,
|
|
16927
16955
|
sorting_query_param_: sorting_query_param_,
|
|
16928
16956
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
16929
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
16957
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
16958
|
+
imageResizer_: props.imageResizer_
|
|
16930
16959
|
});
|
|
16931
16960
|
}, "Entire CategoryPage failed");
|
|
16932
16961
|
}
|
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.12";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -7582,7 +7582,7 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
|
|
|
7582
7582
|
})));
|
|
7583
7583
|
return container;
|
|
7584
7584
|
}
|
|
7585
|
-
const $d212a67662c5cf38$var$
|
|
7585
|
+
const $d212a67662c5cf38$var$defaultCustomUrls = (url, width) => {
|
|
7586
7586
|
if (url?.startsWith?.("https://cdn.shopify.com"))
|
|
7587
7587
|
// 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,
|
|
7588
7588
|
// 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.
|
|
@@ -7591,18 +7591,21 @@ const $d212a67662c5cf38$var$customUrls = (url, width) => {
|
|
|
7591
7591
|
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
7592
7592
|
};
|
|
7593
7593
|
function $d212a67662c5cf38$export$9d4a4b669b1929ab(props) {
|
|
7594
|
+
const resolvedCustomUrls = props.imageResizer_ ?? $d212a67662c5cf38$var$defaultCustomUrls;
|
|
7594
7595
|
return $gVhhF$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $gVhhF$solidjsweb.mergeProps(props, {
|
|
7595
7596
|
get imgProps() {
|
|
7596
7597
|
return {
|
|
7597
7598
|
...props.imgProps,
|
|
7598
|
-
customUrls:
|
|
7599
|
+
customUrls: resolvedCustomUrls
|
|
7599
7600
|
};
|
|
7600
7601
|
}
|
|
7601
7602
|
}));
|
|
7602
7603
|
}
|
|
7603
7604
|
function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
|
|
7604
7605
|
return $gVhhF$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $gVhhF$solidjsweb.mergeProps(props, {
|
|
7605
|
-
customUrls
|
|
7606
|
+
get customUrls() {
|
|
7607
|
+
return props.imageResizer_ ?? $d212a67662c5cf38$var$defaultCustomUrls;
|
|
7608
|
+
}
|
|
7606
7609
|
}));
|
|
7607
7610
|
}
|
|
7608
7611
|
let $20ff40266d725403$var$cachedHlsModule;
|
|
@@ -7627,7 +7630,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7627
7630
|
router_: router_,
|
|
7628
7631
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
7629
7632
|
mediaUrl_: mediaUrl_,
|
|
7630
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
7633
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
7634
|
+
imageResizer_: imageResizer_
|
|
7631
7635
|
}) {
|
|
7632
7636
|
let wroteAspectRatioToContainer = false; // Only write this once so we don't get into a aspect ratio changed -> size changed -> image source changed -> aspect ratio slightly changed infinite loop
|
|
7633
7637
|
const [wrapperSize, setWrapperSize] = $gVhhF$solidjs.createSignal();
|
|
@@ -7677,7 +7681,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7677
7681
|
src: mediaUrl_,
|
|
7678
7682
|
"class": "d-standard-content",
|
|
7679
7683
|
onDecoded: () => setHasLoaded(true),
|
|
7680
|
-
ref: el => el.addEventListener("load", $gVhhF$depictaiutilisharedlatest.catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
7684
|
+
ref: el => el.addEventListener("load", $gVhhF$depictaiutilisharedlatest.catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight))),
|
|
7685
|
+
imageResizer_: imageResizer_
|
|
7681
7686
|
});
|
|
7682
7687
|
}
|
|
7683
7688
|
}), $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Match), {
|
|
@@ -7728,7 +7733,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7728
7733
|
}
|
|
7729
7734
|
}));
|
|
7730
7735
|
}
|
|
7731
|
-
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
7736
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
7732
7737
|
let hasSeenContentBlock = false;
|
|
7733
7738
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
7734
7739
|
const contentComponents = new Map();
|
|
@@ -7783,7 +7788,8 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7783
7788
|
...prev.aspectRatios,
|
|
7784
7789
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
7785
7790
|
}
|
|
7786
|
-
}))
|
|
7791
|
+
})),
|
|
7792
|
+
imageResizer_: imageResizer_
|
|
7787
7793
|
});
|
|
7788
7794
|
contentComponents.set(componentCacheKey, component);
|
|
7789
7795
|
}
|
|
@@ -7845,7 +7851,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7845
7851
|
filterModalParent_: filterModalParent_,
|
|
7846
7852
|
showSliderArrow_: showSliderArrow_,
|
|
7847
7853
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7848
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
7854
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
7855
|
+
imageResizer_: imageResizer_
|
|
7849
7856
|
}) {
|
|
7850
7857
|
let results_for;
|
|
7851
7858
|
let only_show_filters_opener_;
|
|
@@ -7941,7 +7948,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
7941
7948
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
7942
7949
|
return result;
|
|
7943
7950
|
}));
|
|
7944
|
-
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
7951
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
7945
7952
|
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
7946
7953
|
const available_sortings_ = $gVhhF$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
7947
7954
|
...sort,
|
|
@@ -8493,7 +8500,8 @@ function $0540c3739b32dc79$export$b73ed90f0ee50dc3({
|
|
|
8493
8500
|
outerRef_: outerRef_,
|
|
8494
8501
|
animationDuration_: animationDuration_,
|
|
8495
8502
|
priceFormatting_: priceFormatting_,
|
|
8496
|
-
pseudoRouter_: pseudoRouter_
|
|
8503
|
+
pseudoRouter_: pseudoRouter_,
|
|
8504
|
+
imageResizer_: imageResizer_
|
|
8497
8505
|
}) {
|
|
8498
8506
|
const variantToUse = $gVhhF$solidjs.createMemo(() => {
|
|
8499
8507
|
const display = display_();
|
|
@@ -8567,7 +8575,8 @@ function $0540c3739b32dc79$export$b73ed90f0ee50dc3({
|
|
|
8567
8575
|
},
|
|
8568
8576
|
imgProps: {
|
|
8569
8577
|
keyRatioUpdating: true
|
|
8570
|
-
}
|
|
8578
|
+
},
|
|
8579
|
+
imageResizer_: imageResizer_
|
|
8571
8580
|
});
|
|
8572
8581
|
}
|
|
8573
8582
|
}));
|
|
@@ -8768,7 +8777,8 @@ function $912d9a717ceee184$export$ebf0b1d4f90c09ae({
|
|
|
8768
8777
|
supportsHover_: supportsHover_,
|
|
8769
8778
|
priceFormatting_: priceFormatting_,
|
|
8770
8779
|
pseudoRouter_: pseudoRouter_,
|
|
8771
|
-
containerHeight_: containerHeight_
|
|
8780
|
+
containerHeight_: containerHeight_,
|
|
8781
|
+
imageResizer_: imageResizer_
|
|
8772
8782
|
}) {
|
|
8773
8783
|
let isAffectedByChromeBug = false;
|
|
8774
8784
|
// If the user requests the drawer to be expanded or not
|
|
@@ -8833,6 +8843,7 @@ function $912d9a717ceee184$export$ebf0b1d4f90c09ae({
|
|
|
8833
8843
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
8834
8844
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
8835
8845
|
priceFormatting_: priceFormatting_,
|
|
8846
|
+
imageResizer_: imageResizer_,
|
|
8836
8847
|
outerRef_: el => $gVhhF$solidjs.createEffect(() => {
|
|
8837
8848
|
if (index !== 0) return;
|
|
8838
8849
|
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -8891,7 +8902,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
8891
8902
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
8892
8903
|
animationDuration_: animationDuration_,
|
|
8893
8904
|
priceFormatting_: priceFormatting_,
|
|
8894
|
-
pseudoRouter_: pseudoRouter_
|
|
8905
|
+
pseudoRouter_: pseudoRouter_,
|
|
8906
|
+
imageResizer_: imageResizer_
|
|
8895
8907
|
}) {
|
|
8896
8908
|
let container;
|
|
8897
8909
|
const useWantsExpandedSignal_ = $gVhhF$solidjs.createSignal(false);
|
|
@@ -8978,7 +8990,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
8978
8990
|
return display_()?.image_urls?.[0];
|
|
8979
8991
|
},
|
|
8980
8992
|
aspectRatio: placeholderImageAspectRatio_,
|
|
8981
|
-
autoAdjustAspectRatio: true
|
|
8993
|
+
autoAdjustAspectRatio: true,
|
|
8994
|
+
imageResizer_: imageResizer_
|
|
8982
8995
|
});
|
|
8983
8996
|
}
|
|
8984
8997
|
}), _el$3, _co$);
|
|
@@ -8991,7 +9004,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
8991
9004
|
FavoriteButton_: FavoriteButton_,
|
|
8992
9005
|
priceFormatting_: priceFormatting_,
|
|
8993
9006
|
pseudoRouter_: pseudoRouter_,
|
|
8994
|
-
containerHeight_: containerHeight_
|
|
9007
|
+
containerHeight_: containerHeight_,
|
|
9008
|
+
imageResizer_: imageResizer_
|
|
8995
9009
|
}), _el$5, _co$2);
|
|
8996
9010
|
$gVhhF$solidjsweb.effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
8997
9011
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
@@ -9251,7 +9265,8 @@ function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
|
9251
9265
|
animationDuration_: expandingAnimationDuration,
|
|
9252
9266
|
expandedLooksSignal_: $a3bbfa5fdaa39f3a$var$expandedLooksSignal_,
|
|
9253
9267
|
priceFormatting_: () => props.priceFormatting_,
|
|
9254
|
-
pseudoRouter_: pseudoRouter
|
|
9268
|
+
pseudoRouter_: pseudoRouter,
|
|
9269
|
+
imageResizer_: props.imageResizer_
|
|
9255
9270
|
}),
|
|
9256
9271
|
recommendations_resource_: looksResource,
|
|
9257
9272
|
title_: () => props.title_,
|
|
@@ -11134,7 +11149,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
11134
11149
|
merchant_: merchant_,
|
|
11135
11150
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
11136
11151
|
index_: index_,
|
|
11137
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
11152
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
11153
|
+
imageResizer_: imageResizer_
|
|
11138
11154
|
}) {
|
|
11139
11155
|
const href = $gVhhF$solidjs.createMemo(() => listing_()?.page_url); // <- could be made reactive getter created in displayTransformers, read it in memo here since it might create computations (for example in the preview-brower), and there's no owner in the onClick handler
|
|
11140
11156
|
const LinkToListing = props => (() => {
|
|
@@ -11190,7 +11206,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
11190
11206
|
get children() {
|
|
11191
11207
|
var _el$3 = $gVhhF$solidjsweb.getNextElement($1f3b5fa875714dea$var$_tmpl$2);
|
|
11192
11208
|
$gVhhF$solidjsweb.insert(_el$3, $gVhhF$solidjsweb.createComponent($1f3b5fa875714dea$export$ea41102db9bd68c3, {
|
|
11193
|
-
image_urls_: image_urls
|
|
11209
|
+
image_urls_: image_urls,
|
|
11210
|
+
imageResizer_: imageResizer_
|
|
11194
11211
|
}));
|
|
11195
11212
|
return _el$3;
|
|
11196
11213
|
}
|
|
@@ -11233,7 +11250,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
11233
11250
|
})();
|
|
11234
11251
|
}
|
|
11235
11252
|
function $1f3b5fa875714dea$export$ea41102db9bd68c3({
|
|
11236
|
-
image_urls_: image_urls_
|
|
11253
|
+
image_urls_: image_urls_,
|
|
11254
|
+
imageResizer_: imageResizer_
|
|
11237
11255
|
}) {
|
|
11238
11256
|
return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
11239
11257
|
get when() {
|
|
@@ -11256,7 +11274,8 @@ function $1f3b5fa875714dea$export$ea41102db9bd68c3({
|
|
|
11256
11274
|
},
|
|
11257
11275
|
imgProps: {
|
|
11258
11276
|
style: "object-fit: cover;"
|
|
11259
|
-
}
|
|
11277
|
+
},
|
|
11278
|
+
imageResizer_: imageResizer_
|
|
11260
11279
|
})
|
|
11261
11280
|
});
|
|
11262
11281
|
}
|
|
@@ -11286,7 +11305,8 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
11286
11305
|
selected_index_: selected_index_,
|
|
11287
11306
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
11288
11307
|
showPlaceholders_: showPlaceholders_,
|
|
11289
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
11308
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
11309
|
+
imageResizer_: imageResizer_
|
|
11290
11310
|
}) {
|
|
11291
11311
|
const listings_by_id = $gVhhF$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
11292
11312
|
const productCards = $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.For), {
|
|
@@ -11304,7 +11324,8 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
11304
11324
|
merchant_: merchant_,
|
|
11305
11325
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
11306
11326
|
index_: index,
|
|
11307
|
-
selected_index_: selected_index_
|
|
11327
|
+
selected_index_: selected_index_,
|
|
11328
|
+
imageResizer_: imageResizer_
|
|
11308
11329
|
});
|
|
11309
11330
|
}
|
|
11310
11331
|
});
|
|
@@ -11686,7 +11707,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
11686
11707
|
sorting_query_param_: sorting_query_param_,
|
|
11687
11708
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
11688
11709
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
11689
|
-
forceUseDiv_: forceUseDiv_
|
|
11710
|
+
forceUseDiv_: forceUseDiv_,
|
|
11711
|
+
imageResizer_: imageResizer_
|
|
11690
11712
|
}) {
|
|
11691
11713
|
let on_enter_in_search_field_function;
|
|
11692
11714
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -11897,7 +11919,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
11897
11919
|
},
|
|
11898
11920
|
imgProps: {
|
|
11899
11921
|
alt: "Product image"
|
|
11900
|
-
}
|
|
11922
|
+
},
|
|
11923
|
+
imageResizer_: imageResizer_
|
|
11901
11924
|
}),
|
|
11902
11925
|
...instant_results_options_
|
|
11903
11926
|
}), _el$4, _co$);
|
|
@@ -11928,7 +11951,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
11928
11951
|
selected_index_: selected_index_,
|
|
11929
11952
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
11930
11953
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
11931
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
11954
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
11955
|
+
imageResizer_: imageResizer_
|
|
11932
11956
|
});
|
|
11933
11957
|
}
|
|
11934
11958
|
});
|
|
@@ -15026,6 +15050,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
15026
15050
|
display_transformers: display_transformers,
|
|
15027
15051
|
api: api,
|
|
15028
15052
|
searchModalComponent: searchModalComponent,
|
|
15053
|
+
imageResizer_: imageResizer_,
|
|
15029
15054
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
15030
15055
|
disable_scrolling_during_modal = true,
|
|
15031
15056
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -15156,6 +15181,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
15156
15181
|
},
|
|
15157
15182
|
i18n_: i18n_,
|
|
15158
15183
|
enable_category_suggestions_: enable_category_suggestions,
|
|
15184
|
+
imageResizer_: imageResizer_,
|
|
15159
15185
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
15160
15186
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
15161
15187
|
}, override_modal_element);
|
|
@@ -15939,7 +15965,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
15939
15965
|
product_card_template_: product_card_template,
|
|
15940
15966
|
sorting_query_param_: sorting_query_param_,
|
|
15941
15967
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
15942
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
15968
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
15969
|
+
imageResizer_: props.imageResizer_
|
|
15943
15970
|
});
|
|
15944
15971
|
}, "Entire CategoryPage failed");
|
|
15945
15972
|
}
|