@depict-ai/ui 4.9.4 → 4.9.6

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 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.4";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.6";
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 => {
@@ -8016,6 +8016,21 @@ function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
8016
8016
  customUrls: $f3db423dc84bc35d$var$customUrls
8017
8017
  }));
8018
8018
  }
8019
+ let $8e8c89c02c16dc7b$var$cachedHlsModule;
8020
+ async function $8e8c89c02c16dc7b$export$5d2f6cd705125cd3() {
8021
+ if ($8e8c89c02c16dc7b$var$cachedHlsModule) return $8e8c89c02c16dc7b$var$cachedHlsModule;
8022
+ const global_var_name = "_depict_ai_hls_polyfill";
8023
+ const scriptTag = document.createElement("script");
8024
+ scriptTag.type = "module";
8025
+ // Our build systems aren't set-up for dynamic imports, so do this instead
8026
+ scriptTag.append('import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.'.concat(global_var_name, "=m)"));
8027
+ document.head.append(scriptTag);
8028
+ const hlsModule = await $52FdA$depictaiutilishared.is_available_in(window, global_var_name);
8029
+ delete window[global_var_name];
8030
+ scriptTag.remove();
8031
+ $8e8c89c02c16dc7b$var$cachedHlsModule = hlsModule;
8032
+ return hlsModule;
8033
+ }
8019
8034
  var $c19709057a32b2e7$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<video loop class=d-standard-content>`);
8020
8035
  function $c19709057a32b2e7$export$780a853d15174484(_ref) {
8021
8036
  let {
@@ -8087,13 +8102,24 @@ function $c19709057a32b2e7$export$780a853d15174484(_ref) {
8087
8102
  when: type_ === "video",
8088
8103
  get children() {
8089
8104
  var _el$ = $52FdA$solidjsweb.getNextElement($c19709057a32b2e7$var$_tmpl$);
8090
- $52FdA$solidjsweb.use(element => {
8105
+ var _ref$ = $52FdA$depictaiutilisharedlatest.catchify(async element => {
8091
8106
  const pageVisible = $e7a7d2fe8a8217d8$export$54299a3c81f5425();
8107
+ const owner = $52FdA$solidjs.getOwner();
8092
8108
  element.addEventListener("loadedmetadata", $52FdA$depictaiutilisharedlatest.catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
8093
- $52FdA$solidjs.createEffect(() => {
8109
+ // If hls is not supported, dynamically import hls.js as polyfill
8110
+ if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
8111
+ const hlsJs = await $8e8c89c02c16dc7b$export$5d2f6cd705125cd3().catch(e => $52FdA$depictaiutilisharedlatest.report([e, "Failed to load hls.js"], "error"));
8112
+ if (!hlsJs || !hlsJs.isSupported()) return;
8113
+ const hls = new hlsJs.default();
8114
+ hls.loadSource(mediaUrl_);
8115
+ hls.attachMedia(element);
8116
+ }
8117
+ // need runWithOwner for createEffect, because we potentially awaited above
8118
+ $52FdA$solidjs.runWithOwner(owner, () => $52FdA$solidjs.createEffect(() => {
8094
8119
  if (pageVisible()) element.play().catch(e => $52FdA$depictaiutilishared.dlog("Failed to play", e));else element.pause();
8095
- });
8096
- }, _el$);
8120
+ }));
8121
+ });
8122
+ typeof _ref$ === "function" && $52FdA$solidjsweb.use(_ref$, _el$);
8097
8123
  _el$.addEventListener("playing", () => setHasLoaded(true));
8098
8124
  $52FdA$solidjsweb.setAttribute(_el$, "src", mediaUrl_);
8099
8125
  $52FdA$solidjsweb.setProperty(_el$, "controls", false);
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.4";
14
+ export const version = "4.9.6";
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
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $8tj43$add_to_version_info, javascript_media_query as $8tj43$javascript_media_query, standard_price_format as $8tj43$standard_price_format, catchify as $8tj43$catchify1, observer as $8tj43$observer, slider_fractional_factory as $8tj43$slider_fractional_factory, report as $8tj43$report1, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, findMostFrequentItem as $8tj43$findMostFrequentItem, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, use_href_accessor as $8tj43$use_href_accessor1, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $8tj43$add_to_version_info, javascript_media_query as $8tj43$javascript_media_query, standard_price_format as $8tj43$standard_price_format, catchify as $8tj43$catchify1, observer as $8tj43$observer, slider_fractional_factory as $8tj43$slider_fractional_factory, report as $8tj43$report1, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, useExpandingContainer as $8tj43$useExpandingContainer, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, findMostFrequentItem as $8tj43$findMostFrequentItem, is_available_in as $8tj43$is_available_in, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, use_href_accessor as $8tj43$use_href_accessor1, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
2
  import { template as $8tj43$template, createComponent as $8tj43$createComponent, getNextElement as $8tj43$getNextElement, getNextMarker as $8tj43$getNextMarker, insert as $8tj43$insert, isServer as $8tj43$isServer, use as $8tj43$use, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, memo as $8tj43$memo, mergeProps as $8tj43$mergeProps1, addEventListener as $8tj43$addEventListener, runHydrationEvents as $8tj43$runHydrationEvents, delegateEvents as $8tj43$delegateEvents, spread as $8tj43$spread, classList as $8tj43$classList, className as $8tj43$className, style as $8tj43$style, Dynamic as $8tj43$Dynamic, setProperty as $8tj43$setProperty } from "solid-js/web";
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";
@@ -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.4";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.6";
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 => {
@@ -7911,6 +7911,21 @@ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
7911
7911
  customUrls: $98688279b9059f50$var$customUrls
7912
7912
  }));
7913
7913
  }
7914
+ let $e92c154db502596d$var$cachedHlsModule;
7915
+ async function $e92c154db502596d$export$5d2f6cd705125cd3() {
7916
+ if ($e92c154db502596d$var$cachedHlsModule) return $e92c154db502596d$var$cachedHlsModule;
7917
+ const global_var_name = "_depict_ai_hls_polyfill";
7918
+ const scriptTag = document.createElement("script");
7919
+ scriptTag.type = "module";
7920
+ // Our build systems aren't set-up for dynamic imports, so do this instead
7921
+ scriptTag.append('import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.'.concat(global_var_name, "=m)"));
7922
+ document.head.append(scriptTag);
7923
+ const hlsModule = await $8tj43$is_available_in(window, global_var_name);
7924
+ delete window[global_var_name];
7925
+ scriptTag.remove();
7926
+ $e92c154db502596d$var$cachedHlsModule = hlsModule;
7927
+ return hlsModule;
7928
+ }
7914
7929
  var $3b772ef9a35560fe$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<video loop class=d-standard-content>`);
7915
7930
  function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
7916
7931
  let {
@@ -7982,13 +7997,24 @@ function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
7982
7997
  when: type_ === "video",
7983
7998
  get children() {
7984
7999
  var _el$ = $8tj43$getNextElement($3b772ef9a35560fe$var$_tmpl$);
7985
- $8tj43$use(element => {
8000
+ var _ref$ = $8tj43$catchify(async element => {
7986
8001
  const pageVisible = $a35e6f680c5bbc60$export$54299a3c81f5425();
8002
+ const owner = $8tj43$getOwner();
7987
8003
  element.addEventListener("loadedmetadata", $8tj43$catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
7988
- $8tj43$createEffect(() => {
8004
+ // If hls is not supported, dynamically import hls.js as polyfill
8005
+ if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
8006
+ const hlsJs = await $e92c154db502596d$export$5d2f6cd705125cd3().catch(e => $8tj43$report([e, "Failed to load hls.js"], "error"));
8007
+ if (!hlsJs || !hlsJs.isSupported()) return;
8008
+ const hls = new hlsJs.default();
8009
+ hls.loadSource(mediaUrl_);
8010
+ hls.attachMedia(element);
8011
+ }
8012
+ // need runWithOwner for createEffect, because we potentially awaited above
8013
+ $8tj43$runWithOwner(owner, () => $8tj43$createEffect(() => {
7989
8014
  if (pageVisible()) element.play().catch(e => $8tj43$dlog("Failed to play", e));else element.pause();
7990
- });
7991
- }, _el$);
8015
+ }));
8016
+ });
8017
+ typeof _ref$ === "function" && $8tj43$use(_ref$, _el$);
7992
8018
  _el$.addEventListener("playing", () => setHasLoaded(true));
7993
8019
  $8tj43$setAttribute(_el$, "src", mediaUrl_);
7994
8020
  $8tj43$setProperty(_el$, "controls", false);
package/latest/index.cjs CHANGED
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.4";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.6";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $gVhhF$solidjs.createSignal(false);
115
115
  $gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
@@ -7585,6 +7585,21 @@ function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
7585
7585
  customUrls: $d212a67662c5cf38$var$customUrls
7586
7586
  }));
7587
7587
  }
7588
+ let $20ff40266d725403$var$cachedHlsModule;
7589
+ async function $20ff40266d725403$export$5d2f6cd705125cd3() {
7590
+ if ($20ff40266d725403$var$cachedHlsModule) return $20ff40266d725403$var$cachedHlsModule;
7591
+ const global_var_name = "_depict_ai_hls_polyfill";
7592
+ const scriptTag = document.createElement("script");
7593
+ scriptTag.type = "module";
7594
+ // Our build systems aren't set-up for dynamic imports, so do this instead
7595
+ scriptTag.append(`import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.${global_var_name}=m)`);
7596
+ document.head.append(scriptTag);
7597
+ const hlsModule = await $gVhhF$depictaiutilishared.is_available_in(window, global_var_name);
7598
+ delete window[global_var_name];
7599
+ scriptTag.remove();
7600
+ $20ff40266d725403$var$cachedHlsModule = hlsModule;
7601
+ return hlsModule;
7602
+ }
7588
7603
  var $32c662f618f5d80d$var$_tmpl$ = /*#__PURE__*/$gVhhF$solidjsweb.template(`<video loop class=d-standard-content>`);
7589
7604
  function $32c662f618f5d80d$export$780a853d15174484({
7590
7605
  link_: link_,
@@ -7649,13 +7664,24 @@ function $32c662f618f5d80d$export$780a853d15174484({
7649
7664
  when: type_ === "video",
7650
7665
  get children() {
7651
7666
  var _el$ = $gVhhF$solidjsweb.getNextElement($32c662f618f5d80d$var$_tmpl$);
7652
- $gVhhF$solidjsweb.use(element => {
7667
+ var _ref$ = $gVhhF$depictaiutilisharedlatest.catchify(async element => {
7653
7668
  const pageVisible = $55cbacb79d3e0cea$export$54299a3c81f5425();
7669
+ const owner = $gVhhF$solidjs.getOwner();
7654
7670
  element.addEventListener("loadedmetadata", $gVhhF$depictaiutilisharedlatest.catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
7655
- $gVhhF$solidjs.createEffect(() => {
7671
+ // If hls is not supported, dynamically import hls.js as polyfill
7672
+ if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
7673
+ const hlsJs = await $20ff40266d725403$export$5d2f6cd705125cd3().catch(e => $gVhhF$depictaiutilisharedlatest.report([e, "Failed to load hls.js"], "error"));
7674
+ if (!hlsJs || !hlsJs.isSupported()) return;
7675
+ const hls = new hlsJs.default();
7676
+ hls.loadSource(mediaUrl_);
7677
+ hls.attachMedia(element);
7678
+ }
7679
+ // need runWithOwner for createEffect, because we potentially awaited above
7680
+ $gVhhF$solidjs.runWithOwner(owner, () => $gVhhF$solidjs.createEffect(() => {
7656
7681
  if (pageVisible()) element.play().catch(e => $gVhhF$depictaiutilishared.dlog("Failed to play", e));else element.pause();
7657
- });
7658
- }, _el$);
7682
+ }));
7683
+ });
7684
+ typeof _ref$ === "function" && $gVhhF$solidjsweb.use(_ref$, _el$);
7659
7685
  _el$.addEventListener("playing", () => setHasLoaded(true));
7660
7686
  $gVhhF$solidjsweb.setAttribute(_el$, "src", mediaUrl_);
7661
7687
  $gVhhF$solidjsweb.setProperty(_el$, "controls", false);
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.4";
14
+ export const version = "4.9.6";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
package/latest/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $9HbP8$add_to_version_info, javascript_media_query as $9HbP8$javascript_media_query, standard_price_format as $9HbP8$standard_price_format, catchify as $9HbP8$catchify1, observer as $9HbP8$observer, slider_fractional_factory as $9HbP8$slider_fractional_factory, report as $9HbP8$report1, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, dwarn as $9HbP8$dwarn, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_debug as $9HbP8$is_debug, findMostFrequentItem as $9HbP8$findMostFrequentItem, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, use_href_accessor as $9HbP8$use_href_accessor1, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
1
+ import { add_to_version_info as $9HbP8$add_to_version_info, javascript_media_query as $9HbP8$javascript_media_query, standard_price_format as $9HbP8$standard_price_format, catchify as $9HbP8$catchify1, observer as $9HbP8$observer, slider_fractional_factory as $9HbP8$slider_fractional_factory, report as $9HbP8$report1, dlog as $9HbP8$dlog, camelCasifyObject as $9HbP8$camelCasifyObject, make_random_classname as $9HbP8$make_random_classname, n_col_styling_with_dist as $9HbP8$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $9HbP8$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $9HbP8$layout_get_total_rec_amount_for_row, layout_media_query_header as $9HbP8$layout_media_query_header, dwarn as $9HbP8$dwarn, slider_fading_factory as $9HbP8$slider_fading_factory, Amazing_Slider as $9HbP8$Amazing_Slider, slider_snap_css as $9HbP8$slider_snap_css, useExpandingContainer as $9HbP8$useExpandingContainer, hex_to_rgb as $9HbP8$hex_to_rgb, relative_luminance_from_rgb as $9HbP8$relative_luminance_from_rgb, instant_exec_on_suspect_history_change as $9HbP8$instant_exec_on_suspect_history_change, base64_encode_unicode as $9HbP8$base64_encode_unicode, base64_decode_unicode as $9HbP8$base64_decode_unicode, queueMacroTask as $9HbP8$queueMacroTask, is_debug as $9HbP8$is_debug, findMostFrequentItem as $9HbP8$findMostFrequentItem, is_available_in as $9HbP8$is_available_in, fetch_retry as $9HbP8$fetch_retry, base_url as $9HbP8$base_url, deparallelize_no_drop as $9HbP8$deparallelize_no_drop, ContainedImage as $9HbP8$ContainedImage, buildThresholdList as $9HbP8$buildThresholdList, make_asyncIterable_exiter as $9HbP8$make_asyncIterable_exiter, href_change_ipns as $9HbP8$href_change_ipns, use_href_accessor as $9HbP8$use_href_accessor1, get_session_id as $9HbP8$get_session_id, add_version_query_params as $9HbP8$add_version_query_params, snakeCasifyObject as $9HbP8$snakeCasifyObject, sort_obj as $9HbP8$sort_obj, make_url_with_query_params as $9HbP8$make_url_with_query_params, insert_surfaces as $9HbP8$insert_surfaces } from "@depict-ai/utilishared/latest";
2
2
  import { template as $9HbP8$template, createComponent as $9HbP8$createComponent, getNextElement as $9HbP8$getNextElement, getNextMarker as $9HbP8$getNextMarker, insert as $9HbP8$insert, isServer as $9HbP8$isServer, use as $9HbP8$use, effect as $9HbP8$effect, setAttribute as $9HbP8$setAttribute, memo as $9HbP8$memo, mergeProps as $9HbP8$mergeProps1, addEventListener as $9HbP8$addEventListener, runHydrationEvents as $9HbP8$runHydrationEvents, delegateEvents as $9HbP8$delegateEvents, spread as $9HbP8$spread, classList as $9HbP8$classList, className as $9HbP8$className, style as $9HbP8$style, Dynamic as $9HbP8$Dynamic, setProperty as $9HbP8$setProperty } from "solid-js/web";
3
3
  import { createContext as $9HbP8$createContext, createSignal as $9HbP8$createSignal, getOwner as $9HbP8$getOwner, createResource as $9HbP8$createResource, untrack as $9HbP8$untrack, createRoot as $9HbP8$createRoot, createEffect as $9HbP8$createEffect, runWithOwner as $9HbP8$runWithOwner, onCleanup as $9HbP8$onCleanup, createMemo as $9HbP8$createMemo, Show as $9HbP8$Show, createComputed as $9HbP8$createComputed, createRenderEffect as $9HbP8$createRenderEffect, mergeProps as $9HbP8$mergeProps, useContext as $9HbP8$useContext, createReaction as $9HbP8$createReaction, on as $9HbP8$on, Suspense as $9HbP8$Suspense, ErrorBoundary as $9HbP8$ErrorBoundary, Index as $9HbP8$Index, For as $9HbP8$For, createUniqueId as $9HbP8$createUniqueId, mapArray as $9HbP8$mapArray, batch as $9HbP8$batch, Switch as $9HbP8$Switch, Match as $9HbP8$Match, splitProps as $9HbP8$splitProps, createComponent as $9HbP8$createComponent1, createSelector as $9HbP8$createSelector, children as $9HbP8$children } from "solid-js";
4
4
  import { catchify as $9HbP8$catchify, report as $9HbP8$report, use_href_accessor as $9HbP8$use_href_accessor, dlog as $9HbP8$dlog1, ListenableSet as $9HbP8$ListenableSet, queueMacroTask as $9HbP8$queueMacroTask1 } from "@depict-ai/utilishared/latest";
@@ -7,7 +7,7 @@ import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.4";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.6";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $9HbP8$createSignal(false);
13
13
  $9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
@@ -7483,6 +7483,21 @@ function $70bb27cc6be01fc7$export$140423fa4bfb6d63(props) {
7483
7483
  customUrls: $70bb27cc6be01fc7$var$customUrls
7484
7484
  }));
7485
7485
  }
7486
+ let $e422ea9eccb7892b$var$cachedHlsModule;
7487
+ async function $e422ea9eccb7892b$export$5d2f6cd705125cd3() {
7488
+ if ($e422ea9eccb7892b$var$cachedHlsModule) return $e422ea9eccb7892b$var$cachedHlsModule;
7489
+ const global_var_name = "_depict_ai_hls_polyfill";
7490
+ const scriptTag = document.createElement("script");
7491
+ scriptTag.type = "module";
7492
+ // Our build systems aren't set-up for dynamic imports, so do this instead
7493
+ scriptTag.append(`import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.${global_var_name}=m)`);
7494
+ document.head.append(scriptTag);
7495
+ const hlsModule = await $9HbP8$is_available_in(window, global_var_name);
7496
+ delete window[global_var_name];
7497
+ scriptTag.remove();
7498
+ $e422ea9eccb7892b$var$cachedHlsModule = hlsModule;
7499
+ return hlsModule;
7500
+ }
7486
7501
  var $f916989c4b1be9f7$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<video loop class=d-standard-content>`);
7487
7502
  function $f916989c4b1be9f7$export$780a853d15174484({
7488
7503
  link_: link_,
@@ -7547,13 +7562,24 @@ function $f916989c4b1be9f7$export$780a853d15174484({
7547
7562
  when: type_ === "video",
7548
7563
  get children() {
7549
7564
  var _el$ = $9HbP8$getNextElement($f916989c4b1be9f7$var$_tmpl$);
7550
- $9HbP8$use(element => {
7565
+ var _ref$ = $9HbP8$catchify(async element => {
7551
7566
  const pageVisible = $5e3d278ef4c80cd7$export$54299a3c81f5425();
7567
+ const owner = $9HbP8$getOwner();
7552
7568
  element.addEventListener("loadedmetadata", $9HbP8$catchify(() => setAspectRatio(element.videoWidth / element.videoHeight)));
7553
- $9HbP8$createEffect(() => {
7569
+ // If hls is not supported, dynamically import hls.js as polyfill
7570
+ if (mediaUrl_.includes(".m3u8") && !element.canPlayType("application/vnd.apple.mpegurl")) {
7571
+ const hlsJs = await $e422ea9eccb7892b$export$5d2f6cd705125cd3().catch(e => $9HbP8$report([e, "Failed to load hls.js"], "error"));
7572
+ if (!hlsJs || !hlsJs.isSupported()) return;
7573
+ const hls = new hlsJs.default();
7574
+ hls.loadSource(mediaUrl_);
7575
+ hls.attachMedia(element);
7576
+ }
7577
+ // need runWithOwner for createEffect, because we potentially awaited above
7578
+ $9HbP8$runWithOwner(owner, () => $9HbP8$createEffect(() => {
7554
7579
  if (pageVisible()) element.play().catch(e => $9HbP8$dlog("Failed to play", e));else element.pause();
7555
- });
7556
- }, _el$);
7580
+ }));
7581
+ });
7582
+ typeof _ref$ === "function" && $9HbP8$use(_ref$, _el$);
7557
7583
  _el$.addEventListener("playing", () => setHasLoaded(true));
7558
7584
  $9HbP8$setAttribute(_el$, "src", mediaUrl_);
7559
7585
  $9HbP8$setProperty(_el$, "controls", false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.9.4",
3
+ "version": "4.9.6",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
6
  "sass": "styles.scss",
@@ -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.4";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.6";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $3hooq$solidjs.createSignal(false);
121
121
  $3hooq$solidjs.onCleanup($3hooq$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -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.4";
14
+ export const version = "4.9.6";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -10,7 +10,7 @@ import $b8hua$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.4";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.6";
14
14
  function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
15
15
  const signal = $b8hua$createSignal(false);
16
16
  $b8hua$onCleanup($b8hua$javascript_media_query(media_query, _ref => {
@@ -109,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
109
109
  $parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
110
110
  $parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
111
111
  /*! Depict.ai search and product listing SDK */
112
- const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.4";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.6";
113
113
  function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
114
114
  const signal = $5vyXB$solidjs.createSignal(false);
115
115
  $5vyXB$solidjs.onCleanup($5vyXB$depictaiutilishared.javascript_media_query(media_query, ({
@@ -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.4";
14
+ export const version = "4.9.6";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -7,7 +7,7 @@ import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from
7
7
  /*! Depict.ai search and product listing SDK */
8
8
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
9
  register_es_version("ui", "latest");
10
- const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.4";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.6";
11
11
  function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
12
12
  const signal = $i7OB2$createSignal(false);
13
13
  $i7OB2$onCleanup($i7OB2$javascript_media_query(media_query, ({