@depict-ai/ui 3.0.23 → 3.0.25

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 CHANGED
@@ -83,7 +83,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.23";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.25";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.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>`);
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -103,7 +103,8 @@ function $9d19451330d04c3c$export$8be2714ec7f169ee() {
103
103
  return _el$;
104
104
  })();
105
105
  }
106
- const $ad8ec7729fffeb9c$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div>`);
106
+ const $ad8ec7729fffeb9c$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div>`),
107
+ $ad8ec7729fffeb9c$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict-slider depict"><button aria-label="Scroll left"class="left d-navbutton"type=button></button><button aria-label="Scroll right"class="right d-navbutton"type=button></button><div class=sliding>`);
107
108
  function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
108
109
  let {
109
110
  children: children,
@@ -114,35 +115,56 @@ function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
114
115
  arrow_width_: arrow_width_,
115
116
  arrow_height_: arrow_height_
116
117
  } = _ref;
117
- const slider = new (0, $52FdA$depictaiutilishared.Amazing_Slider)({
118
- button_contents: {
119
- left: [(() => {
120
- const _el$ = $52FdA$solidjsweb.getNextElement($ad8ec7729fffeb9c$var$_tmpl$);
121
- $52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
122
- height_: arrow_height_,
123
- width_: arrow_width_
124
- }));
125
- return _el$;
126
- })()],
127
- right: [(() => {
128
- const _el$2 = $52FdA$solidjsweb.getNextElement($ad8ec7729fffeb9c$var$_tmpl$);
129
- $52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
130
- height_: arrow_height_,
131
- width_: arrow_width_
132
- }));
118
+ const [hasHydrated, setHasHydrated] = $52FdA$solidjs.createSignal(false);
119
+ $52FdA$solidjs.createEffect(() => setHasHydrated(true));
120
+ const MakeButton = () => (() => {
121
+ const _el$ = $52FdA$solidjsweb.getNextElement($ad8ec7729fffeb9c$var$_tmpl$);
122
+ $52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
123
+ height_: arrow_height_,
124
+ width_: arrow_width_
125
+ }));
126
+ return _el$;
127
+ })();
128
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
129
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
130
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
131
+ // Once we have hydrated, we construct and insert the actual slider
132
+ return $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
133
+ get when() {
134
+ return hasHydrated() && !(0, $52FdA$solidjsweb.isServer);
135
+ },
136
+ get fallback() {
137
+ return (() => {
138
+ const _el$2 = $52FdA$solidjsweb.getNextElement($ad8ec7729fffeb9c$var$_tmpl$2),
139
+ _el$3 = _el$2.firstChild,
140
+ _el$4 = _el$3.nextSibling,
141
+ _el$5 = _el$4.nextSibling;
142
+ $52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent(MakeButton, {}));
143
+ $52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent(MakeButton, {}));
144
+ $52FdA$solidjsweb.insert(_el$5, children);
133
145
  return _el$2;
134
- })()]
146
+ })();
135
147
  },
136
- constructor_plugins: [$52FdA$depictaiutilishared.slider_snap_css().constructor_plugin],
137
- mutation_plugins: [...(disable_fading_ ? [] : [$52FdA$depictaiutilishared.slider_fading_factory({
138
- threshold_: 0.96,
139
- faded_opacity_: faded_opacity_
140
- }).mutation_plugin_]), ...mutation_plugins_]
148
+ get children() {
149
+ return (() => {
150
+ const slider = new (0, $52FdA$depictaiutilishared.Amazing_Slider)({
151
+ button_contents: {
152
+ left: [MakeButton()],
153
+ right: [MakeButton()]
154
+ },
155
+ constructor_plugins: [$52FdA$depictaiutilishared.slider_snap_css().constructor_plugin],
156
+ mutation_plugins: [...(disable_fading_ ? [] : [$52FdA$depictaiutilishared.slider_fading_factory({
157
+ threshold_: 0.96,
158
+ faded_opacity_: faded_opacity_
159
+ }).mutation_plugin_]), ...mutation_plugins_]
160
+ });
161
+ $52FdA$solidjsweb.insert(slider.insert_here, children);
162
+ $52FdA$solidjs.onCleanup(() => slider.observer.disconnect());
163
+ slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
164
+ return slider.container;
165
+ })();
166
+ }
141
167
  });
142
- $52FdA$solidjsweb.insert(slider.insert_here, children);
143
- $52FdA$solidjs.onCleanup(() => slider.observer.disconnect());
144
- slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
145
- return slider.container;
146
168
  }
147
169
  const $513986fde589b871$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<section aria-live=polite role=region class=tabs-body>`),
148
170
  $513986fde589b871$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<nav role=tablist class=tabs-bar>`),
@@ -1962,6 +1984,7 @@ const $ce467edb5343cfcd$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<d
1962
1984
  function $ce467edb5343cfcd$export$94026ee33dbabc26(props) {
1963
1985
  return (() => {
1964
1986
  const _el$ = $52FdA$solidjsweb.getNextElement($ce467edb5343cfcd$var$_tmpl$);
1987
+ $52FdA$solidjsweb.insert(_el$, () => props.children);
1965
1988
  $52FdA$solidjsweb.effect(_p$ => {
1966
1989
  const _v$ = "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"),
1967
1990
  _v$2 = props.class;
package/ES10/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.23";
13
+ export const version = "3.0.25";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -222,7 +222,7 @@ export function SlidableItems({
222
222
  mutation_plugins_?: ((this: Amazing_Slider, mutations: IntersectionObserverEntry[], intersecting_items: Record<number, IntersectionObserverEntry>) => unknown)[];
223
223
  arrow_width_?: number;
224
224
  arrow_height_?: number;
225
- }): HTMLDivElement;
225
+ }): JSX.Element;
226
226
  /**
227
227
  * Renders a set of tabs
228
228
  * Will ignore any children that's not a <Tab />
@@ -520,7 +520,6 @@ export function decode_sorting(search_params: URLSearchParams, sorting_query_par
520
520
  * @param sorting_query_param
521
521
  */
522
522
  export function strip_encoded_filter_and_sort(search_params: URLSearchParams, filter_query_param_prefix: string, sorting_query_param: string): void;
523
- /** @jsxImportSource solid-js */
524
523
  /**
525
524
  * ImageContainer for using the padding hack to set the aspect ratio of an image
526
525
  * Put this around an <img> or <ResponsiveImg> to give it a container that always has the same size as the image. This prevents CLS and enables ResponsiveImg to work (the browser to load the correct image size)
@@ -529,6 +528,7 @@ export function strip_encoded_filter_and_sort(search_params: URLSearchParams, fi
529
528
  export function ImageContainer(props: {
530
529
  aspectRatio: number;
531
530
  class?: string;
531
+ children?: JSX.Element;
532
532
  }): HTMLDivElement;
533
533
  /**
534
534
  * Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
package/ES10/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $8tj43$add_to_version_info, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, catchify as $8tj43$catchify1, observer as $8tj43$observer, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, report as $8tj43$report, dlog as $8tj43$dlog, ContainedImage as $8tj43$ContainedImage, use_href_accessor as $8tj43$use_href_accessor1, 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, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_safari as $8tj43$is_safari, slider_fractional_factory as $8tj43$slider_fractional_factory, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, fetch_retry as $8tj43$fetch_retry, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, javascript_media_query as $8tj43$javascript_media_query, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet1, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
- import { template as $8tj43$template, createComponent as $8tj43$createComponent, mergeProps as $8tj43$mergeProps, Dynamic as $8tj43$Dynamic, memo as $8tj43$memo, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, use as $8tj43$use, addEventListener as $8tj43$addEventListener, getNextMarker as $8tj43$getNextMarker, delegateEvents as $8tj43$delegateEvents, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, isServer as $8tj43$isServer, setProperty as $8tj43$setProperty } from "solid-js/web";
2
+ import { template as $8tj43$template, createComponent as $8tj43$createComponent, mergeProps as $8tj43$mergeProps, Dynamic as $8tj43$Dynamic, memo as $8tj43$memo, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, isServer as $8tj43$isServer, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, use as $8tj43$use, addEventListener as $8tj43$addEventListener, getNextMarker as $8tj43$getNextMarker, delegateEvents as $8tj43$delegateEvents, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, setProperty as $8tj43$setProperty } from "solid-js/web";
3
3
  import { createContext as $8tj43$createContext, useContext as $8tj43$useContext, createSignal as $8tj43$createSignal, createSelector as $8tj43$createSelector, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, Index as $8tj43$Index, createMemo as $8tj43$createMemo, children as $8tj43$children, onCleanup as $8tj43$onCleanup, createEffect as $8tj43$createEffect, untrack as $8tj43$untrack, Show as $8tj43$Show, createUniqueId as $8tj43$createUniqueId, mergeProps as $8tj43$mergeProps1, ErrorBoundary as $8tj43$ErrorBoundary, createResource as $8tj43$createResource, splitProps as $8tj43$splitProps, createRoot as $8tj43$createRoot, createRenderEffect as $8tj43$createRenderEffect, batch as $8tj43$batch, Suspense as $8tj43$Suspense, on as $8tj43$on, For as $8tj43$For, createComputed as $8tj43$createComputed, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
4
4
  import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify, use_href_accessor as $8tj43$use_href_accessor, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
5
5
  import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.23";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.25";
14
14
  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>`);
15
15
  function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
16
16
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
@@ -30,7 +30,8 @@ function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
30
30
  return _el$;
31
31
  })();
32
32
  }
33
- const $002f09d00aac50b2$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`);
33
+ const $002f09d00aac50b2$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`),
34
+ $002f09d00aac50b2$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div class="depict-slider depict"><button aria-label="Scroll left"class="left d-navbutton"type=button></button><button aria-label="Scroll right"class="right d-navbutton"type=button></button><div class=sliding>`);
34
35
  function $002f09d00aac50b2$export$6649caad96ef8870(_ref) {
35
36
  let {
36
37
  children: children,
@@ -41,35 +42,56 @@ function $002f09d00aac50b2$export$6649caad96ef8870(_ref) {
41
42
  arrow_width_: arrow_width_,
42
43
  arrow_height_: arrow_height_
43
44
  } = _ref;
44
- const slider = new (0, $8tj43$Amazing_Slider)({
45
- button_contents: {
46
- left: [(() => {
47
- const _el$ = $8tj43$getNextElement($002f09d00aac50b2$var$_tmpl$);
48
- $8tj43$insert(_el$, $8tj43$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
49
- height_: arrow_height_,
50
- width_: arrow_width_
51
- }));
52
- return _el$;
53
- })()],
54
- right: [(() => {
55
- const _el$2 = $8tj43$getNextElement($002f09d00aac50b2$var$_tmpl$);
56
- $8tj43$insert(_el$2, $8tj43$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
57
- height_: arrow_height_,
58
- width_: arrow_width_
59
- }));
45
+ const [hasHydrated, setHasHydrated] = $8tj43$createSignal(false);
46
+ $8tj43$createEffect(() => setHasHydrated(true));
47
+ const MakeButton = () => (() => {
48
+ const _el$ = $8tj43$getNextElement($002f09d00aac50b2$var$_tmpl$);
49
+ $8tj43$insert(_el$, $8tj43$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
50
+ height_: arrow_height_,
51
+ width_: arrow_width_
52
+ }));
53
+ return _el$;
54
+ })();
55
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
56
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
57
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
58
+ // Once we have hydrated, we construct and insert the actual slider
59
+ return $8tj43$createComponent((0, $8tj43$Show), {
60
+ get when() {
61
+ return hasHydrated() && !(0, $8tj43$isServer);
62
+ },
63
+ get fallback() {
64
+ return (() => {
65
+ const _el$2 = $8tj43$getNextElement($002f09d00aac50b2$var$_tmpl$2),
66
+ _el$3 = _el$2.firstChild,
67
+ _el$4 = _el$3.nextSibling,
68
+ _el$5 = _el$4.nextSibling;
69
+ $8tj43$insert(_el$3, $8tj43$createComponent(MakeButton, {}));
70
+ $8tj43$insert(_el$4, $8tj43$createComponent(MakeButton, {}));
71
+ $8tj43$insert(_el$5, children);
60
72
  return _el$2;
61
- })()]
73
+ })();
62
74
  },
63
- constructor_plugins: [$8tj43$slider_snap_css().constructor_plugin],
64
- mutation_plugins: [...(disable_fading_ ? [] : [$8tj43$slider_fading_factory({
65
- threshold_: 0.96,
66
- faded_opacity_: faded_opacity_
67
- }).mutation_plugin_]), ...mutation_plugins_]
75
+ get children() {
76
+ return (() => {
77
+ const slider = new (0, $8tj43$Amazing_Slider)({
78
+ button_contents: {
79
+ left: [MakeButton()],
80
+ right: [MakeButton()]
81
+ },
82
+ constructor_plugins: [$8tj43$slider_snap_css().constructor_plugin],
83
+ mutation_plugins: [...(disable_fading_ ? [] : [$8tj43$slider_fading_factory({
84
+ threshold_: 0.96,
85
+ faded_opacity_: faded_opacity_
86
+ }).mutation_plugin_]), ...mutation_plugins_]
87
+ });
88
+ $8tj43$insert(slider.insert_here, children);
89
+ $8tj43$onCleanup(() => slider.observer.disconnect());
90
+ slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
91
+ return slider.container;
92
+ })();
93
+ }
68
94
  });
69
- $8tj43$insert(slider.insert_here, children);
70
- $8tj43$onCleanup(() => slider.observer.disconnect());
71
- slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
72
- return slider.container;
73
95
  }
74
96
  const $6a439680ae7e9ba3$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<section aria-live=polite role=region class=tabs-body>`),
75
97
  $6a439680ae7e9ba3$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<nav role=tablist class=tabs-bar>`),
@@ -1889,6 +1911,7 @@ const $801e8845d3fa3653$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`);
1889
1911
  function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
1890
1912
  return (() => {
1891
1913
  const _el$ = $8tj43$getNextElement($801e8845d3fa3653$var$_tmpl$);
1914
+ $8tj43$insert(_el$, () => props.children);
1892
1915
  $8tj43$effect(_p$ => {
1893
1916
  const _v$ = "position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%"),
1894
1917
  _v$2 = props.class;
package/latest/index.cjs CHANGED
@@ -77,7 +77,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
77
77
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
78
78
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
79
79
  /*! Depict.ai search and product listing SDK */
80
- const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.23";
80
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.25";
81
81
  const $0f313083912e447a$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.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>`);
82
82
  function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
83
83
  return (() => {
@@ -95,7 +95,8 @@ function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
95
95
  return _el$;
96
96
  })();
97
97
  }
98
- const $a0e53f99354809d9$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div>`);
98
+ const $a0e53f99354809d9$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div>`),
99
+ $a0e53f99354809d9$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="depict-slider depict"><button aria-label="Scroll left"class="left d-navbutton"type=button></button><button aria-label="Scroll right"class="right d-navbutton"type=button></button><div class=sliding>`);
99
100
  function $a0e53f99354809d9$export$6649caad96ef8870({
100
101
  children: children,
101
102
  slider_ref_: slider_ref_,
@@ -105,35 +106,56 @@ function $a0e53f99354809d9$export$6649caad96ef8870({
105
106
  arrow_width_: arrow_width_,
106
107
  arrow_height_: arrow_height_
107
108
  }) {
108
- const slider = new (0, $gVhhF$depictaiutilishared.Amazing_Slider)({
109
- button_contents: {
110
- left: [(() => {
111
- const _el$ = $gVhhF$solidjsweb.getNextElement($a0e53f99354809d9$var$_tmpl$);
112
- $gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
113
- height_: arrow_height_,
114
- width_: arrow_width_
115
- }));
116
- return _el$;
117
- })()],
118
- right: [(() => {
119
- const _el$2 = $gVhhF$solidjsweb.getNextElement($a0e53f99354809d9$var$_tmpl$);
120
- $gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
121
- height_: arrow_height_,
122
- width_: arrow_width_
123
- }));
109
+ const [hasHydrated, setHasHydrated] = $gVhhF$solidjs.createSignal(false);
110
+ $gVhhF$solidjs.createEffect(() => setHasHydrated(true));
111
+ const MakeButton = () => (() => {
112
+ const _el$ = $gVhhF$solidjsweb.getNextElement($a0e53f99354809d9$var$_tmpl$);
113
+ $gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
114
+ height_: arrow_height_,
115
+ width_: arrow_width_
116
+ }));
117
+ return _el$;
118
+ })();
119
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
120
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
121
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
122
+ // Once we have hydrated, we construct and insert the actual slider
123
+ return $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
124
+ get when() {
125
+ return hasHydrated() && !(0, $gVhhF$solidjsweb.isServer);
126
+ },
127
+ get fallback() {
128
+ return (() => {
129
+ const _el$2 = $gVhhF$solidjsweb.getNextElement($a0e53f99354809d9$var$_tmpl$2),
130
+ _el$3 = _el$2.firstChild,
131
+ _el$4 = _el$3.nextSibling,
132
+ _el$5 = _el$4.nextSibling;
133
+ $gVhhF$solidjsweb.insert(_el$3, $gVhhF$solidjsweb.createComponent(MakeButton, {}));
134
+ $gVhhF$solidjsweb.insert(_el$4, $gVhhF$solidjsweb.createComponent(MakeButton, {}));
135
+ $gVhhF$solidjsweb.insert(_el$5, children);
124
136
  return _el$2;
125
- })()]
137
+ })();
126
138
  },
127
- constructor_plugins: [$gVhhF$depictaiutilishared.slider_snap_css().constructor_plugin],
128
- mutation_plugins: [...(disable_fading_ ? [] : [$gVhhF$depictaiutilishared.slider_fading_factory({
129
- threshold_: 0.96,
130
- faded_opacity_: faded_opacity_
131
- }).mutation_plugin_]), ...mutation_plugins_]
139
+ get children() {
140
+ return (() => {
141
+ const slider = new (0, $gVhhF$depictaiutilishared.Amazing_Slider)({
142
+ button_contents: {
143
+ left: [MakeButton()],
144
+ right: [MakeButton()]
145
+ },
146
+ constructor_plugins: [$gVhhF$depictaiutilishared.slider_snap_css().constructor_plugin],
147
+ mutation_plugins: [...(disable_fading_ ? [] : [$gVhhF$depictaiutilishared.slider_fading_factory({
148
+ threshold_: 0.96,
149
+ faded_opacity_: faded_opacity_
150
+ }).mutation_plugin_]), ...mutation_plugins_]
151
+ });
152
+ $gVhhF$solidjsweb.insert(slider.insert_here, children);
153
+ $gVhhF$solidjs.onCleanup(() => slider.observer.disconnect());
154
+ slider_ref_?.(slider);
155
+ return slider.container;
156
+ })();
157
+ }
132
158
  });
133
- $gVhhF$solidjsweb.insert(slider.insert_here, children);
134
- $gVhhF$solidjs.onCleanup(() => slider.observer.disconnect());
135
- slider_ref_?.(slider);
136
- return slider.container;
137
159
  }
138
160
  const $8c38828ae2321937$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<section aria-live=polite role=region class=tabs-body>`),
139
161
  $8c38828ae2321937$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<nav role=tablist class=tabs-bar>`),
@@ -1858,6 +1880,7 @@ const $93304d59a9747aa6$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<d
1858
1880
  function $93304d59a9747aa6$export$94026ee33dbabc26(props) {
1859
1881
  return (() => {
1860
1882
  const _el$ = $gVhhF$solidjsweb.getNextElement($93304d59a9747aa6$var$_tmpl$);
1883
+ $gVhhF$solidjsweb.insert(_el$, () => props.children);
1861
1884
  $gVhhF$solidjsweb.effect(_p$ => {
1862
1885
  const _v$ = `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`,
1863
1886
  _v$2 = props.class;
package/latest/index.d.ts CHANGED
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.23";
13
+ export const version = "3.0.25";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -222,7 +222,7 @@ export function SlidableItems({
222
222
  mutation_plugins_?: ((this: Amazing_Slider, mutations: IntersectionObserverEntry[], intersecting_items: Record<number, IntersectionObserverEntry>) => unknown)[];
223
223
  arrow_width_?: number;
224
224
  arrow_height_?: number;
225
- }): HTMLDivElement;
225
+ }): JSX.Element;
226
226
  /**
227
227
  * Renders a set of tabs
228
228
  * Will ignore any children that's not a <Tab />
@@ -520,7 +520,6 @@ export function decode_sorting(search_params: URLSearchParams, sorting_query_par
520
520
  * @param sorting_query_param
521
521
  */
522
522
  export function strip_encoded_filter_and_sort(search_params: URLSearchParams, filter_query_param_prefix: string, sorting_query_param: string): void;
523
- /** @jsxImportSource solid-js */
524
523
  /**
525
524
  * ImageContainer for using the padding hack to set the aspect ratio of an image
526
525
  * Put this around an <img> or <ResponsiveImg> to give it a container that always has the same size as the image. This prevents CLS and enables ResponsiveImg to work (the browser to load the correct image size)
@@ -529,6 +528,7 @@ export function strip_encoded_filter_and_sort(search_params: URLSearchParams, fi
529
528
  export function ImageContainer(props: {
530
529
  aspectRatio: number;
531
530
  class?: string;
531
+ children?: JSX.Element;
532
532
  }): HTMLDivElement;
533
533
  /**
534
534
  * Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
package/latest/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $9HbP8$add_to_version_info, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, slider_fading_factory as $9HbP8$slider_fading_factory, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, base_url as $9HbP8$base_url, dwarn as $9HbP8$dwarn, catchify as $9HbP8$catchify1, observer as $9HbP8$observer, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, report as $9HbP8$report, dlog as $9HbP8$dlog, ContainedImage as $9HbP8$ContainedImage, use_href_accessor as $9HbP8$use_href_accessor1, 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, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_safari as $9HbP8$is_safari, slider_fractional_factory as $9HbP8$slider_fractional_factory, useExpandingContainer as $9HbP8$useExpandingContainer, standard_price_format as $9HbP8$standard_price_format, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, snakeCasifyObject as $9HbP8$snakeCasifyObject, fetch_retry as $9HbP8$fetch_retry, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, javascript_media_query as $9HbP8$javascript_media_query, is_debug as $9HbP8$is_debug, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, buildThresholdList as $9HbP8$buildThresholdList, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ListenableSet as $9HbP8$ListenableSet1, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
2
- import { template as $9HbP8$template, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, Dynamic as $9HbP8$Dynamic, memo as $9HbP8$memo, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, effect as $9HbP8$effect, setAttribute as $9HbP8$setAttribute, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, use as $9HbP8$use, addEventListener as $9HbP8$addEventListener, getNextMarker as $9HbP8$getNextMarker, delegateEvents as $9HbP8$delegateEvents, classList as $9HbP8$classList, className as $9HbP8$className, style as $9HbP8$style, isServer as $9HbP8$isServer, setProperty as $9HbP8$setProperty } from "solid-js/web";
2
+ import { template as $9HbP8$template, createComponent as $9HbP8$createComponent, mergeProps as $9HbP8$mergeProps, Dynamic as $9HbP8$Dynamic, memo as $9HbP8$memo, getNextElement as $9HbP8$getNextElement, insert as $9HbP8$insert, effect as $9HbP8$effect, setAttribute as $9HbP8$setAttribute, isServer as $9HbP8$isServer, spread as $9HbP8$spread, runHydrationEvents as $9HbP8$runHydrationEvents, use as $9HbP8$use, addEventListener as $9HbP8$addEventListener, getNextMarker as $9HbP8$getNextMarker, delegateEvents as $9HbP8$delegateEvents, classList as $9HbP8$classList, className as $9HbP8$className, style as $9HbP8$style, setProperty as $9HbP8$setProperty } from "solid-js/web";
3
3
  import { createContext as $9HbP8$createContext, useContext as $9HbP8$useContext, createSignal as $9HbP8$createSignal, createSelector as $9HbP8$createSelector, getOwner as $9HbP8$getOwner, runWithOwner as $9HbP8$runWithOwner, Index as $9HbP8$Index, createMemo as $9HbP8$createMemo, children as $9HbP8$children, onCleanup as $9HbP8$onCleanup, createEffect as $9HbP8$createEffect, untrack as $9HbP8$untrack, Show as $9HbP8$Show, createUniqueId as $9HbP8$createUniqueId, mergeProps as $9HbP8$mergeProps1, ErrorBoundary as $9HbP8$ErrorBoundary, createResource as $9HbP8$createResource, splitProps as $9HbP8$splitProps, createRoot as $9HbP8$createRoot, createRenderEffect as $9HbP8$createRenderEffect, batch as $9HbP8$batch, Suspense as $9HbP8$Suspense, on as $9HbP8$on, For as $9HbP8$For, createComputed as $9HbP8$createComputed, createReaction as $9HbP8$createReaction, mapArray as $9HbP8$mapArray } from "solid-js";
4
4
  import { ListenableSet as $9HbP8$ListenableSet, catchify as $9HbP8$catchify, use_href_accessor as $9HbP8$use_href_accessor, report as $9HbP8$report1 } from "@depict-ai/utilishared/latest";
5
5
  import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from "solid-js/store";
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.23";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.25";
11
11
  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>`);
12
12
  function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
13
13
  return (() => {
@@ -25,7 +25,8 @@ function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
25
25
  return _el$;
26
26
  })();
27
27
  }
28
- const $f32e14878e75af51$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`);
28
+ const $f32e14878e75af51$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`),
29
+ $f32e14878e75af51$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div class="depict-slider depict"><button aria-label="Scroll left"class="left d-navbutton"type=button></button><button aria-label="Scroll right"class="right d-navbutton"type=button></button><div class=sliding>`);
29
30
  function $f32e14878e75af51$export$6649caad96ef8870({
30
31
  children: children,
31
32
  slider_ref_: slider_ref_,
@@ -35,35 +36,56 @@ function $f32e14878e75af51$export$6649caad96ef8870({
35
36
  arrow_width_: arrow_width_,
36
37
  arrow_height_: arrow_height_
37
38
  }) {
38
- const slider = new (0, $9HbP8$Amazing_Slider)({
39
- button_contents: {
40
- left: [(() => {
41
- const _el$ = $9HbP8$getNextElement($f32e14878e75af51$var$_tmpl$);
42
- $9HbP8$insert(_el$, $9HbP8$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
43
- height_: arrow_height_,
44
- width_: arrow_width_
45
- }));
46
- return _el$;
47
- })()],
48
- right: [(() => {
49
- const _el$2 = $9HbP8$getNextElement($f32e14878e75af51$var$_tmpl$);
50
- $9HbP8$insert(_el$2, $9HbP8$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
51
- height_: arrow_height_,
52
- width_: arrow_width_
53
- }));
39
+ const [hasHydrated, setHasHydrated] = $9HbP8$createSignal(false);
40
+ $9HbP8$createEffect(() => setHasHydrated(true));
41
+ const MakeButton = () => (() => {
42
+ const _el$ = $9HbP8$getNextElement($f32e14878e75af51$var$_tmpl$);
43
+ $9HbP8$insert(_el$, $9HbP8$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
44
+ height_: arrow_height_,
45
+ width_: arrow_width_
46
+ }));
47
+ return _el$;
48
+ })();
49
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
50
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
51
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
52
+ // Once we have hydrated, we construct and insert the actual slider
53
+ return $9HbP8$createComponent((0, $9HbP8$Show), {
54
+ get when() {
55
+ return hasHydrated() && !(0, $9HbP8$isServer);
56
+ },
57
+ get fallback() {
58
+ return (() => {
59
+ const _el$2 = $9HbP8$getNextElement($f32e14878e75af51$var$_tmpl$2),
60
+ _el$3 = _el$2.firstChild,
61
+ _el$4 = _el$3.nextSibling,
62
+ _el$5 = _el$4.nextSibling;
63
+ $9HbP8$insert(_el$3, $9HbP8$createComponent(MakeButton, {}));
64
+ $9HbP8$insert(_el$4, $9HbP8$createComponent(MakeButton, {}));
65
+ $9HbP8$insert(_el$5, children);
54
66
  return _el$2;
55
- })()]
67
+ })();
56
68
  },
57
- constructor_plugins: [$9HbP8$slider_snap_css().constructor_plugin],
58
- mutation_plugins: [...(disable_fading_ ? [] : [$9HbP8$slider_fading_factory({
59
- threshold_: 0.96,
60
- faded_opacity_: faded_opacity_
61
- }).mutation_plugin_]), ...mutation_plugins_]
69
+ get children() {
70
+ return (() => {
71
+ const slider = new (0, $9HbP8$Amazing_Slider)({
72
+ button_contents: {
73
+ left: [MakeButton()],
74
+ right: [MakeButton()]
75
+ },
76
+ constructor_plugins: [$9HbP8$slider_snap_css().constructor_plugin],
77
+ mutation_plugins: [...(disable_fading_ ? [] : [$9HbP8$slider_fading_factory({
78
+ threshold_: 0.96,
79
+ faded_opacity_: faded_opacity_
80
+ }).mutation_plugin_]), ...mutation_plugins_]
81
+ });
82
+ $9HbP8$insert(slider.insert_here, children);
83
+ $9HbP8$onCleanup(() => slider.observer.disconnect());
84
+ slider_ref_?.(slider);
85
+ return slider.container;
86
+ })();
87
+ }
62
88
  });
63
- $9HbP8$insert(slider.insert_here, children);
64
- $9HbP8$onCleanup(() => slider.observer.disconnect());
65
- slider_ref_?.(slider);
66
- return slider.container;
67
89
  }
68
90
  const $024fbc0a2d796fad$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<section aria-live=polite role=region class=tabs-body>`),
69
91
  $024fbc0a2d796fad$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<nav role=tablist class=tabs-bar>`),
@@ -1788,6 +1810,7 @@ const $f18d425032111270$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div>`);
1788
1810
  function $f18d425032111270$export$94026ee33dbabc26(props) {
1789
1811
  return (() => {
1790
1812
  const _el$ = $9HbP8$getNextElement($f18d425032111270$var$_tmpl$);
1813
+ $9HbP8$insert(_el$, () => props.children);
1791
1814
  $9HbP8$effect(_p$ => {
1792
1815
  const _v$ = `position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`,
1793
1816
  _v$2 = props.class;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "3.0.23",
3
+ "version": "3.0.25",
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",
@@ -83,14 +83,15 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
83
83
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
84
84
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
85
85
  /*! Depict.ai search and product listing SDK */
86
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.23";
86
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "3.0.25";
87
87
  const $9d19451330d04c3c$var$_tmpl$ = ["<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>'];
88
88
  function $9d19451330d04c3c$export$8be2714ec7f169ee() {
89
89
  var _$escape2, _$escape3;
90
90
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
91
91
  return $3hooq$solidjsweb.ssr($9d19451330d04c3c$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("width", (_$escape2 = $3hooq$solidjsweb.escape(props.width_, true)) !== null && _$escape2 !== void 0 ? _$escape2 : 14, false) + $3hooq$solidjsweb.ssrAttribute("height", (_$escape3 = $3hooq$solidjsweb.escape(props.height_, true)) !== null && _$escape3 !== void 0 ? _$escape3 : 26, false));
92
92
  }
93
- const $ad8ec7729fffeb9c$var$_tmpl$ = ["<div", ">", "</div>"];
93
+ const $ad8ec7729fffeb9c$var$_tmpl$ = ["<div", ">", "</div>"],
94
+ $ad8ec7729fffeb9c$var$_tmpl$2 = ["<div", ' class="depict-slider depict"><button aria-label="Scroll left" class="left d-navbutton" type="button">', '</button><button aria-label="Scroll right" class="right d-navbutton" type="button">', '</button><div class="sliding">', "</div></div>"];
94
95
  function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
95
96
  let {
96
97
  children: children,
@@ -101,27 +102,43 @@ function $ad8ec7729fffeb9c$export$6649caad96ef8870(_ref) {
101
102
  arrow_width_: arrow_width_,
102
103
  arrow_height_: arrow_height_
103
104
  } = _ref;
104
- const slider = new (0, $3hooq$depictaiutilishared.Amazing_Slider)({
105
- button_contents: {
106
- left: [$3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
107
- height_: arrow_height_,
108
- width_: arrow_width_
109
- })))],
110
- right: [$3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
111
- height_: arrow_height_,
112
- width_: arrow_width_
113
- })))]
105
+ const [hasHydrated, setHasHydrated] = $3hooq$solidjs.createSignal(false);
106
+ $3hooq$solidjs.createEffect(() => setHasHydrated(true));
107
+ const MakeButton = () => $3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $9d19451330d04c3c$export$8be2714ec7f169ee), {
108
+ height_: arrow_height_,
109
+ width_: arrow_width_
110
+ })));
111
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
112
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
113
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
114
+ // Once we have hydrated, we construct and insert the actual slider
115
+ return $3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
116
+ get when() {
117
+ return hasHydrated() && !(0, $3hooq$solidjsweb.isServer);
114
118
  },
115
- constructor_plugins: [$3hooq$depictaiutilishared.slider_snap_css().constructor_plugin],
116
- mutation_plugins: [...(disable_fading_ ? [] : [$3hooq$depictaiutilishared.slider_fading_factory({
117
- threshold_: 0.96,
118
- faded_opacity_: faded_opacity_
119
- }).mutation_plugin_]), ...mutation_plugins_]
119
+ get fallback() {
120
+ return $3hooq$solidjsweb.ssr($ad8ec7729fffeb9c$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(MakeButton, {})), $3hooq$solidjsweb.escape(children));
121
+ },
122
+ get children() {
123
+ return (() => {
124
+ const slider = new (0, $3hooq$depictaiutilishared.Amazing_Slider)({
125
+ button_contents: {
126
+ left: [MakeButton()],
127
+ right: [MakeButton()]
128
+ },
129
+ constructor_plugins: [$3hooq$depictaiutilishared.slider_snap_css().constructor_plugin],
130
+ mutation_plugins: [...(disable_fading_ ? [] : [$3hooq$depictaiutilishared.slider_fading_factory({
131
+ threshold_: 0.96,
132
+ faded_opacity_: faded_opacity_
133
+ }).mutation_plugin_]), ...mutation_plugins_]
134
+ });
135
+ $3hooq$solidjsweb.insert(slider.insert_here, children);
136
+ $3hooq$solidjs.onCleanup(() => slider.observer.disconnect());
137
+ slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
138
+ return slider.container;
139
+ })();
140
+ }
120
141
  });
121
- $3hooq$solidjsweb.insert(slider.insert_here, children);
122
- $3hooq$solidjs.onCleanup(() => slider.observer.disconnect());
123
- slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
124
- return slider.container;
125
142
  }
126
143
  const $513986fde589b871$var$_tmpl$ = ["<section", ' aria-live="polite" role="region" class="tabs-body">', "</section>"],
127
144
  $513986fde589b871$var$_tmpl$2 = ["<nav", ' role="tablist" class="tabs-bar">', "</nav>"],
@@ -1724,9 +1741,9 @@ function $a68b73fd7ba0853f$export$43cd1e747fecd42e(_ref2) {
1724
1741
  if (was_url_object) return url_object;
1725
1742
  return url_object.href;
1726
1743
  }
1727
- const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
1744
+ const $ce467edb5343cfcd$var$_tmpl$ = ["<div", ' style="', '"', ">", "</div>"];
1728
1745
  function $ce467edb5343cfcd$export$94026ee33dbabc26(props) {
1729
- return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $3hooq$solidjsweb.ssrAttribute("class", $3hooq$solidjsweb.escape(props.class, true), false));
1746
+ return $3hooq$solidjsweb.ssr($ce467edb5343cfcd$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $3hooq$solidjsweb.ssrAttribute("class", $3hooq$solidjsweb.escape(props.class, true), false), $3hooq$solidjsweb.escape(props.children));
1730
1747
  }
1731
1748
  function $858fdcf73148519f$export$e6fffe67d4cdd848(whatToWatch) {
1732
1749
  const [size, setSize] = $3hooq$solidjs.createSignal(0);
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.23";
13
+ export const version = "3.0.25";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -222,7 +222,7 @@ export function SlidableItems({
222
222
  mutation_plugins_?: ((this: Amazing_Slider, mutations: IntersectionObserverEntry[], intersecting_items: Record<number, IntersectionObserverEntry>) => unknown)[];
223
223
  arrow_width_?: number;
224
224
  arrow_height_?: number;
225
- }): HTMLDivElement;
225
+ }): JSX.Element;
226
226
  /**
227
227
  * Renders a set of tabs
228
228
  * Will ignore any children that's not a <Tab />
@@ -520,7 +520,6 @@ export function decode_sorting(search_params: URLSearchParams, sorting_query_par
520
520
  * @param sorting_query_param
521
521
  */
522
522
  export function strip_encoded_filter_and_sort(search_params: URLSearchParams, filter_query_param_prefix: string, sorting_query_param: string): void;
523
- /** @jsxImportSource solid-js */
524
523
  /**
525
524
  * ImageContainer for using the padding hack to set the aspect ratio of an image
526
525
  * Put this around an <img> or <ResponsiveImg> to give it a container that always has the same size as the image. This prevents CLS and enables ResponsiveImg to work (the browser to load the correct image size)
@@ -529,6 +528,7 @@ export function strip_encoded_filter_and_sort(search_params: URLSearchParams, fi
529
528
  export function ImageContainer(props: {
530
529
  aspectRatio: number;
531
530
  class?: string;
531
+ children?: JSX.Element;
532
532
  }): HTMLDivElement;
533
533
  /**
534
534
  * Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $b8hua$add_to_version_info, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, slider_fading_factory as $b8hua$slider_fading_factory, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, catchify as $b8hua$catchify1, observer as $b8hua$observer, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, report as $b8hua$report, dlog as $b8hua$dlog, ContainedImage as $b8hua$ContainedImage, use_href_accessor as $b8hua$use_href_accessor1, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, queueMacroTask as $b8hua$queueMacroTask, is_safari as $b8hua$is_safari, slider_fractional_factory as $b8hua$slider_fractional_factory, useExpandingContainer as $b8hua$useExpandingContainer, standard_price_format as $b8hua$standard_price_format, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, fetch_retry as $b8hua$fetch_retry, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, javascript_media_query as $b8hua$javascript_media_query, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
- import { createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, Dynamic as $b8hua$Dynamic, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, ssrAttribute as $b8hua$ssrAttribute, insert as $b8hua$insert, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, ssrStyle as $b8hua$ssrStyle, isServer as $b8hua$isServer, spread as $b8hua$spread } from "solid-js/web";
2
+ import { createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps, Dynamic as $b8hua$Dynamic, ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, escape as $b8hua$escape, ssrAttribute as $b8hua$ssrAttribute, isServer as $b8hua$isServer, insert as $b8hua$insert, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, ssrStyle as $b8hua$ssrStyle, spread as $b8hua$spread } from "solid-js/web";
3
3
  import { createContext as $b8hua$createContext, useContext as $b8hua$useContext, createSignal as $b8hua$createSignal, createSelector as $b8hua$createSelector, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, Index as $b8hua$Index, createMemo as $b8hua$createMemo, children as $b8hua$children, onCleanup as $b8hua$onCleanup, createEffect as $b8hua$createEffect, untrack as $b8hua$untrack, Show as $b8hua$Show, createUniqueId as $b8hua$createUniqueId, mergeProps as $b8hua$mergeProps1, ErrorBoundary as $b8hua$ErrorBoundary, createResource as $b8hua$createResource, splitProps as $b8hua$splitProps, createRoot as $b8hua$createRoot, createRenderEffect as $b8hua$createRenderEffect, batch as $b8hua$batch, Suspense as $b8hua$Suspense, on as $b8hua$on, For as $b8hua$For, createComputed as $b8hua$createComputed, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
4
4
  import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify, use_href_accessor as $b8hua$use_href_accessor, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
5
5
  import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
@@ -10,14 +10,15 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from
10
10
  /*! Depict.ai search and product listing SDK */
11
11
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
12
12
  register_es_version("ui", "ES10");
13
- const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.23";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "3.0.25";
14
14
  const $ca6ab5f08bd28bca$var$_tmpl$ = ["<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>'];
15
15
  function $ca6ab5f08bd28bca$export$8be2714ec7f169ee() {
16
16
  var _$escape2, _$escape3;
17
17
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18
18
  return $b8hua$ssr($ca6ab5f08bd28bca$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("width", (_$escape2 = $b8hua$escape(props.width_, true)) !== null && _$escape2 !== void 0 ? _$escape2 : 14, false) + $b8hua$ssrAttribute("height", (_$escape3 = $b8hua$escape(props.height_, true)) !== null && _$escape3 !== void 0 ? _$escape3 : 26, false));
19
19
  }
20
- const $002f09d00aac50b2$var$_tmpl$ = ["<div", ">", "</div>"];
20
+ const $002f09d00aac50b2$var$_tmpl$ = ["<div", ">", "</div>"],
21
+ $002f09d00aac50b2$var$_tmpl$2 = ["<div", ' class="depict-slider depict"><button aria-label="Scroll left" class="left d-navbutton" type="button">', '</button><button aria-label="Scroll right" class="right d-navbutton" type="button">', '</button><div class="sliding">', "</div></div>"];
21
22
  function $002f09d00aac50b2$export$6649caad96ef8870(_ref) {
22
23
  let {
23
24
  children: children,
@@ -28,27 +29,43 @@ function $002f09d00aac50b2$export$6649caad96ef8870(_ref) {
28
29
  arrow_width_: arrow_width_,
29
30
  arrow_height_: arrow_height_
30
31
  } = _ref;
31
- const slider = new (0, $b8hua$Amazing_Slider)({
32
- button_contents: {
33
- left: [$b8hua$ssr($002f09d00aac50b2$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
34
- height_: arrow_height_,
35
- width_: arrow_width_
36
- })))],
37
- right: [$b8hua$ssr($002f09d00aac50b2$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
38
- height_: arrow_height_,
39
- width_: arrow_width_
40
- })))]
32
+ const [hasHydrated, setHasHydrated] = $b8hua$createSignal(false);
33
+ $b8hua$createEffect(() => setHasHydrated(true));
34
+ const MakeButton = () => $b8hua$ssr($002f09d00aac50b2$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $ca6ab5f08bd28bca$export$8be2714ec7f169ee), {
35
+ height_: arrow_height_,
36
+ width_: arrow_width_
37
+ })));
38
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
39
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
40
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
41
+ // Once we have hydrated, we construct and insert the actual slider
42
+ return $b8hua$createComponent((0, $b8hua$Show), {
43
+ get when() {
44
+ return hasHydrated() && !(0, $b8hua$isServer);
41
45
  },
42
- constructor_plugins: [$b8hua$slider_snap_css().constructor_plugin],
43
- mutation_plugins: [...(disable_fading_ ? [] : [$b8hua$slider_fading_factory({
44
- threshold_: 0.96,
45
- faded_opacity_: faded_opacity_
46
- }).mutation_plugin_]), ...mutation_plugins_]
46
+ get fallback() {
47
+ return $b8hua$ssr($002f09d00aac50b2$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent(MakeButton, {})), $b8hua$escape($b8hua$createComponent(MakeButton, {})), $b8hua$escape(children));
48
+ },
49
+ get children() {
50
+ return (() => {
51
+ const slider = new (0, $b8hua$Amazing_Slider)({
52
+ button_contents: {
53
+ left: [MakeButton()],
54
+ right: [MakeButton()]
55
+ },
56
+ constructor_plugins: [$b8hua$slider_snap_css().constructor_plugin],
57
+ mutation_plugins: [...(disable_fading_ ? [] : [$b8hua$slider_fading_factory({
58
+ threshold_: 0.96,
59
+ faded_opacity_: faded_opacity_
60
+ }).mutation_plugin_]), ...mutation_plugins_]
61
+ });
62
+ $b8hua$insert(slider.insert_here, children);
63
+ $b8hua$onCleanup(() => slider.observer.disconnect());
64
+ slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
65
+ return slider.container;
66
+ })();
67
+ }
47
68
  });
48
- $b8hua$insert(slider.insert_here, children);
49
- $b8hua$onCleanup(() => slider.observer.disconnect());
50
- slider_ref_ === null || slider_ref_ === void 0 || slider_ref_(slider);
51
- return slider.container;
52
69
  }
53
70
  const $6a439680ae7e9ba3$var$_tmpl$ = ["<section", ' aria-live="polite" role="region" class="tabs-body">', "</section>"],
54
71
  $6a439680ae7e9ba3$var$_tmpl$2 = ["<nav", ' role="tablist" class="tabs-bar">', "</nav>"],
@@ -1651,9 +1668,9 @@ function $2855bffe06ef7a03$export$43cd1e747fecd42e(_ref2) {
1651
1668
  if (was_url_object) return url_object;
1652
1669
  return url_object.href;
1653
1670
  }
1654
- const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
1671
+ const $801e8845d3fa3653$var$_tmpl$ = ["<div", ' style="', '"', ">", "</div>"];
1655
1672
  function $801e8845d3fa3653$export$94026ee33dbabc26(props) {
1656
- return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $b8hua$ssrAttribute("class", $b8hua$escape(props.class, true), false));
1673
+ return $b8hua$ssr($801e8845d3fa3653$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("position:relative;width:100%;padding-bottom:".concat(1 / props.aspectRatio * 100, "%")), $b8hua$ssrAttribute("class", $b8hua$escape(props.class, true), false), $b8hua$escape(props.children));
1657
1674
  }
1658
1675
  function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
1659
1676
  const [size, setSize] = $b8hua$createSignal(0);
@@ -77,12 +77,13 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
77
77
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
78
78
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
79
79
  /*! Depict.ai search and product listing SDK */
80
- const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.23";
80
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "3.0.25";
81
81
  const $0f313083912e447a$var$_tmpl$ = ["<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>'];
82
82
  function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
83
83
  return $5vyXB$solidjsweb.ssr($0f313083912e447a$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrAttribute("width", $5vyXB$solidjsweb.escape(props.width_, true) ?? 14, false) + $5vyXB$solidjsweb.ssrAttribute("height", $5vyXB$solidjsweb.escape(props.height_, true) ?? 26, false));
84
84
  }
85
- const $a0e53f99354809d9$var$_tmpl$ = ["<div", ">", "</div>"];
85
+ const $a0e53f99354809d9$var$_tmpl$ = ["<div", ">", "</div>"],
86
+ $a0e53f99354809d9$var$_tmpl$2 = ["<div", ' class="depict-slider depict"><button aria-label="Scroll left" class="left d-navbutton" type="button">', '</button><button aria-label="Scroll right" class="right d-navbutton" type="button">', '</button><div class="sliding">', "</div></div>"];
86
87
  function $a0e53f99354809d9$export$6649caad96ef8870({
87
88
  children: children,
88
89
  slider_ref_: slider_ref_,
@@ -92,27 +93,43 @@ function $a0e53f99354809d9$export$6649caad96ef8870({
92
93
  arrow_width_: arrow_width_,
93
94
  arrow_height_: arrow_height_
94
95
  }) {
95
- const slider = new (0, $5vyXB$depictaiutilishared.Amazing_Slider)({
96
- button_contents: {
97
- left: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
98
- height_: arrow_height_,
99
- width_: arrow_width_
100
- })))],
101
- right: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
102
- height_: arrow_height_,
103
- width_: arrow_width_
104
- })))]
96
+ const [hasHydrated, setHasHydrated] = $5vyXB$solidjs.createSignal(false);
97
+ $5vyXB$solidjs.createEffect(() => setHasHydrated(true));
98
+ const MakeButton = () => $5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
99
+ height_: arrow_height_,
100
+ width_: arrow_width_
101
+ })));
102
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
103
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
104
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
105
+ // Once we have hydrated, we construct and insert the actual slider
106
+ return $5vyXB$solidjsweb.createComponent((0, $5vyXB$solidjs.Show), {
107
+ get when() {
108
+ return hasHydrated() && !(0, $5vyXB$solidjsweb.isServer);
105
109
  },
106
- constructor_plugins: [$5vyXB$depictaiutilishared.slider_snap_css().constructor_plugin],
107
- mutation_plugins: [...(disable_fading_ ? [] : [$5vyXB$depictaiutilishared.slider_fading_factory({
108
- threshold_: 0.96,
109
- faded_opacity_: faded_opacity_
110
- }).mutation_plugin_]), ...mutation_plugins_]
110
+ get fallback() {
111
+ return $5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$2, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent(MakeButton, {})), $5vyXB$solidjsweb.escape(children));
112
+ },
113
+ get children() {
114
+ return (() => {
115
+ const slider = new (0, $5vyXB$depictaiutilishared.Amazing_Slider)({
116
+ button_contents: {
117
+ left: [MakeButton()],
118
+ right: [MakeButton()]
119
+ },
120
+ constructor_plugins: [$5vyXB$depictaiutilishared.slider_snap_css().constructor_plugin],
121
+ mutation_plugins: [...(disable_fading_ ? [] : [$5vyXB$depictaiutilishared.slider_fading_factory({
122
+ threshold_: 0.96,
123
+ faded_opacity_: faded_opacity_
124
+ }).mutation_plugin_]), ...mutation_plugins_]
125
+ });
126
+ $5vyXB$solidjsweb.insert(slider.insert_here, children);
127
+ $5vyXB$solidjs.onCleanup(() => slider.observer.disconnect());
128
+ slider_ref_?.(slider);
129
+ return slider.container;
130
+ })();
131
+ }
111
132
  });
112
- $5vyXB$solidjsweb.insert(slider.insert_here, children);
113
- $5vyXB$solidjs.onCleanup(() => slider.observer.disconnect());
114
- slider_ref_?.(slider);
115
- return slider.container;
116
133
  }
117
134
  const $8c38828ae2321937$var$_tmpl$ = ["<section", ' aria-live="polite" role="region" class="tabs-body">', "</section>"],
118
135
  $8c38828ae2321937$var$_tmpl$2 = ["<nav", ' role="tablist" class="tabs-bar">', "</nav>"],
@@ -1635,9 +1652,9 @@ function $1ab22f2cd39b3061$export$43cd1e747fecd42e({
1635
1652
  if (was_url_object) return url_object;
1636
1653
  return url_object.href;
1637
1654
  }
1638
- const $93304d59a9747aa6$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
1655
+ const $93304d59a9747aa6$var$_tmpl$ = ["<div", ' style="', '"', ">", "</div>"];
1639
1656
  function $93304d59a9747aa6$export$94026ee33dbabc26(props) {
1640
- return $5vyXB$solidjsweb.ssr($93304d59a9747aa6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`), $5vyXB$solidjsweb.ssrAttribute("class", $5vyXB$solidjsweb.escape(props.class, true), false));
1657
+ return $5vyXB$solidjsweb.ssr($93304d59a9747aa6$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`), $5vyXB$solidjsweb.ssrAttribute("class", $5vyXB$solidjsweb.escape(props.class, true), false), $5vyXB$solidjsweb.escape(props.children));
1641
1658
  }
1642
1659
  function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
1643
1660
  const [size, setSize] = $5vyXB$solidjs.createSignal(0);
@@ -10,7 +10,7 @@ import { ProductListingRequestV3 } from "@depict-ai/types/api/ProductListingRequ
10
10
  import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { SearchFilter as _SearchFilter2 } from "@depict-ai/types/api/SearchRequestV2";
13
- export const version = "3.0.23";
13
+ export const version = "3.0.25";
14
14
  export type SDKColsAtSize = [number, number?][];
15
15
  /**
16
16
  * Transform SDK ColsAtSize into valid Layout ColsAtSize
@@ -222,7 +222,7 @@ export function SlidableItems({
222
222
  mutation_plugins_?: ((this: Amazing_Slider, mutations: IntersectionObserverEntry[], intersecting_items: Record<number, IntersectionObserverEntry>) => unknown)[];
223
223
  arrow_width_?: number;
224
224
  arrow_height_?: number;
225
- }): HTMLDivElement;
225
+ }): JSX.Element;
226
226
  /**
227
227
  * Renders a set of tabs
228
228
  * Will ignore any children that's not a <Tab />
@@ -520,7 +520,6 @@ export function decode_sorting(search_params: URLSearchParams, sorting_query_par
520
520
  * @param sorting_query_param
521
521
  */
522
522
  export function strip_encoded_filter_and_sort(search_params: URLSearchParams, filter_query_param_prefix: string, sorting_query_param: string): void;
523
- /** @jsxImportSource solid-js */
524
523
  /**
525
524
  * ImageContainer for using the padding hack to set the aspect ratio of an image
526
525
  * Put this around an <img> or <ResponsiveImg> to give it a container that always has the same size as the image. This prevents CLS and enables ResponsiveImg to work (the browser to load the correct image size)
@@ -529,6 +528,7 @@ export function strip_encoded_filter_and_sort(search_params: URLSearchParams, fi
529
528
  export function ImageContainer(props: {
530
529
  aspectRatio: number;
531
530
  class?: string;
531
+ children?: JSX.Element;
532
532
  }): HTMLDivElement;
533
533
  /**
534
534
  * Returns an accessor that will update when the size of the provided element changes, to be used with ResponsiveImg
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $i7OB2$add_to_version_info, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, get_session_id as $i7OB2$get_session_id, add_version_query_params as $i7OB2$add_version_query_params, base_url as $i7OB2$base_url, dwarn as $i7OB2$dwarn, catchify as $i7OB2$catchify1, observer as $i7OB2$observer, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, report as $i7OB2$report, dlog as $i7OB2$dlog, ContainedImage as $i7OB2$ContainedImage, use_href_accessor as $i7OB2$use_href_accessor1, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, queueMacroTask as $i7OB2$queueMacroTask, is_safari as $i7OB2$is_safari, slider_fractional_factory as $i7OB2$slider_fractional_factory, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, snakeCasifyObject as $i7OB2$snakeCasifyObject, fetch_retry as $i7OB2$fetch_retry, sort_obj as $i7OB2$sort_obj, make_url_with_query_params as $i7OB2$make_url_with_query_params, javascript_media_query as $i7OB2$javascript_media_query, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet1, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
- import { createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, Dynamic as $i7OB2$Dynamic, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, ssrAttribute as $i7OB2$ssrAttribute, insert as $i7OB2$insert, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, ssrStyle as $i7OB2$ssrStyle, isServer as $i7OB2$isServer, spread as $i7OB2$spread } from "solid-js/web";
2
+ import { createComponent as $i7OB2$createComponent, mergeProps as $i7OB2$mergeProps, Dynamic as $i7OB2$Dynamic, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, ssrAttribute as $i7OB2$ssrAttribute, isServer as $i7OB2$isServer, insert as $i7OB2$insert, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, ssrStyle as $i7OB2$ssrStyle, spread as $i7OB2$spread } from "solid-js/web";
3
3
  import { createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createSignal as $i7OB2$createSignal, createSelector as $i7OB2$createSelector, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, Index as $i7OB2$Index, createMemo as $i7OB2$createMemo, children as $i7OB2$children, onCleanup as $i7OB2$onCleanup, createEffect as $i7OB2$createEffect, untrack as $i7OB2$untrack, Show as $i7OB2$Show, createUniqueId as $i7OB2$createUniqueId, mergeProps as $i7OB2$mergeProps1, ErrorBoundary as $i7OB2$ErrorBoundary, createResource as $i7OB2$createResource, splitProps as $i7OB2$splitProps, createRoot as $i7OB2$createRoot, createRenderEffect as $i7OB2$createRenderEffect, batch as $i7OB2$batch, Suspense as $i7OB2$Suspense, on as $i7OB2$on, For as $i7OB2$For, createComputed as $i7OB2$createComputed, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
4
4
  import { ListenableSet as $i7OB2$ListenableSet, catchify as $i7OB2$catchify, use_href_accessor as $i7OB2$use_href_accessor, report as $i7OB2$report1 } from "@depict-ai/utilishared/latest";
5
5
  import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from "solid-js/store";
@@ -7,12 +7,13 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.23";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "3.0.25";
11
11
  const $fbbadcb080ad1d4a$var$_tmpl$ = ["<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>'];
12
12
  function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
13
13
  return $i7OB2$ssr($fbbadcb080ad1d4a$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrAttribute("width", $i7OB2$escape(props.width_, true) ?? 14, false) + $i7OB2$ssrAttribute("height", $i7OB2$escape(props.height_, true) ?? 26, false));
14
14
  }
15
- const $f32e14878e75af51$var$_tmpl$ = ["<div", ">", "</div>"];
15
+ const $f32e14878e75af51$var$_tmpl$ = ["<div", ">", "</div>"],
16
+ $f32e14878e75af51$var$_tmpl$2 = ["<div", ' class="depict-slider depict"><button aria-label="Scroll left" class="left d-navbutton" type="button">', '</button><button aria-label="Scroll right" class="right d-navbutton" type="button">', '</button><div class="sliding">', "</div></div>"];
16
17
  function $f32e14878e75af51$export$6649caad96ef8870({
17
18
  children: children,
18
19
  slider_ref_: slider_ref_,
@@ -22,27 +23,43 @@ function $f32e14878e75af51$export$6649caad96ef8870({
22
23
  arrow_width_: arrow_width_,
23
24
  arrow_height_: arrow_height_
24
25
  }) {
25
- const slider = new (0, $i7OB2$Amazing_Slider)({
26
- button_contents: {
27
- left: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
28
- height_: arrow_height_,
29
- width_: arrow_width_
30
- })))],
31
- right: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
32
- height_: arrow_height_,
33
- width_: arrow_width_
34
- })))]
26
+ const [hasHydrated, setHasHydrated] = $i7OB2$createSignal(false);
27
+ $i7OB2$createEffect(() => setHasHydrated(true));
28
+ const MakeButton = () => $i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
29
+ height_: arrow_height_,
30
+ width_: arrow_width_
31
+ })));
32
+ // To support SSR it would be very hard to make Amazing_Slider compatible with solid's SSR because it would have to be rewritten in a more JSX way
33
+ // However, all it would do on the server (when used by SlidableItems) is creating the following 5 div elements
34
+ // Therefore, we just bail on the server (and first render on the client which is the hydration) and return a static version of the slider
35
+ // Once we have hydrated, we construct and insert the actual slider
36
+ return $i7OB2$createComponent((0, $i7OB2$Show), {
37
+ get when() {
38
+ return hasHydrated() && !(0, $i7OB2$isServer);
35
39
  },
36
- constructor_plugins: [$i7OB2$slider_snap_css().constructor_plugin],
37
- mutation_plugins: [...(disable_fading_ ? [] : [$i7OB2$slider_fading_factory({
38
- threshold_: 0.96,
39
- faded_opacity_: faded_opacity_
40
- }).mutation_plugin_]), ...mutation_plugins_]
40
+ get fallback() {
41
+ return $i7OB2$ssr($f32e14878e75af51$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(MakeButton, {})), $i7OB2$escape($i7OB2$createComponent(MakeButton, {})), $i7OB2$escape(children));
42
+ },
43
+ get children() {
44
+ return (() => {
45
+ const slider = new (0, $i7OB2$Amazing_Slider)({
46
+ button_contents: {
47
+ left: [MakeButton()],
48
+ right: [MakeButton()]
49
+ },
50
+ constructor_plugins: [$i7OB2$slider_snap_css().constructor_plugin],
51
+ mutation_plugins: [...(disable_fading_ ? [] : [$i7OB2$slider_fading_factory({
52
+ threshold_: 0.96,
53
+ faded_opacity_: faded_opacity_
54
+ }).mutation_plugin_]), ...mutation_plugins_]
55
+ });
56
+ $i7OB2$insert(slider.insert_here, children);
57
+ $i7OB2$onCleanup(() => slider.observer.disconnect());
58
+ slider_ref_?.(slider);
59
+ return slider.container;
60
+ })();
61
+ }
41
62
  });
42
- $i7OB2$insert(slider.insert_here, children);
43
- $i7OB2$onCleanup(() => slider.observer.disconnect());
44
- slider_ref_?.(slider);
45
- return slider.container;
46
63
  }
47
64
  const $024fbc0a2d796fad$var$_tmpl$ = ["<section", ' aria-live="polite" role="region" class="tabs-body">', "</section>"],
48
65
  $024fbc0a2d796fad$var$_tmpl$2 = ["<nav", ' role="tablist" class="tabs-bar">', "</nav>"],
@@ -1565,9 +1582,9 @@ function $4147651646da990a$export$43cd1e747fecd42e({
1565
1582
  if (was_url_object) return url_object;
1566
1583
  return url_object.href;
1567
1584
  }
1568
- const $f18d425032111270$var$_tmpl$ = ["<div", ' style="', '"', "></div>"];
1585
+ const $f18d425032111270$var$_tmpl$ = ["<div", ' style="', '"', ">", "</div>"];
1569
1586
  function $f18d425032111270$export$94026ee33dbabc26(props) {
1570
- return $i7OB2$ssr($f18d425032111270$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`), $i7OB2$ssrAttribute("class", $i7OB2$escape(props.class, true), false));
1587
+ return $i7OB2$ssr($f18d425032111270$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$ssrStyle(`position:relative;width:100%;padding-bottom:${1 / props.aspectRatio * 100}%`), $i7OB2$ssrAttribute("class", $i7OB2$escape(props.class, true), false), $i7OB2$escape(props.children));
1571
1588
  }
1572
1589
  function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
1573
1590
  const [size, setSize] = $i7OB2$createSignal(0);