@depict-ai/react-ui 4.1.0 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { add_to_version_info as $jb2Oo$add_to_version_info, catchify as $jb2Oo$catchify, queueMacroTask as $jb2Oo$queueMacroTask, instant_exec_on_suspect_history_change as $jb2Oo$instant_exec_on_suspect_history_change, derror as $jb2Oo$derror, dwarn as $jb2Oo$dwarn } from "@depict-ai/utilishared/ES10";
3
3
  import { CategoryTitle as $383b6fd56bf151bd$re_export$CategoryTitle, embedded_num_products as $383b6fd56bf151bd$re_export$EmbeddedNumProducts, SearchModalV2 as $383b6fd56bf151bd$re_export$SearchModalV2, ClassicSearchModal as $383b6fd56bf151bd$re_export$ClassicSearchModal, DepictAPI as $jb2Oo$DepictAPI, DepictSearch as $jb2Oo$DepictSearch, DepictCategory as $jb2Oo$DepictCategory, get_search_query_updating_blocked_signal as $jb2Oo$get_search_query_updating_blocked_signal, SearchPage as $jb2Oo$SearchPage, defaultColsAtSize as $jb2Oo$defaultColsAtSize, defaultGridSpacing as $jb2Oo$defaultGridSpacing, ProductCardError as $jb2Oo$ProductCardError, CategoryPage as $jb2Oo$CategoryPage, defaultCategoryTitlePlugin as $jb2Oo$defaultCategoryTitlePlugin, BreadCrumbs as $jb2Oo$BreadCrumbs, QuickLinks as $jb2Oo$QuickLinks, ImagePlaceholder as $jb2Oo$ImagePlaceholder, TextPlaceholder as $jb2Oo$TextPlaceholder, RecommendationSlider as $jb2Oo$RecommendationSlider, RecommendationGrid as $jb2Oo$RecommendationGrid, modalVersionSymbol as $jb2Oo$modalVersionSymbol, open_modal_with_alignment as $jb2Oo$open_modal_with_alignment, SearchField as $jb2Oo$SearchField, fetchDepictRecommendations as $jb2Oo$fetchDepictRecommendations } from "@depict-ai/ui/ES10";
4
- import { untrack as $jb2Oo$untrack, createRoot as $jb2Oo$createRoot, createEffect as $jb2Oo$createEffect, createSignal as $jb2Oo$createSignal, createMemo as $jb2Oo$createMemo, createComponent as $jb2Oo$createComponent, Show as $jb2Oo$Show, createComputed as $jb2Oo$createComputed, onCleanup as $jb2Oo$onCleanup, getOwner as $jb2Oo$getOwner, runWithOwner as $jb2Oo$runWithOwner, on as $jb2Oo$on, mapArray as $jb2Oo$mapArray, createRenderEffect as $jb2Oo$createRenderEffect } from "solid-js";
4
+ import { untrack as $jb2Oo$untrack, createRoot as $jb2Oo$createRoot, createEffect as $jb2Oo$createEffect, createSignal as $jb2Oo$createSignal, createComputed as $jb2Oo$createComputed, createMemo as $jb2Oo$createMemo, onCleanup as $jb2Oo$onCleanup, getOwner as $jb2Oo$getOwner, runWithOwner as $jb2Oo$runWithOwner, on as $jb2Oo$on, mapArray as $jb2Oo$mapArray, Show as $jb2Oo$Show, createRenderEffect as $jb2Oo$createRenderEffect } from "solid-js";
5
5
  import { createElement as $jb2Oo$createElement, Fragment as $jb2Oo$Fragment, useEffect as $jb2Oo$useEffect, useState as $jb2Oo$useState, useRef as $jb2Oo$useRef, forwardRef as $jb2Oo$forwardRef, Component as $jb2Oo$Component, useCallback as $jb2Oo$useCallback } from "react";
6
6
  import { defaultLocale as $jb2Oo$defaultLocale } from "@depict-ai/ui/locales/ES10";
7
- import { render as $jb2Oo$render, hydrate as $jb2Oo$hydrate, isServer as $jb2Oo$isServer, ssr as $jb2Oo$ssr, ssrHydrationKey as $jb2Oo$ssrHydrationKey } from "solid-js/web";
7
+ import { render as $jb2Oo$render, createComponent as $jb2Oo$createComponent, hydrate as $jb2Oo$hydrate, isServer as $jb2Oo$isServer, ssr as $jb2Oo$ssr, ssrHydrationKey as $jb2Oo$ssrHydrationKey } from "solid-js/web";
8
8
  import { createStore as $jb2Oo$createStore, reconcile as $jb2Oo$reconcile } from "solid-js/store";
9
9
  import { DPC as $jb2Oo$DPC } from "@depict-ai/dpc/ES10";
10
10
  import { jsx as $jb2Oo$jsx } from "react/jsx-runtime";
@@ -15,7 +15,7 @@ import { renderToString as $jb2Oo$renderToString } from "react-dom/server";
15
15
  // Note, if you add an export here, also add one in src-server/main.ts
16
16
  import { register_es_version } from "../multi_import_deduplicator.mjs";
17
17
  register_es_version("react-ui", "ES10");
18
- const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "4.1.0";
18
+ const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "4.1.2";
19
19
  const $8c691d7f86317052$export$8e769ad4338a911e = {
20
20
  usedLocale: $jb2Oo$createSignal((0, $jb2Oo$defaultLocale)),
21
21
  search_instances: new Map(),
@@ -33,27 +33,27 @@ const $8c691d7f86317052$export$8e769ad4338a911e = {
33
33
  enable_content_search: $jb2Oo$createSignal(),
34
34
  disable_override_listing_id: $jb2Oo$createSignal()
35
35
  };
36
- let $0dd9d9a9c7da4c1d$var$run_on_href_change;
37
- let $0dd9d9a9c7da4c1d$var$old_href = location.href;
38
- function $0dd9d9a9c7da4c1d$export$74f3924c5027fe1d(cb) {
39
- $0dd9d9a9c7da4c1d$var$run_on_href_change = cb;
36
+ let $ac53b4e3251b31d0$var$run_on_href_change;
37
+ let $ac53b4e3251b31d0$var$old_href = location.href;
38
+ function $ac53b4e3251b31d0$export$74f3924c5027fe1d(cb) {
39
+ $ac53b4e3251b31d0$var$run_on_href_change = cb;
40
40
  }
41
41
  (0, $jb2Oo$instant_exec_on_suspect_history_change).add($jb2Oo$catchify(() => {
42
42
  const {
43
43
  href: href
44
44
  } = location;
45
- if ($0dd9d9a9c7da4c1d$var$run_on_href_change && $0dd9d9a9c7da4c1d$var$old_href !== href) $0dd9d9a9c7da4c1d$var$run_on_href_change(href);
46
- $0dd9d9a9c7da4c1d$var$old_href = href;
45
+ if ($ac53b4e3251b31d0$var$run_on_href_change && $ac53b4e3251b31d0$var$old_href !== href) $ac53b4e3251b31d0$var$run_on_href_change(href);
46
+ $ac53b4e3251b31d0$var$old_href = href;
47
47
  }));
48
- const $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52 = function () {
48
+ const $ac53b4e3251b31d0$export$775e6b3892b5ad52 = function () {
49
49
  let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
50
50
  return url.pathname == $jb2Oo$untrack((0, $8c691d7f86317052$export$8e769ad4338a911e).search_page_path_[0]);
51
51
  }; // might have changed therefore get it from globalState
52
- const $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4 = function () {
52
+ const $ac53b4e3251b31d0$export$30c8a12df09be0e4 = function () {
53
53
  let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
54
54
  return (0, $8c691d7f86317052$export$8e769ad4338a911e).known_category_paths.has(url.pathname);
55
55
  };
56
- function $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef(_ref) {
56
+ function $ac53b4e3251b31d0$export$f6e64e17bd69eeef(_ref) {
57
57
  let {
58
58
  solid_component: solid_component,
59
59
  props: props,
@@ -88,7 +88,7 @@ function $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef(_ref) {
88
88
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
89
89
  return dispose;
90
90
  }, []);
91
- return $jb2Oo$createElement((0, $jb2Oo$Fragment), null, $jb2Oo$createElement(wrapper_type, {
91
+ return /*#__PURE__*/$jb2Oo$createElement((0, $jb2Oo$Fragment), null, /*#__PURE__*/$jb2Oo$createElement(wrapper_type, {
92
92
  ref: wrapper_element_ref,
93
93
  style: wrapper_style,
94
94
  ...(hydrate_function_when_ssr ? {
@@ -100,40 +100,6 @@ function $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef(_ref) {
100
100
  } : {})
101
101
  }), ...portals);
102
102
  }
103
- function $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035(component, is_set) {
104
- const unset = Symbol();
105
- const [args, setArgs] = $jb2Oo$createSignal(unset);
106
- const default_is_set = $jb2Oo$createMemo(() => {
107
- var _globalState$usedLoca;
108
- return !!((0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[0]() && (0, $8c691d7f86317052$export$8e769ad4338a911e).market[0]() && (_globalState$usedLoca = (0, $8c691d7f86317052$export$8e769ad4338a911e).usedLocale[0]()) !== null && _globalState$usedLoca !== void 0 && _globalState$usedLoca.backend_locale_);
109
- });
110
- const should_show = $jb2Oo$createMemo(prev => {
111
- if (!prev && (0, $8c691d7f86317052$export$8e769ad4338a911e).provider_is_updating[0]())
112
- // Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
113
- // If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
114
- // Otherwise as soon as tenant and market is set we render the CategoryPage, but we might not have a DepictCategory yet, see https://depictaiworkspace.slack.com/archives/C04UZ2Z0RNE/p1690895918347289?thread_ts=1688391305.529449&cid=C04UZ2Z0RNE
115
- return false;
116
- return (is_set || default_is_set)();
117
- });
118
- // @ts-ignore
119
- const renderedShow = $jb2Oo$createComponent((0, $jb2Oo$Show), {
120
- get when() {
121
- // Need to wait with rendering component until we've actually received the args
122
- return should_show() && args() !== unset;
123
- },
124
- get children() {
125
- return component(...$jb2Oo$untrack(args));
126
- }
127
- });
128
- // Previously we did above logic in the function that we return here, but we can't do that since in solid-js insertExpression it says `while (typeof v === "function") v = v();`, that means that if a component returns a function containing a signal value, that signal value changing would lead to the entire component re-rendering.
129
- // Instead, we have to create our show logic and everything that actually needs an owner above and only return a signal getter that isn't created with the same owner as it's called
130
- // Relevant debugging playground links: https://playground.solidjs.com/anonymous/9b9bdca1-1fe6-4865-a6e7-850026d07a74, https://playground.solidjs.com/anonymous/cfd5e6cd-6931-43dd-aa9e-c73c855010c6, https://playground.solidjs.com/anonymous/c8b019a6-0cda-4863-8345-f42e1616d714
131
- return function () {
132
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
133
- setArgs(args);
134
- return renderedShow;
135
- };
136
- }
137
103
  let $64144f6d578fd8ac$var$set = false;
138
104
  let $64144f6d578fd8ac$var$padding_animation;
139
105
  function $64144f6d578fd8ac$export$6453cbc34515a94d() {
@@ -141,7 +107,7 @@ function $64144f6d578fd8ac$export$6453cbc34515a94d() {
141
107
  /// WARNING WARNING WARNING
142
108
  // If you are debugging scroll restoration, make sure you're not in strict mode!!!!! Scroll restoration in nextjs won't work in strict mode because react will nuke all our elements from the DOM and render them again during going back
143
109
  // Next 13.x+ has strict mode by default, opt out by setting reactStrictMode: false in next.config.js
144
- const are_on_search_or_category_page = () => $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52() || $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4();
110
+ const are_on_search_or_category_page = () => $ac53b4e3251b31d0$export$775e6b3892b5ad52() || $ac53b4e3251b31d0$export$30c8a12df09be0e4();
145
111
  if ($64144f6d578fd8ac$var$set) return; // Just being safe
146
112
  $64144f6d578fd8ac$var$set = true;
147
113
  // We used to initialise this variable with false which in some cases (scroll to top button in FloatingButtons) would cause the scroll to be blocked when it shouldn't (see https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686141321127089?thread_ts=1686134246.109689&cid=C058KQ3MU8Z)
@@ -167,8 +133,8 @@ function $64144f6d578fd8ac$export$6453cbc34515a94d() {
167
133
  const [get_category_page_in_dom] = (0, $8c691d7f86317052$export$8e769ad4338a911e).category_page_in_dom;
168
134
  const search_page_in_dom = $jb2Oo$untrack(get_search_page_in_dom);
169
135
  const category_page_in_dom = $jb2Oo$untrack(get_category_page_in_dom);
170
- const new_is_search = $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52();
171
- const new_is_category = $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4();
136
+ const new_is_search = $ac53b4e3251b31d0$export$775e6b3892b5ad52();
137
+ const new_is_category = $ac53b4e3251b31d0$export$30c8a12df09be0e4();
172
138
  let accessor_to_wait_for;
173
139
  if (search_page_in_dom && new_is_search || category_page_in_dom && new_is_category) {
174
140
  // Already on the page we're going to
@@ -234,9 +200,9 @@ const $7abe9e29758fa0eb$export$599d4515591ef232 = (relativeUrl, isReplace, scrol
234
200
  Page[Page["SEARCH"] = 1] = "SEARCH";
235
201
  Page[Page["CATEGORY"] = 2] = "CATEGORY";
236
202
  })(Page || (Page = {}));
237
- const current_page = $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52() ? Page.SEARCH : $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
203
+ const current_page = $ac53b4e3251b31d0$export$775e6b3892b5ad52() ? Page.SEARCH : $ac53b4e3251b31d0$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
238
204
  const target_u_o = new URL(relativeUrl, location.origin);
239
- const target_page = $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
205
+ const target_page = $ac53b4e3251b31d0$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $ac53b4e3251b31d0$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
240
206
  window.next.router[isReplace ? "replace" : "push"](relativeUrl, undefined, {
241
207
  shallow: current_page === target_page && target_page !== Page.OTHER,
242
208
  scroll:
@@ -587,14 +553,45 @@ function $0565aab3357d32e9$export$84601d922bd37be1(blocks, component_portals, se
587
553
  };
588
554
  });
589
555
  }
590
- const $d059770e7af9e2dc$var$rendered_components_with_state_key = new Set();
591
- function $d059770e7af9e2dc$export$a54ec244c8863715(props) {
592
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
593
- solid_component: $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035($d059770e7af9e2dc$var$SolidSearchPage),
556
+ function $7d10b4c67928d97f$export$eb5844afe948564b(props) {
557
+ const default_is_set = $jb2Oo$createMemo(() => {
558
+ var _globalState$usedLoca;
559
+ return !!((0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[0]() && (0, $8c691d7f86317052$export$8e769ad4338a911e).market[0]() && (_globalState$usedLoca = (0, $8c691d7f86317052$export$8e769ad4338a911e).usedLocale[0]()) !== null && _globalState$usedLoca !== void 0 && _globalState$usedLoca.backend_locale_);
560
+ });
561
+ const should_show = $jb2Oo$createMemo(prev => {
562
+ if (!prev && (0, $8c691d7f86317052$export$8e769ad4338a911e).provider_is_updating[0]())
563
+ // Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
564
+ // If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
565
+ // Otherwise as soon as tenant and market is set we render the CategoryPage, but we might not have a DepictCategory yet, see https://depictaiworkspace.slack.com/archives/C04UZ2Z0RNE/p1690895918347289?thread_ts=1688391305.529449&cid=C04UZ2Z0RNE
566
+ return false;
567
+ return (props.isSet || default_is_set)();
568
+ });
569
+ return $jb2Oo$createComponent((0, $jb2Oo$Show), {
570
+ get when() {
571
+ return should_show();
572
+ },
573
+ get children() {
574
+ return props.children;
575
+ }
576
+ });
577
+ }
578
+ const $f33e2dee70c97da3$var$rendered_components_with_state_key = new Set();
579
+ function $f33e2dee70c97da3$export$a54ec244c8863715(props) {
580
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
581
+ solid_component: function () {
582
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
583
+ // Work around some kind of babel bug where an optimisation turns ...args into `arguments` in the ES10 build which becomes the wrong arguments when read from teh getter
584
+ const ourArguments = args;
585
+ return $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
586
+ get children() {
587
+ return $f33e2dee70c97da3$var$SolidSearchPage(...ourArguments);
588
+ }
589
+ });
590
+ },
594
591
  props: props
595
592
  });
596
593
  }
597
- function $d059770e7af9e2dc$var$SolidSearchPage(props, set_portals) {
594
+ function $f33e2dee70c97da3$var$SolidSearchPage(props, set_portals) {
598
595
  const depict_search = $jb2Oo$createMemo(() => {
599
596
  const instance = $fda7a7820477f957$export$f4d89133c6985668("search", props.stateKey, "SearchPage");
600
597
  $jb2Oo$onCleanup(() => {
@@ -618,7 +615,7 @@ function $d059770e7af9e2dc$var$SolidSearchPage(props, set_portals) {
618
615
  // This is because on the front page the search_query updating is blocked because it's not the search page, and that means that `filtered_previous_searches` in Autocomplete.tsx doesn't filter out the current search query
619
616
  // Because it's so minor and would be quite hard to fix (one would need a second "actual search query" signal just for this purpose) it's wontfix for now
620
617
  // EDIT: now that we're resetting this in the onCleanup of the memo above this might no longer be the case
621
- write_signal(!$0dd9d9a9c7da4c1d$export$775e6b3892b5ad52(location));
618
+ write_signal(!$ac53b4e3251b31d0$export$775e6b3892b5ad52(location));
622
619
  };
623
620
  const [, set_search_page_in_dom] = (0, $8c691d7f86317052$export$8e769ad4338a911e).search_page_in_dom;
624
621
  const component_portals = new Set();
@@ -626,18 +623,18 @@ function $d059770e7af9e2dc$var$SolidSearchPage(props, set_portals) {
626
623
  set_search_page_in_dom(true);
627
624
  $jb2Oo$onCleanup(() => set_search_page_in_dom(false));
628
625
  // react is really slow with disposing components, we want to avoid a flash of another search query when you click on a product and navigate away
629
- $0dd9d9a9c7da4c1d$export$74f3924c5027fe1d(update_updating_blocked_signal); // if we navigate, re-check
626
+ $ac53b4e3251b31d0$export$74f3924c5027fe1d(update_updating_blocked_signal); // if we navigate, re-check
630
627
  $jb2Oo$createComputed(() => {
631
628
  (0, $8c691d7f86317052$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
632
629
  update_updating_blocked_signal();
633
630
  });
634
- $d059770e7af9e2dc$var$search_page_path_checker();
631
+ $f33e2dee70c97da3$var$search_page_path_checker();
635
632
  return $jb2Oo$createMemo(() => {
636
633
  const stateKey = $jb2Oo$untrack(() => props.stateKey);
637
- if ($d059770e7af9e2dc$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple SearchPage components with the same stateKey: ".concat(stateKey, ". Each SearchPage component must have a unique stateKey."));
634
+ if ($f33e2dee70c97da3$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple SearchPage components with the same stateKey: ".concat(stateKey, ". Each SearchPage component must have a unique stateKey."));
638
635
  const transformed_content_blocks = $0565aab3357d32e9$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
639
- $d059770e7af9e2dc$var$rendered_components_with_state_key.add(stateKey);
640
- $jb2Oo$onCleanup(() => $d059770e7af9e2dc$var$rendered_components_with_state_key.delete(stateKey));
636
+ $f33e2dee70c97da3$var$rendered_components_with_state_key.add(stateKey);
637
+ $jb2Oo$onCleanup(() => $f33e2dee70c97da3$var$rendered_components_with_state_key.delete(stateKey));
641
638
  return $jb2Oo$SearchPage({
642
639
  // Default config goes here
643
640
  get include_input_field() {
@@ -669,7 +666,7 @@ function $d059770e7af9e2dc$var$SolidSearchPage(props, set_portals) {
669
666
  /**
670
667
  * Users often set the searchPagePath to something without the market which breaks everything using the searchPagePath internally, notably refining the search query. Add a warning for them.
671
668
  */
672
- function $d059770e7af9e2dc$var$search_page_path_checker() {
669
+ function $f33e2dee70c97da3$var$search_page_path_checker() {
673
670
  let has_warned = false;
674
671
  $jb2Oo$createEffect(() => {
675
672
  if (has_warned) return;
@@ -685,19 +682,26 @@ function $d059770e7af9e2dc$var$search_page_path_checker() {
685
682
  }
686
683
  });
687
684
  }
688
- const $e86a296a07b17ad5$var$rendered_components_with_state_key = new Set();
689
- function $e86a296a07b17ad5$export$f7d2f673fc2f091d(props) {
690
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
685
+ const $710dda89475e8c05$var$rendered_components_with_state_key = new Set();
686
+ function $710dda89475e8c05$export$f7d2f673fc2f091d(props) {
687
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
691
688
  // @ts-ignore
692
689
  solid_component: function () {
693
- return $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035($e86a296a07b17ad5$var$SolidCategoryPage)(...arguments);
690
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
691
+ // Work around some kind of babel bug where an optimisation turns ...args into `arguments` in the ES10 build which becomes the wrong arguments when read from teh getter
692
+ const ourArguments = args;
693
+ return $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
694
+ get children() {
695
+ return $710dda89475e8c05$var$SolidCategoryPage(...ourArguments);
696
+ }
697
+ });
694
698
  },
695
699
  props: props,
696
700
  wrapper_type: "div",
697
701
  wrapper_style: {}
698
702
  });
699
703
  }
700
- function $e86a296a07b17ad5$var$SolidCategoryPage(props, set_portals) {
704
+ function $710dda89475e8c05$var$SolidCategoryPage(props, set_portals) {
701
705
  const depict_category = $jb2Oo$createMemo(() => $fda7a7820477f957$export$f4d89133c6985668("category", props.stateKey, "CategoryPage") // stateKey can change
702
706
  );
703
707
 
@@ -717,11 +721,11 @@ function $e86a296a07b17ad5$var$SolidCategoryPage(props, set_portals) {
717
721
  (0, $8c691d7f86317052$export$8e769ad4338a911e).known_category_paths.add(location.pathname);
718
722
  }
719
723
  });
720
- const category = () => $jb2Oo$createMemo(() => {
724
+ const Category = () => $jb2Oo$createMemo(() => {
721
725
  const stateKey = $jb2Oo$untrack(() => props.stateKey);
722
- if ($e86a296a07b17ad5$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple CategoryPage components with the same stateKey: ".concat(stateKey, ". Each CategoryPage component must have a unique stateKey."));
723
- $e86a296a07b17ad5$var$rendered_components_with_state_key.add(stateKey);
724
- $jb2Oo$onCleanup(() => $e86a296a07b17ad5$var$rendered_components_with_state_key.delete(stateKey));
726
+ if ($710dda89475e8c05$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple CategoryPage components with the same stateKey: ".concat(stateKey, ". Each CategoryPage component must have a unique stateKey."));
727
+ $710dda89475e8c05$var$rendered_components_with_state_key.add(stateKey);
728
+ $jb2Oo$onCleanup(() => $710dda89475e8c05$var$rendered_components_with_state_key.delete(stateKey));
725
729
  const transformed_content_blocks = $0565aab3357d32e9$export$84601d922bd37be1(() => props.contentBlocksByRow, component_portals, set_portals);
726
730
  return $jb2Oo$CategoryPage({
727
731
  depict_category: depict_category(),
@@ -758,15 +762,24 @@ function $e86a296a07b17ad5$var$SolidCategoryPage(props, set_portals) {
758
762
  })
759
763
  });
760
764
  });
761
- return $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035(category, category_state_set);
765
+ return $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
766
+ isSet: category_state_set,
767
+ get children() {
768
+ return $jb2Oo$createComponent(Category, {});
769
+ }
770
+ });
762
771
  }
763
772
  function $ec632214ac078e79$export$5646050d516e06bc(react_props) {
764
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
765
- solid_component: $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035($ec632214ac078e79$var$vanilla_breadcrumbs),
773
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
774
+ solid_component: solidProps => $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
775
+ get children() {
776
+ return $jb2Oo$createComponent($ec632214ac078e79$var$VanillaBreadcrumbs, solidProps);
777
+ }
778
+ }),
766
779
  props: react_props
767
780
  });
768
781
  }
769
- function $ec632214ac078e79$var$vanilla_breadcrumbs(props) {
782
+ function $ec632214ac078e79$var$VanillaBreadcrumbs(props) {
770
783
  // memo so stateKey can be dynamically changed
771
784
  return $jb2Oo$createMemo(() => {
772
785
  const depict_category = $fda7a7820477f957$export$f4d89133c6985668("category", props.stateKey, "BreadCrumbs");
@@ -777,12 +790,16 @@ function $ec632214ac078e79$var$vanilla_breadcrumbs(props) {
777
790
  }
778
791
  function $c61814cfb91ead09$export$466cdc317043f6cb() {
779
792
  let react_props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
780
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
781
- solid_component: $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035($c61814cfb91ead09$var$vanilla_quick_links),
793
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
794
+ solid_component: solidProps => $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
795
+ get children() {
796
+ return $jb2Oo$createComponent($c61814cfb91ead09$var$VanillaQuickLinks, solidProps);
797
+ }
798
+ }),
782
799
  props: react_props
783
800
  });
784
801
  }
785
- function $c61814cfb91ead09$var$vanilla_quick_links(props) {
802
+ function $c61814cfb91ead09$var$VanillaQuickLinks(props) {
786
803
  // memo so stateKey can be dynamically changed
787
804
  return $jb2Oo$createMemo(() => {
788
805
  const depict_category = $fda7a7820477f957$export$f4d89133c6985668("category", props.stateKey, "QuickLinks");
@@ -796,7 +813,7 @@ const $6406849926c3f794$export$3f37af283f8fb843 = raw_react_props => {
796
813
  class: raw_react_props.className,
797
814
  ...raw_react_props
798
815
  };
799
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
816
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
800
817
  solid_component: props_store => $jb2Oo$ImagePlaceholder(props_store),
801
818
  props: react_props,
802
819
  wrapper_type: "span",
@@ -808,7 +825,7 @@ const $2c7738b65cbcac1c$export$89c6019e4baa40b1 = raw_react_props => {
808
825
  class: raw_react_props.className,
809
826
  ...raw_react_props
810
827
  };
811
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
828
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
812
829
  solid_component: props_store => $jb2Oo$TextPlaceholder(props_store),
813
830
  props: react_props,
814
831
  wrapper_type: "span",
@@ -831,7 +848,7 @@ function $758339150fbfe9d5$export$4daadad26e48a2c7(props) {
831
848
  }
832
849
  function $c02e9fd51f31a1bd$export$82cfdc85a4d15688(props) {
833
850
  $758339150fbfe9d5$export$4daadad26e48a2c7(props);
834
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
851
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
835
852
  solid_component: $c02e9fd51f31a1bd$export$5abb40edfde2a843,
836
853
  props: props
837
854
  });
@@ -914,7 +931,7 @@ function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
914
931
  }
915
932
  function $31abef71c0a2d3fc$export$b0a773486c1c2312(props) {
916
933
  $758339150fbfe9d5$export$4daadad26e48a2c7(props);
917
- return $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
934
+ return $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
918
935
  solid_component: (0, $cd68097a7ee08669$export$e46079a2793e9ec7),
919
936
  props: props,
920
937
  hydrate_function_when_ssr: (0, $jb2Oo$hydrate),
@@ -966,7 +983,7 @@ function $356d18d3ed66814e$export$912994940e660d32() {
966
983
  open: open
967
984
  };
968
985
  }
969
- const $4c71282d292aac6d$export$9bb30bbe003b82e0 = function () {
986
+ const $ab2d430c2034aa17$export$9bb30bbe003b82e0 = function () {
970
987
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
971
988
  // We should just export a plain SearchField component here, not a weird hook thing, but I don't want to make a breaking change. Just fixing the re-rendering issue for now.
972
989
  // Create signal that persists across renders
@@ -974,19 +991,21 @@ const $4c71282d292aac6d$export$9bb30bbe003b82e0 = function () {
974
991
  // Update signal value when alignerRef changes
975
992
  set_aligner_signal_value(props === null || props === void 0 ? void 0 : props.alignerRef);
976
993
  // Make sure react never re-renders the actual SearchField component
977
- const componentFunction = $jb2Oo$useCallback(() => $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef({
978
- solid_component: $0dd9d9a9c7da4c1d$export$e5139bbbb9a05035(() => {
979
- return $jb2Oo$createMemo(() => {
980
- const depict_search = $fda7a7820477f957$export$f4d89133c6985668("search", props.stateKey, "useSearchField");
981
- return $jb2Oo$SearchField({
982
- depict_search: depict_search,
983
- get aligner_ref() {
984
- var _get_aligner_signal_v;
985
- // React mutates the object at some random time so only get the current value once it actually is requested
986
- return (_get_aligner_signal_v = get_aligner_signal_value()) === null || _get_aligner_signal_v === void 0 ? void 0 : _get_aligner_signal_v.current;
987
- }
994
+ const componentFunction = $jb2Oo$useCallback(() => $ac53b4e3251b31d0$export$f6e64e17bd69eeef({
995
+ solid_component: () => $jb2Oo$createComponent((0, $7d10b4c67928d97f$export$eb5844afe948564b), {
996
+ get children() {
997
+ return $jb2Oo$createMemo(() => {
998
+ const depict_search = $fda7a7820477f957$export$f4d89133c6985668("search", props.stateKey, "useSearchField");
999
+ return $jb2Oo$SearchField({
1000
+ depict_search: depict_search,
1001
+ get aligner_ref() {
1002
+ var _get_aligner_signal_v;
1003
+ // React mutates the object at some random time so only get the current value once it actually is requested
1004
+ return (_get_aligner_signal_v = get_aligner_signal_value()) === null || _get_aligner_signal_v === void 0 ? void 0 : _get_aligner_signal_v.current;
1005
+ }
1006
+ });
988
1007
  });
989
- });
1008
+ }
990
1009
  }),
991
1010
  props: {}
992
1011
  }), []);
@@ -1123,9 +1142,9 @@ const $05726fa9c7eda0a1$export$804fac5697cfbe35 = router => (relativeUrl, _ref)
1123
1142
  Page[Page["SEARCH"] = 1] = "SEARCH";
1124
1143
  Page[Page["CATEGORY"] = 2] = "CATEGORY";
1125
1144
  })(Page || (Page = {}));
1126
- const current_page = $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52() ? Page.SEARCH : $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
1145
+ const current_page = $ac53b4e3251b31d0$export$775e6b3892b5ad52() ? Page.SEARCH : $ac53b4e3251b31d0$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
1127
1146
  const target_u_o = new URL(relativeUrl, location.origin);
1128
- const target_page = $0dd9d9a9c7da4c1d$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $0dd9d9a9c7da4c1d$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
1147
+ const target_page = $ac53b4e3251b31d0$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $ac53b4e3251b31d0$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
1129
1148
  router[replace ? "replace" : "push"](relativeUrl, undefined, {
1130
1149
  shallow: current_page === target_page && target_page !== Page.OTHER,
1131
1150
  scroll:
@@ -1137,4 +1156,4 @@ const $a7dfdd84298ae791$export$b8a61e5c71402559 = {
1137
1156
  nextRouterNavigation: $05726fa9c7eda0a1$export$804fac5697cfbe35
1138
1157
  };
1139
1158
  $jb2Oo$add_to_version_info("react-ui", (0, $9bd9bb8700ab2ada$export$83d89fbfd8236492));
1140
- export { $c61814cfb91ead09$export$466cdc317043f6cb as QuickLinks, $ec632214ac078e79$export$5646050d516e06bc as BreadCrumbs, $f6a205a95e4fdee3$export$80e99ee6b29cadd2 as ComponentAligner, $18e5b9f66c7ade8e$export$9fac37a9c21c2f3b as DepictProvider, $e86a296a07b17ad5$export$f7d2f673fc2f091d as CategoryPage, $d059770e7af9e2dc$export$a54ec244c8863715 as SearchPage, $6406849926c3f794$export$3f37af283f8fb843 as ImagePlaceholder, $2c7738b65cbcac1c$export$89c6019e4baa40b1 as TextPlaceholder, $31abef71c0a2d3fc$export$b0a773486c1c2312 as RecommendationGrid, $c02e9fd51f31a1bd$export$82cfdc85a4d15688 as RecommendationSlider, $356d18d3ed66814e$export$912994940e660d32 as useSearchModal, $4c71282d292aac6d$export$9bb30bbe003b82e0 as useSearchField, $1895644749ca8d8a$export$6501da23a2770fc as useFetchRecommendations, $b34796f5ebe3470e$export$38b98fae14bd1f64 as usePerformanceClient, $39af3ccd78996343$export$72616730c1fad2f4 as useCategoryFilterHelpers, $383b6fd56bf151bd$re_export$CategoryTitle as CategoryTitle, $383b6fd56bf151bd$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $383b6fd56bf151bd$re_export$SearchModalV2 as SearchModalV2, $383b6fd56bf151bd$re_export$ClassicSearchModal as ClassicSearchModal, $9bd9bb8700ab2ada$export$83d89fbfd8236492 as version, $a7dfdd84298ae791$export$b8a61e5c71402559 as Navigation };
1159
+ export { $c61814cfb91ead09$export$466cdc317043f6cb as QuickLinks, $ec632214ac078e79$export$5646050d516e06bc as BreadCrumbs, $f6a205a95e4fdee3$export$80e99ee6b29cadd2 as ComponentAligner, $18e5b9f66c7ade8e$export$9fac37a9c21c2f3b as DepictProvider, $710dda89475e8c05$export$f7d2f673fc2f091d as CategoryPage, $f33e2dee70c97da3$export$a54ec244c8863715 as SearchPage, $6406849926c3f794$export$3f37af283f8fb843 as ImagePlaceholder, $2c7738b65cbcac1c$export$89c6019e4baa40b1 as TextPlaceholder, $31abef71c0a2d3fc$export$b0a773486c1c2312 as RecommendationGrid, $c02e9fd51f31a1bd$export$82cfdc85a4d15688 as RecommendationSlider, $356d18d3ed66814e$export$912994940e660d32 as useSearchModal, $ab2d430c2034aa17$export$9bb30bbe003b82e0 as useSearchField, $1895644749ca8d8a$export$6501da23a2770fc as useFetchRecommendations, $b34796f5ebe3470e$export$38b98fae14bd1f64 as usePerformanceClient, $39af3ccd78996343$export$72616730c1fad2f4 as useCategoryFilterHelpers, $383b6fd56bf151bd$re_export$CategoryTitle as CategoryTitle, $383b6fd56bf151bd$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $383b6fd56bf151bd$re_export$SearchModalV2 as SearchModalV2, $383b6fd56bf151bd$re_export$ClassicSearchModal as ClassicSearchModal, $9bd9bb8700ab2ada$export$83d89fbfd8236492 as version, $a7dfdd84298ae791$export$b8a61e5c71402559 as Navigation };