@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/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 = $52FdA$solidjs.createSignal(false);
|
|
121
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -10090,15 +10090,18 @@ const $82d079b68975fbf7$export$b05c0ae390cf3e06 = _ref => {
|
|
|
10090
10090
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
10091
10091
|
var _v$ = href(),
|
|
10092
10092
|
_v$2 = display_.search_result_id,
|
|
10093
|
-
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected())
|
|
10093
|
+
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected()),
|
|
10094
|
+
_v$4 = isSelected === null || isSelected === void 0 ? void 0 : isSelected();
|
|
10094
10095
|
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$4, "href", _p$.e = _v$);
|
|
10095
10096
|
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$4, "data-search-result-id", _p$.t = _v$2);
|
|
10096
10097
|
_v$3 !== _p$.a && _el$4.classList.toggle("selected", _p$.a = _v$3);
|
|
10098
|
+
_v$4 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$4, "aria-selected", _p$.o = _v$4);
|
|
10097
10099
|
return _p$;
|
|
10098
10100
|
}, {
|
|
10099
10101
|
e: undefined,
|
|
10100
10102
|
t: undefined,
|
|
10101
|
-
a: undefined
|
|
10103
|
+
a: undefined,
|
|
10104
|
+
o: undefined
|
|
10102
10105
|
});
|
|
10103
10106
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
10104
10107
|
return _el$4;
|
|
@@ -11088,7 +11091,7 @@ var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<but
|
|
|
11088
11091
|
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
11089
11092
|
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
11090
11093
|
$29e5dbeb69da7a36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
11091
|
-
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
11094
|
+
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
11092
11095
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
11093
11096
|
let {
|
|
11094
11097
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -11103,7 +11106,9 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11103
11106
|
after_focusing_: after_focusing_,
|
|
11104
11107
|
BackIcon_: BackIcon_,
|
|
11105
11108
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
11106
|
-
class_: class_
|
|
11109
|
+
class_: class_,
|
|
11110
|
+
setSearchRoleOnContainer_ = true,
|
|
11111
|
+
ariaControls: ariaControls
|
|
11107
11112
|
} = _ref;
|
|
11108
11113
|
let input_element;
|
|
11109
11114
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -11202,6 +11207,13 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11202
11207
|
[_el$17, _co$5] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling),
|
|
11203
11208
|
_el$18 = _el$17.nextSibling,
|
|
11204
11209
|
[_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
11210
|
+
$52FdA$solidjsweb.spread(_el$3, $52FdA$solidjsweb.mergeProps({
|
|
11211
|
+
get ["class"]() {
|
|
11212
|
+
return "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
11213
|
+
}
|
|
11214
|
+
}, setSearchRoleOnContainer_ && {
|
|
11215
|
+
role: "search"
|
|
11216
|
+
}), false, true);
|
|
11205
11217
|
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
11206
11218
|
get when() {
|
|
11207
11219
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -11243,61 +11255,85 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11243
11255
|
}
|
|
11244
11256
|
}), true);
|
|
11245
11257
|
$52FdA$solidjsweb.insert(_el$5, isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$8, _co$);
|
|
11246
|
-
_el$6.$$pointerdown = _ref3 => {
|
|
11247
|
-
let {
|
|
11248
|
-
pointerType: pointerType
|
|
11249
|
-
} = _ref3;
|
|
11250
|
-
// 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).
|
|
11251
|
-
if (pointerType === "mouse") {
|
|
11252
|
-
const handler = $52FdA$depictaiutilishared.catchify(_ref4 => {
|
|
11253
|
-
let {
|
|
11254
|
-
pointerType: pointerType,
|
|
11255
|
-
target: target
|
|
11256
|
-
} = _ref4;
|
|
11257
|
-
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
11258
|
-
input_element.click();
|
|
11259
|
-
});
|
|
11260
|
-
window.addEventListener("pointerup", handler, {
|
|
11261
|
-
once: true
|
|
11262
|
-
});
|
|
11263
|
-
$52FdA$solidjs.runWithOwner(owner_of_field_element, () => $52FdA$solidjs.onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
11264
|
-
}
|
|
11265
|
-
};
|
|
11266
|
-
$52FdA$solidjsweb.addEventListener(_el$6, "select", $52FdA$depictaiutilishared.catchify(() => {
|
|
11267
|
-
if (disabled_)
|
|
11268
|
-
// 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
|
|
11269
|
-
return;
|
|
11270
|
-
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
11271
|
-
// everything was selected, clear filters on next submit on next input
|
|
11272
|
-
input_element.addEventListener("input", $52FdA$depictaiutilishared.catchify(() => clear_filters_(false)),
|
|
11273
|
-
// We don't count this as user triggered since it wasn't explicit
|
|
11274
|
-
{
|
|
11275
|
-
once: true
|
|
11276
|
-
});
|
|
11277
|
-
}));
|
|
11278
|
-
$52FdA$solidjsweb.addEventListener(_el$6, "input", $52FdA$depictaiutilishared.catchify(() => {
|
|
11279
|
-
const {
|
|
11280
|
-
value: value
|
|
11281
|
-
} = input_element;
|
|
11282
|
-
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
11283
|
-
setSearchFieldValue(value);
|
|
11284
|
-
}), true);
|
|
11285
|
-
$52FdA$solidjsweb.addEventListener(_el$6, "keydown", $52FdA$depictaiutilishared.catchify(e => {
|
|
11286
|
-
if (disabled_) {
|
|
11287
|
-
if (e.key !== "Tab" && e.key !== "Shift")
|
|
11288
|
-
// 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
|
|
11289
|
-
input_element.click();
|
|
11290
|
-
} else if (e.key === "Enter") {
|
|
11291
|
-
const dont_submit = override_on_enter_ === null || override_on_enter_ === void 0 ? void 0 : override_on_enter_(e);
|
|
11292
|
-
if (!dont_submit) submit_query_();
|
|
11293
|
-
}
|
|
11294
|
-
}), true);
|
|
11295
11258
|
var _ref$2 = $52FdA$depictaiutilishared.catchify(el => {
|
|
11296
11259
|
input_element = el;
|
|
11297
11260
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
11298
11261
|
});
|
|
11299
11262
|
typeof _ref$2 === "function" && $52FdA$solidjsweb.use(_ref$2, _el$6);
|
|
11300
11263
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
11264
|
+
$52FdA$solidjsweb.spread(_el$6, $52FdA$solidjsweb.mergeProps(() => setSearchRoleOnContainer_ ? {
|
|
11265
|
+
"aria-label": i18n_.search_field_field_aria_label_()
|
|
11266
|
+
} :
|
|
11267
|
+
// Searchbox announces basically the same as our aria-label, we could explore always using searchbox in the future
|
|
11268
|
+
{
|
|
11269
|
+
role: "searchbox"
|
|
11270
|
+
}, {
|
|
11271
|
+
get value() {
|
|
11272
|
+
return searchFieldValue();
|
|
11273
|
+
},
|
|
11274
|
+
get onKeyDown() {
|
|
11275
|
+
return $52FdA$depictaiutilishared.catchify(e => {
|
|
11276
|
+
if (disabled_) {
|
|
11277
|
+
if (e.key !== "Tab" && e.key !== "Shift")
|
|
11278
|
+
// 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
|
|
11279
|
+
input_element.click();
|
|
11280
|
+
} else if (e.key === "Enter") {
|
|
11281
|
+
const dont_submit = override_on_enter_ === null || override_on_enter_ === void 0 ? void 0 : override_on_enter_(e);
|
|
11282
|
+
if (!dont_submit) submit_query_();
|
|
11283
|
+
}
|
|
11284
|
+
});
|
|
11285
|
+
},
|
|
11286
|
+
get onInput() {
|
|
11287
|
+
return $52FdA$depictaiutilishared.catchify(() => {
|
|
11288
|
+
const {
|
|
11289
|
+
value: value
|
|
11290
|
+
} = input_element;
|
|
11291
|
+
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
11292
|
+
setSearchFieldValue(value);
|
|
11293
|
+
});
|
|
11294
|
+
},
|
|
11295
|
+
get onSelect() {
|
|
11296
|
+
return $52FdA$depictaiutilishared.catchify(() => {
|
|
11297
|
+
if (disabled_)
|
|
11298
|
+
// 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
|
|
11299
|
+
return;
|
|
11300
|
+
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
11301
|
+
// everything was selected, clear filters on next submit on next input
|
|
11302
|
+
input_element.addEventListener("input", $52FdA$depictaiutilishared.catchify(() => clear_filters_(false)),
|
|
11303
|
+
// We don't count this as user triggered since it wasn't explicit
|
|
11304
|
+
{
|
|
11305
|
+
once: true
|
|
11306
|
+
});
|
|
11307
|
+
});
|
|
11308
|
+
},
|
|
11309
|
+
"onPointerDown": _ref3 => {
|
|
11310
|
+
let {
|
|
11311
|
+
pointerType: pointerType
|
|
11312
|
+
} = _ref3;
|
|
11313
|
+
// 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).
|
|
11314
|
+
if (pointerType === "mouse") {
|
|
11315
|
+
const handler = $52FdA$depictaiutilishared.catchify(_ref4 => {
|
|
11316
|
+
let {
|
|
11317
|
+
pointerType: pointerType,
|
|
11318
|
+
target: target
|
|
11319
|
+
} = _ref4;
|
|
11320
|
+
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
11321
|
+
input_element.click();
|
|
11322
|
+
});
|
|
11323
|
+
window.addEventListener("pointerup", handler, {
|
|
11324
|
+
once: true
|
|
11325
|
+
});
|
|
11326
|
+
$52FdA$solidjs.runWithOwner(owner_of_field_element, () => $52FdA$solidjs.onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
11327
|
+
}
|
|
11328
|
+
},
|
|
11329
|
+
get placeholder() {
|
|
11330
|
+
return i18n_.placeholder_text_();
|
|
11331
|
+
},
|
|
11332
|
+
"aria-autocomplete": "list",
|
|
11333
|
+
"aria-haspopup": "dialog"
|
|
11334
|
+
}, ariaControls && {
|
|
11335
|
+
"aria-controls": ariaControls
|
|
11336
|
+
}), false, false);
|
|
11301
11337
|
$52FdA$solidjsweb.insert(_el$5, !isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
11302
11338
|
$52FdA$solidjsweb.insert(_el$3, isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
11303
11339
|
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -11311,25 +11347,11 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11311
11347
|
return _el$11;
|
|
11312
11348
|
}
|
|
11313
11349
|
}), _el$19, _co$6);
|
|
11314
|
-
$52FdA$solidjsweb.effect(_p$ => {
|
|
11315
|
-
var _v$ = "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : ""),
|
|
11316
|
-
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
11317
|
-
_v$3 = i18n_.placeholder_text_();
|
|
11318
|
-
_v$ !== _p$.e && $52FdA$solidjsweb.className(_el$3, _p$.e = _v$);
|
|
11319
|
-
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
11320
|
-
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
11321
|
-
return _p$;
|
|
11322
|
-
}, {
|
|
11323
|
-
e: undefined,
|
|
11324
|
-
t: undefined,
|
|
11325
|
-
a: undefined
|
|
11326
|
-
});
|
|
11327
|
-
$52FdA$solidjsweb.effect(() => $52FdA$solidjsweb.setProperty(_el$6, "value", searchFieldValue()));
|
|
11328
11350
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
11329
11351
|
return _el$3;
|
|
11330
11352
|
})();
|
|
11331
11353
|
}
|
|
11332
|
-
$52FdA$solidjsweb.delegateEvents(["click"
|
|
11354
|
+
$52FdA$solidjsweb.delegateEvents(["click"]);
|
|
11333
11355
|
var $820f2920cc576f7e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.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">`);
|
|
11334
11356
|
function $820f2920cc576f7e$export$8d8893ffd8aca39a() {
|
|
11335
11357
|
return $52FdA$solidjsweb.getNextElement($820f2920cc576f7e$var$_tmpl$);
|
|
@@ -11359,8 +11381,8 @@ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
11359
11381
|
}
|
|
11360
11382
|
var $9035b24c2dbd3f36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
11361
11383
|
$9035b24c2dbd3f36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
11362
|
-
$9035b24c2dbd3f36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11363
|
-
$9035b24c2dbd3f36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11384
|
+
$9035b24c2dbd3f36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.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><!$><!/>`),
|
|
11385
|
+
$9035b24c2dbd3f36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"role=dialog><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11364
11386
|
/**
|
|
11365
11387
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
11366
11388
|
*/
|
|
@@ -11508,7 +11530,9 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
11508
11530
|
const [start, end] = selected_text_range_;
|
|
11509
11531
|
if (start === null || end === null) return;
|
|
11510
11532
|
input_el.setSelectionRange(start, end);
|
|
11511
|
-
}
|
|
11533
|
+
},
|
|
11534
|
+
setSearchRoleOnContainer_: false,
|
|
11535
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
11512
11536
|
});
|
|
11513
11537
|
const modal_element = (() => {
|
|
11514
11538
|
var _el$4 = $52FdA$solidjsweb.getNextElement($9035b24c2dbd3f36$var$_tmpl$3),
|
|
@@ -11764,7 +11788,16 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
11764
11788
|
});
|
|
11765
11789
|
}
|
|
11766
11790
|
}));
|
|
11767
|
-
$52FdA$solidjsweb.effect(
|
|
11791
|
+
$52FdA$solidjsweb.effect(_p$ => {
|
|
11792
|
+
var _v$ = !!isSelected(),
|
|
11793
|
+
_v$2 = isSelected();
|
|
11794
|
+
_v$ !== _p$.e && _el$2.classList.toggle("selected", _p$.e = _v$);
|
|
11795
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$2, "aria-selected", _p$.t = _v$2);
|
|
11796
|
+
return _p$;
|
|
11797
|
+
}, {
|
|
11798
|
+
e: undefined,
|
|
11799
|
+
t: undefined
|
|
11800
|
+
});
|
|
11768
11801
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
11769
11802
|
return _el$2;
|
|
11770
11803
|
})();
|
|
@@ -11968,6 +12001,7 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
11968
12001
|
return urlObject.href;
|
|
11969
12002
|
});
|
|
11970
12003
|
const [isSelected, selectedDueToKeyboardNavigation] = $b0f8d9f49e018db9$export$fb40a80c530e5f2b(read_selected_index_, itemIndex_, () => index);
|
|
12004
|
+
const wholeTextToDisplay = $52FdA$solidjs.createMemo(() => item().title_);
|
|
11971
12005
|
return (() => {
|
|
11972
12006
|
var _el$7 = $52FdA$solidjsweb.getNextElement($79a8fa74cb5cdfb9$var$_tmpl$2);
|
|
11973
12007
|
$52FdA$solidjsweb.use(element => {
|
|
@@ -11992,20 +12026,24 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
11992
12026
|
$52FdA$solidjsweb.addEventListener(_el$7, "mouseenter", $52FdA$depictaiutilishared.catchify(() => write_selected_index_([itemIndex_(), index])));
|
|
11993
12027
|
$52FdA$solidjsweb.insert(_el$7, $52FdA$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
11994
12028
|
class_: "title line-clamp",
|
|
11995
|
-
|
|
11996
|
-
return $52FdA$solidjs.createMemo(() => item().title_);
|
|
11997
|
-
},
|
|
12029
|
+
whole_text_to_display_: wholeTextToDisplay,
|
|
11998
12030
|
searching_for_value_: searching_for_value_
|
|
11999
12031
|
}));
|
|
12000
12032
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
12001
12033
|
var _v$ = !!isSelected(),
|
|
12002
|
-
_v$2 =
|
|
12034
|
+
_v$2 = isSelected(),
|
|
12035
|
+
_v$3 = href(),
|
|
12036
|
+
_v$4 = wholeTextToDisplay();
|
|
12003
12037
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
12004
|
-
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$7, "
|
|
12038
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$7, "aria-selected", _p$.t = _v$2);
|
|
12039
|
+
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$7, "href", _p$.a = _v$3);
|
|
12040
|
+
_v$4 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$7, "aria-label", _p$.o = _v$4);
|
|
12005
12041
|
return _p$;
|
|
12006
12042
|
}, {
|
|
12007
12043
|
e: undefined,
|
|
12008
|
-
t: undefined
|
|
12044
|
+
t: undefined,
|
|
12045
|
+
a: undefined,
|
|
12046
|
+
o: undefined
|
|
12009
12047
|
});
|
|
12010
12048
|
return _el$7;
|
|
12011
12049
|
})();
|
|
@@ -12197,7 +12235,7 @@ var $43600b30502feeda$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
|
12197
12235
|
$43600b30502feeda$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
12198
12236
|
$43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
12199
12237
|
$43600b30502feeda$var$_tmpl$6 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal-backdrop>`),
|
|
12200
|
-
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12238
|
+
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.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><!$><!/>`),
|
|
12201
12239
|
$43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=left>`),
|
|
12202
12240
|
$43600b30502feeda$var$_tmpl$9 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right>`);
|
|
12203
12241
|
/**
|
|
@@ -12447,6 +12485,9 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12447
12485
|
aspectRatio: 1,
|
|
12448
12486
|
get ["class"]() {
|
|
12449
12487
|
return props.class_;
|
|
12488
|
+
},
|
|
12489
|
+
imgProps: {
|
|
12490
|
+
alt: "Product image"
|
|
12450
12491
|
}
|
|
12451
12492
|
}),
|
|
12452
12493
|
...instant_results_options_
|
|
@@ -12552,7 +12593,9 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12552
12593
|
const [start, end] = selected_text_range_;
|
|
12553
12594
|
if (start === null || end === null) return;
|
|
12554
12595
|
input_el.setSelectionRange(start, end);
|
|
12555
|
-
}
|
|
12596
|
+
},
|
|
12597
|
+
setSearchRoleOnContainer_: false,
|
|
12598
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
12556
12599
|
});
|
|
12557
12600
|
if (setSearchFieldOuterWidth_) {
|
|
12558
12601
|
const resizeObserver = new ResizeObserver($52FdA$depictaiutilishared.catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
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.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";
|