@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/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.13";
|
|
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 => {
|
|
@@ -2311,13 +2311,13 @@ function $a904ccf883f60231$export$f21ab0717a89c77f(props) {
|
|
|
2311
2311
|
height: "12"
|
|
2312
2312
|
}), () => $3hooq$solidjsweb.ssr($a904ccf883f60231$var$_tmpl$), true);
|
|
2313
2313
|
}
|
|
2314
|
-
var $b0477e4d832f090e$var$_tmpl$ = ["<button", ' type="button" class="', '"
|
|
2314
|
+
var $b0477e4d832f090e$var$_tmpl$ = ["<button", ' type="button" class="', '"', "><!--$-->", "<!--/--><span>", "</span></button>"];
|
|
2315
2315
|
function $b0477e4d832f090e$export$ca21a16d65b3dd8(_ref) {
|
|
2316
2316
|
let {
|
|
2317
2317
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2318
2318
|
i18n_: i18n_
|
|
2319
2319
|
} = _ref;
|
|
2320
|
-
return $3hooq$solidjsweb.ssr($b0477e4d832f090e$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "expand-filter ".concat(get_show_extras() ? "expanded" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $a904ccf883f60231$export$f21ab0717a89c77f), {})), get_show_extras() ? $3hooq$solidjsweb.escape(i18n_.view_less_()) : $3hooq$solidjsweb.escape(i18n_.view_more_()));
|
|
2320
|
+
return $3hooq$solidjsweb.ssr($b0477e4d832f090e$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "expand-filter ".concat(get_show_extras() ? "expanded" : ""), $3hooq$solidjsweb.ssrAttribute("aria-expanded", $3hooq$solidjsweb.escape(get_show_extras(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $a904ccf883f60231$export$f21ab0717a89c77f), {})), get_show_extras() ? $3hooq$solidjsweb.escape(i18n_.view_less_()) : $3hooq$solidjsweb.escape(i18n_.view_more_()));
|
|
2321
2321
|
}
|
|
2322
2322
|
var $23c3f390dee33ff8$var$_tmpl$ = ["<span", ' class="highlighted-part">', "</span>"],
|
|
2323
2323
|
$23c3f390dee33ff8$var$_tmpl$2 = ["<span", ' class="', '"', ">", "</span>"];
|
|
@@ -2566,7 +2566,7 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
|
|
|
2566
2566
|
}
|
|
2567
2567
|
})));
|
|
2568
2568
|
}
|
|
2569
|
-
var $0257c760a99bfacb$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>"],
|
|
2569
|
+
var $0257c760a99bfacb$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>"],
|
|
2570
2570
|
$0257c760a99bfacb$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
|
|
2571
2571
|
$0257c760a99bfacb$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
|
|
2572
2572
|
function $0257c760a99bfacb$export$e0d834a0ad870cda(_ref) {
|
|
@@ -2665,7 +2665,8 @@ function $0257c760a99bfacb$var$RangeSelector(_ref3) {
|
|
|
2665
2665
|
min_: min_,
|
|
2666
2666
|
current_range_: current_range_,
|
|
2667
2667
|
i18n_: i18n_,
|
|
2668
|
-
should_be_disabled_: should_be_disabled_
|
|
2668
|
+
should_be_disabled_: should_be_disabled_,
|
|
2669
|
+
priceFormatting_: price_formatting_
|
|
2669
2670
|
})), $3hooq$solidjsweb.escape(pre_price()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $f38f2e64ebe2da86$export$a71e92cfbb498adc), {
|
|
2670
2671
|
get price_() {
|
|
2671
2672
|
return min_();
|
|
@@ -2688,7 +2689,8 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
|
|
|
2688
2689
|
min_: min_,
|
|
2689
2690
|
i18n_: i18n_,
|
|
2690
2691
|
max_: max_,
|
|
2691
|
-
should_be_disabled_: should_be_disabled_
|
|
2692
|
+
should_be_disabled_: should_be_disabled_,
|
|
2693
|
+
priceFormatting_: priceFormatting_
|
|
2692
2694
|
} = _ref4;
|
|
2693
2695
|
// inspired by https://observablehq.com/@mbostock/nonlinear-slider
|
|
2694
2696
|
const transform_linear_to_nonlinear = _ref5 => {
|
|
@@ -2725,7 +2727,8 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
|
|
|
2725
2727
|
max_: modified_max,
|
|
2726
2728
|
offset_value_calculator_: offset_value_calculator_,
|
|
2727
2729
|
i18n_: i18n_,
|
|
2728
|
-
should_be_disabled_: should_be_disabled_
|
|
2730
|
+
should_be_disabled_: should_be_disabled_,
|
|
2731
|
+
priceFormatting_: priceFormatting_
|
|
2729
2732
|
});
|
|
2730
2733
|
}
|
|
2731
2734
|
function $0257c760a99bfacb$var$LinearSlider(_ref6) {
|
|
@@ -2735,12 +2738,17 @@ function $0257c760a99bfacb$var$LinearSlider(_ref6) {
|
|
|
2735
2738
|
current_range_: current_range_,
|
|
2736
2739
|
offset_value_calculator_: offset_value_calculator_,
|
|
2737
2740
|
i18n_: i18n_,
|
|
2738
|
-
should_be_disabled_: should_be_disabled_
|
|
2741
|
+
should_be_disabled_: should_be_disabled_,
|
|
2742
|
+
priceFormatting_: priceFormatting_
|
|
2739
2743
|
} = _ref6;
|
|
2740
2744
|
let range_input_1;
|
|
2741
2745
|
let range_input_2;
|
|
2742
2746
|
let clickable_slider;
|
|
2743
2747
|
const [get_current_range, set_current_range] = current_range_;
|
|
2748
|
+
const formatRealPrice = value => {
|
|
2749
|
+
const priceFormatting = priceFormatting_();
|
|
2750
|
+
return priceFormatting.pre_ + $3hooq$depictaiutilishared.standard_price_format(value, priceFormatting.places_after_comma_, priceFormatting.decimal_places_delimiter_, priceFormatting.thousands_delimiter_) + priceFormatting.post_;
|
|
2751
|
+
};
|
|
2744
2752
|
const progress_styling = $3hooq$solidjs.createMemo(() => {
|
|
2745
2753
|
const min = min_();
|
|
2746
2754
|
const span = max_() - min;
|
|
@@ -2759,13 +2767,13 @@ function $0257c760a99bfacb$var$LinearSlider(_ref6) {
|
|
|
2759
2767
|
el.value = get_current_range()[index];
|
|
2760
2768
|
});
|
|
2761
2769
|
};
|
|
2762
|
-
return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
|
|
2770
|
+
return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("aria-valuetext", $3hooq$solidjsweb.escape(formatRealPrice(get_current_range()[0]), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
|
|
2763
2771
|
min_();
|
|
2764
2772
|
max_();
|
|
2765
2773
|
return get_current_range()[0];
|
|
2766
2774
|
}, undefined, {
|
|
2767
2775
|
equals: false
|
|
2768
|
-
})(), true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
|
|
2776
|
+
})(), true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("aria-valuetext", $3hooq$solidjsweb.escape(formatRealPrice(get_current_range()[1]), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
|
|
2769
2777
|
}
|
|
2770
2778
|
function $0257c760a99bfacb$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el) {
|
|
2771
2779
|
let get_offset_value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : (value, how_many) => value + how_many;
|
|
@@ -3633,6 +3641,13 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
|
|
|
3633
3641
|
const label = $3hooq$solidjs.createMemo(() => value().name_ || value().value_ + "");
|
|
3634
3642
|
const count_zero = $3hooq$solidjs.createMemo(() => value().count_ === 0);
|
|
3635
3643
|
return $3hooq$solidjsweb.ssrElement("button", $3hooq$solidjsweb.mergeProps(attributes, {
|
|
3644
|
+
type: "button",
|
|
3645
|
+
get ["aria-pressed"]() {
|
|
3646
|
+
return is_selected();
|
|
3647
|
+
},
|
|
3648
|
+
get ["aria-label"]() {
|
|
3649
|
+
return value().count_ != undefined ? "".concat(label(), ", ").concat(value().count_) : label();
|
|
3650
|
+
},
|
|
3636
3651
|
get disabled() {
|
|
3637
3652
|
return count_zero() && !is_selected();
|
|
3638
3653
|
},
|
|
@@ -3811,7 +3826,14 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
3811
3826
|
return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
|
|
3812
3827
|
});
|
|
3813
3828
|
const value = $3hooq$solidjs.createMemo(() => checkbox().value_);
|
|
3814
|
-
const label_text = $3hooq$solidjs.createMemo(() =>
|
|
3829
|
+
const label_text = $3hooq$solidjs.createMemo(() => {
|
|
3830
|
+
const name = checkbox().name_;
|
|
3831
|
+
if (name) return name;
|
|
3832
|
+
const value_string = value() + "";
|
|
3833
|
+
if (backendFilterV2()) return value_string;
|
|
3834
|
+
// Legacy values are "Name;#hex" - split is used to get the name so that screen readers don't announce the hex code
|
|
3835
|
+
return value_string.split(";")[0] || value_string;
|
|
3836
|
+
});
|
|
3815
3837
|
const count = $3hooq$solidjs.createMemo(() => checkbox().count_);
|
|
3816
3838
|
const colorNameDatasetValue = $3hooq$solidjs.createMemo(() => {
|
|
3817
3839
|
var _split2;
|
|
@@ -4239,9 +4261,9 @@ function $8e7ac26c00243687$var$find_str_arr_in_str_arr_arr(operation, haystack,
|
|
|
4239
4261
|
var $164d474fea221d77$var$_tmpl$ = ["<div", ' class="filter-collapsible">', "</div>"],
|
|
4240
4262
|
$164d474fea221d77$var$_tmpl$2 = ["<button", ' class="clear-group"><!--$-->', "<!--/--><span>", "</span></button>"],
|
|
4241
4263
|
$164d474fea221d77$var$_tmpl$3 = ["<div", ' class="view-more-clear"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
|
|
4242
|
-
$164d474fea221d77$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><
|
|
4264
|
+
$164d474fea221d77$var$_tmpl$4 = ["<div", ' class="filter-collapsible-body"><fieldset class="filter-part"', "><!--$-->", "<!--/--><!--$-->", "<!--/--></fieldset><!--$-->", "<!--/--></div>"],
|
|
4243
4265
|
$164d474fea221d77$var$_tmpl$5 = ["<details", ' class="filter-collapsible"', "></details>"],
|
|
4244
|
-
$164d474fea221d77$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span
|
|
4266
|
+
$164d474fea221d77$var$_tmpl$6 = ["<summary", ' class="filter-group-summary"><div class="summary"><span', ">", '</span><div class="selected-w-sign"><!--$-->', "<!--/--><!--$-->", "<!--/--></div></div></summary>"],
|
|
4245
4267
|
$164d474fea221d77$var$_tmpl$7 = ["<div", ' class="ungrouped">', "</div>"],
|
|
4246
4268
|
$164d474fea221d77$var$_tmpl$8 = ["<button", ' class="clear-all-filters major">', "</button>"];
|
|
4247
4269
|
function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
|
|
@@ -4338,13 +4360,14 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
|
|
|
4338
4360
|
var _get_details_width;
|
|
4339
4361
|
return get_details_width === null || get_details_width === void 0 ? void 0 : (_get_details_width = get_details_width()) === null || _get_details_width === void 0 ? void 0 : _get_details_width();
|
|
4340
4362
|
});
|
|
4363
|
+
const title_id = $3hooq$depictaiutilishared.make_random_classname();
|
|
4341
4364
|
return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
|
|
4342
4365
|
is_open_: is_open,
|
|
4343
4366
|
get details_() {
|
|
4344
4367
|
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$5, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("data-group-title", $3hooq$solidjsweb.escape(section_, true), false));
|
|
4345
4368
|
},
|
|
4346
4369
|
get summary_() {
|
|
4347
|
-
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(section_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4370
|
+
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("id", $3hooq$solidjsweb.escape(title_id, true), false), $3hooq$solidjsweb.escape(section_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
4348
4371
|
get when() {
|
|
4349
4372
|
return a_filter_is_selected();
|
|
4350
4373
|
},
|
|
@@ -4366,7 +4389,7 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
|
|
|
4366
4389
|
})));
|
|
4367
4390
|
},
|
|
4368
4391
|
get children() {
|
|
4369
|
-
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
|
|
4392
|
+
return $3hooq$solidjsweb.ssr($164d474fea221d77$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-labelledby", $3hooq$solidjsweb.escape(title_id, true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(SearchThisFilterGroup_, {})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Index), {
|
|
4370
4393
|
get each() {
|
|
4371
4394
|
return searched_filter_array_();
|
|
4372
4395
|
},
|
|
@@ -6586,7 +6609,7 @@ function $28535bb7671c63d1$export$e4b984597b71e989(props) {
|
|
|
6586
6609
|
})));
|
|
6587
6610
|
return container;
|
|
6588
6611
|
}
|
|
6589
|
-
const $f3db423dc84bc35d$var$
|
|
6612
|
+
const $f3db423dc84bc35d$var$defaultCustomUrls = (url, width) => {
|
|
6590
6613
|
var _url$startsWith;
|
|
6591
6614
|
if (url !== null && url !== void 0 && (_url$startsWith = url.startsWith) !== null && _url$startsWith !== void 0 && _url$startsWith.call(url, "https://cdn.shopify.com"))
|
|
6592
6615
|
// 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 +6619,23 @@ const $f3db423dc84bc35d$var$customUrls = (url, width) => {
|
|
|
6596
6619
|
return "https://app.depict.ai/cdn-cgi/image/width=".concat(width, ",format=auto/").concat(url);
|
|
6597
6620
|
};
|
|
6598
6621
|
function $f3db423dc84bc35d$export$9d4a4b669b1929ab(props) {
|
|
6622
|
+
var _props$imageResizer_;
|
|
6623
|
+
const resolvedCustomUrls = (_props$imageResizer_ = props.imageResizer_) !== null && _props$imageResizer_ !== void 0 ? _props$imageResizer_ : $f3db423dc84bc35d$var$defaultCustomUrls;
|
|
6599
6624
|
return $3hooq$solidjsweb.createComponent((0, $28535bb7671c63d1$export$e4b984597b71e989), $3hooq$solidjsweb.mergeProps(props, {
|
|
6600
6625
|
get imgProps() {
|
|
6601
6626
|
return {
|
|
6602
6627
|
...props.imgProps,
|
|
6603
|
-
customUrls:
|
|
6628
|
+
customUrls: resolvedCustomUrls
|
|
6604
6629
|
};
|
|
6605
6630
|
}
|
|
6606
6631
|
}));
|
|
6607
6632
|
}
|
|
6608
6633
|
function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
|
|
6609
6634
|
return $3hooq$solidjsweb.createComponent((0, $858fdcf73148519f$export$6e5611bc7e57e477), $3hooq$solidjsweb.mergeProps(props, {
|
|
6610
|
-
customUrls
|
|
6635
|
+
get customUrls() {
|
|
6636
|
+
var _props$imageResizer_2;
|
|
6637
|
+
return (_props$imageResizer_2 = props.imageResizer_) !== null && _props$imageResizer_2 !== void 0 ? _props$imageResizer_2 : $f3db423dc84bc35d$var$defaultCustomUrls;
|
|
6638
|
+
}
|
|
6611
6639
|
}));
|
|
6612
6640
|
}
|
|
6613
6641
|
var $c19709057a32b2e7$var$_tmpl$ = ["<video", ' disablepictureinpicture="true" class="d-standard-content"></video>'];
|
|
@@ -6618,7 +6646,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6618
6646
|
router_: router_,
|
|
6619
6647
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
6620
6648
|
mediaUrl_: mediaUrl_,
|
|
6621
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
6649
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
6650
|
+
imageResizer_: imageResizer_
|
|
6622
6651
|
} = _ref;
|
|
6623
6652
|
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
6653
|
const [wrapperSize, setWrapperSize] = $3hooq$solidjs.createSignal();
|
|
@@ -6672,7 +6701,8 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6672
6701
|
},
|
|
6673
6702
|
src: mediaUrl_,
|
|
6674
6703
|
"class": "d-standard-content",
|
|
6675
|
-
onDecoded: () => setHasLoaded(true)
|
|
6704
|
+
onDecoded: () => setHasLoaded(true),
|
|
6705
|
+
imageResizer_: imageResizer_
|
|
6676
6706
|
});
|
|
6677
6707
|
}
|
|
6678
6708
|
}), $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Match), {
|
|
@@ -6686,7 +6716,7 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
6686
6716
|
}
|
|
6687
6717
|
}));
|
|
6688
6718
|
}
|
|
6689
|
-
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
6719
|
+
function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
6690
6720
|
let hasSeenContentBlock = false;
|
|
6691
6721
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
6692
6722
|
const contentComponents = new Map();
|
|
@@ -6742,7 +6772,8 @@ function $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
6742
6772
|
...prev.aspectRatios,
|
|
6743
6773
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
6744
6774
|
}
|
|
6745
|
-
}))
|
|
6775
|
+
})),
|
|
6776
|
+
imageResizer_: imageResizer_
|
|
6746
6777
|
});
|
|
6747
6778
|
contentComponents.set(componentCacheKey, component);
|
|
6748
6779
|
}
|
|
@@ -6807,7 +6838,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6807
6838
|
filterModalParent_: filterModalParent_,
|
|
6808
6839
|
showSliderArrow_: showSliderArrow_,
|
|
6809
6840
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
6810
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
6841
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
6842
|
+
imageResizer_: imageResizer_
|
|
6811
6843
|
} = _ref;
|
|
6812
6844
|
let results_for;
|
|
6813
6845
|
let only_show_filters_opener_;
|
|
@@ -6903,7 +6935,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6903
6935
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
6904
6936
|
return result;
|
|
6905
6937
|
}));
|
|
6906
|
-
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
6938
|
+
const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
6907
6939
|
const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
6908
6940
|
const available_sortings_ = $3hooq$solidjs.createMemo(() => {
|
|
6909
6941
|
var _plp_products_, _plp_products_$sorts;
|
|
@@ -7448,7 +7480,8 @@ function $53dca9b7b01789b1$export$b73ed90f0ee50dc3(_ref) {
|
|
|
7448
7480
|
outerRef_: outerRef_,
|
|
7449
7481
|
animationDuration_: animationDuration_,
|
|
7450
7482
|
priceFormatting_: priceFormatting_,
|
|
7451
|
-
pseudoRouter_: pseudoRouter_
|
|
7483
|
+
pseudoRouter_: pseudoRouter_,
|
|
7484
|
+
imageResizer_: imageResizer_
|
|
7452
7485
|
} = _ref;
|
|
7453
7486
|
const variantToUse = $3hooq$solidjs.createMemo(() => {
|
|
7454
7487
|
const display = display_();
|
|
@@ -7514,7 +7547,8 @@ function $53dca9b7b01789b1$export$b73ed90f0ee50dc3(_ref) {
|
|
|
7514
7547
|
},
|
|
7515
7548
|
imgProps: {
|
|
7516
7549
|
keyRatioUpdating: true
|
|
7517
|
-
}
|
|
7550
|
+
},
|
|
7551
|
+
imageResizer_: imageResizer_
|
|
7518
7552
|
});
|
|
7519
7553
|
}
|
|
7520
7554
|
})));
|
|
@@ -7667,7 +7701,8 @@ function $1709366c442d8933$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
7667
7701
|
supportsHover_: supportsHover_,
|
|
7668
7702
|
priceFormatting_: priceFormatting_,
|
|
7669
7703
|
pseudoRouter_: pseudoRouter_,
|
|
7670
|
-
containerHeight_: containerHeight_
|
|
7704
|
+
containerHeight_: containerHeight_,
|
|
7705
|
+
imageResizer_: imageResizer_
|
|
7671
7706
|
} = _ref;
|
|
7672
7707
|
let isAffectedByChromeBug = false;
|
|
7673
7708
|
// If the user requests the drawer to be expanded or not
|
|
@@ -7703,6 +7738,7 @@ function $1709366c442d8933$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
7703
7738
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
7704
7739
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
7705
7740
|
priceFormatting_: priceFormatting_,
|
|
7741
|
+
imageResizer_: imageResizer_,
|
|
7706
7742
|
outerRef_: el => $3hooq$solidjs.createEffect(() => {
|
|
7707
7743
|
if (index !== 0) return;
|
|
7708
7744
|
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -7746,7 +7782,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7746
7782
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
7747
7783
|
animationDuration_: animationDuration_,
|
|
7748
7784
|
priceFormatting_: priceFormatting_,
|
|
7749
|
-
pseudoRouter_: pseudoRouter_
|
|
7785
|
+
pseudoRouter_: pseudoRouter_,
|
|
7786
|
+
imageResizer_: imageResizer_
|
|
7750
7787
|
} = _ref;
|
|
7751
7788
|
let container;
|
|
7752
7789
|
const useWantsExpandedSignal_ = $3hooq$solidjs.createSignal(false);
|
|
@@ -7814,7 +7851,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7814
7851
|
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
7852
|
},
|
|
7816
7853
|
aspectRatio: placeholderImageAspectRatio_,
|
|
7817
|
-
autoAdjustAspectRatio: true
|
|
7854
|
+
autoAdjustAspectRatio: true,
|
|
7855
|
+
imageResizer_: imageResizer_
|
|
7818
7856
|
});
|
|
7819
7857
|
}
|
|
7820
7858
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1709366c442d8933$export$ebf0b1d4f90c09ae), {
|
|
@@ -7829,7 +7867,8 @@ function $ae325261371de459$export$44809a8a3e867e30(_ref) {
|
|
|
7829
7867
|
FavoriteButton_: FavoriteButton_,
|
|
7830
7868
|
priceFormatting_: priceFormatting_,
|
|
7831
7869
|
pseudoRouter_: pseudoRouter_,
|
|
7832
|
-
containerHeight_: containerHeight_
|
|
7870
|
+
containerHeight_: containerHeight_,
|
|
7871
|
+
imageResizer_: imageResizer_
|
|
7833
7872
|
})));
|
|
7834
7873
|
}
|
|
7835
7874
|
|
|
@@ -8104,7 +8143,8 @@ function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
|
8104
8143
|
animationDuration_: expandingAnimationDuration,
|
|
8105
8144
|
expandedLooksSignal_: $e57cd46536ad992e$var$expandedLooksSignal_,
|
|
8106
8145
|
priceFormatting_: () => props.priceFormatting_,
|
|
8107
|
-
pseudoRouter_: pseudoRouter
|
|
8146
|
+
pseudoRouter_: pseudoRouter,
|
|
8147
|
+
imageResizer_: props.imageResizer_
|
|
8108
8148
|
}),
|
|
8109
8149
|
recommendations_resource_: looksResource,
|
|
8110
8150
|
title_: () => props.title_,
|
|
@@ -9591,7 +9631,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9591
9631
|
merchant_: merchant_,
|
|
9592
9632
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
9593
9633
|
index_: index_,
|
|
9594
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
9634
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
9635
|
+
imageResizer_: imageResizer_
|
|
9595
9636
|
} = _ref;
|
|
9596
9637
|
const href = $3hooq$solidjs.createMemo(() => {
|
|
9597
9638
|
var _listing_;
|
|
@@ -9620,7 +9661,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9620
9661
|
tabIndex: -1,
|
|
9621
9662
|
get children() {
|
|
9622
9663
|
return $3hooq$solidjsweb.ssr($d1e7b96fb13cd1d3$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($d1e7b96fb13cd1d3$export$ea41102db9bd68c3, {
|
|
9623
|
-
image_urls_: image_urls
|
|
9664
|
+
image_urls_: image_urls,
|
|
9665
|
+
imageResizer_: imageResizer_
|
|
9624
9666
|
})));
|
|
9625
9667
|
}
|
|
9626
9668
|
})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
@@ -9650,7 +9692,8 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9650
9692
|
}
|
|
9651
9693
|
function $d1e7b96fb13cd1d3$export$ea41102db9bd68c3(_ref2) {
|
|
9652
9694
|
let {
|
|
9653
|
-
image_urls_: image_urls_
|
|
9695
|
+
image_urls_: image_urls_,
|
|
9696
|
+
imageResizer_: imageResizer_
|
|
9654
9697
|
} = _ref2;
|
|
9655
9698
|
return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
9656
9699
|
get when() {
|
|
@@ -9674,7 +9717,8 @@ function $d1e7b96fb13cd1d3$export$ea41102db9bd68c3(_ref2) {
|
|
|
9674
9717
|
},
|
|
9675
9718
|
imgProps: {
|
|
9676
9719
|
style: "object-fit: cover;"
|
|
9677
|
-
}
|
|
9720
|
+
},
|
|
9721
|
+
imageResizer_: imageResizer_
|
|
9678
9722
|
})
|
|
9679
9723
|
});
|
|
9680
9724
|
}
|
|
@@ -9699,7 +9743,8 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
9699
9743
|
selected_index_: selected_index_,
|
|
9700
9744
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
9701
9745
|
showPlaceholders_: showPlaceholders_,
|
|
9702
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
9746
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
9747
|
+
imageResizer_: imageResizer_
|
|
9703
9748
|
} = _ref;
|
|
9704
9749
|
const listings_by_id = $3hooq$solidjs.createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
9705
9750
|
const productCards = $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.For), {
|
|
@@ -9717,7 +9762,8 @@ function $f765bad01136eee1$export$c8d7e00464029b45(_ref) {
|
|
|
9717
9762
|
merchant_: merchant_,
|
|
9718
9763
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
9719
9764
|
index_: index,
|
|
9720
|
-
selected_index_: selected_index_
|
|
9765
|
+
selected_index_: selected_index_,
|
|
9766
|
+
imageResizer_: imageResizer_
|
|
9721
9767
|
});
|
|
9722
9768
|
}
|
|
9723
9769
|
});
|
|
@@ -10037,7 +10083,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10037
10083
|
sorting_query_param_: sorting_query_param_,
|
|
10038
10084
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
10039
10085
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
10040
|
-
forceUseDiv_: forceUseDiv_
|
|
10086
|
+
forceUseDiv_: forceUseDiv_,
|
|
10087
|
+
imageResizer_: imageResizer_
|
|
10041
10088
|
} = _ref;
|
|
10042
10089
|
let on_enter_in_search_field_function;
|
|
10043
10090
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -10250,7 +10297,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10250
10297
|
},
|
|
10251
10298
|
imgProps: {
|
|
10252
10299
|
alt: "Product image"
|
|
10253
|
-
}
|
|
10300
|
+
},
|
|
10301
|
+
imageResizer_: imageResizer_
|
|
10254
10302
|
}),
|
|
10255
10303
|
...instant_results_options_
|
|
10256
10304
|
})));
|
|
@@ -10279,7 +10327,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10279
10327
|
selected_index_: selected_index_,
|
|
10280
10328
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
10281
10329
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
10282
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
10330
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
10331
|
+
imageResizer_: imageResizer_
|
|
10283
10332
|
});
|
|
10284
10333
|
}
|
|
10285
10334
|
});
|
|
@@ -13230,6 +13279,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
13230
13279
|
display_transformers: display_transformers,
|
|
13231
13280
|
api: api,
|
|
13232
13281
|
searchModalComponent: searchModalComponent,
|
|
13282
|
+
imageResizer_: imageResizer_,
|
|
13233
13283
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
13234
13284
|
disable_scrolling_during_modal = true,
|
|
13235
13285
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -13393,6 +13443,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
13393
13443
|
},
|
|
13394
13444
|
i18n_: i18n_,
|
|
13395
13445
|
enable_category_suggestions_: enable_category_suggestions,
|
|
13446
|
+
imageResizer_: imageResizer_,
|
|
13396
13447
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
13397
13448
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
13398
13449
|
}, override_modal_element);
|
|
@@ -14294,7 +14345,8 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
|
|
|
14294
14345
|
product_card_template_: product_card_template,
|
|
14295
14346
|
sorting_query_param_: sorting_query_param_,
|
|
14296
14347
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
14297
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
14348
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
14349
|
+
imageResizer_: props.imageResizer_
|
|
14298
14350
|
});
|
|
14299
14351
|
}, "Entire CategoryPage failed");
|
|
14300
14352
|
}
|
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.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";
|