@depict-ai/ui 4.9.5 → 4.9.7
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 +21 -19
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +21 -19
- package/latest/index.cjs +21 -19
- package/latest/index.d.ts +1 -1
- package/latest/index.js +21 -19
- package/package.json +1 -1
- package/server/ES10/index.cjs +20 -17
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +20 -17
- package/server/latest/index.cjs +20 -17
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +20 -17
package/ES10/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@ 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");
|
|
7
6
|
var $52FdA$babelruntimehelpersdefineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
8
7
|
var $52FdA$babelruntimehelpersclassPrivateFieldSet = require("@babel/runtime/helpers/classPrivateFieldSet");
|
|
9
8
|
var $52FdA$babelruntimehelpersclassPrivateFieldGet = require("@babel/runtime/helpers/classPrivateFieldGet");
|
|
@@ -116,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
116
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
117
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
118
117
|
/*! Depict.ai search and product listing SDK */
|
|
119
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.7";
|
|
120
119
|
function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
|
|
121
120
|
const signal = $52FdA$solidjs.createSignal(false);
|
|
122
121
|
$52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
|
|
@@ -871,7 +870,8 @@ function $45c16e404a883f74$export$63dd0350f8559dda(_ref) {
|
|
|
871
870
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
872
871
|
index_to_target_map_: index_to_target_map_,
|
|
873
872
|
is_loading_: is_loading_,
|
|
874
|
-
get_extra_displays: get_extra_displays
|
|
873
|
+
get_extra_displays: get_extra_displays,
|
|
874
|
+
isSliderLayout_: isSliderLayout_
|
|
875
875
|
} = _ref;
|
|
876
876
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $52FdA$solidjs.createSignal(false);
|
|
877
877
|
$52FdA$solidjs.createEffect(() => {
|
|
@@ -881,20 +881,19 @@ function $45c16e404a883f74$export$63dd0350f8559dda(_ref) {
|
|
|
881
881
|
});
|
|
882
882
|
return $52FdA$solidjs.createMemo(() => {
|
|
883
883
|
const last = get_last_result_in_viewport_();
|
|
884
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
884
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
885
885
|
past_last_result_check: {
|
|
886
886
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
887
|
-
if (elements_of_last_result)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
}
|
|
887
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
888
|
+
if ($52FdA$solidjs.untrack(is_loading_)) {
|
|
889
|
+
// We're loading, wait check again after we have inserted our new results
|
|
890
|
+
get_has_rendered_toggle();
|
|
891
|
+
break past_last_result_check;
|
|
892
|
+
}
|
|
893
|
+
for (const element of elements_of_last_result) {
|
|
894
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
895
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
896
|
+
return 100;
|
|
898
897
|
}
|
|
899
898
|
}
|
|
900
899
|
if (isNaN(last)) return 0;
|
|
@@ -1241,7 +1240,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
1241
1240
|
depict_api_: depict_api_,
|
|
1242
1241
|
is_loading_: is_loading_,
|
|
1243
1242
|
content_blocks_: content_blocks_,
|
|
1244
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1243
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1244
|
+
isSliderLayout_: isSliderLayout_
|
|
1245
1245
|
} = _ref;
|
|
1246
1246
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
1247
1247
|
const [get_extra_displays, set_extra_displays_] = $52FdA$solidjs.createSignal([], {
|
|
@@ -1266,7 +1266,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
1266
1266
|
displays_by_key_: displays_by_key_,
|
|
1267
1267
|
index_to_target_map_: indexToTargetMap_,
|
|
1268
1268
|
is_loading_: is_loading_,
|
|
1269
|
-
get_extra_displays: get_extra_displays
|
|
1269
|
+
get_extra_displays: get_extra_displays,
|
|
1270
|
+
isSliderLayout_: isSliderLayout_
|
|
1270
1271
|
});
|
|
1271
1272
|
$52FdA$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
1272
1273
|
$19438fea513c9d01$export$5e4aed86c12acdd9({
|
|
@@ -2104,7 +2105,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
2104
2105
|
depict_api_: depict_api_,
|
|
2105
2106
|
is_loading_: is_loading_,
|
|
2106
2107
|
content_blocks_: content_blocks_,
|
|
2107
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
2108
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
2109
|
+
isSliderLayout_: () => layout() === "slider"
|
|
2108
2110
|
});
|
|
2109
2111
|
$52FdA$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
2110
2112
|
return suspense_contents;
|
|
@@ -8026,7 +8028,7 @@ async function $8e8c89c02c16dc7b$export$5d2f6cd705125cd3() {
|
|
|
8026
8028
|
// Our build systems aren't set-up for dynamic imports, so do this instead
|
|
8027
8029
|
scriptTag.append('import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.'.concat(global_var_name, "=m)"));
|
|
8028
8030
|
document.head.append(scriptTag);
|
|
8029
|
-
const hlsModule = await $52FdA$
|
|
8031
|
+
const hlsModule = await $52FdA$depictaiutilishared.is_available_in(window, global_var_name);
|
|
8030
8032
|
delete window[global_var_name];
|
|
8031
8033
|
scriptTag.remove();
|
|
8032
8034
|
$8e8c89c02c16dc7b$var$cachedHlsModule = hlsModule;
|
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.7";
|
|
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,9 +1,8 @@
|
|
|
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";
|
|
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";
|
|
7
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
8
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
9
8
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -11,7 +10,7 @@ import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpe
|
|
|
11
10
|
/*! Depict.ai search and product listing SDK */
|
|
12
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
13
12
|
register_es_version("ui", "ES10");
|
|
14
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.7";
|
|
15
14
|
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
16
15
|
const signal = $8tj43$createSignal(false);
|
|
17
16
|
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
@@ -766,7 +765,8 @@ function $e6dd9dfff4603d8c$export$63dd0350f8559dda(_ref) {
|
|
|
766
765
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
767
766
|
index_to_target_map_: index_to_target_map_,
|
|
768
767
|
is_loading_: is_loading_,
|
|
769
|
-
get_extra_displays: get_extra_displays
|
|
768
|
+
get_extra_displays: get_extra_displays,
|
|
769
|
+
isSliderLayout_: isSliderLayout_
|
|
770
770
|
} = _ref;
|
|
771
771
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $8tj43$createSignal(false);
|
|
772
772
|
$8tj43$createEffect(() => {
|
|
@@ -776,20 +776,19 @@ function $e6dd9dfff4603d8c$export$63dd0350f8559dda(_ref) {
|
|
|
776
776
|
});
|
|
777
777
|
return $8tj43$createMemo(() => {
|
|
778
778
|
const last = get_last_result_in_viewport_();
|
|
779
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
779
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
780
780
|
past_last_result_check: {
|
|
781
781
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
782
|
-
if (elements_of_last_result)
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
}
|
|
782
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
783
|
+
if ($8tj43$untrack(is_loading_)) {
|
|
784
|
+
// We're loading, wait check again after we have inserted our new results
|
|
785
|
+
get_has_rendered_toggle();
|
|
786
|
+
break past_last_result_check;
|
|
787
|
+
}
|
|
788
|
+
for (const element of elements_of_last_result) {
|
|
789
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
790
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
791
|
+
return 100;
|
|
793
792
|
}
|
|
794
793
|
}
|
|
795
794
|
if (isNaN(last)) return 0;
|
|
@@ -1136,7 +1135,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
1136
1135
|
depict_api_: depict_api_,
|
|
1137
1136
|
is_loading_: is_loading_,
|
|
1138
1137
|
content_blocks_: content_blocks_,
|
|
1139
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1138
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1139
|
+
isSliderLayout_: isSliderLayout_
|
|
1140
1140
|
} = _ref;
|
|
1141
1141
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
1142
1142
|
const [get_extra_displays, set_extra_displays_] = $8tj43$createSignal([], {
|
|
@@ -1161,7 +1161,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
1161
1161
|
displays_by_key_: displays_by_key_,
|
|
1162
1162
|
index_to_target_map_: indexToTargetMap_,
|
|
1163
1163
|
is_loading_: is_loading_,
|
|
1164
|
-
get_extra_displays: get_extra_displays
|
|
1164
|
+
get_extra_displays: get_extra_displays,
|
|
1165
|
+
isSliderLayout_: isSliderLayout_
|
|
1165
1166
|
});
|
|
1166
1167
|
$8tj43$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
1167
1168
|
$6d2962bc9370f884$export$5e4aed86c12acdd9({
|
|
@@ -1999,7 +2000,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
1999
2000
|
depict_api_: depict_api_,
|
|
2000
2001
|
is_loading_: is_loading_,
|
|
2001
2002
|
content_blocks_: content_blocks_,
|
|
2002
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
2003
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
2004
|
+
isSliderLayout_: () => layout() === "slider"
|
|
2003
2005
|
});
|
|
2004
2006
|
$8tj43$onCleanup(() => suspense_contents = undefined);
|
|
2005
2007
|
return suspense_contents;
|
package/latest/index.cjs
CHANGED
|
@@ -3,7 +3,6 @@ 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");
|
|
7
6
|
require("../multi_import_deduplicator.cjs").register_es_version("ui", "latest");
|
|
8
7
|
function $parcel$export(e, n, v, s) {
|
|
9
8
|
Object.defineProperty(e, n, {
|
|
@@ -110,7 +109,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $1f4925833f07df29$export$5b7
|
|
|
110
109
|
$parcel$export(module.exports, "QuickLinks", () => $1f4925833f07df29$export$de035477d6fef996);
|
|
111
110
|
$parcel$export(module.exports, "CategoryPage", () => $14f289047713d67a$export$e2bf8ce7779e827e);
|
|
112
111
|
/*! Depict.ai search and product listing SDK */
|
|
113
|
-
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.7";
|
|
114
113
|
function $b54e6192d0caa293$export$d9f36cf74e24d595(media_query) {
|
|
115
114
|
const signal = $gVhhF$solidjs.createSignal(false);
|
|
116
115
|
$gVhhF$solidjs.onCleanup($gVhhF$depictaiutilishared.javascript_media_query(media_query, ({
|
|
@@ -828,7 +827,8 @@ function $4117463e2939f5f4$export$63dd0350f8559dda({
|
|
|
828
827
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
829
828
|
index_to_target_map_: index_to_target_map_,
|
|
830
829
|
is_loading_: is_loading_,
|
|
831
|
-
get_extra_displays: get_extra_displays
|
|
830
|
+
get_extra_displays: get_extra_displays,
|
|
831
|
+
isSliderLayout_: isSliderLayout_
|
|
832
832
|
}) {
|
|
833
833
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $gVhhF$solidjs.createSignal(false);
|
|
834
834
|
$gVhhF$solidjs.createEffect(() => {
|
|
@@ -838,20 +838,19 @@ function $4117463e2939f5f4$export$63dd0350f8559dda({
|
|
|
838
838
|
});
|
|
839
839
|
return $gVhhF$solidjs.createMemo(() => {
|
|
840
840
|
const last = get_last_result_in_viewport_();
|
|
841
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
841
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
842
842
|
past_last_result_check: {
|
|
843
843
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
844
|
-
if (elements_of_last_result)
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}
|
|
844
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
845
|
+
if ($gVhhF$solidjs.untrack(is_loading_)) {
|
|
846
|
+
// We're loading, wait check again after we have inserted our new results
|
|
847
|
+
get_has_rendered_toggle();
|
|
848
|
+
break past_last_result_check;
|
|
849
|
+
}
|
|
850
|
+
for (const element of elements_of_last_result) {
|
|
851
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
852
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
853
|
+
return 100;
|
|
855
854
|
}
|
|
856
855
|
}
|
|
857
856
|
if (isNaN(last)) return 0;
|
|
@@ -1192,7 +1191,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
1192
1191
|
depict_api_: depict_api_,
|
|
1193
1192
|
is_loading_: is_loading_,
|
|
1194
1193
|
content_blocks_: content_blocks_,
|
|
1195
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1194
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1195
|
+
isSliderLayout_: isSliderLayout_
|
|
1196
1196
|
}) {
|
|
1197
1197
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
1198
1198
|
const [get_extra_displays, set_extra_displays_] = $gVhhF$solidjs.createSignal([], {
|
|
@@ -1214,7 +1214,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
1214
1214
|
displays_by_key_: displays_by_key_,
|
|
1215
1215
|
index_to_target_map_: indexToTargetMap_,
|
|
1216
1216
|
is_loading_: is_loading_,
|
|
1217
|
-
get_extra_displays: get_extra_displays
|
|
1217
|
+
get_extra_displays: get_extra_displays,
|
|
1218
|
+
isSliderLayout_: isSliderLayout_
|
|
1218
1219
|
});
|
|
1219
1220
|
$gVhhF$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
1220
1221
|
$3f08fe2992a2a8ca$export$5e4aed86c12acdd9({
|
|
@@ -2012,7 +2013,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
2012
2013
|
depict_api_: depict_api_,
|
|
2013
2014
|
is_loading_: is_loading_,
|
|
2014
2015
|
content_blocks_: content_blocks_,
|
|
2015
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
2016
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
2017
|
+
isSliderLayout_: () => layout() === "slider"
|
|
2016
2018
|
});
|
|
2017
2019
|
$gVhhF$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
2018
2020
|
return suspense_contents;
|
|
@@ -7595,7 +7597,7 @@ async function $20ff40266d725403$export$5d2f6cd705125cd3() {
|
|
|
7595
7597
|
// Our build systems aren't set-up for dynamic imports, so do this instead
|
|
7596
7598
|
scriptTag.append(`import("https://cdn.jsdelivr.net/npm/hls.js/+esm").then(m=>window.${global_var_name}=m)`);
|
|
7597
7599
|
document.head.append(scriptTag);
|
|
7598
|
-
const hlsModule = await $gVhhF$
|
|
7600
|
+
const hlsModule = await $gVhhF$depictaiutilishared.is_available_in(window, global_var_name);
|
|
7599
7601
|
delete window[global_var_name];
|
|
7600
7602
|
scriptTag.remove();
|
|
7601
7603
|
$20ff40266d725403$var$cachedHlsModule = hlsModule;
|
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.7";
|
|
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,14 +1,13 @@
|
|
|
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";
|
|
5
5
|
import { createStore as $9HbP8$createStore, reconcile as $9HbP8$reconcile } from "solid-js/store";
|
|
6
|
-
import { is_available_in as $9HbP8$is_available_in } from "@depict-ai/utilishared/src/latest";
|
|
7
6
|
|
|
8
7
|
/*! Depict.ai search and product listing SDK */
|
|
9
8
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
10
9
|
register_es_version("ui", "latest");
|
|
11
|
-
const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.7";
|
|
12
11
|
function $dc9262ef6f786812$export$d9f36cf74e24d595(media_query) {
|
|
13
12
|
const signal = $9HbP8$createSignal(false);
|
|
14
13
|
$9HbP8$onCleanup($9HbP8$javascript_media_query(media_query, ({
|
|
@@ -726,7 +725,8 @@ function $0e0b96a8dc1ad492$export$63dd0350f8559dda({
|
|
|
726
725
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
727
726
|
index_to_target_map_: index_to_target_map_,
|
|
728
727
|
is_loading_: is_loading_,
|
|
729
|
-
get_extra_displays: get_extra_displays
|
|
728
|
+
get_extra_displays: get_extra_displays,
|
|
729
|
+
isSliderLayout_: isSliderLayout_
|
|
730
730
|
}) {
|
|
731
731
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $9HbP8$createSignal(false);
|
|
732
732
|
$9HbP8$createEffect(() => {
|
|
@@ -736,20 +736,19 @@ function $0e0b96a8dc1ad492$export$63dd0350f8559dda({
|
|
|
736
736
|
});
|
|
737
737
|
return $9HbP8$createMemo(() => {
|
|
738
738
|
const last = get_last_result_in_viewport_();
|
|
739
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
739
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
740
740
|
past_last_result_check: {
|
|
741
741
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
742
|
-
if (elements_of_last_result)
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
}
|
|
742
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
743
|
+
if ($9HbP8$untrack(is_loading_)) {
|
|
744
|
+
// We're loading, wait check again after we have inserted our new results
|
|
745
|
+
get_has_rendered_toggle();
|
|
746
|
+
break past_last_result_check;
|
|
747
|
+
}
|
|
748
|
+
for (const element of elements_of_last_result) {
|
|
749
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
750
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
751
|
+
return 100;
|
|
753
752
|
}
|
|
754
753
|
}
|
|
755
754
|
if (isNaN(last)) return 0;
|
|
@@ -1090,7 +1089,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
1090
1089
|
depict_api_: depict_api_,
|
|
1091
1090
|
is_loading_: is_loading_,
|
|
1092
1091
|
content_blocks_: content_blocks_,
|
|
1093
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1092
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1093
|
+
isSliderLayout_: isSliderLayout_
|
|
1094
1094
|
}) {
|
|
1095
1095
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
1096
1096
|
const [get_extra_displays, set_extra_displays_] = $9HbP8$createSignal([], {
|
|
@@ -1112,7 +1112,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
1112
1112
|
displays_by_key_: displays_by_key_,
|
|
1113
1113
|
index_to_target_map_: indexToTargetMap_,
|
|
1114
1114
|
is_loading_: is_loading_,
|
|
1115
|
-
get_extra_displays: get_extra_displays
|
|
1115
|
+
get_extra_displays: get_extra_displays,
|
|
1116
|
+
isSliderLayout_: isSliderLayout_
|
|
1116
1117
|
});
|
|
1117
1118
|
$9HbP8$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
1118
1119
|
$056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
@@ -1910,7 +1911,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
1910
1911
|
depict_api_: depict_api_,
|
|
1911
1912
|
is_loading_: is_loading_,
|
|
1912
1913
|
content_blocks_: content_blocks_,
|
|
1913
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1914
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1915
|
+
isSliderLayout_: () => layout() === "slider"
|
|
1914
1916
|
});
|
|
1915
1917
|
$9HbP8$onCleanup(() => suspense_contents = undefined);
|
|
1916
1918
|
return suspense_contents;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/ui",
|
|
3
|
-
"version": "4.9.
|
|
3
|
+
"version": "4.9.7",
|
|
4
4
|
"description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
|
|
5
5
|
"packageManager": "yarn@3.2.2",
|
|
6
6
|
"sass": "styles.scss",
|
package/server/ES10/index.cjs
CHANGED
|
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
|
|
|
115
115
|
$parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
|
|
116
116
|
$parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
|
|
117
117
|
/*! Depict.ai search and product listing SDK */
|
|
118
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.
|
|
118
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.9.7";
|
|
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 => {
|
|
@@ -632,7 +632,8 @@ function $45c16e404a883f74$export$63dd0350f8559dda(_ref) {
|
|
|
632
632
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
633
633
|
index_to_target_map_: index_to_target_map_,
|
|
634
634
|
is_loading_: is_loading_,
|
|
635
|
-
get_extra_displays: get_extra_displays
|
|
635
|
+
get_extra_displays: get_extra_displays,
|
|
636
|
+
isSliderLayout_: isSliderLayout_
|
|
636
637
|
} = _ref;
|
|
637
638
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $3hooq$solidjs.createSignal(false);
|
|
638
639
|
$3hooq$solidjs.createEffect(() => {
|
|
@@ -642,20 +643,19 @@ function $45c16e404a883f74$export$63dd0350f8559dda(_ref) {
|
|
|
642
643
|
});
|
|
643
644
|
return $3hooq$solidjs.createMemo(() => {
|
|
644
645
|
const last = get_last_result_in_viewport_();
|
|
645
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
646
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
646
647
|
past_last_result_check: {
|
|
647
648
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
648
|
-
if (elements_of_last_result)
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
649
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
650
|
+
if ($3hooq$solidjs.untrack(is_loading_)) {
|
|
651
|
+
// We're loading, wait check again after we have inserted our new results
|
|
652
|
+
get_has_rendered_toggle();
|
|
653
|
+
break past_last_result_check;
|
|
654
|
+
}
|
|
655
|
+
for (const element of elements_of_last_result) {
|
|
656
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
657
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
658
|
+
return 100;
|
|
659
659
|
}
|
|
660
660
|
}
|
|
661
661
|
if (isNaN(last)) return 0;
|
|
@@ -1002,7 +1002,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
1002
1002
|
depict_api_: depict_api_,
|
|
1003
1003
|
is_loading_: is_loading_,
|
|
1004
1004
|
content_blocks_: content_blocks_,
|
|
1005
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1005
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1006
|
+
isSliderLayout_: isSliderLayout_
|
|
1006
1007
|
} = _ref;
|
|
1007
1008
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
1008
1009
|
const [get_extra_displays, set_extra_displays_] = $3hooq$solidjs.createSignal([], {
|
|
@@ -1027,7 +1028,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
|
|
|
1027
1028
|
displays_by_key_: displays_by_key_,
|
|
1028
1029
|
index_to_target_map_: indexToTargetMap_,
|
|
1029
1030
|
is_loading_: is_loading_,
|
|
1030
|
-
get_extra_displays: get_extra_displays
|
|
1031
|
+
get_extra_displays: get_extra_displays,
|
|
1032
|
+
isSliderLayout_: isSliderLayout_
|
|
1031
1033
|
});
|
|
1032
1034
|
$3hooq$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
1033
1035
|
$19438fea513c9d01$export$5e4aed86c12acdd9({
|
|
@@ -1751,7 +1753,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
|
|
|
1751
1753
|
depict_api_: depict_api_,
|
|
1752
1754
|
is_loading_: is_loading_,
|
|
1753
1755
|
content_blocks_: content_blocks_,
|
|
1754
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1756
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1757
|
+
isSliderLayout_: () => layout() === "slider"
|
|
1755
1758
|
});
|
|
1756
1759
|
$3hooq$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
1757
1760
|
return suspense_contents;
|
package/server/ES10/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
|
|
|
11
11
|
import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
|
|
12
12
|
import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
|
|
13
13
|
import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
|
|
14
|
-
export const version = "4.9.
|
|
14
|
+
export const version = "4.9.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
package/server/ES10/index.js
CHANGED
|
@@ -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.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.9.7";
|
|
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 => {
|
|
@@ -527,7 +527,8 @@ function $e6dd9dfff4603d8c$export$63dd0350f8559dda(_ref) {
|
|
|
527
527
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
528
528
|
index_to_target_map_: index_to_target_map_,
|
|
529
529
|
is_loading_: is_loading_,
|
|
530
|
-
get_extra_displays: get_extra_displays
|
|
530
|
+
get_extra_displays: get_extra_displays,
|
|
531
|
+
isSliderLayout_: isSliderLayout_
|
|
531
532
|
} = _ref;
|
|
532
533
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $b8hua$createSignal(false);
|
|
533
534
|
$b8hua$createEffect(() => {
|
|
@@ -537,20 +538,19 @@ function $e6dd9dfff4603d8c$export$63dd0350f8559dda(_ref) {
|
|
|
537
538
|
});
|
|
538
539
|
return $b8hua$createMemo(() => {
|
|
539
540
|
const last = get_last_result_in_viewport_();
|
|
540
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
541
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
541
542
|
past_last_result_check: {
|
|
542
543
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
543
|
-
if (elements_of_last_result)
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
}
|
|
544
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
545
|
+
if ($b8hua$untrack(is_loading_)) {
|
|
546
|
+
// We're loading, wait check again after we have inserted our new results
|
|
547
|
+
get_has_rendered_toggle();
|
|
548
|
+
break past_last_result_check;
|
|
549
|
+
}
|
|
550
|
+
for (const element of elements_of_last_result) {
|
|
551
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
552
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
553
|
+
return 100;
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
556
|
if (isNaN(last)) return 0;
|
|
@@ -897,7 +897,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
897
897
|
depict_api_: depict_api_,
|
|
898
898
|
is_loading_: is_loading_,
|
|
899
899
|
content_blocks_: content_blocks_,
|
|
900
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
900
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
901
|
+
isSliderLayout_: isSliderLayout_
|
|
901
902
|
} = _ref;
|
|
902
903
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
903
904
|
const [get_extra_displays, set_extra_displays_] = $b8hua$createSignal([], {
|
|
@@ -922,7 +923,8 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
922
923
|
displays_by_key_: displays_by_key_,
|
|
923
924
|
index_to_target_map_: indexToTargetMap_,
|
|
924
925
|
is_loading_: is_loading_,
|
|
925
|
-
get_extra_displays: get_extra_displays
|
|
926
|
+
get_extra_displays: get_extra_displays,
|
|
927
|
+
isSliderLayout_: isSliderLayout_
|
|
926
928
|
});
|
|
927
929
|
$b8hua$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
928
930
|
$6d2962bc9370f884$export$5e4aed86c12acdd9({
|
|
@@ -1646,7 +1648,8 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
1646
1648
|
depict_api_: depict_api_,
|
|
1647
1649
|
is_loading_: is_loading_,
|
|
1648
1650
|
content_blocks_: content_blocks_,
|
|
1649
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1651
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1652
|
+
isSliderLayout_: () => layout() === "slider"
|
|
1650
1653
|
});
|
|
1651
1654
|
$b8hua$onCleanup(() => suspense_contents = undefined);
|
|
1652
1655
|
return suspense_contents;
|
package/server/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.
|
|
112
|
+
const $b757f75811f3261f$export$83d89fbfd8236492 = "4.9.7";
|
|
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, ({
|
|
@@ -596,7 +596,8 @@ function $4117463e2939f5f4$export$63dd0350f8559dda({
|
|
|
596
596
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
597
597
|
index_to_target_map_: index_to_target_map_,
|
|
598
598
|
is_loading_: is_loading_,
|
|
599
|
-
get_extra_displays: get_extra_displays
|
|
599
|
+
get_extra_displays: get_extra_displays,
|
|
600
|
+
isSliderLayout_: isSliderLayout_
|
|
600
601
|
}) {
|
|
601
602
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $5vyXB$solidjs.createSignal(false);
|
|
602
603
|
$5vyXB$solidjs.createEffect(() => {
|
|
@@ -606,20 +607,19 @@ function $4117463e2939f5f4$export$63dd0350f8559dda({
|
|
|
606
607
|
});
|
|
607
608
|
return $5vyXB$solidjs.createMemo(() => {
|
|
608
609
|
const last = get_last_result_in_viewport_();
|
|
609
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
610
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
610
611
|
past_last_result_check: {
|
|
611
612
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
612
|
-
if (elements_of_last_result)
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
}
|
|
613
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
614
|
+
if ($5vyXB$solidjs.untrack(is_loading_)) {
|
|
615
|
+
// We're loading, wait check again after we have inserted our new results
|
|
616
|
+
get_has_rendered_toggle();
|
|
617
|
+
break past_last_result_check;
|
|
618
|
+
}
|
|
619
|
+
for (const element of elements_of_last_result) {
|
|
620
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
621
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
622
|
+
return 100;
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
625
|
if (isNaN(last)) return 0;
|
|
@@ -960,7 +960,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
960
960
|
depict_api_: depict_api_,
|
|
961
961
|
is_loading_: is_loading_,
|
|
962
962
|
content_blocks_: content_blocks_,
|
|
963
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
963
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
964
|
+
isSliderLayout_: isSliderLayout_
|
|
964
965
|
}) {
|
|
965
966
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
966
967
|
const [get_extra_displays, set_extra_displays_] = $5vyXB$solidjs.createSignal([], {
|
|
@@ -982,7 +983,8 @@ function $ac167f6af6a48fc3$export$a1fd619a4743ca08({
|
|
|
982
983
|
displays_by_key_: displays_by_key_,
|
|
983
984
|
index_to_target_map_: indexToTargetMap_,
|
|
984
985
|
is_loading_: is_loading_,
|
|
985
|
-
get_extra_displays: get_extra_displays
|
|
986
|
+
get_extra_displays: get_extra_displays,
|
|
987
|
+
isSliderLayout_: isSliderLayout_
|
|
986
988
|
});
|
|
987
989
|
$5vyXB$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
988
990
|
$3f08fe2992a2a8ca$export$5e4aed86c12acdd9({
|
|
@@ -1672,7 +1674,8 @@ function $fe76fb463cc60b89$export$3925f87b1545cfc6({
|
|
|
1672
1674
|
depict_api_: depict_api_,
|
|
1673
1675
|
is_loading_: is_loading_,
|
|
1674
1676
|
content_blocks_: content_blocks_,
|
|
1675
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1677
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1678
|
+
isSliderLayout_: () => layout() === "slider"
|
|
1676
1679
|
});
|
|
1677
1680
|
$5vyXB$solidjs.onCleanup(() => suspense_contents = undefined);
|
|
1678
1681
|
return suspense_contents;
|
package/server/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.7";
|
|
15
15
|
/**
|
|
16
16
|
* Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
|
|
17
17
|
*/
|
package/server/latest/index.js
CHANGED
|
@@ -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.
|
|
10
|
+
const $ec291e0010116877$export$83d89fbfd8236492 = "4.9.7";
|
|
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, ({
|
|
@@ -494,7 +494,8 @@ function $0e0b96a8dc1ad492$export$63dd0350f8559dda({
|
|
|
494
494
|
get_last_result_in_viewport_: get_last_result_in_viewport_,
|
|
495
495
|
index_to_target_map_: index_to_target_map_,
|
|
496
496
|
is_loading_: is_loading_,
|
|
497
|
-
get_extra_displays: get_extra_displays
|
|
497
|
+
get_extra_displays: get_extra_displays,
|
|
498
|
+
isSliderLayout_: isSliderLayout_
|
|
498
499
|
}) {
|
|
499
500
|
const [get_has_rendered_toggle, set_has_rendered_toggle] = $i7OB2$createSignal(false);
|
|
500
501
|
$i7OB2$createEffect(() => {
|
|
@@ -504,20 +505,19 @@ function $0e0b96a8dc1ad492$export$63dd0350f8559dda({
|
|
|
504
505
|
});
|
|
505
506
|
return $i7OB2$createMemo(() => {
|
|
506
507
|
const last = get_last_result_in_viewport_();
|
|
507
|
-
// Check if we are past the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
508
|
+
// Check if we are past (below) the last result, in that case we want it to count as 100% for a better infinite scroll experience
|
|
508
509
|
past_last_result_check: {
|
|
509
510
|
const elements_of_last_result = index_to_target_map_.get(index_to_target_map_.size - 1);
|
|
510
|
-
if (elements_of_last_result)
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}
|
|
511
|
+
if (!elements_of_last_result || isSliderLayout_()) break past_last_result_check;
|
|
512
|
+
if ($i7OB2$untrack(is_loading_)) {
|
|
513
|
+
// We're loading, wait check again after we have inserted our new results
|
|
514
|
+
get_has_rendered_toggle();
|
|
515
|
+
break past_last_result_check;
|
|
516
|
+
}
|
|
517
|
+
for (const element of elements_of_last_result) {
|
|
518
|
+
if (document.documentElement.contains(element) && element.getBoundingClientRect().top <= 0)
|
|
519
|
+
// dlog(element, "which is of last product card is in or above viewport, probably loading more");
|
|
520
|
+
return 100;
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
523
|
if (isNaN(last)) return 0;
|
|
@@ -858,7 +858,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
858
858
|
depict_api_: depict_api_,
|
|
859
859
|
is_loading_: is_loading_,
|
|
860
860
|
content_blocks_: content_blocks_,
|
|
861
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
861
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
862
|
+
isSliderLayout_: isSliderLayout_
|
|
862
863
|
}) {
|
|
863
864
|
// Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
|
|
864
865
|
const [get_extra_displays, set_extra_displays_] = $i7OB2$createSignal([], {
|
|
@@ -880,7 +881,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
|
|
|
880
881
|
displays_by_key_: displays_by_key_,
|
|
881
882
|
index_to_target_map_: indexToTargetMap_,
|
|
882
883
|
is_loading_: is_loading_,
|
|
883
|
-
get_extra_displays: get_extra_displays
|
|
884
|
+
get_extra_displays: get_extra_displays,
|
|
885
|
+
isSliderLayout_: isSliderLayout_
|
|
884
886
|
});
|
|
885
887
|
$i7OB2$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
|
|
886
888
|
$056f6ac0a6caa919$export$5e4aed86c12acdd9({
|
|
@@ -1570,7 +1572,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
|
|
|
1570
1572
|
depict_api_: depict_api_,
|
|
1571
1573
|
is_loading_: is_loading_,
|
|
1572
1574
|
content_blocks_: content_blocks_,
|
|
1573
|
-
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
|
|
1575
|
+
setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
|
|
1576
|
+
isSliderLayout_: () => layout() === "slider"
|
|
1574
1577
|
});
|
|
1575
1578
|
$i7OB2$onCleanup(() => suspense_contents = undefined);
|
|
1576
1579
|
return suspense_contents;
|