@depict-ai/ui 4.8.22 → 4.8.24
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 +50 -7
- package/ES10/index.d.ts +4 -4
- package/ES10/index.js +50 -7
- package/latest/index.cjs +50 -7
- package/latest/index.d.ts +4 -4
- package/latest/index.js +50 -7
- package/package.json +1 -1
- package/server/ES10/index.cjs +50 -7
- package/server/ES10/index.d.ts +4 -4
- package/server/ES10/index.js +50 -7
- package/server/latest/index.cjs +50 -7
- package/server/latest/index.d.ts +4 -4
- package/server/latest/index.js +50 -7
package/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.24";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -7632,6 +7632,53 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
7632
7632
|
}, timeout + 1000);
|
|
7633
7633
|
return cancel;
|
|
7634
7634
|
}
|
|
7635
|
+
function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
|
|
7636
|
+
const worstCaseIdleDeadline = 15000;
|
|
7637
|
+
const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
|
|
7638
|
+
cancelIdleCallback();
|
|
7639
|
+
callback({
|
|
7640
|
+
didTimeout: false,
|
|
7641
|
+
timeRemaining: () => 300
|
|
7642
|
+
});
|
|
7643
|
+
});
|
|
7644
|
+
const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
|
|
7645
|
+
cancelFrameCheck();
|
|
7646
|
+
callback(deadline);
|
|
7647
|
+
}, {
|
|
7648
|
+
timeout: worstCaseIdleDeadline
|
|
7649
|
+
});
|
|
7650
|
+
}
|
|
7651
|
+
/**
|
|
7652
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
7653
|
+
*/
|
|
7654
|
+
function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
7655
|
+
const start = performance.now();
|
|
7656
|
+
const noDipsBelow = 20;
|
|
7657
|
+
const fpsOverTime = [];
|
|
7658
|
+
let cleanedUp = false;
|
|
7659
|
+
let lastTime;
|
|
7660
|
+
const check = () => requestAnimationFrame($52FdA$depictaiutilishared.catchify(time => {
|
|
7661
|
+
if (cleanedUp) return;
|
|
7662
|
+
if (lastTime === undefined) {
|
|
7663
|
+
lastTime = time;
|
|
7664
|
+
check();
|
|
7665
|
+
return;
|
|
7666
|
+
}
|
|
7667
|
+
const fps = 1000 / (time - lastTime);
|
|
7668
|
+
fpsOverTime.push(fps);
|
|
7669
|
+
if (fps < noDipsBelow) {
|
|
7670
|
+
$52FdA$depictaiutilishared.dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
|
|
7671
|
+
return;
|
|
7672
|
+
}
|
|
7673
|
+
lastTime = time;
|
|
7674
|
+
if (time <= start + checkDuration) check();else {
|
|
7675
|
+
$52FdA$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
7676
|
+
runWhenNoDips();
|
|
7677
|
+
}
|
|
7678
|
+
}));
|
|
7679
|
+
check();
|
|
7680
|
+
return () => cleanedUp = true;
|
|
7681
|
+
}
|
|
7635
7682
|
const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
7636
7683
|
const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
7637
7684
|
const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -7696,7 +7743,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
7696
7743
|
if (existingStack) return existingStack.add(fn);
|
|
7697
7744
|
const newStack = new Set([fn]);
|
|
7698
7745
|
if (listingContext) listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol] = newStack;
|
|
7699
|
-
const processStackWhenIdle = () => $
|
|
7746
|
+
const processStackWhenIdle = () => $4692443b324db9ee$export$566cd7e46bad5c2d($52FdA$depictaiutilishared.catchify(deadline => {
|
|
7700
7747
|
const start = performance.now();
|
|
7701
7748
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
7702
7749
|
for (const fn of newStack) {
|
|
@@ -7711,11 +7758,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
7711
7758
|
}
|
|
7712
7759
|
// Stack is empty
|
|
7713
7760
|
if (listingContext) delete listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol];
|
|
7714
|
-
})
|
|
7715
|
-
timeout: 15000
|
|
7716
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
7717
|
-
);
|
|
7718
|
-
|
|
7761
|
+
}));
|
|
7719
7762
|
processStackWhenIdle();
|
|
7720
7763
|
};
|
|
7721
7764
|
let sizeSetFastPath = false;
|
package/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1126,7 +1126,7 @@ type ExtraDisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay
|
|
|
1126
1126
|
* If the category display transformer was called due to navigating to a listing using a <CategoryPage> component, currentListing will be set and contain a promise that can be used to get information of said listing.
|
|
1127
1127
|
*/
|
|
1128
1128
|
currentListing?: Promise<ProductListing>;
|
|
1129
|
-
}) => CanBePromiseWrapped<OutputDisplay>;
|
|
1129
|
+
}) => CanBePromiseWrapped<OutputDisplay[]>;
|
|
1130
1130
|
categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
|
|
1131
1131
|
data: T[];
|
|
1132
1132
|
}) => CanBePromiseWrapped<T[]>;
|
|
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1538
1538
|
* Open the modal with support for alignment.
|
|
1539
1539
|
* @returns {void}
|
|
1540
1540
|
*/
|
|
1541
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1541
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1542
1542
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1543
1543
|
export interface PageReplacer {
|
|
1544
1544
|
readonly render_: () => Node_Array;
|
|
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1618
1618
|
layout?: PossibleLayout;
|
|
1619
1619
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1620
1620
|
showSliderArrow_?: boolean;
|
|
1621
|
-
}): import("@depict-ai/utilishared
|
|
1621
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1622
1622
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.24";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -7527,6 +7527,53 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
7527
7527
|
}, timeout + 1000);
|
|
7528
7528
|
return cancel;
|
|
7529
7529
|
}
|
|
7530
|
+
function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
|
|
7531
|
+
const worstCaseIdleDeadline = 15000;
|
|
7532
|
+
const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
|
|
7533
|
+
cancelIdleCallback();
|
|
7534
|
+
callback({
|
|
7535
|
+
didTimeout: false,
|
|
7536
|
+
timeRemaining: () => 300
|
|
7537
|
+
});
|
|
7538
|
+
});
|
|
7539
|
+
const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
|
|
7540
|
+
cancelFrameCheck();
|
|
7541
|
+
callback(deadline);
|
|
7542
|
+
}, {
|
|
7543
|
+
timeout: worstCaseIdleDeadline
|
|
7544
|
+
});
|
|
7545
|
+
}
|
|
7546
|
+
/**
|
|
7547
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
7548
|
+
*/
|
|
7549
|
+
function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
7550
|
+
const start = performance.now();
|
|
7551
|
+
const noDipsBelow = 20;
|
|
7552
|
+
const fpsOverTime = [];
|
|
7553
|
+
let cleanedUp = false;
|
|
7554
|
+
let lastTime;
|
|
7555
|
+
const check = () => requestAnimationFrame($8tj43$catchify1(time => {
|
|
7556
|
+
if (cleanedUp) return;
|
|
7557
|
+
if (lastTime === undefined) {
|
|
7558
|
+
lastTime = time;
|
|
7559
|
+
check();
|
|
7560
|
+
return;
|
|
7561
|
+
}
|
|
7562
|
+
const fps = 1000 / (time - lastTime);
|
|
7563
|
+
fpsOverTime.push(fps);
|
|
7564
|
+
if (fps < noDipsBelow) {
|
|
7565
|
+
$8tj43$dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
|
|
7566
|
+
return;
|
|
7567
|
+
}
|
|
7568
|
+
lastTime = time;
|
|
7569
|
+
if (time <= start + checkDuration) check();else {
|
|
7570
|
+
$8tj43$dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
7571
|
+
runWhenNoDips();
|
|
7572
|
+
}
|
|
7573
|
+
}));
|
|
7574
|
+
check();
|
|
7575
|
+
return () => cleanedUp = true;
|
|
7576
|
+
}
|
|
7530
7577
|
const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
7531
7578
|
const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
7532
7579
|
const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -7591,7 +7638,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
7591
7638
|
if (existingStack) return existingStack.add(fn);
|
|
7592
7639
|
const newStack = new Set([fn]);
|
|
7593
7640
|
if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
|
|
7594
|
-
const processStackWhenIdle = () => $
|
|
7641
|
+
const processStackWhenIdle = () => $29b3cf99ce390e3b$export$566cd7e46bad5c2d($8tj43$catchify1(deadline => {
|
|
7595
7642
|
const start = performance.now();
|
|
7596
7643
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
7597
7644
|
for (const fn of newStack) {
|
|
@@ -7606,11 +7653,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
7606
7653
|
}
|
|
7607
7654
|
// Stack is empty
|
|
7608
7655
|
if (listingContext) delete listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol];
|
|
7609
|
-
})
|
|
7610
|
-
timeout: 15000
|
|
7611
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
7612
|
-
);
|
|
7613
|
-
|
|
7656
|
+
}));
|
|
7614
7657
|
processStackWhenIdle();
|
|
7615
7658
|
};
|
|
7616
7659
|
let sizeSetFastPath = false;
|
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.24";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -7216,6 +7216,53 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
7216
7216
|
}, timeout + 1000);
|
|
7217
7217
|
return cancel;
|
|
7218
7218
|
}
|
|
7219
|
+
function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
|
|
7220
|
+
const worstCaseIdleDeadline = 15000;
|
|
7221
|
+
const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
|
|
7222
|
+
cancelIdleCallback();
|
|
7223
|
+
callback({
|
|
7224
|
+
didTimeout: false,
|
|
7225
|
+
timeRemaining: () => 300
|
|
7226
|
+
});
|
|
7227
|
+
});
|
|
7228
|
+
const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
|
|
7229
|
+
cancelFrameCheck();
|
|
7230
|
+
callback(deadline);
|
|
7231
|
+
}, {
|
|
7232
|
+
timeout: worstCaseIdleDeadline
|
|
7233
|
+
});
|
|
7234
|
+
}
|
|
7235
|
+
/**
|
|
7236
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
7237
|
+
*/
|
|
7238
|
+
function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
7239
|
+
const start = performance.now();
|
|
7240
|
+
const noDipsBelow = 20;
|
|
7241
|
+
const fpsOverTime = [];
|
|
7242
|
+
let cleanedUp = false;
|
|
7243
|
+
let lastTime;
|
|
7244
|
+
const check = () => requestAnimationFrame($gVhhF$depictaiutilishared.catchify(time => {
|
|
7245
|
+
if (cleanedUp) return;
|
|
7246
|
+
if (lastTime === undefined) {
|
|
7247
|
+
lastTime = time;
|
|
7248
|
+
check();
|
|
7249
|
+
return;
|
|
7250
|
+
}
|
|
7251
|
+
const fps = 1000 / (time - lastTime);
|
|
7252
|
+
fpsOverTime.push(fps);
|
|
7253
|
+
if (fps < noDipsBelow) {
|
|
7254
|
+
$gVhhF$depictaiutilishared.dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
|
|
7255
|
+
return;
|
|
7256
|
+
}
|
|
7257
|
+
lastTime = time;
|
|
7258
|
+
if (time <= start + checkDuration) check();else {
|
|
7259
|
+
$gVhhF$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
7260
|
+
runWhenNoDips();
|
|
7261
|
+
}
|
|
7262
|
+
}));
|
|
7263
|
+
check();
|
|
7264
|
+
return () => cleanedUp = true;
|
|
7265
|
+
}
|
|
7219
7266
|
const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
7220
7267
|
const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
7221
7268
|
const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -7279,7 +7326,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
7279
7326
|
if (existingStack) return existingStack.add(fn);
|
|
7280
7327
|
const newStack = new Set([fn]);
|
|
7281
7328
|
if (listingContext) listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol] = newStack;
|
|
7282
|
-
const processStackWhenIdle = () => $
|
|
7329
|
+
const processStackWhenIdle = () => $7ea61486b66872b6$export$566cd7e46bad5c2d($gVhhF$depictaiutilishared.catchify(deadline => {
|
|
7283
7330
|
const start = performance.now();
|
|
7284
7331
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
7285
7332
|
for (const fn of newStack) {
|
|
@@ -7294,11 +7341,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
7294
7341
|
}
|
|
7295
7342
|
// Stack is empty
|
|
7296
7343
|
if (listingContext) delete listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol];
|
|
7297
|
-
})
|
|
7298
|
-
timeout: 15000
|
|
7299
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
7300
|
-
);
|
|
7301
|
-
|
|
7344
|
+
}));
|
|
7302
7345
|
processStackWhenIdle();
|
|
7303
7346
|
};
|
|
7304
7347
|
let sizeSetFastPath = false;
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1126,7 +1126,7 @@ type ExtraDisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay
|
|
|
1126
1126
|
* If the category display transformer was called due to navigating to a listing using a <CategoryPage> component, currentListing will be set and contain a promise that can be used to get information of said listing.
|
|
1127
1127
|
*/
|
|
1128
1128
|
currentListing?: Promise<ProductListing>;
|
|
1129
|
-
}) => CanBePromiseWrapped<OutputDisplay>;
|
|
1129
|
+
}) => CanBePromiseWrapped<OutputDisplay[]>;
|
|
1130
1130
|
categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
|
|
1131
1131
|
data: T[];
|
|
1132
1132
|
}) => CanBePromiseWrapped<T[]>;
|
|
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1538
1538
|
* Open the modal with support for alignment.
|
|
1539
1539
|
* @returns {void}
|
|
1540
1540
|
*/
|
|
1541
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1541
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1542
1542
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1543
1543
|
export interface PageReplacer {
|
|
1544
1544
|
readonly render_: () => Node_Array;
|
|
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1618
1618
|
layout?: PossibleLayout;
|
|
1619
1619
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1620
1620
|
showSliderArrow_?: boolean;
|
|
1621
|
-
}): import("@depict-ai/utilishared
|
|
1621
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1622
1622
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.24";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -7114,6 +7114,53 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
7114
7114
|
}, timeout + 1000);
|
|
7115
7115
|
return cancel;
|
|
7116
7116
|
}
|
|
7117
|
+
function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
|
|
7118
|
+
const worstCaseIdleDeadline = 15000;
|
|
7119
|
+
const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
|
|
7120
|
+
cancelIdleCallback();
|
|
7121
|
+
callback({
|
|
7122
|
+
didTimeout: false,
|
|
7123
|
+
timeRemaining: () => 300
|
|
7124
|
+
});
|
|
7125
|
+
});
|
|
7126
|
+
const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
|
|
7127
|
+
cancelFrameCheck();
|
|
7128
|
+
callback(deadline);
|
|
7129
|
+
}, {
|
|
7130
|
+
timeout: worstCaseIdleDeadline
|
|
7131
|
+
});
|
|
7132
|
+
}
|
|
7133
|
+
/**
|
|
7134
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
7135
|
+
*/
|
|
7136
|
+
function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
7137
|
+
const start = performance.now();
|
|
7138
|
+
const noDipsBelow = 20;
|
|
7139
|
+
const fpsOverTime = [];
|
|
7140
|
+
let cleanedUp = false;
|
|
7141
|
+
let lastTime;
|
|
7142
|
+
const check = () => requestAnimationFrame($9HbP8$catchify1(time => {
|
|
7143
|
+
if (cleanedUp) return;
|
|
7144
|
+
if (lastTime === undefined) {
|
|
7145
|
+
lastTime = time;
|
|
7146
|
+
check();
|
|
7147
|
+
return;
|
|
7148
|
+
}
|
|
7149
|
+
const fps = 1000 / (time - lastTime);
|
|
7150
|
+
fpsOverTime.push(fps);
|
|
7151
|
+
if (fps < noDipsBelow) {
|
|
7152
|
+
$9HbP8$dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
|
|
7153
|
+
return;
|
|
7154
|
+
}
|
|
7155
|
+
lastTime = time;
|
|
7156
|
+
if (time <= start + checkDuration) check();else {
|
|
7157
|
+
$9HbP8$dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
7158
|
+
runWhenNoDips();
|
|
7159
|
+
}
|
|
7160
|
+
}));
|
|
7161
|
+
check();
|
|
7162
|
+
return () => cleanedUp = true;
|
|
7163
|
+
}
|
|
7117
7164
|
const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
7118
7165
|
const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
7119
7166
|
const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -7177,7 +7224,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
7177
7224
|
if (existingStack) return existingStack.add(fn);
|
|
7178
7225
|
const newStack = new Set([fn]);
|
|
7179
7226
|
if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
|
|
7180
|
-
const processStackWhenIdle = () => $
|
|
7227
|
+
const processStackWhenIdle = () => $f71681eb5d5aae0a$export$566cd7e46bad5c2d($9HbP8$catchify1(deadline => {
|
|
7181
7228
|
const start = performance.now();
|
|
7182
7229
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
7183
7230
|
for (const fn of newStack) {
|
|
@@ -7192,11 +7239,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
7192
7239
|
}
|
|
7193
7240
|
// Stack is empty
|
|
7194
7241
|
if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
|
|
7195
|
-
})
|
|
7196
|
-
timeout: 15000
|
|
7197
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
7198
|
-
);
|
|
7199
|
-
|
|
7242
|
+
}));
|
|
7200
7243
|
processStackWhenIdle();
|
|
7201
7244
|
};
|
|
7202
7245
|
let sizeSetFastPath = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.8.
|
|
3
|
+
"version": "4.8.24",
|
|
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
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.24";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -6217,6 +6217,53 @@ function $e4e98e5080f4386e$export$2972b890694ced75(callback, _ref) {
|
|
|
6217
6217
|
}, timeout + 1000);
|
|
6218
6218
|
return cancel;
|
|
6219
6219
|
}
|
|
6220
|
+
function $4692443b324db9ee$export$566cd7e46bad5c2d(callback) {
|
|
6221
|
+
const worstCaseIdleDeadline = 15000;
|
|
6222
|
+
const cancelFrameCheck = $4692443b324db9ee$var$checkForFrameDipsUntil(2000, () => {
|
|
6223
|
+
cancelIdleCallback();
|
|
6224
|
+
callback({
|
|
6225
|
+
didTimeout: false,
|
|
6226
|
+
timeRemaining: () => 300
|
|
6227
|
+
});
|
|
6228
|
+
});
|
|
6229
|
+
const cancelIdleCallback = $e4e98e5080f4386e$export$2972b890694ced75(deadline => {
|
|
6230
|
+
cancelFrameCheck();
|
|
6231
|
+
callback(deadline);
|
|
6232
|
+
}, {
|
|
6233
|
+
timeout: worstCaseIdleDeadline
|
|
6234
|
+
});
|
|
6235
|
+
}
|
|
6236
|
+
/**
|
|
6237
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
6238
|
+
*/
|
|
6239
|
+
function $4692443b324db9ee$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
6240
|
+
const start = performance.now();
|
|
6241
|
+
const noDipsBelow = 20;
|
|
6242
|
+
const fpsOverTime = [];
|
|
6243
|
+
let cleanedUp = false;
|
|
6244
|
+
let lastTime;
|
|
6245
|
+
const check = () => requestAnimationFrame($3hooq$depictaiutilishared.catchify(time => {
|
|
6246
|
+
if (cleanedUp) return;
|
|
6247
|
+
if (lastTime === undefined) {
|
|
6248
|
+
lastTime = time;
|
|
6249
|
+
check();
|
|
6250
|
+
return;
|
|
6251
|
+
}
|
|
6252
|
+
const fps = 1000 / (time - lastTime);
|
|
6253
|
+
fpsOverTime.push(fps);
|
|
6254
|
+
if (fps < noDipsBelow) {
|
|
6255
|
+
$3hooq$depictaiutilishared.dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
|
|
6256
|
+
return;
|
|
6257
|
+
}
|
|
6258
|
+
lastTime = time;
|
|
6259
|
+
if (time <= start + checkDuration) check();else {
|
|
6260
|
+
$3hooq$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
6261
|
+
runWhenNoDips();
|
|
6262
|
+
}
|
|
6263
|
+
}));
|
|
6264
|
+
check();
|
|
6265
|
+
return () => cleanedUp = true;
|
|
6266
|
+
}
|
|
6220
6267
|
const $858fdcf73148519f$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
6221
6268
|
const $858fdcf73148519f$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
6222
6269
|
const $858fdcf73148519f$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -6281,7 +6328,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
6281
6328
|
if (existingStack) return existingStack.add(fn);
|
|
6282
6329
|
const newStack = new Set([fn]);
|
|
6283
6330
|
if (listingContext) listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol] = newStack;
|
|
6284
|
-
const processStackWhenIdle = () => $
|
|
6331
|
+
const processStackWhenIdle = () => $4692443b324db9ee$export$566cd7e46bad5c2d($3hooq$depictaiutilishared.catchify(deadline => {
|
|
6285
6332
|
const start = performance.now();
|
|
6286
6333
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
6287
6334
|
for (const fn of newStack) {
|
|
@@ -6296,11 +6343,7 @@ function $858fdcf73148519f$export$6e5611bc7e57e477(props) {
|
|
|
6296
6343
|
}
|
|
6297
6344
|
// Stack is empty
|
|
6298
6345
|
if (listingContext) delete listingContext[$858fdcf73148519f$var$onIdleFunctionsSymbol];
|
|
6299
|
-
})
|
|
6300
|
-
timeout: 15000
|
|
6301
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
6302
|
-
);
|
|
6303
|
-
|
|
6346
|
+
}));
|
|
6304
6347
|
processStackWhenIdle();
|
|
6305
6348
|
};
|
|
6306
6349
|
let sizeSetFastPath = false;
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1126,7 +1126,7 @@ type ExtraDisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay
|
|
|
1126
1126
|
* If the category display transformer was called due to navigating to a listing using a <CategoryPage> component, currentListing will be set and contain a promise that can be used to get information of said listing.
|
|
1127
1127
|
*/
|
|
1128
1128
|
currentListing?: Promise<ProductListing>;
|
|
1129
|
-
}) => CanBePromiseWrapped<OutputDisplay>;
|
|
1129
|
+
}) => CanBePromiseWrapped<OutputDisplay[]>;
|
|
1130
1130
|
categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
|
|
1131
1131
|
data: T[];
|
|
1132
1132
|
}) => CanBePromiseWrapped<T[]>;
|
|
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1538
1538
|
* Open the modal with support for alignment.
|
|
1539
1539
|
* @returns {void}
|
|
1540
1540
|
*/
|
|
1541
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1541
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1542
1542
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1543
1543
|
export interface PageReplacer {
|
|
1544
1544
|
readonly render_: () => Node_Array;
|
|
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1618
1618
|
layout?: PossibleLayout;
|
|
1619
1619
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1620
1620
|
showSliderArrow_?: boolean;
|
|
1621
|
-
}): import("@depict-ai/utilishared
|
|
1621
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1622
1622
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.8.24";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $b8hua$createSignal(false);
|
|
16
16
|
$b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
|
|
@@ -6112,6 +6112,53 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
6112
6112
|
}, timeout + 1000);
|
|
6113
6113
|
return cancel;
|
|
6114
6114
|
}
|
|
6115
|
+
function $29b3cf99ce390e3b$export$566cd7e46bad5c2d(callback) {
|
|
6116
|
+
const worstCaseIdleDeadline = 15000;
|
|
6117
|
+
const cancelFrameCheck = $29b3cf99ce390e3b$var$checkForFrameDipsUntil(2000, () => {
|
|
6118
|
+
cancelIdleCallback();
|
|
6119
|
+
callback({
|
|
6120
|
+
didTimeout: false,
|
|
6121
|
+
timeRemaining: () => 300
|
|
6122
|
+
});
|
|
6123
|
+
});
|
|
6124
|
+
const cancelIdleCallback = $6db93f70c2db1486$export$2972b890694ced75(deadline => {
|
|
6125
|
+
cancelFrameCheck();
|
|
6126
|
+
callback(deadline);
|
|
6127
|
+
}, {
|
|
6128
|
+
timeout: worstCaseIdleDeadline
|
|
6129
|
+
});
|
|
6130
|
+
}
|
|
6131
|
+
/**
|
|
6132
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
6133
|
+
*/
|
|
6134
|
+
function $29b3cf99ce390e3b$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
6135
|
+
const start = performance.now();
|
|
6136
|
+
const noDipsBelow = 20;
|
|
6137
|
+
const fpsOverTime = [];
|
|
6138
|
+
let cleanedUp = false;
|
|
6139
|
+
let lastTime;
|
|
6140
|
+
const check = () => requestAnimationFrame($b8hua$catchify1(time => {
|
|
6141
|
+
if (cleanedUp) return;
|
|
6142
|
+
if (lastTime === undefined) {
|
|
6143
|
+
lastTime = time;
|
|
6144
|
+
check();
|
|
6145
|
+
return;
|
|
6146
|
+
}
|
|
6147
|
+
const fps = 1000 / (time - lastTime);
|
|
6148
|
+
fpsOverTime.push(fps);
|
|
6149
|
+
if (fps < noDipsBelow) {
|
|
6150
|
+
$b8hua$dlog("FPS dipped below ".concat(noDipsBelow, " to ").concat(fps, ", bailing from requestIdleCallback shortcut - rIC seems legit"), fpsOverTime);
|
|
6151
|
+
return;
|
|
6152
|
+
}
|
|
6153
|
+
lastTime = time;
|
|
6154
|
+
if (time <= start + checkDuration) check();else {
|
|
6155
|
+
$b8hua$dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
6156
|
+
runWhenNoDips();
|
|
6157
|
+
}
|
|
6158
|
+
}));
|
|
6159
|
+
check();
|
|
6160
|
+
return () => cleanedUp = true;
|
|
6161
|
+
}
|
|
6115
6162
|
const $56047603f9d212b6$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
6116
6163
|
const $56047603f9d212b6$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
6117
6164
|
const $56047603f9d212b6$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -6176,7 +6223,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
6176
6223
|
if (existingStack) return existingStack.add(fn);
|
|
6177
6224
|
const newStack = new Set([fn]);
|
|
6178
6225
|
if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
|
|
6179
|
-
const processStackWhenIdle = () => $
|
|
6226
|
+
const processStackWhenIdle = () => $29b3cf99ce390e3b$export$566cd7e46bad5c2d($b8hua$catchify1(deadline => {
|
|
6180
6227
|
const start = performance.now();
|
|
6181
6228
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
6182
6229
|
for (const fn of newStack) {
|
|
@@ -6191,11 +6238,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
6191
6238
|
}
|
|
6192
6239
|
// Stack is empty
|
|
6193
6240
|
if (listingContext) delete listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol];
|
|
6194
|
-
})
|
|
6195
|
-
timeout: 15000
|
|
6196
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
6197
|
-
);
|
|
6198
|
-
|
|
6241
|
+
}));
|
|
6199
6242
|
processStackWhenIdle();
|
|
6200
6243
|
};
|
|
6201
6244
|
let sizeSetFastPath = false;
|
package/server/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.8.24";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $5vyXB$solidjs.createSignal(false);
|
|
115
115
|
$5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -5854,6 +5854,53 @@ function $3ea8e0af95b5b7d2$export$2972b890694ced75(callback, {
|
|
|
5854
5854
|
}, timeout + 1000);
|
|
5855
5855
|
return cancel;
|
|
5856
5856
|
}
|
|
5857
|
+
function $7ea61486b66872b6$export$566cd7e46bad5c2d(callback) {
|
|
5858
|
+
const worstCaseIdleDeadline = 15000;
|
|
5859
|
+
const cancelFrameCheck = $7ea61486b66872b6$var$checkForFrameDipsUntil(2000, () => {
|
|
5860
|
+
cancelIdleCallback();
|
|
5861
|
+
callback({
|
|
5862
|
+
didTimeout: false,
|
|
5863
|
+
timeRemaining: () => 300
|
|
5864
|
+
});
|
|
5865
|
+
});
|
|
5866
|
+
const cancelIdleCallback = $3ea8e0af95b5b7d2$export$2972b890694ced75(deadline => {
|
|
5867
|
+
cancelFrameCheck();
|
|
5868
|
+
callback(deadline);
|
|
5869
|
+
}, {
|
|
5870
|
+
timeout: worstCaseIdleDeadline
|
|
5871
|
+
});
|
|
5872
|
+
}
|
|
5873
|
+
/**
|
|
5874
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
5875
|
+
*/
|
|
5876
|
+
function $7ea61486b66872b6$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
5877
|
+
const start = performance.now();
|
|
5878
|
+
const noDipsBelow = 20;
|
|
5879
|
+
const fpsOverTime = [];
|
|
5880
|
+
let cleanedUp = false;
|
|
5881
|
+
let lastTime;
|
|
5882
|
+
const check = () => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(time => {
|
|
5883
|
+
if (cleanedUp) return;
|
|
5884
|
+
if (lastTime === undefined) {
|
|
5885
|
+
lastTime = time;
|
|
5886
|
+
check();
|
|
5887
|
+
return;
|
|
5888
|
+
}
|
|
5889
|
+
const fps = 1000 / (time - lastTime);
|
|
5890
|
+
fpsOverTime.push(fps);
|
|
5891
|
+
if (fps < noDipsBelow) {
|
|
5892
|
+
$5vyXB$depictaiutilishared.dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
|
|
5893
|
+
return;
|
|
5894
|
+
}
|
|
5895
|
+
lastTime = time;
|
|
5896
|
+
if (time <= start + checkDuration) check();else {
|
|
5897
|
+
$5vyXB$depictaiutilishared.dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
5898
|
+
runWhenNoDips();
|
|
5899
|
+
}
|
|
5900
|
+
}));
|
|
5901
|
+
check();
|
|
5902
|
+
return () => cleanedUp = true;
|
|
5903
|
+
}
|
|
5857
5904
|
const $19950faaac026e09$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
5858
5905
|
const $19950faaac026e09$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
5859
5906
|
const $19950faaac026e09$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -5917,7 +5964,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
5917
5964
|
if (existingStack) return existingStack.add(fn);
|
|
5918
5965
|
const newStack = new Set([fn]);
|
|
5919
5966
|
if (listingContext) listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol] = newStack;
|
|
5920
|
-
const processStackWhenIdle = () => $
|
|
5967
|
+
const processStackWhenIdle = () => $7ea61486b66872b6$export$566cd7e46bad5c2d($5vyXB$depictaiutilishared.catchify(deadline => {
|
|
5921
5968
|
const start = performance.now();
|
|
5922
5969
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
5923
5970
|
for (const fn of newStack) {
|
|
@@ -5932,11 +5979,7 @@ function $19950faaac026e09$export$6e5611bc7e57e477(props) {
|
|
|
5932
5979
|
}
|
|
5933
5980
|
// Stack is empty
|
|
5934
5981
|
if (listingContext) delete listingContext[$19950faaac026e09$var$onIdleFunctionsSymbol];
|
|
5935
|
-
})
|
|
5936
|
-
timeout: 15000
|
|
5937
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
5938
|
-
);
|
|
5939
|
-
|
|
5982
|
+
}));
|
|
5940
5983
|
processStackWhenIdle();
|
|
5941
5984
|
};
|
|
5942
5985
|
let sizeSetFastPath = false;
|
package/server/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.8.
|
|
14
|
+
export const version = "4.8.24";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1126,7 +1126,7 @@ type ExtraDisplayTransformers<InputDisplay extends ModernDisplay, OutputDisplay
|
|
|
1126
1126
|
* If the category display transformer was called due to navigating to a listing using a <CategoryPage> component, currentListing will be set and contain a promise that can be used to get information of said listing.
|
|
1127
1127
|
*/
|
|
1128
1128
|
currentListing?: Promise<ProductListing>;
|
|
1129
|
-
}) => CanBePromiseWrapped<OutputDisplay>;
|
|
1129
|
+
}) => CanBePromiseWrapped<OutputDisplay[]>;
|
|
1130
1130
|
categories?: <T extends ProductListingWithAncestors | ListingSuggestionForTransformer>(options: DisplayTransformerAlwaysThereData & {
|
|
1131
1131
|
data: T[];
|
|
1132
1132
|
}) => CanBePromiseWrapped<T[]>;
|
|
@@ -1538,7 +1538,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1538
1538
|
* Open the modal with support for alignment.
|
|
1539
1539
|
* @returns {void}
|
|
1540
1540
|
*/
|
|
1541
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1541
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1542
1542
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1543
1543
|
export interface PageReplacer {
|
|
1544
1544
|
readonly render_: () => Node_Array;
|
|
@@ -1618,5 +1618,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1618
1618
|
layout?: PossibleLayout;
|
|
1619
1619
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1620
1620
|
showSliderArrow_?: boolean;
|
|
1621
|
-
}): import("@depict-ai/utilishared
|
|
1621
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1622
1622
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/server/latest/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
|
|
|
7
7
|
/*! Depict.ai search and product listing SDK */
|
|
8
8
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
9
9
|
register_es_version("ui", "latest");
|
|
10
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.24";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $i7OB2$createSignal(false);
|
|
13
13
|
$i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({
|
|
@@ -5752,6 +5752,53 @@ function $4ea56971d92eb0cd$export$2972b890694ced75(callback, {
|
|
|
5752
5752
|
}, timeout + 1000);
|
|
5753
5753
|
return cancel;
|
|
5754
5754
|
}
|
|
5755
|
+
function $f71681eb5d5aae0a$export$566cd7e46bad5c2d(callback) {
|
|
5756
|
+
const worstCaseIdleDeadline = 15000;
|
|
5757
|
+
const cancelFrameCheck = $f71681eb5d5aae0a$var$checkForFrameDipsUntil(2000, () => {
|
|
5758
|
+
cancelIdleCallback();
|
|
5759
|
+
callback({
|
|
5760
|
+
didTimeout: false,
|
|
5761
|
+
timeRemaining: () => 300
|
|
5762
|
+
});
|
|
5763
|
+
});
|
|
5764
|
+
const cancelIdleCallback = $4ea56971d92eb0cd$export$2972b890694ced75(deadline => {
|
|
5765
|
+
cancelFrameCheck();
|
|
5766
|
+
callback(deadline);
|
|
5767
|
+
}, {
|
|
5768
|
+
timeout: worstCaseIdleDeadline
|
|
5769
|
+
});
|
|
5770
|
+
}
|
|
5771
|
+
/**
|
|
5772
|
+
* Calls the provided callback function if the browser ran for checkDuration ms without a frame dip below 10 FPS.
|
|
5773
|
+
*/
|
|
5774
|
+
function $f71681eb5d5aae0a$var$checkForFrameDipsUntil(checkDuration, runWhenNoDips) {
|
|
5775
|
+
const start = performance.now();
|
|
5776
|
+
const noDipsBelow = 20;
|
|
5777
|
+
const fpsOverTime = [];
|
|
5778
|
+
let cleanedUp = false;
|
|
5779
|
+
let lastTime;
|
|
5780
|
+
const check = () => requestAnimationFrame($i7OB2$catchify1(time => {
|
|
5781
|
+
if (cleanedUp) return;
|
|
5782
|
+
if (lastTime === undefined) {
|
|
5783
|
+
lastTime = time;
|
|
5784
|
+
check();
|
|
5785
|
+
return;
|
|
5786
|
+
}
|
|
5787
|
+
const fps = 1000 / (time - lastTime);
|
|
5788
|
+
fpsOverTime.push(fps);
|
|
5789
|
+
if (fps < noDipsBelow) {
|
|
5790
|
+
$i7OB2$dlog(`FPS dipped below ${noDipsBelow} to ${fps}, bailing from requestIdleCallback shortcut - rIC seems legit`, fpsOverTime);
|
|
5791
|
+
return;
|
|
5792
|
+
}
|
|
5793
|
+
lastTime = time;
|
|
5794
|
+
if (time <= start + checkDuration) check();else {
|
|
5795
|
+
$i7OB2$dlog("Short-circuiting requestIdleCallback (probably bugged) due to no frame dips below 50 FPS for ", checkDuration, "ms. FPS:", fpsOverTime);
|
|
5796
|
+
runWhenNoDips();
|
|
5797
|
+
}
|
|
5798
|
+
}));
|
|
5799
|
+
check();
|
|
5800
|
+
return () => cleanedUp = true;
|
|
5801
|
+
}
|
|
5755
5802
|
const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
|
|
5756
5803
|
const $e8ffe11ed01df0fe$export$f8945274f08a3105 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
5757
5804
|
const $e8ffe11ed01df0fe$export$6066eb417ed2e9f7 = /*@__PURE__*/Symbol("listingContextAspectRatios");
|
|
@@ -5815,7 +5862,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
5815
5862
|
if (existingStack) return existingStack.add(fn);
|
|
5816
5863
|
const newStack = new Set([fn]);
|
|
5817
5864
|
if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
|
|
5818
|
-
const processStackWhenIdle = () => $
|
|
5865
|
+
const processStackWhenIdle = () => $f71681eb5d5aae0a$export$566cd7e46bad5c2d($i7OB2$catchify1(deadline => {
|
|
5819
5866
|
const start = performance.now();
|
|
5820
5867
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
5821
5868
|
for (const fn of newStack) {
|
|
@@ -5830,11 +5877,7 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
|
5830
5877
|
}
|
|
5831
5878
|
// Stack is empty
|
|
5832
5879
|
if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
|
|
5833
|
-
})
|
|
5834
|
-
timeout: 15000
|
|
5835
|
-
} // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
|
|
5836
|
-
);
|
|
5837
|
-
|
|
5880
|
+
}));
|
|
5838
5881
|
processStackWhenIdle();
|
|
5839
5882
|
};
|
|
5840
5883
|
let sizeSetFastPath = false;
|