@depict-ai/ui 1.4.20 → 1.4.22
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 +5 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +159 -157
- package/latest/index.cjs +5 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +159 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +5 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +100 -98
- package/server/latest/index.cjs +5 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +100 -98
package/ES10/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var $52FdA$depictaiutilishared = require("@depict-ai/utilishared/ES10");
|
|
2
2
|
var $52FdA$solidjsweb = require("solid-js/web");
|
|
3
|
-
var $52FdA$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest/ES10");
|
|
4
3
|
var $52FdA$solidjs = require("solid-js");
|
|
5
4
|
var $52FdA$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
6
5
|
var $52FdA$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
@@ -65,11 +64,11 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
65
64
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
66
65
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
67
66
|
/*! Depict.ai search and product listing SDK */
|
|
68
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
67
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.22";
|
|
69
68
|
const $858fdcf73148519f$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<img>`, 1);
|
|
70
69
|
function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
|
|
71
70
|
const [size, setSize] = $52FdA$solidjs.createSignal(0);
|
|
72
|
-
const resizeObserver = new ResizeObserver($52FdA$
|
|
71
|
+
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => {
|
|
73
72
|
for (let j = 0; j < records.length; j++) {
|
|
74
73
|
const {
|
|
75
74
|
width: width
|
|
@@ -3925,6 +3924,7 @@ function $19438fea513c9d01$export$5e4aed86c12acdd9(_ref) {
|
|
|
3925
3924
|
last_loaded = +new Date();
|
|
3926
3925
|
is_first_load = true;
|
|
3927
3926
|
});
|
|
3927
|
+
// percentage_in_view_ has equals: false so it should update even when set to the same value. That is to make sure that if the user bounces around below the "viewport" of our product listing we still start fetching as soon as is_loading_more becomes false again and we get IntersectionObserverEntries
|
|
3928
3928
|
$52FdA$solidjs.createEffect($52FdA$depictaiutilishared.catchify(async () => {
|
|
3929
3929
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3930
3930
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
@@ -3997,6 +3997,8 @@ function $45c16e404a883f74$export$63dd0350f8559dda(_ref) {
|
|
|
3997
3997
|
// No product card in view and not after last card, assume first card
|
|
3998
3998
|
return 0;
|
|
3999
3999
|
return last / displays_by_key_().size * 100;
|
|
4000
|
+
}, undefined, {
|
|
4001
|
+
equals: false
|
|
4000
4002
|
});
|
|
4001
4003
|
}
|
|
4002
4004
|
|
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.22";
|
|
11
11
|
/**
|
|
12
12
|
* Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
|
|
13
13
|
*/
|