@depict-ai/ui 2.0.20 → 2.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -72,7 +72,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
72
72
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
73
73
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
74
74
  /*! Depict.ai search and product listing SDK */
75
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.20";
75
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.22";
76
76
  const $d067f3a30f047b41$var$ListingContext = /*@__PURE__*/$52FdA$solidjs.createContext();
77
77
  function $d067f3a30f047b41$export$e68cff63f76bd15b(props) {
78
78
  const our_object = {};
@@ -1314,6 +1314,14 @@ function $083b2336093176cf$export$3b621d86b1566b2() {
1314
1314
  return _el$;
1315
1315
  })();
1316
1316
  }
1317
+
1318
+ /**
1319
+ * Lower cases a string if possible. Mostly used to make the filter url values case-insensitive.
1320
+ */
1321
+ function $e2d74bb03cc5252e$export$325f75597868c4f0(stuff) {
1322
+ if (typeof stuff !== "string") return stuff;
1323
+ return stuff.toLowerCase();
1324
+ }
1317
1325
  const $c5842bdb10e57229$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="clear-all-filters minor"></button>`, 2),
1318
1326
  $c5842bdb10e57229$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class="inner"><span class="title"><!#><!/>: </span><!#><!/></div>`, 8),
1319
1327
  $c5842bdb10e57229$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="clear-filter major"><!#><!/><span><!#><!/><!#><!/><!#><!/> – <!#><!/><!#><!/><!#><!/></span></button>`, 18),
@@ -1404,7 +1412,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1404
1412
  let created_an_object = false;
1405
1413
  for (let j = 0; j < value.length; j++) {
1406
1414
  var _pointer;
1407
- const this_categories_name = value[j];
1415
+ const this_categories_name = $e2d74bb03cc5252e$export$325f75597868c4f0(value[j]);
1408
1416
  const obj = (_pointer = pointer)[this_categories_name] || (_pointer[this_categories_name] = (() => {
1409
1417
  const value_as_string = value.map(v => typeof v === "number" ? v + "" : v); // don't think backend will ever send numbers but technically it's allowed;
1410
1418
  const created_obj = {
@@ -1510,7 +1518,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1510
1518
  var _meta, _meta$values;
1511
1519
  const sel_d = selected_data();
1512
1520
  return (_meta = meta()) === null || _meta === void 0 ? void 0 : (_meta$values = _meta.values) === null || _meta$values === void 0 ? void 0 : _meta$values.findIndex(value => {
1513
- return value === sel_d || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => sel_d[index] === item);
1521
+ return $e2d74bb03cc5252e$export$325f75597868c4f0(value) === $e2d74bb03cc5252e$export$325f75597868c4f0(sel_d) || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(sel_d[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(item));
1514
1522
  });
1515
1523
  });
1516
1524
  const name = $52FdA$solidjs.createMemo(() => {
@@ -1526,7 +1534,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1526
1534
  let pointer = structure;
1527
1535
  for (const step of selected_data()) {
1528
1536
  var _pointer2, _we_in_structure;
1529
- we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[step];
1537
+ we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[$e2d74bb03cc5252e$export$325f75597868c4f0(step)];
1530
1538
  pointer = (_we_in_structure = we_in_structure) === null || _we_in_structure === void 0 ? void 0 : _we_in_structure.children_;
1531
1539
  }
1532
1540
  return we_in_structure;
@@ -1541,7 +1549,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1541
1549
  let {
1542
1550
  value_: value_
1543
1551
  } = _ref2;
1544
- return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => v[index] === val));
1552
+ return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(v[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(val)));
1545
1553
  });
1546
1554
  return false;
1547
1555
  });
@@ -1564,7 +1572,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1564
1572
  cloned_selected_filters.splice(index_in_selected_filters, 1);
1565
1573
  const data = filter().data;
1566
1574
  const cloned_data = Array.isArray(data) ? [...data] : [data];
1567
- const index_of_item = cloned_data.findIndex(item => item === to_remove);
1575
+ const index_of_item = cloned_data.findIndex(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === $e2d74bb03cc5252e$export$325f75597868c4f0(to_remove));
1568
1576
  if (index_of_item >= 0) cloned_data.splice(index_of_item, 1);
1569
1577
  const in_structure = us_in_structure();
1570
1578
  if (in_structure) {
@@ -1575,7 +1583,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
1575
1583
  const {
1576
1584
  value_: value_
1577
1585
  } = kid;
1578
- const index_to_remove = cloned_data.findIndex(item => Array.isArray(item) && item.length === value_.length && value_.every((val, index) => item[index] === val));
1586
+ const index_to_remove = cloned_data.findIndex(item => Array.isArray(item) && item.length === value_.length && value_.every((val, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(item[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(val)));
1579
1587
  if (index_to_remove >= 0) cloned_data.splice(index_to_remove, 1);
1580
1588
  recursive_kids.push(...Object.values(kid.children_));
1581
1589
  }
@@ -1766,6 +1774,12 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
1766
1774
  });
1767
1775
  const render_checkbox = checkbox => {
1768
1776
  // Checkbox always calls the getters in props, so we don't wrap these values into memos
1777
+ const is_checked = $52FdA$solidjs.createMemo(() => {
1778
+ var _existing_filter;
1779
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
1780
+ const value = $e2d74bb03cc5252e$export$325f75597868c4f0(checkbox().value_);
1781
+ return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
1782
+ });
1769
1783
  return $52FdA$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
1770
1784
  get value_() {
1771
1785
  return checkbox().value_;
@@ -1777,8 +1791,7 @@ function $9b54b9c5381716eb$export$dd948f91abc3a1c4(_ref) {
1777
1791
  return checkbox().count_;
1778
1792
  },
1779
1793
  get checked_() {
1780
- var _existing_filter, _existing_filter$data;
1781
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
1794
+ return is_checked();
1782
1795
  }
1783
1796
  });
1784
1797
  };
@@ -1945,7 +1958,7 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
1945
1958
  var _existing_filter;
1946
1959
  const v = value();
1947
1960
  const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
1948
- if (data === v) return true;
1961
+ if ($e2d74bb03cc5252e$export$325f75597868c4f0(data) === $e2d74bb03cc5252e$export$325f75597868c4f0(v)) return true;
1949
1962
  return Array.isArray(data) && data.every((item, index) => item === v[index]);
1950
1963
  })());
1951
1964
  return _el$2;
@@ -2714,7 +2727,7 @@ function $9c1d49181fb3002a$var$create_updating_signal(_ref3) {
2714
2727
  var _existing_filter_$dat, _existing_filter_$dat2;
2715
2728
  // wait for the children to have populated and us to have received the correct value_ and name_ values
2716
2729
  let updating_blocked = false;
2717
- 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));
2730
+ 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) => $e2d74bb03cc5252e$export$325f75597868c4f0(self_.value_[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(sub_el)));
2718
2731
  signal_.push(...$52FdA$solidjs.createSignal(index_of_us_in_selected_filter >= 0));
2719
2732
  const [read_checked, write_checked] = signal_;
2720
2733
  const child_objects = Object.values(self_.children_);
@@ -2906,8 +2919,10 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
2906
2919
  },
2907
2920
  children: value => {
2908
2921
  const is_selected = $52FdA$solidjs.createMemo(() => {
2909
- var _existing_filter, _existing_filter$data;
2910
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(value().value_);
2922
+ var _existing_filter;
2923
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
2924
+ const current_value = $e2d74bb03cc5252e$export$325f75597868c4f0(value().value_);
2925
+ return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === current_value));
2911
2926
  });
2912
2927
  const MakeButton = attributes => (() => {
2913
2928
  const _el$2 = $52FdA$solidjsweb.getNextElement($cd0e5524f9476f9b$var$_tmpl$3),
@@ -2943,7 +2958,10 @@ const $cd0e5524f9476f9b$export$414f6a19d38e655c = _ref => {
2943
2958
  ...base_object,
2944
2959
  data: new_data
2945
2960
  };
2946
- if (!is_selected()) new_filter_object.data.push(value().value_);else new_filter_object.data = new_filter_object.data.filter(v => v !== value().value_);
2961
+ if (!is_selected()) new_filter_object.data.push(value().value_);else {
2962
+ const current_value_lower = $e2d74bb03cc5252e$export$325f75597868c4f0(value().value_);
2963
+ new_filter_object.data = new_filter_object.data.filter(v => $e2d74bb03cc5252e$export$325f75597868c4f0(v) !== current_value_lower);
2964
+ }
2947
2965
  const selected_filters = [...get_selected_filters().filter(f => f !== set_filter), ...(new_filter_object.data.length ? [new_filter_object] : [])];
2948
2966
  set_selected_filters(selected_filters);
2949
2967
  });
@@ -3045,16 +3063,6 @@ function $cd0e5524f9476f9b$var$adjust_sizes(container_width, sizes, set_cols_at_
3045
3063
  overrides: column_to_row_result
3046
3064
  }]]);
3047
3065
  }
3048
- function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
3049
- const signal = $52FdA$solidjs.createSignal(false);
3050
- $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
3051
- let {
3052
- matches: matches
3053
- } = _ref;
3054
- return signal[1](matches);
3055
- }).remove);
3056
- return signal[0];
3057
- }
3058
3066
  const $476a3dc36afc1938$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<form class="checkbox-color"><!#><!/><!#><!/></form>`, 6);
3059
3067
  const $476a3dc36afc1938$var$max_visible_without_collapsing = 30;
3060
3068
  const $476a3dc36afc1938$var$show_non_collapsible_when_collapsed = 8;
@@ -3065,7 +3073,6 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3065
3073
  i18n_: i18n_,
3066
3074
  view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_]
3067
3075
  } = _ref;
3068
- const supports_hover = $3e17e871e9d0911d$export$d9f36cf74e24d595("not all and (hover: none)");
3069
3076
  // same as in CheckboxFilter, maybe we should make this DRY at some point
3070
3077
  const existing_filter = $52FdA$solidjs.createMemo(() => {
3071
3078
  const {
@@ -3103,6 +3110,12 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3103
3110
  });
3104
3111
  const rgb_color = $52FdA$solidjs.createMemo(() => $52FdA$depictaiutilishared.hex_to_rgb(hex_color()));
3105
3112
  const black_contrast_better = $52FdA$solidjs.createMemo(() => rgb_color() ? $476a3dc36afc1938$var$does_black_contrast_better(rgb_color()) : false);
3113
+ const is_checked = $52FdA$solidjs.createMemo(() => {
3114
+ var _existing_filter;
3115
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
3116
+ const value = $e2d74bb03cc5252e$export$325f75597868c4f0(checkbox().value_);
3117
+ return !!(data !== null && data !== void 0 && data.some(item => $e2d74bb03cc5252e$export$325f75597868c4f0(item) === value));
3118
+ });
3106
3119
  const input_row = $52FdA$solidjsweb.createComponent((0, $902a0ca2b52f3898$export$48513f6b9f8ce62d), {
3107
3120
  get value_() {
3108
3121
  return checkbox().value_;
@@ -3114,8 +3127,7 @@ function $476a3dc36afc1938$export$82ed4b28ecb67608(_ref) {
3114
3127
  return checkbox().count_;
3115
3128
  },
3116
3129
  get checked_() {
3117
- var _existing_filter, _existing_filter$data;
3118
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
3130
+ return is_checked();
3119
3131
  },
3120
3132
  custom_indicator_ref: span => {
3121
3133
  const {
@@ -3307,7 +3319,7 @@ function $958981128e559776$export$53c59af873b303c9(_ref) {
3307
3319
  break try_specific;
3308
3320
  }
3309
3321
  const needle = data_is_array ? data[0] : data;
3310
- const index_in_meta = meta.values.findIndex(value => needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => needle[index] === item));
3322
+ const index_in_meta = meta.values.findIndex(value => $e2d74bb03cc5252e$export$325f75597868c4f0(needle) === $e2d74bb03cc5252e$export$325f75597868c4f0(value) || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => $e2d74bb03cc5252e$export$325f75597868c4f0(needle[index]) === $e2d74bb03cc5252e$export$325f75597868c4f0(item)));
3311
3323
  return ((_names = meta.names) === null || _names === void 0 ? void 0 : _names[index_in_meta]) || ((_values = meta.values) === null || _values === void 0 ? void 0 : _values[index_in_meta]);
3312
3324
  }
3313
3325
  }
@@ -3508,7 +3520,11 @@ function $164d474fea221d77$var$ActualFilterBody(props) {
3508
3520
  return $52FdA$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
3509
3521
  is_open_: is_open,
3510
3522
  get details_() {
3511
- return $52FdA$solidjsweb.getNextElement($164d474fea221d77$var$_tmpl$5);
3523
+ return (() => {
3524
+ const _el$15 = $52FdA$solidjsweb.getNextElement($164d474fea221d77$var$_tmpl$5);
3525
+ $52FdA$solidjsweb.setAttribute(_el$15, "data-group-title", section_);
3526
+ return _el$15;
3527
+ })();
3512
3528
  },
3513
3529
  get summary_() {
3514
3530
  return (() => {
@@ -3909,7 +3925,8 @@ function $367b536a2a94d24e$export$e183a13865960371(params_to_default_value, rout
3909
3925
  const signals = {};
3910
3926
  const entries = Object.entries(params_to_default_value);
3911
3927
  const event_handler = $52FdA$depictaiutilishared.catchify((what_happened, args) => {
3912
- if (what_happened == "popstate") $367b536a2a94d24e$var$history_state_change(signals, entries, args.state);
3928
+ // Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
3929
+ $367b536a2a94d24e$var$history_state_change(signals, entries, what_happened === "popstate" ? args.state : history.state);
3913
3930
  });
3914
3931
  // createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
3915
3932
  $52FdA$solidjs.createRenderEffect(() => {
@@ -4343,6 +4360,16 @@ async function $e270e9f953fcbc58$var$_cached_post_request2(endpoint, input_req,
4343
4360
  delete cache_obj.in_progress_[body];
4344
4361
  }
4345
4362
  }
4363
+ function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
4364
+ const signal = $52FdA$solidjs.createSignal(false);
4365
+ $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
4366
+ let {
4367
+ matches: matches
4368
+ } = _ref;
4369
+ return signal[1](matches);
4370
+ }).remove);
4371
+ return signal[0];
4372
+ }
4346
4373
  const $55f06aa93e360e7f$var$get_available_range = (available_filters_, search_for_field) => {
4347
4374
  var _untrack, _untrack$find;
4348
4375
  const maybe_meta = (_untrack = $52FdA$solidjs.untrack(available_filters_)) === null || _untrack === void 0 ? void 0 : (_untrack$find = _untrack.find(_ref => {
@@ -11824,7 +11851,7 @@ function $33e797e57f1b6354$var$_get_rendered_recs2() {
11824
11851
  }
11825
11852
  function $33e797e57f1b6354$var$_empty_page_bugfix2() {
11826
11853
  // Called when a "page" is "opened" using PageReplacer
11827
- const on_maybe_popstate = what_happened => {
11854
+ const on_maybe_popstate = $52FdA$depictaiutilishared.catchify(what_happened => {
11828
11855
  if (what_happened !== "popstate") return;
11829
11856
  const cleaned_current_url = $33e797e57f1b6354$var$clean_url(location.href);
11830
11857
  if (!$33e797e57f1b6354$var$_classStaticPrivateFieldSpecGet($33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$var$_visited_urls).has(cleaned_current_url)) {
@@ -11853,7 +11880,7 @@ function $33e797e57f1b6354$var$_empty_page_bugfix2() {
11853
11880
  $33e797e57f1b6354$var$_classStaticPrivateFieldSpecSet($33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$export$3ccaa27d81dd8556, $33e797e57f1b6354$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
11854
11881
  $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $33e797e57f1b6354$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
11855
11882
  }
11856
- };
11883
+ });
11857
11884
 
11858
11885
  (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).add(on_maybe_popstate);
11859
11886
  $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet)(this, $33e797e57f1b6354$var$_revert_fns).push(() => (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).delete(on_maybe_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page
package/ES10/index.d.ts CHANGED
@@ -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.20";
10
+ export const version = "2.0.22";
11
11
  /**
12
12
  * Provider to wrap every listing (group of products) in
13
13
  * Used for example for deduplicating ResizeObservers for responsive images
@@ -342,10 +342,6 @@ export function SelectedFilters({
342
342
  selected_filters_: Signal<FilterWithData[]>;
343
343
  local_filter_cache_: Signal<SearchFilter[]>;
344
344
  }): HTMLDivElement;
345
- /**
346
- * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
347
- */
348
- export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
349
345
  /**
350
346
  * Base placeholder component used by ImagePlaceholder and TextPlaceholder
351
347
  */
@@ -614,6 +610,10 @@ export class DepictAPI<InputDisplay extends Display, OutputDisplay extends Moder
614
610
  failed?: true | undefined;
615
611
  }>;
616
612
  }
613
+ /**
614
+ * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
615
+ */
616
+ export function media_query_to_accessor(media_query: string): import("solid-js").Accessor<boolean>;
617
617
  /**
618
618
  * Disables scrolling until the solidjs reactive scoped is disposed (onCleanup)
619
619
  * @returns A cleanup function to manually re-enable scrolling.
package/ES10/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { add_to_version_info as $8tj43$add_to_version_info, queueMacroTask as $8tj43$queueMacroTask, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, observer as $8tj43$observer, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, slider_fractional_factory as $8tj43$slider_fractional_factory, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, report as $8tj43$report, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, javascript_media_query as $8tj43$javascript_media_query, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
1
+ import { add_to_version_info as $8tj43$add_to_version_info, queueMacroTask as $8tj43$queueMacroTask, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, observer as $8tj43$observer, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, slider_fractional_factory as $8tj43$slider_fractional_factory, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, report as $8tj43$report, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, javascript_media_query as $8tj43$javascript_media_query, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ListenableSet as $8tj43$ListenableSet, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
2
2
  import { createComponent as $8tj43$createComponent, template as $8tj43$template, getNextElement as $8tj43$getNextElement, effect as $8tj43$effect, style as $8tj43$style, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps, runHydrationEvents as $8tj43$runHydrationEvents, insert as $8tj43$insert, setAttribute as $8tj43$setAttribute, isServer as $8tj43$isServer, addEventListener as $8tj43$addEventListener, className as $8tj43$className, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, classList as $8tj43$classList, getNextMarker as $8tj43$getNextMarker, Dynamic as $8tj43$Dynamic, use as $8tj43$use } from "solid-js/web";
3
3
  import { createSignal as $8tj43$createSignal, getOwner as $8tj43$getOwner, createEffect as $8tj43$createEffect, runWithOwner as $8tj43$runWithOwner, onCleanup as $8tj43$onCleanup, createMemo as $8tj43$createMemo, createContext as $8tj43$createContext, useContext as $8tj43$useContext, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, Show as $8tj43$Show, createRenderEffect as $8tj43$createRenderEffect, createRoot as $8tj43$createRoot, For as $8tj43$For, createUniqueId as $8tj43$createUniqueId, untrack as $8tj43$untrack, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, Index as $8tj43$Index, on as $8tj43$on, batch as $8tj43$batch, createReaction as $8tj43$createReaction } from "solid-js";
4
4
  import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
@@ -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.20";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.22";
12
12
  const $5441862cd2f5e111$var$ListingContext = /*@__PURE__*/$8tj43$createContext();
13
13
  function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
14
14
  const our_object = {};
@@ -1250,6 +1250,14 @@ function $9783d437ad61594c$export$3b621d86b1566b2() {
1250
1250
  return _el$;
1251
1251
  })();
1252
1252
  }
1253
+
1254
+ /**
1255
+ * Lower cases a string if possible. Mostly used to make the filter url values case-insensitive.
1256
+ */
1257
+ function $af5d8e0b7d97a7f6$export$325f75597868c4f0(stuff) {
1258
+ if (typeof stuff !== "string") return stuff;
1259
+ return stuff.toLowerCase();
1260
+ }
1253
1261
  const $4711a82d08d2021b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<button class="clear-all-filters minor"></button>`, 2),
1254
1262
  $4711a82d08d2021b$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<div class="inner"><span class="title"><!#><!/>: </span><!#><!/></div>`, 8),
1255
1263
  $4711a82d08d2021b$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<button class="clear-filter major"><!#><!/><span><!#><!/><!#><!/><!#><!/> – <!#><!/><!#><!/><!#><!/></span></button>`, 18),
@@ -1340,7 +1348,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1340
1348
  let created_an_object = false;
1341
1349
  for (let j = 0; j < value.length; j++) {
1342
1350
  var _pointer;
1343
- const this_categories_name = value[j];
1351
+ const this_categories_name = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value[j]);
1344
1352
  const obj = (_pointer = pointer)[this_categories_name] || (_pointer[this_categories_name] = (() => {
1345
1353
  const value_as_string = value.map(v => typeof v === "number" ? v + "" : v); // don't think backend will ever send numbers but technically it's allowed;
1346
1354
  const created_obj = {
@@ -1446,7 +1454,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1446
1454
  var _meta, _meta$values;
1447
1455
  const sel_d = selected_data();
1448
1456
  return (_meta = meta()) === null || _meta === void 0 ? void 0 : (_meta$values = _meta.values) === null || _meta$values === void 0 ? void 0 : _meta$values.findIndex(value => {
1449
- return value === sel_d || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => sel_d[index] === item);
1457
+ return $af5d8e0b7d97a7f6$export$325f75597868c4f0(value) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(sel_d) || Array.isArray(value) && Array.isArray(sel_d) && value.length === sel_d.length && value.every((item, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(sel_d[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(item));
1450
1458
  });
1451
1459
  });
1452
1460
  const name = $8tj43$createMemo(() => {
@@ -1462,7 +1470,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1462
1470
  let pointer = structure;
1463
1471
  for (const step of selected_data()) {
1464
1472
  var _pointer2, _we_in_structure;
1465
- we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[step];
1473
+ we_in_structure = (_pointer2 = pointer) === null || _pointer2 === void 0 ? void 0 : _pointer2[$af5d8e0b7d97a7f6$export$325f75597868c4f0(step)];
1466
1474
  pointer = (_we_in_structure = we_in_structure) === null || _we_in_structure === void 0 ? void 0 : _we_in_structure.children_;
1467
1475
  }
1468
1476
  return we_in_structure;
@@ -1477,7 +1485,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1477
1485
  let {
1478
1486
  value_: value_
1479
1487
  } = _ref2;
1480
- return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => v[index] === val));
1488
+ return (_iterable_selected_fi = iterable_selected_filter_data()) === null || _iterable_selected_fi === void 0 ? void 0 : _iterable_selected_fi.some(v => Array.isArray(v) && v.length === value_.length && value_.every((val, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(v[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(val)));
1481
1489
  });
1482
1490
  return false;
1483
1491
  });
@@ -1500,7 +1508,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1500
1508
  cloned_selected_filters.splice(index_in_selected_filters, 1);
1501
1509
  const data = filter().data;
1502
1510
  const cloned_data = Array.isArray(data) ? [...data] : [data];
1503
- const index_of_item = cloned_data.findIndex(item => item === to_remove);
1511
+ const index_of_item = cloned_data.findIndex(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(to_remove));
1504
1512
  if (index_of_item >= 0) cloned_data.splice(index_of_item, 1);
1505
1513
  const in_structure = us_in_structure();
1506
1514
  if (in_structure) {
@@ -1511,7 +1519,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
1511
1519
  const {
1512
1520
  value_: value_
1513
1521
  } = kid;
1514
- const index_to_remove = cloned_data.findIndex(item => Array.isArray(item) && item.length === value_.length && value_.every((val, index) => item[index] === val));
1522
+ const index_to_remove = cloned_data.findIndex(item => Array.isArray(item) && item.length === value_.length && value_.every((val, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(val)));
1515
1523
  if (index_to_remove >= 0) cloned_data.splice(index_to_remove, 1);
1516
1524
  recursive_kids.push(...Object.values(kid.children_));
1517
1525
  }
@@ -1702,6 +1710,12 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
1702
1710
  });
1703
1711
  const render_checkbox = checkbox => {
1704
1712
  // Checkbox always calls the getters in props, so we don't wrap these values into memos
1713
+ const is_checked = $8tj43$createMemo(() => {
1714
+ var _existing_filter;
1715
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
1716
+ const value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(checkbox().value_);
1717
+ return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === value));
1718
+ });
1705
1719
  return $8tj43$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
1706
1720
  get value_() {
1707
1721
  return checkbox().value_;
@@ -1713,8 +1727,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
1713
1727
  return checkbox().count_;
1714
1728
  },
1715
1729
  get checked_() {
1716
- var _existing_filter, _existing_filter$data;
1717
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
1730
+ return is_checked();
1718
1731
  }
1719
1732
  });
1720
1733
  };
@@ -1881,7 +1894,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
1881
1894
  var _existing_filter;
1882
1895
  const v = value();
1883
1896
  const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
1884
- if (data === v) return true;
1897
+ if ($af5d8e0b7d97a7f6$export$325f75597868c4f0(data) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(v)) return true;
1885
1898
  return Array.isArray(data) && data.every((item, index) => item === v[index]);
1886
1899
  })());
1887
1900
  return _el$2;
@@ -2650,7 +2663,7 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
2650
2663
  var _existing_filter_$dat, _existing_filter_$dat2;
2651
2664
  // wait for the children to have populated and us to have received the correct value_ and name_ values
2652
2665
  let updating_blocked = false;
2653
- 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));
2666
+ 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) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(self_.value_[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(sub_el)));
2654
2667
  signal_.push(...$8tj43$createSignal(index_of_us_in_selected_filter >= 0));
2655
2668
  const [read_checked, write_checked] = signal_;
2656
2669
  const child_objects = Object.values(self_.children_);
@@ -2842,8 +2855,10 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
2842
2855
  },
2843
2856
  children: value => {
2844
2857
  const is_selected = $8tj43$createMemo(() => {
2845
- var _existing_filter, _existing_filter$data;
2846
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(value().value_);
2858
+ var _existing_filter;
2859
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
2860
+ const current_value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value().value_);
2861
+ return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === current_value));
2847
2862
  });
2848
2863
  const MakeButton = attributes => (() => {
2849
2864
  const _el$2 = $8tj43$getNextElement($830ea8efda59884e$var$_tmpl$3),
@@ -2879,7 +2894,10 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
2879
2894
  ...base_object,
2880
2895
  data: new_data
2881
2896
  };
2882
- if (!is_selected()) new_filter_object.data.push(value().value_);else new_filter_object.data = new_filter_object.data.filter(v => v !== value().value_);
2897
+ if (!is_selected()) new_filter_object.data.push(value().value_);else {
2898
+ const current_value_lower = $af5d8e0b7d97a7f6$export$325f75597868c4f0(value().value_);
2899
+ new_filter_object.data = new_filter_object.data.filter(v => $af5d8e0b7d97a7f6$export$325f75597868c4f0(v) !== current_value_lower);
2900
+ }
2883
2901
  const selected_filters = [...get_selected_filters().filter(f => f !== set_filter), ...(new_filter_object.data.length ? [new_filter_object] : [])];
2884
2902
  set_selected_filters(selected_filters);
2885
2903
  });
@@ -2981,16 +2999,6 @@ function $830ea8efda59884e$var$adjust_sizes(container_width, sizes, set_cols_at_
2981
2999
  overrides: column_to_row_result
2982
3000
  }]]);
2983
3001
  }
2984
- function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
2985
- const signal = $8tj43$createSignal(false);
2986
- $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
2987
- let {
2988
- matches: matches
2989
- } = _ref;
2990
- return signal[1](matches);
2991
- }).remove);
2992
- return signal[0];
2993
- }
2994
3002
  const $2cb856c297c53e6c$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<form class="checkbox-color"><!#><!/><!#><!/></form>`, 6);
2995
3003
  const $2cb856c297c53e6c$var$max_visible_without_collapsing = 30;
2996
3004
  const $2cb856c297c53e6c$var$show_non_collapsible_when_collapsed = 8;
@@ -3001,7 +3009,6 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3001
3009
  i18n_: i18n_,
3002
3010
  view_more_button_below_group_: [_get_view_more_button_below_group_, set_view_more_button_below_group_]
3003
3011
  } = _ref;
3004
- const supports_hover = $00a5b94f0c11efbb$export$d9f36cf74e24d595("not all and (hover: none)");
3005
3012
  // same as in CheckboxFilter, maybe we should make this DRY at some point
3006
3013
  const existing_filter = $8tj43$createMemo(() => {
3007
3014
  const {
@@ -3039,6 +3046,12 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3039
3046
  });
3040
3047
  const rgb_color = $8tj43$createMemo(() => $8tj43$hex_to_rgb(hex_color()));
3041
3048
  const black_contrast_better = $8tj43$createMemo(() => rgb_color() ? $2cb856c297c53e6c$var$does_black_contrast_better(rgb_color()) : false);
3049
+ const is_checked = $8tj43$createMemo(() => {
3050
+ var _existing_filter;
3051
+ const data = (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : _existing_filter.data;
3052
+ const value = $af5d8e0b7d97a7f6$export$325f75597868c4f0(checkbox().value_);
3053
+ return !!(data !== null && data !== void 0 && data.some(item => $af5d8e0b7d97a7f6$export$325f75597868c4f0(item) === value));
3054
+ });
3042
3055
  const input_row = $8tj43$createComponent((0, $19e828709c7723a0$export$48513f6b9f8ce62d), {
3043
3056
  get value_() {
3044
3057
  return checkbox().value_;
@@ -3050,8 +3063,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
3050
3063
  return checkbox().count_;
3051
3064
  },
3052
3065
  get checked_() {
3053
- var _existing_filter, _existing_filter$data;
3054
- return (_existing_filter = existing_filter()) === null || _existing_filter === void 0 ? void 0 : (_existing_filter$data = _existing_filter.data) === null || _existing_filter$data === void 0 ? void 0 : _existing_filter$data.includes(checkbox().value_);
3066
+ return is_checked();
3055
3067
  },
3056
3068
  custom_indicator_ref: span => {
3057
3069
  const {
@@ -3243,7 +3255,7 @@ function $d0ff304c14f50521$export$53c59af873b303c9(_ref) {
3243
3255
  break try_specific;
3244
3256
  }
3245
3257
  const needle = data_is_array ? data[0] : data;
3246
- const index_in_meta = meta.values.findIndex(value => needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => needle[index] === item));
3258
+ const index_in_meta = meta.values.findIndex(value => $af5d8e0b7d97a7f6$export$325f75597868c4f0(needle) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(value) || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index) => $af5d8e0b7d97a7f6$export$325f75597868c4f0(needle[index]) === $af5d8e0b7d97a7f6$export$325f75597868c4f0(item)));
3247
3259
  return ((_names = meta.names) === null || _names === void 0 ? void 0 : _names[index_in_meta]) || ((_values = meta.values) === null || _values === void 0 ? void 0 : _values[index_in_meta]);
3248
3260
  }
3249
3261
  }
@@ -3444,7 +3456,11 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
3444
3456
  return $8tj43$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
3445
3457
  is_open_: is_open,
3446
3458
  get details_() {
3447
- return $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$5);
3459
+ return (() => {
3460
+ const _el$15 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$5);
3461
+ $8tj43$setAttribute(_el$15, "data-group-title", section_);
3462
+ return _el$15;
3463
+ })();
3448
3464
  },
3449
3465
  get summary_() {
3450
3466
  return (() => {
@@ -3845,7 +3861,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
3845
3861
  const signals = {};
3846
3862
  const entries = Object.entries(params_to_default_value);
3847
3863
  const event_handler = $8tj43$catchify((what_happened, args) => {
3848
- if (what_happened == "popstate") $972f6bce0f9d61be$var$history_state_change(signals, entries, args.state);
3864
+ // Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
3865
+ $972f6bce0f9d61be$var$history_state_change(signals, entries, what_happened === "popstate" ? args.state : history.state);
3849
3866
  });
3850
3867
  // createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
3851
3868
  $8tj43$createRenderEffect(() => {
@@ -4279,6 +4296,16 @@ async function $284849364a6ef73a$var$_cached_post_request2(endpoint, input_req,
4279
4296
  delete cache_obj.in_progress_[body];
4280
4297
  }
4281
4298
  }
4299
+ function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
4300
+ const signal = $8tj43$createSignal(false);
4301
+ $8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
4302
+ let {
4303
+ matches: matches
4304
+ } = _ref;
4305
+ return signal[1](matches);
4306
+ }).remove);
4307
+ return signal[0];
4308
+ }
4282
4309
  const $9b5022ae72f56399$var$get_available_range = (available_filters_, search_for_field) => {
4283
4310
  var _untrack, _untrack$find;
4284
4311
  const maybe_meta = (_untrack = $8tj43$untrack(available_filters_)) === null || _untrack === void 0 ? void 0 : (_untrack$find = _untrack.find(_ref => {
@@ -11760,7 +11787,7 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
11760
11787
  }
11761
11788
  function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
11762
11789
  // Called when a "page" is "opened" using PageReplacer
11763
- const on_maybe_popstate = what_happened => {
11790
+ const on_maybe_popstate = $8tj43$catchify(what_happened => {
11764
11791
  if (what_happened !== "popstate") return;
11765
11792
  const cleaned_current_url = $f9fd3017c20b774a$var$clean_url(location.href);
11766
11793
  if (!$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecGet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_visited_urls).has(cleaned_current_url)) {
@@ -11789,7 +11816,7 @@ function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
11789
11816
  $f9fd3017c20b774a$var$_classStaticPrivateFieldSpecSet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
11790
11817
  $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
11791
11818
  }
11792
- };
11819
+ });
11793
11820
 
11794
11821
  (0, $8tj43$instant_exec_on_suspect_history_change).add(on_maybe_popstate);
11795
11822
  $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_revert_fns).push(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(on_maybe_popstate)); // Don't run the bugfixer if there isn't a PageReplacer page open since I assume the bug only happens when going back from a PageReplace'd page