@depict-ai/react-ui 1.0.3 → 1.0.5

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/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Display } from "@depict-ai/utilishared";
3
3
  import React, { ReactNode, PropsWithChildren, ReactElement } from "react";
4
4
  import { DPC } from "@depict-ai/dpc";
5
5
  import { Locale } from "@depict-ai/ui/locales";
6
- export const version = "1.0.3";
6
+ export const version = "1.0.5";
7
7
  interface PLPConfig<T extends Display> extends BaseProductListingConfig {
8
8
  /**
9
9
  * The product card to use for rendering products.
package/dist/main.js CHANGED
@@ -31,7 +31,7 @@ $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fb
31
31
  $parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
32
32
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
33
33
  // Note, if you add an export here, also add one in src-server/main.ts
34
- const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.3";
34
+ const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.5";
35
35
 
36
36
 
37
37
 
@@ -308,7 +308,7 @@ const $25c0a91312868994$export$47e064413edabf36 = (merchant, market, userId, ses
308
308
 
309
309
  function $24b00503eef73528$export$9fac37a9c21c2f3b(props) {
310
310
  const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
311
- const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.en);
311
+ const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.defaultLocale);
312
312
  const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
313
313
  // Will run on other prop changes, but harmless
314
314
  (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).userId = userId;
@@ -427,20 +427,8 @@ function $7ad7a3d0011b7b1b$var$SolidSearchPage(props, set_portals) {
427
427
  return (0, $4GYXz$depictaiui.SearchPage)({
428
428
  // Default config goes here
429
429
  include_input_field: (0, $4GYXz$solidjs.untrack)(()=>props.includeInputField) ?? true,
430
- cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? [
431
- [
432
- 4
433
- ],
434
- [
435
- 3,
436
- 1024
437
- ],
438
- [
439
- 2,
440
- 901
441
- ]
442
- ],
443
- grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? "2%",
430
+ cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? (0, $4GYXz$depictaiui.defaultColsAtSize),
431
+ grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? (0, $4GYXz$depictaiui.defaultGridSpacing),
444
432
  depict_search: depict_search,
445
433
  product_card_template: (display)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
446
434
  display: display,
@@ -479,23 +467,11 @@ function $5aa5fcb9f8a2bebc$var$SolidCategoryPage(props, set_portals) {
479
467
  });
480
468
  const category = ()=>(0, $4GYXz$depictaiui.CategoryPage)({
481
469
  depict_category: depict_category,
482
- cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? [
483
- [
484
- 4
485
- ],
486
- [
487
- 3,
488
- 1024
489
- ],
490
- [
491
- 2,
492
- 901
493
- ]
494
- ],
495
- grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? "2%",
496
- category_title: (0, $4GYXz$solidjs.untrack)(()=>props.categoryTitlePlugin) || (0, $4GYXz$depictaiui.CategoryTitle),
497
- show_breadcrumbs: (0, $4GYXz$solidjs.untrack)(()=>props.showBreadcrumbs === undefined ? true : props.showBreadcrumbs),
498
- show_quicklinks: (0, $4GYXz$solidjs.untrack)(()=>props.showQuicklinks === undefined ? true : props.showQuicklinks),
470
+ cols_at_size: (0, $4GYXz$solidjs.untrack)(()=>props.columnsAtSize) ?? (0, $4GYXz$depictaiui.defaultColsAtSize),
471
+ grid_spacing: (0, $4GYXz$solidjs.untrack)(()=>props.gridSpacing) ?? (0, $4GYXz$depictaiui.defaultGridSpacing),
472
+ category_title: (0, $4GYXz$solidjs.untrack)(()=>props.categoryTitlePlugin) || (0, $4GYXz$depictaiui.defaultCategoryTitlePlugin),
473
+ show_breadcrumbs: (0, $4GYXz$solidjs.untrack)(()=>props.showBreadcrumbs),
474
+ show_quicklinks: (0, $4GYXz$solidjs.untrack)(()=>props.showQuicklinks),
499
475
  product_card_template: (display)=>(0, $b4d0d98857ed9934$export$79c79419c1ef0081)({
500
476
  display: display,
501
477
  react_template: (0, $4GYXz$solidjs.untrack)(()=>props.productCard),
package/dist/module.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {add_to_version_info as $TZSbU$add_to_version_info, catchify as $TZSbU$catchify, queueMacroTask as $TZSbU$queueMacroTask, instant_exec_on_suspect_history_change as $TZSbU$instant_exec_on_suspect_history_change, ContainedPlaceholderImage as $TZSbU$ContainedPlaceholderImage, Placeholder as $TZSbU$Placeholder} from "@depict-ai/utilishared";
2
- import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, DepictAPI as $TZSbU$DepictAPI, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, ProductCardError as $TZSbU$ProductCardError, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, CategoryPage as $TZSbU$CategoryPage, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
2
+ import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, DepictAPI as $TZSbU$DepictAPI, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, ProductCardError as $TZSbU$ProductCardError, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, defaultColsAtSize as $TZSbU$defaultColsAtSize, defaultGridSpacing as $TZSbU$defaultGridSpacing, CategoryPage as $TZSbU$CategoryPage, defaultCategoryTitlePlugin as $TZSbU$defaultCategoryTitlePlugin, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
3
3
  import {createRoot as $TZSbU$createRoot, untrack as $TZSbU$untrack, createEffect as $TZSbU$createEffect, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, getOwner as $TZSbU$getOwner, runWithOwner as $TZSbU$runWithOwner, onCleanup as $TZSbU$onCleanup, createSignal as $TZSbU$createSignal, createComputed as $TZSbU$createComputed, createMemo as $TZSbU$createMemo} from "solid-js";
4
4
  import {createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment, useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, Component as $TZSbU$Component, forwardRef as $TZSbU$forwardRef} from "react";
5
- import {en as $TZSbU$en} from "@depict-ai/ui/locales";
5
+ import {defaultLocale as $TZSbU$defaultLocale} from "@depict-ai/ui/locales";
6
6
  import {render as $TZSbU$render} from "solid-js/web";
7
7
  import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
8
8
  import {createPortal as $TZSbU$createPortal} from "react-dom";
@@ -11,7 +11,7 @@ import {DPC as $TZSbU$DPC} from "@depict-ai/dpc";
11
11
 
12
12
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
13
13
  // Note, if you add an export here, also add one in src-server/main.ts
14
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.3";
14
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.5";
15
15
 
16
16
 
17
17
 
@@ -288,7 +288,7 @@ const $a00d8f27abd5d0b0$export$47e064413edabf36 = (merchant, market, userId, ses
288
288
 
289
289
  function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
290
290
  const { children: children , navigateFunction: navigateFunction , market: market , merchant: merchant , locale: locale , metaData: metaData , userId: userId , sessionId: sessionId } = props;
291
- const usedLocale = locale ?? (0, $TZSbU$en);
291
+ const usedLocale = locale ?? (0, $TZSbU$defaultLocale);
292
292
  const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
293
293
  // Will run on other prop changes, but harmless
294
294
  (0, $42858f023ef23dab$export$8e769ad4338a911e).userId = userId;
@@ -407,20 +407,8 @@ function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
407
407
  return (0, $TZSbU$SearchPage)({
408
408
  // Default config goes here
409
409
  include_input_field: (0, $TZSbU$untrack)(()=>props.includeInputField) ?? true,
410
- cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? [
411
- [
412
- 4
413
- ],
414
- [
415
- 3,
416
- 1024
417
- ],
418
- [
419
- 2,
420
- 901
421
- ]
422
- ],
423
- grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? "2%",
410
+ cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? (0, $TZSbU$defaultColsAtSize),
411
+ grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? (0, $TZSbU$defaultGridSpacing),
424
412
  depict_search: depict_search,
425
413
  product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
426
414
  display: display,
@@ -459,23 +447,11 @@ function $48d7f568740a317d$var$SolidCategoryPage(props, set_portals) {
459
447
  });
460
448
  const category = ()=>(0, $TZSbU$CategoryPage)({
461
449
  depict_category: depict_category,
462
- cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? [
463
- [
464
- 4
465
- ],
466
- [
467
- 3,
468
- 1024
469
- ],
470
- [
471
- 2,
472
- 901
473
- ]
474
- ],
475
- grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? "2%",
476
- category_title: (0, $TZSbU$untrack)(()=>props.categoryTitlePlugin) || (0, $43099132aad1ceb6$re_export$CategoryTitle),
477
- show_breadcrumbs: (0, $TZSbU$untrack)(()=>props.showBreadcrumbs === undefined ? true : props.showBreadcrumbs),
478
- show_quicklinks: (0, $TZSbU$untrack)(()=>props.showQuicklinks === undefined ? true : props.showQuicklinks),
450
+ cols_at_size: (0, $TZSbU$untrack)(()=>props.columnsAtSize) ?? (0, $TZSbU$defaultColsAtSize),
451
+ grid_spacing: (0, $TZSbU$untrack)(()=>props.gridSpacing) ?? (0, $TZSbU$defaultGridSpacing),
452
+ category_title: (0, $TZSbU$untrack)(()=>props.categoryTitlePlugin) || (0, $TZSbU$defaultCategoryTitlePlugin),
453
+ show_breadcrumbs: (0, $TZSbU$untrack)(()=>props.showBreadcrumbs),
454
+ show_quicklinks: (0, $TZSbU$untrack)(()=>props.showQuicklinks),
479
455
  product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
480
456
  display: display,
481
457
  react_template: (0, $TZSbU$untrack)(()=>props.productCard),
@@ -33,7 +33,7 @@ interface UseFetchRecommendationsReturn<T extends Display> {
33
33
  */
34
34
  fetchRecommendations: (opts: FetchRecsOptions) => Promise<T[]>;
35
35
  }
36
- export const version = "1.0.3";
36
+ export const version = "1.0.5";
37
37
  export function DepictProvider(props: any): any;
38
38
  export function SearchPage(): any;
39
39
  export function CategoryPage(): any;
@@ -21,7 +21,7 @@ $parcel$export(module.exports, "useFetchRecommendations", () => $41e7e5d85b5e0d4
21
21
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
22
22
 
23
23
 
24
- const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.3";
24
+ const $db7b67857900028b$export$83d89fbfd8236492 = "1.0.5";
25
25
 
26
26
 
27
27
  function $41e7e5d85b5e0d49$export$9fac37a9c21c2f3b(props) {
@@ -3,7 +3,7 @@ import {jsx as $1RlIW$jsx} from "react/jsx-runtime";
3
3
 
4
4
 
5
5
 
6
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.3";
6
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.0.5";
7
7
 
8
8
 
9
9
  function $2b1fdeb83610500f$export$9fac37a9c21c2f3b(props) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -93,18 +93,20 @@
93
93
  "files": [
94
94
  "/dist",
95
95
  "/dist-server",
96
- "/locales"
96
+ "/locales",
97
+ "README.md"
97
98
  ],
98
99
  "dependencies": {
99
- "@depict-ai/dpc": "^1.0.4",
100
- "@depict-ai/plp-styling": "^1.0.5",
101
- "@depict-ai/ui": "^1.0.5",
102
- "@depict-ai/utilishared": "^1.0.4",
100
+ "@depict-ai/dpc": "^1.0.6",
101
+ "@depict-ai/plp-styling": "^1.0.7",
102
+ "@depict-ai/ui": "^1.0.7",
103
+ "@depict-ai/utilishared": "^1.0.6",
103
104
  "solid-js": "^1.7.3"
104
105
  },
105
106
  "peerDependencies": {
106
107
  "react": ">= 16.14.0",
107
- "react-dom": ">= 16.14.0"
108
+ "react-dom": ">= 16.14.0",
109
+ "sass": ">= 1.54.6"
108
110
  },
109
111
  "devDependencies": {
110
112
  "@babel/core": "latest",
@@ -112,7 +114,7 @@
112
114
  "@babel/preset-typescript": "latest",
113
115
  "@babel/runtime": "latest",
114
116
  "@babel/runtime-corejs3": "latest",
115
- "@depict-ai/plp-styling": "^1.0.5",
117
+ "@depict-ai/plp-styling": "^1.0.7",
116
118
  "@jest/globals": "^29.3.1",
117
119
  "@parcel/babel-preset-env": "latest",
118
120
  "@parcel/resolver-default": "^2.8.0",