@depict-ai/ui 2.0.6 → 2.0.7
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 +35 -35
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +35 -35
- package/latest/index.cjs +24 -24
- package/latest/index.d.ts +1 -1
- package/latest/index.js +24 -24
- package/locales/require.js +1152 -0
- package/package.json +1 -1
- package/server/ES10/index.cjs +35 -35
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +35 -35
- package/server/latest/index.cjs +24 -24
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +24 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.7",
|
|
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
|
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
67
67
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
68
68
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
69
69
|
/*! Depict.ai search and product listing SDK */
|
|
70
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.
|
|
70
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.7";
|
|
71
71
|
|
|
72
72
|
/** @jsxImportSource solid-js */
|
|
73
73
|
|
|
@@ -123,38 +123,6 @@ const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
123
123
|
});
|
|
124
124
|
return $5401a6698b0c0658$var$transform_elements(sorted_cols_at_size);
|
|
125
125
|
};
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
129
|
-
*/
|
|
130
|
-
function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
131
|
-
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
132
|
-
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
133
|
-
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
134
|
-
let [cols, max_width] = _ref;
|
|
135
|
-
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
136
|
-
}).sort((_ref2, _ref3) => {
|
|
137
|
-
let [, a] = _ref2;
|
|
138
|
-
let [, b] = _ref3;
|
|
139
|
-
return a - b;
|
|
140
|
-
});
|
|
141
|
-
const [[, smallest_max_width]] = sorted_sizes;
|
|
142
|
-
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
143
|
-
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
144
|
-
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
145
|
-
const to_delete = [];
|
|
146
|
-
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
147
|
-
const [, max_width] = sorted_sizes[i];
|
|
148
|
-
if (max_width > min_width_for_more_than_one_column) continue;
|
|
149
|
-
to_delete.push(i);
|
|
150
|
-
}
|
|
151
|
-
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
152
|
-
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
153
|
-
return sorted_sizes.map(_ref4 => {
|
|
154
|
-
let [cols, max_width] = _ref4;
|
|
155
|
-
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
126
|
function $8edd3cf30d1fd8b4$export$a2cc176055f8f08() {
|
|
159
127
|
const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
160
128
|
return (0, $3hooq$solidjsweb.isServer) ? {
|
|
@@ -642,7 +610,7 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
642
610
|
market_: () => props.market,
|
|
643
611
|
merchant_: () => props.merchant,
|
|
644
612
|
layout_options_: $3hooq$solidjs.createMemo(() => ({
|
|
645
|
-
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(
|
|
613
|
+
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
646
614
|
...grid_spacing_override()
|
|
647
615
|
}))
|
|
648
616
|
})));
|
|
@@ -747,7 +715,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
747
715
|
market_: () => props.market,
|
|
748
716
|
merchant_: () => props.merchant,
|
|
749
717
|
layout_options_: $3hooq$solidjs.createMemo(() => ({
|
|
750
|
-
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(
|
|
718
|
+
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
751
719
|
...grid_spacing_override()
|
|
752
720
|
}))
|
|
753
721
|
})));
|
|
@@ -8880,6 +8848,38 @@ function $98bd00c15a2e3159$export$828dcdd425fd3231(aligner) {
|
|
|
8880
8848
|
cleanup: cleanup
|
|
8881
8849
|
};
|
|
8882
8850
|
}
|
|
8851
|
+
|
|
8852
|
+
/**
|
|
8853
|
+
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
8854
|
+
*/
|
|
8855
|
+
function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
8856
|
+
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
8857
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
8858
|
+
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
8859
|
+
let [cols, max_width] = _ref;
|
|
8860
|
+
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
8861
|
+
}).sort((_ref2, _ref3) => {
|
|
8862
|
+
let [, a] = _ref2;
|
|
8863
|
+
let [, b] = _ref3;
|
|
8864
|
+
return a - b;
|
|
8865
|
+
});
|
|
8866
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
8867
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
8868
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
8869
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
8870
|
+
const to_delete = [];
|
|
8871
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
8872
|
+
const [, max_width] = sorted_sizes[i];
|
|
8873
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
8874
|
+
to_delete.push(i);
|
|
8875
|
+
}
|
|
8876
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
8877
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
8878
|
+
return sorted_sizes.map(_ref4 => {
|
|
8879
|
+
let [cols, max_width] = _ref4;
|
|
8880
|
+
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
8881
|
+
});
|
|
8882
|
+
}
|
|
8883
8883
|
const $ddd39c5f36f49703$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
|
|
8884
8884
|
function $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
8885
8885
|
$ddd39c5f36f49703$var$_checkPrivateRedeclaration(obj, privateMap);
|
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 = "2.0.
|
|
10
|
+
export const version = "2.0.7";
|
|
11
11
|
/**
|
|
12
12
|
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
13
|
*/
|
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 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.7";
|
|
12
12
|
|
|
13
13
|
/** @jsxImportSource solid-js */
|
|
14
14
|
|
|
@@ -64,38 +64,6 @@ const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
64
64
|
});
|
|
65
65
|
return $a9c7ba6087881ac2$var$transform_elements(sorted_cols_at_size);
|
|
66
66
|
};
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
70
|
-
*/
|
|
71
|
-
function $3f7203368ad0d3ca$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
72
|
-
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
73
|
-
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
74
|
-
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
75
|
-
let [cols, max_width] = _ref;
|
|
76
|
-
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
77
|
-
}).sort((_ref2, _ref3) => {
|
|
78
|
-
let [, a] = _ref2;
|
|
79
|
-
let [, b] = _ref3;
|
|
80
|
-
return a - b;
|
|
81
|
-
});
|
|
82
|
-
const [[, smallest_max_width]] = sorted_sizes;
|
|
83
|
-
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
84
|
-
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
85
|
-
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
86
|
-
const to_delete = [];
|
|
87
|
-
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
88
|
-
const [, max_width] = sorted_sizes[i];
|
|
89
|
-
if (max_width > min_width_for_more_than_one_column) continue;
|
|
90
|
-
to_delete.push(i);
|
|
91
|
-
}
|
|
92
|
-
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
93
|
-
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
94
|
-
return sorted_sizes.map(_ref4 => {
|
|
95
|
-
let [cols, max_width] = _ref4;
|
|
96
|
-
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
67
|
function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
|
|
100
68
|
const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
101
69
|
return (0, $b8hua$isServer) ? {
|
|
@@ -583,7 +551,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
583
551
|
market_: () => props.market,
|
|
584
552
|
merchant_: () => props.merchant,
|
|
585
553
|
layout_options_: $b8hua$createMemo(() => ({
|
|
586
|
-
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(
|
|
554
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
587
555
|
...grid_spacing_override()
|
|
588
556
|
}))
|
|
589
557
|
})));
|
|
@@ -688,7 +656,7 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
|
|
|
688
656
|
market_: () => props.market,
|
|
689
657
|
merchant_: () => props.merchant,
|
|
690
658
|
layout_options_: $b8hua$createMemo(() => ({
|
|
691
|
-
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(
|
|
659
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
692
660
|
...grid_spacing_override()
|
|
693
661
|
}))
|
|
694
662
|
})));
|
|
@@ -8821,6 +8789,38 @@ function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
|
8821
8789
|
cleanup: cleanup
|
|
8822
8790
|
};
|
|
8823
8791
|
}
|
|
8792
|
+
|
|
8793
|
+
/**
|
|
8794
|
+
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
8795
|
+
*/
|
|
8796
|
+
function $3f7203368ad0d3ca$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
8797
|
+
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
8798
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
8799
|
+
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
8800
|
+
let [cols, max_width] = _ref;
|
|
8801
|
+
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
8802
|
+
}).sort((_ref2, _ref3) => {
|
|
8803
|
+
let [, a] = _ref2;
|
|
8804
|
+
let [, b] = _ref3;
|
|
8805
|
+
return a - b;
|
|
8806
|
+
});
|
|
8807
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
8808
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
8809
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
8810
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
8811
|
+
const to_delete = [];
|
|
8812
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
8813
|
+
const [, max_width] = sorted_sizes[i];
|
|
8814
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
8815
|
+
to_delete.push(i);
|
|
8816
|
+
}
|
|
8817
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
8818
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
8819
|
+
return sorted_sizes.map(_ref4 => {
|
|
8820
|
+
let [cols, max_width] = _ref4;
|
|
8821
|
+
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
8822
|
+
});
|
|
8823
|
+
}
|
|
8824
8824
|
const $eb064bc3350276c1$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
|
|
8825
8825
|
function $eb064bc3350276c1$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
8826
8826
|
$eb064bc3350276c1$var$_checkPrivateRedeclaration(obj, privateMap);
|
package/server/latest/index.cjs
CHANGED
|
@@ -61,7 +61,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
61
61
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
62
62
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
63
63
|
/*! Depict.ai search and product listing SDK */
|
|
64
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.
|
|
64
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.7";
|
|
65
65
|
|
|
66
66
|
/** @jsxImportSource solid-js */
|
|
67
67
|
|
|
@@ -112,27 +112,6 @@ const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
112
112
|
});
|
|
113
113
|
return $4e04be41243c3d80$var$transform_elements(sorted_cols_at_size);
|
|
114
114
|
};
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
118
|
-
*/
|
|
119
|
-
function $ab7c6c7911bae2f5$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
120
|
-
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
121
|
-
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
122
|
-
const [[, smallest_max_width]] = sorted_sizes;
|
|
123
|
-
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
124
|
-
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
125
|
-
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
126
|
-
const to_delete = [];
|
|
127
|
-
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
128
|
-
const [, max_width] = sorted_sizes[i];
|
|
129
|
-
if (max_width > min_width_for_more_than_one_column) continue;
|
|
130
|
-
to_delete.push(i);
|
|
131
|
-
}
|
|
132
|
-
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
133
|
-
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
134
|
-
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
135
|
-
}
|
|
136
115
|
function $fc23d7668ae0011d$export$a2cc176055f8f08() {
|
|
137
116
|
const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
138
117
|
return (0, $5vyXB$solidjsweb.isServer) ? {
|
|
@@ -598,7 +577,7 @@ function $72f96c4782db0b1b$export$9574e176201e5e8d(props) {
|
|
|
598
577
|
market_: () => props.market,
|
|
599
578
|
merchant_: () => props.merchant,
|
|
600
579
|
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
|
601
|
-
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(
|
|
580
|
+
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
602
581
|
...grid_spacing_override()
|
|
603
582
|
}))
|
|
604
583
|
})));
|
|
@@ -696,7 +675,7 @@ function $1f8dbf7e28b3eff2$export$9756467d34d91cdb(props) {
|
|
|
696
675
|
market_: () => props.market,
|
|
697
676
|
merchant_: () => props.merchant,
|
|
698
677
|
layout_options_: $5vyXB$solidjs.createMemo(() => ({
|
|
699
|
-
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(
|
|
678
|
+
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
700
679
|
...grid_spacing_override()
|
|
701
680
|
}))
|
|
702
681
|
})));
|
|
@@ -8192,6 +8171,27 @@ function $d8e94ea381ab57fa$export$828dcdd425fd3231(aligner) {
|
|
|
8192
8171
|
cleanup: cleanup
|
|
8193
8172
|
};
|
|
8194
8173
|
}
|
|
8174
|
+
|
|
8175
|
+
/**
|
|
8176
|
+
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
8177
|
+
*/
|
|
8178
|
+
function $ab7c6c7911bae2f5$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
8179
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
8180
|
+
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
8181
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
8182
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
8183
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
8184
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
8185
|
+
const to_delete = [];
|
|
8186
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
8187
|
+
const [, max_width] = sorted_sizes[i];
|
|
8188
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
8189
|
+
to_delete.push(i);
|
|
8190
|
+
}
|
|
8191
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
8192
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
8193
|
+
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
8194
|
+
}
|
|
8195
8195
|
const $2c61e4cd8229c49a$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
|
|
8196
8196
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
8197
8197
|
/**
|
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 = "2.0.
|
|
10
|
+
export const version = "2.0.7";
|
|
11
11
|
/**
|
|
12
12
|
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
13
|
*/
|
package/server/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as
|
|
|
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 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.7";
|
|
9
9
|
|
|
10
10
|
/** @jsxImportSource solid-js */
|
|
11
11
|
|
|
@@ -56,27 +56,6 @@ const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
56
56
|
});
|
|
57
57
|
return $b5cccc8ee7d24677$var$transform_elements(sorted_cols_at_size);
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
62
|
-
*/
|
|
63
|
-
function $1848f7cca286fbab$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
64
|
-
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
65
|
-
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
66
|
-
const [[, smallest_max_width]] = sorted_sizes;
|
|
67
|
-
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
68
|
-
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
69
|
-
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
70
|
-
const to_delete = [];
|
|
71
|
-
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
72
|
-
const [, max_width] = sorted_sizes[i];
|
|
73
|
-
if (max_width > min_width_for_more_than_one_column) continue;
|
|
74
|
-
to_delete.push(i);
|
|
75
|
-
}
|
|
76
|
-
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
77
|
-
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
78
|
-
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
79
|
-
}
|
|
80
59
|
function $a458486f22b22f63$export$a2cc176055f8f08() {
|
|
81
60
|
const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
82
61
|
return (0, $i7OB2$isServer) ? {
|
|
@@ -542,7 +521,7 @@ function $ee116da074deb002$export$9574e176201e5e8d(props) {
|
|
|
542
521
|
market_: () => props.market,
|
|
543
522
|
merchant_: () => props.merchant,
|
|
544
523
|
layout_options_: $i7OB2$createMemo(() => ({
|
|
545
|
-
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(
|
|
524
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
546
525
|
...grid_spacing_override()
|
|
547
526
|
}))
|
|
548
527
|
})));
|
|
@@ -640,7 +619,7 @@ function $9ea5383493360761$export$9756467d34d91cdb(props) {
|
|
|
640
619
|
market_: () => props.market,
|
|
641
620
|
merchant_: () => props.merchant,
|
|
642
621
|
layout_options_: $i7OB2$createMemo(() => ({
|
|
643
|
-
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(
|
|
622
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
644
623
|
...grid_spacing_override()
|
|
645
624
|
}))
|
|
646
625
|
})));
|
|
@@ -8136,6 +8115,27 @@ function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
|
8136
8115
|
cleanup: cleanup
|
|
8137
8116
|
};
|
|
8138
8117
|
}
|
|
8118
|
+
|
|
8119
|
+
/**
|
|
8120
|
+
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
8121
|
+
*/
|
|
8122
|
+
function $1848f7cca286fbab$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
8123
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
8124
|
+
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
8125
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
8126
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
8127
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
8128
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
8129
|
+
const to_delete = [];
|
|
8130
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
8131
|
+
const [, max_width] = sorted_sizes[i];
|
|
8132
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
8133
|
+
to_delete.push(i);
|
|
8134
|
+
}
|
|
8135
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
8136
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
8137
|
+
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
8138
|
+
}
|
|
8139
8139
|
const $806c97b931758897$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
|
|
8140
8140
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
8141
8141
|
/**
|