@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.
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.5";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.7";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -123,38 +123,6 @@ const $5401a6698b0c0658$export$6daf8749b65a1b77 = cols_at_size => {
123
123
  });
124
124
  return $5401a6698b0c0658$var$transform_elements(sorted_cols_at_size);
125
125
  };
126
-
127
- /**
128
- * 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
129
- */
130
- function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
131
- let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
132
- if (!sdk_cols_at_size.length) return sdk_cols_at_size;
133
- const sorted_sizes = sdk_cols_at_size.map(_ref => {
134
- let [cols, max_width] = _ref;
135
- return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
136
- }).sort((_ref2, _ref3) => {
137
- let [, a] = _ref2;
138
- let [, b] = _ref3;
139
- return a - b;
140
- });
141
- const [[, smallest_max_width]] = sorted_sizes;
142
- if (smallest_max_width > min_width_for_more_than_one_column)
143
- // If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
144
- return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
145
- const to_delete = [];
146
- for (let i = 0; i < sorted_sizes.length; i++) {
147
- const [, max_width] = sorted_sizes[i];
148
- if (max_width > min_width_for_more_than_one_column) continue;
149
- to_delete.push(i);
150
- }
151
- while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
152
- sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
153
- return sorted_sizes.map(_ref4 => {
154
- let [cols, max_width] = _ref4;
155
- return max_width == Infinity ? [cols] : [cols, max_width];
156
- });
157
- }
158
126
  function $8edd3cf30d1fd8b4$export$a2cc176055f8f08() {
159
127
  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.";
160
128
  return (0, $3hooq$solidjsweb.isServer) ? {
@@ -642,7 +610,7 @@ function $2badc30d7c6610e1$export$9574e176201e5e8d(props) {
642
610
  market_: () => props.market,
643
611
  merchant_: () => props.merchant,
644
612
  layout_options_: $3hooq$solidjs.createMemo(() => ({
645
- cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77($b1ea8d47bcf03111$export$ff7109b9b2b206ba(props.cols_at_size)),
613
+ cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
646
614
  ...grid_spacing_override()
647
615
  }))
648
616
  })));
@@ -747,7 +715,7 @@ function $41227f10ad680afd$export$9756467d34d91cdb(props) {
747
715
  market_: () => props.market,
748
716
  merchant_: () => props.merchant,
749
717
  layout_options_: $3hooq$solidjs.createMemo(() => ({
750
- cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77($b1ea8d47bcf03111$export$ff7109b9b2b206ba(props.cols_at_size)),
718
+ cols_at_size: $5401a6698b0c0658$export$6daf8749b65a1b77(props.cols_at_size),
751
719
  ...grid_spacing_override()
752
720
  }))
753
721
  })));
@@ -1337,9 +1305,9 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
1337
1305
  }
1338
1306
  })));
1339
1307
  }
1340
- const $0257c760a99bfacb$var$_tmpl$ = ["<div", ' class="range"><div class="input-group"><div class="field"><input type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1308
+ const $0257c760a99bfacb$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1341
1309
  $0257c760a99bfacb$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
1342
- $0257c760a99bfacb$var$_tmpl$3 = ["<div", ' class="range-group"><input type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1310
+ $0257c760a99bfacb$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1343
1311
  function $0257c760a99bfacb$export$e0d834a0ad870cda(_ref) {
1344
1312
  let {
1345
1313
  filter_: filter_,
@@ -1418,11 +1386,13 @@ function $0257c760a99bfacb$var$RangeSelector(_ref3) {
1418
1386
  const [get_current_range] = current_range_;
1419
1387
  const pre_price = $3hooq$solidjs.createMemo(() => price_formatting_().pre_);
1420
1388
  const post_price = $3hooq$solidjs.createMemo(() => price_formatting_().post_);
1421
- return $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[0], true), false), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[1], true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($0257c760a99bfacb$var$ExponentialSlider, {
1389
+ const should_be_disabled_ = $3hooq$solidjs.createMemo(() => Math.abs(min_() - max_()) < 2);
1390
+ return $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "range ".concat(min_() === max_() ? "disabled" : ""), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[0], true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[1], true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($0257c760a99bfacb$var$ExponentialSlider, {
1422
1391
  max_: max_,
1423
1392
  min_: min_,
1424
1393
  current_range_: current_range_,
1425
- i18n_: i18n_
1394
+ i18n_: i18n_,
1395
+ should_be_disabled_: should_be_disabled_
1426
1396
  })), $3hooq$solidjsweb.escape(pre_price()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $f38f2e64ebe2da86$export$a71e92cfbb498adc), {
1427
1397
  get price_() {
1428
1398
  return min_();
@@ -1444,7 +1414,8 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1444
1414
  current_range_: current_range_,
1445
1415
  min_: min_,
1446
1416
  i18n_: i18n_,
1447
- max_: max_
1417
+ max_: max_,
1418
+ should_be_disabled_: should_be_disabled_
1448
1419
  } = _ref4;
1449
1420
  // inspired by https://observablehq.com/@mbostock/nonlinear-slider
1450
1421
  const transform_linear_to_nonlinear = _ref5 => {
@@ -1452,8 +1423,7 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1452
1423
  return [Math.sqrt(smaller), Math.sqrt(larger)];
1453
1424
  };
1454
1425
  const [read_current_range, write_current_range] = current_range_;
1455
- const modified_range = $3hooq$solidjs.createSignal(transform_linear_to_nonlinear($3hooq$solidjs.untrack(read_current_range)));
1456
- const [read_modified_range, write_modified_range] = modified_range;
1426
+ const modified_range_accessor = $3hooq$solidjs.createMemo(() => transform_linear_to_nonlinear(read_current_range()));
1457
1427
  const modified_max = $3hooq$solidjs.createMemo(() => Math.sqrt(max_()));
1458
1428
  const modified_min = $3hooq$solidjs.createMemo(() => Math.sqrt(min_()));
1459
1429
  const offset_value_calculator_ = (value, how_many) => {
@@ -1461,36 +1431,39 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1461
1431
  const changed = number_in_linear + how_many;
1462
1432
  return Math.sqrt(changed);
1463
1433
  };
1464
- $3hooq$solidjs.createComputed($3hooq$solidjs.on(read_current_range, new_range_from_above => {
1465
- // to prevent from infinite looping, don't write if it's around the same
1466
- const new_modified_range = transform_linear_to_nonlinear(new_range_from_above);
1467
- const current_modified_range = read_modified_range();
1468
- if (!current_modified_range.every((item, index) => Math.round(item) === Math.round(new_modified_range[index]))) write_modified_range(new_modified_range);
1469
- }, {
1470
- defer: true
1471
- }));
1472
- $3hooq$solidjs.createComputed($3hooq$solidjs.on(read_modified_range, _ref6 => {
1473
- let [smaller, larger] = _ref6;
1474
- return write_current_range([Math.round(smaller * smaller), Math.round(larger * larger)]);
1475
- }, {
1476
- defer: true
1477
- }));
1434
+ const convert_back = (smaller, larger) => [Math.round(smaller * smaller), Math.round(larger * larger)];
1435
+ const modified_range_setter = new_range_or_function => {
1436
+ const old_range = $3hooq$solidjs.untrack(modified_range_accessor);
1437
+ const new_range = typeof new_range_or_function === "function" ? new_range_or_function(old_range) : new_range_or_function;
1438
+ const [smaller, larger] = new_range;
1439
+ const [old_smaller, old_larger] = old_range;
1440
+ const new_range_converted = convert_back(smaller, larger);
1441
+ const old_range_converted = convert_back(old_smaller, old_larger);
1442
+ if (new_range_converted[0] === old_range_converted[0] && new_range_converted[1] === old_range_converted[1])
1443
+ // 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
1444
+ return new_range;
1445
+ write_current_range(new_range_converted);
1446
+ return new_range;
1447
+ };
1478
1448
  return $0257c760a99bfacb$var$LinearSlider({
1479
- current_range_: modified_range,
1449
+ current_range_: [modified_range_accessor, modified_range_setter],
1450
+ // "Lie" to the actual slider so we don't have to implement exponential handling in there
1480
1451
  min_: modified_min,
1481
1452
  max_: modified_max,
1482
1453
  offset_value_calculator_: offset_value_calculator_,
1483
- i18n_: i18n_
1454
+ i18n_: i18n_,
1455
+ should_be_disabled_: should_be_disabled_
1484
1456
  });
1485
1457
  }
1486
- function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1458
+ function $0257c760a99bfacb$var$LinearSlider(_ref6) {
1487
1459
  let {
1488
1460
  max_: max_,
1489
1461
  min_: min_,
1490
1462
  current_range_: current_range_,
1491
1463
  offset_value_calculator_: offset_value_calculator_,
1492
- i18n_: i18n_
1493
- } = _ref7;
1464
+ i18n_: i18n_,
1465
+ should_be_disabled_: should_be_disabled_
1466
+ } = _ref6;
1494
1467
  let range_input_1;
1495
1468
  let range_input_2;
1496
1469
  let clickable_slider;
@@ -1499,6 +1472,7 @@ function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1499
1472
  const min = min_();
1500
1473
  const span = max_() - min;
1501
1474
  const [start, end] = get_current_range();
1475
+ if (should_be_disabled_()) return "left:50%;right:50%";
1502
1476
  return "left:".concat((start - min) / span * 100, "%;right:").concat(100 - (end - min) / span * 100, "%");
1503
1477
  });
1504
1478
  const set_value = (el, index) => {
@@ -1512,13 +1486,13 @@ function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1512
1486
  el.value = get_current_range()[index];
1513
1487
  });
1514
1488
  };
1515
- return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
1489
+ return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
1516
1490
  min_();
1517
1491
  max_();
1518
1492
  return get_current_range()[0];
1519
1493
  }, undefined, {
1520
1494
  equals: false
1521
- })(), true), false), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
1495
+ })(), true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
1522
1496
  }
1523
1497
  function $0257c760a99bfacb$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el) {
1524
1498
  let get_offset_value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : (value, how_many) => value + how_many;
@@ -1787,44 +1761,47 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_) {
1787
1761
  return has_expandable();
1788
1762
  },
1789
1763
  get children() {
1790
- return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
1791
- get details_() {
1792
- return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey());
1793
- },
1794
- get summary_() {
1795
- var _value10, _value11;
1796
- return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $3hooq$solidjsweb.escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
1797
- i18n_: i18n_,
1798
- get expanded_() {
1799
- return $3hooq$solidjs.createMemo(() => {
1800
- var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1801
- return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1802
- });
1764
+ return (() => {
1765
+ const is_open = $3hooq$solidjs.createMemo(() => {
1766
+ const v = value();
1767
+ if (!v)
1768
+ // only to prevent cleanup errors
1769
+ return $3hooq$solidjs.createSignal(false);
1770
+ const {
1771
+ is_expanded_: {
1772
+ ui_should_show_expanded_: ui_should_show_expanded_,
1773
+ set_user_expanded_: set_user_expanded_
1803
1774
  }
1804
- })));
1805
- },
1806
- get is_open_() {
1807
- return $3hooq$solidjs.createMemo(() => {
1808
- const v = value();
1809
- if (!v)
1810
- // only to prevent cleanup errors
1811
- return $3hooq$solidjs.createSignal(false);
1812
- const {
1813
- is_expanded_: {
1814
- ui_should_show_expanded_: ui_should_show_expanded_,
1815
- set_user_expanded_: set_user_expanded_
1775
+ } = v;
1776
+ return [ui_should_show_expanded_, set_user_expanded_];
1777
+ });
1778
+ return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
1779
+ get details_() {
1780
+ return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey());
1781
+ },
1782
+ get summary_() {
1783
+ var _value10, _value11;
1784
+ return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $3hooq$solidjsweb.escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
1785
+ i18n_: i18n_,
1786
+ get expanded_() {
1787
+ return $3hooq$solidjs.createMemo(() => {
1788
+ var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1789
+ return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1790
+ });
1816
1791
  }
1817
- } = v;
1818
- return [ui_should_show_expanded_, set_user_expanded_];
1819
- })();
1820
- },
1821
- get children() {
1822
- return $9c1d49181fb3002a$var$render_stuff($3hooq$solidjs.createMemo(() => {
1823
- var _value13;
1824
- return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1825
- }), existing_filter, i18n_);
1826
- }
1827
- });
1792
+ })));
1793
+ },
1794
+ get is_open_() {
1795
+ return is_open();
1796
+ },
1797
+ get children() {
1798
+ return $9c1d49181fb3002a$var$render_stuff($3hooq$solidjs.createMemo(() => {
1799
+ var _value13;
1800
+ return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1801
+ }), existing_filter, i18n_);
1802
+ }
1803
+ });
1804
+ })();
1828
1805
  }
1829
1806
  })));
1830
1807
  })();
@@ -1889,7 +1866,7 @@ function $9c1d49181fb3002a$var$create_updating_signal(_ref3) {
1889
1866
  // wait for the children to have populated and us to have received the correct value_ and name_ values
1890
1867
  let updating_blocked = false;
1891
1868
  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));
1892
- signal_.push(...$3hooq$solidjs.createSignal(index_of_us_in_selected_filter >= 0 ? true : false));
1869
+ signal_.push(...$3hooq$solidjs.createSignal(index_of_us_in_selected_filter >= 0));
1893
1870
  const [read_checked, write_checked] = signal_;
1894
1871
  const child_objects = Object.values(self_.children_);
1895
1872
  const get_child_object_values = child_objects.map(_ref4 => {
@@ -8871,6 +8848,38 @@ function $98bd00c15a2e3159$export$828dcdd425fd3231(aligner) {
8871
8848
  cleanup: cleanup
8872
8849
  };
8873
8850
  }
8851
+
8852
+ /**
8853
+ * 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
8854
+ */
8855
+ function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
8856
+ let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
8857
+ if (!sdk_cols_at_size.length) return sdk_cols_at_size;
8858
+ const sorted_sizes = sdk_cols_at_size.map(_ref => {
8859
+ let [cols, max_width] = _ref;
8860
+ return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
8861
+ }).sort((_ref2, _ref3) => {
8862
+ let [, a] = _ref2;
8863
+ let [, b] = _ref3;
8864
+ return a - b;
8865
+ });
8866
+ const [[, smallest_max_width]] = sorted_sizes;
8867
+ if (smallest_max_width > min_width_for_more_than_one_column)
8868
+ // If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
8869
+ return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
8870
+ const to_delete = [];
8871
+ for (let i = 0; i < sorted_sizes.length; i++) {
8872
+ const [, max_width] = sorted_sizes[i];
8873
+ if (max_width > min_width_for_more_than_one_column) continue;
8874
+ to_delete.push(i);
8875
+ }
8876
+ while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
8877
+ sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
8878
+ return sorted_sizes.map(_ref4 => {
8879
+ let [cols, max_width] = _ref4;
8880
+ return max_width == Infinity ? [cols] : [cols, max_width];
8881
+ });
8882
+ }
8874
8883
  const $ddd39c5f36f49703$var$_tmpl$ = ["<div", ' class="depict plp search">', "</div>"];
8875
8884
  function $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
8876
8885
  $ddd39c5f36f49703$var$_checkPrivateRedeclaration(obj, privateMap);
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.5";
10
+ export const version = "2.0.7";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */