@depict-ai/ui 2.0.12 → 2.0.14
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 +68 -65
- package/ES10/index.d.ts +24 -7
- package/ES10/index.js +70 -68
- package/latest/index.cjs +65 -62
- package/latest/index.d.ts +24 -7
- package/latest/index.js +67 -65
- package/package.json +2 -2
- package/server/ES10/index.cjs +47 -44
- package/server/ES10/index.d.ts +24 -7
- package/server/ES10/index.js +49 -47
- package/server/latest/index.cjs +44 -41
- package/server/latest/index.d.ts +24 -7
- package/server/latest/index.js +46 -44
package/server/latest/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var $5vyXB$depictaiutilishared = require("@depict-ai/utilishared/latest");
|
|
2
|
-
var $5vyXB$solidjs = require("solid-js");
|
|
3
2
|
var $5vyXB$solidjsweb = require("solid-js/web");
|
|
3
|
+
var $5vyXB$solidjs = require("solid-js");
|
|
4
4
|
require("../../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
6
6
|
Object.defineProperty(e, n, {
|
|
@@ -10,6 +10,7 @@ function $parcel$export(e, n, v, s) {
|
|
|
10
10
|
configurable: true
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
|
+
$parcel$export(module.exports, "SlidableItems", () => $a0e53f99354809d9$export$6649caad96ef8870);
|
|
13
14
|
$parcel$export(module.exports, "make_accurate_size_accessor", () => $e5f442fb78c98741$export$9f191182275e9ef);
|
|
14
15
|
$parcel$export(module.exports, "RecommendationSlider", () => $72f96c4782db0b1b$export$9574e176201e5e8d);
|
|
15
16
|
$parcel$export(module.exports, "RecommendationGrid", () => $1f8dbf7e28b3eff2$export$9756467d34d91cdb);
|
|
@@ -61,7 +62,43 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$expo
|
|
|
61
62
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
|
|
62
63
|
$parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
|
|
63
64
|
/*! Depict.ai search and product listing SDK */
|
|
64
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.
|
|
65
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "2.0.14";
|
|
66
|
+
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>'];
|
|
67
|
+
function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
|
|
68
|
+
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));
|
|
69
|
+
}
|
|
70
|
+
const $a0e53f99354809d9$var$_tmpl$ = ["<div", ">", "</div>"];
|
|
71
|
+
function $a0e53f99354809d9$export$6649caad96ef8870({
|
|
72
|
+
children: children,
|
|
73
|
+
slider_ref_: slider_ref_,
|
|
74
|
+
faded_opacity_ = 0.7,
|
|
75
|
+
mutation_plugins_ = [],
|
|
76
|
+
disable_fading_: disable_fading_,
|
|
77
|
+
arrow_width_: arrow_width_,
|
|
78
|
+
arrow_height_: arrow_height_
|
|
79
|
+
}) {
|
|
80
|
+
const slider = new (0, $5vyXB$depictaiutilishared.Amazing_Slider)({
|
|
81
|
+
button_contents: {
|
|
82
|
+
left: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
|
|
83
|
+
height_: arrow_height_,
|
|
84
|
+
width_: arrow_width_
|
|
85
|
+
})))],
|
|
86
|
+
right: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
|
|
87
|
+
height_: arrow_height_,
|
|
88
|
+
width_: arrow_width_
|
|
89
|
+
})))]
|
|
90
|
+
},
|
|
91
|
+
constructor_plugins: [$5vyXB$depictaiutilishared.slider_snap_css().constructor_plugin],
|
|
92
|
+
mutation_plugins: [...(disable_fading_ ? [] : [$5vyXB$depictaiutilishared.slider_fading_factory({
|
|
93
|
+
threshold_: 0.96,
|
|
94
|
+
faded_opacity_: faded_opacity_
|
|
95
|
+
}).mutation_plugin_]), ...mutation_plugins_]
|
|
96
|
+
});
|
|
97
|
+
$5vyXB$solidjsweb.insert(slider.insert_here, children);
|
|
98
|
+
$5vyXB$solidjs.onCleanup(() => slider.observer.disconnect());
|
|
99
|
+
slider_ref_?.(slider);
|
|
100
|
+
return slider.container;
|
|
101
|
+
}
|
|
65
102
|
|
|
66
103
|
/** @jsxImportSource solid-js */
|
|
67
104
|
|
|
@@ -74,9 +111,10 @@ function $e5f442fb78c98741$export$9f191182275e9ef(what_to_watch) {
|
|
|
74
111
|
}
|
|
75
112
|
}));
|
|
76
113
|
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
114
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
77
115
|
const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(what_to_watch, ({
|
|
78
116
|
element: element
|
|
79
|
-
}) => resizeObserver.observe(element));
|
|
117
|
+
}) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
|
|
80
118
|
$5vyXB$solidjs.onCleanup(() => {
|
|
81
119
|
resizeObserver.disconnect();
|
|
82
120
|
disconnect();
|
|
@@ -119,7 +157,7 @@ const $4e04be41243c3d80$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
119
157
|
return $4e04be41243c3d80$var$transform_elements(sorted_cols_at_size);
|
|
120
158
|
};
|
|
121
159
|
function $fc23d7668ae0011d$export$a2cc176055f8f08() {
|
|
122
|
-
const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `
|
|
160
|
+
const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
123
161
|
return (0, $5vyXB$solidjsweb.isServer) ? {
|
|
124
162
|
t: `<!-- ${text} -->`
|
|
125
163
|
} : document.createComment(text);
|
|
@@ -463,42 +501,6 @@ function $f48d0fbb00835aaa$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
463
501
|
if (insert_after_container) container_element.after(style_element);
|
|
464
502
|
return [container_element, view_more_button_container(), view_less_button_container(), style_element];
|
|
465
503
|
}
|
|
466
|
-
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>'];
|
|
467
|
-
function $0f313083912e447a$export$8be2714ec7f169ee(props = {}) {
|
|
468
|
-
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));
|
|
469
|
-
}
|
|
470
|
-
const $a0e53f99354809d9$var$_tmpl$ = ["<div", ">", "</div>"];
|
|
471
|
-
function $a0e53f99354809d9$export$6649caad96ef8870({
|
|
472
|
-
children: children,
|
|
473
|
-
slider_ref_: slider_ref_,
|
|
474
|
-
faded_opacity_ = 0.7,
|
|
475
|
-
mutation_plugins_ = [],
|
|
476
|
-
disable_fading_: disable_fading_,
|
|
477
|
-
arrow_width_: arrow_width_,
|
|
478
|
-
arrow_height_: arrow_height_
|
|
479
|
-
}) {
|
|
480
|
-
const slider = new (0, $5vyXB$depictaiutilishared.Amazing_Slider)({
|
|
481
|
-
button_contents: {
|
|
482
|
-
left: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
|
|
483
|
-
height_: arrow_height_,
|
|
484
|
-
width_: arrow_width_
|
|
485
|
-
})))],
|
|
486
|
-
right: [$5vyXB$solidjsweb.ssr($a0e53f99354809d9$var$_tmpl$, $5vyXB$solidjsweb.ssrHydrationKey(), $5vyXB$solidjsweb.escape($5vyXB$solidjsweb.createComponent((0, $0f313083912e447a$export$8be2714ec7f169ee), {
|
|
487
|
-
height_: arrow_height_,
|
|
488
|
-
width_: arrow_width_
|
|
489
|
-
})))]
|
|
490
|
-
},
|
|
491
|
-
constructor_plugins: [$5vyXB$depictaiutilishared.slider_snap_css().constructor_plugin],
|
|
492
|
-
mutation_plugins: [...(disable_fading_ ? [] : [$5vyXB$depictaiutilishared.slider_fading_factory({
|
|
493
|
-
threshold_: 0.96,
|
|
494
|
-
faded_opacity_: faded_opacity_
|
|
495
|
-
}).mutation_plugin_]), ...mutation_plugins_]
|
|
496
|
-
});
|
|
497
|
-
$5vyXB$solidjsweb.insert(slider.insert_here, children);
|
|
498
|
-
$5vyXB$solidjs.onCleanup(() => slider.observer.disconnect());
|
|
499
|
-
slider_ref_?.(slider);
|
|
500
|
-
return slider.container;
|
|
501
|
-
}
|
|
502
504
|
function $363ce4d1d71041aa$export$d41d19e89346fa2({
|
|
503
505
|
recommendations_resource_: recommendations_resource_,
|
|
504
506
|
product_card_template_: product_card_template_,
|
|
@@ -729,9 +731,10 @@ function $19950faaac026e09$export$e6fffe67d4cdd848(whatToWatch) {
|
|
|
729
731
|
}
|
|
730
732
|
}));
|
|
731
733
|
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
734
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
732
735
|
const disconnect = (0, $5vyXB$depictaiutilishared.observer).onexists(whatToWatch, ({
|
|
733
736
|
element: element
|
|
734
|
-
}) => resizeObserver.observe(element));
|
|
737
|
+
}) => requestAnimationFrame($5vyXB$depictaiutilishared.catchify(() => resizeObserver.observe(element))));
|
|
735
738
|
$5vyXB$solidjs.onCleanup(() => {
|
|
736
739
|
resizeObserver.disconnect();
|
|
737
740
|
disconnect();
|
package/server/latest/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JSX, Signal, Accessor, Setter } from "solid-js";
|
|
2
|
-
import { Display, ColsAtSize, report, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/latest";
|
|
2
|
+
import { Amazing_Slider, Display, ColsAtSize, report, Elem, ModernDisplay, Node_Array } from "@depict-ai/utilishared/latest";
|
|
3
3
|
import { SearchFilter, SearchRequest } from "@depict-ai/types/api/SearchRequest";
|
|
4
4
|
import { SearchFilter as _SearchFilter1, ContentLink, SearchResponse } from "@depict-ai/types/api/SearchResponse";
|
|
5
5
|
import { BaseCategoryDisplay, ProductListingResponse } from "@depict-ai/types/api/ProductListingResponse";
|
|
@@ -7,7 +7,29 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
|
|
|
7
7
|
import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
|
|
8
8
|
import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
|
|
9
9
|
import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
|
|
10
|
-
export const version = "2.0.
|
|
10
|
+
export const version = "2.0.14";
|
|
11
|
+
/** @jsxImportSource solid-js */
|
|
12
|
+
export function GenericSliderArrowButton(props?: {
|
|
13
|
+
width_?: number;
|
|
14
|
+
height_?: number;
|
|
15
|
+
}): SVGElement;
|
|
16
|
+
export function SlidableItems({
|
|
17
|
+
children,
|
|
18
|
+
slider_ref_,
|
|
19
|
+
faded_opacity_,
|
|
20
|
+
mutation_plugins_,
|
|
21
|
+
disable_fading_,
|
|
22
|
+
arrow_width_,
|
|
23
|
+
arrow_height_
|
|
24
|
+
}: {
|
|
25
|
+
children?: JSX.Element;
|
|
26
|
+
slider_ref_?: (slider: Amazing_Slider) => any;
|
|
27
|
+
faded_opacity_?: number;
|
|
28
|
+
disable_fading_?: boolean;
|
|
29
|
+
mutation_plugins_?: ((this: Amazing_Slider, mutations: IntersectionObserverEntry[], intersecting_items: Record<number, IntersectionObserverEntry>) => unknown)[];
|
|
30
|
+
arrow_width_?: number;
|
|
31
|
+
arrow_height_?: number;
|
|
32
|
+
}): HTMLDivElement;
|
|
11
33
|
/**
|
|
12
34
|
* Returns accessor with the size of the provided element, including padding and border (I think)
|
|
13
35
|
*/
|
|
@@ -88,11 +110,6 @@ export type SolidLayoutOptions = {
|
|
|
88
110
|
* @return An accessor containing a CSS string
|
|
89
111
|
*/
|
|
90
112
|
export function SolidLayout(props: SolidLayoutOptions): JSX.Element;
|
|
91
|
-
/** @jsxImportSource solid-js */
|
|
92
|
-
export function GenericSliderArrowButton(props?: {
|
|
93
|
-
width_?: number;
|
|
94
|
-
height_?: number;
|
|
95
|
-
}): SVGElement;
|
|
96
113
|
type RecommendationSliderBaseProps<T extends Display> = {
|
|
97
114
|
grid_spacing: SDKGridSpacing;
|
|
98
115
|
cols_at_size: SDKColsAtSize;
|
package/server/latest/index.js
CHANGED
|
@@ -1,11 +1,47 @@
|
|
|
1
|
-
import { add_to_version_info as $i7OB2$add_to_version_info,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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, catchify as $i7OB2$catchify, observer as $i7OB2$observer, slider_fractional_factory as $i7OB2$slider_fractional_factory, 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, report as $i7OB2$report, is_safari as $i7OB2$is_safari, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, dlog as $i7OB2$dlog, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, javascript_media_query as $i7OB2$javascript_media_query, fetch_recs as $i7OB2$fetch_recs, snakeCasifyObject as $i7OB2$snakeCasifyObject, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, base_url as $i7OB2$base_url, get_depict_id as $i7OB2$get_depict_id, get_user_id as $i7OB2$get_user_id, get_session_id as $i7OB2$get_session_id, sort_obj as $i7OB2$sort_obj, fetch_retry as $i7OB2$fetch_retry, add_version_query_params as $i7OB2$add_version_query_params, dwarn as $i7OB2$dwarn, make_url_with_query_params as $i7OB2$make_url_with_query_params, edit_current_page_meta_tags as $i7OB2$edit_current_page_meta_tags, use_href_accessor as $i7OB2$use_href_accessor, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, queueMacroTask as $i7OB2$queueMacroTask, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, ContainedImage as $i7OB2$ContainedImage, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
|
|
2
|
+
import { ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, escape as $i7OB2$escape, createComponent as $i7OB2$createComponent, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, mergeProps as $i7OB2$mergeProps, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, ssrStyle as $i7OB2$ssrStyle, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
|
|
3
|
+
import { onCleanup as $i7OB2$onCleanup, createSignal as $i7OB2$createSignal, createMemo as $i7OB2$createMemo, createResource as $i7OB2$createResource, Suspense as $i7OB2$Suspense, Show as $i7OB2$Show, createRenderEffect as $i7OB2$createRenderEffect, createRoot as $i7OB2$createRoot, For as $i7OB2$For, getOwner as $i7OB2$getOwner, runWithOwner as $i7OB2$runWithOwner, createEffect as $i7OB2$createEffect, createUniqueId as $i7OB2$createUniqueId, untrack as $i7OB2$untrack, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, Index as $i7OB2$Index, on as $i7OB2$on, batch as $i7OB2$batch, createReaction as $i7OB2$createReaction } from "solid-js";
|
|
4
4
|
|
|
5
5
|
/*! Depict.ai search and product listing SDK */
|
|
6
6
|
import { register_es_version } from "../../multi_import_deduplicator.mjs";
|
|
7
7
|
register_es_version("ui", "latest");
|
|
8
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.
|
|
8
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "2.0.14";
|
|
9
|
+
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>'];
|
|
10
|
+
function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
|
|
11
|
+
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));
|
|
12
|
+
}
|
|
13
|
+
const $f32e14878e75af51$var$_tmpl$ = ["<div", ">", "</div>"];
|
|
14
|
+
function $f32e14878e75af51$export$6649caad96ef8870({
|
|
15
|
+
children: children,
|
|
16
|
+
slider_ref_: slider_ref_,
|
|
17
|
+
faded_opacity_ = 0.7,
|
|
18
|
+
mutation_plugins_ = [],
|
|
19
|
+
disable_fading_: disable_fading_,
|
|
20
|
+
arrow_width_: arrow_width_,
|
|
21
|
+
arrow_height_: arrow_height_
|
|
22
|
+
}) {
|
|
23
|
+
const slider = new (0, $i7OB2$Amazing_Slider)({
|
|
24
|
+
button_contents: {
|
|
25
|
+
left: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
|
|
26
|
+
height_: arrow_height_,
|
|
27
|
+
width_: arrow_width_
|
|
28
|
+
})))],
|
|
29
|
+
right: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
|
|
30
|
+
height_: arrow_height_,
|
|
31
|
+
width_: arrow_width_
|
|
32
|
+
})))]
|
|
33
|
+
},
|
|
34
|
+
constructor_plugins: [$i7OB2$slider_snap_css().constructor_plugin],
|
|
35
|
+
mutation_plugins: [...(disable_fading_ ? [] : [$i7OB2$slider_fading_factory({
|
|
36
|
+
threshold_: 0.96,
|
|
37
|
+
faded_opacity_: faded_opacity_
|
|
38
|
+
}).mutation_plugin_]), ...mutation_plugins_]
|
|
39
|
+
});
|
|
40
|
+
$i7OB2$insert(slider.insert_here, children);
|
|
41
|
+
$i7OB2$onCleanup(() => slider.observer.disconnect());
|
|
42
|
+
slider_ref_?.(slider);
|
|
43
|
+
return slider.container;
|
|
44
|
+
}
|
|
9
45
|
|
|
10
46
|
/** @jsxImportSource solid-js */
|
|
11
47
|
|
|
@@ -18,9 +54,10 @@ function $0fdb37d8ddabef25$export$9f191182275e9ef(what_to_watch) {
|
|
|
18
54
|
}
|
|
19
55
|
}));
|
|
20
56
|
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
57
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
21
58
|
const disconnect = (0, $i7OB2$observer).onexists(what_to_watch, ({
|
|
22
59
|
element: element
|
|
23
|
-
}) => resizeObserver.observe(element));
|
|
60
|
+
}) => requestAnimationFrame($i7OB2$catchify(() => resizeObserver.observe(element))));
|
|
24
61
|
$i7OB2$onCleanup(() => {
|
|
25
62
|
resizeObserver.disconnect();
|
|
26
63
|
disconnect();
|
|
@@ -63,7 +100,7 @@ const $b5cccc8ee7d24677$export$6daf8749b65a1b77 = cols_at_size => {
|
|
|
63
100
|
return $b5cccc8ee7d24677$var$transform_elements(sorted_cols_at_size);
|
|
64
101
|
};
|
|
65
102
|
function $a458486f22b22f63$export$a2cc176055f8f08() {
|
|
66
|
-
const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `
|
|
103
|
+
const text = "Please try setting `columnsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `columnsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
|
|
67
104
|
return (0, $i7OB2$isServer) ? {
|
|
68
105
|
t: `<!-- ${text} -->`
|
|
69
106
|
} : document.createComment(text);
|
|
@@ -407,42 +444,6 @@ function $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, container_element, ins
|
|
|
407
444
|
if (insert_after_container) container_element.after(style_element);
|
|
408
445
|
return [container_element, view_more_button_container(), view_less_button_container(), style_element];
|
|
409
446
|
}
|
|
410
|
-
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>'];
|
|
411
|
-
function $fbbadcb080ad1d4a$export$8be2714ec7f169ee(props = {}) {
|
|
412
|
-
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));
|
|
413
|
-
}
|
|
414
|
-
const $f32e14878e75af51$var$_tmpl$ = ["<div", ">", "</div>"];
|
|
415
|
-
function $f32e14878e75af51$export$6649caad96ef8870({
|
|
416
|
-
children: children,
|
|
417
|
-
slider_ref_: slider_ref_,
|
|
418
|
-
faded_opacity_ = 0.7,
|
|
419
|
-
mutation_plugins_ = [],
|
|
420
|
-
disable_fading_: disable_fading_,
|
|
421
|
-
arrow_width_: arrow_width_,
|
|
422
|
-
arrow_height_: arrow_height_
|
|
423
|
-
}) {
|
|
424
|
-
const slider = new (0, $i7OB2$Amazing_Slider)({
|
|
425
|
-
button_contents: {
|
|
426
|
-
left: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
|
|
427
|
-
height_: arrow_height_,
|
|
428
|
-
width_: arrow_width_
|
|
429
|
-
})))],
|
|
430
|
-
right: [$i7OB2$ssr($f32e14878e75af51$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fbbadcb080ad1d4a$export$8be2714ec7f169ee), {
|
|
431
|
-
height_: arrow_height_,
|
|
432
|
-
width_: arrow_width_
|
|
433
|
-
})))]
|
|
434
|
-
},
|
|
435
|
-
constructor_plugins: [$i7OB2$slider_snap_css().constructor_plugin],
|
|
436
|
-
mutation_plugins: [...(disable_fading_ ? [] : [$i7OB2$slider_fading_factory({
|
|
437
|
-
threshold_: 0.96,
|
|
438
|
-
faded_opacity_: faded_opacity_
|
|
439
|
-
}).mutation_plugin_]), ...mutation_plugins_]
|
|
440
|
-
});
|
|
441
|
-
$i7OB2$insert(slider.insert_here, children);
|
|
442
|
-
$i7OB2$onCleanup(() => slider.observer.disconnect());
|
|
443
|
-
slider_ref_?.(slider);
|
|
444
|
-
return slider.container;
|
|
445
|
-
}
|
|
446
447
|
function $c4492d24952ed731$export$d41d19e89346fa2({
|
|
447
448
|
recommendations_resource_: recommendations_resource_,
|
|
448
449
|
product_card_template_: product_card_template_,
|
|
@@ -673,9 +674,10 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
|
|
|
673
674
|
}
|
|
674
675
|
}));
|
|
675
676
|
// If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
|
|
677
|
+
// It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
|
|
676
678
|
const disconnect = (0, $i7OB2$observer).onexists(whatToWatch, ({
|
|
677
679
|
element: element
|
|
678
|
-
}) => resizeObserver.observe(element));
|
|
680
|
+
}) => requestAnimationFrame($i7OB2$catchify(() => resizeObserver.observe(element))));
|
|
679
681
|
$i7OB2$onCleanup(() => {
|
|
680
682
|
resizeObserver.disconnect();
|
|
681
683
|
disconnect();
|
|
@@ -8877,4 +8879,4 @@ const $4690a06c8489dcd0$export$c3834fa86c616831 = [[4], [3, 1024], [2, 901]];
|
|
|
8877
8879
|
const $4690a06c8489dcd0$export$864d304a0bc46829 = "2%";
|
|
8878
8880
|
const $4690a06c8489dcd0$export$7bf543b9d9be2c22 = (0, $e4615ecd1849548f$export$b91cec6bdc6b32a1);
|
|
8879
8881
|
$i7OB2$add_to_version_info("ui", (0, $ec291e0010116877$export$83d89fbfd8236492));
|
|
8880
|
-
export { $0fdb37d8ddabef25$export$9f191182275e9ef as make_accurate_size_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|
|
8882
|
+
export { $f32e14878e75af51$export$6649caad96ef8870 as SlidableItems, $0fdb37d8ddabef25$export$9f191182275e9ef as make_accurate_size_accessor, $ee116da074deb002$export$9574e176201e5e8d as RecommendationSlider, $9ea5383493360761$export$9756467d34d91cdb as RecommendationGrid, $e8ffe11ed01df0fe$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $e8ffe11ed01df0fe$export$e6fffe67d4cdd848 as makeSizeAccessor, $f18d425032111270$export$94026ee33dbabc26 as ImageContainer, $b7436a6d1fd64e3b$export$b69d0d92862de18b as SentryErrorBoundary, $6bb0a0c563dff4bb$export$6c6d7a51fa9aa15d as ExpandingDetails, $c16e74cfe125bb05$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $1adfe60f3a14a1d7$export$fecbb157621501bd as SelectedFilters, $fab07f52c9861732$export$3f1a388cc0d8fed7 as FilterBody, $5efb5894079b220e$export$b288c38ae3fddb56 as create_modified_filters, $c8d5ff4524619fcd$export$d21e32dfedac04be as SolidLayout, $194bd6b8e4c59830$export$79b1565500412d9b as general_modal_abstraction, $19976a74d273070d$export$3b621d86b1566b2 as CrossIcon, $fbbadcb080ad1d4a$export$8be2714ec7f169ee as GenericSliderArrowButton, $c58717f39bf51647$export$58e808b1db15d3bc as fetchDepictRecommendations, $961b5c64bef4662f$export$de035477d6fef996 as QuickLinks, $961b5c64bef4662f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $e4615ecd1849548f$export$b91cec6bdc6b32a1 as CategoryTitle, $a6e23a834336fc19$export$824dde41348efed1 as embedded_num_products, $c9312089e8983364$export$643598a327b5833e as get_categories, $961b5c64bef4662f$export$f34314aa9505732e as DepictCategory, $961b5c64bef4662f$export$e2bf8ce7779e827e as CategoryPage, $806c97b931758897$export$ac6237957a15b3f0 as DepictSearch, $806c97b931758897$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $806c97b931758897$export$f2dc7e4e4aa11abb as SearchPage, $806c97b931758897$export$316f6f283ae64765 as SearchField, $4fd48cb976bf1789$export$aa14a9f43128f61f as ProductCardError, $6891c018a834cfdd$export$d86a33413558014e as open_modal_with_alignment, $bb15dfb548a7666e$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $b6d5529b253681aa$export$b3ad617e9036868 as align_field, $b5cccc8ee7d24677$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $926b1b5ba2239356$export$1233ca167bf71f9a as styles_to_valid_css_string, $aea1edf92433e81e$export$fe334901e8bebd57 as disable_scrolling, $6e8944558258054f$export$d0596b5cae35ad4 as open_search_with_shift_slash, $7fa23e2a0079eca4$export$e015ed2f2950f2e3 as DepictAPI, $dc9262ef6f786812$export$d9f36cf74e24d595 as media_query_to_accessor, $6936724b9e0b98d5$export$689e204eadb33baf as setup_fast_leave, $bf52d9f9eebd1938$export$5196e4c01fa56fcb as show_toast, $8c0f86cb3e266eeb$export$a71e92cfbb498adc as SolidFormatPrice, $4ca91518c9a35379$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $d20eff0aadc28983$export$acb3eaade4b23afd as BasePlaceholder, $d134eae24341b4a1$export$89c6019e4baa40b1 as TextPlaceholder, $7f60f09116a3fe61$export$3f37af283f8fb843 as ImagePlaceholder, $753e9b2889a47c89$export$3ccaa27d81dd8556 as PageReplacer, $4690a06c8489dcd0$export$864d304a0bc46829 as defaultGridSpacing, $4690a06c8489dcd0$export$c3834fa86c616831 as defaultColsAtSize, $4690a06c8489dcd0$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $ec291e0010116877$export$83d89fbfd8236492 as version };
|