@depict-ai/react-ui 2.1.14 → 2.1.15

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 = "2.1.14";
42
+ const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.15";
43
43
  const $ef516b1f92253963$export$8e769ad4338a911e = {
44
44
  usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
45
45
  search_instances: new Map(),
@@ -224,6 +224,8 @@ function $abe6528d061993d2$var$make_next_router_event_target() {
224
224
  return next_router_event_target;
225
225
  }
226
226
  const $4a695f491f8300eb$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
227
+ var _window, _window$next;
228
+ if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
227
229
  let Page;
228
230
  (function (Page) {
229
231
  Page[Page["OTHER"] = 0] = "OTHER";
@@ -287,7 +289,10 @@ function $50b0315f34679db4$export$bae2769a30719c48(disposable, stateKey) {
287
289
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
288
290
  localization: $2kiy7$solidjs.untrack(get_locale),
289
291
  url_transformer: url => url.pathname = $2kiy7$solidjs.untrack(get_search_page_path),
290
- on_navigation: (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation,
292
+ on_navigation: function () {
293
+ return (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation(...arguments);
294
+ },
295
+ // wrapping the function here since it could change
291
296
  unique_instance_key_for_state: stateKey,
292
297
  enable_content_search: $2kiy7$solidjs.untrack(get_enable_content_search)
293
298
  });
@@ -327,7 +332,10 @@ function $d944107b1e0acdae$export$248b95d5073d5bab(disposable, stateKey) {
327
332
  // TODO: check if we can do this
328
333
  merchant: $2kiy7$solidjs.untrack(get_merchant),
329
334
  localization: $2kiy7$solidjs.untrack(get_locale),
330
- on_navigation: (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation,
335
+ on_navigation: function () {
336
+ return (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation(...arguments);
337
+ },
338
+ // wrapping the function here since it could change
331
339
  unique_instance_key_for_state: stateKey
332
340
  });
333
341
  $2kiy7$solidjs.createComputed(() => {
@@ -397,13 +405,11 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
397
405
  (0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[1](merchant);
398
406
  $abe6528d061993d2$export$6453cbc34515a94d();
399
407
  try {
400
- var _window, _window$next;
401
408
  const {
402
409
  search_instances: search_instances,
403
410
  category_instances: category_instances,
404
411
  search_page_path_: [, set_search_page_path]
405
412
  } = (0, $ef516b1f92253963$export$8e769ad4338a911e);
406
- if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
407
413
  const on_navigation = _ref => {
408
414
  let {
409
415
  is_replace: is_replace,
package/ES10/index.d.ts CHANGED
@@ -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/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 = "2.1.14";
6
+ export const version = "2.1.15";
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 = "2.1.14";
18
+ const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.15";
19
19
  const $8c691d7f86317052$export$8e769ad4338a911e = {
20
20
  usedLocale: $jb2Oo$createSignal((0, $jb2Oo$defaultLocale)),
21
21
  search_instances: new Map(),
@@ -200,6 +200,8 @@ function $64144f6d578fd8ac$var$make_next_router_event_target() {
200
200
  return next_router_event_target;
201
201
  }
202
202
  const $7abe9e29758fa0eb$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
203
+ var _window, _window$next;
204
+ if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
203
205
  let Page;
204
206
  (function (Page) {
205
207
  Page[Page["OTHER"] = 0] = "OTHER";
@@ -263,7 +265,10 @@ function $bef9f58602be2478$export$bae2769a30719c48(disposable, stateKey) {
263
265
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
264
266
  localization: $jb2Oo$untrack(get_locale),
265
267
  url_transformer: url => url.pathname = $jb2Oo$untrack(get_search_page_path),
266
- on_navigation: (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation,
268
+ on_navigation: function () {
269
+ return (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation(...arguments);
270
+ },
271
+ // wrapping the function here since it could change
267
272
  unique_instance_key_for_state: stateKey,
268
273
  enable_content_search: $jb2Oo$untrack(get_enable_content_search)
269
274
  });
@@ -303,7 +308,10 @@ function $b1c85026e863c95b$export$248b95d5073d5bab(disposable, stateKey) {
303
308
  // TODO: check if we can do this
304
309
  merchant: $jb2Oo$untrack(get_merchant),
305
310
  localization: $jb2Oo$untrack(get_locale),
306
- on_navigation: (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation,
311
+ on_navigation: function () {
312
+ return (0, $8c691d7f86317052$export$8e769ad4338a911e).on_navigation(...arguments);
313
+ },
314
+ // wrapping the function here since it could change
307
315
  unique_instance_key_for_state: stateKey
308
316
  });
309
317
  $jb2Oo$createComputed(() => {
@@ -373,13 +381,11 @@ function $18e5b9f66c7ade8e$var$ActualDepictProvider(props) {
373
381
  (0, $8c691d7f86317052$export$8e769ad4338a911e).merchant[1](merchant);
374
382
  $64144f6d578fd8ac$export$6453cbc34515a94d();
375
383
  try {
376
- var _window, _window$next;
377
384
  const {
378
385
  search_instances: search_instances,
379
386
  category_instances: category_instances,
380
387
  search_page_path_: [, set_search_page_path]
381
388
  } = (0, $8c691d7f86317052$export$8e769ad4338a911e);
382
- if (typeof ((_window = window) === null || _window === void 0 ? void 0 : (_window$next = _window.next) === null || _window$next === void 0 ? void 0 : _window$next.router) === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
383
389
  const on_navigation = _ref => {
384
390
  let {
385
391
  is_replace: is_replace,
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 = "2.1.14";
42
+ const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.15";
43
43
  const $0b7cd4fb39fc3502$export$8e769ad4338a911e = {
44
44
  usedLocale: $2IzJs$solidjs.createSignal((0, $2IzJs$depictaiuilocales.defaultLocale)),
45
45
  search_instances: new Map(),
@@ -210,6 +210,7 @@ function $6319748b4f0426f0$var$make_next_router_event_target() {
210
210
  return next_router_event_target;
211
211
  }
212
212
  const $bc389476eeb2b615$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
213
+ if (typeof window?.next?.router === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
213
214
  let Page;
214
215
  (function (Page) {
215
216
  Page[Page["OTHER"] = 0] = "OTHER";
@@ -272,7 +273,8 @@ function $b1cf911fa603e77a$export$bae2769a30719c48(disposable, stateKey) {
272
273
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
273
274
  localization: $2IzJs$solidjs.untrack(get_locale),
274
275
  url_transformer: url => url.pathname = $2IzJs$solidjs.untrack(get_search_page_path),
275
- on_navigation: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation,
276
+ on_navigation: (...args) => (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation(...args),
277
+ // wrapping the function here since it could change
276
278
  unique_instance_key_for_state: stateKey,
277
279
  enable_content_search: $2IzJs$solidjs.untrack(get_enable_content_search)
278
280
  });
@@ -312,7 +314,8 @@ function $da98aca6c7d4c3f9$export$248b95d5073d5bab(disposable, stateKey) {
312
314
  // TODO: check if we can do this
313
315
  merchant: $2IzJs$solidjs.untrack(get_merchant),
314
316
  localization: $2IzJs$solidjs.untrack(get_locale),
315
- on_navigation: (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation,
317
+ on_navigation: (...args) => (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).on_navigation(...args),
318
+ // wrapping the function here since it could change
316
319
  unique_instance_key_for_state: stateKey
317
320
  });
318
321
  $2IzJs$solidjs.createComputed(() => {
@@ -386,7 +389,6 @@ function $24b00503eef73528$var$ActualDepictProvider(props) {
386
389
  category_instances: category_instances,
387
390
  search_page_path_: [, set_search_page_path]
388
391
  } = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e);
389
- if (typeof window?.next?.router === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
390
392
  const on_navigation = ({
391
393
  is_replace: is_replace,
392
394
  new_url: new_url,
package/latest/index.d.ts CHANGED
@@ -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.14";
6
+ export const version = "2.1.15";
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 = "2.1.14";
18
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.15";
19
19
  const $42858f023ef23dab$export$8e769ad4338a911e = {
20
20
  usedLocale: $2GFvs$createSignal((0, $2GFvs$defaultLocale)),
21
21
  search_instances: new Map(),
@@ -186,6 +186,7 @@ function $8071251ee4e9ffa1$var$make_next_router_event_target() {
186
186
  return next_router_event_target;
187
187
  }
188
188
  const $7216ca4c8308a0f9$export$599d4515591ef232 = (relativeUrl, isReplace, scroll) => {
189
+ if (typeof window?.next?.router === "undefined") throw new Error("You must provide a navigateFunction when not using Next.js.");
189
190
  let Page;
190
191
  (function (Page) {
191
192
  Page[Page["OTHER"] = 0] = "OTHER";
@@ -248,7 +249,8 @@ function $80202ccbe2ade418$export$bae2769a30719c48(disposable, stateKey) {
248
249
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
249
250
  localization: $2GFvs$untrack(get_locale),
250
251
  url_transformer: url => url.pathname = $2GFvs$untrack(get_search_page_path),
251
- on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
252
+ on_navigation: (...args) => (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation(...args),
253
+ // wrapping the function here since it could change
252
254
  unique_instance_key_for_state: stateKey,
253
255
  enable_content_search: $2GFvs$untrack(get_enable_content_search)
254
256
  });
@@ -288,7 +290,8 @@ function $9145bcf81a0216ce$export$248b95d5073d5bab(disposable, stateKey) {
288
290
  // TODO: check if we can do this
289
291
  merchant: $2GFvs$untrack(get_merchant),
290
292
  localization: $2GFvs$untrack(get_locale),
291
- on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
293
+ on_navigation: (...args) => (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation(...args),
294
+ // wrapping the function here since it could change
292
295
  unique_instance_key_for_state: stateKey
293
296
  });
294
297
  $2GFvs$createComputed(() => {
@@ -362,7 +365,6 @@ function $5376eb2a386cd90d$var$ActualDepictProvider(props) {
362
365
  category_instances: category_instances,
363
366
  search_page_path_: [, set_search_page_path]
364
367
  } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
365
- if (typeof window?.next?.router === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
366
368
  const on_navigation = ({
367
369
  is_replace: is_replace,
368
370
  new_url: new_url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "types": "ES10/index.d.ts",
@@ -190,7 +190,7 @@ function $3b36cc844440a979$export$e46079a2793e9ec7(props, set_portals) {
190
190
  }
191
191
  });
192
192
  }
193
- const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.14";
193
+ const $efbdd2dab4314170$export$83d89fbfd8236492 = "2.1.15";
194
194
  function $202459d454907b31$export$9fac37a9c21c2f3b(props) {
195
195
  return props.children;
196
196
  }
@@ -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/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 = "2.1.14";
6
+ export const version = "2.1.15";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
@@ -167,7 +167,7 @@ function $cd68097a7ee08669$export$e46079a2793e9ec7(props, set_portals) {
167
167
  }
168
168
  });
169
169
  }
170
- const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.14";
170
+ const $9bd9bb8700ab2ada$export$83d89fbfd8236492 = "2.1.15";
171
171
  function $5c4add0a8fe94894$export$9fac37a9c21c2f3b(props) {
172
172
  return props.children;
173
173
  }
@@ -182,7 +182,7 @@ function $c6b960f2a07285c8$export$e46079a2793e9ec7(props, set_portals) {
182
182
  }
183
183
  });
184
184
  }
185
- const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.14";
185
+ const $db7b67857900028b$export$83d89fbfd8236492 = "2.1.15";
186
186
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
187
187
  return props.children;
188
188
  }
@@ -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.14";
6
+ export const version = "2.1.15";
7
7
  interface UsePerformanceClientReturn {
8
8
  dpc: DPC;
9
9
  }
@@ -159,7 +159,7 @@ function $4d5c3f13a5ae62a7$export$e46079a2793e9ec7(props, set_portals) {
159
159
  }
160
160
  });
161
161
  }
162
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.14";
162
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "2.1.15";
163
163
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
164
164
  return props.children;
165
165
  }