@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/latest/index.js
CHANGED
|
@@ -1,11 +1,136 @@
|
|
|
1
|
-
import { add_to_version_info as $9HbP8$add_to_version_info,
|
|
2
|
-
import { template as $9HbP8$template, getNextElement as $9HbP8$getNextElement,
|
|
3
|
-
import {
|
|
1
|
+
import { add_to_version_info as $9HbP8$add_to_version_info, queueMacroTask as $9HbP8$queueMacroTask, catchify as $9HbP8$catchify, is_safari as $9HbP8$is_safari, observer as $9HbP8$observer, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, slider_fractional_factory as $9HbP8$slider_fractional_factory, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, report as $9HbP8$report, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, dlog as $9HbP8$dlog, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, javascript_media_query as $9HbP8$javascript_media_query, fetch_recs as $9HbP8$fetch_recs, snakeCasifyObject as $9HbP8$snakeCasifyObject, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base_url as $9HbP8$base_url, get_depict_id as $9HbP8$get_depict_id, get_user_id as $9HbP8$get_user_id, get_session_id as $9HbP8$get_session_id, sort_obj as $9HbP8$sort_obj, fetch_retry as $9HbP8$fetch_retry, add_version_query_params as $9HbP8$add_version_query_params, dwarn as $9HbP8$dwarn, make_url_with_query_params as $9HbP8$make_url_with_query_params, edit_current_page_meta_tags as $9HbP8$edit_current_page_meta_tags, use_href_accessor as $9HbP8$use_href_accessor, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
+
import { createComponent as $9HbP8$createComponent, template as $9HbP8$template, getNextElement as $9HbP8$getNextElement, effect as $9HbP8$effect, style as $9HbP8$style, spread as $9HbP8$spread, mergeProps as $9HbP8$mergeProps, runHydrationEvents as $9HbP8$runHydrationEvents, insert as $9HbP8$insert, setAttribute as $9HbP8$setAttribute, isServer as $9HbP8$isServer, addEventListener as $9HbP8$addEventListener, className as $9HbP8$className, memo as $9HbP8$memo, delegateEvents as $9HbP8$delegateEvents, classList as $9HbP8$classList, getNextMarker as $9HbP8$getNextMarker, Dynamic as $9HbP8$Dynamic, use as $9HbP8$use } from "solid-js/web";
|
|
3
|
+
import { createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, createEffect as $9HbP8$createEffect, runWithOwner as $9HbP8$runWithOwner, onCleanup as $9HbP8$onCleanup, createMemo as $9HbP8$createMemo, createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createResource as $9HbP8$createResource, Suspense as $9HbP8$Suspense, Show as $9HbP8$Show, createRenderEffect as $9HbP8$createRenderEffect, createRoot as $9HbP8$createRoot, For as $9HbP8$For, createUniqueId as $9HbP8$createUniqueId, untrack as $9HbP8$untrack, createComputed as $9HbP8$createComputed, ErrorBoundary as $9HbP8$ErrorBoundary, Index as $9HbP8$Index, on as $9HbP8$on, batch as $9HbP8$batch, createReaction as $9HbP8$createReaction } from "solid-js";
|
|
4
4
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.16";
|
|
9
|
+
const $011607bdf658f807$var$ListingContext = /*@__PURE__*/$9HbP8$createContext();
|
|
10
|
+
function $011607bdf658f807$export$e68cff63f76bd15b(props) {
|
|
11
|
+
const our_object = {};
|
|
12
|
+
return $9HbP8$createComponent($011607bdf658f807$var$ListingContext.Provider, {
|
|
13
|
+
value: our_object,
|
|
14
|
+
get children() {
|
|
15
|
+
return props.children;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function $011607bdf658f807$export$8d0c4fdbb05a2f2e() {
|
|
20
|
+
return $9HbP8$useContext($011607bdf658f807$var$ListingContext);
|
|
21
|
+
}
|
|
22
|
+
const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div></div>`, 2);
|
|
23
|
+
function $f18d425032111270$export$94026ee33dbabc26(props) {
|
|
24
|
+
return (() => {
|
|
25
|
+
const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
|
|
26
|
+
$9HbP8$effect(_$p => $9HbP8$style(_el$, `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`, _$p));
|
|
27
|
+
return _el$;
|
|
28
|
+
})();
|
|
29
|
+
}
|
|
30
|
+
const $e8ffe11ed01df0fe$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<img>`, 1);
|
|
31
|
+
function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
32
|
+
const [size, setSize] = $9HbP8$createSignal(0);
|
|
33
|
+
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
34
|
+
for (let j = 0; j < records.length; j++) {
|
|
35
|
+
const {
|
|
36
|
+
width: width
|
|
37
|
+
} = records[j].contentRect;
|
|
38
|
+
if (!width) continue;
|
|
39
|
+
// 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
|
|
40
|
+
const new_size = width * 1.05 * ((0, $9HbP8$is_safari) ? 4 / 3 : 1);
|
|
41
|
+
setSize(Math.round(new_size));
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
// 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.
|
|
45
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
46
|
+
const disconnect = (0, $9HbP8$observer).onexists(whatToWatch, ({
|
|
47
|
+
element: element
|
|
48
|
+
}) => requestAnimationFrame($9HbP8$catchify(() => resizeObserver.observe(element))));
|
|
49
|
+
$9HbP8$onCleanup(() => {
|
|
50
|
+
resizeObserver.disconnect();
|
|
51
|
+
disconnect();
|
|
52
|
+
});
|
|
53
|
+
return size;
|
|
54
|
+
}
|
|
55
|
+
function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
|
|
56
|
+
// Enable reactive props
|
|
57
|
+
const otherOptions = $9HbP8$createMemo(() => {
|
|
58
|
+
const cloned_props = {
|
|
59
|
+
...props
|
|
60
|
+
};
|
|
61
|
+
delete cloned_props.resolutions;
|
|
62
|
+
// @ts-ignore
|
|
63
|
+
delete cloned_props.size;
|
|
64
|
+
// @ts-ignore
|
|
65
|
+
delete cloned_props.src;
|
|
66
|
+
return cloned_props;
|
|
67
|
+
});
|
|
68
|
+
const src_options = $9HbP8$createMemo(() => {
|
|
69
|
+
const src = new URL(props.src, location.origin);
|
|
70
|
+
const fallback_src = $e8ffe11ed01df0fe$var$generateImageUrl(src, 400);
|
|
71
|
+
const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, props.resolutions || [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096]);
|
|
72
|
+
return {
|
|
73
|
+
src: fallback_src,
|
|
74
|
+
srcset: srcset
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
return (() => {
|
|
78
|
+
const _el$ = $9HbP8$getNextElement($e8ffe11ed01df0fe$var$_tmpl$);
|
|
79
|
+
$9HbP8$spread(_el$, $9HbP8$mergeProps(otherOptions, src_options, {
|
|
80
|
+
get sizes() {
|
|
81
|
+
return props.size() + "px";
|
|
82
|
+
}
|
|
83
|
+
}), false, false);
|
|
84
|
+
$9HbP8$runHydrationEvents();
|
|
85
|
+
return _el$;
|
|
86
|
+
})();
|
|
87
|
+
}
|
|
88
|
+
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
|
|
89
|
+
return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
|
|
90
|
+
}
|
|
91
|
+
function $e8ffe11ed01df0fe$var$generateImageUrl(url, width) {
|
|
92
|
+
url.searchParams.set("width", width);
|
|
93
|
+
return url.href;
|
|
94
|
+
}
|
|
95
|
+
const $660070e2a394b3c3$var$backupSizeSignal = /*@__PURE__*/$9HbP8$createSignal();
|
|
96
|
+
const $660070e2a394b3c3$export$d7b7ab832c20e2f4 = /*@__PURE__*/Symbol("ShopifyContainedImage");
|
|
97
|
+
function $660070e2a394b3c3$export$e4b984597b71e989(props) {
|
|
98
|
+
const context = $011607bdf658f807$export$8d0c4fdbb05a2f2e();
|
|
99
|
+
if (context && !context[$660070e2a394b3c3$export$d7b7ab832c20e2f4])
|
|
100
|
+
// create a signal that's the same for all items in this listing
|
|
101
|
+
context[$660070e2a394b3c3$export$d7b7ab832c20e2f4] = $9HbP8$createSignal();
|
|
102
|
+
const [currentImageSize, setCurrentImageSize] = context?.[$660070e2a394b3c3$export$d7b7ab832c20e2f4] || $660070e2a394b3c3$var$backupSizeSignal; // use global fallback signal (might lead to blurry images) if no context is available
|
|
103
|
+
const container = $9HbP8$createComponent((0, $f18d425032111270$export$94026ee33dbabc26), {
|
|
104
|
+
get aspectRatio() {
|
|
105
|
+
return props.aspectRatio;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
const owner = $9HbP8$getOwner();
|
|
109
|
+
let createdSizeAccessor = false;
|
|
110
|
+
let wasCleanedUp = false;
|
|
111
|
+
$9HbP8$createEffect(() => {
|
|
112
|
+
if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
|
|
113
|
+
// ensure we always have a size accessor
|
|
114
|
+
// 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
|
|
115
|
+
setCurrentImageSize(() => $9HbP8$runWithOwner(owner, () => $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(container)));
|
|
116
|
+
});
|
|
117
|
+
$9HbP8$onCleanup(() => {
|
|
118
|
+
wasCleanedUp = true; // important to set this before the function call below and always, so the dead effects don't create dead size accessors
|
|
119
|
+
if (!createdSizeAccessor) return;
|
|
120
|
+
$9HbP8$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
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
container.append($9HbP8$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
|
|
124
|
+
style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
|
|
125
|
+
get size() {
|
|
126
|
+
return $9HbP8$createMemo(() => currentImageSize()?.() || 0);
|
|
127
|
+
},
|
|
128
|
+
get src() {
|
|
129
|
+
return props.src;
|
|
130
|
+
}
|
|
131
|
+
}));
|
|
132
|
+
return container;
|
|
133
|
+
}
|
|
9
134
|
const $fbbadcb080ad1d4a$var$_tmpl$ = /*#__PURE__*/$9HbP8$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);
|
|
10
135
|
function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
|
|
11
136
|
return (() => {
|
|
@@ -603,15 +728,19 @@ function $ee116da074deb002$export$9574e176201e5e8d(props) {
|
|
|
603
728
|
const [recommendations_resource_] = $9HbP8$createResource(() => props.recommendations, recs => recs);
|
|
604
729
|
return (() => {
|
|
605
730
|
const _el$ = $9HbP8$getNextElement($ee116da074deb002$var$_tmpl$);
|
|
606
|
-
$9HbP8$insert(_el$, (
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
731
|
+
$9HbP8$insert(_el$, $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
732
|
+
get children() {
|
|
733
|
+
return $c4492d24952ed731$export$d41d19e89346fa2({
|
|
734
|
+
product_card_template_: (...args) => props.product_card_template(...args),
|
|
735
|
+
recommendations_resource_: recommendations_resource_,
|
|
736
|
+
market_: () => props.market,
|
|
737
|
+
merchant_: () => props.merchant,
|
|
738
|
+
layout_options_: $9HbP8$createMemo(() => ({
|
|
739
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
740
|
+
...grid_spacing_override()
|
|
741
|
+
}))
|
|
742
|
+
});
|
|
743
|
+
}
|
|
615
744
|
}));
|
|
616
745
|
return _el$;
|
|
617
746
|
})();
|
|
@@ -716,83 +845,25 @@ function $9ea5383493360761$export$9756467d34d91cdb(props) {
|
|
|
716
845
|
const [recommendations_resource_] = $9HbP8$createResource(() => props.recommendations, recs => recs);
|
|
717
846
|
return (() => {
|
|
718
847
|
const _el$2 = $9HbP8$getNextElement($9ea5383493360761$var$_tmpl$2);
|
|
719
|
-
$9HbP8$insert(_el$2, (
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
848
|
+
$9HbP8$insert(_el$2, $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
849
|
+
get children() {
|
|
850
|
+
return $3da8afe3ed57cf34$export$7da560f849543dff({
|
|
851
|
+
rows_object_: rows_object_,
|
|
852
|
+
product_card_template_: (...args) => props.product_card_template(...args),
|
|
853
|
+
recommendations_resource_: recommendations_resource_,
|
|
854
|
+
market_: () => props.market,
|
|
855
|
+
merchant_: () => props.merchant,
|
|
856
|
+
layout_options_: $9HbP8$createMemo(() => ({
|
|
857
|
+
cols_at_size: $b5cccc8ee7d24677$export$6daf8749b65a1b77(props.cols_at_size),
|
|
858
|
+
...grid_spacing_override()
|
|
859
|
+
}))
|
|
860
|
+
});
|
|
861
|
+
}
|
|
729
862
|
}));
|
|
730
863
|
return _el$2;
|
|
731
864
|
})();
|
|
732
865
|
}, "RecommendationGrid failed");
|
|
733
866
|
}
|
|
734
|
-
const $e8ffe11ed01df0fe$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<img>`, 1);
|
|
735
|
-
function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
736
|
-
const [size, setSize] = $9HbP8$createSignal(0);
|
|
737
|
-
const resizeObserver = new ResizeObserver($9HbP8$catchify(records => {
|
|
738
|
-
for (let j = 0; j < records.length; j++) {
|
|
739
|
-
const {
|
|
740
|
-
width: width
|
|
741
|
-
} = records[j].contentRect;
|
|
742
|
-
if (!width) continue;
|
|
743
|
-
// 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
|
|
744
|
-
const new_size = width * 1.05 * ((0, $9HbP8$is_safari) ? 4 / 3 : 1);
|
|
745
|
-
setSize(Math.round(new_size));
|
|
746
|
-
}
|
|
747
|
-
}));
|
|
748
|
-
// 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.
|
|
749
|
-
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
750
|
-
const disconnect = (0, $9HbP8$observer).onexists(whatToWatch, ({
|
|
751
|
-
element: element
|
|
752
|
-
}) => requestAnimationFrame($9HbP8$catchify(() => resizeObserver.observe(element))));
|
|
753
|
-
$9HbP8$onCleanup(() => {
|
|
754
|
-
resizeObserver.disconnect();
|
|
755
|
-
disconnect();
|
|
756
|
-
});
|
|
757
|
-
return size;
|
|
758
|
-
}
|
|
759
|
-
function $e8ffe11ed01df0fe$export$6e5611bc7e57e477({
|
|
760
|
-
src: raw_src,
|
|
761
|
-
size: size,
|
|
762
|
-
resolutions = [64, 128, 256, 300, 400, 512, 768, 1024, 1280, 1536, 2048, 4096],
|
|
763
|
-
...otherOptions
|
|
764
|
-
}) {
|
|
765
|
-
const src = new URL(raw_src, location.origin);
|
|
766
|
-
const fallbackSrc = $e8ffe11ed01df0fe$var$generateImageUrl(src, 400);
|
|
767
|
-
const srcset = $e8ffe11ed01df0fe$var$make_srcset(src, resolutions);
|
|
768
|
-
return (() => {
|
|
769
|
-
const _el$ = $9HbP8$getNextElement($e8ffe11ed01df0fe$var$_tmpl$);
|
|
770
|
-
$9HbP8$spread(_el$, $9HbP8$mergeProps(otherOptions, {
|
|
771
|
-
"src": fallbackSrc,
|
|
772
|
-
"srcset": srcset,
|
|
773
|
-
get sizes() {
|
|
774
|
-
return size() + "px";
|
|
775
|
-
}
|
|
776
|
-
}), false, false);
|
|
777
|
-
$9HbP8$runHydrationEvents();
|
|
778
|
-
return _el$;
|
|
779
|
-
})();
|
|
780
|
-
}
|
|
781
|
-
function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
|
|
782
|
-
return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
|
|
783
|
-
}
|
|
784
|
-
function $e8ffe11ed01df0fe$var$generateImageUrl(url, width) {
|
|
785
|
-
url.searchParams.set("width", width);
|
|
786
|
-
return url.href;
|
|
787
|
-
}
|
|
788
|
-
const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div></div>`, 2);
|
|
789
|
-
function $f18d425032111270$export$94026ee33dbabc26(props) {
|
|
790
|
-
return (() => {
|
|
791
|
-
const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
|
|
792
|
-
$9HbP8$effect(_$p => $9HbP8$style(_el$, `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`, _$p));
|
|
793
|
-
return _el$;
|
|
794
|
-
})();
|
|
795
|
-
}
|
|
796
867
|
function $24e27fab9c821b86$export$5bad61ecde080b1f(...params) {
|
|
797
868
|
const {
|
|
798
869
|
collapse: collapse,
|
|
@@ -6484,26 +6555,30 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
|
|
|
6484
6555
|
severity_: "error",
|
|
6485
6556
|
message_: "Showing results failed",
|
|
6486
6557
|
get children() {
|
|
6487
|
-
return $
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6500
|
-
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6505
|
-
|
|
6506
|
-
|
|
6558
|
+
return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
6559
|
+
get children() {
|
|
6560
|
+
return $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
6561
|
+
min_products_to_fetch_:
|
|
6562
|
+
// if you want to get if all products have been loaded you can add an optional signal here, see SearchPage
|
|
6563
|
+
min_products_to_fetch_,
|
|
6564
|
+
query_base_: query_base_,
|
|
6565
|
+
plp_results_: plp_results_,
|
|
6566
|
+
depict_api_: depict_api_,
|
|
6567
|
+
first_result_in_viewport_: first_result_in_viewport_,
|
|
6568
|
+
last_result_in_viewport_: last_result_in_viewport_,
|
|
6569
|
+
scroll_restoration_data_: scroll_restoration_data_,
|
|
6570
|
+
layout_options_: layout_options_,
|
|
6571
|
+
product_card_template_: product_card_template_,
|
|
6572
|
+
sort_or_filter_open_: sort_or_filter_open_,
|
|
6573
|
+
desktop_filter_elements_: desktop_filter_elements_,
|
|
6574
|
+
id_currently_querying_for_: query_id_,
|
|
6575
|
+
no_results_options_: {
|
|
6576
|
+
selected_filters_: selected_filters_,
|
|
6577
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
6578
|
+
i18n_: i18n_,
|
|
6579
|
+
local_filter_cache_: local_filter_cache_
|
|
6580
|
+
}
|
|
6581
|
+
});
|
|
6507
6582
|
}
|
|
6508
6583
|
});
|
|
6509
6584
|
}
|
|
@@ -7505,8 +7580,10 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
|
|
|
7505
7580
|
}) {
|
|
7506
7581
|
const [get_showing_recommendation_rows] = showing_recommendation_rows_; // We reset this in after_submit in search.tsx FYI
|
|
7507
7582
|
const rows_object = view_more_button_ ? $172e1b898d457050$var$make_state_saved_rows(showing_recommendation_rows_, i18n_) : "all";
|
|
7508
|
-
const [recommendations_resource] = $9HbP8$createResource(
|
|
7509
|
-
|
|
7583
|
+
const [recommendations_resource] = $9HbP8$createResource(() => all_products_loaded_() && search_query_base_(),
|
|
7584
|
+
// only fetch/refetch if all products are loaded
|
|
7585
|
+
query => query && depict_api_.get_recommended(query).then(r => r.displays));
|
|
7586
|
+
const should_show = $9HbP8$createMemo(() => !!((recommendations_resource.loading || recommendations_resource()?.length) && all_products_loaded_()));
|
|
7510
7587
|
const num_placeholders_ = $9HbP8$createMemo(() => (0, $7747fe1a8c5652e3$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_().cols_at_size.map(([per_column]) => per_column)));
|
|
7511
7588
|
// Don't tear down elements every time one updates the page - don't put them within <Show>
|
|
7512
7589
|
const elements = (() => {
|
|
@@ -7536,7 +7613,10 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
|
|
|
7536
7613
|
get children() {
|
|
7537
7614
|
return (() => {
|
|
7538
7615
|
// IIFE to make sure we access both the recommendations_resource and the resources containing the product card rendering results themselves within the Suspense boundary
|
|
7539
|
-
const displays_by_key_ = $29ec7cddbe1d3484$export$7f8bd308237ab5a5($9HbP8$createMemo(
|
|
7616
|
+
const displays_by_key_ = $29ec7cddbe1d3484$export$7f8bd308237ab5a5($9HbP8$createMemo(prev => {
|
|
7617
|
+
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
|
|
7618
|
+
return recommendations_resource() || [];
|
|
7619
|
+
}));
|
|
7540
7620
|
return $29ec7cddbe1d3484$export$43f0fb951fcb0c54({
|
|
7541
7621
|
displays_by_key_: displays_by_key_,
|
|
7542
7622
|
merchant_: $9HbP8$createMemo(() => search_query_base_().tenant),
|
|
@@ -7552,7 +7632,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
|
|
|
7552
7632
|
})();
|
|
7553
7633
|
return $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
7554
7634
|
get when() {
|
|
7555
|
-
return
|
|
7635
|
+
return should_show();
|
|
7556
7636
|
},
|
|
7557
7637
|
children: elements
|
|
7558
7638
|
});
|
|
@@ -9010,17 +9090,21 @@ function $fabfda1230351b1a$export$1c593cbd6f1e10bc({
|
|
|
9010
9090
|
severity_: "error",
|
|
9011
9091
|
message_: "Instant results failed",
|
|
9012
9092
|
get children() {
|
|
9013
|
-
return $
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9093
|
+
return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
9094
|
+
get children() {
|
|
9095
|
+
return $eea41f703612261b$export$62f101a8aa597bf8({
|
|
9096
|
+
search_field_value_: search_field_value_,
|
|
9097
|
+
depict_api_: depict_api_,
|
|
9098
|
+
tenant_: tenant_,
|
|
9099
|
+
i18n_: i18n_,
|
|
9100
|
+
market_: market_,
|
|
9101
|
+
set_total_num_results_accessor_: set_total_num_results_accessor_,
|
|
9102
|
+
router_: router_,
|
|
9103
|
+
set_modal_search_results_: set_modal_search_results_,
|
|
9104
|
+
content_search_enabled_: content_search_enabled_,
|
|
9105
|
+
...instant_results_options_
|
|
9106
|
+
});
|
|
9107
|
+
}
|
|
9024
9108
|
});
|
|
9025
9109
|
}
|
|
9026
9110
|
}), _el$10, _co$2);
|
|
@@ -9921,14 +10005,18 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9921
10005
|
return content_search_enabled_();
|
|
9922
10006
|
},
|
|
9923
10007
|
get children() {
|
|
9924
|
-
return $9HbP8$createComponent((0, $
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
10008
|
+
return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
10009
|
+
get children() {
|
|
10010
|
+
return $9HbP8$createComponent((0, $49de9d31aeea1b5e$export$6d0c9c22f6652669), {
|
|
10011
|
+
content_results_rows_: content_results_rows_,
|
|
10012
|
+
search_results_: search_results_,
|
|
10013
|
+
i18n_: i18n_,
|
|
10014
|
+
get_search_query_: get_search_query_,
|
|
10015
|
+
layout_options_: content_layout_options_,
|
|
10016
|
+
router_: router_,
|
|
10017
|
+
query_base_: search_query_base_
|
|
10018
|
+
});
|
|
10019
|
+
}
|
|
9932
10020
|
});
|
|
9933
10021
|
}
|
|
9934
10022
|
});
|
|
@@ -9962,28 +10050,32 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9962
10050
|
severity_: "error",
|
|
9963
10051
|
message_: "Search results failed",
|
|
9964
10052
|
get children() {
|
|
9965
|
-
return $
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
10053
|
+
return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
10054
|
+
get children() {
|
|
10055
|
+
return $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
10056
|
+
all_products_loaded_: all_products_loaded_,
|
|
10057
|
+
min_products_to_fetch_: min_products_to_fetch_,
|
|
10058
|
+
query_base_: search_query_base_,
|
|
10059
|
+
plp_results_: search_results_,
|
|
10060
|
+
depict_api_: depict_api_,
|
|
10061
|
+
first_result_in_viewport_: first_result_in_viewport_,
|
|
10062
|
+
last_result_in_viewport_: last_result_in_viewport_,
|
|
10063
|
+
scroll_restoration_data_: scroll_restoration_data_,
|
|
10064
|
+
desktop_filter_elements_: desktop_filter_elements_,
|
|
10065
|
+
product_card_template_: product_card_template_,
|
|
10066
|
+
layout_options_: layout_options_,
|
|
10067
|
+
sort_or_filter_open_: sort_or_filter_open_,
|
|
10068
|
+
id_currently_querying_for_: get_search_query_,
|
|
10069
|
+
no_results_options_: {
|
|
10070
|
+
selected_filters_: selected_filters_,
|
|
10071
|
+
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
10072
|
+
local_filter_cache_: local_filter_cache_,
|
|
10073
|
+
i18n_: {
|
|
10074
|
+
...i18n_,
|
|
10075
|
+
no_results_text_: no_results_text_
|
|
10076
|
+
}
|
|
10077
|
+
}
|
|
10078
|
+
});
|
|
9987
10079
|
}
|
|
9988
10080
|
});
|
|
9989
10081
|
}
|
|
@@ -9996,17 +10088,21 @@ function $7097477c78a89208$export$a54ec244c8863715({
|
|
|
9996
10088
|
severity_: "error",
|
|
9997
10089
|
message_: "Search recommendations failed",
|
|
9998
10090
|
get children() {
|
|
9999
|
-
return $9HbP8$createComponent((0, $
|
|
10000
|
-
|
|
10001
|
-
|
|
10002
|
-
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10091
|
+
return $9HbP8$createComponent((0, $011607bdf658f807$export$e68cff63f76bd15b), {
|
|
10092
|
+
get children() {
|
|
10093
|
+
return $9HbP8$createComponent((0, $172e1b898d457050$export$7de92c4c2205ebf3), {
|
|
10094
|
+
depict_api_: depict_api_,
|
|
10095
|
+
i18n_: i18n_,
|
|
10096
|
+
search_query_base_: search_query_base_,
|
|
10097
|
+
get layout_options_() {
|
|
10098
|
+
return $9HbP8$createMemo(() => recommendations_layout_options_?.() ?? layout_options_());
|
|
10099
|
+
},
|
|
10100
|
+
showing_recommendation_rows_: showing_recommendation_rows_,
|
|
10101
|
+
view_more_button_: search_recs_view_more_,
|
|
10102
|
+
product_card_template_: product_card_template_,
|
|
10103
|
+
all_products_loaded_: get_all_products_loaded
|
|
10104
|
+
});
|
|
10105
|
+
}
|
|
10010
10106
|
});
|
|
10011
10107
|
}
|
|
10012
10108
|
});
|
|
@@ -10783,4 +10879,4 @@ const $4690a06c8489dcd0$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
10783
10879
|
const $4690a06c8489dcd0$export$864d304a0bc46829 = "2%";
|
|
10784
10880
|
const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b91cec6bdc6b32a1);
|
|
10785
10881
|
$9HbP8$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
10786
|
-
export { $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $0fdb37d8ddabef25$export$9f191182275e9ef as make_accurate_size_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
|
10882
|
+
export { $660070e2a394b3c3$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $011607bdf658f807$export$e68cff63f76bd15b as ListingProvider, $011607bdf658f807$export$8d0c4fdbb05a2f2e as useListing, $660070e2a394b3c3$export$e4b984597b71e989 as ShopifyContainedImage, $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $0fdb37d8ddabef25$export$9f191182275e9ef as make_accurate_size_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
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",
|