@depict-ai/ui 1.4.5 → 1.4.6
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 +40 -32
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +40 -32
- package/latest/index.cjs +40 -32
- package/latest/index.d.ts +1 -1
- package/latest/index.js +40 -32
- package/package.json +1 -1
- package/server/ES10/index.cjs +40 -32
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +40 -32
- package/server/latest/index.cjs +40 -32
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +40 -32
package/ES10/index.cjs
CHANGED
|
@@ -60,7 +60,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
60
60
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
61
61
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
62
62
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
63
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.6";
|
|
64
64
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
65
65
|
const {
|
|
66
66
|
collapse: collapse,
|
|
@@ -3069,6 +3069,43 @@ function $367b536a2a94d24e$var$history_state_change(signals, entries, state) {
|
|
|
3069
3069
|
}
|
|
3070
3070
|
});
|
|
3071
3071
|
}
|
|
3072
|
+
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
3073
|
+
let $cfcd56242923775d$var$has_ran = false;
|
|
3074
|
+
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
3075
|
+
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
3076
|
+
$cfcd56242923775d$var$has_ran = true;
|
|
3077
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
3078
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
3079
|
+
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
3083
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
3084
|
+
apply(target, this_arg, arg_list) {
|
|
3085
|
+
try {
|
|
3086
|
+
if (typeof arg_list[0] == "object") {
|
|
3087
|
+
const cloned_object = {
|
|
3088
|
+
...arg_list[0]
|
|
3089
|
+
};
|
|
3090
|
+
const old_state = history.state;
|
|
3091
|
+
for (const key in old_state) {
|
|
3092
|
+
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
3093
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3094
|
+
}
|
|
3095
|
+
arg_list[0] = cloned_object;
|
|
3096
|
+
}
|
|
3097
|
+
} catch (e) {
|
|
3098
|
+
(0, $52FdA$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
3099
|
+
}
|
|
3100
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
3101
|
+
}
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
3105
|
+
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
3106
|
+
if (key.startsWith(prefix)) return true;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3072
3109
|
function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
3073
3110
|
let {
|
|
3074
3111
|
get_default_values_: get_default_values_,
|
|
@@ -3095,6 +3132,8 @@ function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
|
3095
3132
|
let [key, value] = _ref3;
|
|
3096
3133
|
return [key.slice(prefix_.length), value];
|
|
3097
3134
|
}));
|
|
3135
|
+
(0, $cfcd56242923775d$export$3064e1e8c6513da3).add(prefix_);
|
|
3136
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
3098
3137
|
return [reset_state, unprefixed_state];
|
|
3099
3138
|
}
|
|
3100
3139
|
|
|
@@ -6406,37 +6445,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6406
6445
|
return _el$13;
|
|
6407
6446
|
})()];
|
|
6408
6447
|
}
|
|
6409
|
-
let $cfcd56242923775d$var$has_ran = false;
|
|
6410
|
-
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
6411
|
-
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
6412
|
-
$cfcd56242923775d$var$has_ran = true;
|
|
6413
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
6414
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
6415
|
-
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
6416
|
-
}
|
|
6417
|
-
}
|
|
6418
|
-
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
6419
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
6420
|
-
apply(target, this_arg, arg_list) {
|
|
6421
|
-
try {
|
|
6422
|
-
if (typeof arg_list[0] == "object") {
|
|
6423
|
-
const cloned_object = {
|
|
6424
|
-
...arg_list[0]
|
|
6425
|
-
};
|
|
6426
|
-
const old_state = history.state;
|
|
6427
|
-
for (const key in old_state) {
|
|
6428
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
6429
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
6430
|
-
}
|
|
6431
|
-
arg_list[0] = cloned_object;
|
|
6432
|
-
}
|
|
6433
|
-
} catch (e) {
|
|
6434
|
-
(0, $52FdA$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
6435
|
-
}
|
|
6436
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
6437
|
-
}
|
|
6438
|
-
});
|
|
6439
|
-
}
|
|
6440
6448
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
6441
6449
|
const cols_at_size = [];
|
|
6442
6450
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.6";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
package/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.6";
|
|
12
12
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
13
13
|
const {
|
|
14
14
|
collapse: collapse,
|
|
@@ -3017,6 +3017,43 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
3017
3017
|
}
|
|
3018
3018
|
});
|
|
3019
3019
|
}
|
|
3020
|
+
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
3021
|
+
let $68e6625c8d51f847$var$has_ran = false;
|
|
3022
|
+
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
3023
|
+
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
3024
|
+
$68e6625c8d51f847$var$has_ran = true;
|
|
3025
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
3026
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
3027
|
+
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
3031
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
3032
|
+
apply(target, this_arg, arg_list) {
|
|
3033
|
+
try {
|
|
3034
|
+
if (typeof arg_list[0] == "object") {
|
|
3035
|
+
const cloned_object = {
|
|
3036
|
+
...arg_list[0]
|
|
3037
|
+
};
|
|
3038
|
+
const old_state = history.state;
|
|
3039
|
+
for (const key in old_state) {
|
|
3040
|
+
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
3041
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3042
|
+
}
|
|
3043
|
+
arg_list[0] = cloned_object;
|
|
3044
|
+
}
|
|
3045
|
+
} catch (e) {
|
|
3046
|
+
(0, $8tj43$report)([e, "Failed to preserve items in history.state"], "error");
|
|
3047
|
+
}
|
|
3048
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
3049
|
+
}
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
3053
|
+
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
3054
|
+
if (key.startsWith(prefix)) return true;
|
|
3055
|
+
}
|
|
3056
|
+
}
|
|
3020
3057
|
function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
3021
3058
|
let {
|
|
3022
3059
|
get_default_values_: get_default_values_,
|
|
@@ -3043,6 +3080,8 @@ function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
|
3043
3080
|
let [key, value] = _ref3;
|
|
3044
3081
|
return [key.slice(prefix_.length), value];
|
|
3045
3082
|
}));
|
|
3083
|
+
(0, $68e6625c8d51f847$export$3064e1e8c6513da3).add(prefix_);
|
|
3084
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
3046
3085
|
return [reset_state, unprefixed_state];
|
|
3047
3086
|
}
|
|
3048
3087
|
|
|
@@ -6354,37 +6393,6 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6354
6393
|
return _el$13;
|
|
6355
6394
|
})()];
|
|
6356
6395
|
}
|
|
6357
|
-
let $68e6625c8d51f847$var$has_ran = false;
|
|
6358
|
-
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
6359
|
-
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
6360
|
-
$68e6625c8d51f847$var$has_ran = true;
|
|
6361
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
6362
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
6363
|
-
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
6364
|
-
}
|
|
6365
|
-
}
|
|
6366
|
-
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
6367
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
6368
|
-
apply(target, this_arg, arg_list) {
|
|
6369
|
-
try {
|
|
6370
|
-
if (typeof arg_list[0] == "object") {
|
|
6371
|
-
const cloned_object = {
|
|
6372
|
-
...arg_list[0]
|
|
6373
|
-
};
|
|
6374
|
-
const old_state = history.state;
|
|
6375
|
-
for (const key in old_state) {
|
|
6376
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
6377
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
6378
|
-
}
|
|
6379
|
-
arg_list[0] = cloned_object;
|
|
6380
|
-
}
|
|
6381
|
-
} catch (e) {
|
|
6382
|
-
(0, $8tj43$report)([e, "Failed to preserve items in history.state"], "error");
|
|
6383
|
-
}
|
|
6384
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
6385
|
-
}
|
|
6386
|
-
});
|
|
6387
|
-
}
|
|
6388
6396
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
6389
6397
|
const cols_at_size = [];
|
|
6390
6398
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/latest/index.cjs
CHANGED
|
@@ -54,7 +54,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
54
54
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
55
55
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
56
56
|
/*! Depict.ai search and product listing SDK */
|
|
57
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.
|
|
57
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.6";
|
|
58
58
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
59
59
|
const {
|
|
60
60
|
collapse: collapse,
|
|
@@ -2859,6 +2859,43 @@ function $6e22b5314fb52f4c$var$history_state_change(signals, entries, state) {
|
|
|
2859
2859
|
}
|
|
2860
2860
|
});
|
|
2861
2861
|
}
|
|
2862
|
+
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
2863
|
+
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
2864
|
+
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
2865
|
+
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
2866
|
+
$d84fe647b84b5dc5$var$has_ran = true;
|
|
2867
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2868
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
2869
|
+
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
2873
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2874
|
+
apply(target, this_arg, arg_list) {
|
|
2875
|
+
try {
|
|
2876
|
+
if (typeof arg_list[0] == "object") {
|
|
2877
|
+
const cloned_object = {
|
|
2878
|
+
...arg_list[0]
|
|
2879
|
+
};
|
|
2880
|
+
const old_state = history.state;
|
|
2881
|
+
for (const key in old_state) {
|
|
2882
|
+
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
2883
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2884
|
+
}
|
|
2885
|
+
arg_list[0] = cloned_object;
|
|
2886
|
+
}
|
|
2887
|
+
} catch (e) {
|
|
2888
|
+
(0, $gVhhF$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
2889
|
+
}
|
|
2890
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2891
|
+
}
|
|
2892
|
+
});
|
|
2893
|
+
}
|
|
2894
|
+
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
2895
|
+
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
2896
|
+
if (key.startsWith(prefix)) return true;
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2862
2899
|
function $26a56f6b44703084$export$9862539c89138352({
|
|
2863
2900
|
get_default_values_: get_default_values_,
|
|
2864
2901
|
router_: router_,
|
|
@@ -2878,6 +2915,8 @@ function $26a56f6b44703084$export$9862539c89138352({
|
|
|
2878
2915
|
};
|
|
2879
2916
|
let unprefixed_state;
|
|
2880
2917
|
unprefixed_state = Object.fromEntries(Object.entries(prefixed_state).map(([key, value]) => [key.slice(prefix_.length), value]));
|
|
2918
|
+
(0, $d84fe647b84b5dc5$export$3064e1e8c6513da3).add(prefix_);
|
|
2919
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2881
2920
|
return [reset_state, unprefixed_state];
|
|
2882
2921
|
}
|
|
2883
2922
|
|
|
@@ -5960,37 +5999,6 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
5960
5999
|
return _el$13;
|
|
5961
6000
|
})()];
|
|
5962
6001
|
}
|
|
5963
|
-
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
5964
|
-
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
5965
|
-
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
5966
|
-
$d84fe647b84b5dc5$var$has_ran = true;
|
|
5967
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
5968
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
5969
|
-
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
5970
|
-
}
|
|
5971
|
-
}
|
|
5972
|
-
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
5973
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
5974
|
-
apply(target, this_arg, arg_list) {
|
|
5975
|
-
try {
|
|
5976
|
-
if (typeof arg_list[0] == "object") {
|
|
5977
|
-
const cloned_object = {
|
|
5978
|
-
...arg_list[0]
|
|
5979
|
-
};
|
|
5980
|
-
const old_state = history.state;
|
|
5981
|
-
for (const key in old_state) {
|
|
5982
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
5983
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
5984
|
-
}
|
|
5985
|
-
arg_list[0] = cloned_object;
|
|
5986
|
-
}
|
|
5987
|
-
} catch (e) {
|
|
5988
|
-
(0, $gVhhF$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
5989
|
-
}
|
|
5990
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
5991
|
-
}
|
|
5992
|
-
});
|
|
5993
|
-
}
|
|
5994
6002
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
5995
6003
|
const cols_at_size = [];
|
|
5996
6004
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/latest/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.6";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
package/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createSignal as $9HbP8$createSignal, createMemo as $9HbP8$createMemo, u
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.6";
|
|
9
9
|
function $24e27fab9c821b86$export$5bad61ecde080b1f(...params) {
|
|
10
10
|
const {
|
|
11
11
|
collapse: collapse,
|
|
@@ -2810,6 +2810,43 @@ function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
});
|
|
2812
2812
|
}
|
|
2813
|
+
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
2814
|
+
let $90980bd87c9960f9$var$has_ran = false;
|
|
2815
|
+
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
2816
|
+
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
2817
|
+
$90980bd87c9960f9$var$has_ran = true;
|
|
2818
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2819
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
2820
|
+
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
2824
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2825
|
+
apply(target, this_arg, arg_list) {
|
|
2826
|
+
try {
|
|
2827
|
+
if (typeof arg_list[0] == "object") {
|
|
2828
|
+
const cloned_object = {
|
|
2829
|
+
...arg_list[0]
|
|
2830
|
+
};
|
|
2831
|
+
const old_state = history.state;
|
|
2832
|
+
for (const key in old_state) {
|
|
2833
|
+
if (!$90980bd87c9960f9$var$starts_with_any_prefix(key)) continue;
|
|
2834
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2835
|
+
}
|
|
2836
|
+
arg_list[0] = cloned_object;
|
|
2837
|
+
}
|
|
2838
|
+
} catch (e) {
|
|
2839
|
+
(0, $9HbP8$report)([e, "Failed to preserve items in history.state"], "error");
|
|
2840
|
+
}
|
|
2841
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2842
|
+
}
|
|
2843
|
+
});
|
|
2844
|
+
}
|
|
2845
|
+
function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
|
|
2846
|
+
for (const prefix of $90980bd87c9960f9$export$3064e1e8c6513da3) {
|
|
2847
|
+
if (key.startsWith(prefix)) return true;
|
|
2848
|
+
}
|
|
2849
|
+
}
|
|
2813
2850
|
function $a8fa7302d6f93c0b$export$9862539c89138352({
|
|
2814
2851
|
get_default_values_: get_default_values_,
|
|
2815
2852
|
router_: router_,
|
|
@@ -2829,6 +2866,8 @@ function $a8fa7302d6f93c0b$export$9862539c89138352({
|
|
|
2829
2866
|
};
|
|
2830
2867
|
let unprefixed_state;
|
|
2831
2868
|
unprefixed_state = Object.fromEntries(Object.entries(prefixed_state).map(([key, value]) => [key.slice(prefix_.length), value]));
|
|
2869
|
+
(0, $90980bd87c9960f9$export$3064e1e8c6513da3).add(prefix_);
|
|
2870
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2832
2871
|
return [reset_state, unprefixed_state];
|
|
2833
2872
|
}
|
|
2834
2873
|
|
|
@@ -5911,37 +5950,6 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
5911
5950
|
return _el$13;
|
|
5912
5951
|
})()];
|
|
5913
5952
|
}
|
|
5914
|
-
let $90980bd87c9960f9$var$has_ran = false;
|
|
5915
|
-
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
5916
|
-
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
5917
|
-
$90980bd87c9960f9$var$has_ran = true;
|
|
5918
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
5919
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
5920
|
-
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
5921
|
-
}
|
|
5922
|
-
}
|
|
5923
|
-
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
5924
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
5925
|
-
apply(target, this_arg, arg_list) {
|
|
5926
|
-
try {
|
|
5927
|
-
if (typeof arg_list[0] == "object") {
|
|
5928
|
-
const cloned_object = {
|
|
5929
|
-
...arg_list[0]
|
|
5930
|
-
};
|
|
5931
|
-
const old_state = history.state;
|
|
5932
|
-
for (const key in old_state) {
|
|
5933
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
5934
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
5935
|
-
}
|
|
5936
|
-
arg_list[0] = cloned_object;
|
|
5937
|
-
}
|
|
5938
|
-
} catch (e) {
|
|
5939
|
-
(0, $9HbP8$report)([e, "Failed to preserve items in history.state"], "error");
|
|
5940
|
-
}
|
|
5941
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
5942
|
-
}
|
|
5943
|
-
});
|
|
5944
|
-
}
|
|
5945
5953
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
5946
5954
|
const cols_at_size = [];
|
|
5947
5955
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.6",
|
|
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",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -60,7 +60,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
60
60
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
61
61
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
62
62
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
63
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.6";
|
|
64
64
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
65
65
|
const {
|
|
66
66
|
collapse: collapse,
|
|
@@ -2257,6 +2257,43 @@ function $367b536a2a94d24e$var$history_state_change(signals, entries, state) {
|
|
|
2257
2257
|
}
|
|
2258
2258
|
});
|
|
2259
2259
|
}
|
|
2260
|
+
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
2261
|
+
let $cfcd56242923775d$var$has_ran = false;
|
|
2262
|
+
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
2263
|
+
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
2264
|
+
$cfcd56242923775d$var$has_ran = true;
|
|
2265
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2266
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
2267
|
+
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
2268
|
+
}
|
|
2269
|
+
}
|
|
2270
|
+
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
2271
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2272
|
+
apply(target, this_arg, arg_list) {
|
|
2273
|
+
try {
|
|
2274
|
+
if (typeof arg_list[0] == "object") {
|
|
2275
|
+
const cloned_object = {
|
|
2276
|
+
...arg_list[0]
|
|
2277
|
+
};
|
|
2278
|
+
const old_state = history.state;
|
|
2279
|
+
for (const key in old_state) {
|
|
2280
|
+
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
2281
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2282
|
+
}
|
|
2283
|
+
arg_list[0] = cloned_object;
|
|
2284
|
+
}
|
|
2285
|
+
} catch (e) {
|
|
2286
|
+
(0, $3hooq$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
2287
|
+
}
|
|
2288
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2291
|
+
}
|
|
2292
|
+
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
2293
|
+
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
2294
|
+
if (key.startsWith(prefix)) return true;
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2260
2297
|
function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
2261
2298
|
let {
|
|
2262
2299
|
get_default_values_: get_default_values_,
|
|
@@ -2283,6 +2320,8 @@ function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
|
2283
2320
|
let [key, value] = _ref3;
|
|
2284
2321
|
return [key.slice(prefix_.length), value];
|
|
2285
2322
|
}));
|
|
2323
|
+
(0, $cfcd56242923775d$export$3064e1e8c6513da3).add(prefix_);
|
|
2324
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2286
2325
|
return [reset_state, unprefixed_state];
|
|
2287
2326
|
}
|
|
2288
2327
|
|
|
@@ -5131,37 +5170,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
5131
5170
|
}
|
|
5132
5171
|
})))];
|
|
5133
5172
|
}
|
|
5134
|
-
let $cfcd56242923775d$var$has_ran = false;
|
|
5135
|
-
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
5136
|
-
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
5137
|
-
$cfcd56242923775d$var$has_ran = true;
|
|
5138
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
5139
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
5140
|
-
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
5141
|
-
}
|
|
5142
|
-
}
|
|
5143
|
-
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
5144
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
5145
|
-
apply(target, this_arg, arg_list) {
|
|
5146
|
-
try {
|
|
5147
|
-
if (typeof arg_list[0] == "object") {
|
|
5148
|
-
const cloned_object = {
|
|
5149
|
-
...arg_list[0]
|
|
5150
|
-
};
|
|
5151
|
-
const old_state = history.state;
|
|
5152
|
-
for (const key in old_state) {
|
|
5153
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
5154
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
5155
|
-
}
|
|
5156
|
-
arg_list[0] = cloned_object;
|
|
5157
|
-
}
|
|
5158
|
-
} catch (e) {
|
|
5159
|
-
(0, $3hooq$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
5160
|
-
}
|
|
5161
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
5162
|
-
}
|
|
5163
|
-
});
|
|
5164
|
-
}
|
|
5165
5173
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
5166
5174
|
const cols_at_size = [];
|
|
5167
5175
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.6";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
package/server/ES10/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.6";
|
|
12
12
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
13
13
|
const {
|
|
14
14
|
collapse: collapse,
|
|
@@ -2205,6 +2205,43 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
});
|
|
2207
2207
|
}
|
|
2208
|
+
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
2209
|
+
let $68e6625c8d51f847$var$has_ran = false;
|
|
2210
|
+
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
2211
|
+
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
2212
|
+
$68e6625c8d51f847$var$has_ran = true;
|
|
2213
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2214
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
2215
|
+
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2218
|
+
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
2219
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2220
|
+
apply(target, this_arg, arg_list) {
|
|
2221
|
+
try {
|
|
2222
|
+
if (typeof arg_list[0] == "object") {
|
|
2223
|
+
const cloned_object = {
|
|
2224
|
+
...arg_list[0]
|
|
2225
|
+
};
|
|
2226
|
+
const old_state = history.state;
|
|
2227
|
+
for (const key in old_state) {
|
|
2228
|
+
if (!$68e6625c8d51f847$var$starts_with_any_prefix(key)) continue;
|
|
2229
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2230
|
+
}
|
|
2231
|
+
arg_list[0] = cloned_object;
|
|
2232
|
+
}
|
|
2233
|
+
} catch (e) {
|
|
2234
|
+
(0, $b8hua$report)([e, "Failed to preserve items in history.state"], "error");
|
|
2235
|
+
}
|
|
2236
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2237
|
+
}
|
|
2238
|
+
});
|
|
2239
|
+
}
|
|
2240
|
+
function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
2241
|
+
for (const prefix of $68e6625c8d51f847$export$3064e1e8c6513da3) {
|
|
2242
|
+
if (key.startsWith(prefix)) return true;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2208
2245
|
function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
2209
2246
|
let {
|
|
2210
2247
|
get_default_values_: get_default_values_,
|
|
@@ -2231,6 +2268,8 @@ function $bc811d9630f9579b$export$9862539c89138352(_ref) {
|
|
|
2231
2268
|
let [key, value] = _ref3;
|
|
2232
2269
|
return [key.slice(prefix_.length), value];
|
|
2233
2270
|
}));
|
|
2271
|
+
(0, $68e6625c8d51f847$export$3064e1e8c6513da3).add(prefix_);
|
|
2272
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2234
2273
|
return [reset_state, unprefixed_state];
|
|
2235
2274
|
}
|
|
2236
2275
|
|
|
@@ -5079,37 +5118,6 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
5079
5118
|
}
|
|
5080
5119
|
})))];
|
|
5081
5120
|
}
|
|
5082
|
-
let $68e6625c8d51f847$var$has_ran = false;
|
|
5083
|
-
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
5084
|
-
if ($68e6625c8d51f847$var$has_ran || typeof history !== "object") return;
|
|
5085
|
-
$68e6625c8d51f847$var$has_ran = true;
|
|
5086
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
5087
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $68e6625c8d51f847$var$proxy_push_state(function_name, history);
|
|
5088
|
-
$68e6625c8d51f847$var$proxy_push_state(function_name, History.prototype);
|
|
5089
|
-
}
|
|
5090
|
-
}
|
|
5091
|
-
function $68e6625c8d51f847$var$proxy_push_state(function_name, thing) {
|
|
5092
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
5093
|
-
apply(target, this_arg, arg_list) {
|
|
5094
|
-
try {
|
|
5095
|
-
if (typeof arg_list[0] == "object") {
|
|
5096
|
-
const cloned_object = {
|
|
5097
|
-
...arg_list[0]
|
|
5098
|
-
};
|
|
5099
|
-
const old_state = history.state;
|
|
5100
|
-
for (const key in old_state) {
|
|
5101
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
5102
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
5103
|
-
}
|
|
5104
|
-
arg_list[0] = cloned_object;
|
|
5105
|
-
}
|
|
5106
|
-
} catch (e) {
|
|
5107
|
-
(0, $b8hua$report)([e, "Failed to preserve items in history.state"], "error");
|
|
5108
|
-
}
|
|
5109
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
5110
|
-
}
|
|
5111
|
-
});
|
|
5112
|
-
}
|
|
5113
5121
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
5114
5122
|
const cols_at_size = [];
|
|
5115
5123
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/server/latest/index.cjs
CHANGED
|
@@ -54,7 +54,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
54
54
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
55
55
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
56
56
|
/*! Depict.ai search and product listing SDK */
|
|
57
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.
|
|
57
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.6";
|
|
58
58
|
function $4b455f60dadde8b8$export$5bad61ecde080b1f(...params) {
|
|
59
59
|
const {
|
|
60
60
|
collapse: collapse,
|
|
@@ -2081,6 +2081,43 @@ function $6e22b5314fb52f4c$var$history_state_change(signals, entries, state) {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
});
|
|
2083
2083
|
}
|
|
2084
|
+
const $d84fe647b84b5dc5$export$3064e1e8c6513da3 = new Set();
|
|
2085
|
+
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
2086
|
+
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
2087
|
+
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
2088
|
+
$d84fe647b84b5dc5$var$has_ran = true;
|
|
2089
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2090
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
2091
|
+
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
2095
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2096
|
+
apply(target, this_arg, arg_list) {
|
|
2097
|
+
try {
|
|
2098
|
+
if (typeof arg_list[0] == "object") {
|
|
2099
|
+
const cloned_object = {
|
|
2100
|
+
...arg_list[0]
|
|
2101
|
+
};
|
|
2102
|
+
const old_state = history.state;
|
|
2103
|
+
for (const key in old_state) {
|
|
2104
|
+
if (!$d84fe647b84b5dc5$var$starts_with_any_prefix(key)) continue;
|
|
2105
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2106
|
+
}
|
|
2107
|
+
arg_list[0] = cloned_object;
|
|
2108
|
+
}
|
|
2109
|
+
} catch (e) {
|
|
2110
|
+
(0, $5vyXB$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
2111
|
+
}
|
|
2112
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2113
|
+
}
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
function $d84fe647b84b5dc5$var$starts_with_any_prefix(key) {
|
|
2117
|
+
for (const prefix of $d84fe647b84b5dc5$export$3064e1e8c6513da3) {
|
|
2118
|
+
if (key.startsWith(prefix)) return true;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2084
2121
|
function $26a56f6b44703084$export$9862539c89138352({
|
|
2085
2122
|
get_default_values_: get_default_values_,
|
|
2086
2123
|
router_: router_,
|
|
@@ -2100,6 +2137,8 @@ function $26a56f6b44703084$export$9862539c89138352({
|
|
|
2100
2137
|
};
|
|
2101
2138
|
let unprefixed_state;
|
|
2102
2139
|
unprefixed_state = Object.fromEntries(Object.entries(prefixed_state).map(([key, value]) => [key.slice(prefix_.length), value]));
|
|
2140
|
+
(0, $d84fe647b84b5dc5$export$3064e1e8c6513da3).add(prefix_);
|
|
2141
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2103
2142
|
return [reset_state, unprefixed_state];
|
|
2104
2143
|
}
|
|
2105
2144
|
|
|
@@ -4740,37 +4779,6 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
|
|
|
4740
4779
|
}
|
|
4741
4780
|
})))];
|
|
4742
4781
|
}
|
|
4743
|
-
let $d84fe647b84b5dc5$var$has_ran = false;
|
|
4744
|
-
function $d84fe647b84b5dc5$export$5162a71f252e6122() {
|
|
4745
|
-
if ($d84fe647b84b5dc5$var$has_ran || typeof history !== "object") return;
|
|
4746
|
-
$d84fe647b84b5dc5$var$has_ran = true;
|
|
4747
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
4748
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $d84fe647b84b5dc5$var$proxy_push_state(function_name, history);
|
|
4749
|
-
$d84fe647b84b5dc5$var$proxy_push_state(function_name, History.prototype);
|
|
4750
|
-
}
|
|
4751
|
-
}
|
|
4752
|
-
function $d84fe647b84b5dc5$var$proxy_push_state(function_name, thing) {
|
|
4753
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
4754
|
-
apply(target, this_arg, arg_list) {
|
|
4755
|
-
try {
|
|
4756
|
-
if (typeof arg_list[0] == "object") {
|
|
4757
|
-
const cloned_object = {
|
|
4758
|
-
...arg_list[0]
|
|
4759
|
-
};
|
|
4760
|
-
const old_state = history.state;
|
|
4761
|
-
for (const key in old_state) {
|
|
4762
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
4763
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
4764
|
-
}
|
|
4765
|
-
arg_list[0] = cloned_object;
|
|
4766
|
-
}
|
|
4767
|
-
} catch (e) {
|
|
4768
|
-
(0, $5vyXB$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
4769
|
-
}
|
|
4770
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
4771
|
-
}
|
|
4772
|
-
});
|
|
4773
|
-
}
|
|
4774
4782
|
const $4e04be41243c3d80$var$transform_elements = sorted_cols_at_size => {
|
|
4775
4783
|
const cols_at_size = [];
|
|
4776
4784
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
package/server/latest/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "1.4.
|
|
10
|
+
export const version = "1.4.6";
|
|
11
11
|
export function ExpandingDetails(props: {
|
|
12
12
|
details_: HTMLDetailsElement;
|
|
13
13
|
summary_: HTMLElement;
|
package/server/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, u
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "1.4.6";
|
|
9
9
|
function $24e27fab9c821b86$export$5bad61ecde080b1f(...params) {
|
|
10
10
|
const {
|
|
11
11
|
collapse: collapse,
|
|
@@ -2032,6 +2032,43 @@ function $ca6f574bd8772184$var$history_state_change(signals, entries, state) {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
|
+
const $90980bd87c9960f9$export$3064e1e8c6513da3 = new Set();
|
|
2036
|
+
let $90980bd87c9960f9$var$has_ran = false;
|
|
2037
|
+
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
2038
|
+
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
2039
|
+
$90980bd87c9960f9$var$has_ran = true;
|
|
2040
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
2041
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
2042
|
+
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
2046
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
2047
|
+
apply(target, this_arg, arg_list) {
|
|
2048
|
+
try {
|
|
2049
|
+
if (typeof arg_list[0] == "object") {
|
|
2050
|
+
const cloned_object = {
|
|
2051
|
+
...arg_list[0]
|
|
2052
|
+
};
|
|
2053
|
+
const old_state = history.state;
|
|
2054
|
+
for (const key in old_state) {
|
|
2055
|
+
if (!$90980bd87c9960f9$var$starts_with_any_prefix(key)) continue;
|
|
2056
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
2057
|
+
}
|
|
2058
|
+
arg_list[0] = cloned_object;
|
|
2059
|
+
}
|
|
2060
|
+
} catch (e) {
|
|
2061
|
+
(0, $i7OB2$report)([e, "Failed to preserve items in history.state"], "error");
|
|
2062
|
+
}
|
|
2063
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
2064
|
+
}
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
function $90980bd87c9960f9$var$starts_with_any_prefix(key) {
|
|
2068
|
+
for (const prefix of $90980bd87c9960f9$export$3064e1e8c6513da3) {
|
|
2069
|
+
if (key.startsWith(prefix)) return true;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2035
2072
|
function $a8fa7302d6f93c0b$export$9862539c89138352({
|
|
2036
2073
|
get_default_values_: get_default_values_,
|
|
2037
2074
|
router_: router_,
|
|
@@ -2051,6 +2088,8 @@ function $a8fa7302d6f93c0b$export$9862539c89138352({
|
|
|
2051
2088
|
};
|
|
2052
2089
|
let unprefixed_state;
|
|
2053
2090
|
unprefixed_state = Object.fromEntries(Object.entries(prefixed_state).map(([key, value]) => [key.slice(prefix_.length), value]));
|
|
2091
|
+
(0, $90980bd87c9960f9$export$3064e1e8c6513da3).add(prefix_);
|
|
2092
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
2054
2093
|
return [reset_state, unprefixed_state];
|
|
2055
2094
|
}
|
|
2056
2095
|
|
|
@@ -4691,37 +4730,6 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
4691
4730
|
}
|
|
4692
4731
|
})))];
|
|
4693
4732
|
}
|
|
4694
|
-
let $90980bd87c9960f9$var$has_ran = false;
|
|
4695
|
-
function $90980bd87c9960f9$export$5162a71f252e6122() {
|
|
4696
|
-
if ($90980bd87c9960f9$var$has_ran || typeof history !== "object") return;
|
|
4697
|
-
$90980bd87c9960f9$var$has_ran = true;
|
|
4698
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
4699
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $90980bd87c9960f9$var$proxy_push_state(function_name, history);
|
|
4700
|
-
$90980bd87c9960f9$var$proxy_push_state(function_name, History.prototype);
|
|
4701
|
-
}
|
|
4702
|
-
}
|
|
4703
|
-
function $90980bd87c9960f9$var$proxy_push_state(function_name, thing) {
|
|
4704
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
4705
|
-
apply(target, this_arg, arg_list) {
|
|
4706
|
-
try {
|
|
4707
|
-
if (typeof arg_list[0] == "object") {
|
|
4708
|
-
const cloned_object = {
|
|
4709
|
-
...arg_list[0]
|
|
4710
|
-
};
|
|
4711
|
-
const old_state = history.state;
|
|
4712
|
-
for (const key in old_state) {
|
|
4713
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
4714
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
4715
|
-
}
|
|
4716
|
-
arg_list[0] = cloned_object;
|
|
4717
|
-
}
|
|
4718
|
-
} catch (e) {
|
|
4719
|
-
(0, $i7OB2$report)([e, "Failed to preserve items in history.state"], "error");
|
|
4720
|
-
}
|
|
4721
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
4722
|
-
}
|
|
4723
|
-
});
|
|
4724
|
-
}
|
|
4725
4733
|
const $b5cccc8ee7d24677$var$transform_elements = sorted_cols_at_size => {
|
|
4726
4734
|
const cols_at_size = [];
|
|
4727
4735
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|