@depict-ai/ui 4.9.2 → 4.9.4
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 +124 -81
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +124 -81
- package/latest/index.cjs +122 -79
- package/latest/index.d.ts +3 -3
- package/latest/index.js +122 -79
- package/package.json +1 -1
- package/server/ES10/index.cjs +55 -20
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +55 -20
- package/server/latest/index.cjs +55 -20
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +55 -20
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.9.
|
|
14
|
+
export const version = "4.9.4";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1539,7 +1539,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1539
1539
|
* Open the modal with support for alignment.
|
|
1540
1540
|
* @returns {void}
|
|
1541
1541
|
*/
|
|
1542
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1542
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1543
1543
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1544
1544
|
export interface PageReplacer {
|
|
1545
1545
|
readonly render_: () => Node_Array;
|
|
@@ -1619,5 +1619,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1619
1619
|
layout?: PossibleLayout;
|
|
1620
1620
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1621
1621
|
showSliderArrow_?: boolean;
|
|
1622
|
-
}): import("@depict-ai/utilishared
|
|
1622
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1623
1623
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|
package/latest/index.js
CHANGED
|
@@ -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 = "4.9.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.4";
|
|
11
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
12
12
|
const signal = $9HbP8$createSignal(false);
|
|
13
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -9432,15 +9432,18 @@ const $e003be2a50d9e5bc$export$b05c0ae390cf3e06 = ({
|
|
|
9432
9432
|
$9HbP8$effect(_p$ => {
|
|
9433
9433
|
var _v$ = href(),
|
|
9434
9434
|
_v$2 = display_.search_result_id,
|
|
9435
|
-
_v$3 = !!isSelected?.()
|
|
9435
|
+
_v$3 = !!isSelected?.(),
|
|
9436
|
+
_v$4 = isSelected?.();
|
|
9436
9437
|
_v$ !== _p$.e && $9HbP8$setAttribute(_el$4, "href", _p$.e = _v$);
|
|
9437
9438
|
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$4, "data-search-result-id", _p$.t = _v$2);
|
|
9438
9439
|
_v$3 !== _p$.a && _el$4.classList.toggle("selected", _p$.a = _v$3);
|
|
9440
|
+
_v$4 !== _p$.o && $9HbP8$setAttribute(_el$4, "aria-selected", _p$.o = _v$4);
|
|
9439
9441
|
return _p$;
|
|
9440
9442
|
}, {
|
|
9441
9443
|
e: undefined,
|
|
9442
9444
|
t: undefined,
|
|
9443
|
-
a: undefined
|
|
9445
|
+
a: undefined,
|
|
9446
|
+
o: undefined
|
|
9444
9447
|
});
|
|
9445
9448
|
$9HbP8$runHydrationEvents();
|
|
9446
9449
|
return _el$4;
|
|
@@ -10378,7 +10381,7 @@ var $5285d2814d0fac0c$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<button class=b
|
|
|
10378
10381
|
$5285d2814d0fac0c$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<button type=button class=clear>`),
|
|
10379
10382
|
$5285d2814d0fac0c$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=spacer>`),
|
|
10380
10383
|
$5285d2814d0fac0c$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<button class="submit major"type=button>`),
|
|
10381
|
-
$5285d2814d0fac0c$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<div
|
|
10384
|
+
$5285d2814d0fac0c$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<div><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
10382
10385
|
function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
10383
10386
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
10384
10387
|
input_field_ref_: input_field_ref_,
|
|
@@ -10392,7 +10395,9 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
10392
10395
|
after_focusing_: after_focusing_,
|
|
10393
10396
|
BackIcon_: BackIcon_,
|
|
10394
10397
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
10395
|
-
class_: class_
|
|
10398
|
+
class_: class_,
|
|
10399
|
+
setSearchRoleOnContainer_ = true,
|
|
10400
|
+
ariaControls: ariaControls
|
|
10396
10401
|
}) {
|
|
10397
10402
|
let input_element;
|
|
10398
10403
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -10488,6 +10493,13 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
10488
10493
|
[_el$17, _co$5] = $9HbP8$getNextMarker(_el$16.nextSibling),
|
|
10489
10494
|
_el$18 = _el$17.nextSibling,
|
|
10490
10495
|
[_el$19, _co$6] = $9HbP8$getNextMarker(_el$18.nextSibling);
|
|
10496
|
+
$9HbP8$spread(_el$3, $9HbP8$mergeProps1({
|
|
10497
|
+
get ["class"]() {
|
|
10498
|
+
return `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${class_()}` : ""}`;
|
|
10499
|
+
}
|
|
10500
|
+
}, setSearchRoleOnContainer_ && {
|
|
10501
|
+
role: "search"
|
|
10502
|
+
}), false, true);
|
|
10491
10503
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
10492
10504
|
get when() {
|
|
10493
10505
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -10528,59 +10540,83 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
10528
10540
|
}
|
|
10529
10541
|
}), true);
|
|
10530
10542
|
$9HbP8$insert(_el$5, isNewModal && $9HbP8$createComponent(ClearButton, {}), _el$8, _co$);
|
|
10531
|
-
_el$6.$$pointerdown = ({
|
|
10532
|
-
pointerType: pointerType
|
|
10533
|
-
}) => {
|
|
10534
|
-
// When selecting text with a mouse we want a SearchField to be focussed even when releasing the mouse outside the .field element (we assume the event listener which opens the modal is attached to that).
|
|
10535
|
-
if (pointerType === "mouse") {
|
|
10536
|
-
const handler = $9HbP8$catchify1(({
|
|
10537
|
-
pointerType: pointerType,
|
|
10538
|
-
target: target
|
|
10539
|
-
}) => {
|
|
10540
|
-
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
10541
|
-
input_element.click();
|
|
10542
|
-
});
|
|
10543
|
-
window.addEventListener("pointerup", handler, {
|
|
10544
|
-
once: true
|
|
10545
|
-
});
|
|
10546
|
-
$9HbP8$runWithOwner(owner_of_field_element, () => $9HbP8$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
10547
|
-
}
|
|
10548
|
-
};
|
|
10549
|
-
$9HbP8$addEventListener(_el$6, "select", $9HbP8$catchify1(() => {
|
|
10550
|
-
if (disabled_)
|
|
10551
|
-
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
10552
|
-
return;
|
|
10553
|
-
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
10554
|
-
// everything was selected, clear filters on next submit on next input
|
|
10555
|
-
input_element.addEventListener("input", $9HbP8$catchify1(() => clear_filters_(false)),
|
|
10556
|
-
// We don't count this as user triggered since it wasn't explicit
|
|
10557
|
-
{
|
|
10558
|
-
once: true
|
|
10559
|
-
});
|
|
10560
|
-
}));
|
|
10561
|
-
$9HbP8$addEventListener(_el$6, "input", $9HbP8$catchify1(() => {
|
|
10562
|
-
const {
|
|
10563
|
-
value: value
|
|
10564
|
-
} = input_element;
|
|
10565
|
-
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
10566
|
-
setSearchFieldValue(value);
|
|
10567
|
-
}), true);
|
|
10568
|
-
$9HbP8$addEventListener(_el$6, "keydown", $9HbP8$catchify1(e => {
|
|
10569
|
-
if (disabled_) {
|
|
10570
|
-
if (e.key !== "Tab" && e.key !== "Shift")
|
|
10571
|
-
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
10572
|
-
input_element.click();
|
|
10573
|
-
} else if (e.key === "Enter") {
|
|
10574
|
-
const dont_submit = override_on_enter_?.(e);
|
|
10575
|
-
if (!dont_submit) submit_query_();
|
|
10576
|
-
}
|
|
10577
|
-
}), true);
|
|
10578
10543
|
var _ref$2 = $9HbP8$catchify1(el => {
|
|
10579
10544
|
input_element = el;
|
|
10580
10545
|
input_field_ref_?.(el);
|
|
10581
10546
|
});
|
|
10582
10547
|
typeof _ref$2 === "function" && $9HbP8$use(_ref$2, _el$6);
|
|
10583
10548
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
10549
|
+
$9HbP8$spread(_el$6, $9HbP8$mergeProps1(() => setSearchRoleOnContainer_ ? {
|
|
10550
|
+
"aria-label": i18n_.search_field_field_aria_label_()
|
|
10551
|
+
} :
|
|
10552
|
+
// Searchbox announces basically the same as our aria-label, we could explore always using searchbox in the future
|
|
10553
|
+
{
|
|
10554
|
+
role: "searchbox"
|
|
10555
|
+
}, {
|
|
10556
|
+
get value() {
|
|
10557
|
+
return searchFieldValue();
|
|
10558
|
+
},
|
|
10559
|
+
get onKeyDown() {
|
|
10560
|
+
return $9HbP8$catchify1(e => {
|
|
10561
|
+
if (disabled_) {
|
|
10562
|
+
if (e.key !== "Tab" && e.key !== "Shift")
|
|
10563
|
+
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
10564
|
+
input_element.click();
|
|
10565
|
+
} else if (e.key === "Enter") {
|
|
10566
|
+
const dont_submit = override_on_enter_?.(e);
|
|
10567
|
+
if (!dont_submit) submit_query_();
|
|
10568
|
+
}
|
|
10569
|
+
});
|
|
10570
|
+
},
|
|
10571
|
+
get onInput() {
|
|
10572
|
+
return $9HbP8$catchify1(() => {
|
|
10573
|
+
const {
|
|
10574
|
+
value: value
|
|
10575
|
+
} = input_element;
|
|
10576
|
+
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
10577
|
+
setSearchFieldValue(value);
|
|
10578
|
+
});
|
|
10579
|
+
},
|
|
10580
|
+
get onSelect() {
|
|
10581
|
+
return $9HbP8$catchify1(() => {
|
|
10582
|
+
if (disabled_)
|
|
10583
|
+
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
10584
|
+
return;
|
|
10585
|
+
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
10586
|
+
// everything was selected, clear filters on next submit on next input
|
|
10587
|
+
input_element.addEventListener("input", $9HbP8$catchify1(() => clear_filters_(false)),
|
|
10588
|
+
// We don't count this as user triggered since it wasn't explicit
|
|
10589
|
+
{
|
|
10590
|
+
once: true
|
|
10591
|
+
});
|
|
10592
|
+
});
|
|
10593
|
+
},
|
|
10594
|
+
"onPointerDown": ({
|
|
10595
|
+
pointerType: pointerType
|
|
10596
|
+
}) => {
|
|
10597
|
+
// When selecting text with a mouse we want a SearchField to be focussed even when releasing the mouse outside the .field element (we assume the event listener which opens the modal is attached to that).
|
|
10598
|
+
if (pointerType === "mouse") {
|
|
10599
|
+
const handler = $9HbP8$catchify1(({
|
|
10600
|
+
pointerType: pointerType,
|
|
10601
|
+
target: target
|
|
10602
|
+
}) => {
|
|
10603
|
+
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
10604
|
+
input_element.click();
|
|
10605
|
+
});
|
|
10606
|
+
window.addEventListener("pointerup", handler, {
|
|
10607
|
+
once: true
|
|
10608
|
+
});
|
|
10609
|
+
$9HbP8$runWithOwner(owner_of_field_element, () => $9HbP8$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
10610
|
+
}
|
|
10611
|
+
},
|
|
10612
|
+
get placeholder() {
|
|
10613
|
+
return i18n_.placeholder_text_();
|
|
10614
|
+
},
|
|
10615
|
+
"aria-autocomplete": "list",
|
|
10616
|
+
"aria-haspopup": "dialog"
|
|
10617
|
+
}, ariaControls && {
|
|
10618
|
+
"aria-controls": ariaControls
|
|
10619
|
+
}), false, false);
|
|
10584
10620
|
$9HbP8$insert(_el$5, !isNewModal && $9HbP8$createComponent(ClearButton, {}), _el$10, _co$2);
|
|
10585
10621
|
$9HbP8$insert(_el$3, isNewModal && $9HbP8$createComponent(BackButton, {}), _el$17, _co$5);
|
|
10586
10622
|
$9HbP8$insert(_el$3, $9HbP8$createComponent((0, $9HbP8$Show), {
|
|
@@ -10594,25 +10630,11 @@ function $5285d2814d0fac0c$export$b94867ecbd698f21({
|
|
|
10594
10630
|
return _el$11;
|
|
10595
10631
|
}
|
|
10596
10632
|
}), _el$19, _co$6);
|
|
10597
|
-
$9HbP8$effect(_p$ => {
|
|
10598
|
-
var _v$ = `search-field${on_back_ ? " in-modal" : ""}${class_?.() ? ` ${class_()}` : ""}`,
|
|
10599
|
-
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
10600
|
-
_v$3 = i18n_.placeholder_text_();
|
|
10601
|
-
_v$ !== _p$.e && $9HbP8$className(_el$3, _p$.e = _v$);
|
|
10602
|
-
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
10603
|
-
_v$3 !== _p$.a && $9HbP8$setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
10604
|
-
return _p$;
|
|
10605
|
-
}, {
|
|
10606
|
-
e: undefined,
|
|
10607
|
-
t: undefined,
|
|
10608
|
-
a: undefined
|
|
10609
|
-
});
|
|
10610
|
-
$9HbP8$effect(() => $9HbP8$setProperty(_el$6, "value", searchFieldValue()));
|
|
10611
10633
|
$9HbP8$runHydrationEvents();
|
|
10612
10634
|
return _el$3;
|
|
10613
10635
|
})();
|
|
10614
10636
|
}
|
|
10615
|
-
$9HbP8$delegateEvents(["click"
|
|
10637
|
+
$9HbP8$delegateEvents(["click"]);
|
|
10616
10638
|
var $ffb84ffbf4014982$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<svg xmlns=http://www.w3.org/2000/svg width=24 height=16><path d="M.773 7.371L7.98.176C8.098.059 8.238 0 8.402 0s.305.059.422.176S9 .434 9 .598s-.059.305-.176.422L2.648 7.195h19.547a.59.59 0 0 1 .609.609c0 .172-.059.305-.176.422s-.262.176-.434.176H2.648l6.176 6.176a.59.59 0 0 1 .176.426c0 .16-.059.301-.176.422-.055.059-.121.109-.199.137s-.148.039-.223.039-.156-.012-.234-.039a.54.54 0 0 1-.187-.137L.773 8.227c-.117-.117-.176-.258-.176-.422a.6.6 0 0 1 .176-.434zm0 0">`);
|
|
10617
10639
|
function $ffb84ffbf4014982$export$8d8893ffd8aca39a() {
|
|
10618
10640
|
return $9HbP8$getNextElement($ffb84ffbf4014982$var$_tmpl$);
|
|
@@ -10642,8 +10664,8 @@ function $512b994d501f412b$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
10642
10664
|
}
|
|
10643
10665
|
var $42912431795f188e$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=discover-more><button class=major type=button>`),
|
|
10644
10666
|
$42912431795f188e$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<b>`),
|
|
10645
|
-
$42912431795f188e$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
10646
|
-
$42912431795f188e$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
10667
|
+
$42912431795f188e$var$_tmpl$3 = /*#__PURE__*/$9HbP8$template(`<div class=depict-search-modal><div class=body role=search aria-label="Search modal with search field, query suggestions and result preview"><!$><!/><div id=depict-suggestions-and-result-preview class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
10668
|
+
$42912431795f188e$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class="depict plp search"role=dialog><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
10647
10669
|
/**
|
|
10648
10670
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
10649
10671
|
*/
|
|
@@ -10785,7 +10807,9 @@ function $42912431795f188e$var$RawClassicSearchModal({
|
|
|
10785
10807
|
const [start, end] = selected_text_range_;
|
|
10786
10808
|
if (start === null || end === null) return;
|
|
10787
10809
|
input_el.setSelectionRange(start, end);
|
|
10788
|
-
}
|
|
10810
|
+
},
|
|
10811
|
+
setSearchRoleOnContainer_: false,
|
|
10812
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
10789
10813
|
});
|
|
10790
10814
|
const modal_element = (() => {
|
|
10791
10815
|
var _el$4 = $9HbP8$getNextElement($42912431795f188e$var$_tmpl$3),
|
|
@@ -11026,7 +11050,16 @@ function $4ce5b8892775b62d$export$67152d26d4f56ee8({
|
|
|
11026
11050
|
});
|
|
11027
11051
|
}
|
|
11028
11052
|
}));
|
|
11029
|
-
$9HbP8$effect(
|
|
11053
|
+
$9HbP8$effect(_p$ => {
|
|
11054
|
+
var _v$ = !!isSelected(),
|
|
11055
|
+
_v$2 = isSelected();
|
|
11056
|
+
_v$ !== _p$.e && _el$2.classList.toggle("selected", _p$.e = _v$);
|
|
11057
|
+
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$2, "aria-selected", _p$.t = _v$2);
|
|
11058
|
+
return _p$;
|
|
11059
|
+
}, {
|
|
11060
|
+
e: undefined,
|
|
11061
|
+
t: undefined
|
|
11062
|
+
});
|
|
11030
11063
|
$9HbP8$runHydrationEvents();
|
|
11031
11064
|
return _el$2;
|
|
11032
11065
|
})();
|
|
@@ -11221,6 +11254,7 @@ function $903297121898e5ff$export$d4994a86c6235f72({
|
|
|
11221
11254
|
return urlObject.href;
|
|
11222
11255
|
});
|
|
11223
11256
|
const [isSelected, selectedDueToKeyboardNavigation] = $f4125ce4984deee6$export$fb40a80c530e5f2b(read_selected_index_, itemIndex_, () => index);
|
|
11257
|
+
const wholeTextToDisplay = $9HbP8$createMemo(() => item().title_);
|
|
11224
11258
|
return (() => {
|
|
11225
11259
|
var _el$7 = $9HbP8$getNextElement($903297121898e5ff$var$_tmpl$2);
|
|
11226
11260
|
$9HbP8$use(element => {
|
|
@@ -11245,20 +11279,24 @@ function $903297121898e5ff$export$d4994a86c6235f72({
|
|
|
11245
11279
|
$9HbP8$addEventListener(_el$7, "mouseenter", $9HbP8$catchify1(() => write_selected_index_([itemIndex_(), index])));
|
|
11246
11280
|
$9HbP8$insert(_el$7, $9HbP8$createComponent((0, $f3213c0640246d58$export$ba17c5b7e6dda39f), {
|
|
11247
11281
|
class_: "title line-clamp",
|
|
11248
|
-
|
|
11249
|
-
return $9HbP8$createMemo(() => item().title_);
|
|
11250
|
-
},
|
|
11282
|
+
whole_text_to_display_: wholeTextToDisplay,
|
|
11251
11283
|
searching_for_value_: searching_for_value_
|
|
11252
11284
|
}));
|
|
11253
11285
|
$9HbP8$effect(_p$ => {
|
|
11254
11286
|
var _v$ = !!isSelected(),
|
|
11255
|
-
_v$2 =
|
|
11287
|
+
_v$2 = isSelected(),
|
|
11288
|
+
_v$3 = href(),
|
|
11289
|
+
_v$4 = wholeTextToDisplay();
|
|
11256
11290
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
11257
|
-
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$7, "
|
|
11291
|
+
_v$2 !== _p$.t && $9HbP8$setAttribute(_el$7, "aria-selected", _p$.t = _v$2);
|
|
11292
|
+
_v$3 !== _p$.a && $9HbP8$setAttribute(_el$7, "href", _p$.a = _v$3);
|
|
11293
|
+
_v$4 !== _p$.o && $9HbP8$setAttribute(_el$7, "aria-label", _p$.o = _v$4);
|
|
11258
11294
|
return _p$;
|
|
11259
11295
|
}, {
|
|
11260
11296
|
e: undefined,
|
|
11261
|
-
t: undefined
|
|
11297
|
+
t: undefined,
|
|
11298
|
+
a: undefined,
|
|
11299
|
+
o: undefined
|
|
11262
11300
|
});
|
|
11263
11301
|
return _el$7;
|
|
11264
11302
|
})();
|
|
@@ -11446,7 +11484,7 @@ var $500a16dd18ee5a71$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=inst
|
|
|
11446
11484
|
$500a16dd18ee5a71$var$_tmpl$4 = /*#__PURE__*/$9HbP8$template(`<div class=discover-more><button class=major type=button>`),
|
|
11447
11485
|
$500a16dd18ee5a71$var$_tmpl$5 = /*#__PURE__*/$9HbP8$template(`<b>`),
|
|
11448
11486
|
$500a16dd18ee5a71$var$_tmpl$6 = /*#__PURE__*/$9HbP8$template(`<div class=depict-search-modal-backdrop>`),
|
|
11449
|
-
$500a16dd18ee5a71$var$_tmpl$7 = /*#__PURE__*/$9HbP8$template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
11487
|
+
$500a16dd18ee5a71$var$_tmpl$7 = /*#__PURE__*/$9HbP8$template(`<div class=depict-search-modal><div class=body role=search aria-label="Search modal with search field, query suggestions and result preview"><!$><!/><div id=depict-suggestions-and-result-preview class=padded></div></div><!$><!/>`),
|
|
11450
11488
|
$500a16dd18ee5a71$var$_tmpl$8 = /*#__PURE__*/$9HbP8$template(`<div class=left>`),
|
|
11451
11489
|
$500a16dd18ee5a71$var$_tmpl$9 = /*#__PURE__*/$9HbP8$template(`<div class=right>`);
|
|
11452
11490
|
/**
|
|
@@ -11688,6 +11726,9 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
11688
11726
|
aspectRatio: 1,
|
|
11689
11727
|
get ["class"]() {
|
|
11690
11728
|
return props.class_;
|
|
11729
|
+
},
|
|
11730
|
+
imgProps: {
|
|
11731
|
+
alt: "Product image"
|
|
11691
11732
|
}
|
|
11692
11733
|
}),
|
|
11693
11734
|
...instant_results_options_
|
|
@@ -11790,7 +11831,9 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
|
|
|
11790
11831
|
const [start, end] = selected_text_range_;
|
|
11791
11832
|
if (start === null || end === null) return;
|
|
11792
11833
|
input_el.setSelectionRange(start, end);
|
|
11793
|
-
}
|
|
11834
|
+
},
|
|
11835
|
+
setSearchRoleOnContainer_: false,
|
|
11836
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
11794
11837
|
});
|
|
11795
11838
|
if (setSearchFieldOuterWidth_) {
|
|
11796
11839
|
const resizeObserver = new ResizeObserver($9HbP8$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.4",
|
|
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",
|
package/server/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.9.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.4";
|
|
119
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
120
|
const signal = $3hooq$solidjs.createSignal(false);
|
|
121
121
|
$3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -8323,7 +8323,7 @@ const $82d079b68975fbf7$export$b05c0ae390cf3e06 = _ref => {
|
|
|
8323
8323
|
const secondary_image_url = ((_variant$image_urls = variant.image_urls) === null || _variant$image_urls === void 0 ? void 0 : _variant$image_urls[1]) || variant.secondary_image_url || variant.alternative_display_image_url;
|
|
8324
8324
|
const brandInTagline = selected_index_ && variant.brand;
|
|
8325
8325
|
const TitleBrandTagline = () => [!selected_index_ && $3hooq$solidjsweb.ssr($82d079b68975fbf7$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape(variant.brand)), $3hooq$solidjsweb.ssr($82d079b68975fbf7$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("title", $3hooq$solidjsweb.escape(variant.title, true), false), $3hooq$solidjsweb.escape(variant.title)), (variant.sub_heading_1 || variant.sub_heading_2 || brandInTagline) && $3hooq$solidjsweb.ssr($82d079b68975fbf7$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.escape([brandInTagline, variant.sub_heading_1, variant.sub_heading_2].filter(v => v).join(" | ")))];
|
|
8326
|
-
return $3hooq$solidjsweb.ssr($82d079b68975fbf7$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), "instant-card ".concat(isSelected !== null && isSelected !== void 0 && isSelected() ? "selected" : ""), $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href(), true), false) + $3hooq$solidjsweb.ssrAttribute("data-search-result-id", $3hooq$solidjsweb.escape(display_.search_result_id, true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(InstantCardImageComponent_, {
|
|
8326
|
+
return $3hooq$solidjsweb.ssr($82d079b68975fbf7$var$_tmpl$6, $3hooq$solidjsweb.ssrHydrationKey(), "instant-card ".concat(isSelected !== null && isSelected !== void 0 && isSelected() ? "selected" : ""), $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href(), true), false) + $3hooq$solidjsweb.ssrAttribute("data-search-result-id", $3hooq$solidjsweb.escape(display_.search_result_id, true), false) + $3hooq$solidjsweb.ssrAttribute("aria-selected", $3hooq$solidjsweb.escape(isSelected === null || isSelected === void 0 ? void 0 : isSelected(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(InstantCardImageComponent_, {
|
|
8327
8327
|
get src_() {
|
|
8328
8328
|
var _variant$image_urls2;
|
|
8329
8329
|
return ((_variant$image_urls2 = variant.image_urls) === null || _variant$image_urls2 === void 0 ? void 0 : _variant$image_urls2[0]) || variant.image_url || variant.display_image_url;
|
|
@@ -9170,8 +9170,8 @@ function $34934309832515dc$export$f7658c347b037c3f() {
|
|
|
9170
9170
|
}, props), () => $3hooq$solidjsweb.ssr($34934309832515dc$var$_tmpl$), true);
|
|
9171
9171
|
}
|
|
9172
9172
|
var $29e5dbeb69da7a36$var$_tmpl$ = ["<div", ' style="', '" class="spacer"></div>'],
|
|
9173
|
-
$29e5dbeb69da7a36$var$_tmpl$2 = [
|
|
9174
|
-
$29e5dbeb69da7a36$var$_tmpl$3 = ["<
|
|
9173
|
+
$29e5dbeb69da7a36$var$_tmpl$2 = ['<div class="field"><!--$-->', "<!--/-->", "<!--$-->", "<!--/--></div>"],
|
|
9174
|
+
$29e5dbeb69da7a36$var$_tmpl$3 = ["<button", ' class="submit major" type="button"', ">", "</button>"];
|
|
9175
9175
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
9176
9176
|
let {
|
|
9177
9177
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -9186,7 +9186,9 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
9186
9186
|
after_focusing_: after_focusing_,
|
|
9187
9187
|
BackIcon_: BackIcon_,
|
|
9188
9188
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
9189
|
-
class_: class_
|
|
9189
|
+
class_: class_,
|
|
9190
|
+
setSearchRoleOnContainer_ = true,
|
|
9191
|
+
ariaControls: ariaControls
|
|
9190
9192
|
} = _ref;
|
|
9191
9193
|
let input_element;
|
|
9192
9194
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -9247,19 +9249,46 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
9247
9249
|
return $3hooq$solidjsweb.createComponent(BackIcon_, {});
|
|
9248
9250
|
}
|
|
9249
9251
|
})) : $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $083b2336093176cf$export$3b621d86b1566b2), {})), true);
|
|
9250
|
-
return $3hooq$solidjsweb.
|
|
9252
|
+
return $3hooq$solidjsweb.ssrElement("div", $3hooq$solidjsweb.mergeProps({
|
|
9253
|
+
get ["class"]() {
|
|
9254
|
+
return "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
9255
|
+
}
|
|
9256
|
+
}, setSearchRoleOnContainer_ && {
|
|
9257
|
+
role: "search"
|
|
9258
|
+
}), () => ["<!--$-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
9251
9259
|
get when() {
|
|
9252
9260
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
9253
9261
|
},
|
|
9254
9262
|
get children() {
|
|
9255
9263
|
return $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "width:" + ($3hooq$solidjsweb.escape(getBackButtonWidth(), true) + "px"));
|
|
9256
9264
|
}
|
|
9257
|
-
})),
|
|
9265
|
+
})), "<!--/-->", "<!--$-->", !isNewModal && $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(BackButton, {})), "<!--/-->", $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$2, isNewModal && $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(ClearButton, {})), $3hooq$solidjsweb.ssrElement("input", $3hooq$solidjsweb.mergeProps({
|
|
9266
|
+
"class": "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""),
|
|
9267
|
+
tabindex: "0",
|
|
9268
|
+
enterkeyhint: "search"
|
|
9269
|
+
}, () => setSearchRoleOnContainer_ ? {
|
|
9270
|
+
"aria-label": i18n_.search_field_field_aria_label_()
|
|
9271
|
+
} :
|
|
9272
|
+
// Searchbox announces basically the same as our aria-label, we could explore always using searchbox in the future
|
|
9273
|
+
{
|
|
9274
|
+
role: "searchbox"
|
|
9275
|
+
}, {
|
|
9276
|
+
get value() {
|
|
9277
|
+
return searchFieldValue();
|
|
9278
|
+
},
|
|
9279
|
+
get placeholder() {
|
|
9280
|
+
return i18n_.placeholder_text_();
|
|
9281
|
+
},
|
|
9282
|
+
"aria-autocomplete": "list",
|
|
9283
|
+
"aria-haspopup": "dialog"
|
|
9284
|
+
}, ariaControls && {
|
|
9285
|
+
"aria-controls": ariaControls
|
|
9286
|
+
}), undefined, false), !isNewModal && $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(ClearButton, {}))), "<!--$-->", isNewModal && $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(BackButton, {})), "<!--/-->", "<!--$-->", $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
|
|
9258
9287
|
when: !isNewModal,
|
|
9259
9288
|
get children() {
|
|
9260
|
-
return $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$
|
|
9289
|
+
return $3hooq$solidjsweb.ssr($29e5dbeb69da7a36$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.search_submit_button_aria_label_(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $5b88b077e48a4451$export$82eafebb825fc23f), {})));
|
|
9261
9290
|
}
|
|
9262
|
-
})));
|
|
9291
|
+
})), "<!--/-->"], true);
|
|
9263
9292
|
}
|
|
9264
9293
|
var $820f2920cc576f7e$var$_tmpl$ = ["<svg", ' xmlns="http://www.w3.org/2000/svg" width="24" height="16"><path d="M.773 7.371L7.98.176C8.098.059 8.238 0 8.402 0s.305.059.422.176S9 .434 9 .598s-.059.305-.176.422L2.648 7.195h19.547a.59.59 0 0 1 .609.609c0 .172-.059.305-.176.422s-.262.176-.434.176H2.648l6.176 6.176a.59.59 0 0 1 .176.426c0 .16-.059.301-.176.422-.055.059-.121.109-.199.137s-.148.039-.223.039-.156-.012-.234-.039a.54.54 0 0 1-.187-.137L.773 8.227c-.117-.117-.176-.258-.176-.422a.6.6 0 0 1 .176-.434zm0 0"></path></svg>'];
|
|
9265
9294
|
function $820f2920cc576f7e$export$8d8893ffd8aca39a() {
|
|
@@ -9290,8 +9319,8 @@ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
9290
9319
|
}
|
|
9291
9320
|
var $9035b24c2dbd3f36$var$_tmpl$ = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
|
|
9292
9321
|
$9035b24c2dbd3f36$var$_tmpl$2 = ["<b", ">", "</b>"],
|
|
9293
|
-
$9035b24c2dbd3f36$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="padded"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"],
|
|
9294
|
-
$9035b24c2dbd3f36$var$_tmpl$4 = ["<div", ' class="', '"><div class="depict-search-modal-backdrop"></div><!--$-->', "<!--/--></div>"];
|
|
9322
|
+
$9035b24c2dbd3f36$var$_tmpl$3 = ["<div", ' class="', '"><div class="', '" role="search" aria-label="Search modal with search field, query suggestions and result preview"><!--$-->', '<!--/--><div id="depict-suggestions-and-result-preview" class="padded"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"],
|
|
9323
|
+
$9035b24c2dbd3f36$var$_tmpl$4 = ["<div", ' class="', '" role="dialog"><div class="depict-search-modal-backdrop"></div><!--$-->', "<!--/--></div>"];
|
|
9295
9324
|
/**
|
|
9296
9325
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
9297
9326
|
*/
|
|
@@ -9428,7 +9457,9 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
9428
9457
|
const [start, end] = selected_text_range_;
|
|
9429
9458
|
if (start === null || end === null) return;
|
|
9430
9459
|
input_el.setSelectionRange(start, end);
|
|
9431
|
-
}
|
|
9460
|
+
},
|
|
9461
|
+
setSearchRoleOnContainer_: false,
|
|
9462
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
9432
9463
|
});
|
|
9433
9464
|
const modal_element = $3hooq$solidjsweb.ssr($9035b24c2dbd3f36$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), "depict-search-modal", "".concat("body", " ").concat($3hooq$solidjsweb.escape($3hooq$solidjsweb.escape(random_classname, true), true)), $3hooq$solidjsweb.escape(search_field), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
9434
9465
|
severity_: "error",
|
|
@@ -9517,7 +9548,7 @@ function $317500f39819fba6$export$9ca09caa9c849d9c() {
|
|
|
9517
9548
|
return $3hooq$solidjsweb.ssr($317500f39819fba6$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey());
|
|
9518
9549
|
}
|
|
9519
9550
|
var $d1e7b96fb13cd1d3$var$_tmpl$ = ["<div", ' class="images-wrapper">', "</div>"],
|
|
9520
|
-
$d1e7b96fb13cd1d3$var$_tmpl$2 = ["<div", ' class="', '"
|
|
9551
|
+
$d1e7b96fb13cd1d3$var$_tmpl$2 = ["<div", ' class="', '"', "><!--$-->", "<!--/--><!--$-->", '<!--/--><h3 class="title">', "</h3></div>"],
|
|
9521
9552
|
$d1e7b96fb13cd1d3$var$_tmpl$3 = ["<div", ' class="empty-image" style="', '">', "</div>"];
|
|
9522
9553
|
const $d1e7b96fb13cd1d3$var$aspectRatioWidthComponent = 400;
|
|
9523
9554
|
const $d1e7b96fb13cd1d3$var$aspectRatioHeightComponent = 200;
|
|
@@ -9552,7 +9583,7 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
9552
9583
|
var _listing_3;
|
|
9553
9584
|
return (_listing_3 = listing_()) === null || _listing_3 === void 0 ? void 0 : _listing_3.ancestors;
|
|
9554
9585
|
});
|
|
9555
|
-
return $3hooq$solidjsweb.ssr($d1e7b96fb13cd1d3$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "listing-card ".concat(isSelected() ? "selected" : ""), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(LinkToListing, {
|
|
9586
|
+
return $3hooq$solidjsweb.ssr($d1e7b96fb13cd1d3$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "listing-card ".concat(isSelected() ? "selected" : ""), $3hooq$solidjsweb.ssrAttribute("aria-selected", $3hooq$solidjsweb.escape(isSelected(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent(LinkToListing, {
|
|
9556
9587
|
"class": "image-part",
|
|
9557
9588
|
get style() {
|
|
9558
9589
|
var _image_urls$length, _image_urls;
|
|
@@ -9762,11 +9793,10 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
9762
9793
|
return urlObject.href;
|
|
9763
9794
|
});
|
|
9764
9795
|
const [isSelected, selectedDueToKeyboardNavigation] = $b0f8d9f49e018db9$export$fb40a80c530e5f2b(read_selected_index_, itemIndex_, () => index);
|
|
9765
|
-
|
|
9796
|
+
const wholeTextToDisplay = $3hooq$solidjs.createMemo(() => item().title_);
|
|
9797
|
+
return $3hooq$solidjsweb.ssr($79a8fa74cb5cdfb9$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), "suggestion ".concat(isSelected() ? "selected" : ""), $3hooq$solidjsweb.ssrAttribute("aria-selected", $3hooq$solidjsweb.escape(isSelected(), true), false) + $3hooq$solidjsweb.ssrAttribute("href", $3hooq$solidjsweb.escape(href(), true), false) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(wholeTextToDisplay(), true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
9766
9798
|
class_: "title line-clamp",
|
|
9767
|
-
|
|
9768
|
-
return $3hooq$solidjs.createMemo(() => item().title_);
|
|
9769
|
-
},
|
|
9799
|
+
whole_text_to_display_: wholeTextToDisplay,
|
|
9770
9800
|
searching_for_value_: searching_for_value_
|
|
9771
9801
|
})));
|
|
9772
9802
|
}
|
|
@@ -9946,7 +9976,7 @@ var $43600b30502feeda$var$_tmpl$ = ["<div", ' class="instant-results-wrapper" st
|
|
|
9946
9976
|
$43600b30502feeda$var$_tmpl$2 = ["<div", ' class="discover-more"><button class="major" type="button">', "</button></div>"],
|
|
9947
9977
|
$43600b30502feeda$var$_tmpl$3 = ["<b", ">", "</b>"],
|
|
9948
9978
|
$43600b30502feeda$var$_tmpl$4 = ["<div", ' class="', '"></div>'],
|
|
9949
|
-
$43600b30502feeda$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '"><!--$-->', '<!--/--><div class="', '"></div></div><!--$-->', "<!--/--></div>"];
|
|
9979
|
+
$43600b30502feeda$var$_tmpl$5 = ["<div", ' class="', '"><div class="', '" role="search" aria-label="Search modal with search field, query suggestions and result preview"><!--$-->', '<!--/--><div id="depict-suggestions-and-result-preview" class="', '"></div></div><!--$-->', "<!--/--></div>"];
|
|
9950
9980
|
/**
|
|
9951
9981
|
* Second generation search modal - the solid component that gets added to <body> when the search modal is opened
|
|
9952
9982
|
*/
|
|
@@ -10189,6 +10219,9 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10189
10219
|
aspectRatio: 1,
|
|
10190
10220
|
get ["class"]() {
|
|
10191
10221
|
return props.class_;
|
|
10222
|
+
},
|
|
10223
|
+
imgProps: {
|
|
10224
|
+
alt: "Product image"
|
|
10192
10225
|
}
|
|
10193
10226
|
}),
|
|
10194
10227
|
...instant_results_options_
|
|
@@ -10269,7 +10302,9 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
10269
10302
|
const [start, end] = selected_text_range_;
|
|
10270
10303
|
if (start === null || end === null) return;
|
|
10271
10304
|
input_el.setSelectionRange(start, end);
|
|
10272
|
-
}
|
|
10305
|
+
},
|
|
10306
|
+
setSearchRoleOnContainer_: false,
|
|
10307
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
10273
10308
|
});
|
|
10274
10309
|
if (setSearchFieldOuterWidth_) {
|
|
10275
10310
|
const resizeObserver = new ResizeObserver($3hooq$depictaiutilishared.catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
package/server/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.9.
|
|
14
|
+
export const version = "4.9.4";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
|
@@ -1539,7 +1539,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
|
|
|
1539
1539
|
* Open the modal with support for alignment.
|
|
1540
1540
|
* @returns {void}
|
|
1541
1541
|
*/
|
|
1542
|
-
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends
|
|
1542
|
+
export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
|
|
1543
1543
|
export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
|
|
1544
1544
|
export interface PageReplacer {
|
|
1545
1545
|
readonly render_: () => Node_Array;
|
|
@@ -1619,5 +1619,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
|
|
|
1619
1619
|
layout?: PossibleLayout;
|
|
1620
1620
|
filterModalParent_?: HTMLElement | ShadowRoot;
|
|
1621
1621
|
showSliderArrow_?: boolean;
|
|
1622
|
-
}): import("@depict-ai/utilishared
|
|
1622
|
+
}): import("@depict-ai/utilishared").Node_Array;
|
|
1623
1623
|
export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
|