@etoile-dev/react 0.2.2 → 0.2.3

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/README.md CHANGED
@@ -223,6 +223,7 @@ Convenience component that composes all primitives.
223
223
  | `apiKey` | `string` | ✓ | |
224
224
  | `collections` | `string[]` | ✓ | |
225
225
  | `limit` | `number` | | `10` |
226
+ | `debounceMs` | `number` | | `100` |
226
227
  | `renderResult` | `(result: SearchResultData) => React.ReactNode` | | |
227
228
 
228
229
  ---
package/dist/Search.d.ts CHANGED
@@ -7,6 +7,8 @@ export type SearchProps = {
7
7
  collections: string[];
8
8
  /** Maximum number of results to return (default: 10) */
9
9
  limit?: number;
10
+ /** Debounce delay in milliseconds before triggering search (default: 100) */
11
+ debounceMs?: number;
10
12
  /** Placeholder text for the search input */
11
13
  placeholder?: string;
12
14
  /** Additional CSS class name (e.g., "dark" for dark mode) */
@@ -34,4 +36,4 @@ export type SearchProps = {
34
36
  * <Search apiKey="your-api-key" collections={["paintings"]} className="dark" />
35
37
  * ```
36
38
  */
37
- export declare const Search: ({ apiKey, collections, limit, placeholder, className, renderResult, baseUrl, }: SearchProps) => import("react/jsx-runtime").JSX.Element;
39
+ export declare const Search: ({ apiKey, collections, limit, debounceMs, placeholder, className, renderResult, baseUrl, }: SearchProps) => import("react/jsx-runtime").JSX.Element;
package/dist/Search.js CHANGED
@@ -26,6 +26,6 @@ const DefaultResult = (result) => (_jsxs(SearchResult, { children: [_jsx(SearchR
26
26
  * <Search apiKey="your-api-key" collections={["paintings"]} className="dark" />
27
27
  * ```
28
28
  */
29
- export const Search = ({ apiKey, collections, limit, placeholder = "Search...", className, renderResult, baseUrl, }) => {
30
- return (_jsxs(SearchRoot, { apiKey: apiKey, collections: collections, limit: limit, className: className, baseUrl: baseUrl, children: [_jsxs("div", { className: "etoile-input-wrapper", children: [_jsx(SearchIcon, {}), _jsx(SearchInput, { placeholder: placeholder }), _jsx(SearchKbd, {})] }), _jsx(SearchResults, { children: renderResult ?? DefaultResult })] }));
29
+ export const Search = ({ apiKey, collections, limit, debounceMs, placeholder = "Search...", className, renderResult, baseUrl, }) => {
30
+ return (_jsxs(SearchRoot, { apiKey: apiKey, collections: collections, limit: limit, debounceMs: debounceMs, className: className, baseUrl: baseUrl, children: [_jsxs("div", { className: "etoile-input-wrapper", children: [_jsx(SearchIcon, {}), _jsx(SearchInput, { placeholder: placeholder }), _jsx(SearchKbd, {})] }), _jsx(SearchResults, { children: renderResult ?? DefaultResult })] }));
31
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etoile-dev/react",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Official React primitives for Étoile - Headless, composable search components",
5
5
  "keywords": [
6
6
  "etoile",
@@ -49,10 +49,10 @@
49
49
  "react": ">=18"
50
50
  },
51
51
  "dependencies": {
52
- "@etoile-dev/client": "^0.2.0"
52
+ "@etoile-dev/client": "^0.3.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^18.0.0",
56
56
  "typescript": "^5.0.0"
57
57
  }
58
- }
58
+ }