@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/server/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.12";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -6586,7 +6586,7 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
|
|
|
6586
6586
|
})));
|
|
6587
6587
|
return container;
|
|
6588
6588
|
}
|
|
6589
|
-
const $f3db423dc84bc35d$var$
|
|
6589
|
+
const $f3db423dc84bc35d$var$defaultCustomUrls = (url, width) => {
|
|
6590
6590
|
var _url$startsWith;
|
|
6591
6591
|
if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
|
|
6592
6592
|
// 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,
|
|
@@ -6596,18 +6596,23 @@ const $f3db423dc84bc35d$var$customUrls = (url, width) => {
|
|
|
6596
6596
|
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
6597
6597
|
};
|
|
6598
6598
|
function $f3db423dc84bc35d$export$9d4a4b669b1929ab(props) {
|
|
6599
|
+
var _props$imageResizer_;
|
|
6600
|
+
const resolvedCustomUrls = (_props$imageResizer_ = props.imageResizer_) !== null && _props$imageResizer_ !== void 0 ? _props$imageResizer_ : $f3db423dc84bc35d$var$defaultCustomUrls;
|
|
6599
6601
|
return $3hooq$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $3hooq$solidjsweb.mergeProps(props, {
|
|
6600
6602
|
get imgProps() {
|
|
6601
6603
|
return {
|
|
6602
6604
|
...props.imgProps,
|
|
6603
|
-
customUrls:
|
|
6605
|
+
customUrls: resolvedCustomUrls
|
|
6604
6606
|
};
|
|
6605
6607
|
}
|
|
6606
6608
|
}));
|
|
6607
6609
|
}
|
|
6608
6610
|
function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
|
|
6609
6611
|
return $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $3hooq$solidjsweb.mergeProps(props, {
|
|
6610
|
-
customUrls
|
|
6612
|
+
get customUrls() {
|
|
6613
|
+
var _props$imageResizer_2;
|
|
6614
|
+
return (_props$imageResizer_2 = props.imageResizer_) !== null && _props$imageResizer_2 !== void 0 ? _props$imageResizer_2 : $f3db423dc84bc35d$var$defaultCustomUrls;
|
|
6615
|
+
}
|
|
6611
6616
|
}));
|
|
6612
6617
|
}
|
|
6613
6618
|
var $c19709057a32b2e7$var$_tmpl$ = ["<video", ' disablepictureinpicture="true" class="d-standard-content"></video>'];
|
|
@@ -6618,7 +6623,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6618
6623
|
router_: router_,
|
|
6619
6624
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6620
6625
|
mediaUrl_: mediaUrl_,
|
|
6621
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
6626
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6627
|
+
imageResizer_: imageResizer_
|
|
6622
6628
|
} = _ref;
|
|
6623
6629
|
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
|
|
6624
6630
|
const [wrapperSize, setWrapperSize] = $3hooq$solidjs.createSignal();
|
|
@@ -6672,7 +6678,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6672
6678
|
},
|
|
6673
6679
|
src: mediaUrl_,
|
|
6674
6680
|
"class": "d-standard-content",
|
|
6675
|
-
onDecoded: () => setHasLoaded(true)
|
|
6681
|
+
onDecoded: () => setHasLoaded(true),
|
|
6682
|
+
imageResizer_: imageResizer_
|
|
6676
6683
|
});
|
|
6677
6684
|
}
|
|
6678
6685
|
}), $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Match), {
|
|
@@ -6686,7 +6693,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6686
6693
|
}
|
|
6687
6694
|
}));
|
|
6688
6695
|
}
|
|
6689
|
-
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6696
|
+
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6690
6697
|
let hasSeenContentBlock = false;
|
|
6691
6698
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6692
6699
|
const contentComponents = new Map();
|
|
@@ -6742,7 +6749,8 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6742
6749
|
...prev.aspectRatios,
|
|
6743
6750
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
6744
6751
|
}
|
|
6745
|
-
}))
|
|
6752
|
+
})),
|
|
6753
|
+
imageResizer_: imageResizer_
|
|
6746
6754
|
});
|
|
6747
6755
|
contentComponents.set(componentCacheKey, component);
|
|
6748
6756
|
}
|
|
@@ -6807,7 +6815,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6807
6815
|
filterModalParent_: filterModalParent_,
|
|
6808
6816
|
showSliderArrow_: showSliderArrow_,
|
|
6809
6817
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6810
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6818
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6819
|
+
imageResizer_: imageResizer_
|
|
6811
6820
|
} = _ref;
|
|
6812
6821
|
let results_for;
|
|
6813
6822
|
let only_show_filters_opener_;
|
|
@@ -6903,7 +6912,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6903
6912
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6904
6913
|
return result;
|
|
6905
6914
|
}));
|
|
6906
|
-
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6915
|
+
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
6907
6916
|
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6908
6917
|
const available_sortings_ = $3hooq$solidjs.createMemo(() => {
|
|
6909
6918
|
var _plp_products_, _plp_products_$sorts;
|
|
@@ -7448,7 +7457,8 @@ function $53dca9b7b01789b1$export$b73ed90f0ee50dc3(_ref) {
|
|
|
7448
7457
|
outerRef_: outerRef_,
|
|
7449
7458
|
animationDuration_: animationDuration_,
|
|
7450
7459
|
priceFormatting_: priceFormatting_,
|
|
7451
|
-
pseudoRouter_: pseudoRouter_
|
|
7460
|
+
pseudoRouter_: pseudoRouter_,
|
|
7461
|
+
imageResizer_: imageResizer_
|
|
7452
7462
|
} = _ref;
|
|
7453
7463
|
const variantToUse = $3hooq$solidjs.createMemo(() => {
|
|
7454
7464
|
const display = display_();
|
|
@@ -7514,7 +7524,8 @@ function $53dca9b7b01789b1$export$b73ed90f0ee50dc3(_ref) {
|
|
|
7514
7524
|
},
|
|
7515
7525
|
imgProps: {
|
|
7516
7526
|
keyRatioUpdating: true
|
|
7517
|
-
}
|
|
7527
|
+
},
|
|
7528
|
+
imageResizer_: imageResizer_
|
|
7518
7529
|
});
|
|
7519
7530
|
}
|
|
7520
7531
|
})));
|
|
@@ -7667,7 +7678,8 @@ function $1709366c442d8933$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
7667
7678
|
supportsHover_: supportsHover_,
|
|
7668
7679
|
priceFormatting_: priceFormatting_,
|
|
7669
7680
|
pseudoRouter_: pseudoRouter_,
|
|
7670
|
-
containerHeight_: containerHeight_
|
|
7681
|
+
containerHeight_: containerHeight_,
|
|
7682
|
+
imageResizer_: imageResizer_
|
|
7671
7683
|
} = _ref;
|
|
7672
7684
|
let isAffectedByChromeBug = false;
|
|
7673
7685
|
// If the user requests the drawer to be expanded or not
|
|
@@ -7703,6 +7715,7 @@ function $1709366c442d8933$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
7703
7715
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
7704
7716
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
7705
7717
|
priceFormatting_: priceFormatting_,
|
|
7718
|
+
imageResizer_: imageResizer_,
|
|
7706
7719
|
outerRef_: el => $3hooq$solidjs.createEffect(() => {
|
|
7707
7720
|
if (index !== 0) return;
|
|
7708
7721
|
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -7746,7 +7759,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7746
7759
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
7747
7760
|
animationDuration_: animationDuration_,
|
|
7748
7761
|
priceFormatting_: priceFormatting_,
|
|
7749
|
-
pseudoRouter_: pseudoRouter_
|
|
7762
|
+
pseudoRouter_: pseudoRouter_,
|
|
7763
|
+
imageResizer_: imageResizer_
|
|
7750
7764
|
} = _ref;
|
|
7751
7765
|
let container;
|
|
7752
7766
|
const useWantsExpandedSignal_ = $3hooq$solidjs.createSignal(false);
|
|
@@ -7814,7 +7828,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7814
7828
|
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];
|
|
7815
7829
|
},
|
|
7816
7830
|
aspectRatio: placeholderImageAspectRatio_,
|
|
7817
|
-
autoAdjustAspectRatio: true
|
|
7831
|
+
autoAdjustAspectRatio: true,
|
|
7832
|
+
imageResizer_: imageResizer_
|
|
7818
7833
|
});
|
|
7819
7834
|
}
|
|
7820
7835
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1709366c442d8933$export$ebf0b1d4f90c09ae), {
|
|
@@ -7829,7 +7844,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7829
7844
|
FavoriteButton_: FavoriteButton_,
|
|
7830
7845
|
priceFormatting_: priceFormatting_,
|
|
7831
7846
|
pseudoRouter_: pseudoRouter_,
|
|
7832
|
-
containerHeight_: containerHeight_
|
|
7847
|
+
containerHeight_: containerHeight_,
|
|
7848
|
+
imageResizer_: imageResizer_
|
|
7833
7849
|
})));
|
|
7834
7850
|
}
|
|
7835
7851
|
|
|
@@ -8104,7 +8120,8 @@ function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
|
8104
8120
|
animationDuration_: expandingAnimationDuration,
|
|
8105
8121
|
expandedLooksSignal_: $e57cd46536ad992e$var$expandedLooksSignal_,
|
|
8106
8122
|
priceFormatting_: () => props.priceFormatting_,
|
|
8107
|
-
pseudoRouter_: pseudoRouter
|
|
8123
|
+
pseudoRouter_: pseudoRouter,
|
|
8124
|
+
imageResizer_: props.imageResizer_
|
|
8108
8125
|
}),
|
|
8109
8126
|
recommendations_resource_: looksResource,
|
|
8110
8127
|
title_: () => props.title_,
|
|
@@ -9591,7 +9608,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9591
9608
|
merchant_: merchant_,
|
|
9592
9609
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
9593
9610
|
index_: index_,
|
|
9594
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
9611
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
9612
|
+
imageResizer_: imageResizer_
|
|
9595
9613
|
} = _ref;
|
|
9596
9614
|
const href = $3hooq$solidjs.createMemo(() => {
|
|
9597
9615
|
var _listing_;
|
|
@@ -9620,7 +9638,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9620
9638
|
tabIndex: -1,
|
|
9621
9639
|
get children() {
|
|
9622
9640
|
return $3hooq$solidjsweb.ssr($d1e7b96fb13cd1d3$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($d1e7b96fb13cd1d3$export$ea41102db9bd68c3, {
|
|
9623
|
-
image_urls_: image_urls
|
|
9641
|
+
image_urls_: image_urls,
|
|
9642
|
+
imageResizer_: imageResizer_
|
|
9624
9643
|
})));
|
|
9625
9644
|
}
|
|
9626
9645
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
@@ -9650,7 +9669,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9650
9669
|
}
|
|
9651
9670
|
function $d1e7b96fb13cd1d3$export$ea41102db9bd68c3(_ref2) {
|
|
9652
9671
|
let {
|
|
9653
|
-
image_urls_: image_urls_
|
|
9672
|
+
image_urls_: image_urls_,
|
|
9673
|
+
imageResizer_: imageResizer_
|
|
9654
9674
|
} = _ref2;
|
|
9655
9675
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
9656
9676
|
get when() {
|
|
@@ -9674,7 +9694,8 @@ function $d1e7b96fb13cd1d3$export$ea41102db9bd68c3(_ref2) {
|
|
|
9674
9694
|
},
|
|
9675
9695
|
imgProps: {
|
|
9676
9696
|
style: "object-fit: cover;"
|
|
9677
|
-
}
|
|
9697
|
+
},
|
|
9698
|
+
imageResizer_: imageResizer_
|
|
9678
9699
|
})
|
|
9679
9700
|
});
|
|
9680
9701
|
}
|
|
@@ -9699,7 +9720,8 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
9699
9720
|
selected_index_: selected_index_,
|
|
9700
9721
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
9701
9722
|
showPlaceholders_: showPlaceholders_,
|
|
9702
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
9723
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
9724
|
+
imageResizer_: imageResizer_
|
|
9703
9725
|
} = _ref;
|
|
9704
9726
|
const listings_by_id = $3hooq$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
9705
9727
|
const productCards = $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.For), {
|
|
@@ -9717,7 +9739,8 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
9717
9739
|
merchant_: merchant_,
|
|
9718
9740
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
9719
9741
|
index_: index,
|
|
9720
|
-
selected_index_: selected_index_
|
|
9742
|
+
selected_index_: selected_index_,
|
|
9743
|
+
imageResizer_: imageResizer_
|
|
9721
9744
|
});
|
|
9722
9745
|
}
|
|
9723
9746
|
});
|
|
@@ -10037,7 +10060,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10037
10060
|
sorting_query_param_: sorting_query_param_,
|
|
10038
10061
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
10039
10062
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
10040
|
-
forceUseDiv_: forceUseDiv_
|
|
10063
|
+
forceUseDiv_: forceUseDiv_,
|
|
10064
|
+
imageResizer_: imageResizer_
|
|
10041
10065
|
} = _ref;
|
|
10042
10066
|
let on_enter_in_search_field_function;
|
|
10043
10067
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -10250,7 +10274,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10250
10274
|
},
|
|
10251
10275
|
imgProps: {
|
|
10252
10276
|
alt: "Product image"
|
|
10253
|
-
}
|
|
10277
|
+
},
|
|
10278
|
+
imageResizer_: imageResizer_
|
|
10254
10279
|
}),
|
|
10255
10280
|
...instant_results_options_
|
|
10256
10281
|
})));
|
|
@@ -10279,7 +10304,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10279
10304
|
selected_index_: selected_index_,
|
|
10280
10305
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
10281
10306
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
10282
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
10307
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
10308
|
+
imageResizer_: imageResizer_
|
|
10283
10309
|
});
|
|
10284
10310
|
}
|
|
10285
10311
|
});
|
|
@@ -13230,6 +13256,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
13230
13256
|
display_transformers: display_transformers,
|
|
13231
13257
|
api: api,
|
|
13232
13258
|
searchModalComponent: searchModalComponent,
|
|
13259
|
+
imageResizer_: imageResizer_,
|
|
13233
13260
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
13234
13261
|
disable_scrolling_during_modal = true,
|
|
13235
13262
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -13393,6 +13420,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
13393
13420
|
},
|
|
13394
13421
|
i18n_: i18n_,
|
|
13395
13422
|
enable_category_suggestions_: enable_category_suggestions,
|
|
13423
|
+
imageResizer_: imageResizer_,
|
|
13396
13424
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
13397
13425
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
13398
13426
|
}, override_modal_element);
|
|
@@ -14294,7 +14322,8 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
|
|
|
14294
14322
|
product_card_template_: product_card_template,
|
|
14295
14323
|
sorting_query_param_: sorting_query_param_,
|
|
14296
14324
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
14297
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
14325
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
14326
|
+
imageResizer_: props.imageResizer_
|
|
14298
14327
|
});
|
|
14299
14328
|
}, "Entire CategoryPage failed");
|
|
14300
14329
|
}
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ 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.10.
|
|
14
|
+
export const version = "4.10.12";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -632,14 +632,19 @@ export function ShopifyContainedImage(props: {
|
|
|
632
632
|
class?: string;
|
|
633
633
|
imgProps?: Omit<Parameters<typeof ShopifyResponsiveImg>[0], "size" | "src">;
|
|
634
634
|
}): HTMLDivElement;
|
|
635
|
+
export type ImageResizer = (url: string, width: number) => string;
|
|
635
636
|
/**
|
|
636
637
|
* Hacks ShopifyContainedImage work even for non-shopify image urls by forcing the format to be WebP
|
|
637
638
|
*/
|
|
638
|
-
export function ModernResponsiveContainedImage(props: Parameters<typeof ShopifyContainedImage>[0]
|
|
639
|
+
export function ModernResponsiveContainedImage(props: Parameters<typeof ShopifyContainedImage>[0] & {
|
|
640
|
+
imageResizer_?: ImageResizer;
|
|
641
|
+
}): import("solid-js").JSX.Element;
|
|
639
642
|
/**
|
|
640
643
|
* Wrapper around ShopifyResponsiveImg (component that just does an image, without wrapping in div). The wrapper allows ShopifyResponsiveImg to work both with shopify CDN URLs and arbitrary URLs, where the latter will be fed through Depict's cloudflare resizer.
|
|
641
644
|
*/
|
|
642
|
-
export function ModernResponsiveImage(props: Parameters<typeof ShopifyResponsiveImg>[0]
|
|
645
|
+
export function ModernResponsiveImage(props: Parameters<typeof ShopifyResponsiveImg>[0] & {
|
|
646
|
+
imageResizer_?: ImageResizer;
|
|
647
|
+
}): import("solid-js").JSX.Element;
|
|
643
648
|
export function CrossIcon(props?: JSX.SvgSVGAttributes<SVGSVGElement>): SVGElement;
|
|
644
649
|
/**
|
|
645
650
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
@@ -730,7 +735,8 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
|
|
|
730
735
|
sorting_query_param_,
|
|
731
736
|
filter_query_param_prefix_,
|
|
732
737
|
setSearchFieldOuterWidth_,
|
|
733
|
-
forceUseDiv_
|
|
738
|
+
forceUseDiv_,
|
|
739
|
+
imageResizer_
|
|
734
740
|
}: {
|
|
735
741
|
search_field_value_: Signal<string>;
|
|
736
742
|
get_search_query_: Accessor<string>;
|
|
@@ -767,6 +773,7 @@ declare function RawSearchModalV2<InputDisplay extends Display, OutputDisplay ex
|
|
|
767
773
|
enable_category_suggestions_?: boolean;
|
|
768
774
|
dont_sync_search_field_value_except_on_submit_?: boolean;
|
|
769
775
|
content_search_enabled_: Accessor<boolean>;
|
|
776
|
+
imageResizer_?: ImageResizer;
|
|
770
777
|
}): HTMLDivElement[];
|
|
771
778
|
export const SearchModalV2: typeof RawSearchModalV2;
|
|
772
779
|
/**
|
|
@@ -855,6 +862,13 @@ export type BaseProviderConfig<InputDisplay extends Display, PossibleTransformed
|
|
|
855
862
|
* We recommend to just use an incrementing number for this, e.g. "1", "2", "3", ...
|
|
856
863
|
*/
|
|
857
864
|
uniqueInstanceKeyForState?: string;
|
|
865
|
+
/**
|
|
866
|
+
* Optional function to override the default image resizing CDN. When provided, this function is called
|
|
867
|
+
* with the original image URL and desired width, and should return the resized image URL.
|
|
868
|
+
* By default, Depict uses Cloudflare's image resizer for non-Shopify images, and Shopify's built-in
|
|
869
|
+
* resizer for Shopify CDN images.
|
|
870
|
+
*/
|
|
871
|
+
imageResizer?: (url: string, width: number) => string;
|
|
858
872
|
} & (InputDisplay extends ModernDisplay ? "page_url" extends keyof InputDisplay["variant_displays"][number] ? {
|
|
859
873
|
/**
|
|
860
874
|
* 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.
|
|
@@ -1150,7 +1164,8 @@ export function LookCard({
|
|
|
1150
1164
|
placeholderImageAspectRatio_,
|
|
1151
1165
|
animationDuration_,
|
|
1152
1166
|
priceFormatting_,
|
|
1153
|
-
pseudoRouter_
|
|
1167
|
+
pseudoRouter_,
|
|
1168
|
+
imageResizer_
|
|
1154
1169
|
}: {
|
|
1155
1170
|
display_: Accessor<FeaturedInDisplay | null>;
|
|
1156
1171
|
FavoriteButton_?: (props: {
|
|
@@ -1161,6 +1176,7 @@ export function LookCard({
|
|
|
1161
1176
|
expandedLooksSignal_: Signal<Set<symbol>>;
|
|
1162
1177
|
priceFormatting_: Accessor<plp_shared_i18n["price_formatting_"]>;
|
|
1163
1178
|
pseudoRouter_: PseudoRouter;
|
|
1179
|
+
imageResizer_?: ImageResizer;
|
|
1164
1180
|
}): JSX.Element;
|
|
1165
1181
|
/**
|
|
1166
1182
|
* Render a grid with provided recommendations. displayTransformers will not be applied for this since you yourself provide the displays. Options are reactive.
|
|
@@ -1193,6 +1209,7 @@ export function LooksSliderOrGrid(props: {
|
|
|
1193
1209
|
};
|
|
1194
1210
|
onNavigation_?: OnNavigation;
|
|
1195
1211
|
priceFormatting_: plp_shared_i18n["price_formatting_"];
|
|
1212
|
+
imageResizer_?: (url: string, width: number) => string;
|
|
1196
1213
|
}): HTMLDivElement;
|
|
1197
1214
|
export const prefixes_to_preserve_in_history_dot_state: Set<string>;
|
|
1198
1215
|
/**
|
|
@@ -1427,6 +1444,7 @@ type GeneralConstructorOptions<InputDisplay extends Display, OutputDisplay exten
|
|
|
1427
1444
|
enable_content_search?: boolean;
|
|
1428
1445
|
unique_instance_key_for_state?: string;
|
|
1429
1446
|
searchModalComponent: typeof SearchModalV2<InputDisplay, OutputDisplay> | typeof ClassicSearchModal;
|
|
1447
|
+
imageResizer_?: (url: string, width: number) => string;
|
|
1430
1448
|
disable_scrolling_during_modal?: boolean;
|
|
1431
1449
|
bottom_distance_under_modal?: Accessor<number | undefined>;
|
|
1432
1450
|
override_modal_element?: HTMLElement | ShadowRoot;
|
|
@@ -1462,6 +1480,7 @@ export class DepictSearch<InputDisplay extends Display, OutputDisplay extends Mo
|
|
|
1462
1480
|
display_transformers,
|
|
1463
1481
|
api,
|
|
1464
1482
|
searchModalComponent,
|
|
1483
|
+
imageResizer_,
|
|
1465
1484
|
disable_scrolling_during_modal,
|
|
1466
1485
|
bottom_distance_under_modal,
|
|
1467
1486
|
override_modal_element,
|
|
@@ -1541,7 +1560,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1541
1560
|
* Open the modal with support for alignment.
|
|
1542
1561
|
* @returns {void}
|
|
1543
1562
|
*/
|
|
1544
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1563
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1545
1564
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1546
1565
|
export interface PageReplacer {
|
|
1547
1566
|
readonly render_: () => Node_Array;
|
|
@@ -1623,5 +1642,6 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1623
1642
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1624
1643
|
showSliderArrow_?: boolean;
|
|
1625
1644
|
hideCount0FilterOptions_?: boolean;
|
|
1626
|
-
|
|
1645
|
+
imageResizer_?: (url: string, width: number) => string;
|
|
1646
|
+
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1627
1647
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|