@depict-ai/ui 1.1.2 → 1.1.4

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.
@@ -43,7 +43,7 @@ $parcel$export(module.exports, "defaultGridSpacing", () => $a3280f0aad997933$exp
43
43
  $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$export$c3834fa86c616831);
44
44
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
45
45
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
46
- /*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.1.2";
46
+ /*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.1.4";
47
47
 
48
48
 
49
49
 
@@ -6290,9 +6290,13 @@ async function $7b4bc889571cc67b$var$download_categories(tenant, market, type) {
6290
6290
  });
6291
6291
  if (!fetched) return [];
6292
6292
  try {
6293
+ if (fetched.status !== 200) {
6294
+ (0, $57o7A$depictaiutilishared.dlog)("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
6295
+ return [];
6296
+ }
6293
6297
  return (await fetched.json())?.query_ids;
6294
6298
  } catch (e) {
6295
- (0, $57o7A$depictaiutilishared.dlog)("failed to decode queries json", e);
6299
+ (0, $57o7A$depictaiutilishared.dlog)("failed to decode queries json", fetched, e);
6296
6300
  return [];
6297
6301
  }
6298
6302
  }
@@ -2,7 +2,7 @@ import {add_to_version_info as $gco9i$add_to_version_info, observer as $gco9i$ob
2
2
  import {createRoot as $gco9i$createRoot, createSignal as $gco9i$createSignal, getOwner as $gco9i$getOwner, runWithOwner as $gco9i$runWithOwner, onCleanup as $gco9i$onCleanup, createComputed as $gco9i$createComputed, createRenderEffect as $gco9i$createRenderEffect, createEffect as $gco9i$createEffect, untrack as $gco9i$untrack, batch as $gco9i$batch, createResource as $gco9i$createResource, createMemo as $gco9i$createMemo, Show as $gco9i$Show, createReaction as $gco9i$createReaction, Suspense as $gco9i$Suspense, on as $gco9i$on, ErrorBoundary as $gco9i$ErrorBoundary, For as $gco9i$For, Index as $gco9i$Index} from "solid-js";
3
3
  import {template as $gco9i$template, getNextElement as $gco9i$getNextElement, spread as $gco9i$spread, mergeProps as $gco9i$mergeProps, runHydrationEvents as $gco9i$runHydrationEvents, effect as $gco9i$effect, setAttribute as $gco9i$setAttribute, insert as $gco9i$insert, isServer as $gco9i$isServer, createComponent as $gco9i$createComponent, getNextMarker as $gco9i$getNextMarker, use as $gco9i$use, memo as $gco9i$memo, addEventListener as $gco9i$addEventListener, delegateEvents as $gco9i$delegateEvents, classList as $gco9i$classList, style as $gco9i$style, className as $gco9i$className, Dynamic as $gco9i$Dynamic} from "solid-js/web";
4
4
 
5
- /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.1.2";
5
+ /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.1.4";
6
6
 
7
7
 
8
8
 
@@ -6249,9 +6249,13 @@ async function $5c5f95951393e5d1$var$download_categories(tenant, market, type) {
6249
6249
  });
6250
6250
  if (!fetched) return [];
6251
6251
  try {
6252
+ if (fetched.status !== 200) {
6253
+ (0, $gco9i$dlog)("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
6254
+ return [];
6255
+ }
6252
6256
  return (await fetched.json())?.query_ids;
6253
6257
  } catch (e) {
6254
- (0, $gco9i$dlog)("failed to decode queries json", e);
6258
+ (0, $gco9i$dlog)("failed to decode queries json", fetched, e);
6255
6259
  return [];
6256
6260
  }
6257
6261
  }
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { SearchSuggestionsResponse, CategorySuggestion } from "@depict-ai/types/
7
7
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
8
8
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
9
9
  import { ProductListingResponse } from "@depict-ai/types/api/ProductListingResponse";
10
- export const version = "1.1.2";
10
+ export const version = "1.1.4";
11
11
  /**
12
12
  * Basically allows you to use SearchModal
13
13
  * So the idea is to have a modal. It should either be rendered and exist, in which case it is in the foreground and open, or it's completely gone. This makes things easier.
@@ -381,7 +381,7 @@ export interface BaseCategoryPageConfig extends BaseProductListingConfig {
381
381
  * Will be sent to backend to indicate whether the query_id_ is for a collection or category.
382
382
  * Backend defaults to category if not specified.
383
383
  */
384
- type ListingType = "collection" | "category";
384
+ export type ListingType = "collection" | "category";
385
385
  type DepictCategoryConstructorOptions = {
386
386
  market: string;
387
387
  merchant: string;
@@ -43,7 +43,7 @@ $parcel$export(module.exports, "defaultGridSpacing", () => $a3280f0aad997933$exp
43
43
  $parcel$export(module.exports, "defaultColsAtSize", () => $a3280f0aad997933$export$c3834fa86c616831);
44
44
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $a3280f0aad997933$export$7bf543b9d9be2c22);
45
45
  $parcel$export(module.exports, "version", () => $b757f75811f3261f$export$83d89fbfd8236492);
46
- /*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.1.2";
46
+ /*! Depict.ai search and product listing SDK */ const $b757f75811f3261f$export$83d89fbfd8236492 = "1.1.4";
47
47
 
48
48
 
49
49
 
@@ -5551,9 +5551,13 @@ async function $7b4bc889571cc67b$var$download_categories(tenant, market, type) {
5551
5551
  });
5552
5552
  if (!fetched) return [];
5553
5553
  try {
5554
+ if (fetched.status !== 200) {
5555
+ (0, $diwD4$depictaiutilishared.dlog)("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
5556
+ return [];
5557
+ }
5554
5558
  return (await fetched.json())?.query_ids;
5555
5559
  } catch (e) {
5556
- (0, $diwD4$depictaiutilishared.dlog)("failed to decode queries json", e);
5560
+ (0, $diwD4$depictaiutilishared.dlog)("failed to decode queries json", fetched, e);
5557
5561
  return [];
5558
5562
  }
5559
5563
  }
@@ -2,7 +2,7 @@ import {add_to_version_info as $cV3wj$add_to_version_info, observer as $cV3wj$ob
2
2
  import {createRoot as $cV3wj$createRoot, createSignal as $cV3wj$createSignal, getOwner as $cV3wj$getOwner, runWithOwner as $cV3wj$runWithOwner, onCleanup as $cV3wj$onCleanup, createComputed as $cV3wj$createComputed, createRenderEffect as $cV3wj$createRenderEffect, createEffect as $cV3wj$createEffect, untrack as $cV3wj$untrack, batch as $cV3wj$batch, createResource as $cV3wj$createResource, createMemo as $cV3wj$createMemo, Show as $cV3wj$Show, createReaction as $cV3wj$createReaction, Suspense as $cV3wj$Suspense, on as $cV3wj$on, ErrorBoundary as $cV3wj$ErrorBoundary, For as $cV3wj$For, Index as $cV3wj$Index} from "solid-js";
3
3
  import {ssrElement as $cV3wj$ssrElement, ssr as $cV3wj$ssr, ssrHydrationKey as $cV3wj$ssrHydrationKey, ssrAttribute as $cV3wj$ssrAttribute, escape as $cV3wj$escape, isServer as $cV3wj$isServer, createComponent as $cV3wj$createComponent, ssrClassList as $cV3wj$ssrClassList, insert as $cV3wj$insert, ssrStyle as $cV3wj$ssrStyle, Dynamic as $cV3wj$Dynamic, mergeProps as $cV3wj$mergeProps} from "solid-js/web";
4
4
 
5
- /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.1.2";
5
+ /*! Depict.ai search and product listing SDK */ const $ec291e0010116877$export$83d89fbfd8236492 = "1.1.4";
6
6
 
7
7
 
8
8
 
@@ -5510,9 +5510,13 @@ async function $5c5f95951393e5d1$var$download_categories(tenant, market, type) {
5510
5510
  });
5511
5511
  if (!fetched) return [];
5512
5512
  try {
5513
+ if (fetched.status !== 200) {
5514
+ (0, $cV3wj$dlog)("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
5515
+ return [];
5516
+ }
5513
5517
  return (await fetched.json())?.query_ids;
5514
5518
  } catch (e) {
5515
- (0, $cV3wj$dlog)("failed to decode queries json", e);
5519
+ (0, $cV3wj$dlog)("failed to decode queries json", fetched, e);
5516
5520
  return [];
5517
5521
  }
5518
5522
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@depict-ai/ui",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Base package containing the actual UI of Depict UI along with translations, with a not-simplified API. We recommend using @depict-ai/js-ui or @depict-ai/react-ui instead.",
5
5
  "packageManager": "yarn@3.2.2",
6
- "main": "dist/client/main.js",
6
+ "main": "dist/client/main.cjs",
7
7
  "module": "dist/client/module.js",
8
8
  "sass": "styles.scss",
9
9
  "context": "node",
@@ -90,19 +90,19 @@
90
90
  "types": "./dist/index.d.ts",
91
91
  "browser": {
92
92
  "import": "./dist/client/module.js",
93
- "require": "./dist/client/main.js",
93
+ "require": "./dist/client/main.cjs",
94
94
  "default": "./dist/client/module.js"
95
95
  },
96
96
  "node": {
97
97
  "import": "./dist/server/module.js",
98
- "require": "./dist/server/main.js",
98
+ "require": "./dist/server/main.cjs",
99
99
  "default": "./dist/server/module.js"
100
100
  }
101
101
  },
102
102
  "./locales": {
103
103
  "types": "./locales/index.d.ts",
104
104
  "import": "./locales/index.js",
105
- "require": "./locales/require.js",
105
+ "require": "./locales/require.cjs",
106
106
  "default": "./locales/index.js"
107
107
  }
108
108
  },
@@ -124,9 +124,9 @@
124
124
  "ts-jest": "^29.0.3"
125
125
  },
126
126
  "dependencies": {
127
- "@depict-ai/plp-styling": "^1.0.19",
128
- "@depict-ai/types": "^1.0.22",
129
- "@depict-ai/utilishared": "^1.0.18",
127
+ "@depict-ai/plp-styling": "^1.0.21",
128
+ "@depict-ai/types": "^1.0.24",
129
+ "@depict-ai/utilishared": "^1.0.20",
130
130
  "solid-js": "^1.7.3"
131
131
  },
132
132
  "types": "dist/index.d.ts",