@depict-ai/react-ui 2.1.6 → 2.1.8

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.
Files changed (48) hide show
  1. package/ES10/index.cjs +14 -1
  2. package/ES10/index.d.ts +2 -2
  3. package/ES10/index.js +15 -2
  4. package/dist/main.js +527 -0
  5. package/dist/module.js +510 -0
  6. package/dist/styles/components/PLP/Buttons.scss +181 -0
  7. package/dist/styles/components/PLP/MorphingSign.scss +30 -0
  8. package/dist/styles/components/PLP/PLPResults.scss +26 -0
  9. package/dist/styles/components/PLP/ProductListingPage.scss +168 -0
  10. package/dist/styles/components/PLP/ScrollStatus.scss +31 -0
  11. package/dist/styles/components/PLP/SelectedFilters.scss +82 -0
  12. package/dist/styles/components/PLP/SlidableItems.scss +121 -0
  13. package/dist/styles/components/PLP/SortAndFilter/FloatingButtons.scss +84 -0
  14. package/dist/styles/components/PLP/SortAndFilter/SortAndFilter.scss +800 -0
  15. package/dist/styles/components/PLP/SortAndFilter/SortAndFilterModal.scss +158 -0
  16. package/dist/styles/components/PLP/SortAndFilter/WhiteSortAndFilter.scss +152 -0
  17. package/dist/styles/components/PLP/Toast.scss +59 -0
  18. package/dist/styles/components/PLP/index.scss +51 -0
  19. package/dist/styles/components/category/BreadCrumbs.scss +32 -0
  20. package/dist/styles/components/category/CategoryTitle.scss +40 -0
  21. package/dist/styles/components/category/QuickLinks.scss +80 -0
  22. package/dist/styles/components/category/index.scss +23 -0
  23. package/dist/styles/components/search/Autocomplete.scss +197 -0
  24. package/dist/styles/components/search/CategorySuggestions.scss +82 -0
  25. package/dist/styles/components/search/InstantCard.scss +122 -0
  26. package/dist/styles/components/search/InstantResults.scss +12 -0
  27. package/dist/styles/components/search/PreviousSearches.scss +90 -0
  28. package/dist/styles/components/search/QueryInput.scss +189 -0
  29. package/dist/styles/components/search/SearchModal.scss +101 -0
  30. package/dist/styles/components/search/SearchRecommendations.scss +28 -0
  31. package/dist/styles/components/search/ShowingResultsFor.scss +13 -0
  32. package/dist/styles/components/search/index.scss +40 -0
  33. package/dist/styles/default.css +1 -0
  34. package/dist/styles/helpers/custom_input.scss +194 -0
  35. package/dist/styles/helpers/supports-hover.scss +7 -0
  36. package/dist/styles/helpers/utils.scss +90 -0
  37. package/dist/styles/plain-css-fallback-styling.css +1 -1
  38. package/dist/styles/variables.scss +61 -0
  39. package/latest/index.cjs +13 -1
  40. package/latest/index.d.ts +2 -2
  41. package/latest/index.js +14 -2
  42. package/package.json +5 -5
  43. package/server/ES10/index.cjs +17 -3
  44. package/server/ES10/index.d.ts +2 -2
  45. package/server/ES10/index.js +18 -4
  46. package/server/latest/index.cjs +16 -3
  47. package/server/latest/index.d.ts +2 -2
  48. package/server/latest/index.js +17 -4
@@ -5,6 +5,7 @@ var $7QqFM$reactdomserver = require("react-dom/server");
5
5
  var $7QqFM$solidjs = require("solid-js");
6
6
  var $7QqFM$reactjsxruntime = require("react/jsx-runtime");
7
7
  var $7QqFM$reactdom = require("react-dom");
8
+ var $7QqFM$depictaiutilishared = require("@depict-ai/utilishared/latest");
8
9
  require("../../multi_import_deduplicator.cjs").register_es_version("react-ui", "latest");
9
10
  function $parcel$export(e, n, v, s) {
10
11
  Object.defineProperty(e, n, {
@@ -38,7 +39,7 @@ function $35dfe83eec81954c$export$4b564d7f5a1b1d43({
38
39
  }) {
39
40
  const wrapper_element_ref = $7QqFM$react.useRef();
40
41
  // The worst thing that can happen by multiple generateHydrationScript's is that events dispatched before the hydration are duplicated in solid's shared context which leads to them being deduplicated again here https://github.com/ryansolid/dom-expressions/blob/21fdba5bcab25986a2b93003aaace100b2231cdc/packages/dom-expressions/src/client.js#L280
41
- const rendered_html = $7QqFM$solidjsweb.renderToString(() => solid_component(props, () => {})) + $7QqFM$solidjsweb.generateHydrationScript();
42
+ const rendered_html = $7QqFM$solidjsweb.generateHydrationScript() + $7QqFM$solidjsweb.renderToString(() => solid_component(props, () => {}));
42
43
  return $7QqFM$react.createElement((0, $7QqFM$react.Fragment), null, $7QqFM$react.createElement(wrapper_type, {
43
44
  ref: wrapper_element_ref,
44
45
  style: wrapper_style,
@@ -163,7 +164,17 @@ function $0aaa03f81d756b85$export$bd8acc07a8bae229(props, set_portals) {
163
164
  }
164
165
  });
165
166
  }
166
- const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.6";
167
+
168
+ // Triggered by synsam trying to put null here and typescript somehow not complaining
169
+
170
+ function $67657ea54664baa8$export$4daadad26e48a2c7(props) {
171
+ const us = "RecommendationSlider/RecommendationGrid:";
172
+ if (typeof props?.recommendations?.then !== "function") {
173
+ $7QqFM$depictaiutilishared.dwarn(us, "Got", props.recommendations, "which is not thenable");
174
+ throw new Error(us + " props.recommendations needs to be a promise that is either unresolved (`new Promise(() => {})`) so we can show placeholders, or resolved (`Promise.resolve(recommendation_array)`) to the recommendations to show");
175
+ }
176
+ }
177
+ const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.8";
167
178
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
168
179
  return props.children;
169
180
  }
@@ -187,7 +198,8 @@ function $41e7e5d85b5e0d49$export$466cdc317043f6cb() {
187
198
  children: []
188
199
  });
189
200
  }
190
- function $41e7e5d85b5e0d49$export$82cfdc85a4d15688() {
201
+ function $41e7e5d85b5e0d49$export$82cfdc85a4d15688(props) {
202
+ $67657ea54664baa8$export$4daadad26e48a2c7(props);
191
203
  return $7QqFM$react.createElement("div", {
192
204
  children: []
193
205
  });
@@ -212,6 +224,7 @@ function $41e7e5d85b5e0d49$export$3f37af283f8fb843(raw_react_props) {
212
224
  });
213
225
  }
214
226
  function $41e7e5d85b5e0d49$export$b0a773486c1c2312(props) {
227
+ $67657ea54664baa8$export$4daadad26e48a2c7(props);
215
228
  return $35dfe83eec81954c$export$4b564d7f5a1b1d43({
216
229
  solid_component: (0, $0aaa03f81d756b85$export$bd8acc07a8bae229),
217
230
  props: props,
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, ReactNode, FC, ReactPortal, ReactElement } fr
3
3
  import { BaseProviderConfig, BaseSearchProviderConfig, BaseCategoryProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/latest";
4
4
  import { Locale } from "@depict-ai/ui/locales/latest";
5
5
  import { Display, ModernDisplay } from "@depict-ai/utilishared/latest";
6
- export const version = "2.1.6";
6
+ export const version = "2.1.8";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
@@ -607,7 +607,7 @@ export function useFetchRecommendations<T extends Display>(): UseFetchRecommenda
607
607
  * Helper function to navigate to a new page depending on the navigation library used.
608
608
  */
609
609
  export const Navigation: {
610
- nextRouterNavigation: (router: import("next/router").NextRouter) => import("ui/components/DepictProvider").NavigateFunction;
610
+ nextRouterNavigation: (router: import("next/router").NextRouter) => import("src/ui/components/DepictProvider").NavigateFunction;
611
611
  };
612
612
  export { CategoryTitle, embedded_num_products as EmbeddedNumProducts } from "@depict-ai/ui";
613
613
  export type { PageURLCreator, DisplayTransformers } from "@depict-ai/ui";
@@ -1,10 +1,11 @@
1
1
  import { createElement as $eOXet$createElement, useRef as $eOXet$useRef, Fragment as $eOXet$Fragment, useEffect as $eOXet$useEffect, useState as $eOXet$useState, Component as $eOXet$Component } from "react";
2
2
  import { ImagePlaceholder as $eOXet$ImagePlaceholder, TextPlaceholder as $eOXet$TextPlaceholder, RecommendationGrid as $eOXet$RecommendationGrid, defaultColsAtSize as $eOXet$defaultColsAtSize, defaultGridSpacing as $eOXet$defaultGridSpacing, ProductCardError as $eOXet$ProductCardError } from "@depict-ai/ui/latest";
3
- import { renderToString as $eOXet$renderToString, generateHydrationScript as $eOXet$generateHydrationScript, isServer as $eOXet$isServer } from "solid-js/web";
3
+ import { generateHydrationScript as $eOXet$generateHydrationScript, renderToString as $eOXet$renderToString, isServer as $eOXet$isServer } from "solid-js/web";
4
4
  import { renderToString as $eOXet$renderToString1 } from "react-dom/server";
5
5
  import { getOwner as $eOXet$getOwner, untrack as $eOXet$untrack, runWithOwner as $eOXet$runWithOwner, createEffect as $eOXet$createEffect, on as $eOXet$on, onCleanup as $eOXet$onCleanup } from "solid-js";
6
6
  import { jsx as $eOXet$jsx } from "react/jsx-runtime";
7
7
  import { createPortal as $eOXet$createPortal } from "react-dom";
8
+ import { dwarn as $eOXet$dwarn } from "@depict-ai/utilishared/latest";
8
9
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
9
10
  register_es_version("react-ui", "latest");
10
11
  function $4568c09979447ab1$export$4b564d7f5a1b1d43({
@@ -15,7 +16,7 @@ function $4568c09979447ab1$export$4b564d7f5a1b1d43({
15
16
  }) {
16
17
  const wrapper_element_ref = $eOXet$useRef();
17
18
  // The worst thing that can happen by multiple generateHydrationScript's is that events dispatched before the hydration are duplicated in solid's shared context which leads to them being deduplicated again here https://github.com/ryansolid/dom-expressions/blob/21fdba5bcab25986a2b93003aaace100b2231cdc/packages/dom-expressions/src/client.js#L280
18
- const rendered_html = $eOXet$renderToString(() => solid_component(props, () => {})) + $eOXet$generateHydrationScript();
19
+ const rendered_html = $eOXet$generateHydrationScript() + $eOXet$renderToString(() => solid_component(props, () => {}));
19
20
  return $eOXet$createElement((0, $eOXet$Fragment), null, $eOXet$createElement(wrapper_type, {
20
21
  ref: wrapper_element_ref,
21
22
  style: wrapper_style,
@@ -140,7 +141,17 @@ function $8bee51f55543fe0c$export$bd8acc07a8bae229(props, set_portals) {
140
141
  }
141
142
  });
142
143
  }
143
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.6";
144
+
145
+ // Triggered by synsam trying to put null here and typescript somehow not complaining
146
+
147
+ function $ab2bb2d1f47a25b7$export$4daadad26e48a2c7(props) {
148
+ const us = "RecommendationSlider/RecommendationGrid:";
149
+ if (typeof props?.recommendations?.then !== "function") {
150
+ $eOXet$dwarn(us, "Got", props.recommendations, "which is not thenable");
151
+ throw new Error(us + " props.recommendations needs to be a promise that is either unresolved (`new Promise(() => {})`) so we can show placeholders, or resolved (`Promise.resolve(recommendation_array)`) to the recommendations to show");
152
+ }
153
+ }
154
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.8";
144
155
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
145
156
  return props.children;
146
157
  }
@@ -164,7 +175,8 @@ function $2b1fdeb83610500f$export$466cdc317043f6cb() {
164
175
  children: []
165
176
  });
166
177
  }
167
- function $2b1fdeb83610500f$export$82cfdc85a4d15688() {
178
+ function $2b1fdeb83610500f$export$82cfdc85a4d15688(props) {
179
+ $ab2bb2d1f47a25b7$export$4daadad26e48a2c7(props);
168
180
  return $eOXet$createElement("div", {
169
181
  children: []
170
182
  });
@@ -189,6 +201,7 @@ function $2b1fdeb83610500f$export$3f37af283f8fb843(raw_react_props) {
189
201
  });
190
202
  }
191
203
  function $2b1fdeb83610500f$export$b0a773486c1c2312(props) {
204
+ $ab2bb2d1f47a25b7$export$4daadad26e48a2c7(props);
192
205
  return $4568c09979447ab1$export$4b564d7f5a1b1d43({
193
206
  solid_component: (0, $8bee51f55543fe0c$export$bd8acc07a8bae229),
194
207
  props: props,