@depict-ai/ui 4.9.3 → 4.9.5
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 +69 -20
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +69 -20
- package/latest/index.cjs +69 -20
- package/latest/index.d.ts +1 -1
- package/latest/index.js +69 -20
- package/package.json +1 -1
- package/server/ES10/index.cjs +19 -12
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +19 -12
- package/server/latest/index.cjs +19 -12
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +19 -12
package/ES10/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ var $52FdA$solidjsweb = require("solid-js/web");
|
|
|
3
3
|
var $52FdA$solidjs = require("solid-js");
|
|
4
4
|
var $52FdA$depictaiutilisharedlatest = require("@depict-ai/utilishared/ES10");
|
|
5
5
|
var $52FdA$solidjsstore = require("solid-js/store");
|
|
6
|
+
var $52FdA$depictaiutilisharedsrc = require("@depict-ai/utilishared/src/ES10");
|
|
6
7
|
var $52FdA$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
7
8
|
var $52FdA$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
8
9
|
var $52FdA$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
@@ -115,7 +116,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
116
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
117
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
118
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.
|
|
119
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.5";
|
|
119
120
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
120
121
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
121
122
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -8016,6 +8017,21 @@ function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
|
|
|
8016
8017
|
customUrls: $f3db423dc84bc35d$var$customUrls
|
|
8017
8018
|
}));
|
|
8018
8019
|
}
|
|
8020
|
+
let $8e8c89c02c16dc7b$var$cachedHlsModule;
|
|
8021
|
+
async function $8e8c89c02c16dc7b$export$5d2f6cd705125cd3() {
|
|
8022
|
+
if ($8e8c89c02c16dc7b$var$cachedHlsModule) return $8e8c89c02c16dc7b$var$cachedHlsModule;
|
|
8023
|
+
const global_var_name = "_depict_ai_hls_polyfill";
|
|
8024
|
+
const scriptTag = document.createElement("script");
|
|
8025
|
+
scriptTag.type = "module";
|
|
8026
|
+
// Our build systems aren't set-up for dynamic imports, so do this instead
|
|
8027
|
+
scriptTag.append('import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.'.concat(global_var_name, "=m)"));
|
|
8028
|
+
document.head.append(scriptTag);
|
|
8029
|
+
const hlsModule = await $52FdA$depictaiutilisharedsrc.is_available_in(window, global_var_name);
|
|
8030
|
+
delete window[global_var_name];
|
|
8031
|
+
scriptTag.remove();
|
|
8032
|
+
$8e8c89c02c16dc7b$var$cachedHlsModule = hlsModule;
|
|
8033
|
+
return hlsModule;
|
|
8034
|
+
}
|
|
8019
8035
|
var $c19709057a32b2e7$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<video loop class=d-standard-content>`);
|
|
8020
8036
|
function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
8021
8037
|
let {
|
|
@@ -8087,13 +8103,24 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
|
|
|
8087
8103
|
when: type_ === "video",
|
|
8088
8104
|
get children() {
|
|
8089
8105
|
var _el$ = $52FdA$solidjsweb.getNextElement($c19709057a32b2e7$var$_tmpl$);
|
|
8090
|
-
$52FdA$
|
|
8106
|
+
var _ref$ = $52FdA$depictaiutilisharedlatest.catchify(async element => {
|
|
8091
8107
|
const pageVisible = $e7a7d2fe8a8217d8$export$54299a3c81f5425();
|
|
8108
|
+
const owner = $52FdA$solidjs.getOwner();
|
|
8092
8109
|
element.addEventListener("loadedmetadata", $52FdA$depictaiutilisharedlatest.catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
|
|
8093
|
-
|
|
8110
|
+
// If hls is not supported, dynamically import hls.js as polyfill
|
|
8111
|
+
if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
|
|
8112
|
+
const hlsJs = await $8e8c89c02c16dc7b$export$5d2f6cd705125cd3().catch(e => $52FdA$depictaiutilisharedlatest.report([e, "Failed to load hls.js"], "error"));
|
|
8113
|
+
if (!hlsJs || !hlsJs.isSupported()) return;
|
|
8114
|
+
const hls = new hlsJs.default();
|
|
8115
|
+
hls.loadSource(mediaUrl_);
|
|
8116
|
+
hls.attachMedia(element);
|
|
8117
|
+
}
|
|
8118
|
+
// need runWithOwner for createEffect, because we potentially awaited above
|
|
8119
|
+
$52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.createEffect(() => {
|
|
8094
8120
|
if (pageVisible()) element.play().catch(e => $52FdA$depictaiutilishared.dlog("Failed to play", e));else element.pause();
|
|
8095
|
-
});
|
|
8096
|
-
}
|
|
8121
|
+
}));
|
|
8122
|
+
});
|
|
8123
|
+
typeof _ref$ === "function" && $52FdA$solidjsweb.use(_ref$, _el$);
|
|
8097
8124
|
_el$.addEventListener("playing", () => setHasLoaded(true));
|
|
8098
8125
|
$52FdA$solidjsweb.setAttribute(_el$, "src", mediaUrl_);
|
|
8099
8126
|
$52FdA$solidjsweb.setProperty(_el$, "controls", false);
|
|
@@ -10090,15 +10117,18 @@ const $82d079b68975fbf7$export$b05c0ae390cf3e06 = _ref => {
|
|
|
10090
10117
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
10091
10118
|
var _v$ = href(),
|
|
10092
10119
|
_v$2 = display_.search_result_id,
|
|
10093
|
-
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected())
|
|
10120
|
+
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected()),
|
|
10121
|
+
_v$4 = isSelected === null || isSelected === void 0 ? void 0 : isSelected();
|
|
10094
10122
|
_v$ !== _p$.e && $52FdA$solidjsweb.setAttribute(_el$4, "href", _p$.e = _v$);
|
|
10095
10123
|
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$4, "data-search-result-id", _p$.t = _v$2);
|
|
10096
10124
|
_v$3 !== _p$.a && _el$4.classList.toggle("selected", _p$.a = _v$3);
|
|
10125
|
+
_v$4 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$4, "aria-selected", _p$.o = _v$4);
|
|
10097
10126
|
return _p$;
|
|
10098
10127
|
}, {
|
|
10099
10128
|
e: undefined,
|
|
10100
10129
|
t: undefined,
|
|
10101
|
-
a: undefined
|
|
10130
|
+
a: undefined,
|
|
10131
|
+
o: undefined
|
|
10102
10132
|
});
|
|
10103
10133
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
10104
10134
|
return _el$4;
|
|
@@ -11104,7 +11134,8 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11104
11134
|
BackIcon_: BackIcon_,
|
|
11105
11135
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
11106
11136
|
class_: class_,
|
|
11107
|
-
setSearchRoleOnContainer_ = true
|
|
11137
|
+
setSearchRoleOnContainer_ = true,
|
|
11138
|
+
ariaControls: ariaControls
|
|
11108
11139
|
} = _ref;
|
|
11109
11140
|
let input_element;
|
|
11110
11141
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -11324,7 +11355,11 @@ function $29e5dbeb69da7a36$export$b94867ecbd698f21(_ref) {
|
|
|
11324
11355
|
},
|
|
11325
11356
|
get placeholder() {
|
|
11326
11357
|
return i18n_.placeholder_text_();
|
|
11327
|
-
}
|
|
11358
|
+
},
|
|
11359
|
+
"aria-autocomplete": "list",
|
|
11360
|
+
"aria-haspopup": "dialog"
|
|
11361
|
+
}, ariaControls && {
|
|
11362
|
+
"aria-controls": ariaControls
|
|
11328
11363
|
}), false, false);
|
|
11329
11364
|
$52FdA$solidjsweb.insert(_el$5, !isNewModal && $52FdA$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
11330
11365
|
$52FdA$solidjsweb.insert(_el$3, isNewModal && $52FdA$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -11373,8 +11408,8 @@ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
11373
11408
|
}
|
|
11374
11409
|
var $9035b24c2dbd3f36$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
11375
11410
|
$9035b24c2dbd3f36$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
11376
|
-
$9035b24c2dbd3f36$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11377
|
-
$9035b24c2dbd3f36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11411
|
+
$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><!$><!/>`),
|
|
11412
|
+
$9035b24c2dbd3f36$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="depict plp search"role=dialog><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11378
11413
|
/**
|
|
11379
11414
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
11380
11415
|
*/
|
|
@@ -11523,7 +11558,8 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
|
|
|
11523
11558
|
if (start === null || end === null) return;
|
|
11524
11559
|
input_el.setSelectionRange(start, end);
|
|
11525
11560
|
},
|
|
11526
|
-
setSearchRoleOnContainer_: false
|
|
11561
|
+
setSearchRoleOnContainer_: false,
|
|
11562
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
11527
11563
|
});
|
|
11528
11564
|
const modal_element = (() => {
|
|
11529
11565
|
var _el$4 = $52FdA$solidjsweb.getNextElement($9035b24c2dbd3f36$var$_tmpl$3),
|
|
@@ -11779,7 +11815,16 @@ function $d1e7b96fb13cd1d3$export$67152d26d4f56ee8(_ref) {
|
|
|
11779
11815
|
});
|
|
11780
11816
|
}
|
|
11781
11817
|
}));
|
|
11782
|
-
$52FdA$solidjsweb.effect(
|
|
11818
|
+
$52FdA$solidjsweb.effect(_p$ => {
|
|
11819
|
+
var _v$ = !!isSelected(),
|
|
11820
|
+
_v$2 = isSelected();
|
|
11821
|
+
_v$ !== _p$.e && _el$2.classList.toggle("selected", _p$.e = _v$);
|
|
11822
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$2, "aria-selected", _p$.t = _v$2);
|
|
11823
|
+
return _p$;
|
|
11824
|
+
}, {
|
|
11825
|
+
e: undefined,
|
|
11826
|
+
t: undefined
|
|
11827
|
+
});
|
|
11783
11828
|
$52FdA$solidjsweb.runHydrationEvents();
|
|
11784
11829
|
return _el$2;
|
|
11785
11830
|
})();
|
|
@@ -12013,16 +12058,19 @@ function $79a8fa74cb5cdfb9$export$d4994a86c6235f72(_ref) {
|
|
|
12013
12058
|
}));
|
|
12014
12059
|
$52FdA$solidjsweb.effect(_p$ => {
|
|
12015
12060
|
var _v$ = !!isSelected(),
|
|
12016
|
-
_v$2 =
|
|
12017
|
-
_v$3 =
|
|
12061
|
+
_v$2 = isSelected(),
|
|
12062
|
+
_v$3 = href(),
|
|
12063
|
+
_v$4 = wholeTextToDisplay();
|
|
12018
12064
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
12019
|
-
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$7, "
|
|
12020
|
-
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$7, "
|
|
12065
|
+
_v$2 !== _p$.t && $52FdA$solidjsweb.setAttribute(_el$7, "aria-selected", _p$.t = _v$2);
|
|
12066
|
+
_v$3 !== _p$.a && $52FdA$solidjsweb.setAttribute(_el$7, "href", _p$.a = _v$3);
|
|
12067
|
+
_v$4 !== _p$.o && $52FdA$solidjsweb.setAttribute(_el$7, "aria-label", _p$.o = _v$4);
|
|
12021
12068
|
return _p$;
|
|
12022
12069
|
}, {
|
|
12023
12070
|
e: undefined,
|
|
12024
12071
|
t: undefined,
|
|
12025
|
-
a: undefined
|
|
12072
|
+
a: undefined,
|
|
12073
|
+
o: undefined
|
|
12026
12074
|
});
|
|
12027
12075
|
return _el$7;
|
|
12028
12076
|
})();
|
|
@@ -12214,7 +12262,7 @@ var $43600b30502feeda$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div
|
|
|
12214
12262
|
$43600b30502feeda$var$_tmpl$4 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
12215
12263
|
$43600b30502feeda$var$_tmpl$5 = /*#__PURE__*/$52FdA$solidjsweb.template(`<b>`),
|
|
12216
12264
|
$43600b30502feeda$var$_tmpl$6 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal-backdrop>`),
|
|
12217
|
-
$43600b30502feeda$var$_tmpl$7 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12265
|
+
$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><!$><!/>`),
|
|
12218
12266
|
$43600b30502feeda$var$_tmpl$8 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=left>`),
|
|
12219
12267
|
$43600b30502feeda$var$_tmpl$9 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=right>`);
|
|
12220
12268
|
/**
|
|
@@ -12573,7 +12621,8 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
|
|
|
12573
12621
|
if (start === null || end === null) return;
|
|
12574
12622
|
input_el.setSelectionRange(start, end);
|
|
12575
12623
|
},
|
|
12576
|
-
setSearchRoleOnContainer_: false
|
|
12624
|
+
setSearchRoleOnContainer_: false,
|
|
12625
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
12577
12626
|
});
|
|
12578
12627
|
if (setSearchFieldOuterWidth_) {
|
|
12579
12628
|
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.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
package/ES10/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { template as $8tj43$template, createComponent as $8tj43$createComponent,
|
|
|
3
3
|
import { createContext as $8tj43$createContext, createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, untrack as $8tj43$untrack, createRoot as $8tj43$createRoot, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, Show as $8tj43$Show, createComputed as $8tj43$createComputed, createRenderEffect as $8tj43$createRenderEffect, mergeProps as $8tj43$mergeProps, useContext as $8tj43$useContext, createReaction as $8tj43$createReaction, on as $8tj43$on, Suspense as $8tj43$Suspense, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, mapArray as $8tj43$mapArray, batch as $8tj43$batch, Switch as $8tj43$Switch, Match as $8tj43$Match, splitProps as $8tj43$splitProps, createComponent as $8tj43$createComponent1, createSelector as $8tj43$createSelector, children as $8tj43$children } from "solid-js";
|
|
4
4
|
import { catchify as $8tj43$catchify, report as $8tj43$report, use_href_accessor as $8tj43$use_href_accessor, dlog as $8tj43$dlog1, ListenableSet as $8tj43$ListenableSet, queueMacroTask as $8tj43$queueMacroTask1 } from "@depict-ai/utilishared/ES10";
|
|
5
5
|
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
6
|
+
import { is_available_in as $8tj43$is_available_in } from "@depict-ai/utilishared/src/ES10";
|
|
6
7
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
8
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
8
9
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -10,7 +11,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
10
11
|
/*! Depict.ai search and product listing SDK */
|
|
11
12
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
13
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.
|
|
14
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.5";
|
|
14
15
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
16
|
const signal = $8tj43$createSignal(false);
|
|
16
17
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -7911,6 +7912,21 @@ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
|
|
|
7911
7912
|
customUrls: $98688279b9059f50$var$customUrls
|
|
7912
7913
|
}));
|
|
7913
7914
|
}
|
|
7915
|
+
let $e92c154db502596d$var$cachedHlsModule;
|
|
7916
|
+
async function $e92c154db502596d$export$5d2f6cd705125cd3() {
|
|
7917
|
+
if ($e92c154db502596d$var$cachedHlsModule) return $e92c154db502596d$var$cachedHlsModule;
|
|
7918
|
+
const global_var_name = "_depict_ai_hls_polyfill";
|
|
7919
|
+
const scriptTag = document.createElement("script");
|
|
7920
|
+
scriptTag.type = "module";
|
|
7921
|
+
// Our build systems aren't set-up for dynamic imports, so do this instead
|
|
7922
|
+
scriptTag.append('import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.'.concat(global_var_name, "=m)"));
|
|
7923
|
+
document.head.append(scriptTag);
|
|
7924
|
+
const hlsModule = await $8tj43$is_available_in(window, global_var_name);
|
|
7925
|
+
delete window[global_var_name];
|
|
7926
|
+
scriptTag.remove();
|
|
7927
|
+
$e92c154db502596d$var$cachedHlsModule = hlsModule;
|
|
7928
|
+
return hlsModule;
|
|
7929
|
+
}
|
|
7914
7930
|
var $3b772ef9a35560fe$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<video loop class=d-standard-content>`);
|
|
7915
7931
|
function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
7916
7932
|
let {
|
|
@@ -7982,13 +7998,24 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
|
|
|
7982
7998
|
when: type_ === "video",
|
|
7983
7999
|
get children() {
|
|
7984
8000
|
var _el$ = $8tj43$getNextElement($3b772ef9a35560fe$var$_tmpl$);
|
|
7985
|
-
$8tj43$
|
|
8001
|
+
var _ref$ = $8tj43$catchify(async element => {
|
|
7986
8002
|
const pageVisible = $a35e6f680c5bbc60$export$54299a3c81f5425();
|
|
8003
|
+
const owner = $8tj43$getOwner();
|
|
7987
8004
|
element.addEventListener("loadedmetadata", $8tj43$catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
|
|
7988
|
-
|
|
8005
|
+
// If hls is not supported, dynamically import hls.js as polyfill
|
|
8006
|
+
if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
|
|
8007
|
+
const hlsJs = await $e92c154db502596d$export$5d2f6cd705125cd3().catch(e => $8tj43$report([e, "Failed to load hls.js"], "error"));
|
|
8008
|
+
if (!hlsJs || !hlsJs.isSupported()) return;
|
|
8009
|
+
const hls = new hlsJs.default();
|
|
8010
|
+
hls.loadSource(mediaUrl_);
|
|
8011
|
+
hls.attachMedia(element);
|
|
8012
|
+
}
|
|
8013
|
+
// need runWithOwner for createEffect, because we potentially awaited above
|
|
8014
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createEffect(() => {
|
|
7989
8015
|
if (pageVisible()) element.play().catch(e => $8tj43$dlog("Failed to play", e));else element.pause();
|
|
7990
|
-
});
|
|
7991
|
-
}
|
|
8016
|
+
}));
|
|
8017
|
+
});
|
|
8018
|
+
typeof _ref$ === "function" && $8tj43$use(_ref$, _el$);
|
|
7992
8019
|
_el$.addEventListener("playing", () => setHasLoaded(true));
|
|
7993
8020
|
$8tj43$setAttribute(_el$, "src", mediaUrl_);
|
|
7994
8021
|
$8tj43$setProperty(_el$, "controls", false);
|
|
@@ -9985,15 +10012,18 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = _ref => {
|
|
|
9985
10012
|
$8tj43$effect(_p$ => {
|
|
9986
10013
|
var _v$ = href(),
|
|
9987
10014
|
_v$2 = display_.search_result_id,
|
|
9988
|
-
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected())
|
|
10015
|
+
_v$3 = !!(isSelected !== null && isSelected !== void 0 && isSelected()),
|
|
10016
|
+
_v$4 = isSelected === null || isSelected === void 0 ? void 0 : isSelected();
|
|
9989
10017
|
_v$ !== _p$.e && $8tj43$setAttribute(_el$4, "href", _p$.e = _v$);
|
|
9990
10018
|
_v$2 !== _p$.t && $8tj43$setAttribute(_el$4, "data-search-result-id", _p$.t = _v$2);
|
|
9991
10019
|
_v$3 !== _p$.a && _el$4.classList.toggle("selected", _p$.a = _v$3);
|
|
10020
|
+
_v$4 !== _p$.o && $8tj43$setAttribute(_el$4, "aria-selected", _p$.o = _v$4);
|
|
9992
10021
|
return _p$;
|
|
9993
10022
|
}, {
|
|
9994
10023
|
e: undefined,
|
|
9995
10024
|
t: undefined,
|
|
9996
|
-
a: undefined
|
|
10025
|
+
a: undefined,
|
|
10026
|
+
o: undefined
|
|
9997
10027
|
});
|
|
9998
10028
|
$8tj43$runHydrationEvents();
|
|
9999
10029
|
return _el$4;
|
|
@@ -10999,7 +11029,8 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
10999
11029
|
BackIcon_: BackIcon_,
|
|
11000
11030
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
11001
11031
|
class_: class_,
|
|
11002
|
-
setSearchRoleOnContainer_ = true
|
|
11032
|
+
setSearchRoleOnContainer_ = true,
|
|
11033
|
+
ariaControls: ariaControls
|
|
11003
11034
|
} = _ref;
|
|
11004
11035
|
let input_element;
|
|
11005
11036
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -11219,7 +11250,11 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
11219
11250
|
},
|
|
11220
11251
|
get placeholder() {
|
|
11221
11252
|
return i18n_.placeholder_text_();
|
|
11222
|
-
}
|
|
11253
|
+
},
|
|
11254
|
+
"aria-autocomplete": "list",
|
|
11255
|
+
"aria-haspopup": "dialog"
|
|
11256
|
+
}, ariaControls && {
|
|
11257
|
+
"aria-controls": ariaControls
|
|
11223
11258
|
}), false, false);
|
|
11224
11259
|
$8tj43$insert(_el$5, !isNewModal && $8tj43$createComponent(ClearButton, {}), _el$10, _co$2);
|
|
11225
11260
|
$8tj43$insert(_el$3, isNewModal && $8tj43$createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -11268,8 +11303,8 @@ function $a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
11268
11303
|
}
|
|
11269
11304
|
var $40411f2ec772c376$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=discover-more><button class=major type=button>`),
|
|
11270
11305
|
$40411f2ec772c376$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<b>`),
|
|
11271
|
-
$40411f2ec772c376$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
11272
|
-
$40411f2ec772c376$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11306
|
+
$40411f2ec772c376$var$_tmpl$3 = /*#__PURE__*/$8tj43$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><!$><!/>`),
|
|
11307
|
+
$40411f2ec772c376$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<div class="depict plp search"role=dialog><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
11273
11308
|
/**
|
|
11274
11309
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
11275
11310
|
*/
|
|
@@ -11418,7 +11453,8 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
11418
11453
|
if (start === null || end === null) return;
|
|
11419
11454
|
input_el.setSelectionRange(start, end);
|
|
11420
11455
|
},
|
|
11421
|
-
setSearchRoleOnContainer_: false
|
|
11456
|
+
setSearchRoleOnContainer_: false,
|
|
11457
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
11422
11458
|
});
|
|
11423
11459
|
const modal_element = (() => {
|
|
11424
11460
|
var _el$4 = $8tj43$getNextElement($40411f2ec772c376$var$_tmpl$3),
|
|
@@ -11674,7 +11710,16 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
11674
11710
|
});
|
|
11675
11711
|
}
|
|
11676
11712
|
}));
|
|
11677
|
-
$8tj43$effect(
|
|
11713
|
+
$8tj43$effect(_p$ => {
|
|
11714
|
+
var _v$ = !!isSelected(),
|
|
11715
|
+
_v$2 = isSelected();
|
|
11716
|
+
_v$ !== _p$.e && _el$2.classList.toggle("selected", _p$.e = _v$);
|
|
11717
|
+
_v$2 !== _p$.t && $8tj43$setAttribute(_el$2, "aria-selected", _p$.t = _v$2);
|
|
11718
|
+
return _p$;
|
|
11719
|
+
}, {
|
|
11720
|
+
e: undefined,
|
|
11721
|
+
t: undefined
|
|
11722
|
+
});
|
|
11678
11723
|
$8tj43$runHydrationEvents();
|
|
11679
11724
|
return _el$2;
|
|
11680
11725
|
})();
|
|
@@ -11908,16 +11953,19 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
11908
11953
|
}));
|
|
11909
11954
|
$8tj43$effect(_p$ => {
|
|
11910
11955
|
var _v$ = !!isSelected(),
|
|
11911
|
-
_v$2 =
|
|
11912
|
-
_v$3 =
|
|
11956
|
+
_v$2 = isSelected(),
|
|
11957
|
+
_v$3 = href(),
|
|
11958
|
+
_v$4 = wholeTextToDisplay();
|
|
11913
11959
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
11914
|
-
_v$2 !== _p$.t && $8tj43$setAttribute(_el$7, "
|
|
11915
|
-
_v$3 !== _p$.a && $8tj43$setAttribute(_el$7, "
|
|
11960
|
+
_v$2 !== _p$.t && $8tj43$setAttribute(_el$7, "aria-selected", _p$.t = _v$2);
|
|
11961
|
+
_v$3 !== _p$.a && $8tj43$setAttribute(_el$7, "href", _p$.a = _v$3);
|
|
11962
|
+
_v$4 !== _p$.o && $8tj43$setAttribute(_el$7, "aria-label", _p$.o = _v$4);
|
|
11916
11963
|
return _p$;
|
|
11917
11964
|
}, {
|
|
11918
11965
|
e: undefined,
|
|
11919
11966
|
t: undefined,
|
|
11920
|
-
a: undefined
|
|
11967
|
+
a: undefined,
|
|
11968
|
+
o: undefined
|
|
11921
11969
|
});
|
|
11922
11970
|
return _el$7;
|
|
11923
11971
|
})();
|
|
@@ -12109,7 +12157,7 @@ var $06fcd2a345efd24d$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=inst
|
|
|
12109
12157
|
$06fcd2a345efd24d$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<div class=discover-more><button class=major type=button>`),
|
|
12110
12158
|
$06fcd2a345efd24d$var$_tmpl$5 = /*#__PURE__*/$8tj43$template(`<b>`),
|
|
12111
12159
|
$06fcd2a345efd24d$var$_tmpl$6 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal-backdrop>`),
|
|
12112
|
-
$06fcd2a345efd24d$var$_tmpl$7 = /*#__PURE__*/$8tj43$template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
12160
|
+
$06fcd2a345efd24d$var$_tmpl$7 = /*#__PURE__*/$8tj43$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><!$><!/>`),
|
|
12113
12161
|
$06fcd2a345efd24d$var$_tmpl$8 = /*#__PURE__*/$8tj43$template(`<div class=left>`),
|
|
12114
12162
|
$06fcd2a345efd24d$var$_tmpl$9 = /*#__PURE__*/$8tj43$template(`<div class=right>`);
|
|
12115
12163
|
/**
|
|
@@ -12468,7 +12516,8 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
12468
12516
|
if (start === null || end === null) return;
|
|
12469
12517
|
input_el.setSelectionRange(start, end);
|
|
12470
12518
|
},
|
|
12471
|
-
setSearchRoleOnContainer_: false
|
|
12519
|
+
setSearchRoleOnContainer_: false,
|
|
12520
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
12472
12521
|
});
|
|
12473
12522
|
if (setSearchFieldOuterWidth_) {
|
|
12474
12523
|
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
package/latest/index.cjs
CHANGED
|
@@ -3,6 +3,7 @@ var $gVhhF$solidjsweb = require("solid-js/web");
|
|
|
3
3
|
var $gVhhF$solidjs = require("solid-js");
|
|
4
4
|
var $gVhhF$depictaiutilisharedlatest = require("@depict-ai/utilishared/latest");
|
|
5
5
|
var $gVhhF$solidjsstore = require("solid-js/store");
|
|
6
|
+
var $gVhhF$depictaiutilisharedsrc = require("@depict-ai/utilishared/src/latest");
|
|
6
7
|
require("../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
7
8
|
function $parcel$export(e, n, v, s) {
|
|
8
9
|
Object.defineProperty(e, n, {
|
|
@@ -109,7 +110,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
109
110
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
110
111
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
111
112
|
/*! Depict.ai search and product listing SDK */
|
|
112
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.
|
|
113
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.5";
|
|
113
114
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
114
115
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
115
116
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -7585,6 +7586,21 @@ function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
|
|
|
7585
7586
|
customUrls: $d212a67662c5cf38$var$customUrls
|
|
7586
7587
|
}));
|
|
7587
7588
|
}
|
|
7589
|
+
let $20ff40266d725403$var$cachedHlsModule;
|
|
7590
|
+
async function $20ff40266d725403$export$5d2f6cd705125cd3() {
|
|
7591
|
+
if ($20ff40266d725403$var$cachedHlsModule) return $20ff40266d725403$var$cachedHlsModule;
|
|
7592
|
+
const global_var_name = "_depict_ai_hls_polyfill";
|
|
7593
|
+
const scriptTag = document.createElement("script");
|
|
7594
|
+
scriptTag.type = "module";
|
|
7595
|
+
// Our build systems aren't set-up for dynamic imports, so do this instead
|
|
7596
|
+
scriptTag.append(`import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.${global_var_name}=m)`);
|
|
7597
|
+
document.head.append(scriptTag);
|
|
7598
|
+
const hlsModule = await $gVhhF$depictaiutilisharedsrc.is_available_in(window, global_var_name);
|
|
7599
|
+
delete window[global_var_name];
|
|
7600
|
+
scriptTag.remove();
|
|
7601
|
+
$20ff40266d725403$var$cachedHlsModule = hlsModule;
|
|
7602
|
+
return hlsModule;
|
|
7603
|
+
}
|
|
7588
7604
|
var $32c662f618f5d80d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<video loop class=d-standard-content>`);
|
|
7589
7605
|
function $32c662f618f5d80d$export$780a853d15174484({
|
|
7590
7606
|
link_: link_,
|
|
@@ -7649,13 +7665,24 @@ function $32c662f618f5d80d$export$780a853d15174484({
|
|
|
7649
7665
|
when: type_ === "video",
|
|
7650
7666
|
get children() {
|
|
7651
7667
|
var _el$ = $gVhhF$solidjsweb.getNextElement($32c662f618f5d80d$var$_tmpl$);
|
|
7652
|
-
$gVhhF$
|
|
7668
|
+
var _ref$ = $gVhhF$depictaiutilisharedlatest.catchify(async element => {
|
|
7653
7669
|
const pageVisible = $55cbacb79d3e0cea$export$54299a3c81f5425();
|
|
7670
|
+
const owner = $gVhhF$solidjs.getOwner();
|
|
7654
7671
|
element.addEventListener("loadedmetadata", $gVhhF$depictaiutilisharedlatest.catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
|
|
7655
|
-
|
|
7672
|
+
// If hls is not supported, dynamically import hls.js as polyfill
|
|
7673
|
+
if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
|
|
7674
|
+
const hlsJs = await $20ff40266d725403$export$5d2f6cd705125cd3().catch(e => $gVhhF$depictaiutilisharedlatest.report([e, "Failed to load hls.js"], "error"));
|
|
7675
|
+
if (!hlsJs || !hlsJs.isSupported()) return;
|
|
7676
|
+
const hls = new hlsJs.default();
|
|
7677
|
+
hls.loadSource(mediaUrl_);
|
|
7678
|
+
hls.attachMedia(element);
|
|
7679
|
+
}
|
|
7680
|
+
// need runWithOwner for createEffect, because we potentially awaited above
|
|
7681
|
+
$gVhhF$solidjs.runWithOwner(owner, () => $gVhhF$solidjs.createEffect(() => {
|
|
7656
7682
|
if (pageVisible()) element.play().catch(e => $gVhhF$depictaiutilishared.dlog("Failed to play", e));else element.pause();
|
|
7657
|
-
});
|
|
7658
|
-
}
|
|
7683
|
+
}));
|
|
7684
|
+
});
|
|
7685
|
+
typeof _ref$ === "function" && $gVhhF$solidjsweb.use(_ref$, _el$);
|
|
7659
7686
|
_el$.addEventListener("playing", () => setHasLoaded(true));
|
|
7660
7687
|
$gVhhF$solidjsweb.setAttribute(_el$, "src", mediaUrl_);
|
|
7661
7688
|
$gVhhF$solidjsweb.setProperty(_el$, "controls", false);
|
|
@@ -9534,15 +9561,18 @@ const $6ae613870d3380fc$export$b05c0ae390cf3e06 = ({
|
|
|
9534
9561
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
9535
9562
|
var _v$ = href(),
|
|
9536
9563
|
_v$2 = display_.search_result_id,
|
|
9537
|
-
_v$3 = !!isSelected?.()
|
|
9564
|
+
_v$3 = !!isSelected?.(),
|
|
9565
|
+
_v$4 = isSelected?.();
|
|
9538
9566
|
_v$ !== _p$.e && $gVhhF$solidjsweb.setAttribute(_el$4, "href", _p$.e = _v$);
|
|
9539
9567
|
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$4, "data-search-result-id", _p$.t = _v$2);
|
|
9540
9568
|
_v$3 !== _p$.a && _el$4.classList.toggle("selected", _p$.a = _v$3);
|
|
9569
|
+
_v$4 !== _p$.o && $gVhhF$solidjsweb.setAttribute(_el$4, "aria-selected", _p$.o = _v$4);
|
|
9541
9570
|
return _p$;
|
|
9542
9571
|
}, {
|
|
9543
9572
|
e: undefined,
|
|
9544
9573
|
t: undefined,
|
|
9545
|
-
a: undefined
|
|
9574
|
+
a: undefined,
|
|
9575
|
+
o: undefined
|
|
9546
9576
|
});
|
|
9547
9577
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
9548
9578
|
return _el$4;
|
|
@@ -10495,7 +10525,8 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
10495
10525
|
BackIcon_: BackIcon_,
|
|
10496
10526
|
buttonInFieldRef_: buttonInFieldRef_,
|
|
10497
10527
|
class_: class_,
|
|
10498
|
-
setSearchRoleOnContainer_ = true
|
|
10528
|
+
setSearchRoleOnContainer_ = true,
|
|
10529
|
+
ariaControls: ariaControls
|
|
10499
10530
|
}) {
|
|
10500
10531
|
let input_element;
|
|
10501
10532
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
@@ -10709,7 +10740,11 @@ function $66b8b9a9613c141d$export$b94867ecbd698f21({
|
|
|
10709
10740
|
},
|
|
10710
10741
|
get placeholder() {
|
|
10711
10742
|
return i18n_.placeholder_text_();
|
|
10712
|
-
}
|
|
10743
|
+
},
|
|
10744
|
+
"aria-autocomplete": "list",
|
|
10745
|
+
"aria-haspopup": "dialog"
|
|
10746
|
+
}, ariaControls && {
|
|
10747
|
+
"aria-controls": ariaControls
|
|
10713
10748
|
}), false, false);
|
|
10714
10749
|
$gVhhF$solidjsweb.insert(_el$5, !isNewModal && $gVhhF$solidjsweb.createComponent(ClearButton, {}), _el$10, _co$2);
|
|
10715
10750
|
$gVhhF$solidjsweb.insert(_el$3, isNewModal && $gVhhF$solidjsweb.createComponent(BackButton, {}), _el$17, _co$5);
|
|
@@ -10758,8 +10793,8 @@ function $eb3039a27db40508$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
10758
10793
|
}
|
|
10759
10794
|
var $44f0b2e312a9b710$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
10760
10795
|
$44f0b2e312a9b710$var$_tmpl$2 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<b>`),
|
|
10761
|
-
$44f0b2e312a9b710$var$_tmpl$3 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded><!$><!/><!$><!/><!$><!/></div><!$><!/></div><!$><!/>`),
|
|
10762
|
-
$44f0b2e312a9b710$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="depict plp search"><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
10796
|
+
$44f0b2e312a9b710$var$_tmpl$3 = /*#__PURE__*/$gVhhF$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><!$><!/>`),
|
|
10797
|
+
$44f0b2e312a9b710$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class="depict plp search"role=dialog><div class=depict-search-modal-backdrop></div><!$><!/>`);
|
|
10763
10798
|
/**
|
|
10764
10799
|
* First generation (classic) search modal - the solid component that gets added to <body> when the search modal is opened
|
|
10765
10800
|
*/
|
|
@@ -10902,7 +10937,8 @@ function $44f0b2e312a9b710$var$RawClassicSearchModal({
|
|
|
10902
10937
|
if (start === null || end === null) return;
|
|
10903
10938
|
input_el.setSelectionRange(start, end);
|
|
10904
10939
|
},
|
|
10905
|
-
setSearchRoleOnContainer_: false
|
|
10940
|
+
setSearchRoleOnContainer_: false,
|
|
10941
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
10906
10942
|
});
|
|
10907
10943
|
const modal_element = (() => {
|
|
10908
10944
|
var _el$4 = $gVhhF$solidjsweb.getNextElement($44f0b2e312a9b710$var$_tmpl$3),
|
|
@@ -11143,7 +11179,16 @@ function $1f3b5fa875714dea$export$67152d26d4f56ee8({
|
|
|
11143
11179
|
});
|
|
11144
11180
|
}
|
|
11145
11181
|
}));
|
|
11146
|
-
$gVhhF$solidjsweb.effect(
|
|
11182
|
+
$gVhhF$solidjsweb.effect(_p$ => {
|
|
11183
|
+
var _v$ = !!isSelected(),
|
|
11184
|
+
_v$2 = isSelected();
|
|
11185
|
+
_v$ !== _p$.e && _el$2.classList.toggle("selected", _p$.e = _v$);
|
|
11186
|
+
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$2, "aria-selected", _p$.t = _v$2);
|
|
11187
|
+
return _p$;
|
|
11188
|
+
}, {
|
|
11189
|
+
e: undefined,
|
|
11190
|
+
t: undefined
|
|
11191
|
+
});
|
|
11147
11192
|
$gVhhF$solidjsweb.runHydrationEvents();
|
|
11148
11193
|
return _el$2;
|
|
11149
11194
|
})();
|
|
@@ -11368,16 +11413,19 @@ function $a13dbcf80d79229c$export$d4994a86c6235f72({
|
|
|
11368
11413
|
}));
|
|
11369
11414
|
$gVhhF$solidjsweb.effect(_p$ => {
|
|
11370
11415
|
var _v$ = !!isSelected(),
|
|
11371
|
-
_v$2 =
|
|
11372
|
-
_v$3 =
|
|
11416
|
+
_v$2 = isSelected(),
|
|
11417
|
+
_v$3 = href(),
|
|
11418
|
+
_v$4 = wholeTextToDisplay();
|
|
11373
11419
|
_v$ !== _p$.e && _el$7.classList.toggle("selected", _p$.e = _v$);
|
|
11374
|
-
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$7, "
|
|
11375
|
-
_v$3 !== _p$.a && $gVhhF$solidjsweb.setAttribute(_el$7, "
|
|
11420
|
+
_v$2 !== _p$.t && $gVhhF$solidjsweb.setAttribute(_el$7, "aria-selected", _p$.t = _v$2);
|
|
11421
|
+
_v$3 !== _p$.a && $gVhhF$solidjsweb.setAttribute(_el$7, "href", _p$.a = _v$3);
|
|
11422
|
+
_v$4 !== _p$.o && $gVhhF$solidjsweb.setAttribute(_el$7, "aria-label", _p$.o = _v$4);
|
|
11376
11423
|
return _p$;
|
|
11377
11424
|
}, {
|
|
11378
11425
|
e: undefined,
|
|
11379
11426
|
t: undefined,
|
|
11380
|
-
a: undefined
|
|
11427
|
+
a: undefined,
|
|
11428
|
+
o: undefined
|
|
11381
11429
|
});
|
|
11382
11430
|
return _el$7;
|
|
11383
11431
|
})();
|
|
@@ -11565,7 +11613,7 @@ var $11597ae03e703a47$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div
|
|
|
11565
11613
|
$11597ae03e703a47$var$_tmpl$4 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=discover-more><button class=major type=button>`),
|
|
11566
11614
|
$11597ae03e703a47$var$_tmpl$5 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<b>`),
|
|
11567
11615
|
$11597ae03e703a47$var$_tmpl$6 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=depict-search-modal-backdrop>`),
|
|
11568
|
-
$11597ae03e703a47$var$_tmpl$7 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=depict-search-modal><div class=body role=search><!$><!/><div class=padded></div></div><!$><!/>`),
|
|
11616
|
+
$11597ae03e703a47$var$_tmpl$7 = /*#__PURE__*/$gVhhF$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><!$><!/>`),
|
|
11569
11617
|
$11597ae03e703a47$var$_tmpl$8 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=left>`),
|
|
11570
11618
|
$11597ae03e703a47$var$_tmpl$9 = /*#__PURE__*/$gVhhF$solidjsweb.template(`<div class=right>`);
|
|
11571
11619
|
/**
|
|
@@ -11913,7 +11961,8 @@ function $11597ae03e703a47$var$RawSearchModalV2({
|
|
|
11913
11961
|
if (start === null || end === null) return;
|
|
11914
11962
|
input_el.setSelectionRange(start, end);
|
|
11915
11963
|
},
|
|
11916
|
-
setSearchRoleOnContainer_: false
|
|
11964
|
+
setSearchRoleOnContainer_: false,
|
|
11965
|
+
ariaControls: "depict-suggestions-and-result-preview"
|
|
11917
11966
|
});
|
|
11918
11967
|
if (setSearchFieldOuterWidth_) {
|
|
11919
11968
|
const resizeObserver = new ResizeObserver($gVhhF$depictaiutilishared.catchify(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
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.5";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|