@depict-ai/ui 4.9.2 → 4.9.3
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 +97 -76
- package/ES10/index.d.ts +3 -3
- package/ES10/index.js +97 -76
- package/latest/index.cjs +95 -74
- package/latest/index.d.ts +3 -3
- package/latest/index.js +95 -74
- package/package.json +1 -1
- package/server/ES10/index.cjs +44 -16
- package/server/ES10/index.d.ts +3 -3
- package/server/ES10/index.js +44 -16
- package/server/latest/index.cjs +44 -16
- package/server/latest/index.d.ts +3 -3
- package/server/latest/index.js +44 -16
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.3";
|
|
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 => {
|
|
@@ -11088,7 +11088,7 @@ var $29e5dbeb69da7a36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<but
|
|
|
11088
11088
|
$29e5dbeb69da7a36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button type=button class=clear>`),
|
|
11089
11089
|
$29e5dbeb69da7a36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=spacer>`),
|
|
11090
11090
|
$29e5dbeb69da7a36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="submit major"type=button>`),
|
|
11091
|
-
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
11091
|
+
$29e5dbeb69da7a36$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
11092
11092
|
function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
11093
11093
|
let {
|
|
11094
11094
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -11103,7 +11103,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11103
11103
|
after_focusing_: after_focusing_,
|
|
11104
11104
|
BackIcon_: BackIcon_,
|
|
11105
11105
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
11106
|
-
class_: class_
|
|
11106
|
+
class_: class_,
|
|
11107
|
+
setSearchRoleOnContainer_ = true
|
|
11107
11108
|
} = _ref;
|
|
11108
11109
|
let input_element;
|
|
11109
11110
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -11202,6 +11203,13 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11202
11203
|
[_el$17, _co$5] = $52FdA$solidjsweb.getNextMarker(_el$16.nextSibling),
|
|
11203
11204
|
_el$18 = _el$17.nextSibling,
|
|
11204
11205
|
[_el$19, _co$6] = $52FdA$solidjsweb.getNextMarker(_el$18.nextSibling);
|
|
11206
|
+
$52FdA$solidjsweb.spread(_el$3, $52FdA$solidjsweb.mergeProps({
|
|
11207
|
+
get ["class"]() {
|
|
11208
|
+
return "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
11209
|
+
}
|
|
11210
|
+
}, setSearchRoleOnContainer_ && {
|
|
11211
|
+
role: "search"
|
|
11212
|
+
}), false, true);
|
|
11205
11213
|
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
11206
11214
|
get when() {
|
|
11207
11215
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -11243,61 +11251,81 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11243
11251
|
}
|
|
11244
11252
|
}), true);
|
|
11245
11253
|
$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
11254
|
var _ref$2 = $52FdA$depictaiutilishared.catchify(el => {
|
|
11296
11255
|
input_element = el;
|
|
11297
11256
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
11298
11257
|
});
|
|
11299
11258
|
typeof _ref$2 === "function" && $52FdA$solidjsweb.use(_ref$2, _el$6);
|
|
11300
11259
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
11260
|
+
$52FdA$solidjsweb.spread(_el$6, $52FdA$solidjsweb.mergeProps(() => setSearchRoleOnContainer_ ? {
|
|
11261
|
+
"aria-label": i18n_.search_field_field_aria_label_()
|
|
11262
|
+
} :
|
|
11263
|
+
// Searchbox announces basically the same as our aria-label, we could explore always using searchbox in the future
|
|
11264
|
+
{
|
|
11265
|
+
role: "searchbox"
|
|
11266
|
+
}, {
|
|
11267
|
+
get value() {
|
|
11268
|
+
return searchFieldValue();
|
|
11269
|
+
},
|
|
11270
|
+
get onKeyDown() {
|
|
11271
|
+
return $52FdA$depictaiutilishared.catchify(e => {
|
|
11272
|
+
if (disabled_) {
|
|
11273
|
+
if (e.key !== "Tab" && e.key !== "Shift")
|
|
11274
|
+
// 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
|
|
11275
|
+
input_element.click();
|
|
11276
|
+
} else if (e.key === "Enter") {
|
|
11277
|
+
const dont_submit = override_on_enter_ === null || override_on_enter_ === void 0 ? void 0 : override_on_enter_(e);
|
|
11278
|
+
if (!dont_submit) submit_query_();
|
|
11279
|
+
}
|
|
11280
|
+
});
|
|
11281
|
+
},
|
|
11282
|
+
get onInput() {
|
|
11283
|
+
return $52FdA$depictaiutilishared.catchify(() => {
|
|
11284
|
+
const {
|
|
11285
|
+
value: value
|
|
11286
|
+
} = input_element;
|
|
11287
|
+
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
11288
|
+
setSearchFieldValue(value);
|
|
11289
|
+
});
|
|
11290
|
+
},
|
|
11291
|
+
get onSelect() {
|
|
11292
|
+
return $52FdA$depictaiutilishared.catchify(() => {
|
|
11293
|
+
if (disabled_)
|
|
11294
|
+
// 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
|
|
11295
|
+
return;
|
|
11296
|
+
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
11297
|
+
// everything was selected, clear filters on next submit on next input
|
|
11298
|
+
input_element.addEventListener("input", $52FdA$depictaiutilishared.catchify(() => clear_filters_(false)),
|
|
11299
|
+
// We don't count this as user triggered since it wasn't explicit
|
|
11300
|
+
{
|
|
11301
|
+
once: true
|
|
11302
|
+
});
|
|
11303
|
+
});
|
|
11304
|
+
},
|
|
11305
|
+
"onPointerDown": _ref3 => {
|
|
11306
|
+
let {
|
|
11307
|
+
pointerType: pointerType
|
|
11308
|
+
} = _ref3;
|
|
11309
|
+
// 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).
|
|
11310
|
+
if (pointerType === "mouse") {
|
|
11311
|
+
const handler = $52FdA$depictaiutilishared.catchify(_ref4 => {
|
|
11312
|
+
let {
|
|
11313
|
+
pointerType: pointerType,
|
|
11314
|
+
target: target
|
|
11315
|
+
} = _ref4;
|
|
11316
|
+
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
11317
|
+
input_element.click();
|
|
11318
|
+
});
|
|
11319
|
+
window.addEventListener("pointerup", handler, {
|
|
11320
|
+
once: true
|
|
11321
|
+
});
|
|
11322
|
+
$52FdA$solidjs.runWithOwner(owner_of_field_element, () => $52FdA$solidjs.onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
11323
|
+
}
|
|
11324
|
+
},
|
|
11325
|
+
get placeholder() {
|
|
11326
|
+
return i18n_.placeholder_text_();
|
|
11327
|
+
}
|
|
11328
|
+
}), false, false);
|
|
11301
11329
|
$52FdA$solidjsweb.insert(_el$5, !isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
11302
11330
|
$52FdA$solidjsweb.insert(_el$3, isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
11303
11331
|
$52FdA$solidjsweb.insert(_el$3, $52FdA$solidjsweb.createComponent((0, $52FdA$solidjs.Show), {
|
|
@@ -11311,25 +11339,11 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11311
11339
|
return _el$11;
|
|
11312
11340
|
}
|
|
11313
11341
|
}), _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
11342
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
11329
11343
|
return _el$3;
|
|
11330
11344
|
})();
|
|
11331
11345
|
}
|
|
11332
|
-
$52FdA$solidjsweb.delegateEvents(["click"
|
|
11346
|
+
$52FdA$solidjsweb.delegateEvents(["click"]);
|
|
11333
11347
|
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
11348
|
function $820f2920cc576f7e$export$8d8893ffd8aca39a() {
|
|
11335
11349
|
return $52FdA$solidjsweb.getNextElement($820f2920cc576f7e$var$_tmpl$);
|
|
@@ -11359,7 +11373,7 @@ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
11359
11373
|
}
|
|
11360
11374
|
var $9035b24c2dbd3f36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
11361
11375
|
$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><!$><!/>`),
|
|
11376
|
+
$9035b24c2dbd3f36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11363
11377
|
$9035b24c2dbd3f36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11364
11378
|
/**
|
|
11365
11379
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
@@ -11508,7 +11522,8 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
11508
11522
|
const [start, end] = selected_text_range_;
|
|
11509
11523
|
if (start === null || end === null) return;
|
|
11510
11524
|
input_el.setSelectionRange(start, end);
|
|
11511
|
-
}
|
|
11525
|
+
},
|
|
11526
|
+
setSearchRoleOnContainer_: false
|
|
11512
11527
|
});
|
|
11513
11528
|
const modal_element = (() => {
|
|
11514
11529
|
var _el$4 = $52FdA$solidjsweb.getNextElement($9035b24c2dbd3f36$var$_tmpl$3),
|
|
@@ -11968,6 +11983,7 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
11968
11983
|
return urlObject.href;
|
|
11969
11984
|
});
|
|
11970
11985
|
const [isSelected, selectedDueToKeyboardNavigation] = $b0f8d9f49e018db9$export$fb40a80c530e5f2b(read_selected_index_, itemIndex_, () => index);
|
|
11986
|
+
const wholeTextToDisplay = $52FdA$solidjs.createMemo(() => item().title_);
|
|
11971
11987
|
return (() => {
|
|
11972
11988
|
var _el$7 = $52FdA$solidjsweb.getNextElement($79a8fa74cb5cdfb9$var$_tmpl$2);
|
|
11973
11989
|
$52FdA$solidjsweb.use(element => {
|
|
@@ -11992,20 +12008,21 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
11992
12008
|
$52FdA$solidjsweb.addEventListener(_el$7, "mouseenter", $52FdA$depictaiutilishared.catchify(() => write_selected_index_([itemIndex_(), index])));
|
|
11993
12009
|
$52FdA$solidjsweb.insert(_el$7, $52FdA$solidjsweb.createComponent((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
11994
12010
|
class_: "title line-clamp",
|
|
11995
|
-
|
|
11996
|
-
return $52FdA$solidjs.createMemo(() => item().title_);
|
|
11997
|
-
},
|
|
12011
|
+
whole_text_to_display_: wholeTextToDisplay,
|
|
11998
12012
|
searching_for_value_: searching_for_value_
|
|
11999
12013
|
}));
|
|
12000
12014
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
12001
12015
|
var _v$ = !!isSelected(),
|
|
12002
|
-
_v$2 = href()
|
|
12016
|
+
_v$2 = href(),
|
|
12017
|
+
_v$3 = wholeTextToDisplay();
|
|
12003
12018
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
12004
12019
|
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$7, "href", _p$.t = _v$2);
|
|
12020
|
+
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$7, "aria-label", _p$.a = _v$3);
|
|
12005
12021
|
return _p$;
|
|
12006
12022
|
}, {
|
|
12007
12023
|
e: undefined,
|
|
12008
|
-
t: undefined
|
|
12024
|
+
t: undefined,
|
|
12025
|
+
a: undefined
|
|
12009
12026
|
});
|
|
12010
12027
|
return _el$7;
|
|
12011
12028
|
})();
|
|
@@ -12197,7 +12214,7 @@ var $43600b30502feeda$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
|
12197
12214
|
$43600b30502feeda$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
12198
12215
|
$43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
12199
12216
|
$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><!$><!/>`),
|
|
12217
|
+
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12201
12218
|
$43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=left>`),
|
|
12202
12219
|
$43600b30502feeda$var$_tmpl$9 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right>`);
|
|
12203
12220
|
/**
|
|
@@ -12447,6 +12464,9 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12447
12464
|
aspectRatio: 1,
|
|
12448
12465
|
get ["class"]() {
|
|
12449
12466
|
return props.class_;
|
|
12467
|
+
},
|
|
12468
|
+
imgProps: {
|
|
12469
|
+
alt: "Product image"
|
|
12450
12470
|
}
|
|
12451
12471
|
}),
|
|
12452
12472
|
...instant_results_options_
|
|
@@ -12552,7 +12572,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12552
12572
|
const [start, end] = selected_text_range_;
|
|
12553
12573
|
if (start === null || end === null) return;
|
|
12554
12574
|
input_el.setSelectionRange(start, end);
|
|
12555
|
-
}
|
|
12575
|
+
},
|
|
12576
|
+
setSearchRoleOnContainer_: false
|
|
12556
12577
|
});
|
|
12557
12578
|
if (setSearchFieldOuterWidth_) {
|
|
12558
12579
|
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.3";
|
|
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/ES10/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.3";
|
|
14
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
15
|
const signal = $8tj43$createSignal(false);
|
|
16
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -10983,7 +10983,7 @@ var $584c06c09cf4609d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class=b
|
|
|
10983
10983
|
$584c06c09cf4609d$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<button type=button class=clear>`),
|
|
10984
10984
|
$584c06c09cf4609d$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=spacer>`),
|
|
10985
10985
|
$584c06c09cf4609d$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<button class="submit major"type=button>`),
|
|
10986
|
-
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div
|
|
10986
|
+
$584c06c09cf4609d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<div><!$><!/><!$><!/><div class=field><!$><!/><input class=query tabindex=0 enterkeyhint=search><!$><!/></div><!$><!/><!$><!/>`);
|
|
10987
10987
|
function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
10988
10988
|
let {
|
|
10989
10989
|
search_field_value_: [searchFieldValue, setSearchFieldValue],
|
|
@@ -10998,7 +10998,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
10998
10998
|
after_focusing_: after_focusing_,
|
|
10999
10999
|
BackIcon_: BackIcon_,
|
|
11000
11000
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
11001
|
-
class_: class_
|
|
11001
|
+
class_: class_,
|
|
11002
|
+
setSearchRoleOnContainer_ = true
|
|
11002
11003
|
} = _ref;
|
|
11003
11004
|
let input_element;
|
|
11004
11005
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -11097,6 +11098,13 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
11097
11098
|
[_el$17, _co$5] = $8tj43$getNextMarker(_el$16.nextSibling),
|
|
11098
11099
|
_el$18 = _el$17.nextSibling,
|
|
11099
11100
|
[_el$19, _co$6] = $8tj43$getNextMarker(_el$18.nextSibling);
|
|
11101
|
+
$8tj43$spread(_el$3, $8tj43$mergeProps1({
|
|
11102
|
+
get ["class"]() {
|
|
11103
|
+
return "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : "");
|
|
11104
|
+
}
|
|
11105
|
+
}, setSearchRoleOnContainer_ && {
|
|
11106
|
+
role: "search"
|
|
11107
|
+
}), false, true);
|
|
11100
11108
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $8tj43$Show), {
|
|
11101
11109
|
get when() {
|
|
11102
11110
|
return getBackButtonWidth() !== undefined && on_back_;
|
|
@@ -11138,61 +11146,81 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
11138
11146
|
}
|
|
11139
11147
|
}), true);
|
|
11140
11148
|
$8tj43$insert(_el$5, isNewModal && $8tj43$createComponent(ClearButton, {}), _el$8, _co$);
|
|
11141
|
-
_el$6.$$pointerdown = _ref3 => {
|
|
11142
|
-
let {
|
|
11143
|
-
pointerType: pointerType
|
|
11144
|
-
} = _ref3;
|
|
11145
|
-
// 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).
|
|
11146
|
-
if (pointerType === "mouse") {
|
|
11147
|
-
const handler = $8tj43$catchify1(_ref4 => {
|
|
11148
|
-
let {
|
|
11149
|
-
pointerType: pointerType,
|
|
11150
|
-
target: target
|
|
11151
|
-
} = _ref4;
|
|
11152
|
-
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
11153
|
-
input_element.click();
|
|
11154
|
-
});
|
|
11155
|
-
window.addEventListener("pointerup", handler, {
|
|
11156
|
-
once: true
|
|
11157
|
-
});
|
|
11158
|
-
$8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
11159
|
-
}
|
|
11160
|
-
};
|
|
11161
|
-
$8tj43$addEventListener(_el$6, "select", $8tj43$catchify1(() => {
|
|
11162
|
-
if (disabled_)
|
|
11163
|
-
// 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
|
|
11164
|
-
return;
|
|
11165
|
-
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
11166
|
-
// everything was selected, clear filters on next submit on next input
|
|
11167
|
-
input_element.addEventListener("input", $8tj43$catchify1(() => clear_filters_(false)),
|
|
11168
|
-
// We don't count this as user triggered since it wasn't explicit
|
|
11169
|
-
{
|
|
11170
|
-
once: true
|
|
11171
|
-
});
|
|
11172
|
-
}));
|
|
11173
|
-
$8tj43$addEventListener(_el$6, "input", $8tj43$catchify1(() => {
|
|
11174
|
-
const {
|
|
11175
|
-
value: value
|
|
11176
|
-
} = input_element;
|
|
11177
|
-
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
11178
|
-
setSearchFieldValue(value);
|
|
11179
|
-
}), true);
|
|
11180
|
-
$8tj43$addEventListener(_el$6, "keydown", $8tj43$catchify1(e => {
|
|
11181
|
-
if (disabled_) {
|
|
11182
|
-
if (e.key !== "Tab" && e.key !== "Shift")
|
|
11183
|
-
// 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
|
|
11184
|
-
input_element.click();
|
|
11185
|
-
} else if (e.key === "Enter") {
|
|
11186
|
-
const dont_submit = override_on_enter_ === null || override_on_enter_ === void 0 ? void 0 : override_on_enter_(e);
|
|
11187
|
-
if (!dont_submit) submit_query_();
|
|
11188
|
-
}
|
|
11189
|
-
}), true);
|
|
11190
11149
|
var _ref$2 = $8tj43$catchify1(el => {
|
|
11191
11150
|
input_element = el;
|
|
11192
11151
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
11193
11152
|
});
|
|
11194
11153
|
typeof _ref$2 === "function" && $8tj43$use(_ref$2, _el$6);
|
|
11195
11154
|
_el$6.classList.toggle("has-adjacent-back-button", !!!!on_back_);
|
|
11155
|
+
$8tj43$spread(_el$6, $8tj43$mergeProps1(() => setSearchRoleOnContainer_ ? {
|
|
11156
|
+
"aria-label": i18n_.search_field_field_aria_label_()
|
|
11157
|
+
} :
|
|
11158
|
+
// Searchbox announces basically the same as our aria-label, we could explore always using searchbox in the future
|
|
11159
|
+
{
|
|
11160
|
+
role: "searchbox"
|
|
11161
|
+
}, {
|
|
11162
|
+
get value() {
|
|
11163
|
+
return searchFieldValue();
|
|
11164
|
+
},
|
|
11165
|
+
get onKeyDown() {
|
|
11166
|
+
return $8tj43$catchify1(e => {
|
|
11167
|
+
if (disabled_) {
|
|
11168
|
+
if (e.key !== "Tab" && e.key !== "Shift")
|
|
11169
|
+
// 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
|
|
11170
|
+
input_element.click();
|
|
11171
|
+
} else if (e.key === "Enter") {
|
|
11172
|
+
const dont_submit = override_on_enter_ === null || override_on_enter_ === void 0 ? void 0 : override_on_enter_(e);
|
|
11173
|
+
if (!dont_submit) submit_query_();
|
|
11174
|
+
}
|
|
11175
|
+
});
|
|
11176
|
+
},
|
|
11177
|
+
get onInput() {
|
|
11178
|
+
return $8tj43$catchify1(() => {
|
|
11179
|
+
const {
|
|
11180
|
+
value: value
|
|
11181
|
+
} = input_element;
|
|
11182
|
+
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
11183
|
+
setSearchFieldValue(value);
|
|
11184
|
+
});
|
|
11185
|
+
},
|
|
11186
|
+
get onSelect() {
|
|
11187
|
+
return $8tj43$catchify1(() => {
|
|
11188
|
+
if (disabled_)
|
|
11189
|
+
// 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
|
|
11190
|
+
return;
|
|
11191
|
+
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
11192
|
+
// everything was selected, clear filters on next submit on next input
|
|
11193
|
+
input_element.addEventListener("input", $8tj43$catchify1(() => clear_filters_(false)),
|
|
11194
|
+
// We don't count this as user triggered since it wasn't explicit
|
|
11195
|
+
{
|
|
11196
|
+
once: true
|
|
11197
|
+
});
|
|
11198
|
+
});
|
|
11199
|
+
},
|
|
11200
|
+
"onPointerDown": _ref3 => {
|
|
11201
|
+
let {
|
|
11202
|
+
pointerType: pointerType
|
|
11203
|
+
} = _ref3;
|
|
11204
|
+
// 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).
|
|
11205
|
+
if (pointerType === "mouse") {
|
|
11206
|
+
const handler = $8tj43$catchify1(_ref4 => {
|
|
11207
|
+
let {
|
|
11208
|
+
pointerType: pointerType,
|
|
11209
|
+
target: target
|
|
11210
|
+
} = _ref4;
|
|
11211
|
+
if (pointerType !== "mouse" || !(target instanceof Node) || target === field_div || field_div.contains(target)) return;
|
|
11212
|
+
input_element.click();
|
|
11213
|
+
});
|
|
11214
|
+
window.addEventListener("pointerup", handler, {
|
|
11215
|
+
once: true
|
|
11216
|
+
});
|
|
11217
|
+
$8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
11218
|
+
}
|
|
11219
|
+
},
|
|
11220
|
+
get placeholder() {
|
|
11221
|
+
return i18n_.placeholder_text_();
|
|
11222
|
+
}
|
|
11223
|
+
}), false, false);
|
|
11196
11224
|
$8tj43$insert(_el$5, !isNewModal && $8tj43$createComponent(ClearButton, {}), _el$10, _co$2);
|
|
11197
11225
|
$8tj43$insert(_el$3, isNewModal && $8tj43$createComponent(BackButton, {}), _el$17, _co$5);
|
|
11198
11226
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -11206,25 +11234,11 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
11206
11234
|
return _el$11;
|
|
11207
11235
|
}
|
|
11208
11236
|
}), _el$19, _co$6);
|
|
11209
|
-
$8tj43$effect(_p$ => {
|
|
11210
|
-
var _v$ = "search-field".concat(on_back_ ? " in-modal" : "").concat(class_ !== null && class_ !== void 0 && class_() ? " ".concat(class_()) : ""),
|
|
11211
|
-
_v$2 = i18n_.search_field_field_aria_label_(),
|
|
11212
|
-
_v$3 = i18n_.placeholder_text_();
|
|
11213
|
-
_v$ !== _p$.e && $8tj43$className(_el$3, _p$.e = _v$);
|
|
11214
|
-
_v$2 !== _p$.t && $8tj43$setAttribute(_el$6, "aria-label", _p$.t = _v$2);
|
|
11215
|
-
_v$3 !== _p$.a && $8tj43$setAttribute(_el$6, "placeholder", _p$.a = _v$3);
|
|
11216
|
-
return _p$;
|
|
11217
|
-
}, {
|
|
11218
|
-
e: undefined,
|
|
11219
|
-
t: undefined,
|
|
11220
|
-
a: undefined
|
|
11221
|
-
});
|
|
11222
|
-
$8tj43$effect(() => $8tj43$setProperty(_el$6, "value", searchFieldValue()));
|
|
11223
11237
|
$8tj43$runHydrationEvents();
|
|
11224
11238
|
return _el$3;
|
|
11225
11239
|
})();
|
|
11226
11240
|
}
|
|
11227
|
-
$8tj43$delegateEvents(["click"
|
|
11241
|
+
$8tj43$delegateEvents(["click"]);
|
|
11228
11242
|
var $fac58b5610eec6a9$var$_tmpl$ = /*#__PURE__*/$8tj43$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">`);
|
|
11229
11243
|
function $fac58b5610eec6a9$export$8d8893ffd8aca39a() {
|
|
11230
11244
|
return $8tj43$getNextElement($fac58b5610eec6a9$var$_tmpl$);
|
|
@@ -11254,7 +11268,7 @@ function $a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
11254
11268
|
}
|
|
11255
11269
|
var $40411f2ec772c376$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=discover-more><button class=major type=button>`),
|
|
11256
11270
|
$40411f2ec772c376$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<b>`),
|
|
11257
|
-
$40411f2ec772c376$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11271
|
+
$40411f2ec772c376$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11258
11272
|
$40411f2ec772c376$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11259
11273
|
/**
|
|
11260
11274
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
@@ -11403,7 +11417,8 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
11403
11417
|
const [start, end] = selected_text_range_;
|
|
11404
11418
|
if (start === null || end === null) return;
|
|
11405
11419
|
input_el.setSelectionRange(start, end);
|
|
11406
|
-
}
|
|
11420
|
+
},
|
|
11421
|
+
setSearchRoleOnContainer_: false
|
|
11407
11422
|
});
|
|
11408
11423
|
const modal_element = (() => {
|
|
11409
11424
|
var _el$4 = $8tj43$getNextElement($40411f2ec772c376$var$_tmpl$3),
|
|
@@ -11863,6 +11878,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
11863
11878
|
return urlObject.href;
|
|
11864
11879
|
});
|
|
11865
11880
|
const [isSelected, selectedDueToKeyboardNavigation] = $d0883254246d3eb6$export$fb40a80c530e5f2b(read_selected_index_, itemIndex_, () => index);
|
|
11881
|
+
const wholeTextToDisplay = $8tj43$createMemo(() => item().title_);
|
|
11866
11882
|
return (() => {
|
|
11867
11883
|
var _el$7 = $8tj43$getNextElement($5175a47d13b7c228$var$_tmpl$2);
|
|
11868
11884
|
$8tj43$use(element => {
|
|
@@ -11887,20 +11903,21 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
11887
11903
|
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$catchify1(() => write_selected_index_([itemIndex_(), index])));
|
|
11888
11904
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
11889
11905
|
class_: "title line-clamp",
|
|
11890
|
-
|
|
11891
|
-
return $8tj43$createMemo(() => item().title_);
|
|
11892
|
-
},
|
|
11906
|
+
whole_text_to_display_: wholeTextToDisplay,
|
|
11893
11907
|
searching_for_value_: searching_for_value_
|
|
11894
11908
|
}));
|
|
11895
11909
|
$8tj43$effect(_p$ => {
|
|
11896
11910
|
var _v$ = !!isSelected(),
|
|
11897
|
-
_v$2 = href()
|
|
11911
|
+
_v$2 = href(),
|
|
11912
|
+
_v$3 = wholeTextToDisplay();
|
|
11898
11913
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
11899
11914
|
_v$2 !== _p$.t && $8tj43$setAttribute(_el$7, "href", _p$.t = _v$2);
|
|
11915
|
+
_v$3 !== _p$.a && $8tj43$setAttribute(_el$7, "aria-label", _p$.a = _v$3);
|
|
11900
11916
|
return _p$;
|
|
11901
11917
|
}, {
|
|
11902
11918
|
e: undefined,
|
|
11903
|
-
t: undefined
|
|
11919
|
+
t: undefined,
|
|
11920
|
+
a: undefined
|
|
11904
11921
|
});
|
|
11905
11922
|
return _el$7;
|
|
11906
11923
|
})();
|
|
@@ -12092,7 +12109,7 @@ var $06fcd2a345efd24d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=inst
|
|
|
12092
12109
|
$06fcd2a345efd24d$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<div class=discover-more><button class=major type=button>`),
|
|
12093
12110
|
$06fcd2a345efd24d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<b>`),
|
|
12094
12111
|
$06fcd2a345efd24d$var$_tmpl$6 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal-backdrop>`),
|
|
12095
|
-
$06fcd2a345efd24d$var$_tmpl$7 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12112
|
+
$06fcd2a345efd24d$var$_tmpl$7 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12096
12113
|
$06fcd2a345efd24d$var$_tmpl$8 = /*#__PURE__*/$8tj43$template(`<div class=left>`),
|
|
12097
12114
|
$06fcd2a345efd24d$var$_tmpl$9 = /*#__PURE__*/$8tj43$template(`<div class=right>`);
|
|
12098
12115
|
/**
|
|
@@ -12342,6 +12359,9 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12342
12359
|
aspectRatio: 1,
|
|
12343
12360
|
get ["class"]() {
|
|
12344
12361
|
return props.class_;
|
|
12362
|
+
},
|
|
12363
|
+
imgProps: {
|
|
12364
|
+
alt: "Product image"
|
|
12345
12365
|
}
|
|
12346
12366
|
}),
|
|
12347
12367
|
...instant_results_options_
|
|
@@ -12447,7 +12467,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12447
12467
|
const [start, end] = selected_text_range_;
|
|
12448
12468
|
if (start === null || end === null) return;
|
|
12449
12469
|
input_el.setSelectionRange(start, end);
|
|
12450
|
-
}
|
|
12470
|
+
},
|
|
12471
|
+
setSearchRoleOnContainer_: false
|
|
12451
12472
|
});
|
|
12452
12473
|
if (setSearchFieldOuterWidth_) {
|
|
12453
12474
|
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|