@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/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.15";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -2821,18 +2821,53 @@ function $a904ccf883f60231$export$f21ab0717a89c77f(props) {
|
|
|
2821
2821
|
return _el$;
|
|
2822
2822
|
})();
|
|
2823
2823
|
}
|
|
2824
|
+
|
|
2825
|
+
/**
|
|
2826
|
+
* Whether a click came from the keyboard (Enter/Space) rather than a pointer. Browsers report `detail === 0` for
|
|
2827
|
+
* keyboard-activated clicks and `>= 1` for real pointer clicks, so we use it to only move focus on keyboard opens.
|
|
2828
|
+
*/
|
|
2829
|
+
function $5f28fa844ecd384c$export$c5c485c196a19ec1(event) {
|
|
2830
|
+
return event.detail === 0;
|
|
2831
|
+
}
|
|
2824
2832
|
var $b0477e4d832f090e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=expand-filter><!$><!/><span>`);
|
|
2825
2833
|
function $b0477e4d832f090e$export$ca21a16d65b3dd8(_ref) {
|
|
2826
2834
|
let {
|
|
2827
2835
|
show_extras_: [get_show_extras, set_show_extras],
|
|
2828
|
-
i18n_: i18n_
|
|
2836
|
+
i18n_: i18n_,
|
|
2837
|
+
expanding_container_element_: expanding_container_element_
|
|
2829
2838
|
} = _ref;
|
|
2839
|
+
let button;
|
|
2830
2840
|
return (() => {
|
|
2831
2841
|
var _el$ = $52FdA$solidjsweb.getNextElement($b0477e4d832f090e$var$_tmpl$),
|
|
2832
2842
|
_el$3 = _el$.firstChild,
|
|
2833
2843
|
[_el$4, _co$] = $52FdA$solidjsweb.getNextMarker(_el$3.nextSibling),
|
|
2834
2844
|
_el$2 = _el$4.nextSibling;
|
|
2835
|
-
$52FdA$solidjsweb.addEventListener(_el$, "click", $52FdA$depictaiutilishared.catchify(
|
|
2845
|
+
$52FdA$solidjsweb.addEventListener(_el$, "click", $52FdA$depictaiutilishared.catchify(event => {
|
|
2846
|
+
const container = expanding_container_element_;
|
|
2847
|
+
const will_expand = !get_show_extras();
|
|
2848
|
+
// Only move focus for keyboard activation; mouse users see the revealed options and don't need a focus jump.
|
|
2849
|
+
const keyboard_activated = $5f28fa844ecd384c$export$c5c485c196a19ec1(event);
|
|
2850
|
+
const had_focus_inside = !!container && container.contains(document.activeElement);
|
|
2851
|
+
set_show_extras(will_expand);
|
|
2852
|
+
if (will_expand) {
|
|
2853
|
+
if (!keyboard_activated) return;
|
|
2854
|
+
// `expand()` (consumer's effect, runs after this) clears `inert`/`visibility`; focus the first revealed
|
|
2855
|
+
// option next frame so Tab continues through them. `preventScroll` so it doesn't yank the viewport down.
|
|
2856
|
+
requestAnimationFrame($52FdA$depictaiutilishared.catchify(() => {
|
|
2857
|
+
var _container$querySelec;
|
|
2858
|
+
return container === null || container === void 0 ? void 0 : (_container$querySelec = container.querySelector("input:not(:disabled)")) === null || _container$querySelec === void 0 ? void 0 : _container$querySelec.focus({
|
|
2859
|
+
preventScroll: true
|
|
2860
|
+
});
|
|
2861
|
+
}));
|
|
2862
|
+
} else if (had_focus_inside)
|
|
2863
|
+
// Keep focus on the toggle when collapsing, otherwise making the container `inert` dumps focus to <body>
|
|
2864
|
+
// (Safari doesn't focus buttons on mouse click, so focus can still be inside the container here).
|
|
2865
|
+
button.focus({
|
|
2866
|
+
preventScroll: true
|
|
2867
|
+
});
|
|
2868
|
+
}), true);
|
|
2869
|
+
var _ref$ = button;
|
|
2870
|
+
typeof _ref$ === "function" ? $52FdA$solidjsweb.use(_ref$, _el$) : button = _el$;
|
|
2836
2871
|
$52FdA$solidjsweb.insert(_el$, $52FdA$solidjsweb.createComponent((0, $a904ccf883f60231$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
2837
2872
|
$52FdA$solidjsweb.insert(_el$2, (() => {
|
|
2838
2873
|
var _c$ = $52FdA$solidjsweb.memo(() => !!get_show_extras());
|
|
@@ -3031,7 +3066,8 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
|
|
|
3031
3066
|
$52FdA$solidjs.createRenderEffect(() => {
|
|
3032
3067
|
set_view_more_button_below_group_(togglable_rest() ? $52FdA$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
|
|
3033
3068
|
show_extras_: show_extras_signal,
|
|
3034
|
-
i18n_: i18n_
|
|
3069
|
+
i18n_: i18n_,
|
|
3070
|
+
expanding_container_element_: expanding_container_els
|
|
3035
3071
|
}) : []);
|
|
3036
3072
|
});
|
|
3037
3073
|
$52FdA$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
@@ -4008,7 +4044,8 @@ function $9c1d49181fb3002a$export$a32086fa6616eafd(_ref) {
|
|
|
4008
4044
|
$52FdA$solidjs.createRenderEffect(() => {
|
|
4009
4045
|
set_view_more_button_below_group(some_top_level_are_hidden() ? $52FdA$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
|
|
4010
4046
|
show_extras_: show_extras,
|
|
4011
|
-
i18n_: i18n_
|
|
4047
|
+
i18n_: i18n_,
|
|
4048
|
+
expanding_container_element_: expanding_container_els
|
|
4012
4049
|
}) : []);
|
|
4013
4050
|
});
|
|
4014
4051
|
$52FdA$solidjs.onCleanup(() => set_view_more_button_below_group());
|
|
@@ -4815,7 +4852,8 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
|
|
|
4815
4852
|
$52FdA$solidjs.createRenderEffect(() => {
|
|
4816
4853
|
set_view_more_button_below_group_(togglable_rest() ? $52FdA$solidjsweb.createComponent((0, $b0477e4d832f090e$export$ca21a16d65b3dd8), {
|
|
4817
4854
|
show_extras_: show_extras_signal,
|
|
4818
|
-
i18n_: i18n_
|
|
4855
|
+
i18n_: i18n_,
|
|
4856
|
+
expanding_container_element_: expanding_container_els
|
|
4819
4857
|
}) : []);
|
|
4820
4858
|
});
|
|
4821
4859
|
$52FdA$solidjs.onCleanup(() => set_view_more_button_below_group_());
|
|
@@ -6306,8 +6344,8 @@ var $ae261a5687fe84f4$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<svg
|
|
|
6306
6344
|
function $ae261a5687fe84f4$export$cb808a3c41736d8e() {
|
|
6307
6345
|
return $52FdA$solidjsweb.getNextElement($ae261a5687fe84f4$var$_tmpl$);
|
|
6308
6346
|
}
|
|
6309
|
-
var $f70cc6dfcadf0fd5$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
6310
|
-
$f70cc6dfcadf0fd5$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<
|
|
6347
|
+
var $f70cc6dfcadf0fd5$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<section class=filters tabindex=-1><div class=body>`),
|
|
6348
|
+
$f70cc6dfcadf0fd5$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<section class=sorting tabindex=-1><div class=body>`),
|
|
6311
6349
|
$f70cc6dfcadf0fd5$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=sort-and-filter-buttons><div class=outer><div class=inner><!$><!/><!$><!/><!$><!/>`),
|
|
6312
6350
|
$f70cc6dfcadf0fd5$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<span class=num-filters>`),
|
|
6313
6351
|
$f70cc6dfcadf0fd5$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=open-filters-button-container><!$><!/><button type=button><!$><!/><span>`),
|
|
@@ -6384,6 +6422,40 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6384
6422
|
available_sortings_: available_sortings_,
|
|
6385
6423
|
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6386
6424
|
};
|
|
6425
|
+
// Keyboard a11y for desktop panels (DOM order: after the grid). Keyboard opens move focus into the panel and
|
|
6426
|
+
// restore it to the toggle on close; mouse opens skip the focus move (already visible, and it'd jump the viewport).
|
|
6427
|
+
// `user_opened_panel` is set only on keyboard activation - `filters_open`/`sorting_open` also change
|
|
6428
|
+
// programmatically (undo toast, history restore, SDK consumers), which must not steal focus.
|
|
6429
|
+
let user_opened_panel = false;
|
|
6430
|
+
let filter_toggle_button;
|
|
6431
|
+
let sort_toggle_button;
|
|
6432
|
+
let current_panel;
|
|
6433
|
+
let current_panel_toggle_button;
|
|
6434
|
+
const focus_panel_when_in_dom = panel => $52FdA$depictaiutilishared.catchify(async () => {
|
|
6435
|
+
// Bounded wait: if the panel never lands in the DOM (e.g. it's superseded by a rapid re-render before
|
|
6436
|
+
// insertion), the timeout lets this promise resolve instead of keeping `panel` - and the observer
|
|
6437
|
+
// listener it registers - referenced forever.
|
|
6438
|
+
await (0, $52FdA$depictaiutilishared.observer).wait_for_element(panel, 4000);
|
|
6439
|
+
if (panel.isConnected) {
|
|
6440
|
+
var _panel$querySelector;
|
|
6441
|
+
// Focus the first interactive control (often a group's <summary>), not the <section>: the section has no
|
|
6442
|
+
// visible focus ring and is flex-stretched to full grid height (scrolling it mis-aligns). The first
|
|
6443
|
+
// control keeps focus visible and lets Tab walk through the panel. `summary` is focusable but not matched
|
|
6444
|
+
// by the input/button/etc. selectors, so it must be listed explicitly.
|
|
6445
|
+
const focus_target = (_panel$querySelector = panel.querySelector("summary, input:not([type='hidden']):not(:disabled), button:not(:disabled), a[href], select:not(:disabled), [tabindex]:not([tabindex='-1'])")) !== null && _panel$querySelector !== void 0 ? _panel$querySelector : panel;
|
|
6446
|
+
focus_target.focus({
|
|
6447
|
+
preventScroll: true
|
|
6448
|
+
});
|
|
6449
|
+
focus_target.scrollIntoView({
|
|
6450
|
+
block: "nearest"
|
|
6451
|
+
});
|
|
6452
|
+
}
|
|
6453
|
+
})();
|
|
6454
|
+
const register_desktop_panel = (el, toggle_button, should_focus) => {
|
|
6455
|
+
current_panel = el;
|
|
6456
|
+
current_panel_toggle_button = toggle_button;
|
|
6457
|
+
if (should_focus) focus_panel_when_in_dom(el);
|
|
6458
|
+
};
|
|
6387
6459
|
const make_open_filters_button = function () {
|
|
6388
6460
|
let adhere_to_width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
6389
6461
|
let is_tabbable = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -6394,7 +6466,11 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6394
6466
|
search_sorting_open_: search_sorting_open_,
|
|
6395
6467
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6396
6468
|
filter_button_width_: adhere_to_width ? filter_button_width_ : undefined,
|
|
6397
|
-
hide_button_: hide_filters
|
|
6469
|
+
hide_button_: hide_filters,
|
|
6470
|
+
on_user_open_: keyboard_activated => {
|
|
6471
|
+
if (keyboard_activated) user_opened_panel = true;
|
|
6472
|
+
},
|
|
6473
|
+
button_ref_: is_tabbable ? el => filter_toggle_button = el : undefined
|
|
6398
6474
|
});
|
|
6399
6475
|
};
|
|
6400
6476
|
const make_open_sorting_button = function () {
|
|
@@ -6408,7 +6484,11 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6408
6484
|
search_sorting_open_: search_sorting_open_,
|
|
6409
6485
|
available_sortings_: available_sortings_,
|
|
6410
6486
|
sort_button_width_: adhere_to_width ? sort_button_width_ : undefined,
|
|
6411
|
-
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6487
|
+
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_,
|
|
6488
|
+
on_user_open_: keyboard_activated => {
|
|
6489
|
+
if (keyboard_activated) user_opened_panel = true;
|
|
6490
|
+
},
|
|
6491
|
+
button_ref_: is_tabbable ? el => sort_toggle_button = el : undefined
|
|
6412
6492
|
});
|
|
6413
6493
|
};
|
|
6414
6494
|
let open_modal_;
|
|
@@ -6428,10 +6508,49 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6428
6508
|
grid_is_in_original_state = true;
|
|
6429
6509
|
}
|
|
6430
6510
|
});
|
|
6511
|
+
// Restore focus to the relevant toggle button when a desktop panel is torn down while focus is still inside it.
|
|
6512
|
+
const restore_focus_to_toggle_on_close = () => {
|
|
6513
|
+
const button_to_restore = current_panel_toggle_button;
|
|
6514
|
+
const focus_was_in_panel = !!current_panel && current_panel.contains(document.activeElement);
|
|
6515
|
+
current_panel = undefined;
|
|
6516
|
+
current_panel_toggle_button = undefined;
|
|
6517
|
+
if (focus_was_in_panel && button_to_restore) button_to_restore.focus({
|
|
6518
|
+
preventScroll: true
|
|
6519
|
+
});
|
|
6520
|
+
};
|
|
6521
|
+
// `<section>` + `aria-label` so the panel announces itself ("Filters"/"Sort") when we move focus to it; the bare
|
|
6522
|
+
// tabindex=-1 container would otherwise give screen readers nothing to read on focus. A semantic <section> avoids
|
|
6523
|
+
// an ARIA role and the UA styling pitfalls of <fieldset>; the existing CSS targets the `.filters`/`.sorting` class.
|
|
6524
|
+
const FiltersPanel = should_focus => $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
6525
|
+
get when() {
|
|
6526
|
+
return !hide_filters();
|
|
6527
|
+
},
|
|
6528
|
+
get children() {
|
|
6529
|
+
var _el$ = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$),
|
|
6530
|
+
_el$2 = _el$.firstChild;
|
|
6531
|
+
$52FdA$solidjsweb.use(el => register_desktop_panel(el, filter_toggle_button, should_focus), _el$);
|
|
6532
|
+
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), filter_options));
|
|
6533
|
+
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$, "aria-label", i18n_.filters_()));
|
|
6534
|
+
return _el$;
|
|
6535
|
+
}
|
|
6536
|
+
});
|
|
6537
|
+
const SortingPanel = should_focus => (() => {
|
|
6538
|
+
var _el$3 = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$2),
|
|
6539
|
+
_el$4 = _el$3.firstChild;
|
|
6540
|
+
$52FdA$solidjsweb.use(el => register_desktop_panel(el, sort_toggle_button, should_focus), _el$3);
|
|
6541
|
+
$52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), sorting_options));
|
|
6542
|
+
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setAttribute(_el$3, "aria-label", i18n_.sorting_text_()));
|
|
6543
|
+
return _el$3;
|
|
6544
|
+
})();
|
|
6431
6545
|
$52FdA$solidjs.createEffect(() => {
|
|
6546
|
+
// Consume the user-intent flag once per run, in every branch, so a stale flag can't leak into a later
|
|
6547
|
+
// resize-triggered re-render and steal focus.
|
|
6548
|
+
const should_focus_panel = user_opened_panel;
|
|
6549
|
+
user_opened_panel = false;
|
|
6432
6550
|
if (!filters_open() && !sorting_open()) {
|
|
6433
6551
|
var _close_modal_;
|
|
6434
6552
|
(_close_modal_ = close_modal_) === null || _close_modal_ === void 0 || _close_modal_();
|
|
6553
|
+
restore_focus_to_toggle_on_close();
|
|
6435
6554
|
set_extra_els_in_results_container_("");
|
|
6436
6555
|
} else if (isSmall()()) {
|
|
6437
6556
|
var _open_modal_;
|
|
@@ -6441,27 +6560,15 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
|
|
|
6441
6560
|
set_sorting_open(false);
|
|
6442
6561
|
return;
|
|
6443
6562
|
}
|
|
6563
|
+
// The modal manages its own focus; just drop the desktop panel reference.
|
|
6564
|
+
current_panel = undefined;
|
|
6565
|
+
current_panel_toggle_button = undefined;
|
|
6444
6566
|
(_open_modal_ = open_modal_) === null || _open_modal_ === void 0 || _open_modal_();
|
|
6445
6567
|
set_extra_els_in_results_container_("");
|
|
6446
6568
|
} else {
|
|
6447
6569
|
var _close_modal_2;
|
|
6448
6570
|
(_close_modal_2 = close_modal_) === null || _close_modal_2 === void 0 || _close_modal_2();
|
|
6449
|
-
if (filters_open()) set_extra_els_in_results_container_(() =>
|
|
6450
|
-
get when() {
|
|
6451
|
-
return !hide_filters();
|
|
6452
|
-
},
|
|
6453
|
-
get children() {
|
|
6454
|
-
var _el$ = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$),
|
|
6455
|
-
_el$2 = _el$.firstChild;
|
|
6456
|
-
$52FdA$solidjsweb.insert(_el$2, $52FdA$solidjsweb.createComponent((0, $164d474fea221d77$export$3f1a388cc0d8fed7), filter_options));
|
|
6457
|
-
return _el$;
|
|
6458
|
-
}
|
|
6459
|
-
}));else set_extra_els_in_results_container_((() => {
|
|
6460
|
-
var _el$3 = $52FdA$solidjsweb.getNextElement($f70cc6dfcadf0fd5$var$_tmpl$2),
|
|
6461
|
-
_el$4 = _el$3.firstChild;
|
|
6462
|
-
$52FdA$solidjsweb.insert(_el$4, $52FdA$solidjsweb.createComponent((0, $3bd211c857f81dfd$export$1f1775a58da589b5), sorting_options));
|
|
6463
|
-
return _el$3;
|
|
6464
|
-
})());
|
|
6571
|
+
if (filters_open()) set_extra_els_in_results_container_(() => FiltersPanel(should_focus_panel));else set_extra_els_in_results_container_(SortingPanel(should_focus_panel));
|
|
6465
6572
|
}
|
|
6466
6573
|
});
|
|
6467
6574
|
$52FdA$depictaiutilishared.catchify(async () => {
|
|
@@ -6526,7 +6633,9 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
6526
6633
|
filter_button_width_: filter_button_width_,
|
|
6527
6634
|
tabindex_: tabindex_,
|
|
6528
6635
|
number_of_rendered_selected_filters_items_: [num_selected_filters],
|
|
6529
|
-
hide_button_: hide_button_
|
|
6636
|
+
hide_button_: hide_button_,
|
|
6637
|
+
on_user_open_: on_user_open_,
|
|
6638
|
+
button_ref_: button_ref_
|
|
6530
6639
|
} = _ref3;
|
|
6531
6640
|
const filters_closed = $52FdA$solidjs.createMemo(() => !search_filters_open_[0]());
|
|
6532
6641
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -6549,14 +6658,18 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
6549
6658
|
return _el$15;
|
|
6550
6659
|
}
|
|
6551
6660
|
}), _el$21, _co$5);
|
|
6552
|
-
$52FdA$solidjsweb.addEventListener(_el$16, "click", $52FdA$depictaiutilishared.catchify(
|
|
6661
|
+
$52FdA$solidjsweb.addEventListener(_el$16, "click", $52FdA$depictaiutilishared.catchify(event => $52FdA$solidjs.batch(() => {
|
|
6553
6662
|
if (search_filters_open_[0]()) {
|
|
6554
6663
|
search_filters_open_[1](false);
|
|
6555
6664
|
return;
|
|
6556
6665
|
}
|
|
6666
|
+
// Only keyboard opens move focus into the panel; mouse opens leave the viewport put.
|
|
6667
|
+
on_user_open_ === null || on_user_open_ === void 0 || on_user_open_($5f28fa844ecd384c$export$c5c485c196a19ec1(event));
|
|
6557
6668
|
search_filters_open_[1](true);
|
|
6558
6669
|
search_sorting_open_[1](false);
|
|
6559
6670
|
})), true);
|
|
6671
|
+
var _ref$2 = button_ref_;
|
|
6672
|
+
typeof _ref$2 === "function" ? $52FdA$solidjsweb.use(_ref$2, _el$16) : button_ref_ = _el$16;
|
|
6560
6673
|
$52FdA$solidjsweb.setAttribute(_el$16, "tabindex", tabindex_);
|
|
6561
6674
|
$52FdA$solidjsweb.className(_el$16, "filter toggle-button major-minor-transition" + ((0, $52FdA$solidjsweb.isServer) ? " minor" : ""));
|
|
6562
6675
|
$52FdA$solidjsweb.insert(_el$16, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -6578,21 +6691,24 @@ function $f70cc6dfcadf0fd5$var$OpenFiltersButton(_ref3) {
|
|
|
6578
6691
|
_v$2 = !filters_closed(),
|
|
6579
6692
|
_v$3 = !!filters_closed(),
|
|
6580
6693
|
_v$4 = (filters_closed() ? i18n_.open_filters_ : i18n_.close_filters_)(),
|
|
6581
|
-
_v$5 =
|
|
6694
|
+
_v$5 = !filters_closed(),
|
|
6695
|
+
_v$6 = filter_button_width_ !== null && filter_button_width_ !== void 0 && filter_button_width_() ? {
|
|
6582
6696
|
width: filter_button_width_() + "px"
|
|
6583
6697
|
} : {};
|
|
6584
6698
|
_p$.e = $52FdA$solidjsweb.style(_el$14, _v$, _p$.e);
|
|
6585
6699
|
_v$2 !== _p$.t && _el$16.classList.toggle("major", _p$.t = _v$2);
|
|
6586
6700
|
_v$3 !== _p$.a && _el$16.classList.toggle("minor", _p$.a = _v$3);
|
|
6587
6701
|
_v$4 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$16, "aria-label", _p$.o = _v$4);
|
|
6588
|
-
_p$.i
|
|
6702
|
+
_v$5 !== _p$.i && $52FdA$solidjsweb.setAttribute(_el$16, "aria-expanded", _p$.i = _v$5);
|
|
6703
|
+
_p$.n = $52FdA$solidjsweb.style(_el$16, _v$6, _p$.n);
|
|
6589
6704
|
return _p$;
|
|
6590
6705
|
}, {
|
|
6591
6706
|
e: undefined,
|
|
6592
6707
|
t: undefined,
|
|
6593
6708
|
a: undefined,
|
|
6594
6709
|
o: undefined,
|
|
6595
|
-
i: undefined
|
|
6710
|
+
i: undefined,
|
|
6711
|
+
n: undefined
|
|
6596
6712
|
});
|
|
6597
6713
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
6598
6714
|
return _el$14;
|
|
@@ -6607,7 +6723,9 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
6607
6723
|
search_sorting_open_: search_sorting_open_,
|
|
6608
6724
|
sort_button_width_: sort_button_width_,
|
|
6609
6725
|
tabindex_: tabindex_,
|
|
6610
|
-
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_
|
|
6726
|
+
meta_of_currently_selected_sorting_: meta_of_currently_selected_sorting_,
|
|
6727
|
+
on_user_open_: on_user_open_,
|
|
6728
|
+
button_ref_: button_ref_
|
|
6611
6729
|
} = _ref4;
|
|
6612
6730
|
const sorting_closed = $52FdA$solidjs.createMemo(() => !search_sorting_open_[0]());
|
|
6613
6731
|
// We assume in embedded_num_products that this is a single HTMLElement so pls change there if you change it here
|
|
@@ -6616,14 +6734,18 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
6616
6734
|
_el$23 = _el$22.firstChild,
|
|
6617
6735
|
_el$24 = _el$23.nextSibling,
|
|
6618
6736
|
[_el$25, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$24.nextSibling);
|
|
6619
|
-
$52FdA$solidjsweb.addEventListener(_el$22, "click", $52FdA$depictaiutilishared.catchify(
|
|
6737
|
+
$52FdA$solidjsweb.addEventListener(_el$22, "click", $52FdA$depictaiutilishared.catchify(event => $52FdA$solidjs.batch(() => {
|
|
6620
6738
|
if (search_sorting_open_[0]()) {
|
|
6621
6739
|
search_sorting_open_[1](false);
|
|
6622
6740
|
return;
|
|
6623
6741
|
}
|
|
6742
|
+
// Only keyboard opens move focus into the panel; mouse opens leave the viewport put.
|
|
6743
|
+
on_user_open_ === null || on_user_open_ === void 0 || on_user_open_($5f28fa844ecd384c$export$c5c485c196a19ec1(event));
|
|
6624
6744
|
search_filters_open_[1](false);
|
|
6625
6745
|
search_sorting_open_[1](true);
|
|
6626
6746
|
})), true);
|
|
6747
|
+
var _ref$3 = button_ref_;
|
|
6748
|
+
typeof _ref$3 === "function" ? $52FdA$solidjsweb.use(_ref$3, _el$22) : button_ref_ = _el$22;
|
|
6627
6749
|
$52FdA$solidjsweb.setAttribute(_el$22, "tabindex", tabindex_);
|
|
6628
6750
|
$52FdA$solidjsweb.insert(_el$23, (() => {
|
|
6629
6751
|
var _c$ = $52FdA$solidjsweb.memo(() => !!sorting_closed());
|
|
@@ -6652,22 +6774,25 @@ function $f70cc6dfcadf0fd5$var$OpenSortingButton(_ref4) {
|
|
|
6652
6774
|
}
|
|
6653
6775
|
}), _el$25, _co$6);
|
|
6654
6776
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
6655
|
-
var _v$
|
|
6656
|
-
_v$
|
|
6657
|
-
_v$
|
|
6658
|
-
_v$
|
|
6777
|
+
var _v$7 = !sorting_closed(),
|
|
6778
|
+
_v$8 = !!sorting_closed(),
|
|
6779
|
+
_v$9 = (sorting_closed() ? i18n_.open_sorting_ : i18n_.close_sorting_)(),
|
|
6780
|
+
_v$10 = !sorting_closed(),
|
|
6781
|
+
_v$11 = sort_button_width_ !== null && sort_button_width_ !== void 0 && sort_button_width_() ? {
|
|
6659
6782
|
width: sort_button_width_() + "px"
|
|
6660
6783
|
} : {};
|
|
6661
|
-
_v$
|
|
6662
|
-
_v$
|
|
6663
|
-
_v$
|
|
6664
|
-
_p$.o
|
|
6784
|
+
_v$7 !== _p$.e && _el$22.classList.toggle("major", _p$.e = _v$7);
|
|
6785
|
+
_v$8 !== _p$.t && _el$22.classList.toggle("minor", _p$.t = _v$8);
|
|
6786
|
+
_v$9 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$22, "aria-label", _p$.a = _v$9);
|
|
6787
|
+
_v$10 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$22, "aria-expanded", _p$.o = _v$10);
|
|
6788
|
+
_p$.i = $52FdA$solidjsweb.style(_el$22, _v$11, _p$.i);
|
|
6665
6789
|
return _p$;
|
|
6666
6790
|
}, {
|
|
6667
6791
|
e: undefined,
|
|
6668
6792
|
t: undefined,
|
|
6669
6793
|
a: undefined,
|
|
6670
|
-
o: undefined
|
|
6794
|
+
o: undefined,
|
|
6795
|
+
i: undefined
|
|
6671
6796
|
});
|
|
6672
6797
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
6673
6798
|
return _el$22;
|
package/ES10/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
|
*/
|