@depict-ai/react-ui 0.0.18 → 0.0.20

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,7 +1,7 @@
1
1
  import { PropsWithChildren, ReactNode } from "react";
2
2
  import { SDKColsAtSize, SDKGridSpacing } from "@depict-ai/ui";
3
3
  import { Display } from "@depict-ai/utilishared";
4
- export function DepictSearchField(): any;
4
+ export function DepictSearchField(): import("react").ReactNode;
5
5
  interface SearchConfig {
6
6
  merchant: string;
7
7
  market: string;
@@ -9,8 +9,13 @@ interface SearchConfig {
9
9
  url_param_name?: string;
10
10
  enable_category_suggestions?: boolean;
11
11
  }
12
- export function DepictProvider(props: PropsWithChildren<SearchConfig>): PropsWithChildren<SearchConfig>;
13
- export function DepictSearchHeader(): any;
12
+ export function DepictProvider(props: PropsWithChildren<SearchConfig>): import("react").FunctionComponentElement<{
13
+ children?: import("react").ReactNode;
14
+ }>;
15
+ export function DepictSearchHeader(): import("react").DetailedReactHTMLElement<{
16
+ className: string;
17
+ ref: (e: HTMLElement | null) => HTMLElement | null;
18
+ }, HTMLElement>;
14
19
  export function openModal(): void;
15
20
  interface SearchPageConfig {
16
21
  productCard: (display: Display) => ReactNode;
@@ -18,4 +23,4 @@ interface SearchPageConfig {
18
23
  gridSpacing?: SDKGridSpacing;
19
24
  includeInputField?: boolean;
20
25
  }
21
- export function DepictSearchPage(opts: SearchPageConfig): any;
26
+ export function DepictSearchPage(opts: SearchPageConfig): ReactNode;
package/dist/main.js CHANGED
@@ -77,6 +77,7 @@ function $a48f3b1a4abf2e0c$export$d2c02478244f91f7() {
77
77
 
78
78
 
79
79
 
80
+
80
81
  let $6319748b4f0426f0$var$set = false;
81
82
  function $6319748b4f0426f0$export$6453cbc34515a94d(is_search_page) {
82
83
  if ($6319748b4f0426f0$var$set) return; // Just being safe
@@ -126,7 +127,7 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
126
127
  set_search_page_path(search_page_path);
127
128
  if (!search) {
128
129
  (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).search = new (0, $4GYXz$depictaiui.DepictSearch)({
129
- search_query_url_param_name: props.url_param_name,
130
+ search_query_url_param_name: url_param_name,
130
131
  ...assignable_options,
131
132
  enable_category_suggestions: false,
132
133
  localization: {
@@ -151,7 +152,7 @@ function $18b830ef84ac138a$export$9fac37a9c21c2f3b(props) {
151
152
  (0, $6319748b4f0426f0$export$6453cbc34515a94d)((0, $b4d0d98857ed9934$export$6cb4d3a5c1ac9b43));
152
153
  } else Object.assign(search, assignable_options);
153
154
  if (props.market && props.merchant) (0, $0b7cd4fb39fc3502$export$8e769ad4338a911e).required_state_set_[1](true);
154
- return children;
155
+ return (0, $4GYXz$react.createElement)((0, $4GYXz$react.Fragment), null, children);
155
156
  }
156
157
 
157
158
 
package/dist/module.js CHANGED
@@ -2,7 +2,7 @@ import {SearchField as $TZSbU$SearchField, DepictSearch as $TZSbU$DepictSearch,
2
2
  import {href_change_ipns as $TZSbU$href_change_ipns, observer as $TZSbU$observer, history_replacer as $TZSbU$history_replacer, queueMacroTask as $TZSbU$queueMacroTask} from "@depict-ai/utilishared";
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
- import {useState as $TZSbU$useState, useRef as $TZSbU$useRef, useEffect as $TZSbU$useEffect, createElement as $TZSbU$createElement} from "react";
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
6
  import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
7
7
  import {createPortal as $TZSbU$createPortal} from "react-dom";
8
8
 
@@ -68,6 +68,7 @@ function $54b0d21b77e719c4$export$d2c02478244f91f7() {
68
68
 
69
69
 
70
70
 
71
+
71
72
  let $8071251ee4e9ffa1$var$set = false;
72
73
  function $8071251ee4e9ffa1$export$6453cbc34515a94d(is_search_page) {
73
74
  if ($8071251ee4e9ffa1$var$set) return; // Just being safe
@@ -117,7 +118,7 @@ function $faf794495ff8b304$export$9fac37a9c21c2f3b(props) {
117
118
  set_search_page_path(search_page_path);
118
119
  if (!search) {
119
120
  (0, $42858f023ef23dab$export$8e769ad4338a911e).search = new (0, $TZSbU$DepictSearch)({
120
- search_query_url_param_name: props.url_param_name,
121
+ search_query_url_param_name: url_param_name,
121
122
  ...assignable_options,
122
123
  enable_category_suggestions: false,
123
124
  localization: {
@@ -142,7 +143,7 @@ function $faf794495ff8b304$export$9fac37a9c21c2f3b(props) {
142
143
  (0, $8071251ee4e9ffa1$export$6453cbc34515a94d)((0, $c83ba9ab79386687$export$6cb4d3a5c1ac9b43));
143
144
  } else Object.assign(search, assignable_options);
144
145
  if (props.market && props.merchant) (0, $42858f023ef23dab$export$8e769ad4338a911e).required_state_set_[1](true);
145
- return children;
146
+ return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, children);
146
147
  }
147
148
 
148
149
 
@@ -1,5 +1,7 @@
1
1
  export function DepictProvider(props: any): any;
2
2
  export function DepictSearchField(): any;
3
3
  export function DepictSearchPage(): any;
4
- export function DepictSearchHeader(): any;
4
+ export function DepictSearchHeader(): import("react").DetailedReactHTMLElement<{
5
+ className: string;
6
+ }, HTMLElement>;
5
7
  export function openModal(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depict-ai/react-ui",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "packageManager": "yarn@3.2.2",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
@@ -78,8 +78,8 @@
78
78
  "/dist-server"
79
79
  ],
80
80
  "dependencies": {
81
- "@depict-ai/ui": "^0.0.5",
82
- "@depict-ai/utilishared": "^0.0.5",
81
+ "@depict-ai/ui": "^0.0.6",
82
+ "@depict-ai/utilishared": "^0.0.6",
83
83
  "react": "^18.2.0",
84
84
  "react-dom": "^18.2.0",
85
85
  "solid-js": "^1.6.2"
@@ -96,6 +96,8 @@
96
96
  "@parcel/resolver-default": "^2.8.0",
97
97
  "@parcel/transformer-sass": "latest",
98
98
  "@types/node": "^18.11.11",
99
+ "@types/react": "^18.0.26",
100
+ "@types/react-dom": "^18.0.9",
99
101
  "babel-preset-solid": "latest",
100
102
  "jest": "^29.3.1",
101
103
  "jest-haste-map": "^29.3.1",