@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/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.13";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -2612,7 +2612,16 @@ function $67b173f9db427028$export$ca21a16d65b3dd8({
|
|
|
2612
2612
|
var _c$ = $9HbP8$memo(() => !!get_show_extras());
|
|
2613
2613
|
return () => _c$() ? i18n_.view_less_() : i18n_.view_more_();
|
|
2614
2614
|
})());
|
|
2615
|
-
$9HbP8$effect(
|
|
2615
|
+
$9HbP8$effect(_p$ => {
|
|
2616
|
+
var _v$ = get_show_extras(),
|
|
2617
|
+
_v$2 = !!get_show_extras();
|
|
2618
|
+
_v$ !== _p$.e && $9HbP8$setAttribute(_el$, "aria-expanded", _p$.e = _v$);
|
|
2619
|
+
_v$2 !== _p$.t && _el$.classList.toggle("expanded", _p$.t = _v$2);
|
|
2620
|
+
return _p$;
|
|
2621
|
+
}, {
|
|
2622
|
+
e: undefined,
|
|
2623
|
+
t: undefined
|
|
2624
|
+
});
|
|
2616
2625
|
$9HbP8$runHydrationEvents();
|
|
2617
2626
|
return _el$;
|
|
2618
2627
|
})();
|
|
@@ -2931,7 +2940,7 @@ function $eb8d9bf3b5700c26$export$430444115f70a734({
|
|
|
2931
2940
|
return _el$;
|
|
2932
2941
|
})();
|
|
2933
2942
|
}
|
|
2934
|
-
var $a6b08770e164eced$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=range><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><!$><!/><!$><!/><!$><!/>`),
|
|
2943
|
+
var $a6b08770e164eced$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=range><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><!$><!/><!$><!/><!$><!/>`),
|
|
2935
2944
|
$a6b08770e164eced$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class=slider><div class=progress>`),
|
|
2936
2945
|
$a6b08770e164eced$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=range-group><input type=range step=any><input type=range step=any>`);
|
|
2937
2946
|
function $a6b08770e164eced$export$e0d834a0ad870cda({
|
|
@@ -3065,7 +3074,8 @@ function $a6b08770e164eced$var$RangeSelector({
|
|
|
3065
3074
|
min_: min_,
|
|
3066
3075
|
current_range_: current_range_,
|
|
3067
3076
|
i18n_: i18n_,
|
|
3068
|
-
should_be_disabled_: should_be_disabled_
|
|
3077
|
+
should_be_disabled_: should_be_disabled_,
|
|
3078
|
+
priceFormatting_: price_formatting_
|
|
3069
3079
|
}), _el$24, _co$7);
|
|
3070
3080
|
$9HbP8$insert(_el$9, pre_price, _el$11, _co$);
|
|
3071
3081
|
$9HbP8$insert(_el$9, $9HbP8$createComponent((0, $8c0f86cb3e266eeb$export$a71e92cfbb498adc), {
|
|
@@ -3129,7 +3139,8 @@ function $a6b08770e164eced$var$ExponentialSlider({
|
|
|
3129
3139
|
min_: min_,
|
|
3130
3140
|
i18n_: i18n_,
|
|
3131
3141
|
max_: max_,
|
|
3132
|
-
should_be_disabled_: should_be_disabled_
|
|
3142
|
+
should_be_disabled_: should_be_disabled_,
|
|
3143
|
+
priceFormatting_: priceFormatting_
|
|
3133
3144
|
}) {
|
|
3134
3145
|
// inspired by https://observablehq.com/@mbostock/nonlinear-slider
|
|
3135
3146
|
const transform_linear_to_nonlinear = ([smaller, larger]) => [Math.sqrt(smaller), Math.sqrt(larger)];
|
|
@@ -3163,7 +3174,8 @@ function $a6b08770e164eced$var$ExponentialSlider({
|
|
|
3163
3174
|
max_: modified_max,
|
|
3164
3175
|
offset_value_calculator_: offset_value_calculator_,
|
|
3165
3176
|
i18n_: i18n_,
|
|
3166
|
-
should_be_disabled_: should_be_disabled_
|
|
3177
|
+
should_be_disabled_: should_be_disabled_,
|
|
3178
|
+
priceFormatting_: priceFormatting_
|
|
3167
3179
|
});
|
|
3168
3180
|
}
|
|
3169
3181
|
function $a6b08770e164eced$var$LinearSlider({
|
|
@@ -3172,12 +3184,17 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
3172
3184
|
current_range_: current_range_,
|
|
3173
3185
|
offset_value_calculator_: offset_value_calculator_,
|
|
3174
3186
|
i18n_: i18n_,
|
|
3175
|
-
should_be_disabled_: should_be_disabled_
|
|
3187
|
+
should_be_disabled_: should_be_disabled_,
|
|
3188
|
+
priceFormatting_: priceFormatting_
|
|
3176
3189
|
}) {
|
|
3177
3190
|
let range_input_1;
|
|
3178
3191
|
let range_input_2;
|
|
3179
3192
|
let clickable_slider;
|
|
3180
3193
|
const [get_current_range, set_current_range] = current_range_;
|
|
3194
|
+
const formatRealPrice = value => {
|
|
3195
|
+
const priceFormatting = priceFormatting_();
|
|
3196
|
+
return priceFormatting.pre_ + $9HbP8$standard_price_format(value, priceFormatting.places_after_comma_, priceFormatting.decimal_places_delimiter_, priceFormatting.thousands_delimiter_) + priceFormatting.post_;
|
|
3197
|
+
};
|
|
3181
3198
|
const progress_styling = $9HbP8$createMemo(() => {
|
|
3182
3199
|
const min = min_();
|
|
3183
3200
|
const span = max_() - min;
|
|
@@ -3234,20 +3251,24 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
3234
3251
|
$9HbP8$effect(_p$ => {
|
|
3235
3252
|
var _v$10 = should_be_disabled_(),
|
|
3236
3253
|
_v$11 = i18n_.range_filter_low_point_aria_label_(),
|
|
3237
|
-
_v$12 =
|
|
3238
|
-
_v$13 =
|
|
3239
|
-
_v$14 =
|
|
3240
|
-
_v$15 =
|
|
3241
|
-
_v$16 =
|
|
3242
|
-
_v$17 =
|
|
3254
|
+
_v$12 = formatRealPrice(get_current_range()[0]),
|
|
3255
|
+
_v$13 = min_(),
|
|
3256
|
+
_v$14 = max_(),
|
|
3257
|
+
_v$15 = should_be_disabled_(),
|
|
3258
|
+
_v$16 = i18n_.range_filter_high_point_aria_label_(),
|
|
3259
|
+
_v$17 = formatRealPrice(get_current_range()[1]),
|
|
3260
|
+
_v$18 = min_(),
|
|
3261
|
+
_v$19 = max_();
|
|
3243
3262
|
_v$10 !== _p$.e && $9HbP8$setProperty(_el$28, "disabled", _p$.e = _v$10);
|
|
3244
3263
|
_v$11 !== _p$.t && $9HbP8$setAttribute(_el$28, "aria-label", _p$.t = _v$11);
|
|
3245
|
-
_v$12 !== _p$.a && $9HbP8$setAttribute(_el$28, "
|
|
3246
|
-
_v$13 !== _p$.o && $9HbP8$setAttribute(_el$28, "
|
|
3247
|
-
_v$14 !== _p$.i && $9HbP8$
|
|
3248
|
-
_v$15 !== _p$.n && $9HbP8$
|
|
3249
|
-
_v$16 !== _p$.s && $9HbP8$setAttribute(_el$29, "
|
|
3250
|
-
_v$17 !== _p$.h && $9HbP8$setAttribute(_el$29, "
|
|
3264
|
+
_v$12 !== _p$.a && $9HbP8$setAttribute(_el$28, "aria-valuetext", _p$.a = _v$12);
|
|
3265
|
+
_v$13 !== _p$.o && $9HbP8$setAttribute(_el$28, "min", _p$.o = _v$13);
|
|
3266
|
+
_v$14 !== _p$.i && $9HbP8$setAttribute(_el$28, "max", _p$.i = _v$14);
|
|
3267
|
+
_v$15 !== _p$.n && $9HbP8$setProperty(_el$29, "disabled", _p$.n = _v$15);
|
|
3268
|
+
_v$16 !== _p$.s && $9HbP8$setAttribute(_el$29, "aria-label", _p$.s = _v$16);
|
|
3269
|
+
_v$17 !== _p$.h && $9HbP8$setAttribute(_el$29, "aria-valuetext", _p$.h = _v$17);
|
|
3270
|
+
_v$18 !== _p$.r && $9HbP8$setAttribute(_el$29, "min", _p$.r = _v$18);
|
|
3271
|
+
_v$19 !== _p$.d && $9HbP8$setAttribute(_el$29, "max", _p$.d = _v$19);
|
|
3251
3272
|
return _p$;
|
|
3252
3273
|
}, {
|
|
3253
3274
|
e: undefined,
|
|
@@ -3257,7 +3278,9 @@ function $a6b08770e164eced$var$LinearSlider({
|
|
|
3257
3278
|
i: undefined,
|
|
3258
3279
|
n: undefined,
|
|
3259
3280
|
s: undefined,
|
|
3260
|
-
h: undefined
|
|
3281
|
+
h: undefined,
|
|
3282
|
+
r: undefined,
|
|
3283
|
+
d: undefined
|
|
3261
3284
|
});
|
|
3262
3285
|
$9HbP8$effect(() => $9HbP8$setProperty(_el$28, "value", $9HbP8$createMemo(() => {
|
|
3263
3286
|
min_();
|
|
@@ -4139,6 +4162,13 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
|
|
|
4139
4162
|
_el$7 = _el$6.nextSibling,
|
|
4140
4163
|
[_el$8, _co$2] = $9HbP8$getNextMarker(_el$7.nextSibling);
|
|
4141
4164
|
$9HbP8$spread(_el$2, $9HbP8$mergeProps1(attributes, {
|
|
4165
|
+
"type": "button",
|
|
4166
|
+
get ["aria-pressed"]() {
|
|
4167
|
+
return is_selected();
|
|
4168
|
+
},
|
|
4169
|
+
get ["aria-label"]() {
|
|
4170
|
+
return $9HbP8$memo(() => value().count_ != undefined)() ? `${label()}, ${value().count_}` : label();
|
|
4171
|
+
},
|
|
4142
4172
|
get disabled() {
|
|
4143
4173
|
return $9HbP8$memo(() => !!count_zero())() && !is_selected();
|
|
4144
4174
|
},
|
|
@@ -4342,7 +4372,14 @@ function $e731d52d97444b7c$export$82ed4b28ecb67608({
|
|
|
4342
4372
|
return !!data?.some(item => $91aa8ee9f431800d$export$325f75597868c4f0(item) === value);
|
|
4343
4373
|
});
|
|
4344
4374
|
const value = $9HbP8$createMemo(() => checkbox().value_);
|
|
4345
|
-
const label_text = $9HbP8$createMemo(() =>
|
|
4375
|
+
const label_text = $9HbP8$createMemo(() => {
|
|
4376
|
+
const name = checkbox().name_;
|
|
4377
|
+
if (name) return name;
|
|
4378
|
+
const value_string = value() + "";
|
|
4379
|
+
if (backendFilterV2()) return value_string;
|
|
4380
|
+
// Legacy values are "Name;#hex" - split is used to get the name so that screen readers don't announce the hex code
|
|
4381
|
+
return value_string.split(";")[0] || value_string;
|
|
4382
|
+
});
|
|
4346
4383
|
const count = $9HbP8$createMemo(() => checkbox().count_);
|
|
4347
4384
|
const colorNameDatasetValue = $9HbP8$createMemo(() => {
|
|
4348
4385
|
if (backendFilterV2()) return label_text();
|
|
@@ -4814,7 +4851,7 @@ $9HbP8$delegateEvents(["input", "click"]);
|
|
|
4814
4851
|
var $fab07f52c9861732$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=filter-collapsible>`),
|
|
4815
4852
|
$fab07f52c9861732$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<button class=clear-group><!$><!/><span>`),
|
|
4816
4853
|
$fab07f52c9861732$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=view-more-clear><!$><!/><!$><!/>`),
|
|
4817
|
-
$fab07f52c9861732$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class=filter-collapsible-body><
|
|
4854
|
+
$fab07f52c9861732$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class=filter-collapsible-body><fieldset class=filter-part><!$><!/><!$><!/></fieldset><!$><!/>`),
|
|
4818
4855
|
$fab07f52c9861732$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<details class=filter-collapsible>`),
|
|
4819
4856
|
$fab07f52c9861732$var$_tmpl$6 = /*#__PURE__*/$9HbP8$template(`<summary class=filter-group-summary><div class=summary><span></span><div class=selected-w-sign><!$><!/><!$><!/>`),
|
|
4820
4857
|
$fab07f52c9861732$var$_tmpl$7 = /*#__PURE__*/$9HbP8$template(`<div class=ungrouped>`),
|
|
@@ -4904,6 +4941,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
4904
4941
|
const a_filter_is_selected = $9HbP8$createMemo(() => selected_filters_in_group().size);
|
|
4905
4942
|
const [get_details_width, set_get_details_width] = $9HbP8$createSignal();
|
|
4906
4943
|
const details_element_width_ = $9HbP8$createMemo(() => get_details_width?.()?.());
|
|
4944
|
+
const title_id = $9HbP8$make_random_classname();
|
|
4907
4945
|
return $9HbP8$createComponent((0, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d), {
|
|
4908
4946
|
is_open_: is_open,
|
|
4909
4947
|
get details_() {
|
|
@@ -4924,6 +4962,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
4924
4962
|
[_el$25, _co$7] = $9HbP8$getNextMarker(_el$24.nextSibling),
|
|
4925
4963
|
_el$26 = _el$25.nextSibling,
|
|
4926
4964
|
[_el$27, _co$8] = $9HbP8$getNextMarker(_el$26.nextSibling);
|
|
4965
|
+
$9HbP8$setAttribute(_el$22, "id", title_id);
|
|
4927
4966
|
$9HbP8$insert(_el$22, section_);
|
|
4928
4967
|
$9HbP8$insert(_el$23, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
4929
4968
|
get when() {
|
|
@@ -4958,6 +4997,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
|
|
|
4958
4997
|
[_el$7, _co$2] = $9HbP8$getNextMarker(_el$6.nextSibling),
|
|
4959
4998
|
_el$17 = _el$3.nextSibling,
|
|
4960
4999
|
[_el$18, _co$6] = $9HbP8$getNextMarker(_el$17.nextSibling);
|
|
5000
|
+
$9HbP8$setAttribute(_el$3, "aria-labelledby", title_id);
|
|
4961
5001
|
$9HbP8$insert(_el$3, $9HbP8$createComponent(SearchThisFilterGroup_, {}), _el$5, _co$);
|
|
4962
5002
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $9HbP8$Index), {
|
|
4963
5003
|
get each() {
|
|
@@ -7480,7 +7520,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
|
7480
7520
|
})));
|
|
7481
7521
|
return container;
|
|
7482
7522
|
}
|
|
7483
|
-
const $70bb27cc6be01fc7$var$
|
|
7523
|
+
const $70bb27cc6be01fc7$var$defaultCustomUrls = (url, width) => {
|
|
7484
7524
|
if (url?.startsWith?.("https://cdn.shopify.com"))
|
|
7485
7525
|
// 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,
|
|
7486
7526
|
// 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.
|
|
@@ -7489,18 +7529,21 @@ const $70bb27cc6be01fc7$var$customUrls = (url, width) => {
|
|
|
7489
7529
|
return `https://app.depict.ai/cdn-cgi/image/width=${width},format=auto/${url}`;
|
|
7490
7530
|
};
|
|
7491
7531
|
function $70bb27cc6be01fc7$export$9d4a4b669b1929ab(props) {
|
|
7532
|
+
const resolvedCustomUrls = props.imageResizer_ ?? $70bb27cc6be01fc7$var$defaultCustomUrls;
|
|
7492
7533
|
return $9HbP8$createComponent((0, $660070e2a394b3c3$export$e4b984597b71e989), $9HbP8$mergeProps1(props, {
|
|
7493
7534
|
get imgProps() {
|
|
7494
7535
|
return {
|
|
7495
7536
|
...props.imgProps,
|
|
7496
|
-
customUrls:
|
|
7537
|
+
customUrls: resolvedCustomUrls
|
|
7497
7538
|
};
|
|
7498
7539
|
}
|
|
7499
7540
|
}));
|
|
7500
7541
|
}
|
|
7501
7542
|
function $70bb27cc6be01fc7$export$140423fa4bfb6d63(props) {
|
|
7502
7543
|
return $9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), $9HbP8$mergeProps1(props, {
|
|
7503
|
-
customUrls
|
|
7544
|
+
get customUrls() {
|
|
7545
|
+
return props.imageResizer_ ?? $70bb27cc6be01fc7$var$defaultCustomUrls;
|
|
7546
|
+
}
|
|
7504
7547
|
}));
|
|
7505
7548
|
}
|
|
7506
7549
|
let $e422ea9eccb7892b$var$cachedHlsModule;
|
|
@@ -7525,7 +7568,8 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7525
7568
|
router_: router_,
|
|
7526
7569
|
setAspectRatioWas_: setAspectRatioWas_,
|
|
7527
7570
|
mediaUrl_: mediaUrl_,
|
|
7528
|
-
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_
|
|
7571
|
+
aspectRatioWhenAloneInRow_: aspectRatioWhenAloneInRow_,
|
|
7572
|
+
imageResizer_: imageResizer_
|
|
7529
7573
|
}) {
|
|
7530
7574
|
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
|
|
7531
7575
|
const [wrapperSize, setWrapperSize] = $9HbP8$createSignal();
|
|
@@ -7575,7 +7619,8 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7575
7619
|
src: mediaUrl_,
|
|
7576
7620
|
"class": "d-standard-content",
|
|
7577
7621
|
onDecoded: () => setHasLoaded(true),
|
|
7578
|
-
ref: el => el.addEventListener("load", $9HbP8$catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight)))
|
|
7622
|
+
ref: el => el.addEventListener("load", $9HbP8$catchify(() => setAspectRatio(el.naturalWidth / el.naturalHeight))),
|
|
7623
|
+
imageResizer_: imageResizer_
|
|
7579
7624
|
});
|
|
7580
7625
|
}
|
|
7581
7626
|
}), $9HbP8$createComponent((0, $9HbP8$Match), {
|
|
@@ -7626,7 +7671,7 @@ function $f916989c4b1be9f7$export$780a853d15174484({
|
|
|
7626
7671
|
}
|
|
7627
7672
|
}));
|
|
7628
7673
|
}
|
|
7629
|
-
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_) {
|
|
7674
|
+
function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, products_request_loading_, imageResizer_) {
|
|
7630
7675
|
let hasSeenContentBlock = false;
|
|
7631
7676
|
const [historyContentBlocks, setHistoryContentBlocks] = history_content_blocks_;
|
|
7632
7677
|
const contentComponents = new Map();
|
|
@@ -7681,7 +7726,8 @@ function $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_
|
|
|
7681
7726
|
...prev.aspectRatios,
|
|
7682
7727
|
[componentCacheKey]: Math.round(aspectRatio * 100) / 100
|
|
7683
7728
|
}
|
|
7684
|
-
}))
|
|
7729
|
+
})),
|
|
7730
|
+
imageResizer_: imageResizer_
|
|
7685
7731
|
});
|
|
7686
7732
|
contentComponents.set(componentCacheKey, component);
|
|
7687
7733
|
}
|
|
@@ -7743,7 +7789,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
7743
7789
|
filterModalParent_: filterModalParent_,
|
|
7744
7790
|
showSliderArrow_: showSliderArrow_,
|
|
7745
7791
|
hideCount0FilterOptions_: hideCount0FilterOptions_,
|
|
7746
|
-
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_
|
|
7792
|
+
switchToFiltersDrawerBreakpoint_: switchToFiltersDrawerBreakpoint_,
|
|
7793
|
+
imageResizer_: imageResizer_
|
|
7747
7794
|
}) {
|
|
7748
7795
|
let results_for;
|
|
7749
7796
|
let only_show_filters_opener_;
|
|
@@ -7839,7 +7886,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
7839
7886
|
setMetaRequestsForQuery(prev => prev.set(query.id_type_ + query.id_to_query_for_, listing));
|
|
7840
7887
|
return result;
|
|
7841
7888
|
}));
|
|
7842
|
-
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading);
|
|
7889
|
+
const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_, () => plp_products_.loading, imageResizer_);
|
|
7843
7890
|
const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
|
|
7844
7891
|
const available_sortings_ = $9HbP8$createMemo(() => plp_products_()?.sorts?.map(sort => ({
|
|
7845
7892
|
...sort,
|
|
@@ -8391,7 +8438,8 @@ function $08a49ecdcd5beaca$export$b73ed90f0ee50dc3({
|
|
|
8391
8438
|
outerRef_: outerRef_,
|
|
8392
8439
|
animationDuration_: animationDuration_,
|
|
8393
8440
|
priceFormatting_: priceFormatting_,
|
|
8394
|
-
pseudoRouter_: pseudoRouter_
|
|
8441
|
+
pseudoRouter_: pseudoRouter_,
|
|
8442
|
+
imageResizer_: imageResizer_
|
|
8395
8443
|
}) {
|
|
8396
8444
|
const variantToUse = $9HbP8$createMemo(() => {
|
|
8397
8445
|
const display = display_();
|
|
@@ -8465,7 +8513,8 @@ function $08a49ecdcd5beaca$export$b73ed90f0ee50dc3({
|
|
|
8465
8513
|
},
|
|
8466
8514
|
imgProps: {
|
|
8467
8515
|
keyRatioUpdating: true
|
|
8468
|
-
}
|
|
8516
|
+
},
|
|
8517
|
+
imageResizer_: imageResizer_
|
|
8469
8518
|
});
|
|
8470
8519
|
}
|
|
8471
8520
|
}));
|
|
@@ -8666,7 +8715,8 @@ function $11fb4b33b36ecfac$export$ebf0b1d4f90c09ae({
|
|
|
8666
8715
|
supportsHover_: supportsHover_,
|
|
8667
8716
|
priceFormatting_: priceFormatting_,
|
|
8668
8717
|
pseudoRouter_: pseudoRouter_,
|
|
8669
|
-
containerHeight_: containerHeight_
|
|
8718
|
+
containerHeight_: containerHeight_,
|
|
8719
|
+
imageResizer_: imageResizer_
|
|
8670
8720
|
}) {
|
|
8671
8721
|
let isAffectedByChromeBug = false;
|
|
8672
8722
|
// If the user requests the drawer to be expanded or not
|
|
@@ -8731,6 +8781,7 @@ function $11fb4b33b36ecfac$export$ebf0b1d4f90c09ae({
|
|
|
8731
8781
|
userWantsExpandedSignal_: userWantsExpandedSignal_,
|
|
8732
8782
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
8733
8783
|
priceFormatting_: priceFormatting_,
|
|
8784
|
+
imageResizer_: imageResizer_,
|
|
8734
8785
|
outerRef_: el => $9HbP8$createEffect(() => {
|
|
8735
8786
|
if (index !== 0) return;
|
|
8736
8787
|
const resizeObserver = new ResizeObserver($9HbP8$catchify1(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -8789,7 +8840,8 @@ function $e9d1d09be9e6471e$export$44809a8a3e867e30({
|
|
|
8789
8840
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
8790
8841
|
animationDuration_: animationDuration_,
|
|
8791
8842
|
priceFormatting_: priceFormatting_,
|
|
8792
|
-
pseudoRouter_: pseudoRouter_
|
|
8843
|
+
pseudoRouter_: pseudoRouter_,
|
|
8844
|
+
imageResizer_: imageResizer_
|
|
8793
8845
|
}) {
|
|
8794
8846
|
let container;
|
|
8795
8847
|
const useWantsExpandedSignal_ = $9HbP8$createSignal(false);
|
|
@@ -8876,7 +8928,8 @@ function $e9d1d09be9e6471e$export$44809a8a3e867e30({
|
|
|
8876
8928
|
return display_()?.image_urls?.[0];
|
|
8877
8929
|
},
|
|
8878
8930
|
aspectRatio: placeholderImageAspectRatio_,
|
|
8879
|
-
autoAdjustAspectRatio: true
|
|
8931
|
+
autoAdjustAspectRatio: true,
|
|
8932
|
+
imageResizer_: imageResizer_
|
|
8880
8933
|
});
|
|
8881
8934
|
}
|
|
8882
8935
|
}), _el$3, _co$);
|
|
@@ -8889,7 +8942,8 @@ function $e9d1d09be9e6471e$export$44809a8a3e867e30({
|
|
|
8889
8942
|
FavoriteButton_: FavoriteButton_,
|
|
8890
8943
|
priceFormatting_: priceFormatting_,
|
|
8891
8944
|
pseudoRouter_: pseudoRouter_,
|
|
8892
|
-
containerHeight_: containerHeight_
|
|
8945
|
+
containerHeight_: containerHeight_,
|
|
8946
|
+
imageResizer_: imageResizer_
|
|
8893
8947
|
}), _el$5, _co$2);
|
|
8894
8948
|
$9HbP8$effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
8895
8949
|
$9HbP8$runHydrationEvents();
|
|
@@ -9149,7 +9203,8 @@ function $07ef910e8ef6b783$export$2c9f9bf2092486aa(props) {
|
|
|
9149
9203
|
animationDuration_: expandingAnimationDuration,
|
|
9150
9204
|
expandedLooksSignal_: $07ef910e8ef6b783$var$expandedLooksSignal_,
|
|
9151
9205
|
priceFormatting_: () => props.priceFormatting_,
|
|
9152
|
-
pseudoRouter_: pseudoRouter
|
|
9206
|
+
pseudoRouter_: pseudoRouter,
|
|
9207
|
+
imageResizer_: props.imageResizer_
|
|
9153
9208
|
}),
|
|
9154
9209
|
recommendations_resource_: looksResource,
|
|
9155
9210
|
title_: () => props.title_,
|
|
@@ -11032,7 +11087,8 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
|
|
|
11032
11087
|
merchant_: merchant_,
|
|
11033
11088
|
keyboardNavigationGroupIndex_: keyboardNavigationGroupIndex_,
|
|
11034
11089
|
index_: index_,
|
|
11035
|
-
selected_index_: [read_selected_index_, write_selected_index_]
|
|
11090
|
+
selected_index_: [read_selected_index_, write_selected_index_],
|
|
11091
|
+
imageResizer_: imageResizer_
|
|
11036
11092
|
}) {
|
|
11037
11093
|
const href = $9HbP8$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
|
|
11038
11094
|
const LinkToListing = props => (() => {
|
|
@@ -11088,7 +11144,8 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
|
|
|
11088
11144
|
get children() {
|
|
11089
11145
|
var _el$3 = $9HbP8$getNextElement($4ce5b8892775b62d$var$_tmpl$2);
|
|
11090
11146
|
$9HbP8$insert(_el$3, $9HbP8$createComponent($4ce5b8892775b62d$export$ea41102db9bd68c3, {
|
|
11091
|
-
image_urls_: image_urls
|
|
11147
|
+
image_urls_: image_urls,
|
|
11148
|
+
imageResizer_: imageResizer_
|
|
11092
11149
|
}));
|
|
11093
11150
|
return _el$3;
|
|
11094
11151
|
}
|
|
@@ -11131,7 +11188,8 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
|
|
|
11131
11188
|
})();
|
|
11132
11189
|
}
|
|
11133
11190
|
function $4ce5b8892775b62d$export$ea41102db9bd68c3({
|
|
11134
|
-
image_urls_: image_urls_
|
|
11191
|
+
image_urls_: image_urls_,
|
|
11192
|
+
imageResizer_: imageResizer_
|
|
11135
11193
|
}) {
|
|
11136
11194
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
11137
11195
|
get when() {
|
|
@@ -11154,7 +11212,8 @@ function $4ce5b8892775b62d$export$ea41102db9bd68c3({
|
|
|
11154
11212
|
},
|
|
11155
11213
|
imgProps: {
|
|
11156
11214
|
style: "object-fit: cover;"
|
|
11157
|
-
}
|
|
11215
|
+
},
|
|
11216
|
+
imageResizer_: imageResizer_
|
|
11158
11217
|
})
|
|
11159
11218
|
});
|
|
11160
11219
|
}
|
|
@@ -11184,7 +11243,8 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
11184
11243
|
selected_index_: selected_index_,
|
|
11185
11244
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
11186
11245
|
showPlaceholders_: showPlaceholders_,
|
|
11187
|
-
currently_showing_suggestions_: [, set_currently_showing_suggestions]
|
|
11246
|
+
currently_showing_suggestions_: [, set_currently_showing_suggestions],
|
|
11247
|
+
imageResizer_: imageResizer_
|
|
11188
11248
|
}) {
|
|
11189
11249
|
const listings_by_id = $9HbP8$createMemo(() => Object.fromEntries((listing_suggestions_() || []).map(listing => [listing.listing_id, listing])));
|
|
11190
11250
|
const productCards = $9HbP8$createComponent((0, $9HbP8$For), {
|
|
@@ -11202,7 +11262,8 @@ function $44f30a4222ce604b$export$c8d7e00464029b45({
|
|
|
11202
11262
|
merchant_: merchant_,
|
|
11203
11263
|
keyboardNavigationGroupIndex_: itemIndex_,
|
|
11204
11264
|
index_: index,
|
|
11205
|
-
selected_index_: selected_index_
|
|
11265
|
+
selected_index_: selected_index_,
|
|
11266
|
+
imageResizer_: imageResizer_
|
|
11206
11267
|
});
|
|
11207
11268
|
}
|
|
11208
11269
|
});
|
|
@@ -11584,7 +11645,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
11584
11645
|
sorting_query_param_: sorting_query_param_,
|
|
11585
11646
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
11586
11647
|
setSearchFieldOuterWidth_: setSearchFieldOuterWidth_,
|
|
11587
|
-
forceUseDiv_: forceUseDiv_
|
|
11648
|
+
forceUseDiv_: forceUseDiv_,
|
|
11649
|
+
imageResizer_: imageResizer_
|
|
11588
11650
|
}) {
|
|
11589
11651
|
let on_enter_in_search_field_function;
|
|
11590
11652
|
let listingSuggestionsDebounceTimeout;
|
|
@@ -11795,7 +11857,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
11795
11857
|
},
|
|
11796
11858
|
imgProps: {
|
|
11797
11859
|
alt: "Product image"
|
|
11798
|
-
}
|
|
11860
|
+
},
|
|
11861
|
+
imageResizer_: imageResizer_
|
|
11799
11862
|
}),
|
|
11800
11863
|
...instant_results_options_
|
|
11801
11864
|
}), _el$4, _co$);
|
|
@@ -11826,7 +11889,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
11826
11889
|
selected_index_: selected_index_,
|
|
11827
11890
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
11828
11891
|
modalLayoutStacked_: modalLayoutStacked_,
|
|
11829
|
-
showPlaceholders_: () => !suggestions_response_.latest
|
|
11892
|
+
showPlaceholders_: () => !suggestions_response_.latest,
|
|
11893
|
+
imageResizer_: imageResizer_
|
|
11830
11894
|
});
|
|
11831
11895
|
}
|
|
11832
11896
|
});
|
|
@@ -14924,6 +14988,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
14924
14988
|
display_transformers: display_transformers,
|
|
14925
14989
|
api: api,
|
|
14926
14990
|
searchModalComponent: searchModalComponent,
|
|
14991
|
+
imageResizer_: imageResizer_,
|
|
14927
14992
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
14928
14993
|
disable_scrolling_during_modal = true,
|
|
14929
14994
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
@@ -15054,6 +15119,7 @@ class $806c97b931758897$export$ac6237957a15b3f0 {
|
|
|
15054
15119
|
},
|
|
15055
15120
|
i18n_: i18n_,
|
|
15056
15121
|
enable_category_suggestions_: enable_category_suggestions,
|
|
15122
|
+
imageResizer_: imageResizer_,
|
|
15057
15123
|
disable_scrolling_: disable_scrolling_during_modal,
|
|
15058
15124
|
bottom_distance_under_modal_: bottom_distance_under_modal
|
|
15059
15125
|
}, override_modal_element);
|
|
@@ -15837,7 +15903,8 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
|
|
|
15837
15903
|
product_card_template_: product_card_template,
|
|
15838
15904
|
sorting_query_param_: sorting_query_param_,
|
|
15839
15905
|
filter_query_param_prefix_: filter_query_param_prefix_,
|
|
15840
|
-
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_
|
|
15906
|
+
switchToFiltersDrawerBreakpoint_: () => props.switchToFiltersDrawerBreakpoint_,
|
|
15907
|
+
imageResizer_: props.imageResizer_
|
|
15841
15908
|
});
|
|
15842
15909
|
}, "Entire CategoryPage failed");
|
|
15843
15910
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.13",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
|
@@ -236,9 +236,9 @@
|
|
|
236
236
|
"@babel/plugin-transform-typescript": "^7.22.9",
|
|
237
237
|
"@babel/runtime": "latest",
|
|
238
238
|
"@babel/runtime-corejs3": "^7.22.6",
|
|
239
|
-
"@depict-ai/plp-styling": "^4.6.
|
|
240
|
-
"@depict-ai/types": "^5.6.
|
|
241
|
-
"@depict-ai/utilishared": "^2.6.
|
|
239
|
+
"@depict-ai/plp-styling": "^4.6.5",
|
|
240
|
+
"@depict-ai/types": "^5.6.3",
|
|
241
|
+
"@depict-ai/utilishared": "^2.6.3",
|
|
242
242
|
"solid-js": "^1.9.10"
|
|
243
243
|
},
|
|
244
244
|
"type": "module",
|