@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/latest/index.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
var $gVhhF$depictaiutilishared = require("@depict-ai/utilishared/latest");
|
|
2
2
|
var $gVhhF$solidjsweb = require("solid-js/web");
|
|
3
|
-
var $gVhhF$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest/latest");
|
|
4
3
|
var $gVhhF$solidjs = require("solid-js");
|
|
5
4
|
require("../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
6
5
|
function $parcel$export(e, n, v, s) {
|
|
@@ -59,11 +58,11 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
59
58
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
60
59
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
61
60
|
/*! Depict.ai search and product listing SDK */
|
|
62
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.
|
|
61
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "1.4.22";
|
|
63
62
|
const $19950faaac026e09$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<img>`, 1);
|
|
64
63
|
function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
|
|
65
64
|
const [size, setSize] = $gVhhF$solidjs.createSignal(0);
|
|
66
|
-
const resizeObserver = new ResizeObserver($gVhhF$
|
|
65
|
+
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => {
|
|
67
66
|
for (let j = 0; j < records.length; j++) {
|
|
68
67
|
const {
|
|
69
68
|
width: width
|
|
@@ -3631,6 +3630,7 @@ function $3f08fe2992a2a8ca$export$5e4aed86c12acdd9({
|
|
|
3631
3630
|
last_loaded = +new Date();
|
|
3632
3631
|
is_first_load = true;
|
|
3633
3632
|
});
|
|
3633
|
+
// 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
|
|
3634
3634
|
$gVhhF$solidjs.createEffect($gVhhF$depictaiutilishared.catchify(async () => {
|
|
3635
3635
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3636
3636
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
@@ -3702,6 +3702,8 @@ function $4117463e2939f5f4$export$63dd0350f8559dda({
|
|
|
3702
3702
|
// No product card in view and not after last card, assume first card
|
|
3703
3703
|
return 0;
|
|
3704
3704
|
return last / displays_by_key_().size * 100;
|
|
3705
|
+
}, undefined, {
|
|
3706
|
+
equals: false
|
|
3705
3707
|
});
|
|
3706
3708
|
}
|
|
3707
3709
|
|
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.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
|
*/
|