@depict-ai/ui 4.9.8 → 4.10.0

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.
@@ -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.8";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.0";
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 => {
@@ -4265,11 +4265,29 @@ function $164d474fea221d77$export$3f1a388cc0d8fed7(props) {
4265
4265
  }
4266
4266
  function $164d474fea221d77$var$ActualFilterBody(props) {
4267
4267
  const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
4268
- const togglable_filters = $3hooq$solidjs.createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => {
4268
+ const withMaybeCount0Removed = $3hooq$solidjs.createMemo(() => {
4269
+ const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
4270
+ if (!props.hideCount0FilterOptions_()) return filters;
4271
+ return filters.map(filter => {
4272
+ const oldMeta = filter.meta;
4273
+ if (!oldMeta) return filter;
4274
+ const modifiedMeta = {
4275
+ ...oldMeta
4276
+ };
4277
+ if ("counts" in modifiedMeta)
4278
+ // Remove all count 0 filter options, important that counts is last option
4279
+ for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] && (modifiedMeta[key] = modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0));
4280
+ return {
4281
+ ...filter,
4282
+ meta: modifiedMeta
4283
+ };
4284
+ });
4285
+ });
4286
+ const togglable_filters = $3hooq$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => {
4269
4287
  var _item$meta;
4270
4288
  return item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.group_title;
4271
4289
  }));
4272
- const untogglable_filters = $3hooq$solidjs.createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => {
4290
+ const untogglable_filters = $3hooq$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => {
4273
4291
  var _item$meta2;
4274
4292
  return !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.group_title);
4275
4293
  }));
@@ -4294,9 +4312,7 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
4294
4312
  },
4295
4313
  get children() {
4296
4314
  return (() => {
4297
- const filter_array_ = $3hooq$solidjs.createMemo(() => {
4298
- return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
4299
- });
4315
+ const filter_array_ = $3hooq$solidjs.createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
4300
4316
  const {
4301
4317
  SearchThisFilterGroup_: SearchThisFilterGroup_,
4302
4318
  searched_filter_array_: searched_filter_array_,
@@ -4990,7 +5006,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
4990
5006
  local_filter_cache_: local_filter_cache_,
4991
5007
  get_extra_filters_button_: get_extra_filters_button_,
4992
5008
  get_extra_sorting_button_: get_extra_sorting_button_,
4993
- filterModalParent_: filterModalParent_
5009
+ filterModalParent_: filterModalParent_,
5010
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4994
5011
  } = _ref;
4995
5012
  const Self = () => {
4996
5013
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -5025,7 +5042,8 @@ function $f70cc6dfcadf0fd5$export$d7841e452f2e59a8(_ref) {
5025
5042
  available_filters_: available_filters_,
5026
5043
  expanded_filters_: expanded_filters_,
5027
5044
  selected_filters_: selected_filters_,
5028
- i18n_: i18n_
5045
+ i18n_: i18n_,
5046
+ hideCount0FilterOptions_: hideCount0FilterOptions_
5029
5047
  };
5030
5048
  const hide_filters = $3hooq$solidjs.createMemo(() => $8b9c2fa4593b29df$export$50f68cc9882e36a4(filter_options));
5031
5049
  const sorting_options = {
@@ -6593,7 +6611,7 @@ function $f3db423dc84bc35d$export$140423fa4bfb6d63(props) {
6593
6611
  customUrls: $f3db423dc84bc35d$var$customUrls
6594
6612
  }));
6595
6613
  }
6596
- var $c19709057a32b2e7$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video>'];
6614
+ var $c19709057a32b2e7$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop="" disablepictureinpicture="true" class="d-standard-content"></video>'];
6597
6615
  function $c19709057a32b2e7$export$780a853d15174484(_ref) {
6598
6616
  let {
6599
6617
  link_: link_,
@@ -6784,7 +6802,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
6784
6802
  filter_query_param_prefix_: filter_query_param_prefix_,
6785
6803
  content_blocks_by_row_: content_blocks_by_row_,
6786
6804
  filterModalParent_: filterModalParent_,
6787
- showSliderArrow_: showSliderArrow_
6805
+ showSliderArrow_: showSliderArrow_,
6806
+ hideCount0FilterOptions_: hideCount0FilterOptions_
6788
6807
  } = _ref;
6789
6808
  let results_for;
6790
6809
  let only_show_filters_opener_;
@@ -7006,6 +7025,7 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
7006
7025
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
7007
7026
  sort_and_filter_disabled_: sort_and_filter_disabled_,
7008
7027
  filterModalParent_: filterModalParent_,
7028
+ hideCount0FilterOptions_: hideCount0FilterOptions_,
7009
7029
  ...extra_sort_and_filter_args_
7010
7030
  });
7011
7031
  $3hooq$depictaiutilisharedlatest.catchify((0, $fef4890f1f8e0544$export$6e49da55e449af7c))({
@@ -12740,7 +12760,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
12740
12760
  BackIcon_: BackIcon_,
12741
12761
  filterModalParent_: filterModalParent_,
12742
12762
  class_: class_,
12743
- showSliderArrow_: showSliderArrow_
12763
+ showSliderArrow_: showSliderArrow_,
12764
+ hideCount0FilterOptions_: hideCount0FilterOptions_
12744
12765
  } = _ref;
12745
12766
  const [get_sorting] = current_sorting_;
12746
12767
  const all_products_loaded_ = $3hooq$solidjs.createSignal(false);
@@ -12860,7 +12881,8 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
12860
12881
  local_filter_cache_: local_filter_cache_,
12861
12882
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
12862
12883
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
12863
- filterModalParent_: filterModalParent_
12884
+ filterModalParent_: filterModalParent_,
12885
+ hideCount0FilterOptions_: hideCount0FilterOptions_
12864
12886
  });
12865
12887
  const results_filters = $3hooq$solidjs.createSignal();
12866
12888
  const shouldActuallyShowInputField = $3hooq$solidjs.createMemo(() => {
@@ -13588,7 +13610,11 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
13588
13610
  })),
13589
13611
  filterModalParent_: $3hooq$solidjs.untrack(() => props.filterModalParent_),
13590
13612
  product_card_template_: product_card_template,
13591
- class_: () => props.class
13613
+ class_: () => props.class,
13614
+ hideCount0FilterOptions_: () => {
13615
+ var _props$hideCount0Filt;
13616
+ return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
13617
+ }
13592
13618
  });
13593
13619
  }, "Entire SearchPage failed");
13594
13620
  }
@@ -14246,6 +14272,10 @@ function $c10e33c4681f8c9b$export$e2bf8ce7779e827e(props) {
14246
14272
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
14247
14273
  content_blocks_by_row_: () => props.content_blocks_by_row,
14248
14274
  showSliderArrow_: () => props.showSliderArrow_,
14275
+ hideCount0FilterOptions_: () => {
14276
+ var _props$hideCount0Filt;
14277
+ return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
14278
+ },
14249
14279
  scroll_restoration_data_: scroll_restoration_data_,
14250
14280
  history_content_blocks_: history_content_blocks_,
14251
14281
  layout_options_: $3hooq$solidjs.createMemo(() => ({
@@ -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.8";
14
+ export const version = "4.10.0";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1046,6 +1046,7 @@ interface FilterBodyProps {
1046
1046
  expanded_: boolean;
1047
1047
  }[]>;
1048
1048
  are_in_modal_?: boolean;
1049
+ hideCount0FilterOptions_: Accessor<boolean>;
1049
1050
  }
1050
1051
  export function FilterBody(props: FilterBodyProps): JSX.Element;
1051
1052
  /**
@@ -1500,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
1500
1501
  filterModalParent_?: HTMLElement | ShadowRoot;
1501
1502
  class?: string;
1502
1503
  showSliderArrow_?: boolean;
1504
+ hideCount0FilterOptions_?: boolean;
1503
1505
  }): import("@depict-ai/utilishared").Node_Array;
1504
1506
  /**
1505
1507
  * Connects the height of the search field to the height of the aligner.
@@ -1539,7 +1541,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1539
1541
  * Open the modal with support for alignment.
1540
1542
  * @returns {void}
1541
1543
  */
1542
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1544
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1543
1545
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1544
1546
  export interface PageReplacer {
1545
1547
  readonly render_: () => Node_Array;
@@ -1619,5 +1621,6 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1619
1621
  layout?: PossibleLayout;
1620
1622
  filterModalParent_?: HTMLElement | ShadowRoot;
1621
1623
  showSliderArrow_?: boolean;
1622
- }): import("@depict-ai/utilishared").Node_Array;
1624
+ hideCount0FilterOptions_?: boolean;
1625
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1623
1626
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -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.8";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.10.0";
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 => {
@@ -4160,11 +4160,29 @@ function $f6b0500577e1b210$export$3f1a388cc0d8fed7(props) {
4160
4160
  }
4161
4161
  function $f6b0500577e1b210$var$ActualFilterBody(props) {
4162
4162
  const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
4163
- const togglable_filters = $b8hua$createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => {
4163
+ const withMaybeCount0Removed = $b8hua$createMemo(() => {
4164
+ const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
4165
+ if (!props.hideCount0FilterOptions_()) return filters;
4166
+ return filters.map(filter => {
4167
+ const oldMeta = filter.meta;
4168
+ if (!oldMeta) return filter;
4169
+ const modifiedMeta = {
4170
+ ...oldMeta
4171
+ };
4172
+ if ("counts" in modifiedMeta)
4173
+ // Remove all count 0 filter options, important that counts is last option
4174
+ for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] && (modifiedMeta[key] = modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0));
4175
+ return {
4176
+ ...filter,
4177
+ meta: modifiedMeta
4178
+ };
4179
+ });
4180
+ });
4181
+ const togglable_filters = $b8hua$createMemo(() => withMaybeCount0Removed().filter(item => {
4164
4182
  var _item$meta;
4165
4183
  return item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.group_title;
4166
4184
  }));
4167
- const untogglable_filters = $b8hua$createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => {
4185
+ const untogglable_filters = $b8hua$createMemo(() => withMaybeCount0Removed().filter(item => {
4168
4186
  var _item$meta2;
4169
4187
  return !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.group_title);
4170
4188
  }));
@@ -4189,9 +4207,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
4189
4207
  },
4190
4208
  get children() {
4191
4209
  return (() => {
4192
- const filter_array_ = $b8hua$createMemo(() => {
4193
- return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
4194
- });
4210
+ const filter_array_ = $b8hua$createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
4195
4211
  const {
4196
4212
  SearchThisFilterGroup_: SearchThisFilterGroup_,
4197
4213
  searched_filter_array_: searched_filter_array_,
@@ -4885,7 +4901,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
4885
4901
  local_filter_cache_: local_filter_cache_,
4886
4902
  get_extra_filters_button_: get_extra_filters_button_,
4887
4903
  get_extra_sorting_button_: get_extra_sorting_button_,
4888
- filterModalParent_: filterModalParent_
4904
+ filterModalParent_: filterModalParent_,
4905
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4889
4906
  } = _ref;
4890
4907
  const Self = () => {
4891
4908
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -4920,7 +4937,8 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
4920
4937
  available_filters_: available_filters_,
4921
4938
  expanded_filters_: expanded_filters_,
4922
4939
  selected_filters_: selected_filters_,
4923
- i18n_: i18n_
4940
+ i18n_: i18n_,
4941
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4924
4942
  };
4925
4943
  const hide_filters = $b8hua$createMemo(() => $6fcb97029a69ec44$export$50f68cc9882e36a4(filter_options));
4926
4944
  const sorting_options = {
@@ -6488,7 +6506,7 @@ function $98688279b9059f50$export$140423fa4bfb6d63(props) {
6488
6506
  customUrls: $98688279b9059f50$var$customUrls
6489
6507
  }));
6490
6508
  }
6491
- var $3b772ef9a35560fe$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video>'];
6509
+ var $3b772ef9a35560fe$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop="" disablepictureinpicture="true" class="d-standard-content"></video>'];
6492
6510
  function $3b772ef9a35560fe$export$780a853d15174484(_ref) {
6493
6511
  let {
6494
6512
  link_: link_,
@@ -6679,7 +6697,8 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
6679
6697
  filter_query_param_prefix_: filter_query_param_prefix_,
6680
6698
  content_blocks_by_row_: content_blocks_by_row_,
6681
6699
  filterModalParent_: filterModalParent_,
6682
- showSliderArrow_: showSliderArrow_
6700
+ showSliderArrow_: showSliderArrow_,
6701
+ hideCount0FilterOptions_: hideCount0FilterOptions_
6683
6702
  } = _ref;
6684
6703
  let results_for;
6685
6704
  let only_show_filters_opener_;
@@ -6901,6 +6920,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
6901
6920
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
6902
6921
  sort_and_filter_disabled_: sort_and_filter_disabled_,
6903
6922
  filterModalParent_: filterModalParent_,
6923
+ hideCount0FilterOptions_: hideCount0FilterOptions_,
6904
6924
  ...extra_sort_and_filter_args_
6905
6925
  });
6906
6926
  $b8hua$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
@@ -12635,7 +12655,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
12635
12655
  BackIcon_: BackIcon_,
12636
12656
  filterModalParent_: filterModalParent_,
12637
12657
  class_: class_,
12638
- showSliderArrow_: showSliderArrow_
12658
+ showSliderArrow_: showSliderArrow_,
12659
+ hideCount0FilterOptions_: hideCount0FilterOptions_
12639
12660
  } = _ref;
12640
12661
  const [get_sorting] = current_sorting_;
12641
12662
  const all_products_loaded_ = $b8hua$createSignal(false);
@@ -12755,7 +12776,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
12755
12776
  local_filter_cache_: local_filter_cache_,
12756
12777
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
12757
12778
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
12758
- filterModalParent_: filterModalParent_
12779
+ filterModalParent_: filterModalParent_,
12780
+ hideCount0FilterOptions_: hideCount0FilterOptions_
12759
12781
  });
12760
12782
  const results_filters = $b8hua$createSignal();
12761
12783
  const shouldActuallyShowInputField = $b8hua$createMemo(() => {
@@ -13483,7 +13505,11 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
13483
13505
  })),
13484
13506
  filterModalParent_: $b8hua$untrack(() => props.filterModalParent_),
13485
13507
  product_card_template_: product_card_template,
13486
- class_: () => props.class
13508
+ class_: () => props.class,
13509
+ hideCount0FilterOptions_: () => {
13510
+ var _props$hideCount0Filt;
13511
+ return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
13512
+ }
13487
13513
  });
13488
13514
  }, "Entire SearchPage failed");
13489
13515
  }
@@ -14141,6 +14167,10 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
14141
14167
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
14142
14168
  content_blocks_by_row_: () => props.content_blocks_by_row,
14143
14169
  showSliderArrow_: () => props.showSliderArrow_,
14170
+ hideCount0FilterOptions_: () => {
14171
+ var _props$hideCount0Filt;
14172
+ return (_props$hideCount0Filt = props.hideCount0FilterOptions_) !== null && _props$hideCount0Filt !== void 0 ? _props$hideCount0Filt : false;
14173
+ },
14144
14174
  scroll_restoration_data_: scroll_restoration_data_,
14145
14175
  history_content_blocks_: history_content_blocks_,
14146
14176
  layout_options_: $b8hua$createMemo(() => ({
@@ -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.8";
112
+ const $b757f75811f3261f$export$83d89fbfd8236492 = "4.10.0";
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, ({
@@ -4037,8 +4037,26 @@ function $aff9a96d30ed3563$export$3f1a388cc0d8fed7(props) {
4037
4037
  }
4038
4038
  function $aff9a96d30ed3563$var$ActualFilterBody(props) {
4039
4039
  const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
4040
- const togglable_filters = $5vyXB$solidjs.createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => item?.meta?.group_title));
4041
- const untogglable_filters = $5vyXB$solidjs.createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => !item?.meta?.group_title));
4040
+ const withMaybeCount0Removed = $5vyXB$solidjs.createMemo(() => {
4041
+ const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
4042
+ if (!props.hideCount0FilterOptions_()) return filters;
4043
+ return filters.map(filter => {
4044
+ const oldMeta = filter.meta;
4045
+ if (!oldMeta) return filter;
4046
+ const modifiedMeta = {
4047
+ ...oldMeta
4048
+ };
4049
+ if ("counts" in modifiedMeta)
4050
+ // Remove all count 0 filter options, important that counts is last option
4051
+ for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] &&= modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0);
4052
+ return {
4053
+ ...filter,
4054
+ meta: modifiedMeta
4055
+ };
4056
+ });
4057
+ });
4058
+ const togglable_filters = $5vyXB$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => item?.meta?.group_title));
4059
+ const untogglable_filters = $5vyXB$solidjs.createMemo(() => withMaybeCount0Removed().filter(item => !item?.meta?.group_title));
4042
4060
  const togglable_filters_grouped_by_collapsible = $5vyXB$solidjs.createMemo(() => {
4043
4061
  const output = {};
4044
4062
  for (const filter of togglable_filters()) {
@@ -4059,9 +4077,7 @@ function $aff9a96d30ed3563$var$ActualFilterBody(props) {
4059
4077
  },
4060
4078
  get children() {
4061
4079
  return (() => {
4062
- const filter_array_ = $5vyXB$solidjs.createMemo(() => {
4063
- return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
4064
- });
4080
+ const filter_array_ = $5vyXB$solidjs.createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
4065
4081
  const {
4066
4082
  SearchThisFilterGroup_: SearchThisFilterGroup_,
4067
4083
  searched_filter_array_: searched_filter_array_,
@@ -4693,7 +4709,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
4693
4709
  local_filter_cache_: local_filter_cache_,
4694
4710
  get_extra_filters_button_: get_extra_filters_button_,
4695
4711
  get_extra_sorting_button_: get_extra_sorting_button_,
4696
- filterModalParent_: filterModalParent_
4712
+ filterModalParent_: filterModalParent_,
4713
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4697
4714
  }) {
4698
4715
  const Self = () => {
4699
4716
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -4724,7 +4741,8 @@ function $f8f64d05c525825b$export$d7841e452f2e59a8({
4724
4741
  available_filters_: available_filters_,
4725
4742
  expanded_filters_: expanded_filters_,
4726
4743
  selected_filters_: selected_filters_,
4727
- i18n_: i18n_
4744
+ i18n_: i18n_,
4745
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4728
4746
  };
4729
4747
  const hide_filters = $5vyXB$solidjs.createMemo(() => $7e91f9b0c6d56424$export$50f68cc9882e36a4(filter_options));
4730
4748
  const sorting_options = {
@@ -6215,7 +6233,7 @@ function $d212a67662c5cf38$export$140423fa4bfb6d63(props) {
6215
6233
  customUrls: $d212a67662c5cf38$var$customUrls
6216
6234
  }));
6217
6235
  }
6218
- var $32c662f618f5d80d$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video>'];
6236
+ var $32c662f618f5d80d$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop="" disablepictureinpicture="true" class="d-standard-content"></video>'];
6219
6237
  function $32c662f618f5d80d$export$780a853d15174484({
6220
6238
  link_: link_,
6221
6239
  type_: type_,
@@ -6395,7 +6413,8 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
6395
6413
  filter_query_param_prefix_: filter_query_param_prefix_,
6396
6414
  content_blocks_by_row_: content_blocks_by_row_,
6397
6415
  filterModalParent_: filterModalParent_,
6398
- showSliderArrow_: showSliderArrow_
6416
+ showSliderArrow_: showSliderArrow_,
6417
+ hideCount0FilterOptions_: hideCount0FilterOptions_
6399
6418
  }) {
6400
6419
  let results_for;
6401
6420
  let only_show_filters_opener_;
@@ -6599,6 +6618,7 @@ function $840d88a04b2d22a7$export$f7d2f673fc2f091d({
6599
6618
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
6600
6619
  sort_and_filter_disabled_: sort_and_filter_disabled_,
6601
6620
  filterModalParent_: filterModalParent_,
6621
+ hideCount0FilterOptions_: hideCount0FilterOptions_,
6602
6622
  ...extra_sort_and_filter_args_
6603
6623
  });
6604
6624
  $5vyXB$depictaiutilisharedlatest.catchify((0, $276380e4607fb9fb$export$6e49da55e449af7c))({
@@ -11945,7 +11965,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
11945
11965
  BackIcon_: BackIcon_,
11946
11966
  filterModalParent_: filterModalParent_,
11947
11967
  class_: class_,
11948
- showSliderArrow_: showSliderArrow_
11968
+ showSliderArrow_: showSliderArrow_,
11969
+ hideCount0FilterOptions_: hideCount0FilterOptions_
11949
11970
  }) {
11950
11971
  const [get_sorting] = current_sorting_;
11951
11972
  const all_products_loaded_ = $5vyXB$solidjs.createSignal(false);
@@ -12053,7 +12074,8 @@ function $f1d7cb69f839a526$export$a54ec244c8863715({
12053
12074
  local_filter_cache_: local_filter_cache_,
12054
12075
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
12055
12076
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
12056
- filterModalParent_: filterModalParent_
12077
+ filterModalParent_: filterModalParent_,
12078
+ hideCount0FilterOptions_: hideCount0FilterOptions_
12057
12079
  });
12058
12080
  const results_filters = $5vyXB$solidjs.createSignal();
12059
12081
  const shouldActuallyShowInputField = $5vyXB$solidjs.createMemo(() => include_input_field_?.() ?? true); // default to showing input field
@@ -12687,7 +12709,8 @@ function $2c61e4cd8229c49a$export$f2dc7e4e4aa11abb(props) {
12687
12709
  })),
12688
12710
  filterModalParent_: $5vyXB$solidjs.untrack(() => props.filterModalParent_),
12689
12711
  product_card_template_: product_card_template,
12690
- class_: () => props.class
12712
+ class_: () => props.class,
12713
+ hideCount0FilterOptions_: () => props.hideCount0FilterOptions_ ?? false
12691
12714
  });
12692
12715
  }, "Entire SearchPage failed");
12693
12716
  }
@@ -13241,6 +13264,7 @@ function $14f289047713d67a$export$e2bf8ce7779e827e(props) {
13241
13264
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
13242
13265
  content_blocks_by_row_: () => props.content_blocks_by_row,
13243
13266
  showSliderArrow_: () => props.showSliderArrow_,
13267
+ hideCount0FilterOptions_: () => props.hideCount0FilterOptions_ ?? false,
13244
13268
  scroll_restoration_data_: scroll_restoration_data_,
13245
13269
  history_content_blocks_: history_content_blocks_,
13246
13270
  layout_options_: $5vyXB$solidjs.createMemo(() => ({
@@ -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.8";
14
+ export const version = "4.10.0";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -1046,6 +1046,7 @@ interface FilterBodyProps {
1046
1046
  expanded_: boolean;
1047
1047
  }[]>;
1048
1048
  are_in_modal_?: boolean;
1049
+ hideCount0FilterOptions_: Accessor<boolean>;
1049
1050
  }
1050
1051
  export function FilterBody(props: FilterBodyProps): JSX.Element;
1051
1052
  /**
@@ -1500,6 +1501,7 @@ export function SearchPage<OriginalDisplay extends Display, TransformedDisplay e
1500
1501
  filterModalParent_?: HTMLElement | ShadowRoot;
1501
1502
  class?: string;
1502
1503
  showSliderArrow_?: boolean;
1504
+ hideCount0FilterOptions_?: boolean;
1503
1505
  }): import("@depict-ai/utilishared").Node_Array;
1504
1506
  /**
1505
1507
  * Connects the height of the search field to the height of the aligner.
@@ -1539,7 +1541,7 @@ type OpenModalParams<OriginalDisplay extends Display, OutputDisplay extends Mode
1539
1541
  * Open the modal with support for alignment.
1540
1542
  * @returns {void}
1541
1543
  */
1542
- export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends unknown>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1544
+ export const open_modal_with_alignment: <OriginalDisplay extends Display, OutputDisplay extends ModernDisplay>(openModalParams: OpenModalParams<OriginalDisplay, OutputDisplay>) => void;
1543
1545
  export function open_search_with_shift_slash(open_search: VoidFunction): () => void;
1544
1546
  export interface PageReplacer {
1545
1547
  readonly render_: () => Node_Array;
@@ -1619,5 +1621,6 @@ export function CategoryPage<OriginalDisplay extends Display, OutputDisplay exte
1619
1621
  layout?: PossibleLayout;
1620
1622
  filterModalParent_?: HTMLElement | ShadowRoot;
1621
1623
  showSliderArrow_?: boolean;
1622
- }): import("@depict-ai/utilishared").Node_Array;
1624
+ hideCount0FilterOptions_?: boolean;
1625
+ }): import("@depict-ai/utilishared/latest").Node_Array;
1623
1626
  export type { SearchFilter } from "@depict-ai/types/api/SearchRequestV3";
@@ -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.8";
10
+ const $ec291e0010116877$export$83d89fbfd8236492 = "4.10.0";
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, ({
@@ -3935,8 +3935,26 @@ function $fab07f52c9861732$export$3f1a388cc0d8fed7(props) {
3935
3935
  }
3936
3936
  function $fab07f52c9861732$var$ActualFilterBody(props) {
3937
3937
  const [modified_available_filters_with_selected_unexisting_ones_injected_from_local_state] = props.local_filter_cache_;
3938
- const togglable_filters = $i7OB2$createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => item?.meta?.group_title));
3939
- const untogglable_filters = $i7OB2$createMemo(() => modified_available_filters_with_selected_unexisting_ones_injected_from_local_state().filter(item => !item?.meta?.group_title));
3938
+ const withMaybeCount0Removed = $i7OB2$createMemo(() => {
3939
+ const filters = modified_available_filters_with_selected_unexisting_ones_injected_from_local_state();
3940
+ if (!props.hideCount0FilterOptions_()) return filters;
3941
+ return filters.map(filter => {
3942
+ const oldMeta = filter.meta;
3943
+ if (!oldMeta) return filter;
3944
+ const modifiedMeta = {
3945
+ ...oldMeta
3946
+ };
3947
+ if ("counts" in modifiedMeta)
3948
+ // Remove all count 0 filter options, important that counts is last option
3949
+ for (const key of ["names", "values", "swatches", "counts"]) modifiedMeta[key] &&= modifiedMeta[key].filter((_, index) => modifiedMeta.counts[index] !== 0);
3950
+ return {
3951
+ ...filter,
3952
+ meta: modifiedMeta
3953
+ };
3954
+ });
3955
+ });
3956
+ const togglable_filters = $i7OB2$createMemo(() => withMaybeCount0Removed().filter(item => item?.meta?.group_title));
3957
+ const untogglable_filters = $i7OB2$createMemo(() => withMaybeCount0Removed().filter(item => !item?.meta?.group_title));
3940
3958
  const togglable_filters_grouped_by_collapsible = $i7OB2$createMemo(() => {
3941
3959
  const output = {};
3942
3960
  for (const filter of togglable_filters()) {
@@ -3957,9 +3975,7 @@ function $fab07f52c9861732$var$ActualFilterBody(props) {
3957
3975
  },
3958
3976
  get children() {
3959
3977
  return (() => {
3960
- const filter_array_ = $i7OB2$createMemo(() => {
3961
- return Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()];
3962
- });
3978
+ const filter_array_ = $i7OB2$createMemo(() => Object.values(togglable_filters_grouped_by_collapsible())[get_section_index()]);
3963
3979
  const {
3964
3980
  SearchThisFilterGroup_: SearchThisFilterGroup_,
3965
3981
  searched_filter_array_: searched_filter_array_,
@@ -4591,7 +4607,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
4591
4607
  local_filter_cache_: local_filter_cache_,
4592
4608
  get_extra_filters_button_: get_extra_filters_button_,
4593
4609
  get_extra_sorting_button_: get_extra_sorting_button_,
4594
- filterModalParent_: filterModalParent_
4610
+ filterModalParent_: filterModalParent_,
4611
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4595
4612
  }) {
4596
4613
  const Self = () => {
4597
4614
  // This could technically be in SearchPage and CategoryPage and would be better suited there since it writes into local_filter_cache_ which i.e. SelectedFilters uses, but it's better suited here IMO due to DRY and being inside the correct error boundary here
@@ -4622,7 +4639,8 @@ function $cdea4cf8c5c071ef$export$d7841e452f2e59a8({
4622
4639
  available_filters_: available_filters_,
4623
4640
  expanded_filters_: expanded_filters_,
4624
4641
  selected_filters_: selected_filters_,
4625
- i18n_: i18n_
4642
+ i18n_: i18n_,
4643
+ hideCount0FilterOptions_: hideCount0FilterOptions_
4626
4644
  };
4627
4645
  const hide_filters = $i7OB2$createMemo(() => $4cc1c021eee2a432$export$50f68cc9882e36a4(filter_options));
4628
4646
  const sorting_options = {
@@ -6113,7 +6131,7 @@ function $70bb27cc6be01fc7$export$140423fa4bfb6d63(props) {
6113
6131
  customUrls: $70bb27cc6be01fc7$var$customUrls
6114
6132
  }));
6115
6133
  }
6116
- var $f916989c4b1be9f7$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop class="d-standard-content"></video>'];
6134
+ var $f916989c4b1be9f7$var$_tmpl$ = ["<video", ' muted="" autoplay="" playsinline="" loop="" disablepictureinpicture="true" class="d-standard-content"></video>'];
6117
6135
  function $f916989c4b1be9f7$export$780a853d15174484({
6118
6136
  link_: link_,
6119
6137
  type_: type_,
@@ -6293,7 +6311,8 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
6293
6311
  filter_query_param_prefix_: filter_query_param_prefix_,
6294
6312
  content_blocks_by_row_: content_blocks_by_row_,
6295
6313
  filterModalParent_: filterModalParent_,
6296
- showSliderArrow_: showSliderArrow_
6314
+ showSliderArrow_: showSliderArrow_,
6315
+ hideCount0FilterOptions_: hideCount0FilterOptions_
6297
6316
  }) {
6298
6317
  let results_for;
6299
6318
  let only_show_filters_opener_;
@@ -6497,6 +6516,7 @@ function $df5d81d0fe61ff21$export$f7d2f673fc2f091d({
6497
6516
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
6498
6517
  sort_and_filter_disabled_: sort_and_filter_disabled_,
6499
6518
  filterModalParent_: filterModalParent_,
6519
+ hideCount0FilterOptions_: hideCount0FilterOptions_,
6500
6520
  ...extra_sort_and_filter_args_
6501
6521
  });
6502
6522
  $i7OB2$catchify((0, $641bba2917fe862b$export$6e49da55e449af7c))({
@@ -11843,7 +11863,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
11843
11863
  BackIcon_: BackIcon_,
11844
11864
  filterModalParent_: filterModalParent_,
11845
11865
  class_: class_,
11846
- showSliderArrow_: showSliderArrow_
11866
+ showSliderArrow_: showSliderArrow_,
11867
+ hideCount0FilterOptions_: hideCount0FilterOptions_
11847
11868
  }) {
11848
11869
  const [get_sorting] = current_sorting_;
11849
11870
  const all_products_loaded_ = $i7OB2$createSignal(false);
@@ -11951,7 +11972,8 @@ function $7097477c78a89208$export$a54ec244c8863715({
11951
11972
  local_filter_cache_: local_filter_cache_,
11952
11973
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
11953
11974
  number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
11954
- filterModalParent_: filterModalParent_
11975
+ filterModalParent_: filterModalParent_,
11976
+ hideCount0FilterOptions_: hideCount0FilterOptions_
11955
11977
  });
11956
11978
  const results_filters = $i7OB2$createSignal();
11957
11979
  const shouldActuallyShowInputField = $i7OB2$createMemo(() => include_input_field_?.() ?? true); // default to showing input field
@@ -12585,7 +12607,8 @@ function $806c97b931758897$export$f2dc7e4e4aa11abb(props) {
12585
12607
  })),
12586
12608
  filterModalParent_: $i7OB2$untrack(() => props.filterModalParent_),
12587
12609
  product_card_template_: product_card_template,
12588
- class_: () => props.class
12610
+ class_: () => props.class,
12611
+ hideCount0FilterOptions_: () => props.hideCount0FilterOptions_ ?? false
12589
12612
  });
12590
12613
  }, "Entire SearchPage failed");
12591
12614
  }
@@ -13139,6 +13162,7 @@ function $442f32a4d80abbde$export$e2bf8ce7779e827e(props) {
13139
13162
  sideways_filter_clearing_flag_: sideways_filter_clearing_flag_,
13140
13163
  content_blocks_by_row_: () => props.content_blocks_by_row,
13141
13164
  showSliderArrow_: () => props.showSliderArrow_,
13165
+ hideCount0FilterOptions_: () => props.hideCount0FilterOptions_ ?? false,
13142
13166
  scroll_restoration_data_: scroll_restoration_data_,
13143
13167
  history_content_blocks_: history_content_blocks_,
13144
13168
  layout_options_: $i7OB2$createMemo(() => ({