@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/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, $52FdA$solidjsweb.isServer) ? {
|
|
@@ -703,7 +671,7 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
|
|
|
703
671
|
market_: () => props.market,
|
|
704
672
|
merchant_: () => props.merchant,
|
|
705
673
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
706
|
-
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(
|
|
674
|
+
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
707
675
|
...grid_spacing_override()
|
|
708
676
|
}))
|
|
709
677
|
}));
|
|
@@ -823,7 +791,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
|
|
|
823
791
|
market_: () => props.market,
|
|
824
792
|
merchant_: () => props.merchant,
|
|
825
793
|
layout_options_: $52FdA$solidjs.createMemo(() => ({
|
|
826
|
-
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(
|
|
794
|
+
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
|
|
827
795
|
...grid_spacing_override()
|
|
828
796
|
}))
|
|
829
797
|
}));
|
|
@@ -10841,6 +10809,38 @@ function $98bd00c15a2e3159$export$828dcdd425fd3231(aligner) {
|
|
|
10841
10809
|
cleanup: cleanup
|
|
10842
10810
|
};
|
|
10843
10811
|
}
|
|
10812
|
+
|
|
10813
|
+
/**
|
|
10814
|
+
* 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
|
|
10815
|
+
*/
|
|
10816
|
+
function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
10817
|
+
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
10818
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
10819
|
+
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
10820
|
+
let [cols, max_width] = _ref;
|
|
10821
|
+
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
10822
|
+
}).sort((_ref2, _ref3) => {
|
|
10823
|
+
let [, a] = _ref2;
|
|
10824
|
+
let [, b] = _ref3;
|
|
10825
|
+
return a - b;
|
|
10826
|
+
});
|
|
10827
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
10828
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
10829
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
10830
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
10831
|
+
const to_delete = [];
|
|
10832
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
10833
|
+
const [, max_width] = sorted_sizes[i];
|
|
10834
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
10835
|
+
to_delete.push(i);
|
|
10836
|
+
}
|
|
10837
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
10838
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
10839
|
+
return sorted_sizes.map(_ref4 => {
|
|
10840
|
+
let [cols, max_width] = _ref4;
|
|
10841
|
+
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
10842
|
+
});
|
|
10843
|
+
}
|
|
10844
10844
|
const $ddd39c5f36f49703$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"></div>`, 2);
|
|
10845
10845
|
function $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
10846
10846
|
$ddd39c5f36f49703$var$_checkPrivateRedeclaration(obj, privateMap);
|
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 = "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/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 = "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, $8tj43$isServer) ? {
|
|
@@ -644,7 +612,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
644
612
|
market_: () => props.market,
|
|
645
613
|
merchant_: () => props.merchant,
|
|
646
614
|
layout_options_: $8tj43$createMemo(() => ({
|
|
647
|
-
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(
|
|
615
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
648
616
|
...grid_spacing_override()
|
|
649
617
|
}))
|
|
650
618
|
}));
|
|
@@ -764,7 +732,7 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
|
|
|
764
732
|
market_: () => props.market,
|
|
765
733
|
merchant_: () => props.merchant,
|
|
766
734
|
layout_options_: $8tj43$createMemo(() => ({
|
|
767
|
-
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(
|
|
735
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
768
736
|
...grid_spacing_override()
|
|
769
737
|
}))
|
|
770
738
|
}));
|
|
@@ -10782,6 +10750,38 @@ function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
|
10782
10750
|
cleanup: cleanup
|
|
10783
10751
|
};
|
|
10784
10752
|
}
|
|
10753
|
+
|
|
10754
|
+
/**
|
|
10755
|
+
* 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
|
|
10756
|
+
*/
|
|
10757
|
+
function $3f7203368ad0d3ca$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
10758
|
+
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
10759
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
10760
|
+
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
10761
|
+
let [cols, max_width] = _ref;
|
|
10762
|
+
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
10763
|
+
}).sort((_ref2, _ref3) => {
|
|
10764
|
+
let [, a] = _ref2;
|
|
10765
|
+
let [, b] = _ref3;
|
|
10766
|
+
return a - b;
|
|
10767
|
+
});
|
|
10768
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
10769
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
10770
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
10771
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
10772
|
+
const to_delete = [];
|
|
10773
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
10774
|
+
const [, max_width] = sorted_sizes[i];
|
|
10775
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
10776
|
+
to_delete.push(i);
|
|
10777
|
+
}
|
|
10778
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
10779
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
10780
|
+
return sorted_sizes.map(_ref4 => {
|
|
10781
|
+
let [cols, max_width] = _ref4;
|
|
10782
|
+
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
10783
|
+
});
|
|
10784
|
+
}
|
|
10785
10785
|
const $eb064bc3350276c1$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class="depict plp search"></div>`, 2);
|
|
10786
10786
|
function $eb064bc3350276c1$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
10787
10787
|
$eb064bc3350276c1$var$_checkPrivateRedeclaration(obj, privateMap);
|
package/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, $gVhhF$solidjsweb.isServer) ? {
|
|
@@ -650,7 +629,7 @@ function $72f96c4782db0b1b$export$9574e176201e5e8d(props) {
|
|
|
650
629
|
market_: () => props.market,
|
|
651
630
|
merchant_: () => props.merchant,
|
|
652
631
|
layout_options_: $gVhhF$solidjs.createMemo(() => ({
|
|
653
|
-
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(
|
|
632
|
+
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
654
633
|
...grid_spacing_override()
|
|
655
634
|
}))
|
|
656
635
|
}));
|
|
@@ -763,7 +742,7 @@ function $1f8dbf7e28b3eff2$export$9756467d34d91cdb(props) {
|
|
|
763
742
|
market_: () => props.market,
|
|
764
743
|
merchant_: () => props.merchant,
|
|
765
744
|
layout_options_: $gVhhF$solidjs.createMemo(() => ({
|
|
766
|
-
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(
|
|
745
|
+
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.cols_at_size),
|
|
767
746
|
...grid_spacing_override()
|
|
768
747
|
}))
|
|
769
748
|
}));
|
|
@@ -10088,6 +10067,27 @@ function $d8e94ea381ab57fa$export$828dcdd425fd3231(aligner) {
|
|
|
10088
10067
|
cleanup: cleanup
|
|
10089
10068
|
};
|
|
10090
10069
|
}
|
|
10070
|
+
|
|
10071
|
+
/**
|
|
10072
|
+
* 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
|
|
10073
|
+
*/
|
|
10074
|
+
function $ab7c6c7911bae2f5$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
10075
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
10076
|
+
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
10077
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
10078
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
10079
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
10080
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
10081
|
+
const to_delete = [];
|
|
10082
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
10083
|
+
const [, max_width] = sorted_sizes[i];
|
|
10084
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
10085
|
+
to_delete.push(i);
|
|
10086
|
+
}
|
|
10087
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
10088
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
10089
|
+
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
10090
|
+
}
|
|
10091
10091
|
const $2c61e4cd8229c49a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="depict plp search"></div>`, 2);
|
|
10092
10092
|
// 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
|
|
10093
10093
|
/**
|
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 = "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/latest/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, i
|
|
|
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, $9HbP8$isServer) ? {
|
|
@@ -594,7 +573,7 @@ function $ee116da074deb002$export$9574e176201e5e8d(props) {
|
|
|
594
573
|
market_: () => props.market,
|
|
595
574
|
merchant_: () => props.merchant,
|
|
596
575
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
597
|
-
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(
|
|
576
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
598
577
|
...grid_spacing_override()
|
|
599
578
|
}))
|
|
600
579
|
}));
|
|
@@ -707,7 +686,7 @@ function $9ea5383493360761$export$9756467d34d91cdb(props) {
|
|
|
707
686
|
market_: () => props.market,
|
|
708
687
|
merchant_: () => props.merchant,
|
|
709
688
|
layout_options_: $9HbP8$createMemo(() => ({
|
|
710
|
-
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(
|
|
689
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
711
690
|
...grid_spacing_override()
|
|
712
691
|
}))
|
|
713
692
|
}));
|
|
@@ -10032,6 +10011,27 @@ function $4ca91518c9a35379$export$828dcdd425fd3231(aligner) {
|
|
|
10032
10011
|
cleanup: cleanup
|
|
10033
10012
|
};
|
|
10034
10013
|
}
|
|
10014
|
+
|
|
10015
|
+
/**
|
|
10016
|
+
* 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
|
|
10017
|
+
*/
|
|
10018
|
+
function $1848f7cca286fbab$export$ff7109b9b2b206ba(sdk_cols_at_size, min_width_for_more_than_one_column = 500) {
|
|
10019
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
10020
|
+
const sorted_sizes = sdk_cols_at_size.map(([cols, max_width]) => [cols, max_width ?? Infinity]).sort(([, a], [, b]) => a - b);
|
|
10021
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
10022
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
10023
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
10024
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
10025
|
+
const to_delete = [];
|
|
10026
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
10027
|
+
const [, max_width] = sorted_sizes[i];
|
|
10028
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
10029
|
+
to_delete.push(i);
|
|
10030
|
+
}
|
|
10031
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
10032
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
10033
|
+
return sorted_sizes.map(([cols, max_width]) => max_width == Infinity ? [cols] : [cols, max_width]);
|
|
10034
|
+
}
|
|
10035
10035
|
const $806c97b931758897$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class="depict plp search"></div>`, 2);
|
|
10036
10036
|
// 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
|
|
10037
10037
|
/**
|