@depict-ai/react-ui 3.0.5 → 3.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "version", () => $efbdd2dab4314170$export$83d89fb
39
39
  $parcel$export(module.exports, "Navigation", () => $0d3a2413fdeb34b9$export$b8a61e5c71402559);
40
40
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
41
41
  // Note, if you add an export here, also add one in src-server/main.ts
42
- const $efbdd2dab4314170$export$83d89fbfd8236492 = "3.0.5";
42
+ const $efbdd2dab4314170$export$83d89fbfd8236492 = "3.0.7";
43
43
  const $ef516b1f92253963$export$8e769ad4338a911e = {
44
44
  usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
45
45
  search_instances: new Map(),
@@ -95,6 +95,20 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
95
95
  // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
96
96
  // This can happen for HMR or when SSR capable components are only rendered on the client
97
97
  const render_function = hydrate_function_when_ssr && wrapper_element.childNodes.length ? hydrate_function_when_ssr : (0, $2kiy7$solidjsweb.render);
98
+ // Our system of suppressing hydration warnings and SSR-ing seems to generally work (all the time also in our test storefronts)
99
+ // But sometimes in prod (see https://depictaiworkspace.slack.com/archives/C061PGT2N3A/p1702038855265339) react for some reason actually sets innerHTML = ""; on our wrapper
100
+ // Deleting all our elements. To prevent that we just patch innerHTML to not do anything when being set to a new value
101
+ if (hydrate_function_when_ssr && !Object.getOwnPropertyNames(wrapper_element).includes("innerHTML")) Object.defineProperty(wrapper_element, "innerHTML", {
102
+ configurable: false,
103
+ enumerable: true,
104
+ get() {
105
+ var _Object$getOwnPropert, _Object$getOwnPropert2;
106
+ return (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML")) === null || _Object$getOwnPropert === void 0 ? void 0 : (_Object$getOwnPropert2 = _Object$getOwnPropert.get) === null || _Object$getOwnPropert2 === void 0 ? void 0 : _Object$getOwnPropert2.call(wrapper_element);
107
+ },
108
+ set() {
109
+ // Do nothing
110
+ }
111
+ });
98
112
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
99
113
  return dispose;
100
114
  }, []);
package/ES10/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, FC, ReactNode, ReactPortal, ReactElement } fr
3
3
  import { BaseCategoryProviderConfig, BaseProviderConfig, BaseSearchProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ListingQuery, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/ES10";
4
4
  import { Locale } from "@depict-ai/ui/locales/ES10";
5
5
  import { Display, ModernDisplay } from "@depict-ai/utilishared/ES10";
6
- export const version = "3.0.5";
6
+ export const version = "3.0.7";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
package/ES10/index.js CHANGED
@@ -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 = "3.0.5";
18
+ const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "3.0.7";
19
19
  const $8c691d7f86317052$export$8e769ad4338a911e = {
20
20
  usedLocale: $jb2Oo$createSignal((0, $jb2Oo$defaultLocale)),
21
21
  search_instances: new Map(),
@@ -71,6 +71,20 @@ function $0dd9d9a9c7da4c1d$export$f6e64e17bd69eeef(_ref) {
71
71
  // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
72
72
  // This can happen for HMR or when SSR capable components are only rendered on the client
73
73
  const render_function = hydrate_function_when_ssr && wrapper_element.childNodes.length ? hydrate_function_when_ssr : (0, $jb2Oo$render);
74
+ // Our system of suppressing hydration warnings and SSR-ing seems to generally work (all the time also in our test storefronts)
75
+ // But sometimes in prod (see https://depictaiworkspace.slack.com/archives/C061PGT2N3A/p1702038855265339) react for some reason actually sets innerHTML = ""; on our wrapper
76
+ // Deleting all our elements. To prevent that we just patch innerHTML to not do anything when being set to a new value
77
+ if (hydrate_function_when_ssr && !Object.getOwnPropertyNames(wrapper_element).includes("innerHTML")) Object.defineProperty(wrapper_element, "innerHTML", {
78
+ configurable: false,
79
+ enumerable: true,
80
+ get() {
81
+ var _Object$getOwnPropert, _Object$getOwnPropert2;
82
+ return (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML")) === null || _Object$getOwnPropert === void 0 ? void 0 : (_Object$getOwnPropert2 = _Object$getOwnPropert.get) === null || _Object$getOwnPropert2 === void 0 ? void 0 : _Object$getOwnPropert2.call(wrapper_element);
83
+ },
84
+ set() {
85
+ // Do nothing
86
+ }
87
+ });
74
88
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
75
89
  return dispose;
76
90
  }, []);
package/latest/index.cjs CHANGED
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
39
39
  $parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
40
40
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
41
41
  // Note, if you add an export here, also add one in src-server/main.ts
42
- const $db7b67857900028b$export$83d89fbfd8236492 = "3.0.5";
42
+ const $db7b67857900028b$export$83d89fbfd8236492 = "3.0.7";
43
43
  const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
44
44
  usedLocale: $2IzJs$solidjs.createSignal((0, $2IzJs$depictaiuilocales.defaultLocale)),
45
45
  search_instances: new Map(),
@@ -88,6 +88,19 @@ function $b4d0d98857ed9934$export$f6e64e17bd69eeef({
88
88
  // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
89
89
  // This can happen for HMR or when SSR capable components are only rendered on the client
90
90
  const render_function = hydrate_function_when_ssr && wrapper_element.childNodes.length ? hydrate_function_when_ssr : (0, $2IzJs$solidjsweb.render);
91
+ // Our system of suppressing hydration warnings and SSR-ing seems to generally work (all the time also in our test storefronts)
92
+ // But sometimes in prod (see https://depictaiworkspace.slack.com/archives/C061PGT2N3A/p1702038855265339) react for some reason actually sets innerHTML = ""; on our wrapper
93
+ // Deleting all our elements. To prevent that we just patch innerHTML to not do anything when being set to a new value
94
+ if (hydrate_function_when_ssr && !Object.getOwnPropertyNames(wrapper_element).includes("innerHTML")) Object.defineProperty(wrapper_element, "innerHTML", {
95
+ configurable: false,
96
+ enumerable: true,
97
+ get() {
98
+ return Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML")?.get?.call(wrapper_element);
99
+ },
100
+ set() {
101
+ // Do nothing
102
+ }
103
+ });
91
104
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
92
105
  return dispose;
93
106
  }, []);
package/latest/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, FC, ReactNode, ReactPortal, ReactElement } fr
3
3
  import { BaseCategoryProviderConfig, BaseProviderConfig, BaseSearchProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ListingQuery, 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 = "3.0.5";
6
+ export const version = "3.0.7";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
package/latest/index.js CHANGED
@@ -15,7 +15,7 @@ import { renderToString as $2GFvs$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", "latest");
18
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "3.0.5";
18
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "3.0.7";
19
19
  const $42858f023ef23dab$export$8e769ad4338a911e = {
20
20
  usedLocale: $2GFvs$createSignal((0, $2GFvs$defaultLocale)),
21
21
  search_instances: new Map(),
@@ -64,6 +64,19 @@ function $c83ba9ab79386687$export$f6e64e17bd69eeef({
64
64
  // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
65
65
  // This can happen for HMR or when SSR capable components are only rendered on the client
66
66
  const render_function = hydrate_function_when_ssr && wrapper_element.childNodes.length ? hydrate_function_when_ssr : (0, $2GFvs$render);
67
+ // Our system of suppressing hydration warnings and SSR-ing seems to generally work (all the time also in our test storefronts)
68
+ // But sometimes in prod (see https://depictaiworkspace.slack.com/archives/C061PGT2N3A/p1702038855265339) react for some reason actually sets innerHTML = ""; on our wrapper
69
+ // Deleting all our elements. To prevent that we just patch innerHTML to not do anything when being set to a new value
70
+ if (hydrate_function_when_ssr && !Object.getOwnPropertyNames(wrapper_element).includes("innerHTML")) Object.defineProperty(wrapper_element, "innerHTML", {
71
+ configurable: false,
72
+ enumerable: true,
73
+ get() {
74
+ return Object.getOwnPropertyDescriptor(Element.prototype, "innerHTML")?.get?.call(wrapper_element);
75
+ },
76
+ set() {
77
+ // Do nothing
78
+ }
79
+ });
67
80
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
68
81
  return dispose;
69
82
  }, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "3.0.5",
3
+ "version": "3.0.7",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "types": "ES10/index.d.ts",
@@ -137,7 +137,7 @@
137
137
  "@babel/runtime-corejs3": "latest",
138
138
  "@depict-ai/dpc": "^2.0.2",
139
139
  "@depict-ai/plp-styling": "^2.0.2",
140
- "@depict-ai/ui": "^3.0.7",
140
+ "@depict-ai/ui": "^3.0.8",
141
141
  "@depict-ai/utilishared": "^2.0.2",
142
142
  "solid-js": "^1.8.1"
143
143
  },
@@ -233,7 +233,7 @@ function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
233
233
  }
234
234
  });
235
235
  }
236
- const $efbdd2dab4314170$export$83d89fbfd8236492 = "3.0.5";
236
+ const $efbdd2dab4314170$export$83d89fbfd8236492 = "3.0.7";
237
237
  function $202459d454907b31$export$9fac37a9c21c2f3b(props) {
238
238
  return props.children;
239
239
  }
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, FC, ReactNode, ReactPortal, ReactElement } fr
3
3
  import { BaseCategoryProviderConfig, BaseProviderConfig, BaseSearchProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ListingQuery, ImagePlaceholder as _ImagePlaceholder1, TextPlaceholder as _TextPlaceholder1, ExclusiveId, fetchDepictRecommendations } from "@depict-ai/ui/ES10";
4
4
  import { Locale } from "@depict-ai/ui/locales/ES10";
5
5
  import { Display, ModernDisplay } from "@depict-ai/utilishared/ES10";
6
- export const version = "3.0.5";
6
+ export const version = "3.0.7";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
@@ -210,7 +210,7 @@ function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
210
210
  }
211
211
  });
212
212
  }
213
- const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "3.0.5";
213
+ const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "3.0.7";
214
214
  function $5c4add0a8fe94894$export$9fac37a9c21c2f3b(props) {
215
215
  return props.children;
216
216
  }
@@ -224,7 +224,7 @@ function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
224
224
  }
225
225
  });
226
226
  }
227
- const $db7b67857900028b$export$83d89fbfd8236492 = "3.0.5";
227
+ const $db7b67857900028b$export$83d89fbfd8236492 = "3.0.7";
228
228
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
229
229
  return props.children;
230
230
  }
@@ -3,7 +3,7 @@ import React, { PropsWithChildren, FC, ReactNode, ReactPortal, ReactElement } fr
3
3
  import { BaseCategoryProviderConfig, BaseProviderConfig, BaseSearchProviderConfig, ModernDisplayWithPageUrl, BaseProductListingConfig, BaseSearchPageConfig, BaseCategoryPageConfig, CategoryTitle, embedded_num_products, ListingQuery, 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 = "3.0.5";
6
+ export const version = "3.0.7";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
@@ -201,7 +201,7 @@ function $4d5c3f13a5ae62a7$export$e46079a2793e9ec7(props, set_portals) {
201
201
  }
202
202
  });
203
203
  }
204
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "3.0.5";
204
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "3.0.7";
205
205
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
206
206
  return props.children;
207
207
  }