@depict-ai/ui 4.10.13 → 4.10.15
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 +167 -42
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +167 -42
- package/latest/index.cjs +163 -42
- package/latest/index.d.ts +1 -1
- package/latest/index.js +163 -42
- package/package.json +4 -4
- package/server/ES10/index.cjs +95 -21
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +95 -21
- package/server/latest/index.cjs +94 -21
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +94 -21
package/latest/index.cjs
CHANGED
|
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
111
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.15";
|
|
113
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -2698,17 +2698,49 @@ function $cc43b6428000c4bf$export$f21ab0717a89c77f(props) {
|
|
|
2698
2698
|
return _el$;
|
|
2699
2699
|
})();
|
|
2700
2700
|
}
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* Whether a click came from the keyboard (Enter/Space) rather than a pointer. Browsers report `detail === 0` for
|
|
2704
|
+
* keyboard-activated clicks and `>= 1` for real pointer clicks, so we use it to only move focus on keyboard opens.
|
|
2705
|
+
*/
|
|
2706
|
+
function $fb96fea58c4a45dd$export$c5c485c196a19ec1(event) {
|
|
2707
|
+
return event.detail === 0;
|
|
2708
|
+
}
|
|
2701
2709
|
var $0fe1e7efdf4200d6$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<button type=button class=expand-filter><!$><!/><span>`);
|
|
2702
2710
|
function $0fe1e7efdf4200d6$export$ca21a16d65b3dd8({
|
|
2703
2711
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2704
|
-
i18n_: i18n_
|
|
2712
|
+
i18n_: i18n_,
|
|
2713
|
+
expanding_container_element_: expanding_container_element_
|
|
2705
2714
|
}) {
|
|
2715
|
+
let button;
|
|
2706
2716
|
return (() => {
|
|
2707
2717
|
var _el$ = $gVhhF$solidjsweb.getNextElement($0fe1e7efdf4200d6$var$_tmpl$),
|
|
2708
2718
|
_el$3 = _el$.firstChild,
|
|
2709
2719
|
[_el$4, _co$] = $gVhhF$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
2710
2720
|
_el$2 = _el$4.nextSibling;
|
|
2711
|
-
$gVhhF$solidjsweb.addEventListener(_el$, "click", $gVhhF$depictaiutilishared.catchify(
|
|
2721
|
+
$gVhhF$solidjsweb.addEventListener(_el$, "click", $gVhhF$depictaiutilishared.catchify(event => {
|
|
2722
|
+
const container = expanding_container_element_;
|
|
2723
|
+
const will_expand = !get_show_extras();
|
|
2724
|
+
// Only move focus for keyboard activation; mouse users see the revealed options and don't need a focus jump.
|
|
2725
|
+
const keyboard_activated = $fb96fea58c4a45dd$export$c5c485c196a19ec1(event);
|
|
2726
|
+
const had_focus_inside = !!container && container.contains(document.activeElement);
|
|
2727
|
+
set_show_extras(will_expand);
|
|
2728
|
+
if (will_expand) {
|
|
2729
|
+
if (!keyboard_activated) return;
|
|
2730
|
+
// `expand()` (consumer's effect, runs after this) clears `inert`/`visibility`; focus the first revealed
|
|
2731
|
+
// option next frame so Tab continues through them. `preventScroll` so it doesn't yank the viewport down.
|
|
2732
|
+
requestAnimationFrame($gVhhF$depictaiutilishared.catchify(() => container?.querySelector("input:not(:disabled)")?.focus({
|
|
2733
|
+
preventScroll: true
|
|
2734
|
+
})));
|
|
2735
|
+
} else if (had_focus_inside)
|
|
2736
|
+
// Keep focus on the toggle when collapsing, otherwise making the container `inert` dumps focus to <body>
|
|
2737
|
+
// (Safari doesn't focus buttons on mouse click, so focus can still be inside the container here).
|
|
2738
|
+
button.focus({
|
|
2739
|
+
preventScroll: true
|
|
2740
|
+
});
|
|
2741
|
+
}), true);
|
|
2742
|
+
var _ref$ = button;
|
|
2743
|
+
typeof _ref$ === "function" ? $gVhhF$solidjsweb.use(_ref$, _el$) : button = _el$;
|
|
2712
2744
|
$gVhhF$solidjsweb.insert(_el$, $gVhhF$solidjsweb.createComponent((0, $cc43b6428000c4bf$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
2713
2745
|
$gVhhF$solidjsweb.insert(_el$2, (() => {
|
|
2714
2746
|
var _c$ = $gVhhF$solidjsweb.memo(() => !!get_show_extras());
|
|
@@ -2898,7 +2930,8 @@ function $d94869c80e337a3d$export$dd948f91abc3a1c4({
|
|
|
2898
2930
|
$gVhhF$solidjs.createRenderEffect(() => {
|
|
2899
2931
|
set_view_more_button_below_group_(togglable_rest() ? $gVhhF$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
|
|
2900
2932
|
show_extras_: show_extras_signal,
|
|
2901
|
-
i18n_: i18n_
|
|
2933
|
+
i18n_: i18n_,
|
|
2934
|
+
expanding_container_element_: expanding_container_els
|
|
2902
2935
|
}) : []);
|
|
2903
2936
|
});
|
|
2904
2937
|
$gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
@@ -3827,7 +3860,8 @@ function $3bdc00a1353c1150$export$a32086fa6616eafd({
|
|
|
3827
3860
|
$gVhhF$solidjs.createRenderEffect(() => {
|
|
3828
3861
|
set_view_more_button_below_group(some_top_level_are_hidden() ? $gVhhF$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
|
|
3829
3862
|
show_extras_: show_extras,
|
|
3830
|
-
i18n_: i18n_
|
|
3863
|
+
i18n_: i18n_,
|
|
3864
|
+
expanding_container_element_: expanding_container_els
|
|
3831
3865
|
}) : []);
|
|
3832
3866
|
});
|
|
3833
3867
|
$gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group());
|
|
@@ -4568,7 +4602,8 @@ function $b51a2b8b9355e66c$export$82ed4b28ecb67608({
|
|
|
4568
4602
|
$gVhhF$solidjs.createRenderEffect(() => {
|
|
4569
4603
|
set_view_more_button_below_group_(togglable_rest() ? $gVhhF$solidjsweb.createComponent((0, $0fe1e7efdf4200d6$export$ca21a16d65b3dd8), {
|
|
4570
4604
|
show_extras_: show_extras_signal,
|
|
4571
|
-
i18n_: i18n_
|
|
4605
|
+
i18n_: i18n_,
|
|
4606
|
+
expanding_container_element_: expanding_container_els
|
|
4572
4607
|
}) : []);
|
|
4573
4608
|
});
|
|
4574
4609
|
$gVhhF$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
@@ -5961,8 +5996,8 @@ var $f49857214f7675b1$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<svg
|
|
|
5961
5996
|
function $f49857214f7675b1$export$cb808a3c41736d8e() {
|
|
5962
5997
|
return $gVhhF$solidjsweb.getNextElement($f49857214f7675b1$var$_tmpl$);
|
|
5963
5998
|
}
|
|
5964
|
-
var $f8f64d05c525825b$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<
|
|
5965
|
-
$f8f64d05c525825b$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<
|
|
5999
|
+
var $f8f64d05c525825b$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<section class=filters tabindex=-1><div class=body>`),
|
|
6000
|
+
$f8f64d05c525825b$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<section class=sorting tabindex=-1><div class=body>`),
|
|
5966
6001
|
$f8f64d05c525825b$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=sort-and-filter-buttons><div class=outer><div class=inner><!$><!/><!$><!/><!$><!/>`),
|
|
5967
6002
|
$f8f64d05c525825b$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<span class=num-filters>`),
|
|
5968
6003
|
$f8f64d05c525825b$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=open-filters-button-container><!$><!/><button type=button><!$><!/><span>`),
|
|
@@ -6031,6 +6066,39 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6031
6066
|
available_sortings_: available_sortings_,
|
|
6032
6067
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6033
6068
|
};
|
|
6069
|
+
// Keyboard a11y for desktop panels (DOM order: after the grid). Keyboard opens move focus into the panel and
|
|
6070
|
+
// restore it to the toggle on close; mouse opens skip the focus move (already visible, and it'd jump the viewport).
|
|
6071
|
+
// `user_opened_panel` is set only on keyboard activation - `filters_open`/`sorting_open` also change
|
|
6072
|
+
// programmatically (undo toast, history restore, SDK consumers), which must not steal focus.
|
|
6073
|
+
let user_opened_panel = false;
|
|
6074
|
+
let filter_toggle_button;
|
|
6075
|
+
let sort_toggle_button;
|
|
6076
|
+
let current_panel;
|
|
6077
|
+
let current_panel_toggle_button;
|
|
6078
|
+
const focus_panel_when_in_dom = panel => $gVhhF$depictaiutilishared.catchify(async () => {
|
|
6079
|
+
// Bounded wait: if the panel never lands in the DOM (e.g. it's superseded by a rapid re-render before
|
|
6080
|
+
// insertion), the timeout lets this promise resolve instead of keeping `panel` - and the observer
|
|
6081
|
+
// listener it registers - referenced forever.
|
|
6082
|
+
await (0, $gVhhF$depictaiutilishared.observer).wait_for_element(panel, 4000);
|
|
6083
|
+
if (panel.isConnected) {
|
|
6084
|
+
// Focus the first interactive control (often a group's <summary>), not the <section>: the section has no
|
|
6085
|
+
// visible focus ring and is flex-stretched to full grid height (scrolling it mis-aligns). The first
|
|
6086
|
+
// control keeps focus visible and lets Tab walk through the panel. `summary` is focusable but not matched
|
|
6087
|
+
// by the input/button/etc. selectors, so it must be listed explicitly.
|
|
6088
|
+
const focus_target = panel.querySelector("summary, input:not([type='hidden']):not(:disabled), button:not(:disabled), a[href], select:not(:disabled), [tabindex]:not([tabindex='-1'])") ?? panel;
|
|
6089
|
+
focus_target.focus({
|
|
6090
|
+
preventScroll: true
|
|
6091
|
+
});
|
|
6092
|
+
focus_target.scrollIntoView({
|
|
6093
|
+
block: "nearest"
|
|
6094
|
+
});
|
|
6095
|
+
}
|
|
6096
|
+
})();
|
|
6097
|
+
const register_desktop_panel = (el, toggle_button, should_focus) => {
|
|
6098
|
+
current_panel = el;
|
|
6099
|
+
current_panel_toggle_button = toggle_button;
|
|
6100
|
+
if (should_focus) focus_panel_when_in_dom(el);
|
|
6101
|
+
};
|
|
6034
6102
|
const make_open_filters_button = (adhere_to_width = false, is_tabbable = false) => $gVhhF$solidjsweb.createComponent($f8f64d05c525825b$var$OpenFiltersButton, {
|
|
6035
6103
|
tabindex_: is_tabbable ? 0 : -1,
|
|
6036
6104
|
i18n_: i18n_,
|
|
@@ -6038,7 +6106,11 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6038
6106
|
search_sorting_open_: search_sorting_open_,
|
|
6039
6107
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6040
6108
|
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
6041
|
-
hide_button_: hide_filters
|
|
6109
|
+
hide_button_: hide_filters,
|
|
6110
|
+
on_user_open_: keyboard_activated => {
|
|
6111
|
+
if (keyboard_activated) user_opened_panel = true;
|
|
6112
|
+
},
|
|
6113
|
+
button_ref_: is_tabbable ? el => filter_toggle_button = el : undefined
|
|
6042
6114
|
});
|
|
6043
6115
|
const make_open_sorting_button = (adhere_to_width = false, is_tabbable = false) => $gVhhF$solidjsweb.createComponent($f8f64d05c525825b$var$OpenSortingButton, {
|
|
6044
6116
|
tabindex_: is_tabbable ? 0 : -1,
|
|
@@ -6048,7 +6120,11 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6048
6120
|
search_sorting_open_: search_sorting_open_,
|
|
6049
6121
|
available_sortings_: available_sortings_,
|
|
6050
6122
|
sort_button_width_: adhere_to_width ? sort_button_width_ : undefined,
|
|
6051
|
-
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6123
|
+
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_,
|
|
6124
|
+
on_user_open_: keyboard_activated => {
|
|
6125
|
+
if (keyboard_activated) user_opened_panel = true;
|
|
6126
|
+
},
|
|
6127
|
+
button_ref_: is_tabbable ? el => sort_toggle_button = el : undefined
|
|
6052
6128
|
});
|
|
6053
6129
|
let open_modal_;
|
|
6054
6130
|
let close_modal_;
|
|
@@ -6067,9 +6143,48 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6067
6143
|
grid_is_in_original_state = true;
|
|
6068
6144
|
}
|
|
6069
6145
|
});
|
|
6146
|
+
// Restore focus to the relevant toggle button when a desktop panel is torn down while focus is still inside it.
|
|
6147
|
+
const restore_focus_to_toggle_on_close = () => {
|
|
6148
|
+
const button_to_restore = current_panel_toggle_button;
|
|
6149
|
+
const focus_was_in_panel = !!current_panel && current_panel.contains(document.activeElement);
|
|
6150
|
+
current_panel = undefined;
|
|
6151
|
+
current_panel_toggle_button = undefined;
|
|
6152
|
+
if (focus_was_in_panel && button_to_restore) button_to_restore.focus({
|
|
6153
|
+
preventScroll: true
|
|
6154
|
+
});
|
|
6155
|
+
};
|
|
6156
|
+
// `<section>` + `aria-label` so the panel announces itself ("Filters"/"Sort") when we move focus to it; the bare
|
|
6157
|
+
// tabindex=-1 container would otherwise give screen readers nothing to read on focus. A semantic <section> avoids
|
|
6158
|
+
// an ARIA role and the UA styling pitfalls of <fieldset>; the existing CSS targets the `.filters`/`.sorting` class.
|
|
6159
|
+
const FiltersPanel = should_focus => $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
6160
|
+
get when() {
|
|
6161
|
+
return !hide_filters();
|
|
6162
|
+
},
|
|
6163
|
+
get children() {
|
|
6164
|
+
var _el$ = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$),
|
|
6165
|
+
_el$2 = _el$.firstChild;
|
|
6166
|
+
$gVhhF$solidjsweb.use(el => register_desktop_panel(el, filter_toggle_button, should_focus), _el$);
|
|
6167
|
+
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), filter_options));
|
|
6168
|
+
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setAttribute(_el$, "aria-label", i18n_.filters_()));
|
|
6169
|
+
return _el$;
|
|
6170
|
+
}
|
|
6171
|
+
});
|
|
6172
|
+
const SortingPanel = should_focus => (() => {
|
|
6173
|
+
var _el$3 = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$2),
|
|
6174
|
+
_el$4 = _el$3.firstChild;
|
|
6175
|
+
$gVhhF$solidjsweb.use(el => register_desktop_panel(el, sort_toggle_button, should_focus), _el$3);
|
|
6176
|
+
$gVhhF$solidjsweb.insert(_el$4, $gVhhF$solidjsweb.createComponent((0, $be89be42ce9ea60f$export$1f1775a58da589b5), sorting_options));
|
|
6177
|
+
$gVhhF$solidjsweb.effect(() => $gVhhF$solidjsweb.setAttribute(_el$3, "aria-label", i18n_.sorting_text_()));
|
|
6178
|
+
return _el$3;
|
|
6179
|
+
})();
|
|
6070
6180
|
$gVhhF$solidjs.createEffect(() => {
|
|
6181
|
+
// Consume the user-intent flag once per run, in every branch, so a stale flag can't leak into a later
|
|
6182
|
+
// resize-triggered re-render and steal focus.
|
|
6183
|
+
const should_focus_panel = user_opened_panel;
|
|
6184
|
+
user_opened_panel = false;
|
|
6071
6185
|
if (!filters_open() && !sorting_open()) {
|
|
6072
6186
|
close_modal_?.();
|
|
6187
|
+
restore_focus_to_toggle_on_close();
|
|
6073
6188
|
set_extra_els_in_results_container_("");
|
|
6074
6189
|
} else if (isSmall()()) {
|
|
6075
6190
|
if ($gVhhF$solidjs.untrack(() => input_modal_open_?.())) {
|
|
@@ -6078,26 +6193,14 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
|
|
|
6078
6193
|
set_sorting_open(false);
|
|
6079
6194
|
return;
|
|
6080
6195
|
}
|
|
6196
|
+
// The modal manages its own focus; just drop the desktop panel reference.
|
|
6197
|
+
current_panel = undefined;
|
|
6198
|
+
current_panel_toggle_button = undefined;
|
|
6081
6199
|
open_modal_?.();
|
|
6082
6200
|
set_extra_els_in_results_container_("");
|
|
6083
6201
|
} else {
|
|
6084
6202
|
close_modal_?.();
|
|
6085
|
-
if (filters_open()) set_extra_els_in_results_container_(() =>
|
|
6086
|
-
get when() {
|
|
6087
|
-
return !hide_filters();
|
|
6088
|
-
},
|
|
6089
|
-
get children() {
|
|
6090
|
-
var _el$ = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$),
|
|
6091
|
-
_el$2 = _el$.firstChild;
|
|
6092
|
-
$gVhhF$solidjsweb.insert(_el$2, $gVhhF$solidjsweb.createComponent((0, $aff9a96d30ed3563$export$3f1a388cc0d8fed7), filter_options));
|
|
6093
|
-
return _el$;
|
|
6094
|
-
}
|
|
6095
|
-
}));else set_extra_els_in_results_container_((() => {
|
|
6096
|
-
var _el$3 = $gVhhF$solidjsweb.getNextElement($f8f64d05c525825b$var$_tmpl$2),
|
|
6097
|
-
_el$4 = _el$3.firstChild;
|
|
6098
|
-
$gVhhF$solidjsweb.insert(_el$4, $gVhhF$solidjsweb.createComponent((0, $be89be42ce9ea60f$export$1f1775a58da589b5), sorting_options));
|
|
6099
|
-
return _el$3;
|
|
6100
|
-
})());
|
|
6203
|
+
if (filters_open()) set_extra_els_in_results_container_(() => FiltersPanel(should_focus_panel));else set_extra_els_in_results_container_(SortingPanel(should_focus_panel));
|
|
6101
6204
|
}
|
|
6102
6205
|
});
|
|
6103
6206
|
$gVhhF$depictaiutilishared.catchify(async () => {
|
|
@@ -6161,7 +6264,9 @@ function $f8f64d05c525825b$var$OpenFiltersButton({
|
|
|
6161
6264
|
filter_button_width_: filter_button_width_,
|
|
6162
6265
|
tabindex_: tabindex_,
|
|
6163
6266
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
6164
|
-
hide_button_: hide_button_
|
|
6267
|
+
hide_button_: hide_button_,
|
|
6268
|
+
on_user_open_: on_user_open_,
|
|
6269
|
+
button_ref_: button_ref_
|
|
6165
6270
|
}) {
|
|
6166
6271
|
const filters_closed = $gVhhF$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
6167
6272
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -6184,14 +6289,18 @@ function $f8f64d05c525825b$var$OpenFiltersButton({
|
|
|
6184
6289
|
return _el$15;
|
|
6185
6290
|
}
|
|
6186
6291
|
}), _el$21, _co$5);
|
|
6187
|
-
$gVhhF$solidjsweb.addEventListener(_el$16, "click", $gVhhF$depictaiutilishared.catchify(
|
|
6292
|
+
$gVhhF$solidjsweb.addEventListener(_el$16, "click", $gVhhF$depictaiutilishared.catchify(event => $gVhhF$solidjs.batch(() => {
|
|
6188
6293
|
if (search_filters_open_[0]()) {
|
|
6189
6294
|
search_filters_open_[1](false);
|
|
6190
6295
|
return;
|
|
6191
6296
|
}
|
|
6297
|
+
// Only keyboard opens move focus into the panel; mouse opens leave the viewport put.
|
|
6298
|
+
on_user_open_?.($fb96fea58c4a45dd$export$c5c485c196a19ec1(event));
|
|
6192
6299
|
search_filters_open_[1](true);
|
|
6193
6300
|
search_sorting_open_[1](false);
|
|
6194
6301
|
})), true);
|
|
6302
|
+
var _ref$2 = button_ref_;
|
|
6303
|
+
typeof _ref$2 === "function" ? $gVhhF$solidjsweb.use(_ref$2, _el$16) : button_ref_ = _el$16;
|
|
6195
6304
|
$gVhhF$solidjsweb.setAttribute(_el$16, "tabindex", tabindex_);
|
|
6196
6305
|
$gVhhF$solidjsweb.className(_el$16, "filter toggle-button major-minor-transition" + ((0, $gVhhF$solidjsweb.isServer) ? " minor" : ""));
|
|
6197
6306
|
$gVhhF$solidjsweb.insert(_el$16, $gVhhF$solidjsweb.createComponent((0, $gVhhF$solidjs.Show), {
|
|
@@ -6213,21 +6322,24 @@ function $f8f64d05c525825b$var$OpenFiltersButton({
|
|
|
6213
6322
|
_v$2 = !filters_closed(),
|
|
6214
6323
|
_v$3 = !!filters_closed(),
|
|
6215
6324
|
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
6216
|
-
_v$5 =
|
|
6325
|
+
_v$5 = !filters_closed(),
|
|
6326
|
+
_v$6 = filter_button_width_?.() ? {
|
|
6217
6327
|
width: filter_button_width_() + "px"
|
|
6218
6328
|
} : {};
|
|
6219
6329
|
_p$.e = $gVhhF$solidjsweb.style(_el$14, _v$, _p$.e);
|
|
6220
6330
|
_v$2 !== _p$.t && _el$16.classList.toggle("major", _p$.t = _v$2);
|
|
6221
6331
|
_v$3 !== _p$.a && _el$16.classList.toggle("minor", _p$.a = _v$3);
|
|
6222
6332
|
_v$4 !== _p$.o && $gVhhF$solidjsweb.setAttribute(_el$16, "aria-label", _p$.o = _v$4);
|
|
6223
|
-
_p$.i
|
|
6333
|
+
_v$5 !== _p$.i && $gVhhF$solidjsweb.setAttribute(_el$16, "aria-expanded", _p$.i = _v$5);
|
|
6334
|
+
_p$.n = $gVhhF$solidjsweb.style(_el$16, _v$6, _p$.n);
|
|
6224
6335
|
return _p$;
|
|
6225
6336
|
}, {
|
|
6226
6337
|
e: undefined,
|
|
6227
6338
|
t: undefined,
|
|
6228
6339
|
a: undefined,
|
|
6229
6340
|
o: undefined,
|
|
6230
|
-
i: undefined
|
|
6341
|
+
i: undefined,
|
|
6342
|
+
n: undefined
|
|
6231
6343
|
});
|
|
6232
6344
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
6233
6345
|
return _el$14;
|
|
@@ -6241,7 +6353,9 @@ function $f8f64d05c525825b$var$OpenSortingButton({
|
|
|
6241
6353
|
search_sorting_open_: search_sorting_open_,
|
|
6242
6354
|
sort_button_width_: sort_button_width_,
|
|
6243
6355
|
tabindex_: tabindex_,
|
|
6244
|
-
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6356
|
+
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_,
|
|
6357
|
+
on_user_open_: on_user_open_,
|
|
6358
|
+
button_ref_: button_ref_
|
|
6245
6359
|
}) {
|
|
6246
6360
|
const sorting_closed = $gVhhF$solidjs.createMemo(() => !search_sorting_open_[0]());
|
|
6247
6361
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -6250,14 +6364,18 @@ function $f8f64d05c525825b$var$OpenSortingButton({
|
|
|
6250
6364
|
_el$23 = _el$22.firstChild,
|
|
6251
6365
|
_el$24 = _el$23.nextSibling,
|
|
6252
6366
|
[_el$25, _co$6] = $gVhhF$solidjsweb.getNextMarker(_el$24.nextSibling);
|
|
6253
|
-
$gVhhF$solidjsweb.addEventListener(_el$22, "click", $gVhhF$depictaiutilishared.catchify(
|
|
6367
|
+
$gVhhF$solidjsweb.addEventListener(_el$22, "click", $gVhhF$depictaiutilishared.catchify(event => $gVhhF$solidjs.batch(() => {
|
|
6254
6368
|
if (search_sorting_open_[0]()) {
|
|
6255
6369
|
search_sorting_open_[1](false);
|
|
6256
6370
|
return;
|
|
6257
6371
|
}
|
|
6372
|
+
// Only keyboard opens move focus into the panel; mouse opens leave the viewport put.
|
|
6373
|
+
on_user_open_?.($fb96fea58c4a45dd$export$c5c485c196a19ec1(event));
|
|
6258
6374
|
search_filters_open_[1](false);
|
|
6259
6375
|
search_sorting_open_[1](true);
|
|
6260
6376
|
})), true);
|
|
6377
|
+
var _ref$3 = button_ref_;
|
|
6378
|
+
typeof _ref$3 === "function" ? $gVhhF$solidjsweb.use(_ref$3, _el$22) : button_ref_ = _el$22;
|
|
6261
6379
|
$gVhhF$solidjsweb.setAttribute(_el$22, "tabindex", tabindex_);
|
|
6262
6380
|
$gVhhF$solidjsweb.insert(_el$23, (() => {
|
|
6263
6381
|
var _c$ = $gVhhF$solidjsweb.memo(() => !!sorting_closed());
|
|
@@ -6279,22 +6397,25 @@ function $f8f64d05c525825b$var$OpenSortingButton({
|
|
|
6279
6397
|
}
|
|
6280
6398
|
}), _el$25, _co$6);
|
|
6281
6399
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
6282
|
-
var _v$
|
|
6283
|
-
_v$
|
|
6284
|
-
_v$
|
|
6285
|
-
_v$
|
|
6400
|
+
var _v$7 = !sorting_closed(),
|
|
6401
|
+
_v$8 = !!sorting_closed(),
|
|
6402
|
+
_v$9 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
6403
|
+
_v$10 = !sorting_closed(),
|
|
6404
|
+
_v$11 = sort_button_width_?.() ? {
|
|
6286
6405
|
width: sort_button_width_() + "px"
|
|
6287
6406
|
} : {};
|
|
6288
|
-
_v$
|
|
6289
|
-
_v$
|
|
6290
|
-
_v$
|
|
6291
|
-
_p$.o
|
|
6407
|
+
_v$7 !== _p$.e && _el$22.classList.toggle("major", _p$.e = _v$7);
|
|
6408
|
+
_v$8 !== _p$.t && _el$22.classList.toggle("minor", _p$.t = _v$8);
|
|
6409
|
+
_v$9 !== _p$.a && $gVhhF$solidjsweb.setAttribute(_el$22, "aria-label", _p$.a = _v$9);
|
|
6410
|
+
_v$10 !== _p$.o && $gVhhF$solidjsweb.setAttribute(_el$22, "aria-expanded", _p$.o = _v$10);
|
|
6411
|
+
_p$.i = $gVhhF$solidjsweb.style(_el$22, _v$11, _p$.i);
|
|
6292
6412
|
return _p$;
|
|
6293
6413
|
}, {
|
|
6294
6414
|
e: undefined,
|
|
6295
6415
|
t: undefined,
|
|
6296
6416
|
a: undefined,
|
|
6297
|
-
o: undefined
|
|
6417
|
+
o: undefined,
|
|
6418
|
+
i: undefined
|
|
6298
6419
|
});
|
|
6299
6420
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
6300
6421
|
return _el$22;
|
package/latest/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.10.
|
|
14
|
+
export const version = "4.10.15";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|