@depict-ai/ui 2.0.5 → 2.0.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.js CHANGED
@@ -8,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.5";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.7";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -64,38 +64,6 @@ const $a9c7ba6087881ac2$export$6daf8749b65a1b77 = cols_at_size => {
64
64
  });
65
65
  return $a9c7ba6087881ac2$var$transform_elements(sorted_cols_at_size);
66
66
  };
67
-
68
- /**
69
- * Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
70
- */
71
- function $3f7203368ad0d3ca$export$ff7109b9b2b206ba(sdk_cols_at_size) {
72
- let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
73
- if (!sdk_cols_at_size.length) return sdk_cols_at_size;
74
- const sorted_sizes = sdk_cols_at_size.map(_ref => {
75
- let [cols, max_width] = _ref;
76
- return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
77
- }).sort((_ref2, _ref3) => {
78
- let [, a] = _ref2;
79
- let [, b] = _ref3;
80
- return a - b;
81
- });
82
- const [[, smallest_max_width]] = sorted_sizes;
83
- if (smallest_max_width > min_width_for_more_than_one_column)
84
- // If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
85
- return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
86
- const to_delete = [];
87
- for (let i = 0; i < sorted_sizes.length; i++) {
88
- const [, max_width] = sorted_sizes[i];
89
- if (max_width > min_width_for_more_than_one_column) continue;
90
- to_delete.push(i);
91
- }
92
- while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
93
- sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
94
- return sorted_sizes.map(_ref4 => {
95
- let [cols, max_width] = _ref4;
96
- return max_width == Infinity ? [cols] : [cols, max_width];
97
- });
98
- }
99
67
  function $ca55612a53dbbdd2$export$a2cc176055f8f08() {
100
68
  const text = "Please try setting `colsAtSize` on the `SearchPage`/`CategoryPage` components to change the grid before setting it with CSS. If you do with CSS, set `ColsAtSize` to an empty array to ensure no declarations created by the SDK leak through.";
101
69
  return (0, $8tj43$isServer) ? {
@@ -644,7 +612,7 @@ function $d5d7e58c5c9d8db0$export$9574e176201e5e8d(props) {
644
612
  market_: () => props.market,
645
613
  merchant_: () => props.merchant,
646
614
  layout_options_: $8tj43$createMemo(() => ({
647
- cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77($3f7203368ad0d3ca$export$ff7109b9b2b206ba(props.cols_at_size)),
615
+ cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
648
616
  ...grid_spacing_override()
649
617
  }))
650
618
  }));
@@ -764,7 +732,7 @@ function $b432b11321ad4c97$export$9756467d34d91cdb(props) {
764
732
  market_: () => props.market,
765
733
  merchant_: () => props.merchant,
766
734
  layout_options_: $8tj43$createMemo(() => ({
767
- cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77($3f7203368ad0d3ca$export$ff7109b9b2b206ba(props.cols_at_size)),
735
+ cols_at_size: $a9c7ba6087881ac2$export$6daf8749b65a1b77(props.cols_at_size),
768
736
  ...grid_spacing_override()
769
737
  }))
770
738
  }));
@@ -1861,6 +1829,7 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
1861
1829
  const [get_current_range] = current_range_;
1862
1830
  const pre_price = $8tj43$createMemo(() => price_formatting_().pre_);
1863
1831
  const post_price = $8tj43$createMemo(() => price_formatting_().post_);
1832
+ const should_be_disabled_ = $8tj43$createMemo(() => Math.abs(min_() - max_()) < 2);
1864
1833
  return (() => {
1865
1834
  const _el$ = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$),
1866
1835
  _el$2 = _el$.firstChild,
@@ -1908,7 +1877,8 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
1908
1877
  max_: max_,
1909
1878
  min_: min_,
1910
1879
  current_range_: current_range_,
1911
- i18n_: i18n_
1880
+ i18n_: i18n_,
1881
+ should_be_disabled_: should_be_disabled_
1912
1882
  }), _el$24, _co$7);
1913
1883
  $8tj43$insert(_el$9, pre_price, _el$11, _co$);
1914
1884
  $8tj43$insert(_el$9, $8tj43$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
@@ -1931,18 +1901,24 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
1931
1901
  }), _el$20, _co$5);
1932
1902
  $8tj43$insert(_el$16, post_price, _el$22, _co$6);
1933
1903
  $8tj43$effect(_p$ => {
1934
- const _v$ = i18n_.range_filter_low_point_aria_label_(),
1935
- _v$2 = min_(),
1936
- _v$3 = max_(),
1937
- _v$4 = i18n_.range_filter_high_point_aria_label_(),
1938
- _v$5 = min_(),
1939
- _v$6 = max_();
1940
- _v$ !== _p$._v$ && $8tj43$setAttribute(_el$4, "aria-label", _p$._v$ = _v$);
1941
- _v$2 !== _p$._v$2 && $8tj43$setAttribute(_el$4, "min", _p$._v$2 = _v$2);
1942
- _v$3 !== _p$._v$3 && $8tj43$setAttribute(_el$4, "max", _p$._v$3 = _v$3);
1943
- _v$4 !== _p$._v$4 && $8tj43$setAttribute(_el$7, "aria-label", _p$._v$4 = _v$4);
1944
- _v$5 !== _p$._v$5 && $8tj43$setAttribute(_el$7, "min", _p$._v$5 = _v$5);
1945
- _v$6 !== _p$._v$6 && $8tj43$setAttribute(_el$7, "max", _p$._v$6 = _v$6);
1904
+ const _v$ = !!(min_() === max_()),
1905
+ _v$2 = should_be_disabled_(),
1906
+ _v$3 = i18n_.range_filter_low_point_aria_label_(),
1907
+ _v$4 = min_(),
1908
+ _v$5 = max_(),
1909
+ _v$6 = should_be_disabled_(),
1910
+ _v$7 = i18n_.range_filter_high_point_aria_label_(),
1911
+ _v$8 = min_(),
1912
+ _v$9 = max_();
1913
+ _v$ !== _p$._v$ && _el$.classList.toggle("disabled", _p$._v$ = _v$);
1914
+ _v$2 !== _p$._v$2 && (_el$4.disabled = _p$._v$2 = _v$2);
1915
+ _v$3 !== _p$._v$3 && $8tj43$setAttribute(_el$4, "aria-label", _p$._v$3 = _v$3);
1916
+ _v$4 !== _p$._v$4 && $8tj43$setAttribute(_el$4, "min", _p$._v$4 = _v$4);
1917
+ _v$5 !== _p$._v$5 && $8tj43$setAttribute(_el$4, "max", _p$._v$5 = _v$5);
1918
+ _v$6 !== _p$._v$6 && (_el$7.disabled = _p$._v$6 = _v$6);
1919
+ _v$7 !== _p$._v$7 && $8tj43$setAttribute(_el$7, "aria-label", _p$._v$7 = _v$7);
1920
+ _v$8 !== _p$._v$8 && $8tj43$setAttribute(_el$7, "min", _p$._v$8 = _v$8);
1921
+ _v$9 !== _p$._v$9 && $8tj43$setAttribute(_el$7, "max", _p$._v$9 = _v$9);
1946
1922
  return _p$;
1947
1923
  }, {
1948
1924
  _v$: undefined,
@@ -1950,7 +1926,10 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
1950
1926
  _v$3: undefined,
1951
1927
  _v$4: undefined,
1952
1928
  _v$5: undefined,
1953
- _v$6: undefined
1929
+ _v$6: undefined,
1930
+ _v$7: undefined,
1931
+ _v$8: undefined,
1932
+ _v$9: undefined
1954
1933
  });
1955
1934
  $8tj43$effect(() => _el$4.value = get_current_range()[0]);
1956
1935
  $8tj43$effect(() => _el$7.value = get_current_range()[1]);
@@ -1963,7 +1942,8 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref6) {
1963
1942
  current_range_: current_range_,
1964
1943
  min_: min_,
1965
1944
  i18n_: i18n_,
1966
- max_: max_
1945
+ max_: max_,
1946
+ should_be_disabled_: should_be_disabled_
1967
1947
  } = _ref6;
1968
1948
  // inspired by https://observablehq.com/@mbostock/nonlinear-slider
1969
1949
  const transform_linear_to_nonlinear = _ref7 => {
@@ -1971,8 +1951,7 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref6) {
1971
1951
  return [Math.sqrt(smaller), Math.sqrt(larger)];
1972
1952
  };
1973
1953
  const [read_current_range, write_current_range] = current_range_;
1974
- const modified_range = $8tj43$createSignal(transform_linear_to_nonlinear($8tj43$untrack(read_current_range)));
1975
- const [read_modified_range, write_modified_range] = modified_range;
1954
+ const modified_range_accessor = $8tj43$createMemo(() => transform_linear_to_nonlinear(read_current_range()));
1976
1955
  const modified_max = $8tj43$createMemo(() => Math.sqrt(max_()));
1977
1956
  const modified_min = $8tj43$createMemo(() => Math.sqrt(min_()));
1978
1957
  const offset_value_calculator_ = (value, how_many) => {
@@ -1980,36 +1959,39 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref6) {
1980
1959
  const changed = number_in_linear + how_many;
1981
1960
  return Math.sqrt(changed);
1982
1961
  };
1983
- $8tj43$createComputed($8tj43$on(read_current_range, new_range_from_above => {
1984
- // to prevent from infinite looping, don't write if it's around the same
1985
- const new_modified_range = transform_linear_to_nonlinear(new_range_from_above);
1986
- const current_modified_range = read_modified_range();
1987
- if (!current_modified_range.every((item, index) => Math.round(item) === Math.round(new_modified_range[index]))) write_modified_range(new_modified_range);
1988
- }, {
1989
- defer: true
1990
- }));
1991
- $8tj43$createComputed($8tj43$on(read_modified_range, _ref8 => {
1992
- let [smaller, larger] = _ref8;
1993
- return write_current_range([Math.round(smaller * smaller), Math.round(larger * larger)]);
1994
- }, {
1995
- defer: true
1996
- }));
1962
+ const convert_back = (smaller, larger) => [Math.round(smaller * smaller), Math.round(larger * larger)];
1963
+ const modified_range_setter = new_range_or_function => {
1964
+ const old_range = $8tj43$untrack(modified_range_accessor);
1965
+ const new_range = typeof new_range_or_function === "function" ? new_range_or_function(old_range) : new_range_or_function;
1966
+ const [smaller, larger] = new_range;
1967
+ const [old_smaller, old_larger] = old_range;
1968
+ const new_range_converted = convert_back(smaller, larger);
1969
+ const old_range_converted = convert_back(old_smaller, old_larger);
1970
+ if (new_range_converted[0] === old_range_converted[0] && new_range_converted[1] === old_range_converted[1])
1971
+ // If the new value gets identical rounding errors to the old value when being converted back, don't write it to the signal since it would cause an infinite loop
1972
+ return new_range;
1973
+ write_current_range(new_range_converted);
1974
+ return new_range;
1975
+ };
1997
1976
  return $1e7465a8ffa97f6c$var$LinearSlider({
1998
- current_range_: modified_range,
1977
+ current_range_: [modified_range_accessor, modified_range_setter],
1978
+ // "Lie" to the actual slider so we don't have to implement exponential handling in there
1999
1979
  min_: modified_min,
2000
1980
  max_: modified_max,
2001
1981
  offset_value_calculator_: offset_value_calculator_,
2002
- i18n_: i18n_
1982
+ i18n_: i18n_,
1983
+ should_be_disabled_: should_be_disabled_
2003
1984
  });
2004
1985
  }
2005
- function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
1986
+ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
2006
1987
  let {
2007
1988
  max_: max_,
2008
1989
  min_: min_,
2009
1990
  current_range_: current_range_,
2010
1991
  offset_value_calculator_: offset_value_calculator_,
2011
- i18n_: i18n_
2012
- } = _ref9;
1992
+ i18n_: i18n_,
1993
+ should_be_disabled_: should_be_disabled_
1994
+ } = _ref8;
2013
1995
  let range_input_1;
2014
1996
  let range_input_2;
2015
1997
  let clickable_slider;
@@ -2018,6 +2000,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
2018
2000
  const min = min_();
2019
2001
  const span = max_() - min;
2020
2002
  const [start, end] = get_current_range();
2003
+ if (should_be_disabled_()) return "left:50%;right:50%";
2021
2004
  return "left:".concat((start - min) / span * 100, "%;right:").concat(100 - (end - min) / span * 100, "%");
2022
2005
  });
2023
2006
  const set_value = (el, index) => {
@@ -2067,26 +2050,32 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
2067
2050
  }, _el$29);
2068
2051
  $8tj43$addEventListener(_el$29, "input", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
2069
2052
  $8tj43$effect(_p$ => {
2070
- const _v$7 = i18n_.range_filter_low_point_aria_label_(),
2071
- _v$8 = min_(),
2072
- _v$9 = max_(),
2073
- _v$10 = i18n_.range_filter_high_point_aria_label_(),
2074
- _v$11 = min_(),
2075
- _v$12 = max_();
2076
- _v$7 !== _p$._v$7 && $8tj43$setAttribute(_el$28, "aria-label", _p$._v$7 = _v$7);
2077
- _v$8 !== _p$._v$8 && $8tj43$setAttribute(_el$28, "min", _p$._v$8 = _v$8);
2078
- _v$9 !== _p$._v$9 && $8tj43$setAttribute(_el$28, "max", _p$._v$9 = _v$9);
2079
- _v$10 !== _p$._v$10 && $8tj43$setAttribute(_el$29, "aria-label", _p$._v$10 = _v$10);
2080
- _v$11 !== _p$._v$11 && $8tj43$setAttribute(_el$29, "min", _p$._v$11 = _v$11);
2081
- _v$12 !== _p$._v$12 && $8tj43$setAttribute(_el$29, "max", _p$._v$12 = _v$12);
2053
+ const _v$10 = should_be_disabled_(),
2054
+ _v$11 = i18n_.range_filter_low_point_aria_label_(),
2055
+ _v$12 = min_(),
2056
+ _v$13 = max_(),
2057
+ _v$14 = should_be_disabled_(),
2058
+ _v$15 = i18n_.range_filter_high_point_aria_label_(),
2059
+ _v$16 = min_(),
2060
+ _v$17 = max_();
2061
+ _v$10 !== _p$._v$10 && (_el$28.disabled = _p$._v$10 = _v$10);
2062
+ _v$11 !== _p$._v$11 && $8tj43$setAttribute(_el$28, "aria-label", _p$._v$11 = _v$11);
2063
+ _v$12 !== _p$._v$12 && $8tj43$setAttribute(_el$28, "min", _p$._v$12 = _v$12);
2064
+ _v$13 !== _p$._v$13 && $8tj43$setAttribute(_el$28, "max", _p$._v$13 = _v$13);
2065
+ _v$14 !== _p$._v$14 && (_el$29.disabled = _p$._v$14 = _v$14);
2066
+ _v$15 !== _p$._v$15 && $8tj43$setAttribute(_el$29, "aria-label", _p$._v$15 = _v$15);
2067
+ _v$16 !== _p$._v$16 && $8tj43$setAttribute(_el$29, "min", _p$._v$16 = _v$16);
2068
+ _v$17 !== _p$._v$17 && $8tj43$setAttribute(_el$29, "max", _p$._v$17 = _v$17);
2082
2069
  return _p$;
2083
2070
  }, {
2084
- _v$7: undefined,
2085
- _v$8: undefined,
2086
- _v$9: undefined,
2087
2071
  _v$10: undefined,
2088
2072
  _v$11: undefined,
2089
- _v$12: undefined
2073
+ _v$12: undefined,
2074
+ _v$13: undefined,
2075
+ _v$14: undefined,
2076
+ _v$15: undefined,
2077
+ _v$16: undefined,
2078
+ _v$17: undefined
2090
2079
  });
2091
2080
  $8tj43$effect(() => _el$28.value = $8tj43$createMemo(() => {
2092
2081
  min_();
@@ -2396,59 +2385,62 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_) {
2396
2385
  return has_expandable();
2397
2386
  },
2398
2387
  get children() {
2399
- return $8tj43$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
2400
- get details_() {
2401
- return $8tj43$getNextElement($0ae614c5c7babb43$var$_tmpl$3);
2402
- },
2403
- get summary_() {
2404
- return (() => {
2405
- const _el$12 = $8tj43$getNextElement($0ae614c5c7babb43$var$_tmpl$4),
2406
- _el$13 = _el$12.firstChild,
2407
- _el$14 = _el$13.firstChild,
2408
- _el$15 = _el$14.nextSibling,
2409
- [_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling);
2410
- $8tj43$insert(_el$14, () => {
2411
- var _value10;
2412
- return (_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_;
2413
- });
2414
- $8tj43$insert(_el$13, $8tj43$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
2415
- i18n_: i18n_,
2416
- get expanded_() {
2417
- return $8tj43$createMemo(() => {
2418
- var _value$is_expanded_$u, _value11, _value11$is_expanded_, _value11$is_expanded_2;
2419
- return (_value$is_expanded_$u = (_value11 = value()) === null || _value11 === void 0 ? void 0 : (_value11$is_expanded_ = _value11.is_expanded_) === null || _value11$is_expanded_ === void 0 ? void 0 : (_value11$is_expanded_2 = _value11$is_expanded_.ui_should_show_expanded_) === null || _value11$is_expanded_2 === void 0 ? void 0 : _value11$is_expanded_2.call(_value11$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
2420
- });
2421
- }
2422
- }), _el$16, _co$5);
2423
- $8tj43$effect(() => {
2424
- var _value12;
2425
- return _el$14.classList.toggle("count-0", !!(((_value12 = value()) === null || _value12 === void 0 ? void 0 : _value12.count_) === 0));
2426
- });
2427
- return _el$12;
2428
- })();
2429
- },
2430
- get is_open_() {
2431
- return $8tj43$createMemo(() => {
2432
- const v = value();
2433
- if (!v)
2434
- // only to prevent cleanup errors
2435
- return $8tj43$createSignal(false);
2436
- const {
2437
- is_expanded_: {
2438
- ui_should_show_expanded_: ui_should_show_expanded_,
2439
- set_user_expanded_: set_user_expanded_
2440
- }
2441
- } = v;
2442
- return [ui_should_show_expanded_, set_user_expanded_];
2443
- })();
2444
- },
2445
- get children() {
2446
- return $0ae614c5c7babb43$var$render_stuff($8tj43$createMemo(() => {
2447
- var _value13;
2448
- return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
2449
- }), existing_filter, i18n_);
2450
- }
2451
- });
2388
+ return (() => {
2389
+ const is_open = $8tj43$createMemo(() => {
2390
+ const v = value();
2391
+ if (!v)
2392
+ // only to prevent cleanup errors
2393
+ return $8tj43$createSignal(false);
2394
+ const {
2395
+ is_expanded_: {
2396
+ ui_should_show_expanded_: ui_should_show_expanded_,
2397
+ set_user_expanded_: set_user_expanded_
2398
+ }
2399
+ } = v;
2400
+ return [ui_should_show_expanded_, set_user_expanded_];
2401
+ });
2402
+ return $8tj43$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
2403
+ get details_() {
2404
+ return $8tj43$getNextElement($0ae614c5c7babb43$var$_tmpl$3);
2405
+ },
2406
+ get summary_() {
2407
+ return (() => {
2408
+ const _el$12 = $8tj43$getNextElement($0ae614c5c7babb43$var$_tmpl$4),
2409
+ _el$13 = _el$12.firstChild,
2410
+ _el$14 = _el$13.firstChild,
2411
+ _el$15 = _el$14.nextSibling,
2412
+ [_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling);
2413
+ $8tj43$insert(_el$14, () => {
2414
+ var _value10;
2415
+ return (_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_;
2416
+ });
2417
+ $8tj43$insert(_el$13, $8tj43$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
2418
+ i18n_: i18n_,
2419
+ get expanded_() {
2420
+ return $8tj43$createMemo(() => {
2421
+ var _value$is_expanded_$u, _value11, _value11$is_expanded_, _value11$is_expanded_2;
2422
+ return (_value$is_expanded_$u = (_value11 = value()) === null || _value11 === void 0 ? void 0 : (_value11$is_expanded_ = _value11.is_expanded_) === null || _value11$is_expanded_ === void 0 ? void 0 : (_value11$is_expanded_2 = _value11$is_expanded_.ui_should_show_expanded_) === null || _value11$is_expanded_2 === void 0 ? void 0 : _value11$is_expanded_2.call(_value11$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
2423
+ });
2424
+ }
2425
+ }), _el$16, _co$5);
2426
+ $8tj43$effect(() => {
2427
+ var _value12;
2428
+ return _el$14.classList.toggle("count-0", !!(((_value12 = value()) === null || _value12 === void 0 ? void 0 : _value12.count_) === 0));
2429
+ });
2430
+ return _el$12;
2431
+ })();
2432
+ },
2433
+ get is_open_() {
2434
+ return is_open();
2435
+ },
2436
+ get children() {
2437
+ return $0ae614c5c7babb43$var$render_stuff($8tj43$createMemo(() => {
2438
+ var _value13;
2439
+ return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
2440
+ }), existing_filter, i18n_);
2441
+ }
2442
+ });
2443
+ })();
2452
2444
  }
2453
2445
  }), _el$10, _co$4);
2454
2446
  $8tj43$effect(() => _el$6.classList.toggle("expandable", !!has_expandable()));
@@ -2516,7 +2508,7 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
2516
2508
  // wait for the children to have populated and us to have received the correct value_ and name_ values
2517
2509
  let updating_blocked = false;
2518
2510
  const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => self_.value_[index] === sub_el));
2519
- signal_.push(...$8tj43$createSignal(index_of_us_in_selected_filter >= 0 ? true : false));
2511
+ signal_.push(...$8tj43$createSignal(index_of_us_in_selected_filter >= 0));
2520
2512
  const [read_checked, write_checked] = signal_;
2521
2513
  const child_objects = Object.values(self_.children_);
2522
2514
  const get_child_object_values = child_objects.map(_ref4 => {
@@ -10758,6 +10750,38 @@ function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
10758
10750
  cleanup: cleanup
10759
10751
  };
10760
10752
  }
10753
+
10754
+ /**
10755
+ * Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
10756
+ */
10757
+ function $3f7203368ad0d3ca$export$ff7109b9b2b206ba(sdk_cols_at_size) {
10758
+ let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
10759
+ if (!sdk_cols_at_size.length) return sdk_cols_at_size;
10760
+ const sorted_sizes = sdk_cols_at_size.map(_ref => {
10761
+ let [cols, max_width] = _ref;
10762
+ return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
10763
+ }).sort((_ref2, _ref3) => {
10764
+ let [, a] = _ref2;
10765
+ let [, b] = _ref3;
10766
+ return a - b;
10767
+ });
10768
+ const [[, smallest_max_width]] = sorted_sizes;
10769
+ if (smallest_max_width > min_width_for_more_than_one_column)
10770
+ // If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
10771
+ return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
10772
+ const to_delete = [];
10773
+ for (let i = 0; i < sorted_sizes.length; i++) {
10774
+ const [, max_width] = sorted_sizes[i];
10775
+ if (max_width > min_width_for_more_than_one_column) continue;
10776
+ to_delete.push(i);
10777
+ }
10778
+ while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
10779
+ sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
10780
+ return sorted_sizes.map(_ref4 => {
10781
+ let [cols, max_width] = _ref4;
10782
+ return max_width == Infinity ? [cols] : [cols, max_width];
10783
+ });
10784
+ }
10761
10785
  const $eb064bc3350276c1$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class="depict plp search"></div>`, 2);
10762
10786
  function $eb064bc3350276c1$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
10763
10787
  $eb064bc3350276c1$var$_checkPrivateRedeclaration(obj, privateMap);