@depict-ai/react-ui 0.0.45 → 0.0.46

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
@@ -1,21 +1,9 @@
1
1
  import React, { PropsWithChildren, ReactNode } from "react";
2
- // @ts-ignore -- react-router is optional and only used for typing the reactRouterUseNavigate property
3
- import { useNavigate } from "react-router";
4
- import { Locale } from "@depict-ai/ui/locales";
5
2
  import { Display } from "@depict-ai/utilishared";
6
3
  import { SDKColsAtSize, SDKGridSpacing } from "@depict-ai/ui";
7
4
  export function DepictSearchField(): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
8
- type BaseSearchConfig = {
9
- /**
10
- * The merchant to use for the search.
11
- * @example "YOUR_MERCHANT", "stronger"
12
- */
13
- merchant: string;
14
- /**
15
- * The market to use for the search.
16
- * @example "YOUR_MARKET", "no", "en-de"
17
- */
18
- market: string;
5
+ type NavigateFunction = (href: string) => void;
6
+ type DepictSearchConfig = {
19
7
  /**
20
8
  * The path to the search page.
21
9
  * @example "/search", "/sok"
@@ -32,49 +20,61 @@ type BaseSearchConfig = {
32
20
  * @default false
33
21
  */
34
22
  enableCategorySuggestions?: boolean;
35
- locale: Locale;
23
+ };
24
+ type DepictBaseConfig = {
25
+ /**
26
+ * The merchant to use for the search.
27
+ * @example "YOUR_MERCHANT", "stronger"
28
+ */
29
+ merchant: string;
30
+ /**
31
+ * The market to use for the search.
32
+ * @example "YOUR_MARKET", "no", "en-de"
33
+ */
34
+ market: string;
35
+ /**
36
+ * The function to use for navigating to a new page.
37
+ * This function will be used internally by our components to navigate.
38
+ *
39
+ * You don't need to provide any in a Next.js context.
40
+ *
41
+ * @example
42
+ * Here is how you would use it with react-router, using our helper function.
43
+ * ```tsx
44
+ * import { DepictProvider, Navigation } from "@depict-ai/react-ui";
45
+ *
46
+ * function Router() {
47
+ * const navigate = useNavigate();
48
+ * return (
49
+ * <DepictProvider
50
+ * merchant="houdini"
51
+ * market="en-de"
52
+ * navigateFunction={Navigation.reactRouterNavigation(navigate)}
53
+ * search={{
54
+ * searchPagePath: "/search",
55
+ * }}
56
+ * >
57
+ * <Routes>[...]</Routes>
58
+ * </DepictProvider>
59
+ * );
60
+ * }
61
+ * ```
62
+ * @example
63
+ * If you're using another library, you can define your own navigate function, that's compatible with the `NavigateFunction` type.
64
+ * ```tsx
65
+ * const navigateFunction = (href: string) => {
66
+ * router.push(href);
67
+ * };
68
+ * ```
69
+ */
70
+ navigateFunction?: NavigateFunction;
36
71
  };
37
72
  /**
38
- * You can pass the function you use to navigate to a new page.
39
- *
40
- * Currently only works with react-router's useNavigate hook.
41
- * @example
42
- * ```tsx
43
- * import { useNavigate } from "react-router-dom";
44
- *
45
- * const App = () => {
46
- * return (
47
- * <DepictProvider
48
- * merchant="YOUR_MERCHANT"
49
- * market="YOUR_MARKET"
50
- * searchPagePath="/search"
51
- * reactRouterUseNavigate={useNavigate}
52
- * >
53
- * <App />
54
- * </DepictProvider>
55
- * );
56
- * };
57
- * ```
58
- */
59
- type DepictConfigInReactRouterContext = {
60
- /** Expects useNavigate hook from react-router */
61
- reactRouterUseNavigate: ReactRouterUseNavigate;
62
- /** Not to be used in this context */
63
- onNavigation?: undefined;
64
- } & BaseSearchConfig;
65
- type DepictConfigInOtherContext = {
66
- /** Expects a function that takes a url and navigates to it */
67
- onNavigation: (href: string, shallow?: boolean) => unknown;
68
- /** Not to be used in this context */
69
- reactRouterUseNavigate?: undefined;
70
- } & BaseSearchConfig;
71
- type DepictConfig = BaseSearchConfig | DepictConfigInReactRouterContext | DepictConfigInOtherContext;
72
- /**
73
- *
74
- If react-router does not exist, useNavigate will fall back to "any".
75
- In that case, the ReactRouterUseNavigate type becomes "never" and cannot be used.
73
+ * The config for the DepictProvider.
76
74
  */
77
- type ReactRouterUseNavigate = any extends typeof useNavigate ? never : typeof useNavigate;
75
+ type DepictConfig = DepictBaseConfig & {
76
+ search: DepictSearchConfig;
77
+ };
78
78
  /**
79
79
  * The DepictProvider is a wrapper component that should be used to wrap any component that uses Depict components.
80
80
  *
@@ -89,7 +89,9 @@ type ReactRouterUseNavigate = any extends typeof useNavigate ? never : typeof us
89
89
  * <DepictProvider
90
90
  * merchant="YOUR_MERCHANT"
91
91
  * market="YOUR_MARKET"
92
- * searchPagePath="/search"
92
+ * search={{
93
+ * searchPagePath: "/search",
94
+ * }}
93
95
  * >
94
96
  * <App />
95
97
  * </DepictProvider>
@@ -225,5 +227,11 @@ interface TextPlaceholderProps {
225
227
  }
226
228
  /** A placeholder text that can be used in place of a text that is loading. */
227
229
  export const TextPlaceholder: React.FC<TextPlaceholderProps>;
228
- export const version = "0.0.45";
229
- export type { Locale } from "@depict-ai/ui";
230
+ export const version = "0.0.46";
231
+ /**
232
+ * Helper function to navigate to a new page depending on the navigation library used.
233
+ */
234
+ export const Navigation: {
235
+ nextRouterNavigation: (router: import("next/router").NextRouter) => (href: string) => void;
236
+ reactRouterNavigation: (navigateFunction: import("react-router").NavigateFunction) => (href: string) => void;
237
+ };
package/dist/main.js CHANGED
@@ -3,7 +3,6 @@ var $4GYXz$depictaiui = require("@depict-ai/ui");
3
3
  var $4GYXz$solidjs = require("solid-js");
4
4
  var $4GYXz$solidjsweb = require("solid-js/web");
5
5
  var $4GYXz$react = require("react");
6
- var $4GYXz$depictaiuilocales = require("@depict-ai/ui/locales");
7
6
  var $4GYXz$reactdom = require("react-dom");
8
7
  var $4GYXz$reactjsxruntime = require("react/jsx-runtime");
9
8
 
@@ -19,6 +18,7 @@ $parcel$export(module.exports, "DepictSearchPage", () => $a6bedbe4b4d6d027$expor
19
18
  $parcel$export(module.exports, "ImagePlaceholder", () => $308b2c6db21be2eb$export$3f37af283f8fb843);
20
19
  $parcel$export(module.exports, "TextPlaceholder", () => $afce04c26b0c4208$export$89c6019e4baa40b1);
21
20
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
21
+ $parcel$export(module.exports, "Navigation", () => $b742053c966024b4$export$b8a61e5c71402559);
22
22
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
23
23
  // Note, if you add an export here, also add one in src-server/main.ts
24
24
 
@@ -83,7 +83,6 @@ function $a48f3b1a4abf2e0c$export$d2c02478244f91f7() {
83
83
 
84
84
 
85
85
 
86
-
87
86
  let $6319748b4f0426f0$var$set = false;
88
87
  let $6319748b4f0426f0$var$padding_animation;
89
88
  function $6319748b4f0426f0$export$6453cbc34515a94d(is_search_page) {
@@ -136,9 +135,20 @@ function $6319748b4f0426f0$var$removeLotsOfPadding() {
136
135
 
137
136
 
138
137
 
138
+
139
+ const $bc389476eeb2b615$export$599d4515591ef232 = (href)=>{
140
+ const shallow = (0, $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43)(location);
141
+ if (window.next) window.next.router.push(href, undefined, {
142
+ shallow: shallow,
143
+ scroll: true
144
+ });
145
+ else location.href = href;
146
+ };
147
+
148
+
139
149
  function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
140
- const { children: children , searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions , market: market , merchant: merchant , locale: locale } = props;
141
- const usedLocale = locale ?? (0, $4GYXz$depictaiuilocales.en);
150
+ const { children: children , market: market , merchant: merchant , navigateFunction: navigateFunction } = props;
151
+ const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
142
152
  if (!market || !merchant) {
143
153
  (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).required_state_set_[1](false);
144
154
  return (0, $4GYXz$react.createElement)((0, $4GYXz$react.Fragment), null, children);
@@ -148,33 +158,25 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
148
158
  const [get_search_page_path, set_search_page_path] = (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search_page_path_;
149
159
  set_search_page_path(searchPagePath);
150
160
  if (!search) {
151
- let react_router_navigate;
152
- if ("reactRouterUseNavigate" in props) {
153
- const { reactRouterUseNavigate: reactRouterUseNavigate } = props;
154
- if (typeof reactRouterUseNavigate === "function") react_router_navigate = reactRouterUseNavigate();
155
- }
156
161
  (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search = new (0, $4GYXz$depictaiui.DepictSearch)({
157
162
  search_query_url_param_name: urlParamName,
158
163
  market: market,
159
164
  merchant: merchant,
160
165
  enable_category_suggestions: enableCategorySuggestions ?? false,
161
166
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
162
- localization: usedLocale,
163
- on_navigation: (new_href)=>{
164
- const shallow = (0, $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43)(location);
165
- if ("onNavigation" in props) {
166
- const { onNavigation: onNavigation } = props;
167
- if (typeof onNavigation === "function") return onNavigation(new_href, shallow);
168
- }
169
- if (react_router_navigate) {
170
- const url_object = new URL(new_href);
171
- return react_router_navigate(url_object.pathname + url_object.search + url_object.hash);
167
+ localization: {
168
+ ...(0, $4GYXz$depictaiui.swedish_search_translation),
169
+ price_formatting_: {
170
+ pre_: "kr ",
171
+ post_: "",
172
+ decimal_places_delimiter_: ",",
173
+ thousands_delimiter_: " ",
174
+ places_after_comma_: 2
172
175
  }
173
- if (window.next) window.next.router.push(new_href, undefined, {
174
- shallow: shallow,
175
- scroll: true
176
- });
177
- else location.href = new_href;
176
+ },
177
+ on_navigation: (new_href)=>{
178
+ if (navigateFunction) navigateFunction(new_href);
179
+ else (0, $bc389476eeb2b615$export$599d4515591ef232)(new_href);
178
180
  },
179
181
  url_transformer: (url)=>url.pathname = (0, $4GYXz$solidjs.untrack)(get_search_page_path)
180
182
  });
@@ -182,7 +184,6 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
182
184
  } else {
183
185
  search.market = market;
184
186
  search.merchant = merchant;
185
- search.localization = usedLocale;
186
187
  }
187
188
  (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).required_state_set_[1](true);
188
189
  } catch (e) {
@@ -346,10 +347,41 @@ const $afce04c26b0c4208$export$89c6019e4baa40b1 = ({ width: width , height: heig
346
347
  };
347
348
 
348
349
 
349
- const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.45";
350
+ const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.46";
350
351
 
351
352
 
352
353
 
354
+
355
+ const $e387bd534de10acd$export$804fac5697cfbe35 = (router)=>(href)=>{
356
+ const shallow = (0, $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43)(location);
357
+ router.push(href, undefined, {
358
+ shallow: shallow,
359
+ scroll: true
360
+ });
361
+ };
362
+
363
+
364
+ /**
365
+ * Helper function that creates a function that can be used as the
366
+ * navigateFunction callback for DepictProvider when using react-router.
367
+ *
368
+ * React-router expect relative URLs, so this function will strip the
369
+ * protocol, hostname and port from the URL.
370
+ *
371
+ * @param navigateFunction what useNavigate() returns
372
+ * @returns a function that can be used as the navigateFunction callback for DepictProvider
373
+ */ const $201a023b63de7d2f$export$d53481656a62aebe = (navigateFunction)=>(href)=>{
374
+ const url_object = new URL(href);
375
+ return navigateFunction(url_object.pathname + url_object.search + url_object.hash);
376
+ };
377
+
378
+
379
+ const $b742053c966024b4$export$b8a61e5c71402559 = {
380
+ nextRouterNavigation: $e387bd534de10acd$export$804fac5697cfbe35,
381
+ reactRouterNavigation: $201a023b63de7d2f$export$d53481656a62aebe
382
+ };
383
+
384
+
353
385
  const $b03e4eee8610ebbe$var$package_name = "@depict-ai/react-ui";
354
386
  (0, $4GYXz$depictaiutilishared.dlog)($b03e4eee8610ebbe$var$package_name + " version", (0, $db7b67857900028b$export$83d89fbfd8236492));
355
387
  (0, $4GYXz$depictaiui.add_to_version_info)({
package/dist/module.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import {dlog as $TZSbU$dlog, href_change_ipns as $TZSbU$href_change_ipns, catchify as $TZSbU$catchify, observer as $TZSbU$observer, history_replacer as $TZSbU$history_replacer, queueMacroTask as $TZSbU$queueMacroTask, ContainedPlaceholderImage as $TZSbU$ContainedPlaceholderImage, Placeholder as $TZSbU$Placeholder} from "@depict-ai/utilishared";
2
- import {add_to_version_info as $TZSbU$add_to_version_info, SearchField as $TZSbU$SearchField, DepictSearch as $TZSbU$DepictSearch, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage} from "@depict-ai/ui";
2
+ import {add_to_version_info as $TZSbU$add_to_version_info, SearchField as $TZSbU$SearchField, DepictSearch as $TZSbU$DepictSearch, swedish_search_translation as $TZSbU$swedish_search_translation, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage} from "@depict-ai/ui";
3
3
  import {untrack as $TZSbU$untrack, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, createSignal as $TZSbU$createSignal, createMemo as $TZSbU$createMemo, createComputed as $TZSbU$createComputed, onCleanup as $TZSbU$onCleanup} from "solid-js";
4
4
  import {render as $TZSbU$render} from "solid-js/web";
5
5
  import {useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment} from "react";
6
- import {en as $TZSbU$en} from "@depict-ai/ui/locales";
7
6
  import {createPortal as $TZSbU$createPortal} from "react-dom";
8
7
  import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
9
8
 
@@ -71,7 +70,6 @@ function $54b0d21b77e719c4$export$d2c02478244f91f7() {
71
70
 
72
71
 
73
72
 
74
-
75
73
  let $8071251ee4e9ffa1$var$set = false;
76
74
  let $8071251ee4e9ffa1$var$padding_animation;
77
75
  function $8071251ee4e9ffa1$export$6453cbc34515a94d(is_search_page) {
@@ -124,9 +122,20 @@ function $8071251ee4e9ffa1$var$removeLotsOfPadding() {
124
122
 
125
123
 
126
124
 
125
+
126
+ const $7216ca4c8308a0f9$export$599d4515591ef232 = (href)=>{
127
+ const shallow = (0, $c83ba9ab79386687$export$6cb4d3a5c1ac9b43)(location);
128
+ if (window.next) window.next.router.push(href, undefined, {
129
+ shallow: shallow,
130
+ scroll: true
131
+ });
132
+ else location.href = href;
133
+ };
134
+
135
+
127
136
  function $faf794495ff8b304$export$9fac37a9c21c2f3b(props) {
128
- const { children: children , searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions , market: market , merchant: merchant , locale: locale } = props;
129
- const usedLocale = locale ?? (0, $TZSbU$en);
137
+ const { children: children , market: market , merchant: merchant , navigateFunction: navigateFunction } = props;
138
+ const { searchPagePath: searchPagePath , urlParamName: urlParamName , enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
130
139
  if (!market || !merchant) {
131
140
  (0, $42858f023ef23dab$export$8e769ad4338a911e).required_state_set_[1](false);
132
141
  return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, children);
@@ -136,33 +145,25 @@ function $faf794495ff8b304$export$9fac37a9c21c2f3b(props) {
136
145
  const [get_search_page_path, set_search_page_path] = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_;
137
146
  set_search_page_path(searchPagePath);
138
147
  if (!search) {
139
- let react_router_navigate;
140
- if ("reactRouterUseNavigate" in props) {
141
- const { reactRouterUseNavigate: reactRouterUseNavigate } = props;
142
- if (typeof reactRouterUseNavigate === "function") react_router_navigate = reactRouterUseNavigate();
143
- }
144
148
  (0, $42858f023ef23dab$export$8e769ad4338a911e).search = new (0, $TZSbU$DepictSearch)({
145
149
  search_query_url_param_name: urlParamName,
146
150
  market: market,
147
151
  merchant: merchant,
148
152
  enable_category_suggestions: enableCategorySuggestions ?? false,
149
153
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
150
- localization: usedLocale,
151
- on_navigation: (new_href)=>{
152
- const shallow = (0, $c83ba9ab79386687$export$6cb4d3a5c1ac9b43)(location);
153
- if ("onNavigation" in props) {
154
- const { onNavigation: onNavigation } = props;
155
- if (typeof onNavigation === "function") return onNavigation(new_href, shallow);
156
- }
157
- if (react_router_navigate) {
158
- const url_object = new URL(new_href);
159
- return react_router_navigate(url_object.pathname + url_object.search + url_object.hash);
154
+ localization: {
155
+ ...(0, $TZSbU$swedish_search_translation),
156
+ price_formatting_: {
157
+ pre_: "kr ",
158
+ post_: "",
159
+ decimal_places_delimiter_: ",",
160
+ thousands_delimiter_: " ",
161
+ places_after_comma_: 2
160
162
  }
161
- if (window.next) window.next.router.push(new_href, undefined, {
162
- shallow: shallow,
163
- scroll: true
164
- });
165
- else location.href = new_href;
163
+ },
164
+ on_navigation: (new_href)=>{
165
+ if (navigateFunction) navigateFunction(new_href);
166
+ else (0, $7216ca4c8308a0f9$export$599d4515591ef232)(new_href);
166
167
  },
167
168
  url_transformer: (url)=>url.pathname = (0, $TZSbU$untrack)(get_search_page_path)
168
169
  });
@@ -170,7 +171,6 @@ function $faf794495ff8b304$export$9fac37a9c21c2f3b(props) {
170
171
  } else {
171
172
  search.market = market;
172
173
  search.merchant = merchant;
173
- search.localization = usedLocale;
174
174
  }
175
175
  (0, $42858f023ef23dab$export$8e769ad4338a911e).required_state_set_[1](true);
176
176
  } catch (e) {
@@ -334,10 +334,41 @@ const $8aa3ab31237c8dc9$export$89c6019e4baa40b1 = ({ width: width , height: heig
334
334
  };
335
335
 
336
336
 
337
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.45";
337
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.46";
338
338
 
339
339
 
340
340
 
341
+
342
+ const $a92aa2beb560b8af$export$804fac5697cfbe35 = (router)=>(href)=>{
343
+ const shallow = (0, $c83ba9ab79386687$export$6cb4d3a5c1ac9b43)(location);
344
+ router.push(href, undefined, {
345
+ shallow: shallow,
346
+ scroll: true
347
+ });
348
+ };
349
+
350
+
351
+ /**
352
+ * Helper function that creates a function that can be used as the
353
+ * navigateFunction callback for DepictProvider when using react-router.
354
+ *
355
+ * React-router expect relative URLs, so this function will strip the
356
+ * protocol, hostname and port from the URL.
357
+ *
358
+ * @param navigateFunction what useNavigate() returns
359
+ * @returns a function that can be used as the navigateFunction callback for DepictProvider
360
+ */ const $01e1970add53d62a$export$d53481656a62aebe = (navigateFunction)=>(href)=>{
361
+ const url_object = new URL(href);
362
+ return navigateFunction(url_object.pathname + url_object.search + url_object.hash);
363
+ };
364
+
365
+
366
+ const $97603d19204ec48d$export$b8a61e5c71402559 = {
367
+ nextRouterNavigation: $a92aa2beb560b8af$export$804fac5697cfbe35,
368
+ reactRouterNavigation: $01e1970add53d62a$export$d53481656a62aebe
369
+ };
370
+
371
+
341
372
  const $43099132aad1ceb6$var$package_name = "@depict-ai/react-ui";
342
373
  (0, $TZSbU$dlog)($43099132aad1ceb6$var$package_name + " version", (0, $c9c4d066f9a5b51b$export$83d89fbfd8236492));
343
374
  (0, $TZSbU$add_to_version_info)({
@@ -345,4 +376,4 @@ const $43099132aad1ceb6$var$package_name = "@depict-ai/react-ui";
345
376
  });
346
377
 
347
378
 
348
- export {$54b0d21b77e719c4$export$d2c02478244f91f7 as DepictSearchField, $faf794495ff8b304$export$9fac37a9c21c2f3b as DepictProvider, $f41a371216eff80b$export$a7f6cffb6b8ba11c as openModal, $f41a371216eff80b$export$cbcd1ecdb41b1d0a as DepictSearchHeader, $9f8d5ef3c016c493$export$210723f5a54a7028 as DepictSearchPage, $c95f83f01e99fc18$export$3f37af283f8fb843 as ImagePlaceholder, $8aa3ab31237c8dc9$export$89c6019e4baa40b1 as TextPlaceholder, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version};
379
+ export {$54b0d21b77e719c4$export$d2c02478244f91f7 as DepictSearchField, $faf794495ff8b304$export$9fac37a9c21c2f3b as DepictProvider, $f41a371216eff80b$export$a7f6cffb6b8ba11c as openModal, $f41a371216eff80b$export$cbcd1ecdb41b1d0a as DepictSearchHeader, $9f8d5ef3c016c493$export$210723f5a54a7028 as DepictSearchPage, $c95f83f01e99fc18$export$3f37af283f8fb843 as ImagePlaceholder, $8aa3ab31237c8dc9$export$89c6019e4baa40b1 as TextPlaceholder, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version, $97603d19204ec48d$export$b8a61e5c71402559 as Navigation};
@@ -1,4 +1,4 @@
1
- export const version = "0.0.45";
1
+ export const version = "0.0.46";
2
2
  export function DepictProvider(props: any): any;
3
3
  export function DepictSearchField(): any;
4
4
  export function DepictSearchPage(): any;
@@ -15,7 +15,7 @@ $parcel$export(module.exports, "openModal", () => $41e7e5d85b5e0d49$export$a7f6c
15
15
  $parcel$export(module.exports, "version", () => $db7b67857900028b$export$83d89fbfd8236492);
16
16
 
17
17
 
18
- const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.45";
18
+ const $db7b67857900028b$export$83d89fbfd8236492 = "0.0.46";
19
19
 
20
20
 
21
21
  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 = "0.0.45";
6
+ const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "0.0.46";
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": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -76,22 +76,15 @@
76
76
  },
77
77
  "require": "./dist/main.js"
78
78
  },
79
- "./styles/": "./dist/styles/",
80
- "./locales/": {
81
- "types": "./locales/index.d.ts",
82
- "import": "./locales/index.js",
83
- "require": "./locales/require.js",
84
- "default": "./locales/index.js"
85
- }
79
+ "./styles/": "./dist/styles/"
86
80
  },
87
81
  "files": [
88
82
  "/dist",
89
- "/dist-server",
90
- "/locales"
83
+ "/dist-server"
91
84
  ],
92
85
  "dependencies": {
93
- "@depict-ai/ui": "^0.0.23",
94
- "@depict-ai/utilishared": "^0.0.20",
86
+ "@depict-ai/ui": "^0.0.24",
87
+ "@depict-ai/utilishared": "^0.0.22",
95
88
  "solid-js": "^1.6.2"
96
89
  },
97
90
  "peerDependencies": {
@@ -116,6 +109,7 @@
116
109
  "jest": "^29.3.1",
117
110
  "jest-haste-map": "^29.3.1",
118
111
  "jest-resolve": "^29.3.1",
112
+ "next": "^13.1.1",
119
113
  "parcel": "latest",
120
114
  "react": "^18.2.0",
121
115
  "react-dom": "^18.2.0",
@@ -1,88 +0,0 @@
1
- import { Elem } from "@depict-ai/utilishared";
2
- /**
3
- * PLP internationalisation shared between search and category listing
4
- */
5
- type plp_shared_i18n = {
6
- scroll_to_top_: string;
7
- back_: string;
8
- open_sorting_: string;
9
- close_sorting_: string;
10
- open_filters_: string;
11
- close_filters_: string;
12
- close_: string;
13
- ok_: string;
14
- filters_cleared_: string;
15
- we_cleared_your_filters_: string;
16
- restore_: string;
17
- sorting_text_: string;
18
- filter_text_: string;
19
- selected_filters_title_: string;
20
- filters_: string;
21
- view_less_: string;
22
- view_more_: string;
23
- clear_all_from_filter_crumbs_: string;
24
- clear_individual_filter_: string;
25
- of_: string;
26
- clear_all_filters_from_big_button_: string;
27
- try_without_filters_: string;
28
- range_filter_low_point_aria_label_: string;
29
- range_filter_high_point_aria_label_: string;
30
- morphing_sign_expanded_aria_label_: string;
31
- morphing_sign_collapsed_aria_label_: string;
32
- price_formatting_: {
33
- pre_: string;
34
- post_: string;
35
- decimal_places_delimiter_: string;
36
- thousands_delimiter_: string;
37
- places_after_comma_: number | "auto";
38
- };
39
- };
40
- /**
41
- * Search internationalisation
42
- */
43
- interface search_i18n extends plp_shared_i18n {
44
- placeholder_text_: string;
45
- show_n_results_: (number_of_results: HTMLElement) => Elem[];
46
- no_results_text_: string;
47
- search_recs_title_: string;
48
- clear_filters_query_sorting_after_submit_: string;
49
- modal_view_all_results_: (number_of_results: HTMLElement) => Elem[];
50
- modal_discover_more_: string;
51
- get_showing_results_for_: (query: HTMLElement, number_of_results: HTMLElement) => Elem[];
52
- previous_searches_text_: string;
53
- category_: string;
54
- suggestions_: string;
55
- search_submit_button_aria_label_: string;
56
- query_input_field_aria_label_: string;
57
- previous_searches_delete_entry_from_history_: string;
58
- }
59
- /**
60
- * Category internationalisation
61
- */
62
- interface category_i18n extends plp_shared_i18n {
63
- show_n_products_: (number_of_results: HTMLElement) => Elem[];
64
- no_products_text_: string;
65
- product_: string;
66
- products_: string;
67
- breadcrumbs_aria_label_: string;
68
- quicklinks_aria_label_: string;
69
- breadcrumbs_separator_: string;
70
- }
71
- /**
72
- * Depict UI internationalisation
73
- */
74
- interface Locale extends category_i18n, search_i18n {
75
- }
76
- export const cz: Locale;
77
- export const da: Locale;
78
- export const nl: Locale;
79
- export const en: Locale;
80
- export const fi: Locale;
81
- export const fr: Locale;
82
- export const de: Locale;
83
- export const it: Locale;
84
- export const no: Locale;
85
- export const pl: Locale;
86
- export const pt: Locale;
87
- export const es: Locale;
88
- export const sv: Locale;