@depict-ai/ui 4.7.19 → 4.7.21
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 +34 -22
- package/ES10/index.d.ts +8 -3
- package/ES10/index.js +34 -23
- package/latest/index.cjs +34 -21
- package/latest/index.d.ts +8 -3
- package/latest/index.js +34 -22
- package/package.json +1 -1
- package/server/ES10/index.cjs +38 -25
- package/server/ES10/index.d.ts +13 -4
- package/server/ES10/index.js +37 -26
- package/server/latest/index.cjs +38 -24
- package/server/latest/index.d.ts +13 -4
- package/server/latest/index.js +37 -25
package/ES10/index.cjs
CHANGED
|
@@ -64,6 +64,7 @@ $parcel$export(module.exports, "SelectedFilters", () => $c5842bdb10e57229$export
|
|
|
64
64
|
$parcel$export(module.exports, "FilterBody", () => $164d474fea221d77$export$3f1a388cc0d8fed7);
|
|
65
65
|
$parcel$export(module.exports, "create_modified_filters", () => $a162c9a08dc208c2$export$b288c38ae3fddb56);
|
|
66
66
|
$parcel$export(module.exports, "SolidLayout", () => $6c2c739b113a8ddf$export$d21e32dfedac04be);
|
|
67
|
+
$parcel$export(module.exports, "SolidLayoutWithProvidedElement", () => $6c2c739b113a8ddf$export$445d8d3f5f706a40);
|
|
67
68
|
$parcel$export(module.exports, "general_modal_abstraction", () => $4cf7d9829d60d844$export$79b1565500412d9b);
|
|
68
69
|
$parcel$export(module.exports, "CrossIcon", () => $083b2336093176cf$export$3b621d86b1566b2);
|
|
69
70
|
$parcel$export(module.exports, "GenericSliderArrowButton", () => $9d19451330d04c3c$export$8be2714ec7f169ee);
|
|
@@ -106,7 +107,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
106
107
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
107
108
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
108
109
|
/*! Depict.ai search and product listing SDK */
|
|
109
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.
|
|
110
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.7.21";
|
|
110
111
|
|
|
111
112
|
/**
|
|
112
113
|
* Gets product_id (the thing we key the rendering on) from a display
|
|
@@ -514,13 +515,15 @@ function $8edd3cf30d1fd8b4$export$a2cc176055f8f08() {
|
|
|
514
515
|
t: "<!-- ".concat(text, " -->")
|
|
515
516
|
} : document.createComment(text);
|
|
516
517
|
}
|
|
517
|
-
|
|
518
|
-
|
|
518
|
+
const $e3915574cfd3466c$var$defaultCacheKey = /*@__PURE__*/Symbol();
|
|
519
|
+
const $e3915574cfd3466c$var$cachedPlaceholderElements = {};
|
|
520
|
+
const $e3915574cfd3466c$var$renderingCachedPlaceholderElement = {};
|
|
519
521
|
function $e3915574cfd3466c$export$f33414a4df0afd3f(_ref) {
|
|
520
522
|
let {
|
|
521
523
|
product_card_template_: product_card_template_,
|
|
522
524
|
num_placeholders_: num_placeholders_,
|
|
523
|
-
content_blocks_: content_blocks_
|
|
525
|
+
content_blocks_: content_blocks_,
|
|
526
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
524
527
|
} = _ref;
|
|
525
528
|
const [num_to_actually_show, set_num_to_actually_show] = $52FdA$solidjs.createSignal($52FdA$solidjs.untrack(num_placeholders_));
|
|
526
529
|
if (0, $52FdA$solidjsweb.isServer)
|
|
@@ -557,7 +560,8 @@ function $e3915574cfd3466c$export$f33414a4df0afd3f(_ref) {
|
|
|
557
560
|
});
|
|
558
561
|
// Show content block before product card, so it's *at* that index
|
|
559
562
|
return [possible_content_block, $e3915574cfd3466c$var$Placeholder({
|
|
560
|
-
product_card_template_: product_card_template_
|
|
563
|
+
product_card_template_: product_card_template_,
|
|
564
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
561
565
|
})]; // https://github.com/solidjs/solid/releases/tag/v1.7.0
|
|
562
566
|
}
|
|
563
567
|
});
|
|
@@ -567,23 +571,25 @@ function $e3915574cfd3466c$export$f33414a4df0afd3f(_ref) {
|
|
|
567
571
|
*/
|
|
568
572
|
function $e3915574cfd3466c$var$Placeholder(_ref2) {
|
|
569
573
|
let {
|
|
570
|
-
product_card_template_: product_card_template_
|
|
574
|
+
product_card_template_: product_card_template_,
|
|
575
|
+
placeholderCacheKey_ = $e3915574cfd3466c$var$defaultCacheKey
|
|
571
576
|
} = _ref2;
|
|
572
577
|
const get_cloned_placeholders = function () {
|
|
573
|
-
let element_to_clone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $e3915574cfd3466c$var$
|
|
578
|
+
let element_to_clone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $e3915574cfd3466c$var$cachedPlaceholderElements[placeholderCacheKey_];
|
|
574
579
|
return Array.isArray(element_to_clone) ? element_to_clone.map(el => el instanceof Node ? el.cloneNode(true) : el) : element_to_clone;
|
|
575
580
|
};
|
|
576
|
-
if ($e3915574cfd3466c$var$
|
|
581
|
+
if ($e3915574cfd3466c$var$cachedPlaceholderElements[placeholderCacheKey_]) return get_cloned_placeholders();
|
|
577
582
|
let dispose_original_copy;
|
|
578
583
|
const get_unwrapped_element = $52FdA$solidjs.createRoot(dispose => {
|
|
579
584
|
dispose_original_copy = dispose;
|
|
580
585
|
// if product_card_template_ is async and rejects the resource will take care of throwing upwards here in the solid-js error handling system
|
|
581
586
|
const [resource] = $52FdA$solidjs.createResource(() => {
|
|
582
|
-
|
|
587
|
+
const rendering_cached_placeholder_element = $e3915574cfd3466c$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
588
|
+
if (rendering_cached_placeholder_element) return rendering_cached_placeholder_element;
|
|
583
589
|
const return_value = product_card_template_(null, undefined);
|
|
584
590
|
if (typeof return_value === "object" && typeof (return_value === null || return_value === void 0 ? void 0 : return_value.then) === "function")
|
|
585
591
|
// Is Promise or promise-like object
|
|
586
|
-
$e3915574cfd3466c$var$
|
|
592
|
+
$e3915574cfd3466c$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = return_value;
|
|
587
593
|
return return_value;
|
|
588
594
|
});
|
|
589
595
|
return $52FdA$solidjs.createMemo(() => {
|
|
@@ -592,14 +598,14 @@ function $e3915574cfd3466c$var$Placeholder(_ref2) {
|
|
|
592
598
|
});
|
|
593
599
|
});
|
|
594
600
|
$52FdA$solidjs.onCleanup(() => {
|
|
595
|
-
|
|
596
|
-
|
|
601
|
+
const rendering = $e3915574cfd3466c$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
602
|
+
if (rendering) {
|
|
597
603
|
// If we're still rendering in our separate root, let the rendering finish or other <Placeholder> components waiting for it might get an incomplete result
|
|
598
604
|
const unset_current_rendering = () => {
|
|
599
605
|
dispose_original_copy();
|
|
600
|
-
$e3915574cfd3466c$var$
|
|
606
|
+
$e3915574cfd3466c$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
601
607
|
};
|
|
602
|
-
|
|
608
|
+
rendering === null || rendering === void 0 || rendering.then(unset_current_rendering, unset_current_rendering);
|
|
603
609
|
} else
|
|
604
610
|
// Otherwise, just make sure we've disposed our root
|
|
605
611
|
dispose_original_copy();
|
|
@@ -611,8 +617,8 @@ function $e3915574cfd3466c$var$Placeholder(_ref2) {
|
|
|
611
617
|
return;
|
|
612
618
|
// placeholders have finished rendering, freeze the elements
|
|
613
619
|
// here we might receive the result of a promise that has already been received, tore down and put into cached_placeholder_element, so don't overwrite that more valid result if it's already set
|
|
614
|
-
$e3915574cfd3466c$var$
|
|
615
|
-
$e3915574cfd3466c$var$
|
|
620
|
+
$e3915574cfd3466c$var$cachedPlaceholderElements[placeholderCacheKey_] || ($e3915574cfd3466c$var$cachedPlaceholderElements[placeholderCacheKey_] = get_cloned_placeholders(unwrapped_array)); // Clone initial return value so that who gave us the elements can't mutate them, which has caused issues before with react
|
|
621
|
+
$e3915574cfd3466c$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
616
622
|
dispose_original_copy(); // So that this memo will never re-run and the placeholder rendering function can clean up
|
|
617
623
|
return get_cloned_placeholders(); // clone, just in case. If we wouldn't, someone could modify the copy in the DOM, and it would affect the cached version
|
|
618
624
|
});
|
|
@@ -929,7 +935,8 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
929
935
|
product_card_template_: product_card_template_,
|
|
930
936
|
layout_options_: layout_options_,
|
|
931
937
|
title_: title_,
|
|
932
|
-
NoResultsFallback_: NoResultsFallback_
|
|
938
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
939
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
933
940
|
} = _ref;
|
|
934
941
|
const is_showing_something = $52FdA$solidjs.createMemo(() => {
|
|
935
942
|
var _recommendations_reso;
|
|
@@ -970,7 +977,8 @@ function $236a257ee52e5414$export$d41d19e89346fa2(_ref) {
|
|
|
970
977
|
get fallback() {
|
|
971
978
|
return $e3915574cfd3466c$export$f33414a4df0afd3f({
|
|
972
979
|
num_placeholders_: num_placeholders_,
|
|
973
|
-
product_card_template_: product_card_template_
|
|
980
|
+
product_card_template_: product_card_template_,
|
|
981
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
974
982
|
});
|
|
975
983
|
},
|
|
976
984
|
get children() {
|
|
@@ -1970,7 +1978,6 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
|
|
|
1970
1978
|
ro.observe(el);
|
|
1971
1979
|
$52FdA$solidjs.onCleanup(() => ro.disconnect());
|
|
1972
1980
|
}, _el$);
|
|
1973
|
-
_el$.classList.toggle("placeholder", !!!display_);
|
|
1974
1981
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
1975
1982
|
get when() {
|
|
1976
1983
|
return display_();
|
|
@@ -2005,6 +2012,7 @@ function $47e3c3102c78121b$export$44809a8a3e867e30(_ref) {
|
|
|
2005
2012
|
pseudoRouter_: pseudoRouter_,
|
|
2006
2013
|
containerHeight_: containerHeight_
|
|
2007
2014
|
}), _el$5, _co$2);
|
|
2015
|
+
$52FdA$solidjsweb.effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
2008
2016
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
2009
2017
|
return _el$;
|
|
2010
2018
|
})();
|
|
@@ -2145,7 +2153,8 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
2145
2153
|
title_: title_,
|
|
2146
2154
|
max_rows_: max_rows_,
|
|
2147
2155
|
view_more_button_: view_more_button_,
|
|
2148
|
-
NoResultsFallback_: NoResultsFallback_
|
|
2156
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
2157
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2149
2158
|
} = _ref;
|
|
2150
2159
|
const rows_object_ = $52FdA$solidjs.createMemo(() => {
|
|
2151
2160
|
var _view_more_button$row;
|
|
@@ -2204,7 +2213,8 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
2204
2213
|
get fallback() {
|
|
2205
2214
|
return $e3915574cfd3466c$export$f33414a4df0afd3f({
|
|
2206
2215
|
num_placeholders_: num_placeholders_,
|
|
2207
|
-
product_card_template_: product_card_template_
|
|
2216
|
+
product_card_template_: product_card_template_,
|
|
2217
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2208
2218
|
});
|
|
2209
2219
|
},
|
|
2210
2220
|
get children() {
|
|
@@ -2237,6 +2247,7 @@ function $2c920813c92d6987$export$7da560f849543dff(_ref) {
|
|
|
2237
2247
|
}
|
|
2238
2248
|
var $e57cd46536ad992e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div style=--animation-duration:240ms>`);
|
|
2239
2249
|
let $e57cd46536ad992e$var$expandedLooksSignal_;
|
|
2250
|
+
const $e57cd46536ad992e$var$placeholderCacheKey_ = /*@__PURE__*/Symbol("Looks");
|
|
2240
2251
|
function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
2241
2252
|
return $d05611ff6b8c8357$export$23fca46f3143581f(() => {
|
|
2242
2253
|
$e57cd46536ad992e$var$expandedLooksSignal_ || ($e57cd46536ad992e$var$expandedLooksSignal_ = $52FdA$solidjs.createSignal(new Set(), {
|
|
@@ -2302,7 +2313,8 @@ function $e57cd46536ad992e$export$2c9f9bf2092486aa(props) {
|
|
|
2302
2313
|
cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
2303
2314
|
...grid_spacing_override()
|
|
2304
2315
|
})),
|
|
2305
|
-
NoResultsFallback_: () => props.NoResultsFallback_
|
|
2316
|
+
NoResultsFallback_: () => props.NoResultsFallback_,
|
|
2317
|
+
placeholderCacheKey_: $e57cd46536ad992e$var$placeholderCacheKey_
|
|
2306
2318
|
};
|
|
2307
2319
|
$52FdA$solidjs.createEffect(() => {
|
|
2308
2320
|
const {
|
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.7.
|
|
14
|
+
export const version = "4.7.21";
|
|
15
15
|
declare const LISTING_ID = "listingId";
|
|
16
16
|
declare const EXTERNAL_ID = "externalId";
|
|
17
17
|
type ScrollRestorationData = {
|
|
@@ -124,6 +124,11 @@ export type SolidLayoutOptions = {
|
|
|
124
124
|
* @return An accessor containing a CSS string
|
|
125
125
|
*/
|
|
126
126
|
export function SolidLayout(props: SolidLayoutOptions): JSX.Element;
|
|
127
|
+
/**
|
|
128
|
+
* See SolidLayout JSDoc except that here you can provide your own element
|
|
129
|
+
* When using insert_after_container, view more and view less buttons are not currently supported.
|
|
130
|
+
*/
|
|
131
|
+
export function SolidLayoutWithProvidedElement(props: Omit<SolidLayoutOptions, "children" | "element_attributes">, container_element: HTMLDivElement, insert_after_container?: boolean, container_class?: string): JSX.Element;
|
|
127
132
|
/** @jsxImportSource solid-js */
|
|
128
133
|
export function GenericSliderArrowButton(props?: {
|
|
129
134
|
width_?: number;
|
|
@@ -1440,7 +1445,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1440
1445
|
* Open the modal with support for alignment.
|
|
1441
1446
|
* @returns {void}
|
|
1442
1447
|
*/
|
|
1443
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1448
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1444
1449
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1445
1450
|
export interface PageReplacer {
|
|
1446
1451
|
readonly render_: () => Node_Array;
|
|
@@ -1519,5 +1524,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1519
1524
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1520
1525
|
layout?: PossibleLayout;
|
|
1521
1526
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1522
|
-
}): import("@depict-ai/utilishared
|
|
1527
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1523
1528
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
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.7.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.21";
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Gets product_id (the thing we key the rendering on) from a display
|
|
@@ -418,13 +418,15 @@ function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
|
|
|
418
418
|
t: "<!-- ".concat(text, " -->")
|
|
419
419
|
} : document.createComment(text);
|
|
420
420
|
}
|
|
421
|
-
|
|
422
|
-
|
|
421
|
+
const $bdd80c7862246dc2$var$defaultCacheKey = /*@__PURE__*/Symbol();
|
|
422
|
+
const $bdd80c7862246dc2$var$cachedPlaceholderElements = {};
|
|
423
|
+
const $bdd80c7862246dc2$var$renderingCachedPlaceholderElement = {};
|
|
423
424
|
function $bdd80c7862246dc2$export$f33414a4df0afd3f(_ref) {
|
|
424
425
|
let {
|
|
425
426
|
product_card_template_: product_card_template_,
|
|
426
427
|
num_placeholders_: num_placeholders_,
|
|
427
|
-
content_blocks_: content_blocks_
|
|
428
|
+
content_blocks_: content_blocks_,
|
|
429
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
428
430
|
} = _ref;
|
|
429
431
|
const [num_to_actually_show, set_num_to_actually_show] = $8tj43$createSignal($8tj43$untrack(num_placeholders_));
|
|
430
432
|
if (0, $8tj43$isServer)
|
|
@@ -461,7 +463,8 @@ function $bdd80c7862246dc2$export$f33414a4df0afd3f(_ref) {
|
|
|
461
463
|
});
|
|
462
464
|
// Show content block before product card, so it's *at* that index
|
|
463
465
|
return [possible_content_block, $bdd80c7862246dc2$var$Placeholder({
|
|
464
|
-
product_card_template_: product_card_template_
|
|
466
|
+
product_card_template_: product_card_template_,
|
|
467
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
465
468
|
})]; // https://github.com/solidjs/solid/releases/tag/v1.7.0
|
|
466
469
|
}
|
|
467
470
|
});
|
|
@@ -471,23 +474,25 @@ function $bdd80c7862246dc2$export$f33414a4df0afd3f(_ref) {
|
|
|
471
474
|
*/
|
|
472
475
|
function $bdd80c7862246dc2$var$Placeholder(_ref2) {
|
|
473
476
|
let {
|
|
474
|
-
product_card_template_: product_card_template_
|
|
477
|
+
product_card_template_: product_card_template_,
|
|
478
|
+
placeholderCacheKey_ = $bdd80c7862246dc2$var$defaultCacheKey
|
|
475
479
|
} = _ref2;
|
|
476
480
|
const get_cloned_placeholders = function () {
|
|
477
|
-
let element_to_clone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $bdd80c7862246dc2$var$
|
|
481
|
+
let element_to_clone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $bdd80c7862246dc2$var$cachedPlaceholderElements[placeholderCacheKey_];
|
|
478
482
|
return Array.isArray(element_to_clone) ? element_to_clone.map(el => el instanceof Node ? el.cloneNode(true) : el) : element_to_clone;
|
|
479
483
|
};
|
|
480
|
-
if ($bdd80c7862246dc2$var$
|
|
484
|
+
if ($bdd80c7862246dc2$var$cachedPlaceholderElements[placeholderCacheKey_]) return get_cloned_placeholders();
|
|
481
485
|
let dispose_original_copy;
|
|
482
486
|
const get_unwrapped_element = $8tj43$createRoot(dispose => {
|
|
483
487
|
dispose_original_copy = dispose;
|
|
484
488
|
// if product_card_template_ is async and rejects the resource will take care of throwing upwards here in the solid-js error handling system
|
|
485
489
|
const [resource] = $8tj43$createResource(() => {
|
|
486
|
-
|
|
490
|
+
const rendering_cached_placeholder_element = $bdd80c7862246dc2$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
491
|
+
if (rendering_cached_placeholder_element) return rendering_cached_placeholder_element;
|
|
487
492
|
const return_value = product_card_template_(null, undefined);
|
|
488
493
|
if (typeof return_value === "object" && typeof (return_value === null || return_value === void 0 ? void 0 : return_value.then) === "function")
|
|
489
494
|
// Is Promise or promise-like object
|
|
490
|
-
$bdd80c7862246dc2$var$
|
|
495
|
+
$bdd80c7862246dc2$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = return_value;
|
|
491
496
|
return return_value;
|
|
492
497
|
});
|
|
493
498
|
return $8tj43$createMemo(() => {
|
|
@@ -496,14 +501,14 @@ function $bdd80c7862246dc2$var$Placeholder(_ref2) {
|
|
|
496
501
|
});
|
|
497
502
|
});
|
|
498
503
|
$8tj43$onCleanup(() => {
|
|
499
|
-
|
|
500
|
-
|
|
504
|
+
const rendering = $bdd80c7862246dc2$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
505
|
+
if (rendering) {
|
|
501
506
|
// If we're still rendering in our separate root, let the rendering finish or other <Placeholder> components waiting for it might get an incomplete result
|
|
502
507
|
const unset_current_rendering = () => {
|
|
503
508
|
dispose_original_copy();
|
|
504
|
-
$bdd80c7862246dc2$var$
|
|
509
|
+
$bdd80c7862246dc2$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
505
510
|
};
|
|
506
|
-
|
|
511
|
+
rendering === null || rendering === void 0 || rendering.then(unset_current_rendering, unset_current_rendering);
|
|
507
512
|
} else
|
|
508
513
|
// Otherwise, just make sure we've disposed our root
|
|
509
514
|
dispose_original_copy();
|
|
@@ -515,8 +520,8 @@ function $bdd80c7862246dc2$var$Placeholder(_ref2) {
|
|
|
515
520
|
return;
|
|
516
521
|
// placeholders have finished rendering, freeze the elements
|
|
517
522
|
// here we might receive the result of a promise that has already been received, tore down and put into cached_placeholder_element, so don't overwrite that more valid result if it's already set
|
|
518
|
-
$bdd80c7862246dc2$var$
|
|
519
|
-
$bdd80c7862246dc2$var$
|
|
523
|
+
$bdd80c7862246dc2$var$cachedPlaceholderElements[placeholderCacheKey_] || ($bdd80c7862246dc2$var$cachedPlaceholderElements[placeholderCacheKey_] = get_cloned_placeholders(unwrapped_array)); // Clone initial return value so that who gave us the elements can't mutate them, which has caused issues before with react
|
|
524
|
+
$bdd80c7862246dc2$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
520
525
|
dispose_original_copy(); // So that this memo will never re-run and the placeholder rendering function can clean up
|
|
521
526
|
return get_cloned_placeholders(); // clone, just in case. If we wouldn't, someone could modify the copy in the DOM, and it would affect the cached version
|
|
522
527
|
});
|
|
@@ -833,7 +838,8 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
833
838
|
product_card_template_: product_card_template_,
|
|
834
839
|
layout_options_: layout_options_,
|
|
835
840
|
title_: title_,
|
|
836
|
-
NoResultsFallback_: NoResultsFallback_
|
|
841
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
842
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
837
843
|
} = _ref;
|
|
838
844
|
const is_showing_something = $8tj43$createMemo(() => {
|
|
839
845
|
var _recommendations_reso;
|
|
@@ -874,7 +880,8 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
874
880
|
get fallback() {
|
|
875
881
|
return $bdd80c7862246dc2$export$f33414a4df0afd3f({
|
|
876
882
|
num_placeholders_: num_placeholders_,
|
|
877
|
-
product_card_template_: product_card_template_
|
|
883
|
+
product_card_template_: product_card_template_,
|
|
884
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
878
885
|
});
|
|
879
886
|
},
|
|
880
887
|
get children() {
|
|
@@ -1874,7 +1881,6 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1874
1881
|
ro.observe(el);
|
|
1875
1882
|
$8tj43$onCleanup(() => ro.disconnect());
|
|
1876
1883
|
}, _el$);
|
|
1877
|
-
_el$.classList.toggle("placeholder", !!!display_);
|
|
1878
1884
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1879
1885
|
get when() {
|
|
1880
1886
|
return display_();
|
|
@@ -1909,6 +1915,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1909
1915
|
pseudoRouter_: pseudoRouter_,
|
|
1910
1916
|
containerHeight_: containerHeight_
|
|
1911
1917
|
}), _el$5, _co$2);
|
|
1918
|
+
$8tj43$effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
1912
1919
|
$8tj43$runHydrationEvents();
|
|
1913
1920
|
return _el$;
|
|
1914
1921
|
})();
|
|
@@ -2049,7 +2056,8 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
2049
2056
|
title_: title_,
|
|
2050
2057
|
max_rows_: max_rows_,
|
|
2051
2058
|
view_more_button_: view_more_button_,
|
|
2052
|
-
NoResultsFallback_: NoResultsFallback_
|
|
2059
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
2060
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2053
2061
|
} = _ref;
|
|
2054
2062
|
const rows_object_ = $8tj43$createMemo(() => {
|
|
2055
2063
|
var _view_more_button$row;
|
|
@@ -2108,7 +2116,8 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
2108
2116
|
get fallback() {
|
|
2109
2117
|
return $bdd80c7862246dc2$export$f33414a4df0afd3f({
|
|
2110
2118
|
num_placeholders_: num_placeholders_,
|
|
2111
|
-
product_card_template_: product_card_template_
|
|
2119
|
+
product_card_template_: product_card_template_,
|
|
2120
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2112
2121
|
});
|
|
2113
2122
|
},
|
|
2114
2123
|
get children() {
|
|
@@ -2141,6 +2150,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
2141
2150
|
}
|
|
2142
2151
|
var $bb34cd283e904784$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div style=--animation-duration:240ms>`);
|
|
2143
2152
|
let $bb34cd283e904784$var$expandedLooksSignal_;
|
|
2153
|
+
const $bb34cd283e904784$var$placeholderCacheKey_ = /*@__PURE__*/Symbol("Looks");
|
|
2144
2154
|
function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
2145
2155
|
return $83e8cf2c0b87a58a$export$23fca46f3143581f(() => {
|
|
2146
2156
|
$bb34cd283e904784$var$expandedLooksSignal_ || ($bb34cd283e904784$var$expandedLooksSignal_ = $8tj43$createSignal(new Set(), {
|
|
@@ -2206,7 +2216,8 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2206
2216
|
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
2207
2217
|
...grid_spacing_override()
|
|
2208
2218
|
})),
|
|
2209
|
-
NoResultsFallback_: () => props.NoResultsFallback_
|
|
2219
|
+
NoResultsFallback_: () => props.NoResultsFallback_,
|
|
2220
|
+
placeholderCacheKey_: $bb34cd283e904784$var$placeholderCacheKey_
|
|
2210
2221
|
};
|
|
2211
2222
|
$8tj43$createEffect(() => {
|
|
2212
2223
|
const {
|
|
@@ -16270,4 +16281,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16270
16281
|
}, "Entire CategoryPage failed");
|
|
16271
16282
|
}
|
|
16272
16283
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16273
|
-
export { $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $697d8713dc82b9ab$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|
|
16284
|
+
export { $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $697d8713dc82b9ab$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|
package/latest/index.cjs
CHANGED
|
@@ -58,6 +58,7 @@ $parcel$export(module.exports, "SelectedFilters", () => $235a2771a44e28e9$export
|
|
|
58
58
|
$parcel$export(module.exports, "FilterBody", () => $aff9a96d30ed3563$export$3f1a388cc0d8fed7);
|
|
59
59
|
$parcel$export(module.exports, "create_modified_filters", () => $70482f04605572e2$export$b288c38ae3fddb56);
|
|
60
60
|
$parcel$export(module.exports, "SolidLayout", () => $f48d0fbb00835aaa$export$d21e32dfedac04be);
|
|
61
|
+
$parcel$export(module.exports, "SolidLayoutWithProvidedElement", () => $f48d0fbb00835aaa$export$445d8d3f5f706a40);
|
|
61
62
|
$parcel$export(module.exports, "general_modal_abstraction", () => $9abb0a35d4b60ed3$export$79b1565500412d9b);
|
|
62
63
|
$parcel$export(module.exports, "CrossIcon", () => $c77c68e559a1506c$export$3b621d86b1566b2);
|
|
63
64
|
$parcel$export(module.exports, "GenericSliderArrowButton", () => $0f313083912e447a$export$8be2714ec7f169ee);
|
|
@@ -100,7 +101,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
100
101
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
101
102
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
102
103
|
/*! Depict.ai search and product listing SDK */
|
|
103
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.
|
|
104
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.7.21";
|
|
104
105
|
|
|
105
106
|
/**
|
|
106
107
|
* Gets product_id (the thing we key the rendering on) from a display
|
|
@@ -496,12 +497,14 @@ function $fc23d7668ae0011d$export$a2cc176055f8f08(what = "grid") {
|
|
|
496
497
|
t: `<!-- ${text} -->`
|
|
497
498
|
} : document.createComment(text);
|
|
498
499
|
}
|
|
499
|
-
|
|
500
|
-
|
|
500
|
+
const $0caf87eaa19079da$var$defaultCacheKey = /*@__PURE__*/Symbol();
|
|
501
|
+
const $0caf87eaa19079da$var$cachedPlaceholderElements = {};
|
|
502
|
+
const $0caf87eaa19079da$var$renderingCachedPlaceholderElement = {};
|
|
501
503
|
function $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
502
504
|
product_card_template_: product_card_template_,
|
|
503
505
|
num_placeholders_: num_placeholders_,
|
|
504
|
-
content_blocks_: content_blocks_
|
|
506
|
+
content_blocks_: content_blocks_,
|
|
507
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
505
508
|
}) {
|
|
506
509
|
const [num_to_actually_show, set_num_to_actually_show] = $gVhhF$solidjs.createSignal($gVhhF$solidjs.untrack(num_placeholders_));
|
|
507
510
|
if (0, $gVhhF$solidjsweb.isServer)
|
|
@@ -535,7 +538,8 @@ function $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
|
535
538
|
const possible_content_block = $gVhhF$solidjs.createMemo(() => content_blocks_?.()?.()?.[index]);
|
|
536
539
|
// Show content block before product card, so it's *at* that index
|
|
537
540
|
return [possible_content_block, $0caf87eaa19079da$var$Placeholder({
|
|
538
|
-
product_card_template_: product_card_template_
|
|
541
|
+
product_card_template_: product_card_template_,
|
|
542
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
539
543
|
})]; // https://github.com/solidjs/solid/releases/tag/v1.7.0
|
|
540
544
|
}
|
|
541
545
|
});
|
|
@@ -544,20 +548,22 @@ function $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
|
544
548
|
* Get one placeholder element. It will be cloned for each placeholder for ultimate performance even when solid-js isn't rendering the placeholders.
|
|
545
549
|
*/
|
|
546
550
|
function $0caf87eaa19079da$var$Placeholder({
|
|
547
|
-
product_card_template_: product_card_template_
|
|
551
|
+
product_card_template_: product_card_template_,
|
|
552
|
+
placeholderCacheKey_ = $0caf87eaa19079da$var$defaultCacheKey
|
|
548
553
|
}) {
|
|
549
|
-
const get_cloned_placeholders = (element_to_clone = $0caf87eaa19079da$var$
|
|
550
|
-
if ($0caf87eaa19079da$var$
|
|
554
|
+
const get_cloned_placeholders = (element_to_clone = $0caf87eaa19079da$var$cachedPlaceholderElements[placeholderCacheKey_]) => Array.isArray(element_to_clone) ? element_to_clone.map(el => el instanceof Node ? el.cloneNode(true) : el) : element_to_clone;
|
|
555
|
+
if ($0caf87eaa19079da$var$cachedPlaceholderElements[placeholderCacheKey_]) return get_cloned_placeholders();
|
|
551
556
|
let dispose_original_copy;
|
|
552
557
|
const get_unwrapped_element = $gVhhF$solidjs.createRoot(dispose => {
|
|
553
558
|
dispose_original_copy = dispose;
|
|
554
559
|
// if product_card_template_ is async and rejects the resource will take care of throwing upwards here in the solid-js error handling system
|
|
555
560
|
const [resource] = $gVhhF$solidjs.createResource(() => {
|
|
556
|
-
|
|
561
|
+
const rendering_cached_placeholder_element = $0caf87eaa19079da$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
562
|
+
if (rendering_cached_placeholder_element) return rendering_cached_placeholder_element;
|
|
557
563
|
const return_value = product_card_template_(null, undefined);
|
|
558
564
|
if (typeof return_value === "object" && typeof return_value?.then === "function")
|
|
559
565
|
// Is Promise or promise-like object
|
|
560
|
-
$0caf87eaa19079da$var$
|
|
566
|
+
$0caf87eaa19079da$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = return_value;
|
|
561
567
|
return return_value;
|
|
562
568
|
});
|
|
563
569
|
return $gVhhF$solidjs.createMemo(() => {
|
|
@@ -566,13 +572,14 @@ function $0caf87eaa19079da$var$Placeholder({
|
|
|
566
572
|
});
|
|
567
573
|
});
|
|
568
574
|
$gVhhF$solidjs.onCleanup(() => {
|
|
569
|
-
|
|
575
|
+
const rendering = $0caf87eaa19079da$var$renderingCachedPlaceholderElement[placeholderCacheKey_];
|
|
576
|
+
if (rendering) {
|
|
570
577
|
// If we're still rendering in our separate root, let the rendering finish or other <Placeholder> components waiting for it might get an incomplete result
|
|
571
578
|
const unset_current_rendering = () => {
|
|
572
579
|
dispose_original_copy();
|
|
573
|
-
$0caf87eaa19079da$var$
|
|
580
|
+
$0caf87eaa19079da$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
574
581
|
};
|
|
575
|
-
|
|
582
|
+
rendering?.then(unset_current_rendering, unset_current_rendering);
|
|
576
583
|
} else
|
|
577
584
|
// Otherwise, just make sure we've disposed our root
|
|
578
585
|
dispose_original_copy();
|
|
@@ -584,8 +591,8 @@ function $0caf87eaa19079da$var$Placeholder({
|
|
|
584
591
|
return;
|
|
585
592
|
// placeholders have finished rendering, freeze the elements
|
|
586
593
|
// here we might receive the result of a promise that has already been received, tore down and put into cached_placeholder_element, so don't overwrite that more valid result if it's already set
|
|
587
|
-
$0caf87eaa19079da$var$
|
|
588
|
-
$0caf87eaa19079da$var$
|
|
594
|
+
$0caf87eaa19079da$var$cachedPlaceholderElements[placeholderCacheKey_] ||= get_cloned_placeholders(unwrapped_array); // Clone initial return value so that who gave us the elements can't mutate them, which has caused issues before with react
|
|
595
|
+
$0caf87eaa19079da$var$renderingCachedPlaceholderElement[placeholderCacheKey_] = undefined;
|
|
589
596
|
dispose_original_copy(); // So that this memo will never re-run and the placeholder rendering function can clean up
|
|
590
597
|
return get_cloned_placeholders(); // clone, just in case. If we wouldn't, someone could modify the copy in the DOM, and it would affect the cached version
|
|
591
598
|
});
|
|
@@ -882,7 +889,8 @@ function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
|
882
889
|
product_card_template_: product_card_template_,
|
|
883
890
|
layout_options_: layout_options_,
|
|
884
891
|
title_: title_,
|
|
885
|
-
NoResultsFallback_: NoResultsFallback_
|
|
892
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
893
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
886
894
|
}) {
|
|
887
895
|
const is_showing_something = $gVhhF$solidjs.createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
|
|
888
896
|
const title = $gVhhF$solidjs.createMemo(() => title_?.()); // In case getter/accessor creates elements, don't create them twice
|
|
@@ -920,7 +928,8 @@ function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
|
920
928
|
get fallback() {
|
|
921
929
|
return $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
922
930
|
num_placeholders_: num_placeholders_,
|
|
923
|
-
product_card_template_: product_card_template_
|
|
931
|
+
product_card_template_: product_card_template_,
|
|
932
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
924
933
|
});
|
|
925
934
|
},
|
|
926
935
|
get children() {
|
|
@@ -1882,7 +1891,6 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1882
1891
|
ro.observe(el);
|
|
1883
1892
|
$gVhhF$solidjs.onCleanup(() => ro.disconnect());
|
|
1884
1893
|
}, _el$);
|
|
1885
|
-
_el$.classList.toggle("placeholder", !!!display_);
|
|
1886
1894
|
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
1887
1895
|
get when() {
|
|
1888
1896
|
return display_();
|
|
@@ -1913,6 +1921,7 @@ function $ad882bbe664dbd53$export$44809a8a3e867e30({
|
|
|
1913
1921
|
pseudoRouter_: pseudoRouter_,
|
|
1914
1922
|
containerHeight_: containerHeight_
|
|
1915
1923
|
}), _el$5, _co$2);
|
|
1924
|
+
$gVhhF$solidjsweb.effect(() => _el$.classList.toggle("placeholder", !display_()));
|
|
1916
1925
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
1917
1926
|
return _el$;
|
|
1918
1927
|
})();
|
|
@@ -2040,7 +2049,8 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
2040
2049
|
title_: title_,
|
|
2041
2050
|
max_rows_: max_rows_,
|
|
2042
2051
|
view_more_button_: view_more_button_,
|
|
2043
|
-
NoResultsFallback_: NoResultsFallback_
|
|
2052
|
+
NoResultsFallback_: NoResultsFallback_,
|
|
2053
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2044
2054
|
}) {
|
|
2045
2055
|
const rows_object_ = $gVhhF$solidjs.createMemo(() => {
|
|
2046
2056
|
const view_more_button = view_more_button_?.();
|
|
@@ -2095,7 +2105,8 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
2095
2105
|
get fallback() {
|
|
2096
2106
|
return $0caf87eaa19079da$export$f33414a4df0afd3f({
|
|
2097
2107
|
num_placeholders_: num_placeholders_,
|
|
2098
|
-
product_card_template_: product_card_template_
|
|
2108
|
+
product_card_template_: product_card_template_,
|
|
2109
|
+
placeholderCacheKey_: placeholderCacheKey_
|
|
2099
2110
|
});
|
|
2100
2111
|
},
|
|
2101
2112
|
get children() {
|
|
@@ -2128,6 +2139,7 @@ function $b8e79813f4f7ebe4$export$7da560f849543dff({
|
|
|
2128
2139
|
}
|
|
2129
2140
|
var $a3bbfa5fdaa39f3a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div style=--animation-duration:240ms>`);
|
|
2130
2141
|
let $a3bbfa5fdaa39f3a$var$expandedLooksSignal_;
|
|
2142
|
+
const $a3bbfa5fdaa39f3a$var$placeholderCacheKey_ = /*@__PURE__*/Symbol("Looks");
|
|
2131
2143
|
function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
2132
2144
|
return $95837413165cc2df$export$23fca46f3143581f(() => {
|
|
2133
2145
|
$a3bbfa5fdaa39f3a$var$expandedLooksSignal_ ||= $gVhhF$solidjs.createSignal(new Set(), {
|
|
@@ -2191,7 +2203,8 @@ function $a3bbfa5fdaa39f3a$export$2c9f9bf2092486aa(props) {
|
|
|
2191
2203
|
cols_at_size: $4e04be41243c3d80$export$6daf8749b65a1b77(props.columnsAtSize_),
|
|
2192
2204
|
...grid_spacing_override()
|
|
2193
2205
|
})),
|
|
2194
|
-
NoResultsFallback_: () => props.NoResultsFallback_
|
|
2206
|
+
NoResultsFallback_: () => props.NoResultsFallback_,
|
|
2207
|
+
placeholderCacheKey_: $a3bbfa5fdaa39f3a$var$placeholderCacheKey_
|
|
2195
2208
|
};
|
|
2196
2209
|
$gVhhF$solidjs.createEffect(() => {
|
|
2197
2210
|
const {
|
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.7.
|
|
14
|
+
export const version = "4.7.21";
|
|
15
15
|
declare const LISTING_ID = "listingId";
|
|
16
16
|
declare const EXTERNAL_ID = "externalId";
|
|
17
17
|
type ScrollRestorationData = {
|
|
@@ -124,6 +124,11 @@ export type SolidLayoutOptions = {
|
|
|
124
124
|
* @return An accessor containing a CSS string
|
|
125
125
|
*/
|
|
126
126
|
export function SolidLayout(props: SolidLayoutOptions): JSX.Element;
|
|
127
|
+
/**
|
|
128
|
+
* See SolidLayout JSDoc except that here you can provide your own element
|
|
129
|
+
* When using insert_after_container, view more and view less buttons are not currently supported.
|
|
130
|
+
*/
|
|
131
|
+
export function SolidLayoutWithProvidedElement(props: Omit<SolidLayoutOptions, "children" | "element_attributes">, container_element: HTMLDivElement, insert_after_container?: boolean, container_class?: string): JSX.Element;
|
|
127
132
|
/** @jsxImportSource solid-js */
|
|
128
133
|
export function GenericSliderArrowButton(props?: {
|
|
129
134
|
width_?: number;
|
|
@@ -1440,7 +1445,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1440
1445
|
* Open the modal with support for alignment.
|
|
1441
1446
|
* @returns {void}
|
|
1442
1447
|
*/
|
|
1443
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1448
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1444
1449
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1445
1450
|
export interface PageReplacer {
|
|
1446
1451
|
readonly render_: () => Node_Array;
|
|
@@ -1519,5 +1524,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1519
1524
|
content_blocks_by_row?: ContentBlocksByRow;
|
|
1520
1525
|
layout?: PossibleLayout;
|
|
1521
1526
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1522
|
-
}): import("@depict-ai/utilishared
|
|
1527
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1523
1528
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|