@depict-ai/ui 4.10.20 → 4.10.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
@@ -115,7 +115,7 @@ $parcel$export(module.exports, "BreadCrumbs", () => $335c02c1241a9ca8$export$5b7
115
115
  $parcel$export(module.exports, "QuickLinks", () => $335c02c1241a9ca8$export$de035477d6fef996);
116
116
  $parcel$export(module.exports, "CategoryPage", () => $c10e33c4681f8c9b$export$e2bf8ce7779e827e);
117
117
  /*! Depict.ai search and product listing SDK */
118
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.20";
118
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "4.10.22";
119
119
  function $3e17e871e9d0911d$export$d9f36cf74e24d595(media_query) {
120
120
  const signal = $52FdA$solidjs.createSignal(false);
121
121
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.javascript_media_query(media_query, _ref => {
@@ -1284,8 +1284,15 @@ function $0d3ee7000f047e67$export$a1fd619a4743ca08(_ref) {
1284
1284
  setFirstResultInViewport(Math.min(...intersecting) + 1); // +1 because we want to start counting at 1
1285
1285
  setLastResultsInViewport(Math.max(...intersecting) + 1);
1286
1286
  });
1287
- return renderedDisplays_;
1287
+ // Content blocks placed after the last product (but still in its row) have no product card to render in front of, so render them after the cards once there are no more products to load
1288
+ const trailingContentBlocks_ = $52FdA$solidjs.createMemo(() => {
1289
+ var _content_blocks_, _content_blocks_$trai;
1290
+ if (!all_products_loaded_[0]()) return [];
1291
+ return (content_blocks_ === null || content_blocks_ === void 0 ? void 0 : (_content_blocks_ = content_blocks_()) === null || _content_blocks_ === void 0 ? void 0 : (_content_blocks_$trai = _content_blocks_.trailing_) === null || _content_blocks_$trai === void 0 ? void 0 : _content_blocks_$trai.call(_content_blocks_, displays_by_key_().size)) || [];
1292
+ });
1293
+ return [renderedDisplays_, trailingContentBlocks_]; // Regarding the as unknown: https://github.com/solidjs/solid/releases/tag/v1.7.0
1288
1294
  }
1295
+
1289
1296
  var $6c2c739b113a8ddf$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<div>`),
1290
1297
  $6c2c739b113a8ddf$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<style type=text/css>`);
1291
1298
  function $6c2c739b113a8ddf$export$d21e32dfedac04be(props) {
@@ -1658,10 +1665,18 @@ function $f8f375d6245ffff2$export$791ef57e62e21c3f(_ref) {
1658
1665
  set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
1659
1666
  });
1660
1667
 
1661
- return $52FdA$solidjs.createMemo(() => $f8f375d6245ffff2$export$92aa5d691d588f3f({
1668
+ const remapped_ = $52FdA$solidjs.createMemo(() => $f8f375d6245ffff2$export$92aa5d691d588f3f({
1662
1669
  wrapped_blocks_: get_wrapped_blocks_(),
1663
1670
  n_cols_currently_showing_: n_cols_currently_showing_()
1664
- }).content_blocks_by_index_);
1671
+ }));
1672
+ const content_blocks_by_index_ = $52FdA$solidjs.createMemo(() => remapped_().content_blocks_by_index_);
1673
+ return Object.assign(content_blocks_by_index_, {
1674
+ trailing_: product_count => $f8f375d6245ffff2$export$b94605e5b3ce01c({
1675
+ ...remapped_(),
1676
+ n_cols_currently_showing_: n_cols_currently_showing_(),
1677
+ product_count: product_count
1678
+ })
1679
+ });
1665
1680
  }
1666
1681
  function $f8f375d6245ffff2$export$92aa5d691d588f3f(_ref2) {
1667
1682
  let {
@@ -1670,13 +1685,16 @@ function $f8f375d6245ffff2$export$92aa5d691d588f3f(_ref2) {
1670
1685
  } = _ref2;
1671
1686
  // This computation should be quite cheap since it just moves around things into an array
1672
1687
  const content_blocks_by_index_ = [];
1688
+ const rows_by_index_ = []; // the row of each block at each index of content_blocks_by_index_, in the same order
1673
1689
  const constructed_block_arrays = new WeakSet();
1674
1690
  // Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
1675
1691
  const displaced_products_ = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
1676
1692
  if (!n_cols_currently_showing_)
1677
1693
  // Nope out of here if we don't know how many columns are showing
1678
1694
  return {
1679
- content_blocks_by_index_: content_blocks_by_index_
1695
+ content_blocks_by_index_: content_blocks_by_index_,
1696
+ rows_by_index_: rows_by_index_,
1697
+ displaced_products_: displaced_products_
1680
1698
  };
1681
1699
  for (let i = 0; i < wrapped_blocks_.length; i++) {
1682
1700
  // i = row to show at
@@ -1724,6 +1742,7 @@ function $f8f375d6245ffff2$export$92aa5d691d588f3f(_ref2) {
1724
1742
  content_blocks_by_index_[final_target_index] = array;
1725
1743
  }
1726
1744
  } else content_blocks_by_index_[final_target_index] = block_content;
1745
+ (rows_by_index_[final_target_index] || (rows_by_index_[final_target_index] = [])).push(i);
1727
1746
  // Update displacement
1728
1747
  for (let j = 0; j < span_rows; j++) {
1729
1748
  var _ref3;
@@ -1733,9 +1752,46 @@ function $f8f375d6245ffff2$export$92aa5d691d588f3f(_ref2) {
1733
1752
  }
1734
1753
  return {
1735
1754
  content_blocks_by_index_: content_blocks_by_index_,
1755
+ rows_by_index_: rows_by_index_,
1736
1756
  displaced_products_: displaced_products_
1737
1757
  };
1738
1758
  }
1759
+ function $f8f375d6245ffff2$export$b94605e5b3ce01c(_ref4) {
1760
+ let {
1761
+ content_blocks_by_index_: content_blocks_by_index_,
1762
+ rows_by_index_: rows_by_index_,
1763
+ displaced_products_: displaced_products_,
1764
+ n_cols_currently_showing_: n_cols_currently_showing_,
1765
+ product_count: product_count
1766
+ } = _ref4;
1767
+ const trailing = [];
1768
+ if (!n_cols_currently_showing_ || product_count <= 0) return trailing;
1769
+ // Find the row the last product lands in: each row has room for the columns that blocks don't take up
1770
+ let last_product_row = 0;
1771
+ for (let seen_products = 0;; last_product_row++) {
1772
+ const row = displaced_products_[last_product_row];
1773
+ const taken_by_blocks = typeof row === "number" ? row : row ? row.filter(item => item).length : 0;
1774
+ seen_products += Math.max(0, n_cols_currently_showing_ - taken_by_blocks);
1775
+ if (seen_products >= product_count) break;
1776
+ // Rows past the ones blocks take up all have room for products, so we're done by then at the latest
1777
+ if (last_product_row >= displaced_products_.length + product_count) break;
1778
+ }
1779
+ for (let i = product_count; i < content_blocks_by_index_.length; i++) {
1780
+ var _rows$;
1781
+ const block = content_blocks_by_index_[i];
1782
+ if (block === undefined) continue;
1783
+ const rows = rows_by_index_[i] || [];
1784
+ if (Array.isArray(block) && rows.length > 1) {
1785
+ // Several blocks share this index (e.g. the end of one row and the start of the next): keep the ones in the last product's row
1786
+ const in_last_row = block.filter((_, j) => rows[j] <= last_product_row);
1787
+ if (in_last_row.length) trailing.push(in_last_row);
1788
+ continue;
1789
+ }
1790
+ if (((_rows$ = rows[0]) !== null && _rows$ !== void 0 ? _rows$ : Infinity) > last_product_row) continue; // a row below the last product's row: keep it hidden
1791
+ trailing.push(block);
1792
+ }
1793
+ return trailing;
1794
+ }
1739
1795
  /**
1740
1796
  * Takes a store that contains an array from where index is number of row and value is the result of executing the content block rendering function.
1741
1797
  * Then renders the content and wraps it into a div with the correct styling.
@@ -1788,6 +1844,7 @@ function $f8f375d6245ffff2$var$wrap_blocks_in_div(rendered_content_blocks, max_s
1788
1844
  content: () => {
1789
1845
  // Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
1790
1846
  // However, no need to count products to know if we should render: the <For> loops in Placeholders and render_displays will only call this function if there's actually a product here that wants to display this block
1847
+ // (or, once all products have loaded, ResultsProductCards renders the blocks placed after the last product)
1791
1848
  set_rendering_delayed_(false);
1792
1849
  return content;
1793
1850
  },
@@ -2678,6 +2735,63 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
2678
2735
  return outmost_element;
2679
2736
  }
2680
2737
  $52FdA$solidjsweb.delegateEvents(["click"]);
2738
+
2739
+ /**
2740
+ * `HTMLElement.focus()` is a **silent no-op** on an element that is not being rendered
2741
+ * (`display: none`, `visibility: hidden`, a collapsed menu). Nothing throws, focus simply
2742
+ * stays where it was, so a caller that does not check believes it restored focus when it
2743
+ * left it on `<body>` — which puts the keyboard user back at the top of the document.
2744
+ *
2745
+ * That is reachable whenever the element which opened a modal stops being rendered while the
2746
+ * modal is open, and the common way for that to happen is the responsive-duplicate header:
2747
+ * a theme renders the same search trigger twice, once for desktop and once for mobile, and
2748
+ * hides one at the current breakpoint. Open the modal from the desktop trigger, cross the
2749
+ * breakpoint (rotate a tablet, resize a window), close the modal, and the remembered trigger
2750
+ * is still `isConnected` but no longer rendered. Verified against a live merchant storefront
2751
+ * on 4.10.19.
2752
+ *
2753
+ * So: verify that focus landed, and when it did not, look for a rendered twin of the same
2754
+ * control — the other half of the responsive pair — and use that instead.
2755
+ */ /**
2756
+ * An element can only take focus if it is actually being rendered.
2757
+ *
2758
+ * Injectable because it is the one part of this module that needs a layout engine: jsdom
2759
+ * reports no client rects for anything, so the specs pass their own predicate to exercise the
2760
+ * matching rules. The real predicate is only exercised in a browser.
2761
+ */
2762
+ const $1573c1a34371380a$export$e0652711c614c755 = element => !!element.getClientRects().length;
2763
+ /**
2764
+ * `document.activeElement` is the outermost shadow host when focus is inside a shadow tree,
2765
+ * so ask the element's own root rather than the document — matching how the rest of
2766
+ * modal_opener treats shadow-mounted modals.
2767
+ */
2768
+ const $1573c1a34371380a$var$has_focus = element => element.getRootNode().activeElement === element;
2769
+ /**
2770
+ * The accessible-name-ish identity we match twins on. Deliberately narrow: an explicit label
2771
+ * or the trimmed text. Two controls that share a tag and this string are the same control
2772
+ * rendered twice, which is exactly the responsive-duplicate case.
2773
+ */
2774
+ const $1573c1a34371380a$var$identity_of = element => (element.getAttribute("aria-label") || element.getAttribute("title") || element.textContent || "").trim().replace(/\s+/g, " ");
2775
+ function $1573c1a34371380a$export$5800d9d535a06e96(element) {
2776
+ let rendered = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $1573c1a34371380a$export$e0652711c614c755;
2777
+ const identity = $1573c1a34371380a$var$identity_of(element);
2778
+ if (!identity) return; // nothing to match on — an icon-only button with no label
2779
+ const twins = [...element.ownerDocument.querySelectorAll(element.localName)].filter(candidate => candidate !== element && rendered(candidate) && $1573c1a34371380a$var$identity_of(candidate) === identity);
2780
+ return twins.length === 1 ? twins[0] : undefined;
2781
+ }
2782
+ function $1573c1a34371380a$export$51461d633c351649(element) {
2783
+ let rendered = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : $1573c1a34371380a$export$e0652711c614c755;
2784
+ element.focus({
2785
+ preventScroll: true
2786
+ });
2787
+ if ($1573c1a34371380a$var$has_focus(element)) return true;
2788
+ const twin = $1573c1a34371380a$export$5800d9d535a06e96(element, rendered);
2789
+ if (!twin) return false;
2790
+ twin.focus({
2791
+ preventScroll: true
2792
+ });
2793
+ return $1573c1a34371380a$var$has_focus(twin);
2794
+ }
2681
2795
  async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
2682
2796
  const body = parent || document.body || (await (0, $52FdA$depictaiutilishared.observer).wait_for_element("body"));
2683
2797
  let dispose_and_remove;
@@ -2743,9 +2857,12 @@ async function $4cf7d9829d60d844$export$79b1565500412d9b(search_modal, modal_fn_
2743
2857
  });
2744
2858
  focused = requested_focus_target.getRootNode().activeElement === requested_focus_target;
2745
2859
  }
2746
- if (!focused && element_focused_before_open !== null && element_focused_before_open !== void 0 && element_focused_before_open.isConnected) element_focused_before_open.focus({
2747
- preventScroll: true
2748
- });
2860
+ if (!focused && element_focused_before_open !== null && element_focused_before_open !== void 0 && element_focused_before_open.isConnected)
2861
+ // restore_focus_to rather than a bare focus(): the remembered trigger can be
2862
+ // connected but no longer rendered (a responsive-duplicate header whose other
2863
+ // half is showing now), and focus() on an unrendered element silently does
2864
+ // nothing, leaving the keyboard user at the top of the page.
2865
+ $1573c1a34371380a$export$51461d633c351649(element_focused_before_open);
2749
2866
  } finally {
2750
2867
  // Cleared on a task instead of synchronously in case a browser delivers the focus event async
2751
2868
  setTimeout(() => restoring_focus = false, 0);
@@ -9788,20 +9905,28 @@ function $73014ff36186a4dd$var$_classPrivateMethodGet(receiver, privateSet, fn)
9788
9905
  }
9789
9906
  var $73014ff36186a4dd$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
9790
9907
  var $73014ff36186a4dd$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
9908
+ var $73014ff36186a4dd$var$_watch_for_navigation_to_same_href = /*#__PURE__*/new WeakSet();
9791
9909
  class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
9792
9910
  /**
9793
9911
  * Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
9794
9912
  */ /**
9795
9913
  * We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
9796
9914
  */ /**
9797
- * Vue has async router that needs to be awaited (it navigates after a microtask)
9798
- * This standardises waiting for all kinds of routers
9799
- */
9915
+ * Called when a go_to_ didn't change location.href, for example when following a link to the page one is already on. href_change_ipns stays silent then, so whoever waits for a href change to react to a navigation has to listen here too
9916
+ */ /**
9917
+ * Vue has async router that needs to be awaited (it navigates after a microtask)
9918
+ * This standardises waiting for all kinds of routers
9919
+ */ /**
9920
+ * Calls navigation_to_same_href_listeners_ if the navigation we're about to request ends on the href we're already on
9921
+ * @returns function to stop watching, call it when the navigation failed
9922
+ */
9800
9923
  constructor(on_navigation, listing_query_state_key) {
9924
+ $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_watch_for_navigation_to_same_href);
9801
9925
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_get_navigation_happened_promise);
9802
9926
  $73014ff36186a4dd$var$_classPrivateMethodInitSpec(this, $73014ff36186a4dd$var$_throwing_on_navigation);
9803
9927
  $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "on_navigation_", void 0);
9804
9928
  $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "listing_query_state_key", void 0);
9929
+ $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "navigation_to_same_href_listeners_", new Set());
9805
9930
  $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty)(this, "navigate_", {
9806
9931
  /**
9807
9932
  * Call this if you *just* want to replace the state object in history.state
@@ -9843,6 +9968,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
9843
9968
  }
9844
9969
  event_ === null || event_ === void 0 || event_.preventDefault();
9845
9970
  const promise = $73014ff36186a4dd$var$_classPrivateMethodGet(this, $73014ff36186a4dd$var$_get_navigation_happened_promise, $73014ff36186a4dd$var$_get_navigation_happened_promise2).call(this, true);
9971
+ const stop_watching_for_same_href = $73014ff36186a4dd$var$_classPrivateMethodGet(this, $73014ff36186a4dd$var$_watch_for_navigation_to_same_href, $73014ff36186a4dd$var$_watch_for_navigation_to_same_href2).call(this, new_url_);
9846
9972
  if (force_spa_navigation_ && wants_hard_navigation) {
9847
9973
  // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
9848
9974
  const new_state = history.state;
@@ -9856,7 +9982,7 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
9856
9982
  is_replace: is_replace_,
9857
9983
  new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.href),
9858
9984
  scroll: scroll
9859
- });
9985
+ }, stop_watching_for_same_href);
9860
9986
  await promise;
9861
9987
  })
9862
9988
  });
@@ -9864,15 +9990,16 @@ class $73014ff36186a4dd$export$7e1297a3a19f10d8 {
9864
9990
  this.on_navigation_ = on_navigation;
9865
9991
  }
9866
9992
  }
9867
- function $73014ff36186a4dd$var$_throwing_on_navigation2() {
9993
+ function $73014ff36186a4dd$var$_throwing_on_navigation2(options, on_throw_) {
9868
9994
  const {
9869
9995
  on_navigation_: on_navigation_
9870
9996
  } = this;
9871
9997
  if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
9872
9998
  // make sure that we don't accidentally catchify if the SDK consumer has fucked up
9873
9999
  try {
9874
- return on_navigation_(...arguments);
10000
+ return on_navigation_(options);
9875
10001
  } catch (e) {
10002
+ on_throw_ === null || on_throw_ === void 0 || on_throw_();
9876
10003
  queueMicrotask(() => {
9877
10004
  throw e;
9878
10005
  });
@@ -9889,6 +10016,24 @@ function $73014ff36186a4dd$var$_get_navigation_happened_promise2(is_replace) {
9889
10016
  (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).add(handler);
9890
10017
  });
9891
10018
  }
10019
+ function $73014ff36186a4dd$var$_watch_for_navigation_to_same_href2(target_url) {
10020
+ const href_before = location.href;
10021
+ const stop_watching = () => {
10022
+ (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).delete(on_history_change);
10023
+ clearTimeout(timeout);
10024
+ };
10025
+ const notify_if_href_unchanged = $52FdA$depictaiutilishared.catchify(() => {
10026
+ stop_watching();
10027
+ if (location.href !== href_before) return;
10028
+ this.navigation_to_same_href_listeners_.forEach(listener => $52FdA$depictaiutilishared.catchify(listener)());
10029
+ });
10030
+ // The router has acted once it touches history, if the href is still the same then it took us to the page we're on
10031
+ const on_history_change = () => notify_if_href_unchanged();
10032
+ // A router asked to go to the exact href we're on might not touch history at all, so don't wait longer than 500ms for it. For any other target we can't tell a slow navigation from one that goes nowhere, so only stop listening after a while
10033
+ const timeout = target_url.href === href_before ? setTimeout(notify_if_href_unchanged, 500) : setTimeout(stop_watching, 10000);
10034
+ (0, $52FdA$depictaiutilishared.instant_exec_on_suspect_history_change).add(on_history_change);
10035
+ return stop_watching;
10036
+ }
9892
10037
  var $2c920813c92d6987$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<button class="show-more major"type=button>`),
9893
10038
  $2c920813c92d6987$var$_tmpl$2 = /*#__PURE__*/$52FdA$solidjsweb.template(`<h2 class=recs-title>`),
9894
10039
  $2c920813c92d6987$var$_tmpl$3 = /*#__PURE__*/$52FdA$solidjsweb.template(`<div class=recommendation-grid><!$><!/><!$><!/>`);
@@ -11698,11 +11843,17 @@ var $820f2920cc576f7e$var$_tmpl$ = /*#__PURE__*/$52FdA$solidjsweb.template(`<svg
11698
11843
  function $820f2920cc576f7e$export$8d8893ffd8aca39a() {
11699
11844
  return $52FdA$solidjsweb.getNextElement($820f2920cc576f7e$var$_tmpl$);
11700
11845
  }
11701
- function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url_param_name_) {
11846
+ function $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal, search_query_url_param_name_, router_) {
11702
11847
  const [exit_iterable, exitable_iterable] = $52FdA$depictaiutilishared.make_asyncIterable_exiter((0, $52FdA$depictaiutilishared.href_change_ipns));
11848
+ const {
11849
+ navigation_to_same_href_listeners_: navigation_to_same_href_listeners_
11850
+ } = router_;
11703
11851
  let set_initial_values = false;
11704
11852
  let old_pathname;
11705
11853
  let old_param_value;
11854
+ // A card linking to the page one is already on doesn't change the href, close the modal anyway so the click does something
11855
+ navigation_to_same_href_listeners_.add(close_modal);
11856
+ $52FdA$solidjs.onCleanup(() => navigation_to_same_href_listeners_.delete(close_modal));
11706
11857
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.catchify(exit_iterable));
11707
11858
  $52FdA$depictaiutilishared.catchify(async () => {
11708
11859
  for await (const href of exitable_iterable) {
@@ -11863,7 +12014,7 @@ function $9035b24c2dbd3f36$var$RawClassicSearchModal(_ref) {
11863
12014
  return _el$;
11864
12015
  })();
11865
12016
  if (disable_scrolling_) $8c2e68c6d458169b$export$fe334901e8bebd57();
11866
- $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_);
12017
+ $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_, router_);
11867
12018
  window.addEventListener("keydown", close_on_escape_handler);
11868
12019
  $52FdA$solidjs.onCleanup($52FdA$depictaiutilishared.catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
11869
12020
  if (closing_animation_) register_closing_animation_(closing_animation_);
@@ -12784,7 +12935,7 @@ function $43600b30502feeda$var$RawSearchModalV2(_ref) {
12784
12935
  return (((_get_modal_search_res5 = get_modal_search_results_()) === null || _get_modal_search_res5 === void 0 ? void 0 : _get_modal_search_res5.loading) === false && !suggestions_response_.loading || !!prev) && totalNumberResults() === 0 && previous_searches_matching_query().length === 0;
12785
12936
  });
12786
12937
  if (disable_scrolling_) $8c2e68c6d458169b$export$fe334901e8bebd57();
12787
- $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_);
12938
+ $4b71b4fabdee5753$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_, router_);
12788
12939
  addEventListener("keydown", close_on_escape_handler);
12789
12940
  $52FdA$solidjs.onCleanup(() => removeEventListener("keydown", close_on_escape_handler));
12790
12941
  $52FdA$solidjs.createEffect($52FdA$solidjs.on(get_search_field_value_, () => {
package/ES10/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { GetListingRequest } from "@depict-ai/types/api/GetListingRequest";
11
11
  import { BaseSearchRequestV3 } from "@depict-ai/types/api/BaseSearchRequestV3";
12
12
  import { FeaturedInDisplay } from "@depict-ai/types/api/FeaturedInResponseV3";
13
13
  import { SearchFilter as _SearchFilter3 } from "@depict-ai/types/api/SearchRequestV2";
14
- export const version = "4.10.20";
14
+ export const version = "4.10.22";
15
15
  /**
16
16
  * Use `javascript_media_query` but return a reactive accessor instead of taking a callback function
17
17
  */
@@ -425,10 +425,8 @@ export function remap_blocks_to_index<T = () => JSX.Element | Promise<JSX.Elemen
425
425
  })[];
426
426
  n_cols_currently_showing_: number | null;
427
427
  }): {
428
- content_blocks_by_index_: (Awaited<T> | T[])[];
429
- readonly displaced_products_?: undefined;
430
- } | {
431
428
  readonly content_blocks_by_index_: (Awaited<T> | T[])[];
429
+ readonly rows_by_index_: number[][];
432
430
  readonly displaced_products_: (number | (true | undefined)[])[];
433
431
  };
434
432
  /** @jsxImportSource solid-js */
@@ -485,6 +483,10 @@ export class PseudoRouter {
485
483
  * We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
486
484
  */
487
485
  listing_query_state_key: string | undefined;
486
+ /**
487
+ * Called when a go_to_ didn't change location.href, for example when following a link to the page one is already on. href_change_ipns stays silent then, so whoever waits for a href change to react to a navigation has to listen here too
488
+ */
489
+ navigation_to_same_href_listeners_: Set<VoidFunction>;
488
490
  navigate_: {
489
491
  /**
490
492
  * Call this if you *just* want to replace the state object in history.state