@depict-ai/ui 4.8.4 → 4.8.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/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.8.4";
14
+ export const version = "4.8.5";
15
15
  /**
16
16
  * Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
17
17
  */
@@ -1506,7 +1506,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1506
1506
  * Open the modal with support for alignment.
1507
1507
  * @returns {void}
1508
1508
  */
1509
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1509
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1510
1510
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1511
1511
  export interface PageReplacer {
1512
1512
  readonly render_: () => Node_Array;
@@ -1585,5 +1585,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1585
1585
  content_blocks_by_row?: ContentBlocksByRow;
1586
1586
  layout?: PossibleLayout;
1587
1587
  filterModalParent_?: HTMLElement | ShadowRoot;
1588
- }): import("@depict-ai/utilishared").Node_Array;
1588
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1589
1589
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
package/latest/index.js CHANGED
@@ -7,7 +7,7 @@ import { dlog as $9HbP8$dlog, catchify as $9HbP8$catchify1, ListenableSet as $9H
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.8.4";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.8.5";
11
11
  function $a444a52bafa0dacc$export$54c6d6ff54e72743(whatToWatch) {
12
12
  const [width, setWidth] = $9HbP8$createSignal(0);
13
13
  const [height, setHeight] = $9HbP8$createSignal(0);
@@ -2987,10 +2987,10 @@ function $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
2987
2987
  i18n_: i18n_
2988
2988
  }) {
2989
2989
  return $9HbP8$createMemo(() => {
2990
- const n_hits = number_();
2991
- if (isNaN(n_hits)) return "";
2990
+ const numberToFormat = number_();
2991
+ if (isNaN(numberToFormat)) return "";
2992
2992
  const price_formatting = i18n_.price_formatting_();
2993
- return $9HbP8$standard_price_format(n_hits, 0,
2993
+ return $9HbP8$standard_price_format(numberToFormat, 0,
2994
2994
  // we never want places after comma here it looks weird as hell
2995
2995
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
2996
2996
  });
@@ -5417,7 +5417,8 @@ function $500a16dd18ee5a71$var$RawSearchModalV2({
5417
5417
  // total number of results = content results + product results + category suggestions
5418
5418
  const totalNumberResults = $9HbP8$createMemo(() => {
5419
5419
  const results = get_modal_search_results_()?.();
5420
- const hits = results?.n_hits;
5420
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
5421
+ const hits = results?.cursor ? results?.n_hits : results?.displays?.length;
5421
5422
  const content_results = content_search_enabled_() && results?.content_search_links?.length || 0;
5422
5423
  const category_results = listing_suggestions_()?.length || 0;
5423
5424
  return (hits ?? 0) + content_results + category_results;
@@ -11222,7 +11223,8 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
11222
11223
  query_base_: query_base_,
11223
11224
  depict_api_: depict_api_,
11224
11225
  is_loading_: is_loading_,
11225
- content_blocks_: content_blocks_
11226
+ content_blocks_: content_blocks_,
11227
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11226
11228
  }) {
11227
11229
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
11228
11230
  const [get_extra_displays, set_extra_displays_] = $9HbP8$createSignal([], {
@@ -11246,6 +11248,7 @@ function $0449e7d49398c077$export$a1fd619a4743ca08({
11246
11248
  is_loading_: is_loading_,
11247
11249
  get_extra_displays: get_extra_displays
11248
11250
  });
11251
+ $9HbP8$createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
11249
11252
  $056f6ac0a6caa919$export$5e4aed86c12acdd9({
11250
11253
  percentage_in_view_: percentage_in_view_,
11251
11254
  set_extra_displays_: set_extra_displays_,
@@ -11301,7 +11304,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
11301
11304
  layout_options_: layout_options_,
11302
11305
  id_currently_querying_for_: id_currently_querying_for_,
11303
11306
  content_blocks_by_row_: content_blocks_by_row_,
11304
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
11307
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
11308
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11305
11309
  }) {
11306
11310
  // The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
11307
11311
  const is_loading_ = $9HbP8$createMemo(() => plp_results_.loading || query_base_.loading);
@@ -11432,7 +11436,8 @@ function $2d25e42846eac370$export$3925f87b1545cfc6({
11432
11436
  query_base_: query_base_,
11433
11437
  depict_api_: depict_api_,
11434
11438
  is_loading_: is_loading_,
11435
- content_blocks_: content_blocks_
11439
+ content_blocks_: content_blocks_,
11440
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
11436
11441
  });
11437
11442
  $9HbP8$onCleanup(() => suspense_contents = undefined);
11438
11443
  return suspense_contents;
@@ -13199,6 +13204,15 @@ function $0e562a5b247b1fc2$export$44f738469d5570cf({
13199
13204
  };
13200
13205
  });
13201
13206
  }
13207
+ function $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, [allProductsLoaded], currentlyLoadedDisplays) {
13208
+ return $9HbP8$createMemo(() => {
13209
+ const backendSays = plp_products_()?.n_hits;
13210
+ const loadedAll = allProductsLoaded();
13211
+ if (!backendSays || !loadedAll) return backendSays;
13212
+ // People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
13213
+ return currentlyLoadedDisplays();
13214
+ });
13215
+ }
13202
13216
  var $7097477c78a89208$var$_tmpl$ = /*#__PURE__*/$9HbP8$template(`<div class=filter-results-for-one-row><!$><!/><!$><!/>`),
13203
13217
  $7097477c78a89208$var$_tmpl$2 = /*#__PURE__*/$9HbP8$template(`<div><div class=listing-page><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/><!$><!/></div><!$><!/><!$><!/>`);
13204
13218
  function $7097477c78a89208$export$a54ec244c8863715({
@@ -13239,6 +13253,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
13239
13253
  }) {
13240
13254
  const [get_sorting] = current_sorting_;
13241
13255
  const all_products_loaded_ = $9HbP8$createSignal(false);
13256
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $9HbP8$createSignal(0);
13242
13257
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
13243
13258
  const number_of_rendered_selected_filters_items_ = $9HbP8$createSignal(0);
13244
13259
  const first_result_in_viewport_ = $9HbP8$createSignal();
@@ -13308,9 +13323,9 @@ function $7097477c78a89208$export$a54ec244c8863715({
13308
13323
  const SafeSearchField = $9HbP8$catchify((0, $5285d2814d0fac0c$export$b94867ecbd698f21));
13309
13324
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
13310
13325
  const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
13311
- const n_hits = $9HbP8$createMemo(() => search_results_()?.n_hits);
13326
+ const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
13312
13327
  const formatted_number_of_results_ = $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
13313
- number_: n_hits,
13328
+ number_: countOfProductsForUI,
13314
13329
  i18n_: i18n_
13315
13330
  });
13316
13331
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
@@ -13319,7 +13334,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
13319
13334
  get type() {
13320
13335
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
13321
13336
  },
13322
- number_of_results_: n_hits
13337
+ number_of_results_: countOfProductsForUI
13323
13338
  }, {
13324
13339
  get_search_query_: get_search_query_,
13325
13340
  i18n_: i18n_,
@@ -13573,6 +13588,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
13573
13588
  sort_or_filter_open_: sort_or_filter_open_,
13574
13589
  id_currently_querying_for_: get_search_query_,
13575
13590
  content_blocks_by_row_: content_blocks_by_row_,
13591
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
13576
13592
  no_results_options_: {
13577
13593
  selected_filters_: selected_filters_,
13578
13594
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -13615,7 +13631,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
13615
13631
  last_result_in_viewport_: last_result_in_viewport_,
13616
13632
  formatted_number_of_results_: formatted_number_of_results_,
13617
13633
  i18n_: i18n_,
13618
- number_of_results_: $9HbP8$createMemo(() => search_results_()?.n_hits)
13634
+ number_of_results_: countOfProductsForUI
13619
13635
  });
13620
13636
  }
13621
13637
  }), _el$23, _co$10);
@@ -15017,6 +15033,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15017
15033
  const number_of_rendered_selected_filters_items_ = $9HbP8$createSignal(0);
15018
15034
  const first_result_in_viewport_ = $9HbP8$createSignal();
15019
15035
  const last_result_in_viewport_ = $9HbP8$createSignal();
15036
+ const all_products_loaded_ = $9HbP8$createSignal(false);
15037
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $9HbP8$createSignal(0);
15020
15038
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $9HbP8$createSignal(false);
15021
15039
  const products_query_base_ = $587cd61972788655$export$210f130a61ac1e8d(() => {
15022
15040
  const sort_obj = get_sorting() && {
@@ -15063,6 +15081,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15063
15081
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
15064
15082
  const [plp_meta] = $9HbP8$createResource(meta_query_base, $9HbP8$catchify1(query => depict_api_.get_listing(query)));
15065
15083
  const contentBlocksByRow = $486360b09f0d5729$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
15084
+ const countOfProductsForUI = $3ef0154d1cf118ed$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
15066
15085
  const available_sortings_ = $9HbP8$createMemo(() => plp_products_()?.sorts?.map(sort => ({
15067
15086
  ...sort,
15068
15087
  order: sort.order ?? "desc"
@@ -15074,7 +15093,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15074
15093
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $9HbP8$createSignal(false);
15075
15094
  const [desktop_filter_elements_, set_desktop_filter_elements] = $9HbP8$createSignal();
15076
15095
  const formatted_number_of_results_ = $511cc0abd9a64ce8$export$92f2da32c6e7e7ee({
15077
- number_: $9HbP8$createMemo(() => plp_products_()?.n_hits),
15096
+ number_: countOfProductsForUI,
15078
15097
  i18n_: i18n_
15079
15098
  });
15080
15099
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $9HbP8$createSignal();
@@ -15095,7 +15114,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15095
15114
  last_result_in_viewport_: last_result_in_viewport_,
15096
15115
  formatted_number_of_results_: formatted_number_of_results_,
15097
15116
  i18n_: i18n_,
15098
- number_of_results_: $9HbP8$createMemo(() => plp_products_()?.n_hits),
15117
+ number_of_results_: countOfProductsForUI,
15099
15118
  ...extraProps
15100
15119
  });
15101
15120
  }
@@ -15121,7 +15140,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15121
15140
  }), _el$4, _co$);
15122
15141
  $9HbP8$insert(_el$, $9HbP8$createComponent((0, $9HbP8$Show), {
15123
15142
  get when() {
15124
- return plp_products_()?.n_hits === 1;
15143
+ return countOfProductsForUI() === 1;
15125
15144
  },
15126
15145
  get fallback() {
15127
15146
  return i18n_.products_();
@@ -15326,6 +15345,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
15326
15345
  content_blocks_by_row_: contentBlocksByRow,
15327
15346
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
15328
15347
  id_currently_querying_for_: id_to_query_for_,
15348
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
15349
+ all_products_loaded_: all_products_loaded_,
15329
15350
  no_results_options_: {
15330
15351
  selected_filters_: selected_filters_,
15331
15352
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "4.8.4",
3
+ "version": "4.8.5",
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",
@@ -114,7 +114,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
114
114
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
115
115
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
116
116
  /*! Depict.ai search and product listing SDK */
117
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.4";
117
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.8.5";
118
118
  function $054b1113e4897051$export$54c6d6ff54e72743(whatToWatch) {
119
119
  const [width, setWidth] = $3hooq$solidjs.createSignal(0);
120
120
  const [height, setHeight] = $3hooq$solidjs.createSignal(0);
@@ -2764,10 +2764,10 @@ function $068bde7fa83ac02c$export$92f2da32c6e7e7ee(_ref) {
2764
2764
  i18n_: i18n_
2765
2765
  } = _ref;
2766
2766
  return $3hooq$solidjs.createMemo(() => {
2767
- const n_hits = number_();
2768
- if (isNaN(n_hits)) return "";
2767
+ const numberToFormat = number_();
2768
+ if (isNaN(numberToFormat)) return "";
2769
2769
  const price_formatting = i18n_.price_formatting_();
2770
- return $3hooq$depictaiutilishared.standard_price_format(n_hits, 0,
2770
+ return $3hooq$depictaiutilishared.standard_price_format(numberToFormat, 0,
2771
2771
  // we never want places after comma here it looks weird as hell
2772
2772
  price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
2773
2773
  });
@@ -4723,9 +4723,10 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
4723
4723
  });
4724
4724
  // total number of results = content results + product results + category suggestions
4725
4725
  const totalNumberResults = $3hooq$solidjs.createMemo(() => {
4726
- var _get_modal_search_res4, _results$content_sear, _listing_suggestions_;
4726
+ var _get_modal_search_res4, _results$displays, _results$content_sear, _listing_suggestions_;
4727
4727
  const results = (_get_modal_search_res4 = get_modal_search_results_()) === null || _get_modal_search_res4 === void 0 ? void 0 : _get_modal_search_res4();
4728
- const hits = results === null || results === void 0 ? void 0 : results.n_hits;
4728
+ // Show actual number of result (more accurate) if there's no cursor (backend doesn't have more products)
4729
+ const hits = results !== null && results !== void 0 && results.cursor ? results === null || results === void 0 ? void 0 : results.n_hits : results === null || results === void 0 ? void 0 : (_results$displays = results.displays) === null || _results$displays === void 0 ? void 0 : _results$displays.length;
4729
4730
  const content_results = content_search_enabled_() && (results === null || results === void 0 ? void 0 : (_results$content_sear = results.content_search_links) === null || _results$content_sear === void 0 ? void 0 : _results$content_sear.length) || 0;
4730
4731
  const category_results = ((_listing_suggestions_ = listing_suggestions_()) === null || _listing_suggestions_ === void 0 ? void 0 : _listing_suggestions_.length) || 0;
4731
4732
  return (hits !== null && hits !== void 0 ? hits : 0) + content_results + category_results;
@@ -9930,7 +9931,8 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
9930
9931
  query_base_: query_base_,
9931
9932
  depict_api_: depict_api_,
9932
9933
  is_loading_: is_loading_,
9933
- content_blocks_: content_blocks_
9934
+ content_blocks_: content_blocks_,
9935
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
9934
9936
  } = _ref;
9935
9937
  // Although typing doesn't reflect it, plp_results is guaranteed to contain an array of at least one display at this point
9936
9938
  const [get_extra_displays, set_extra_displays_] = $3hooq$solidjs.createSignal([], {
@@ -9957,6 +9959,7 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
9957
9959
  is_loading_: is_loading_,
9958
9960
  get_extra_displays: get_extra_displays
9959
9961
  });
9962
+ $3hooq$solidjs.createComputed(() => setCurrentlyLoadedDisplays_(displays_by_key_().size));
9960
9963
  $19438fea513c9d01$export$5e4aed86c12acdd9({
9961
9964
  percentage_in_view_: percentage_in_view_,
9962
9965
  set_extra_displays_: set_extra_displays_,
@@ -10102,7 +10105,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
10102
10105
  layout_options_: layout_options_,
10103
10106
  id_currently_querying_for_: id_currently_querying_for_,
10104
10107
  content_blocks_by_row_: content_blocks_by_row_,
10105
- ConfiguredScrollStatus_: ConfiguredScrollStatus_
10108
+ ConfiguredScrollStatus_: ConfiguredScrollStatus_,
10109
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10106
10110
  } = _ref;
10107
10111
  // The plp_results_ resource will be delayed because we're using createBatchedMemo to not make triplicate API requests, but we need to show the placeholders before already to match Chrome and Firefox's "content has to be there, ready for scroll restoration, before all popstate tasks have been completed"-requirement
10108
10112
  const is_loading_ = $3hooq$solidjs.createMemo(() => plp_results_.loading || query_base_.loading);
@@ -10233,7 +10237,8 @@ function $484eec37514a982e$export$3925f87b1545cfc6(_ref) {
10233
10237
  query_base_: query_base_,
10234
10238
  depict_api_: depict_api_,
10235
10239
  is_loading_: is_loading_,
10236
- content_blocks_: content_blocks_
10240
+ content_blocks_: content_blocks_,
10241
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_
10237
10242
  });
10238
10243
  $3hooq$solidjs.onCleanup(() => suspense_contents = undefined);
10239
10244
  return suspense_contents;
@@ -11606,6 +11611,17 @@ function $a60bc7692ce52705$export$44f738469d5570cf(_ref) {
11606
11611
  };
11607
11612
  });
11608
11613
  }
11614
+ function $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, _ref, currentlyLoadedDisplays) {
11615
+ let [allProductsLoaded] = _ref;
11616
+ return $3hooq$solidjs.createMemo(() => {
11617
+ var _plp_products_;
11618
+ const backendSays = (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : _plp_products_.n_hits;
11619
+ const loadedAll = allProductsLoaded();
11620
+ if (!backendSays || !loadedAll) return backendSays;
11621
+ // People can remove displays in the displayTransformers, for example houdini do it (https://depictaiworkspace.slack.com/archives/C061H2TF7K4/p1713261063439089). Correct the n_hits as well as possible in that case.
11622
+ return currentlyLoadedDisplays();
11623
+ });
11624
+ }
11609
11625
  var $739c927cbecd26b0$var$_tmpl$ = ["<div", ' class="filter-results-for-one-row"><!--$-->', "<!--/--><!--$-->", "<!--/--></div>"],
11610
11626
  $739c927cbecd26b0$var$_tmpl$2 = ["<div", ' class="', '"><div class="listing-page"><!--$-->', "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--><!--$-->", "<!--/--></div><!--$-->", "<!--/--><!--$-->", "<!--/--></div>"];
11611
11627
  function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
@@ -11647,6 +11663,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11647
11663
  } = _ref;
11648
11664
  const [get_sorting] = current_sorting_;
11649
11665
  const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
11666
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
11650
11667
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
11651
11668
  const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
11652
11669
  const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
@@ -11725,24 +11742,21 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11725
11742
  const SafeSearchField = $3hooq$depictaiutilishared.catchify((0, $29e5dbeb69da7a36$export$b94867ecbd698f21));
11726
11743
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
11727
11744
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
11728
- const n_hits = $3hooq$solidjs.createMemo(() => {
11729
- var _search_results_3;
11730
- return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
11731
- });
11745
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(search_results_, all_products_loaded_, currentlyLoadedDisplays);
11732
11746
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
11733
- number_: n_hits,
11747
+ number_: countOfProductsForUI,
11734
11748
  i18n_: i18n_
11735
11749
  });
11736
11750
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
11737
11751
  const no_results_text_ = $3hooq$solidjs.createMemo(() => {
11738
- var _search_results_4, _search_results_4$con;
11739
- return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11752
+ var _search_results_3, _search_results_3$con;
11753
+ return ((_search_results_3 = search_results_()) !== null && _search_results_3 !== void 0 && (_search_results_3$con = _search_results_3.content_search_links) !== null && _search_results_3$con !== void 0 && _search_results_3$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
11740
11754
  });
11741
11755
  const results_for = $3hooq$solidjsweb.createComponent((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), $3hooq$solidjsweb.mergeProps({
11742
11756
  get type() {
11743
11757
  return (0, $9870a8a48ee126af$export$2452208c79fe93ea).products;
11744
11758
  },
11745
- number_of_results_: n_hits
11759
+ number_of_results_: countOfProductsForUI
11746
11760
  }, {
11747
11761
  get_search_query_: get_search_query_,
11748
11762
  i18n_: i18n_,
@@ -11968,6 +11982,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
11968
11982
  sort_or_filter_open_: sort_or_filter_open_,
11969
11983
  id_currently_querying_for_: get_search_query_,
11970
11984
  content_blocks_by_row_: content_blocks_by_row_,
11985
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
11971
11986
  no_results_options_: {
11972
11987
  selected_filters_: selected_filters_,
11973
11988
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -12008,10 +12023,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
12008
12023
  last_result_in_viewport_: last_result_in_viewport_,
12009
12024
  formatted_number_of_results_: formatted_number_of_results_,
12010
12025
  i18n_: i18n_,
12011
- number_of_results_: $3hooq$solidjs.createMemo(() => {
12012
- var _search_results_5;
12013
- return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
12014
- })
12026
+ number_of_results_: countOfProductsForUI
12015
12027
  });
12016
12028
  }
12017
12029
  })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
@@ -13521,6 +13533,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13521
13533
  const number_of_rendered_selected_filters_items_ = $3hooq$solidjs.createSignal(0);
13522
13534
  const first_result_in_viewport_ = $3hooq$solidjs.createSignal();
13523
13535
  const last_result_in_viewport_ = $3hooq$solidjs.createSignal();
13536
+ const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
13537
+ const [currentlyLoadedDisplays, setCurrentlyLoadedDisplays_] = $3hooq$solidjs.createSignal(0);
13524
13538
  const [can_write_scroll_restoration_, set_can_write_scroll_restoration] = $3hooq$solidjs.createSignal(false);
13525
13539
  const products_query_base_ = $e4bc31358c414b18$export$210f130a61ac1e8d(() => {
13526
13540
  const sort_obj = get_sorting() && {
@@ -13567,6 +13581,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13567
13581
  // Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
13568
13582
  const [plp_meta] = $3hooq$solidjs.createResource(meta_query_base, $3hooq$depictaiutilisharedlatest.catchify(query => depict_api_.get_listing(query)));
13569
13583
  const contentBlocksByRow = $0c035bbe7e30b438$export$7a92d995f1bf3592(history_content_blocks_, plp_meta, content_blocks_by_row_, router_);
13584
+ const countOfProductsForUI = $e335e2ff536c1a0b$export$a86bc18439445599(plp_products_, all_products_loaded_, currentlyLoadedDisplays);
13570
13585
  const available_sortings_ = $3hooq$solidjs.createMemo(() => {
13571
13586
  var _plp_products_, _plp_products_$sorts;
13572
13587
  return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
@@ -13593,10 +13608,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13593
13608
  const [sort_or_filter_open_, set_sort_or_filter_open_] = $3hooq$solidjs.createSignal(false);
13594
13609
  const [desktop_filter_elements_, set_desktop_filter_elements] = $3hooq$solidjs.createSignal();
13595
13610
  const formatted_number_of_results_ = $068bde7fa83ac02c$export$92f2da32c6e7e7ee({
13596
- number_: $3hooq$solidjs.createMemo(() => {
13597
- var _plp_products_3;
13598
- return (_plp_products_3 = plp_products_()) === null || _plp_products_3 === void 0 ? void 0 : _plp_products_3.n_hits;
13599
- }),
13611
+ number_: countOfProductsForUI,
13600
13612
  i18n_: i18n_
13601
13613
  });
13602
13614
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $3hooq$solidjs.createSignal();
@@ -13619,10 +13631,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13619
13631
  last_result_in_viewport_: last_result_in_viewport_,
13620
13632
  formatted_number_of_results_: formatted_number_of_results_,
13621
13633
  i18n_: i18n_,
13622
- number_of_results_: $3hooq$solidjs.createMemo(() => {
13623
- var _plp_products_4;
13624
- return (_plp_products_4 = plp_products_()) === null || _plp_products_4 === void 0 ? void 0 : _plp_products_4.n_hits;
13625
- }),
13634
+ number_of_results_: countOfProductsForUI,
13626
13635
  ...extraProps
13627
13636
  });
13628
13637
  }
@@ -13641,8 +13650,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13641
13650
  }
13642
13651
  })), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $3hooq$solidjs.Show), {
13643
13652
  get when() {
13644
- var _plp_products_5;
13645
- return ((_plp_products_5 = plp_products_()) === null || _plp_products_5 === void 0 ? void 0 : _plp_products_5.n_hits) === 1;
13653
+ return countOfProductsForUI() === 1;
13646
13654
  },
13647
13655
  get fallback() {
13648
13656
  return i18n_.products_();
@@ -13816,6 +13824,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
13816
13824
  content_blocks_by_row_: contentBlocksByRow,
13817
13825
  ConfiguredScrollStatus_: ConfiguredScrollStatus_,
13818
13826
  id_currently_querying_for_: id_to_query_for_,
13827
+ setCurrentlyLoadedDisplays_: setCurrentlyLoadedDisplays_,
13828
+ all_products_loaded_: all_products_loaded_,
13819
13829
  no_results_options_: {
13820
13830
  selected_filters_: selected_filters_,
13821
13831
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -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.8.4";
14
+ export const version = "4.8.5";
15
15
  /**
16
16
  * Returns two accessors (one width and one height) that will update when the size of the provided element changes, to be used with ResponsiveImg
17
17
  */
@@ -1506,7 +1506,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1506
1506
  * Open the modal with support for alignment.
1507
1507
  * @returns {void}
1508
1508
  */
1509
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1509
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1510
1510
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1511
1511
  export interface PageReplacer {
1512
1512
  readonly render_: () => Node_Array;
@@ -1585,5 +1585,5 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1585
1585
  content_blocks_by_row?: ContentBlocksByRow;
1586
1586
  layout?: PossibleLayout;
1587
1587
  filterModalParent_?: HTMLElement | ShadowRoot;
1588
- }): import("@depict-ai/utilishared").Node_Array;
1588
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1589
1589
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";