@depict-ai/ui 4.10.11 → 4.10.13
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 +117 -48
- package/ES10/index.d.ts +25 -5
- package/ES10/index.js +117 -48
- package/latest/index.cjs +115 -48
- package/latest/index.d.ts +25 -5
- package/latest/index.js +115 -48
- package/package.json +4 -4
- package/server/ES10/index.cjs +93 -41
- package/server/ES10/index.d.ts +25 -5
- package/server/ES10/index.js +93 -41
- package/server/latest/index.cjs +91 -41
- package/server/latest/index.d.ts +25 -5
- package/server/latest/index.js +91 -41
package/server/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.13";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $5vyXB$solidjs.createSignal(false);
|
|
115
115
|
$5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -2210,12 +2210,12 @@ function $cc43b6428000c4bf$export$f21ab0717a89c77f(props) {
|
|
|
2210
2210
|
height: "12"
|
|
2211
2211
|
}), () => $5vyXB$solidjsweb.ssr($cc43b6428000c4bf$var$_tmpl$), true);
|
|
2212
2212
|
}
|
|
2213
|
-
var $0fe1e7efdf4200d6$var$_tmpl$ = ["<button", ' type="button" class="', '"
|
|
2213
|
+
var $0fe1e7efdf4200d6$var$_tmpl$ = ["<button", ' type="button" class="', '"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
2214
2214
|
function $0fe1e7efdf4200d6$export$ca21a16d65b3dd8({
|
|
2215
2215
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2216
2216
|
i18n_: i18n_
|
|
2217
2217
|
}) {
|
|
2218
|
-
return $5vyXB$solidjsweb.ssr($0fe1e7efdf4200d6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {})), get_show_extras() ? $5vyXB$solidjsweb.escape(i18n_.view_less_()) : $5vyXB$solidjsweb.escape(i18n_.view_more_()));
|
|
2218
|
+
return $5vyXB$solidjsweb.ssr($0fe1e7efdf4200d6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), `expand-filter ${get_show_extras() ? "expanded" : ""}`, $5vyXB$solidjsweb.ssrAttribute("aria-expanded", $5vyXB$solidjsweb.escape(get_show_extras(), true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {})), get_show_extras() ? $5vyXB$solidjsweb.escape(i18n_.view_less_()) : $5vyXB$solidjsweb.escape(i18n_.view_more_()));
|
|
2219
2219
|
}
|
|
2220
2220
|
var $d023ed916c84e75d$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"],
|
|
2221
2221
|
$d023ed916c84e75d$var$_tmpl$2 = ["<span", ' class="', '"', ">", "</span>"];
|
|
@@ -2446,7 +2446,7 @@ function $c1dc1554c1b94233$export$430444115f70a734({
|
|
|
2446
2446
|
}
|
|
2447
2447
|
})));
|
|
2448
2448
|
}
|
|
2449
|
-
var $0b7222ba8a8bb72f$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2449
|
+
var $0b7222ba8a8bb72f$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator" aria-hidden="true">-</div><div class="field"><input', ' type="number"', "></div></div><!--$-->", '<!--/--><div class="value-text"><span class="min"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", '<!--/--></span><span class="max"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></span></div></div>"],
|
|
2450
2450
|
$0b7222ba8a8bb72f$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
|
|
2451
2451
|
$0b7222ba8a8bb72f$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
|
|
2452
2452
|
function $0b7222ba8a8bb72f$export$e0d834a0ad870cda({
|
|
@@ -2539,7 +2539,8 @@ function $0b7222ba8a8bb72f$var$RangeSelector({
|
|
|
2539
2539
|
min_: min_,
|
|
2540
2540
|
current_range_: current_range_,
|
|
2541
2541
|
i18n_: i18n_,
|
|
2542
|
-
should_be_disabled_: should_be_disabled_
|
|
2542
|
+
should_be_disabled_: should_be_disabled_,
|
|
2543
|
+
priceFormatting_: price_formatting_
|
|
2543
2544
|
})), $5vyXB$solidjsweb.escape(pre_price()), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $d659702496cb72ea$export$a71e92cfbb498adc), {
|
|
2544
2545
|
get price_() {
|
|
2545
2546
|
return min_();
|
|
@@ -2561,7 +2562,8 @@ function $0b7222ba8a8bb72f$var$ExponentialSlider({
|
|
|
2561
2562
|
min_: min_,
|
|
2562
2563
|
i18n_: i18n_,
|
|
2563
2564
|
max_: max_,
|
|
2564
|
-
should_be_disabled_: should_be_disabled_
|
|
2565
|
+
should_be_disabled_: should_be_disabled_,
|
|
2566
|
+
priceFormatting_: priceFormatting_
|
|
2565
2567
|
}) {
|
|
2566
2568
|
// inspired by https://observablehq.com/@mbostock/nonlinear-slider
|
|
2567
2569
|
const transform_linear_to_nonlinear = ([smaller, larger]) => [Math.sqrt(smaller), Math.sqrt(larger)];
|
|
@@ -2595,7 +2597,8 @@ function $0b7222ba8a8bb72f$var$ExponentialSlider({
|
|
|
2595
2597
|
max_: modified_max,
|
|
2596
2598
|
offset_value_calculator_: offset_value_calculator_,
|
|
2597
2599
|
i18n_: i18n_,
|
|
2598
|
-
should_be_disabled_: should_be_disabled_
|
|
2600
|
+
should_be_disabled_: should_be_disabled_,
|
|
2601
|
+
priceFormatting_: priceFormatting_
|
|
2599
2602
|
});
|
|
2600
2603
|
}
|
|
2601
2604
|
function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
@@ -2604,12 +2607,17 @@ function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
|
2604
2607
|
current_range_: current_range_,
|
|
2605
2608
|
offset_value_calculator_: offset_value_calculator_,
|
|
2606
2609
|
i18n_: i18n_,
|
|
2607
|
-
should_be_disabled_: should_be_disabled_
|
|
2610
|
+
should_be_disabled_: should_be_disabled_,
|
|
2611
|
+
priceFormatting_: priceFormatting_
|
|
2608
2612
|
}) {
|
|
2609
2613
|
let range_input_1;
|
|
2610
2614
|
let range_input_2;
|
|
2611
2615
|
let clickable_slider;
|
|
2612
2616
|
const [get_current_range, set_current_range] = current_range_;
|
|
2617
|
+
const formatRealPrice = value => {
|
|
2618
|
+
const priceFormatting = priceFormatting_();
|
|
2619
|
+
return priceFormatting.pre_ + $5vyXB$depictaiutilishared.standard_price_format(value, priceFormatting.places_after_comma_, priceFormatting.decimal_places_delimiter_, priceFormatting.thousands_delimiter_) + priceFormatting.post_;
|
|
2620
|
+
};
|
|
2613
2621
|
const progress_styling = $5vyXB$solidjs.createMemo(() => {
|
|
2614
2622
|
const min = min_();
|
|
2615
2623
|
const span = max_() - min;
|
|
@@ -2628,13 +2636,13 @@ function $0b7222ba8a8bb72f$var$LinearSlider({
|
|
|
2628
2636
|
el.value = get_current_range()[index];
|
|
2629
2637
|
});
|
|
2630
2638
|
};
|
|
2631
|
-
return [$5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(progress_styling())), $5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("value", $5vyXB$solidjsweb.escape($5vyXB$solidjs.createMemo(() => {
|
|
2639
|
+
return [$5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(progress_styling())), $5vyXB$solidjsweb.ssr($0b7222ba8a8bb72f$var$_tmpl$3, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("aria-valuetext", $5vyXB$solidjsweb.escape(formatRealPrice(get_current_range()[0]), true), false) + $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("value", $5vyXB$solidjsweb.escape($5vyXB$solidjs.createMemo(() => {
|
|
2632
2640
|
min_();
|
|
2633
2641
|
max_();
|
|
2634
2642
|
return get_current_range()[0];
|
|
2635
2643
|
}, undefined, {
|
|
2636
2644
|
equals: false
|
|
2637
|
-
})(), true), false), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false))];
|
|
2645
|
+
})(), true), false), $5vyXB$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $5vyXB$solidjsweb.ssrAttribute("aria-label", $5vyXB$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("aria-valuetext", $5vyXB$solidjsweb.escape(formatRealPrice(get_current_range()[1]), true), false), $5vyXB$solidjsweb.ssrAttribute("min", $5vyXB$solidjsweb.escape(min_(), true), false) + $5vyXB$solidjsweb.ssrAttribute("max", $5vyXB$solidjsweb.escape(max_(), true), false))];
|
|
2638
2646
|
}
|
|
2639
2647
|
function $0b7222ba8a8bb72f$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el, get_offset_value = (value, how_many) => value + how_many) {
|
|
2640
2648
|
let value_as_number = +target_el.value;
|
|
@@ -3430,6 +3438,13 @@ const $0ef1681699140f1a$export$414f6a19d38e655c = ({
|
|
|
3430
3438
|
const label = $5vyXB$solidjs.createMemo(() => value().name_ || value().value_ + "");
|
|
3431
3439
|
const count_zero = $5vyXB$solidjs.createMemo(() => value().count_ === 0);
|
|
3432
3440
|
return $5vyXB$solidjsweb.ssrElement("button", $5vyXB$solidjsweb.mergeProps(attributes, {
|
|
3441
|
+
type: "button",
|
|
3442
|
+
get ["aria-pressed"]() {
|
|
3443
|
+
return is_selected();
|
|
3444
|
+
},
|
|
3445
|
+
get ["aria-label"]() {
|
|
3446
|
+
return value().count_ != undefined ? `${label()}, ${value().count_}` : label();
|
|
3447
|
+
},
|
|
3433
3448
|
get disabled() {
|
|
3434
3449
|
return count_zero() && !is_selected();
|
|
3435
3450
|
},
|
|
@@ -3600,7 +3615,14 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
|
|
|
3600
3615
|
return !!data?.some(item => $daa394359b026187$export$325f75597868c4f0(item) === value);
|
|
3601
3616
|
});
|
|
3602
3617
|
const value = $5vyXB$solidjs.createMemo(() => checkbox().value_);
|
|
3603
|
-
const label_text = $5vyXB$solidjs.createMemo(() =>
|
|
3618
|
+
const label_text = $5vyXB$solidjs.createMemo(() => {
|
|
3619
|
+
const name = checkbox().name_;
|
|
3620
|
+
if (name) return name;
|
|
3621
|
+
const value_string = value() + "";
|
|
3622
|
+
if (backendFilterV2()) return value_string;
|
|
3623
|
+
// Legacy values are "Name;#hex" - split is used to get the name so that screen readers don't announce the hex code
|
|
3624
|
+
return value_string.split(";")[0] || value_string;
|
|
3625
|
+
});
|
|
3604
3626
|
const count = $5vyXB$solidjs.createMemo(() => checkbox().count_);
|
|
3605
3627
|
const colorNameDatasetValue = $5vyXB$solidjs.createMemo(() => {
|
|
3606
3628
|
if (backendFilterV2()) return label_text();
|
|
@@ -4011,9 +4033,9 @@ function $47d8681015b71901$var$find_str_arr_in_str_arr_arr(operation, haystack,
|
|
|
4011
4033
|
var $aff9a96d30ed3563$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "</div>"],
|
|
4012
4034
|
$aff9a96d30ed3563$var$_tmpl$2 = ["<button", ' class="clear-group"><!--$-->', "<!--/--><span>", "</span></button>"],
|
|
4013
4035
|
$aff9a96d30ed3563$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
4014
|
-
$aff9a96d30ed3563$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><
|
|
4036
|
+
$aff9a96d30ed3563$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><fieldset class="filter-part"', "><!--$-->", "<!--/--><!--$-->", "<!--/--></fieldset><!--$-->", "<!--/--></div>"],
|
|
4015
4037
|
$aff9a96d30ed3563$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
4016
|
-
$aff9a96d30ed3563$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span
|
|
4038
|
+
$aff9a96d30ed3563$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span', ">", '</span><div class="selected-w-sign"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></summary>"],
|
|
4017
4039
|
$aff9a96d30ed3563$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
4018
4040
|
$aff9a96d30ed3563$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
4019
4041
|
function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
|
|
@@ -4097,13 +4119,14 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
4097
4119
|
const a_filter_is_selected = $5vyXB$solidjs.createMemo(() => selected_filters_in_group().size);
|
|
4098
4120
|
const [get_details_width, set_get_details_width] = $5vyXB$solidjs.createSignal();
|
|
4099
4121
|
const details_element_width_ = $5vyXB$solidjs.createMemo(() => get_details_width?.()?.());
|
|
4122
|
+
const title_id = $5vyXB$depictaiutilishared.make_random_classname();
|
|
4100
4123
|
return $5vyXB$solidjsweb.createComponent((0, $a69e505a12a77874$export$6c6d7a51fa9aa15d), {
|
|
4101
4124
|
is_open_: is_open,
|
|
4102
4125
|
get details_() {
|
|
4103
4126
|
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$5, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("data-group-title", $5vyXB$solidjsweb.escape(section_, true), false));
|
|
4104
4127
|
},
|
|
4105
4128
|
get summary_() {
|
|
4106
|
-
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$6, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape(section_), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4129
|
+
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$6, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("id", $5vyXB$solidjsweb.escape(title_id, true), false), $5vyXB$solidjsweb.escape(section_), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
4107
4130
|
get when() {
|
|
4108
4131
|
return a_filter_is_selected();
|
|
4109
4132
|
},
|
|
@@ -4125,7 +4148,7 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
|
|
|
4125
4148
|
})));
|
|
4126
4149
|
},
|
|
4127
4150
|
get children() {
|
|
4128
|
-
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
4151
|
+
return $5vyXB$solidjsweb.ssr($aff9a96d30ed3563$var$_tmpl$4, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("aria-labelledby", $5vyXB$solidjsweb.escape(title_id, true), false), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Index), {
|
|
4129
4152
|
get each() {
|
|
4130
4153
|
return searched_filter_array_();
|
|
4131
4154
|
},
|
|
@@ -6209,7 +6232,7 @@ function $a33065cfed827fc0$export$e4b984597b71e989(props) {
|
|
|
6209
6232
|
})));
|
|
6210
6233
|
return container;
|
|
6211
6234
|
}
|
|
6212
|
-
const $d212a67662c5cf38$var$
|
|
6235
|
+
const $d212a67662c5cf38$var$defaultCustomUrls = (url, width) => {
|
|
6213
6236
|
if (url?.startsWith?.("https://cdn.shopify.com"))
|
|
6214
6237
|
// 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,
|
|
6215
6238
|
// 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.
|
|
@@ -6218,18 +6241,21 @@ const $d212a67662c5cf38$var$customUrls = (url, width) => {
|
|
|
6218
6241
|
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
6219
6242
|
};
|
|
6220
6243
|
function $d212a67662c5cf38$export$9d4a4b669b1929ab(props) {
|
|
6244
|
+
const resolvedCustomUrls = props.imageResizer_ ?? $d212a67662c5cf38$var$defaultCustomUrls;
|
|
6221
6245
|
return $5vyXB$solidjsweb.createComponent((0, $a33065cfed827fc0$export$e4b984597b71e989), $5vyXB$solidjsweb.mergeProps(props, {
|
|
6222
6246
|
get imgProps() {
|
|
6223
6247
|
return {
|
|
6224
6248
|
...props.imgProps,
|
|
6225
|
-
customUrls:
|
|
6249
|
+
customUrls: resolvedCustomUrls
|
|
6226
6250
|
};
|
|
6227
6251
|
}
|
|
6228
6252
|
}));
|
|
6229
6253
|
}
|
|
6230
6254
|
function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
|
|
6231
6255
|
return $5vyXB$solidjsweb.createComponent((0, $19950faaac026e09$export$6e5611bc7e57e477), $5vyXB$solidjsweb.mergeProps(props, {
|
|
6232
|
-
customUrls
|
|
6256
|
+
get customUrls() {
|
|
6257
|
+
return props.imageResizer_ ?? $d212a67662c5cf38$var$defaultCustomUrls;
|
|
6258
|
+
}
|
|
6233
6259
|
}));
|
|
6234
6260
|
}
|
|
6235
6261
|
var $32c662f618f5d80d$var$_tmpl$ = ["<video", ' disablepictureinpicture="true" class="d-standard-content"></video>'];
|
|
@@ -6239,7 +6265,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6239
6265
|
router_: router_,
|
|
6240
6266
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6241
6267
|
mediaUrl_: mediaUrl_,
|
|
6242
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
6268
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6269
|
+
imageResizer_: imageResizer_
|
|
6243
6270
|
}) {
|
|
6244
6271
|
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
|
|
6245
6272
|
const [wrapperSize, setWrapperSize] = $5vyXB$solidjs.createSignal();
|
|
@@ -6287,7 +6314,8 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6287
6314
|
sizeHeight: () => wrapperSize()?.[1]?.() || 0,
|
|
6288
6315
|
src: mediaUrl_,
|
|
6289
6316
|
"class": "d-standard-content",
|
|
6290
|
-
onDecoded: () => setHasLoaded(true)
|
|
6317
|
+
onDecoded: () => setHasLoaded(true),
|
|
6318
|
+
imageResizer_: imageResizer_
|
|
6291
6319
|
});
|
|
6292
6320
|
}
|
|
6293
6321
|
}), $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Match), {
|
|
@@ -6301,7 +6329,7 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
6301
6329
|
}
|
|
6302
6330
|
}));
|
|
6303
6331
|
}
|
|
6304
|
-
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6332
|
+
function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6305
6333
|
let hasSeenContentBlock = false;
|
|
6306
6334
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6307
6335
|
const contentComponents = new Map();
|
|
@@ -6356,7 +6384,8 @@ function $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6356
6384
|
...prev.aspectRatios,
|
|
6357
6385
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
6358
6386
|
}
|
|
6359
|
-
}))
|
|
6387
|
+
})),
|
|
6388
|
+
imageResizer_: imageResizer_
|
|
6360
6389
|
});
|
|
6361
6390
|
contentComponents.set(componentCacheKey, component);
|
|
6362
6391
|
}
|
|
@@ -6418,7 +6447,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6418
6447
|
filterModalParent_: filterModalParent_,
|
|
6419
6448
|
showSliderArrow_: showSliderArrow_,
|
|
6420
6449
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6421
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6450
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6451
|
+
imageResizer_: imageResizer_
|
|
6422
6452
|
}) {
|
|
6423
6453
|
let results_for;
|
|
6424
6454
|
let only_show_filters_opener_;
|
|
@@ -6514,7 +6544,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
6514
6544
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6515
6545
|
return result;
|
|
6516
6546
|
}));
|
|
6517
|
-
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6547
|
+
const contentBlocksByRow = $0a80939bf0a1e9cc$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
6518
6548
|
const countOfProductsForUI = $13796d59ea8af231$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6519
6549
|
const available_sortings_ = $5vyXB$solidjs.createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
6520
6550
|
...sort,
|
|
@@ -7025,7 +7055,8 @@ function $0540c3739b32dc79$export$b73ed90f0ee50dc3({
|
|
|
7025
7055
|
outerRef_: outerRef_,
|
|
7026
7056
|
animationDuration_: animationDuration_,
|
|
7027
7057
|
priceFormatting_: priceFormatting_,
|
|
7028
|
-
pseudoRouter_: pseudoRouter_
|
|
7058
|
+
pseudoRouter_: pseudoRouter_,
|
|
7059
|
+
imageResizer_: imageResizer_
|
|
7029
7060
|
}) {
|
|
7030
7061
|
const variantToUse = $5vyXB$solidjs.createMemo(() => {
|
|
7031
7062
|
const display = display_();
|
|
@@ -7076,7 +7107,8 @@ function $0540c3739b32dc79$export$b73ed90f0ee50dc3({
|
|
|
7076
7107
|
},
|
|
7077
7108
|
imgProps: {
|
|
7078
7109
|
keyRatioUpdating: true
|
|
7079
|
-
}
|
|
7110
|
+
},
|
|
7111
|
+
imageResizer_: imageResizer_
|
|
7080
7112
|
});
|
|
7081
7113
|
}
|
|
7082
7114
|
})));
|
|
@@ -7225,7 +7257,8 @@ function $912d9a717ceee184$export$ebf0b1d4f90c09ae({
|
|
|
7225
7257
|
supportsHover_: supportsHover_,
|
|
7226
7258
|
priceFormatting_: priceFormatting_,
|
|
7227
7259
|
pseudoRouter_: pseudoRouter_,
|
|
7228
|
-
containerHeight_: containerHeight_
|
|
7260
|
+
containerHeight_: containerHeight_,
|
|
7261
|
+
imageResizer_: imageResizer_
|
|
7229
7262
|
}) {
|
|
7230
7263
|
let isAffectedByChromeBug = false;
|
|
7231
7264
|
// If the user requests the drawer to be expanded or not
|
|
@@ -7261,6 +7294,7 @@ function $912d9a717ceee184$export$ebf0b1d4f90c09ae({
|
|
|
7261
7294
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
7262
7295
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
7263
7296
|
priceFormatting_: priceFormatting_,
|
|
7297
|
+
imageResizer_: imageResizer_,
|
|
7264
7298
|
outerRef_: el => $5vyXB$solidjs.createEffect(() => {
|
|
7265
7299
|
if (index !== 0) return;
|
|
7266
7300
|
const resizeObserver = new ResizeObserver($5vyXB$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -7303,7 +7337,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
7303
7337
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
7304
7338
|
animationDuration_: animationDuration_,
|
|
7305
7339
|
priceFormatting_: priceFormatting_,
|
|
7306
|
-
pseudoRouter_: pseudoRouter_
|
|
7340
|
+
pseudoRouter_: pseudoRouter_,
|
|
7341
|
+
imageResizer_: imageResizer_
|
|
7307
7342
|
}) {
|
|
7308
7343
|
let container;
|
|
7309
7344
|
const useWantsExpandedSignal_ = $5vyXB$solidjs.createSignal(false);
|
|
@@ -7368,7 +7403,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
7368
7403
|
return display_()?.image_urls?.[0];
|
|
7369
7404
|
},
|
|
7370
7405
|
aspectRatio: placeholderImageAspectRatio_,
|
|
7371
|
-
autoAdjustAspectRatio: true
|
|
7406
|
+
autoAdjustAspectRatio: true,
|
|
7407
|
+
imageResizer_: imageResizer_
|
|
7372
7408
|
});
|
|
7373
7409
|
}
|
|
7374
7410
|
})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $912d9a717ceee184$export$ebf0b1d4f90c09ae), {
|
|
@@ -7380,7 +7416,8 @@ function $bda357ff87c46163$export$44809a8a3e867e30({
|
|
|
7380
7416
|
FavoriteButton_: FavoriteButton_,
|
|
7381
7417
|
priceFormatting_: priceFormatting_,
|
|
7382
7418
|
pseudoRouter_: pseudoRouter_,
|
|
7383
|
-
containerHeight_: containerHeight_
|
|
7419
|
+
containerHeight_: containerHeight_,
|
|
7420
|
+
imageResizer_: imageResizer_
|
|
7384
7421
|
})));
|
|
7385
7422
|
}
|
|
7386
7423
|
|
|
@@ -7636,7 +7673,8 @@ function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
|
7636
7673
|
animationDuration_: expandingAnimationDuration,
|
|
7637
7674
|
expandedLooksSignal_: $a3bbfa5fdaa39f3a$var$expandedLooksSignal_,
|
|
7638
7675
|
priceFormatting_: () => props.priceFormatting_,
|
|
7639
|
-
pseudoRouter_: pseudoRouter
|
|
7676
|
+
pseudoRouter_: pseudoRouter,
|
|
7677
|
+
imageResizer_: props.imageResizer_
|
|
7640
7678
|
}),
|
|
7641
7679
|
recommendations_resource_: looksResource,
|
|
7642
7680
|
title_: () => props.title_,
|
|
@@ -9040,7 +9078,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
9040
9078
|
merchant_: merchant_,
|
|
9041
9079
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
9042
9080
|
index_: index_,
|
|
9043
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
9081
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
9082
|
+
imageResizer_: imageResizer_
|
|
9044
9083
|
}) {
|
|
9045
9084
|
const href = $5vyXB$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
|
|
9046
9085
|
const LinkToListing = props => $5vyXB$solidjsweb.ssrElement("a", $5vyXB$solidjsweb.mergeProps(props, {
|
|
@@ -9059,7 +9098,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
9059
9098
|
tabIndex: -1,
|
|
9060
9099
|
get children() {
|
|
9061
9100
|
return $5vyXB$solidjsweb.ssr($1f3b5fa875714dea$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent($1f3b5fa875714dea$export$ea41102db9bd68c3, {
|
|
9062
|
-
image_urls_: image_urls
|
|
9101
|
+
image_urls_: image_urls,
|
|
9102
|
+
imageResizer_: imageResizer_
|
|
9063
9103
|
})));
|
|
9064
9104
|
}
|
|
9065
9105
|
})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
@@ -9086,7 +9126,8 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
9086
9126
|
})));
|
|
9087
9127
|
}
|
|
9088
9128
|
function $1f3b5fa875714dea$export$ea41102db9bd68c3({
|
|
9089
|
-
image_urls_: image_urls_
|
|
9129
|
+
image_urls_: image_urls_,
|
|
9130
|
+
imageResizer_: imageResizer_
|
|
9090
9131
|
}) {
|
|
9091
9132
|
return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
|
|
9092
9133
|
get when() {
|
|
@@ -9109,7 +9150,8 @@ function $1f3b5fa875714dea$export$ea41102db9bd68c3({
|
|
|
9109
9150
|
},
|
|
9110
9151
|
imgProps: {
|
|
9111
9152
|
style: "object-fit: cover;"
|
|
9112
|
-
}
|
|
9153
|
+
},
|
|
9154
|
+
imageResizer_: imageResizer_
|
|
9113
9155
|
})
|
|
9114
9156
|
});
|
|
9115
9157
|
}
|
|
@@ -9133,7 +9175,8 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
9133
9175
|
selected_index_: selected_index_,
|
|
9134
9176
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
9135
9177
|
showPlaceholders_: showPlaceholders_,
|
|
9136
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
9178
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
9179
|
+
imageResizer_: imageResizer_
|
|
9137
9180
|
}) {
|
|
9138
9181
|
const listings_by_id = $5vyXB$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
9139
9182
|
const productCards = $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.For), {
|
|
@@ -9151,7 +9194,8 @@ function $83e616b38be339e4$export$c8d7e00464029b45({
|
|
|
9151
9194
|
merchant_: merchant_,
|
|
9152
9195
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
9153
9196
|
index_: index,
|
|
9154
|
-
selected_index_: selected_index_
|
|
9197
|
+
selected_index_: selected_index_,
|
|
9198
|
+
imageResizer_: imageResizer_
|
|
9155
9199
|
});
|
|
9156
9200
|
}
|
|
9157
9201
|
});
|
|
@@ -9460,7 +9504,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
9460
9504
|
sorting_query_param_: sorting_query_param_,
|
|
9461
9505
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
9462
9506
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
9463
|
-
forceUseDiv_: forceUseDiv_
|
|
9507
|
+
forceUseDiv_: forceUseDiv_,
|
|
9508
|
+
imageResizer_: imageResizer_
|
|
9464
9509
|
}) {
|
|
9465
9510
|
let on_enter_in_search_field_function;
|
|
9466
9511
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -9666,7 +9711,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
9666
9711
|
},
|
|
9667
9712
|
imgProps: {
|
|
9668
9713
|
alt: "Product image"
|
|
9669
|
-
}
|
|
9714
|
+
},
|
|
9715
|
+
imageResizer_: imageResizer_
|
|
9670
9716
|
}),
|
|
9671
9717
|
...instant_results_options_
|
|
9672
9718
|
})));
|
|
@@ -9695,7 +9741,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
9695
9741
|
selected_index_: selected_index_,
|
|
9696
9742
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
9697
9743
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
9698
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
9744
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
9745
|
+
imageResizer_: imageResizer_
|
|
9699
9746
|
});
|
|
9700
9747
|
}
|
|
9701
9748
|
});
|
|
@@ -12379,6 +12426,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
12379
12426
|
display_transformers: display_transformers,
|
|
12380
12427
|
api: api,
|
|
12381
12428
|
searchModalComponent: searchModalComponent,
|
|
12429
|
+
imageResizer_: imageResizer_,
|
|
12382
12430
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
12383
12431
|
disable_scrolling_during_modal = true,
|
|
12384
12432
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -12509,6 +12557,7 @@ class $2c61e4cd8229c49a$export$ac6237957a15b3f0 {
|
|
|
12509
12557
|
},
|
|
12510
12558
|
i18n_: i18n_,
|
|
12511
12559
|
enable_category_suggestions_: enable_category_suggestions,
|
|
12560
|
+
imageResizer_: imageResizer_,
|
|
12512
12561
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
12513
12562
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
12514
12563
|
}, override_modal_element);
|
|
@@ -13283,7 +13332,8 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
|
|
|
13283
13332
|
product_card_template_: product_card_template,
|
|
13284
13333
|
sorting_query_param_: sorting_query_param_,
|
|
13285
13334
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
13286
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
13335
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
13336
|
+
imageResizer_: props.imageResizer_
|
|
13287
13337
|
});
|
|
13288
13338
|
}, "Entire CategoryPage failed");
|
|
13289
13339
|
}
|
package/server/latest/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.13";
|
|
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,
|
|
@@ -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;
|
|
1645
|
+
imageResizer_?: (url: string, width: number) => string;
|
|
1626
1646
|
}): import("@depict-ai/utilishared/latest").Node_Array;
|
|
1627
1647
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|