@depict-ai/ui 2.0.14 → 2.0.16
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 +271 -169
- package/ES10/index.d.ts +50 -33
- package/ES10/index.js +271 -173
- package/latest/index.cjs +258 -158
- package/latest/index.d.ts +50 -33
- package/latest/index.js +258 -162
- package/package.json +1 -1
- package/server/ES10/index.cjs +261 -158
- package/server/ES10/index.d.ts +50 -33
- package/server/ES10/index.js +261 -162
- package/server/latest/index.cjs +248 -147
- package/server/latest/index.d.ts +50 -33
- package/server/latest/index.js +248 -151
package/ES10/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info,
|
|
2
|
-
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement,
|
|
3
|
-
import {
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, queueMacroTask as $8tj43$queueMacroTask, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, observer as $8tj43$observer, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, slider_fractional_factory as $8tj43$slider_fractional_factory, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, report as $8tj43$report, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, dlog as $8tj43$dlog, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, javascript_media_query as $8tj43$javascript_media_query, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { createComponent as $8tj43$createComponent, template as $8tj43$template, getNextElement as $8tj43$getNextElement, effect as $8tj43$effect, style as $8tj43$style, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps, runHydrationEvents as $8tj43$runHydrationEvents, insert as $8tj43$insert, setAttribute as $8tj43$setAttribute, isServer as $8tj43$isServer, addEventListener as $8tj43$addEventListener, className as $8tj43$className, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, classList as $8tj43$classList, getNextMarker as $8tj43$getNextMarker, Dynamic as $8tj43$Dynamic, use as $8tj43$use } from "solid-js/web";
|
|
3
|
+
import { createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, createContext as $8tj43$createContext, useContext as $8tj43$useContext, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, Show as $8tj43$Show, createRenderEffect as $8tj43$createRenderEffect, createRoot as $8tj43$createRoot, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, untrack as $8tj43$untrack, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, on as $8tj43$on, batch as $8tj43$batch, createReaction as $8tj43$createReaction } from "solid-js";
|
|
4
4
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
5
5
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
6
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
@@ -8,7 +8,138 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
8
8
|
/*! Depict.ai search and product listing SDK */
|
|
9
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
10
|
register_es_version("ui", "ES10");
|
|
11
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.16";
|
|
12
|
+
const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$8tj43$createContext();
|
|
13
|
+
function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
14
|
+
const our_object = {};
|
|
15
|
+
return $8tj43$createComponent($5441862cd2f5e111$var$ListingContext.Provider, {
|
|
16
|
+
value: our_object,
|
|
17
|
+
get children() {
|
|
18
|
+
return props.children;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function $5441862cd2f5e111$export$8d0c4fdbb05a2f2e() {
|
|
23
|
+
return $8tj43$useContext($5441862cd2f5e111$var$ListingContext);
|
|
24
|
+
}
|
|
25
|
+
const $801e8845d3fa3653$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div></div>`, 2);
|
|
26
|
+
function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
|
|
27
|
+
return (() => {
|
|
28
|
+
const _el$ = $8tj43$getNextElement($801e8845d3fa3653$var$_tmpl$);
|
|
29
|
+
$8tj43$effect(_$p => $8tj43$style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"), _$p));
|
|
30
|
+
return _el$;
|
|
31
|
+
})();
|
|
32
|
+
}
|
|
33
|
+
const $56047603f9d212b6$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<img>`, 1);
|
|
34
|
+
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
35
|
+
const [size, setSize] = $8tj43$createSignal(0);
|
|
36
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
|
|
37
|
+
for (let j = 0; j < records.length; j++) {
|
|
38
|
+
const {
|
|
39
|
+
width: width
|
|
40
|
+
} = records[j].contentRect;
|
|
41
|
+
if (!width) continue;
|
|
42
|
+
// add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
|
|
43
|
+
const new_size = width * 1.05 * ((0, $8tj43$is_safari) ? 4 / 3 : 1);
|
|
44
|
+
setSize(Math.round(new_size));
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
47
|
+
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
48
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
49
|
+
const disconnect = (0, $8tj43$observer).onexists(whatToWatch, _ref => {
|
|
50
|
+
let {
|
|
51
|
+
element: element
|
|
52
|
+
} = _ref;
|
|
53
|
+
return requestAnimationFrame($8tj43$catchify(() => resizeObserver.observe(element)));
|
|
54
|
+
});
|
|
55
|
+
$8tj43$onCleanup(() => {
|
|
56
|
+
resizeObserver.disconnect();
|
|
57
|
+
disconnect();
|
|
58
|
+
});
|
|
59
|
+
return size;
|
|
60
|
+
}
|
|
61
|
+
function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
62
|
+
// Enable reactive props
|
|
63
|
+
const otherOptions = $8tj43$createMemo(() => {
|
|
64
|
+
const cloned_props = {
|
|
65
|
+
...props
|
|
66
|
+
};
|
|
67
|
+
delete cloned_props.resolutions;
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
delete cloned_props.size;
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
delete cloned_props.src;
|
|
72
|
+
return cloned_props;
|
|
73
|
+
});
|
|
74
|
+
const src_options = $8tj43$createMemo(() => {
|
|
75
|
+
const src = new URL(props.src, location.origin);
|
|
76
|
+
const fallback_src = $56047603f9d212b6$var$generateImageUrl(src, 400);
|
|
77
|
+
const srcset = $56047603f9d212b6$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096]);
|
|
78
|
+
return {
|
|
79
|
+
src: fallback_src,
|
|
80
|
+
srcset: srcset
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
return (() => {
|
|
84
|
+
const _el$ = $8tj43$getNextElement($56047603f9d212b6$var$_tmpl$);
|
|
85
|
+
$8tj43$spread(_el$, $8tj43$mergeProps(otherOptions, src_options, {
|
|
86
|
+
get sizes() {
|
|
87
|
+
return props.size() + "px";
|
|
88
|
+
}
|
|
89
|
+
}), false, false);
|
|
90
|
+
$8tj43$runHydrationEvents();
|
|
91
|
+
return _el$;
|
|
92
|
+
})();
|
|
93
|
+
}
|
|
94
|
+
function $56047603f9d212b6$var$make_srcset(url, resolutions) {
|
|
95
|
+
return resolutions.map(width => "".concat($56047603f9d212b6$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
|
|
96
|
+
}
|
|
97
|
+
function $56047603f9d212b6$var$generateImageUrl(url, width) {
|
|
98
|
+
url.searchParams.set("width", width);
|
|
99
|
+
return url.href;
|
|
100
|
+
}
|
|
101
|
+
const $4df489344a0f97c7$var$backupSizeSignal = /*@__PURE__*/$8tj43$createSignal();
|
|
102
|
+
const $4df489344a0f97c7$export$d7b7ab832c20e2f4 = /*@__PURE__*/Symbol("ShopifyContainedImage");
|
|
103
|
+
function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
104
|
+
const context = $5441862cd2f5e111$export$8d0c4fdbb05a2f2e();
|
|
105
|
+
if (context && !context[$4df489344a0f97c7$export$d7b7ab832c20e2f4])
|
|
106
|
+
// create a signal that's the same for all items in this listing
|
|
107
|
+
context[$4df489344a0f97c7$export$d7b7ab832c20e2f4] = $8tj43$createSignal();
|
|
108
|
+
const [currentImageSize, setCurrentImageSize] = (context === null || context === void 0 ? void 0 : context[$4df489344a0f97c7$export$d7b7ab832c20e2f4]) || $4df489344a0f97c7$var$backupSizeSignal; // use global fallback signal (might lead to blurry images) if no context is available
|
|
109
|
+
const container = $8tj43$createComponent((0, $801e8845d3fa3653$export$94026ee33dbabc26), {
|
|
110
|
+
get aspectRatio() {
|
|
111
|
+
return props.aspectRatio;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
const owner = $8tj43$getOwner();
|
|
115
|
+
let createdSizeAccessor = false;
|
|
116
|
+
let wasCleanedUp = false;
|
|
117
|
+
$8tj43$createEffect(() => {
|
|
118
|
+
if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
|
|
119
|
+
// ensure we always have a size accessor
|
|
120
|
+
// what this whole thing does is set the sizes attribute to the actual size of one of the existing image containers, therefore the value doesn't have to manually be specified
|
|
121
|
+
setCurrentImageSize(() => $8tj43$runWithOwner(owner, () => $56047603f9d212b6$export$e6fffe67d4cdd848(container)));
|
|
122
|
+
});
|
|
123
|
+
$8tj43$onCleanup(() => {
|
|
124
|
+
wasCleanedUp = true; // important to set this before the function call below and always, so the dead effects don't create dead size accessors
|
|
125
|
+
if (!createdSizeAccessor) return;
|
|
126
|
+
$8tj43$queueMacroTask(() => setCurrentImageSize(undefined)); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
container.append($8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), {
|
|
130
|
+
style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
|
|
131
|
+
get size() {
|
|
132
|
+
return $8tj43$createMemo(() => {
|
|
133
|
+
var _currentImageSize;
|
|
134
|
+
return ((_currentImageSize = currentImageSize()) === null || _currentImageSize === void 0 ? void 0 : _currentImageSize()) || 0;
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
get src() {
|
|
138
|
+
return props.src;
|
|
139
|
+
}
|
|
140
|
+
}));
|
|
141
|
+
return container;
|
|
142
|
+
}
|
|
12
143
|
const $ca6ab5f08bd28bca$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 26"><path d="M2 24.656c-.078 0-.156-.016-.234-.047s-.133-.066-.187-.129c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422l10.371-10.371L1.578 2.883c-.117-.117-.176-.258-.176-.422s.059-.305.176-.422.258-.176.422-.176.305.059.422.176l10.805 10.793a.59.59 0 0 1 .176.434c0 .172-.059.305-.176.422L2.422 24.48a.42.42 0 0 1-.199.129.54.54 0 0 1-.223.047zm0 0" fill="#0f0f0f"></path></svg>`, 4);
|
|
13
144
|
function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
|
|
14
145
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -645,17 +776,21 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
|
|
|
645
776
|
const [recommendations_resource_] = $8tj43$createResource(() => props.recommendations, recs => recs);
|
|
646
777
|
return (() => {
|
|
647
778
|
const _el$ = $8tj43$getNextElement($d5d7e58c5c9d8db0$var$_tmpl$);
|
|
648
|
-
$8tj43$insert(_el$, (
|
|
649
|
-
|
|
650
|
-
return
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
779
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
780
|
+
get children() {
|
|
781
|
+
return $39ddb986053fb759$export$d41d19e89346fa2({
|
|
782
|
+
product_card_template_: function () {
|
|
783
|
+
return props.product_card_template(...arguments);
|
|
784
|
+
},
|
|
785
|
+
recommendations_resource_: recommendations_resource_,
|
|
786
|
+
market_: () => props.market,
|
|
787
|
+
merchant_: () => props.merchant,
|
|
788
|
+
layout_options_: $8tj43$createMemo(() => ({
|
|
789
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
790
|
+
...grid_spacing_override()
|
|
791
|
+
}))
|
|
792
|
+
});
|
|
793
|
+
}
|
|
659
794
|
}));
|
|
660
795
|
return _el$;
|
|
661
796
|
})();
|
|
@@ -765,89 +900,27 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
|
|
|
765
900
|
const [recommendations_resource_] = $8tj43$createResource(() => props.recommendations, recs => recs);
|
|
766
901
|
return (() => {
|
|
767
902
|
const _el$2 = $8tj43$getNextElement($b432b11321ad4c97$var$_tmpl$2);
|
|
768
|
-
$8tj43$insert(_el$2, (
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
903
|
+
$8tj43$insert(_el$2, $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
904
|
+
get children() {
|
|
905
|
+
return $e3efeb558d952696$export$7da560f849543dff({
|
|
906
|
+
rows_object_: rows_object_,
|
|
907
|
+
product_card_template_: function () {
|
|
908
|
+
return props.product_card_template(...arguments);
|
|
909
|
+
},
|
|
910
|
+
recommendations_resource_: recommendations_resource_,
|
|
911
|
+
market_: () => props.market,
|
|
912
|
+
merchant_: () => props.merchant,
|
|
913
|
+
layout_options_: $8tj43$createMemo(() => ({
|
|
914
|
+
cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
|
|
915
|
+
...grid_spacing_override()
|
|
916
|
+
}))
|
|
917
|
+
});
|
|
918
|
+
}
|
|
780
919
|
}));
|
|
781
920
|
return _el$2;
|
|
782
921
|
})();
|
|
783
922
|
}, "RecommendationGrid failed");
|
|
784
923
|
}
|
|
785
|
-
const $56047603f9d212b6$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<img>`, 1);
|
|
786
|
-
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
787
|
-
const [size, setSize] = $8tj43$createSignal(0);
|
|
788
|
-
const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
|
|
789
|
-
for (let j = 0; j < records.length; j++) {
|
|
790
|
-
const {
|
|
791
|
-
width: width
|
|
792
|
-
} = records[j].contentRect;
|
|
793
|
-
if (!width) continue;
|
|
794
|
-
// add extra 5% just in case. + safari is (in some cases) acting a bit questionable and needs a third extra to fill the set width
|
|
795
|
-
const new_size = width * 1.05 * ((0, $8tj43$is_safari) ? 4 / 3 : 1);
|
|
796
|
-
setSize(Math.round(new_size));
|
|
797
|
-
}
|
|
798
|
-
}));
|
|
799
|
-
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
800
|
-
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
801
|
-
const disconnect = (0, $8tj43$observer).onexists(whatToWatch, _ref => {
|
|
802
|
-
let {
|
|
803
|
-
element: element
|
|
804
|
-
} = _ref;
|
|
805
|
-
return requestAnimationFrame($8tj43$catchify(() => resizeObserver.observe(element)));
|
|
806
|
-
});
|
|
807
|
-
$8tj43$onCleanup(() => {
|
|
808
|
-
resizeObserver.disconnect();
|
|
809
|
-
disconnect();
|
|
810
|
-
});
|
|
811
|
-
return size;
|
|
812
|
-
}
|
|
813
|
-
function $56047603f9d212b6$export$6e5611bc7e57e477(_ref2) {
|
|
814
|
-
let {
|
|
815
|
-
src: raw_src,
|
|
816
|
-
size: size,
|
|
817
|
-
resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
|
|
818
|
-
...otherOptions
|
|
819
|
-
} = _ref2;
|
|
820
|
-
const src = new URL(raw_src, location.origin);
|
|
821
|
-
const fallbackSrc = $56047603f9d212b6$var$generateImageUrl(src, 400);
|
|
822
|
-
const srcset = $56047603f9d212b6$var$make_srcset(src, resolutions);
|
|
823
|
-
return (() => {
|
|
824
|
-
const _el$ = $8tj43$getNextElement($56047603f9d212b6$var$_tmpl$);
|
|
825
|
-
$8tj43$spread(_el$, $8tj43$mergeProps(otherOptions, {
|
|
826
|
-
"src": fallbackSrc,
|
|
827
|
-
"srcset": srcset,
|
|
828
|
-
get sizes() {
|
|
829
|
-
return size() + "px";
|
|
830
|
-
}
|
|
831
|
-
}), false, false);
|
|
832
|
-
$8tj43$runHydrationEvents();
|
|
833
|
-
return _el$;
|
|
834
|
-
})();
|
|
835
|
-
}
|
|
836
|
-
function $56047603f9d212b6$var$make_srcset(url, resolutions) {
|
|
837
|
-
return resolutions.map(width => "".concat($56047603f9d212b6$var$generateImageUrl(url, width), " ").concat(width, "w")).join(", ");
|
|
838
|
-
}
|
|
839
|
-
function $56047603f9d212b6$var$generateImageUrl(url, width) {
|
|
840
|
-
url.searchParams.set("width", width);
|
|
841
|
-
return url.href;
|
|
842
|
-
}
|
|
843
|
-
const $801e8845d3fa3653$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div></div>`, 2);
|
|
844
|
-
function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
|
|
845
|
-
return (() => {
|
|
846
|
-
const _el$ = $8tj43$getNextElement($801e8845d3fa3653$var$_tmpl$);
|
|
847
|
-
$8tj43$effect(_$p => $8tj43$style(_el$, "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"), _$p));
|
|
848
|
-
return _el$;
|
|
849
|
-
})();
|
|
850
|
-
}
|
|
851
924
|
function $8e8b179489080711$export$5bad61ecde080b1f() {
|
|
852
925
|
const {
|
|
853
926
|
collapse: collapse,
|
|
@@ -6965,26 +7038,30 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6965
7038
|
severity_: "error",
|
|
6966
7039
|
message_: "Showing results failed",
|
|
6967
7040
|
get children() {
|
|
6968
|
-
return $
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
7041
|
+
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
7042
|
+
get children() {
|
|
7043
|
+
return $7faea0096f14b59b$export$3925f87b1545cfc6({
|
|
7044
|
+
min_products_to_fetch_:
|
|
7045
|
+
// if you want to get if all products have been loaded you can add an optional signal here, see SearchPage
|
|
7046
|
+
min_products_to_fetch_,
|
|
7047
|
+
query_base_: query_base_,
|
|
7048
|
+
plp_results_: plp_results_,
|
|
7049
|
+
depict_api_: depict_api_,
|
|
7050
|
+
first_result_in_viewport_: first_result_in_viewport_,
|
|
7051
|
+
last_result_in_viewport_: last_result_in_viewport_,
|
|
7052
|
+
scroll_restoration_data_: scroll_restoration_data_,
|
|
7053
|
+
layout_options_: layout_options_,
|
|
7054
|
+
product_card_template_: product_card_template_,
|
|
7055
|
+
sort_or_filter_open_: sort_or_filter_open_,
|
|
7056
|
+
desktop_filter_elements_: desktop_filter_elements_,
|
|
7057
|
+
id_currently_querying_for_: query_id_,
|
|
7058
|
+
no_results_options_: {
|
|
7059
|
+
selected_filters_: selected_filters_,
|
|
7060
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
7061
|
+
i18n_: i18n_,
|
|
7062
|
+
local_filter_cache_: local_filter_cache_
|
|
7063
|
+
}
|
|
7064
|
+
});
|
|
6988
7065
|
}
|
|
6989
7066
|
});
|
|
6990
7067
|
}
|
|
@@ -8105,10 +8182,12 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
8105
8182
|
} = _ref;
|
|
8106
8183
|
const [get_showing_recommendation_rows] = showing_recommendation_rows_; // We reset this in after_submit in search.tsx FYI
|
|
8107
8184
|
const rows_object = view_more_button_ ? $8ef6232475d44150$var$make_state_saved_rows(showing_recommendation_rows_, i18n_) : "all";
|
|
8108
|
-
const [recommendations_resource] = $8tj43$createResource(
|
|
8109
|
-
|
|
8185
|
+
const [recommendations_resource] = $8tj43$createResource(() => all_products_loaded_() && search_query_base_(),
|
|
8186
|
+
// only fetch/refetch if all products are loaded
|
|
8187
|
+
query => query && depict_api_.get_recommended(query).then(r => r.displays));
|
|
8188
|
+
const should_show = $8tj43$createMemo(() => {
|
|
8110
8189
|
var _recommendations_reso;
|
|
8111
|
-
return recommendations_resource.loading || (
|
|
8190
|
+
return !!((recommendations_resource.loading || (_recommendations_reso = recommendations_resource()) !== null && _recommendations_reso !== void 0 && _recommendations_reso.length) && all_products_loaded_());
|
|
8112
8191
|
});
|
|
8113
8192
|
const num_placeholders_ = $8tj43$createMemo(() => (0, $981356a8bf29ad72$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_().cols_at_size.map(_ref2 => {
|
|
8114
8193
|
let [per_column] = _ref2;
|
|
@@ -8142,7 +8221,10 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
8142
8221
|
get children() {
|
|
8143
8222
|
return (() => {
|
|
8144
8223
|
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
8145
|
-
const displays_by_key_ = $2d7bad8684bc7f44$export$7f8bd308237ab5a5($8tj43$createMemo(
|
|
8224
|
+
const displays_by_key_ = $2d7bad8684bc7f44$export$7f8bd308237ab5a5($8tj43$createMemo(prev => {
|
|
8225
|
+
if (!should_show() && prev) return prev; // When we're invisible, don't update what we're rendering to be possibly undefined to preserve the same products if possible
|
|
8226
|
+
return recommendations_resource() || [];
|
|
8227
|
+
}));
|
|
8146
8228
|
return $2d7bad8684bc7f44$export$43f0fb951fcb0c54({
|
|
8147
8229
|
displays_by_key_: displays_by_key_,
|
|
8148
8230
|
merchant_: $8tj43$createMemo(() => search_query_base_().tenant),
|
|
@@ -8158,7 +8240,7 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
8158
8240
|
})();
|
|
8159
8241
|
return $8tj43$createComponent((0, $8tj43$Show), {
|
|
8160
8242
|
get when() {
|
|
8161
|
-
return
|
|
8243
|
+
return should_show();
|
|
8162
8244
|
},
|
|
8163
8245
|
children: elements
|
|
8164
8246
|
});
|
|
@@ -9687,17 +9769,21 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9687
9769
|
severity_: "error",
|
|
9688
9770
|
message_: "Instant results failed",
|
|
9689
9771
|
get children() {
|
|
9690
|
-
return $
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9772
|
+
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
9773
|
+
get children() {
|
|
9774
|
+
return $f7414b949aeabc90$export$62f101a8aa597bf8({
|
|
9775
|
+
search_field_value_: search_field_value_,
|
|
9776
|
+
depict_api_: depict_api_,
|
|
9777
|
+
tenant_: tenant_,
|
|
9778
|
+
i18n_: i18n_,
|
|
9779
|
+
market_: market_,
|
|
9780
|
+
set_total_num_results_accessor_: set_total_num_results_accessor_,
|
|
9781
|
+
router_: router_,
|
|
9782
|
+
set_modal_search_results_: set_modal_search_results_,
|
|
9783
|
+
content_search_enabled_: content_search_enabled_,
|
|
9784
|
+
...instant_results_options_
|
|
9785
|
+
});
|
|
9786
|
+
}
|
|
9701
9787
|
});
|
|
9702
9788
|
}
|
|
9703
9789
|
}), _el$10, _co$2);
|
|
@@ -10664,14 +10750,18 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10664
10750
|
return content_search_enabled_();
|
|
10665
10751
|
},
|
|
10666
10752
|
get children() {
|
|
10667
|
-
return $8tj43$createComponent((0, $
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
|
|
10672
|
-
|
|
10673
|
-
|
|
10674
|
-
|
|
10753
|
+
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
10754
|
+
get children() {
|
|
10755
|
+
return $8tj43$createComponent((0, $d53ebed6f63304e4$export$6d0c9c22f6652669), {
|
|
10756
|
+
content_results_rows_: content_results_rows_,
|
|
10757
|
+
search_results_: search_results_,
|
|
10758
|
+
i18n_: i18n_,
|
|
10759
|
+
get_search_query_: get_search_query_,
|
|
10760
|
+
layout_options_: content_layout_options_,
|
|
10761
|
+
router_: router_,
|
|
10762
|
+
query_base_: search_query_base_
|
|
10763
|
+
});
|
|
10764
|
+
}
|
|
10675
10765
|
});
|
|
10676
10766
|
}
|
|
10677
10767
|
});
|
|
@@ -10706,28 +10796,32 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10706
10796
|
severity_: "error",
|
|
10707
10797
|
message_: "Search results failed",
|
|
10708
10798
|
get children() {
|
|
10709
|
-
return $
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10730
|
-
|
|
10799
|
+
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
10800
|
+
get children() {
|
|
10801
|
+
return $7faea0096f14b59b$export$3925f87b1545cfc6({
|
|
10802
|
+
all_products_loaded_: all_products_loaded_,
|
|
10803
|
+
min_products_to_fetch_: min_products_to_fetch_,
|
|
10804
|
+
query_base_: search_query_base_,
|
|
10805
|
+
plp_results_: search_results_,
|
|
10806
|
+
depict_api_: depict_api_,
|
|
10807
|
+
first_result_in_viewport_: first_result_in_viewport_,
|
|
10808
|
+
last_result_in_viewport_: last_result_in_viewport_,
|
|
10809
|
+
scroll_restoration_data_: scroll_restoration_data_,
|
|
10810
|
+
desktop_filter_elements_: desktop_filter_elements_,
|
|
10811
|
+
product_card_template_: product_card_template_,
|
|
10812
|
+
layout_options_: layout_options_,
|
|
10813
|
+
sort_or_filter_open_: sort_or_filter_open_,
|
|
10814
|
+
id_currently_querying_for_: get_search_query_,
|
|
10815
|
+
no_results_options_: {
|
|
10816
|
+
selected_filters_: selected_filters_,
|
|
10817
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10818
|
+
local_filter_cache_: local_filter_cache_,
|
|
10819
|
+
i18n_: {
|
|
10820
|
+
...i18n_,
|
|
10821
|
+
no_results_text_: no_results_text_
|
|
10822
|
+
}
|
|
10823
|
+
}
|
|
10824
|
+
});
|
|
10731
10825
|
}
|
|
10732
10826
|
});
|
|
10733
10827
|
}
|
|
@@ -10740,20 +10834,24 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10740
10834
|
severity_: "error",
|
|
10741
10835
|
message_: "Search recommendations failed",
|
|
10742
10836
|
get children() {
|
|
10743
|
-
return $8tj43$createComponent((0, $
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
|
|
10749
|
-
|
|
10750
|
-
|
|
10837
|
+
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
10838
|
+
get children() {
|
|
10839
|
+
return $8tj43$createComponent((0, $8ef6232475d44150$export$7de92c4c2205ebf3), {
|
|
10840
|
+
depict_api_: depict_api_,
|
|
10841
|
+
i18n_: i18n_,
|
|
10842
|
+
search_query_base_: search_query_base_,
|
|
10843
|
+
get layout_options_() {
|
|
10844
|
+
return $8tj43$createMemo(() => {
|
|
10845
|
+
var _recommendations_layo;
|
|
10846
|
+
return (_recommendations_layo = recommendations_layout_options_ === null || recommendations_layout_options_ === void 0 ? void 0 : recommendations_layout_options_()) !== null && _recommendations_layo !== void 0 ? _recommendations_layo : layout_options_();
|
|
10847
|
+
});
|
|
10848
|
+
},
|
|
10849
|
+
showing_recommendation_rows_: showing_recommendation_rows_,
|
|
10850
|
+
view_more_button_: search_recs_view_more_,
|
|
10851
|
+
product_card_template_: product_card_template_,
|
|
10852
|
+
all_products_loaded_: get_all_products_loaded
|
|
10751
10853
|
});
|
|
10752
|
-
}
|
|
10753
|
-
showing_recommendation_rows_: showing_recommendation_rows_,
|
|
10754
|
-
view_more_button_: search_recs_view_more_,
|
|
10755
|
-
product_card_template_: product_card_template_,
|
|
10756
|
-
all_products_loaded_: get_all_products_loaded
|
|
10854
|
+
}
|
|
10757
10855
|
});
|
|
10758
10856
|
}
|
|
10759
10857
|
});
|
|
@@ -11707,4 +11805,4 @@ const $d399250dfa491636$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
11707
11805
|
const $d399250dfa491636$export$864d304a0bc46829 = "2%";
|
|
11708
11806
|
const $d399250dfa491636$export$7bf543b9d9be2c22 = (0, $fa332ea03168857c$export$b91cec6bdc6b32a1);
|
|
11709
11807
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
11710
|
-
export { $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $0dc044cffe1e825b$export$9f191182275e9ef as make_accurate_size_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, $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, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $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 };
|
|
11808
|
+
export { $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $0dc044cffe1e825b$export$9f191182275e9ef as make_accurate_size_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, $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, $5c5732ef44f05b26$export$58e808b1db15d3bc as fetchDepictRecommendations, $f5f54892fd0c7d9f$export$de035477d6fef996 as QuickLinks, $f5f54892fd0c7d9f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $96fd967c5b358ead$export$643598a327b5833e as get_categories, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $f5f54892fd0c7d9f$export$e2bf8ce7779e827e as CategoryPage, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $eb064bc3350276c1$export$316f6f283ae64765 as SearchField, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $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 };
|