@depict-ai/ui 1.3.3 → 1.3.5

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.
@@ -1,13 +1,181 @@
1
- import {add_to_version_info as $cV3wj$add_to_version_info, observer as $cV3wj$observer, catchify as $cV3wj$catchify, fetch_recs as $cV3wj$fetch_recs, snakeCasifyObject as $cV3wj$snakeCasifyObject, instant_exec_on_suspect_history_change as $cV3wj$instant_exec_on_suspect_history_change, base_url as $cV3wj$base_url, dlog as $cV3wj$dlog, get_depict_id as $cV3wj$get_depict_id, get_user_id as $cV3wj$get_user_id, get_session_id as $cV3wj$get_session_id, sort_obj as $cV3wj$sort_obj, fetch_retry as $cV3wj$fetch_retry, add_version_query_params as $cV3wj$add_version_query_params, dwarn as $cV3wj$dwarn, make_url_with_query_params as $cV3wj$make_url_with_query_params, report as $cV3wj$report, javascript_media_query as $cV3wj$javascript_media_query, standard_price_format as $cV3wj$standard_price_format, make_random_classname as $cV3wj$make_random_classname, n_col_styling_with_dist as $cV3wj$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $cV3wj$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $cV3wj$layout_get_total_rec_amount_for_row, layout_media_query_header as $cV3wj$layout_media_query_header, useExpandingContainer as $cV3wj$useExpandingContainer, Amazing_Slider as $cV3wj$Amazing_Slider, slider_snap_css as $cV3wj$slider_snap_css, slider_fading_factory as $cV3wj$slider_fading_factory, hsl_to_rgb as $cV3wj$hsl_to_rgb, relative_luminance_from_rgb as $cV3wj$relative_luminance_from_rgb, base64_encode_unicode as $cV3wj$base64_encode_unicode, base64_decode_unicode as $cV3wj$base64_decode_unicode, queueMacroTask as $cV3wj$queueMacroTask, make_asyncIterable_exiter as $cV3wj$make_asyncIterable_exiter, href_change_ipns as $cV3wj$href_change_ipns, ContainedImage as $cV3wj$ContainedImage, deparallelize_no_drop as $cV3wj$deparallelize_no_drop, insert_surfaces as $cV3wj$insert_surfaces} from "@depict-ai/utilishared";
2
- import {createRoot as $cV3wj$createRoot, createSignal as $cV3wj$createSignal, getOwner as $cV3wj$getOwner, runWithOwner as $cV3wj$runWithOwner, createMemo as $cV3wj$createMemo, onCleanup as $cV3wj$onCleanup, createComputed as $cV3wj$createComputed, createRenderEffect as $cV3wj$createRenderEffect, createEffect as $cV3wj$createEffect, untrack as $cV3wj$untrack, batch as $cV3wj$batch, createResource as $cV3wj$createResource, Show as $cV3wj$Show, createReaction as $cV3wj$createReaction, on as $cV3wj$on, Suspense as $cV3wj$Suspense, ErrorBoundary as $cV3wj$ErrorBoundary, For as $cV3wj$For, Index as $cV3wj$Index} from "solid-js";
3
- import {ssrElement as $cV3wj$ssrElement, ssr as $cV3wj$ssr, ssrHydrationKey as $cV3wj$ssrHydrationKey, ssrAttribute as $cV3wj$ssrAttribute, escape as $cV3wj$escape, isServer as $cV3wj$isServer, createComponent as $cV3wj$createComponent, ssrClassList as $cV3wj$ssrClassList, insert as $cV3wj$insert, ssrStyle as $cV3wj$ssrStyle, Dynamic as $cV3wj$Dynamic, mergeProps as $cV3wj$mergeProps} from "solid-js/web";
1
+ import {add_to_version_info as $cV3wj$add_to_version_info, make_random_classname as $cV3wj$make_random_classname, n_col_styling_with_dist as $cV3wj$n_col_styling_with_dist, catchify as $cV3wj$catchify, layout_get_visible_recs_without_partial_rows as $cV3wj$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $cV3wj$layout_get_total_rec_amount_for_row, layout_media_query_header as $cV3wj$layout_media_query_header, report as $cV3wj$report, observer as $cV3wj$observer, fetch_recs as $cV3wj$fetch_recs, snakeCasifyObject as $cV3wj$snakeCasifyObject, instant_exec_on_suspect_history_change as $cV3wj$instant_exec_on_suspect_history_change, base_url as $cV3wj$base_url, dlog as $cV3wj$dlog, get_depict_id as $cV3wj$get_depict_id, get_user_id as $cV3wj$get_user_id, get_session_id as $cV3wj$get_session_id, sort_obj as $cV3wj$sort_obj, fetch_retry as $cV3wj$fetch_retry, add_version_query_params as $cV3wj$add_version_query_params, dwarn as $cV3wj$dwarn, make_url_with_query_params as $cV3wj$make_url_with_query_params, javascript_media_query as $cV3wj$javascript_media_query, standard_price_format as $cV3wj$standard_price_format, useExpandingContainer as $cV3wj$useExpandingContainer, Amazing_Slider as $cV3wj$Amazing_Slider, slider_snap_css as $cV3wj$slider_snap_css, slider_fading_factory as $cV3wj$slider_fading_factory, hsl_to_rgb as $cV3wj$hsl_to_rgb, relative_luminance_from_rgb as $cV3wj$relative_luminance_from_rgb, base64_encode_unicode as $cV3wj$base64_encode_unicode, base64_decode_unicode as $cV3wj$base64_decode_unicode, queueMacroTask as $cV3wj$queueMacroTask, make_asyncIterable_exiter as $cV3wj$make_asyncIterable_exiter, href_change_ipns as $cV3wj$href_change_ipns, ContainedImage as $cV3wj$ContainedImage, deparallelize_no_drop as $cV3wj$deparallelize_no_drop, insert_surfaces as $cV3wj$insert_surfaces} from "@depict-ai/utilishared";
2
+ import {createComponent as $cV3wj$createComponent, ssrElement as $cV3wj$ssrElement, escape as $cV3wj$escape, ssr as $cV3wj$ssr, ssrHydrationKey as $cV3wj$ssrHydrationKey, ssrClassList as $cV3wj$ssrClassList, ssrAttribute as $cV3wj$ssrAttribute, isServer as $cV3wj$isServer, insert as $cV3wj$insert, ssrStyle as $cV3wj$ssrStyle, Dynamic as $cV3wj$Dynamic, mergeProps as $cV3wj$mergeProps} from "solid-js/web";
3
+ import {createMemo as $cV3wj$createMemo, createSignal as $cV3wj$createSignal, createComputed as $cV3wj$createComputed, createRenderEffect as $cV3wj$createRenderEffect, untrack as $cV3wj$untrack, onCleanup as $cV3wj$onCleanup, ErrorBoundary as $cV3wj$ErrorBoundary, createRoot as $cV3wj$createRoot, getOwner as $cV3wj$getOwner, runWithOwner as $cV3wj$runWithOwner, createEffect as $cV3wj$createEffect, batch as $cV3wj$batch, createResource as $cV3wj$createResource, Show as $cV3wj$Show, createReaction as $cV3wj$createReaction, on as $cV3wj$on, Suspense as $cV3wj$Suspense, For as $cV3wj$For, Index as $cV3wj$Index} from "solid-js";
4
4
 
5
- /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.3.3";
5
+ /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.3.5";
6
6
 
7
7
 
8
8
 
9
9
 
10
10
 
11
+
12
+
13
+
14
+
15
+
16
+
17
+ function $a52235d12ccf9c88$export$2f0cbfbb4354bb52(elements) {
18
+ // FYI this probably doesn't work on hugely deep nestings or large amount of elements
19
+ return (0, $cV3wj$createMemo)(()=>$a52235d12ccf9c88$var$unwrapping_helper(elements));
20
+ }
21
+ function $a52235d12ccf9c88$var$unwrapping_helper(elements) {
22
+ const result = [];
23
+ if (Array.isArray(elements)) for(let i = 0; i < elements.length; i++){
24
+ const element = elements[i];
25
+ result.push(...$a52235d12ccf9c88$var$unwrapping_helper(element));
26
+ }
27
+ else if (typeof elements == "function") result.push(...$a52235d12ccf9c88$var$unwrapping_helper(elements()));
28
+ else if (elements != undefined && typeof elements != "boolean") result.push(elements);
29
+ return result;
30
+ }
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
40
+ class $4fd48cb976bf1789$export$e1d52e4f0c7557a1 extends Error {
41
+ }
42
+ class $4fd48cb976bf1789$export$aa14a9f43128f61f extends $4fd48cb976bf1789$export$e1d52e4f0c7557a1 {
43
+ constructor(templateError){
44
+ super("Uncaught error in product card template", {
45
+ cause: templateError
46
+ });
47
+ }
48
+ }
49
+
50
+
51
+ const $b7436a6d1fd64e3b$var$_tmpl$ = [
52
+ "<div",
53
+ ' class="',
54
+ '">',
55
+ "</div>"
56
+ ];
57
+ function $b7436a6d1fd64e3b$export$b69d0d92862de18b(props) {
58
+ return (0, $cV3wj$ErrorBoundary)({
59
+ fallback (err, retry) {
60
+ const { message_: message_ , severity_: severity_ } = props;
61
+ let message = message_;
62
+ if (err instanceof (0, $4fd48cb976bf1789$export$aa14a9f43128f61f)) {
63
+ console.error(err.cause);
64
+ message = `${message}: ${err.message}`;
65
+ } else (0, $cV3wj$report)([
66
+ err,
67
+ message_
68
+ ], severity_);
69
+ props.on_error_?.(retry);
70
+ return (0, $cV3wj$ssr)($b7436a6d1fd64e3b$var$_tmpl$, (0, $cV3wj$ssrHydrationKey)(), (0, $cV3wj$ssrClassList)(Object.fromEntries(props.class_list_?.map((c)=>[
71
+ c,
72
+ true
73
+ ]) || [])), (0, $cV3wj$escape)(message));
74
+ },
75
+ get children () {
76
+ return props.children;
77
+ }
78
+ });
79
+ }
80
+
81
+
82
+ const $c8d5ff4524619fcd$var$_tmpl$ = [
83
+ "<div",
84
+ ' class="',
85
+ '">',
86
+ "</div>"
87
+ ], $c8d5ff4524619fcd$var$_tmpl$2 = [
88
+ "<style",
89
+ ' type="text/css">',
90
+ "</style>"
91
+ ];
92
+ function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
93
+ return (0, $cV3wj$createComponent)((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
94
+ get message_ () {
95
+ return "Failed calculating " + props.layout + " layout";
96
+ },
97
+ severity_: "error",
98
+ get children () {
99
+ return $c8d5ff4524619fcd$var$ActualSolidLayout(props);
100
+ }
101
+ });
102
+ }
103
+ function $c8d5ff4524619fcd$var$ActualSolidLayout(props) {
104
+ // Copy of Layout from utilishared but using solid-js signals instead of async iterable IPNS
105
+ const show_all_rows = (0, $cV3wj$createMemo)(()=>props.rows === "all");
106
+ const rows_or_empty_object = (0, $cV3wj$createMemo)(()=>show_all_rows() ? {} : props.rows);
107
+ const button_elements = (0, $a52235d12ccf9c88$export$2f0cbfbb4354bb52)((0, $cV3wj$createMemo)(()=>rows_or_empty_object().button));
108
+ const have_a_button = (0, $cV3wj$createMemo)(()=>{
109
+ const button = button_elements();
110
+ return !(!button || Array.isArray(button) && !button.length);
111
+ });
112
+ const [get_styling, set_styling] = (0, $cV3wj$createSignal)();
113
+ const container_class = (0, $cV3wj$make_random_classname)();
114
+ const selector_beginning = `.depict .${container_class}>`; // class so ppl can have id if needed
115
+ const container_element = (0, $cV3wj$ssrElement)("div", props.element_attributes, ()=>(0, $cV3wj$escape)(props.children), true);
116
+ const [get_children_count, set_children_count] = (0, $cV3wj$createSignal)(0);
117
+ const update_children_count = ()=>set_children_count(container_element.children.length);
118
+ const col_styling = (0, $cV3wj$createMemo)(()=>(0, $cV3wj$n_col_styling_with_dist)(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
119
+ const default_currently_visible_signal = (0, $cV3wj$createSignal)(0); // Keep this signal here so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
120
+ const rows_visible_signal = (0, $cV3wj$createMemo)(()=>rows_or_empty_object().currently_visible || default_currently_visible_signal);
121
+ const get_rows_visible = (0, $cV3wj$createMemo)(()=>rows_visible_signal()[0]());
122
+ const set_rows_visible = (0, $cV3wj$createMemo)(()=>rows_visible_signal()[1]);
123
+ const button_class = (0, $cV3wj$make_random_classname)();
124
+ const button_container = (0, $cV3wj$createMemo)(()=>have_a_button() && (0, $cV3wj$ssr)($c8d5ff4524619fcd$var$_tmpl$, (0, $cV3wj$ssrHydrationKey)(), "load-more-container " + (0, $cV3wj$escape)(button_class, true), (0, $cV3wj$escape)(rows_or_empty_object().button)));
125
+ container_element.classList.add(container_class);
126
+ (0, $cV3wj$createComputed)(()=>{
127
+ // Make sure we don't have more rows visible than max_rows (this could happen by max_rows being decreased)
128
+ const rows_visible = get_rows_visible();
129
+ const max_rows = rows_or_empty_object().max_rows;
130
+ if (!isNaN(max_rows) && max_rows >= 0 && rows_visible > max_rows) set_rows_visible()(max_rows);
131
+ });
132
+ (0, $cV3wj$createRenderEffect)(()=>{
133
+ // Be careful to only read show_all_rows in here (ofc doesn't apply to nested effects)
134
+ if (show_all_rows()) {
135
+ // no view more functionality requested
136
+ set_styling(()=>col_styling);
137
+ return;
138
+ }
139
+ (0, $cV3wj$untrack)(()=>set_rows_visible()(rows_or_empty_object().start_rows ?? 1));
140
+ update_children_count();
141
+ const mutation_observer = new MutationObserver((0, $cV3wj$catchify)(update_children_count));
142
+ mutation_observer.observe(container_element, {
143
+ childList: true
144
+ });
145
+ (0, $cV3wj$onCleanup)(()=>mutation_observer.disconnect());
146
+ set_styling(// this is needed because solid will think that the memo-accessor is a setter function otherwise
147
+ ()=>(0, $cV3wj$createMemo)(()=>{
148
+ const { rows_per_click: rows_per_click , max_rows: max_rows = -1 } = rows_or_empty_object();
149
+ const rows_visible = get_rows_visible();
150
+ const children_count = get_children_count();
151
+ return col_styling() + props.cols_at_size.map((options)=>{
152
+ const [, min, max] = options;
153
+ let should_hide_button;
154
+ let visible_recs;
155
+ if (props.disable_partial_rows) {
156
+ visible_recs = (0, $cV3wj$layout_get_visible_recs_without_partial_rows)(rows_visible, children_count, options);
157
+ const visible_recs_next_show_more = (0, $cV3wj$layout_get_visible_recs_without_partial_rows)(rows_visible + (rows_per_click || 0), // Should this really be zero when we default rows_per_click to 1?
158
+ children_count, options);
159
+ should_hide_button = visible_recs === visible_recs_next_show_more;
160
+ } else {
161
+ visible_recs = (0, $cV3wj$layout_get_total_rec_amount_for_row)(rows_visible, options);
162
+ should_hide_button = visible_recs >= children_count;
163
+ }
164
+ const should_hide_button_final = button_class && (should_hide_button || max_rows !== -1 && rows_visible >= max_rows);
165
+ return `${(0, $cV3wj$layout_media_query_header)(min, max)}{${selector_beginning}:nth-child(n+${visible_recs + 1}){display:none}${props.layout == "slider" ? `${selector_beginning}:nth-child(n+${visible_recs}){margin-right:0}` : ""}${should_hide_button_final ? `.depict .${button_class}{display:none!important}` : ``}}`;
166
+ }).join("");
167
+ }));
168
+ });
169
+ return [
170
+ container_element,
171
+ button_container(),
172
+ (0, $cV3wj$ssr)($c8d5ff4524619fcd$var$_tmpl$2, (0, $cV3wj$ssrHydrationKey)(), get_styling)
173
+ ];
174
+ }
175
+
176
+
177
+
178
+
11
179
  async function $194bd6b8e4c59830$export$79b1565500412d9b(search_modal, modal_fn_opts) {
12
180
  const body = await (0, $cV3wj$observer).wait_for_element("body");
13
181
  let dispose_and_remove;
@@ -664,70 +832,6 @@ function $a458486f22b22f63$export$a2cc176055f8f08() {
664
832
 
665
833
 
666
834
 
667
-
668
-
669
- // Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
670
- class $4fd48cb976bf1789$export$e1d52e4f0c7557a1 extends Error {
671
- }
672
- class $4fd48cb976bf1789$export$aa14a9f43128f61f extends $4fd48cb976bf1789$export$e1d52e4f0c7557a1 {
673
- constructor(templateError){
674
- super("Uncaught error in product card template", {
675
- cause: templateError
676
- });
677
- }
678
- }
679
-
680
-
681
- const $b7436a6d1fd64e3b$var$_tmpl$ = [
682
- "<div",
683
- ' class="',
684
- '">',
685
- "</div>"
686
- ];
687
- function $b7436a6d1fd64e3b$export$b69d0d92862de18b(props) {
688
- return (0, $cV3wj$ErrorBoundary)({
689
- fallback (err, retry) {
690
- const { message_: message_ , severity_: severity_ } = props;
691
- let message = message_;
692
- if (err instanceof (0, $4fd48cb976bf1789$export$aa14a9f43128f61f)) {
693
- console.error(err.cause);
694
- message = `${message}: ${err.message}`;
695
- } else (0, $cV3wj$report)([
696
- err,
697
- message_
698
- ], severity_);
699
- props.on_error_?.(retry);
700
- return (0, $cV3wj$ssr)($b7436a6d1fd64e3b$var$_tmpl$, (0, $cV3wj$ssrHydrationKey)(), (0, $cV3wj$ssrClassList)(Object.fromEntries(props.class_list_?.map((c)=>[
701
- c,
702
- true
703
- ]) || [])), (0, $cV3wj$escape)(message));
704
- },
705
- get children () {
706
- return props.children;
707
- }
708
- });
709
- }
710
-
711
-
712
-
713
-
714
- function $a52235d12ccf9c88$export$2f0cbfbb4354bb52(elements) {
715
- // FYI this probably doesn't work on hugely deep nestings or large amount of elements
716
- return (0, $cV3wj$createMemo)(()=>$a52235d12ccf9c88$var$unwrapping_helper(elements));
717
- }
718
- function $a52235d12ccf9c88$var$unwrapping_helper(elements) {
719
- const result = [];
720
- if (Array.isArray(elements)) for(let i = 0; i < elements.length; i++){
721
- const element = elements[i];
722
- result.push(...$a52235d12ccf9c88$var$unwrapping_helper(element));
723
- }
724
- else if (typeof elements == "function") result.push(...$a52235d12ccf9c88$var$unwrapping_helper(elements()));
725
- else if (elements != undefined && typeof elements != "boolean") result.push(elements);
726
- return result;
727
- }
728
-
729
-
730
-
731
835
  let $6e41f1fde994db72$var$cached_placeholder_element;
732
836
  let $6e41f1fde994db72$var$rendering_cached_placeholder_element;
733
837
  function $6e41f1fde994db72$export$f33414a4df0afd3f({ product_card_template_: product_card_template_ , num_placeholders_: num_placeholders_ }) {
@@ -1042,100 +1146,6 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({ plp_results_: plp_results_
1042
1146
 
1043
1147
 
1044
1148
 
1045
-
1046
-
1047
-
1048
-
1049
-
1050
-
1051
-
1052
-
1053
- const $c8d5ff4524619fcd$var$_tmpl$ = [
1054
- "<div",
1055
- ' class="',
1056
- '">',
1057
- "</div>"
1058
- ], $c8d5ff4524619fcd$var$_tmpl$2 = [
1059
- "<style",
1060
- ' type="text/css">',
1061
- "</style>"
1062
- ];
1063
- function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
1064
- return (0, $cV3wj$createComponent)((0, $b7436a6d1fd64e3b$export$b69d0d92862de18b), {
1065
- get message_ () {
1066
- return "Failed calculating " + props.layout + " layout";
1067
- },
1068
- severity_: "error",
1069
- get children () {
1070
- return $c8d5ff4524619fcd$var$ActualSolidLayout(props);
1071
- }
1072
- });
1073
- }
1074
- function $c8d5ff4524619fcd$var$ActualSolidLayout(props) {
1075
- // Copy of Layout from utilishared but using solid-js signals instead of async iterable IPNS
1076
- const show_all_rows = (0, $cV3wj$createMemo)(()=>props.rows === "all");
1077
- const rows_or_empty_object = (0, $cV3wj$createMemo)(()=>show_all_rows() ? {} : props.rows);
1078
- const button_elements = (0, $a52235d12ccf9c88$export$2f0cbfbb4354bb52)((0, $cV3wj$createMemo)(()=>rows_or_empty_object().button));
1079
- const have_a_button = (0, $cV3wj$createMemo)(()=>{
1080
- const button = button_elements();
1081
- return !(!button || Array.isArray(button) && !button.length);
1082
- });
1083
- const [get_styling, set_styling] = (0, $cV3wj$createSignal)();
1084
- const container_class = (0, $cV3wj$make_random_classname)();
1085
- const selector_beginning = `.depict .${container_class}>`; // class so ppl can have id if needed
1086
- const container_element = (0, $cV3wj$ssrElement)("div", props.element_attributes, ()=>(0, $cV3wj$escape)(props.children), true);
1087
- const [get_children_count, set_children_count] = (0, $cV3wj$createSignal)(0);
1088
- const update_children_count = ()=>set_children_count(container_element.children.length);
1089
- const col_styling = (0, $cV3wj$createMemo)(()=>(0, $cV3wj$n_col_styling_with_dist)(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
1090
- const rows_visible_signal = (0, $cV3wj$createMemo)(()=>rows_or_empty_object().currently_visible || (0, $cV3wj$createSignal)(0));
1091
- const get_rows_visible = (0, $cV3wj$createMemo)(()=>rows_visible_signal()[0]());
1092
- const set_rows_visible = (0, $cV3wj$createMemo)(()=>rows_visible_signal()[1]);
1093
- const button_class = (0, $cV3wj$make_random_classname)();
1094
- const button_container = (0, $cV3wj$createMemo)(()=>have_a_button() && (0, $cV3wj$ssr)($c8d5ff4524619fcd$var$_tmpl$, (0, $cV3wj$ssrHydrationKey)(), "load-more-container " + (0, $cV3wj$escape)(button_class, true), (0, $cV3wj$escape)(rows_or_empty_object().button)));
1095
- container_element.classList.add(container_class);
1096
- (0, $cV3wj$createRenderEffect)(()=>{
1097
- // Be careful to only read show_all_rows in here (ofc doesn't apply to nested effects)
1098
- if (show_all_rows()) {
1099
- // no view more functionality requested
1100
- set_styling(()=>col_styling);
1101
- return;
1102
- }
1103
- (0, $cV3wj$untrack)(()=>set_rows_visible()(rows_or_empty_object().start_rows ?? 1));
1104
- update_children_count();
1105
- const mutation_observer = new MutationObserver((0, $cV3wj$catchify)(update_children_count));
1106
- mutation_observer.observe(container_element, {
1107
- childList: true
1108
- });
1109
- (0, $cV3wj$onCleanup)(()=>mutation_observer.disconnect());
1110
- set_styling(// this is needed because solid will think that the memo-accessor is a setter function otherwise
1111
- ()=>(0, $cV3wj$createMemo)(()=>{
1112
- const { rows_per_click: rows_per_click , max_rows: max_rows = -1 } = rows_or_empty_object();
1113
- return col_styling() + props.cols_at_size.map((options)=>{
1114
- const [, min, max] = options;
1115
- let should_hide_button;
1116
- let visible_recs;
1117
- if (props.disable_partial_rows) {
1118
- visible_recs = (0, $cV3wj$layout_get_visible_recs_without_partial_rows)(get_rows_visible(), get_children_count(), options);
1119
- const visible_recs_next_show_more = (0, $cV3wj$layout_get_visible_recs_without_partial_rows)(get_rows_visible() + (rows_per_click || 0), // Should this really be zero when we default rows_per_click to 1?
1120
- get_children_count(), options);
1121
- should_hide_button = visible_recs === visible_recs_next_show_more;
1122
- } else {
1123
- visible_recs = (0, $cV3wj$layout_get_total_rec_amount_for_row)(get_rows_visible(), options);
1124
- should_hide_button = visible_recs >= get_children_count();
1125
- }
1126
- const should_hide_button_final = button_class && (should_hide_button || max_rows !== -1 && get_rows_visible() >= max_rows);
1127
- return `${(0, $cV3wj$layout_media_query_header)(min, max)}{${selector_beginning}:nth-child(n+${visible_recs + 1}){display:none}${props.layout == "slider" ? `${selector_beginning}:nth-child(n+${visible_recs}){margin-right:0}` : ""}${should_hide_button_final ? `.depict .${button_class}{display:none!important}` : ``}}`;
1128
- }).join("");
1129
- }));
1130
- });
1131
- return [
1132
- container_element,
1133
- button_container(),
1134
- (0, $cV3wj$ssr)($c8d5ff4524619fcd$var$_tmpl$2, (0, $cV3wj$ssrHydrationKey)(), get_styling)
1135
- ];
1136
- }
1137
-
1138
-
1139
1149
  const $2d25e42846eac370$var$_tmpl$ = [
1140
1150
  "<div",
1141
1151
  ' class="',
@@ -4919,7 +4929,9 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
4919
4929
  return [
4920
4930
  (0, $cV3wj$isServer) ? "<!-- Category page based on Depict SDK -->" : document.createComment("Category page based on Depict SDK"),
4921
4931
  (0, $cV3wj$ssr)($df5d81d0fe61ff21$var$_tmpl$4, (0, $cV3wj$ssrHydrationKey)() + (0, $cV3wj$ssrAttribute)("id", (0, $cV3wj$escape)((0, $f86ba724282f6690$export$44dad306455dddf).PLP_CATEGORY, true), false), (0, $cV3wj$escape)((0, $cV3wj$createComponent)((0, $cV3wj$Show), {
4922
- when: show_breadcrumbs_,
4932
+ get when () {
4933
+ return show_breadcrumbs_();
4934
+ },
4923
4935
  get children () {
4924
4936
  return (0, $cV3wj$createComponent)((0, $dfa5b6f7c5e421df$export$5646050d516e06bc), {
4925
4937
  crumb_data_: crumb_data_,
@@ -4928,7 +4940,9 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({ depict_api_: depict_api_ ,
4928
4940
  });
4929
4941
  }
4930
4942
  })), (0, $cV3wj$escape)((0, $cV3wj$createComponent)((0, $cV3wj$Show), {
4931
- when: show_quicklinks_,
4943
+ get when () {
4944
+ return show_quicklinks_();
4945
+ },
4932
4946
  get children () {
4933
4947
  return (0, $cV3wj$createComponent)((0, $06edf3aec9073663$export$466cdc317043f6cb), {
4934
4948
  quicklinks_data_: quicklinks_data_,
@@ -8211,4 +8225,4 @@ const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b
8211
8225
  (0, $cV3wj$add_to_version_info)("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
8212
8226
 
8213
8227
 
8214
- export {$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};
8228
+ export {$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": "1.3.3",
3
+ "version": "1.3.5",
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
  "main": "dist/client/main.cjs",