@commerce-ai-tool/react 2.4.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +21 -0
  3. package/README.md +16 -0
  4. package/dist/components/CameraCaptureOverlay.d.ts +11 -0
  5. package/dist/components/CameraCaptureOverlay.d.ts.map +1 -0
  6. package/dist/components/CartPanel.d.ts +22 -0
  7. package/dist/components/CartPanel.d.ts.map +1 -0
  8. package/dist/components/CommerceAICheckout.d.ts +15 -0
  9. package/dist/components/CommerceAICheckout.d.ts.map +1 -0
  10. package/dist/components/CommerceAIOrderStatus.d.ts +15 -0
  11. package/dist/components/CommerceAIOrderStatus.d.ts.map +1 -0
  12. package/dist/components/CommerceAISearch.d.ts +43 -0
  13. package/dist/components/CommerceAISearch.d.ts.map +1 -0
  14. package/dist/components/MissionResults.d.ts +13 -0
  15. package/dist/components/MissionResults.d.ts.map +1 -0
  16. package/dist/components/SearchFacets.d.ts +12 -0
  17. package/dist/components/SearchFacets.d.ts.map +1 -0
  18. package/dist/components/VoiceStatusBanner.d.ts +12 -0
  19. package/dist/components/VoiceStatusBanner.d.ts.map +1 -0
  20. package/dist/hooks/useCameraCapture.d.ts +18 -0
  21. package/dist/hooks/useCameraCapture.d.ts.map +1 -0
  22. package/dist/hooks/useCart.d.ts +57 -0
  23. package/dist/hooks/useCart.d.ts.map +1 -0
  24. package/dist/hooks/useCommerceAISearch.d.ts +59 -0
  25. package/dist/hooks/useCommerceAISearch.d.ts.map +1 -0
  26. package/dist/hooks/useRecordingDuration.d.ts +3 -0
  27. package/dist/hooks/useRecordingDuration.d.ts.map +1 -0
  28. package/dist/hooks/useTheme.d.ts +4 -0
  29. package/dist/hooks/useTheme.d.ts.map +1 -0
  30. package/dist/hooks/useVoiceSearch.d.ts +24 -0
  31. package/dist/hooks/useVoiceSearch.d.ts.map +1 -0
  32. package/dist/icons.d.ts +2 -0
  33. package/dist/icons.d.ts.map +1 -0
  34. package/dist/index.cjs +3714 -0
  35. package/dist/index.cjs.map +1 -0
  36. package/dist/index.css +1783 -0
  37. package/dist/index.css.map +1 -0
  38. package/dist/index.d.cts +19 -0
  39. package/dist/index.d.ts +19 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +3702 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/utils/camera.d.ts +7 -0
  44. package/dist/utils/camera.d.ts.map +1 -0
  45. package/dist/vendor-core/client.d.cts +12 -0
  46. package/dist/vendor-core/client.d.ts +12 -0
  47. package/dist/vendor-core/commercetools/facet-color.d.ts +12 -0
  48. package/dist/vendor-core/commercetools/facets.d.ts +31 -0
  49. package/dist/vendor-core/messages/index.d.ts +110 -0
  50. package/dist/vendor-core/payments/types.d.ts +35 -0
  51. package/dist/vendor-core/search/compound-shopping-list.d.ts +6 -0
  52. package/dist/vendor-core/types/index.d.ts +510 -0
  53. package/package.json +84 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # @commerce-ai-tool/react
2
+
3
+ ## 2.4.0
4
+
5
+ ### Initial public release
6
+
7
+ First published version of the Commerce AI Tool React / Next.js widget (product roadmap through v2.4).
8
+
9
+ - Glass search UI with independent voice, camera, and image-upload controls
10
+ - Autocomplete, facets (including hex color swatches), cart panel, checkout, and order status
11
+ - Shopping-mission lanes with batched add-to-cart
12
+ - Runtime `messages` overrides
13
+ - Client bundle does not depend on `@commerce-ai-tool/core` at runtime (client-safe helpers are bundled). Install `@commerce-ai-tool/server` on the host for the BFF.
14
+
15
+ ```bash
16
+ pnpm add @commerce-ai-tool/react @commerce-ai-tool/server
17
+ ```
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Commerce AI Tool Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # @commerce-ai-tool/react
2
+
3
+ Glass morphism product search widget for React and Next.js. Talks only to the host `/api/commerce-ai/*` routes — API keys never reach the browser.
4
+
5
+ ```bash
6
+ pnpm add @commerce-ai-tool/react @commerce-ai-tool/server
7
+ ```
8
+
9
+ ```tsx
10
+ import { CommerceAISearch } from "@commerce-ai-tool/react";
11
+ import "@commerce-ai-tool/react/styles.css";
12
+ ```
13
+
14
+ The demo app in the GitHub repository is not an npm dependency.
15
+
16
+ Setup: [Getting started](https://github.com/tomasz-miller/commerce-ai-tool/blob/main/docs/GETTING-STARTED.md).
@@ -0,0 +1,11 @@
1
+ import type { CommerceAISearchMessages } from "../vendor-core/client.js";
2
+ export interface CameraCaptureOverlayProps {
3
+ stream: MediaStream | null;
4
+ error: string | null;
5
+ messages: Pick<CommerceAISearchMessages, "cameraCapture" | "cameraPreview" | "capturePhoto" | "cancel" | "dismiss">;
6
+ onCapture: (video: HTMLVideoElement) => void;
7
+ onClose: () => void;
8
+ onDismissError: () => void;
9
+ }
10
+ export declare function CameraCaptureOverlay({ stream, error, messages, onCapture, onClose, onDismissError, }: CameraCaptureOverlayProps): import("react").JSX.Element;
11
+ //# sourceMappingURL=CameraCaptureOverlay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CameraCaptureOverlay.d.ts","sourceRoot":"","sources":["../../src/components/CameraCaptureOverlay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAG9E,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,IAAI,CACZ,wBAAwB,EACxB,eAAe,GAAG,eAAe,GAAG,cAAc,GAAG,QAAQ,GAAG,SAAS,CAC1E,CAAC;IACF,SAAS,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,OAAO,EACP,cAAc,GACf,EAAE,yBAAyB,+BA2F3B"}
@@ -0,0 +1,22 @@
1
+ import type { CartSnapshot, CommerceAISearchMessages, CustomerSnapshot } from "../vendor-core/client.js";
2
+ export interface CartPanelProps {
3
+ cart: CartSnapshot | null;
4
+ customer: CustomerSnapshot | null;
5
+ isLoading: boolean;
6
+ isLoggingIn: boolean;
7
+ error: string | null;
8
+ messages: CommerceAISearchMessages;
9
+ /** Locale used when formatting a fallback line total. */
10
+ catalogLocale?: string;
11
+ onClose: () => void;
12
+ onRemove: (lineItemId: string) => void;
13
+ onQuantityChange: (lineItemId: string, quantity: number) => void;
14
+ onLogin: (input: {
15
+ email: string;
16
+ password: string;
17
+ }) => void;
18
+ onLogout: () => void;
19
+ onCheckout?: (cart: CartSnapshot) => void;
20
+ }
21
+ export declare function CartPanel({ cart, customer, isLoading, isLoggingIn, error, messages, catalogLocale, onClose, onRemove, onQuantityChange, onLogin, onLogout, onCheckout, }: CartPanelProps): import("react").JSX.Element;
22
+ //# sourceMappingURL=CartPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartPanel.d.ts","sourceRoot":"","sources":["../../src/components/CartPanel.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EACjB,MAAM,+BAA+B,CAAC;AAGvC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,wBAAwB,CAAC;IACnC,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACjE,OAAO,EAAE,CAAC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C;AAgCD,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,KAAK,EACL,QAAQ,EACR,aAAa,EACb,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,UAAU,GACX,EAAE,cAAc,+BA2MhB"}
@@ -0,0 +1,15 @@
1
+ import { type CommerceAISearchMessages, type OrderSnapshot, type ThemeMode } from "../vendor-core/client.js";
2
+ import "../styles/commerce-ai-search.css";
3
+ export interface CommerceAICheckoutProps {
4
+ apiBaseUrl: string;
5
+ theme?: ThemeMode;
6
+ catalogLocale?: string;
7
+ currency?: string;
8
+ country?: string;
9
+ messages?: Partial<CommerceAISearchMessages>;
10
+ continueShoppingHref?: string;
11
+ orderStatusHref?: string;
12
+ onOrderPlaced?: (order: OrderSnapshot) => void;
13
+ }
14
+ export declare function CommerceAICheckout({ apiBaseUrl, theme, catalogLocale, currency, country, messages: messageOverrides, continueShoppingHref, orderStatusHref, onOrderPlaced, }: CommerceAICheckoutProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=CommerceAICheckout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommerceAICheckout.d.ts","sourceRoot":"","sources":["../../src/components/CommerceAICheckout.tsx"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,wBAAwB,EAC7B,KAAK,aAAa,EAIlB,KAAK,SAAS,EACf,MAAM,+BAA+B,CAAC;AAGvC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAChD;AAqPD,wBAAgB,kBAAkB,CAAC,EACjC,UAAU,EACV,KAAc,EACd,aAAa,EACb,QAAQ,EACR,OAAc,EACd,QAAQ,EAAE,gBAAgB,EAC1B,oBAA0B,EAC1B,eAA2B,EAC3B,aAAa,GACd,EAAE,uBAAuB,+BAoWzB"}
@@ -0,0 +1,15 @@
1
+ import { type CommerceAISearchMessages, type ThemeMode } from "../vendor-core/client.js";
2
+ import "../styles/commerce-ai-search.css";
3
+ export interface CommerceAIOrderStatusProps {
4
+ apiBaseUrl: string;
5
+ orderNumber?: string;
6
+ theme?: ThemeMode;
7
+ catalogLocale?: string;
8
+ currency?: string;
9
+ country?: string;
10
+ messages?: Partial<CommerceAISearchMessages>;
11
+ continueShoppingHref?: string;
12
+ orderStatusHref?: string;
13
+ }
14
+ export declare function CommerceAIOrderStatus({ apiBaseUrl, orderNumber, theme, catalogLocale, currency, country, messages: messageOverrides, continueShoppingHref, orderStatusHref, }: CommerceAIOrderStatusProps): import("react").JSX.Element;
15
+ //# sourceMappingURL=CommerceAIOrderStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommerceAIOrderStatus.d.ts","sourceRoot":"","sources":["../../src/components/CommerceAIOrderStatus.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EACf,MAAM,+BAA+B,CAAC;AAGvC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC7C,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AA0CD,wBAAgB,qBAAqB,CAAC,EACpC,UAAU,EACV,WAAgB,EAChB,KAAc,EACd,aAAa,EACb,QAAQ,EACR,OAAO,EACP,QAAQ,EAAE,gBAAgB,EAC1B,oBAA0B,EAC1B,eAA2B,GAC5B,EAAE,0BAA0B,+BA2O5B"}
@@ -0,0 +1,43 @@
1
+ import type { CartSnapshot, CommerceAISearchMessages, ProductCard, ThemeMode } from "../vendor-core/client.js";
2
+ import type { CameraFacingMode } from "../utils/camera.js";
3
+ import "../styles/commerce-ai-search.css";
4
+ export type SearchMode = "text" | "image" | "voice" | null;
5
+ export interface CommerceAISearchProps {
6
+ apiBaseUrl: string;
7
+ theme?: ThemeMode;
8
+ /** Language products are indexed in commercetools */
9
+ catalogLocale?: string;
10
+ /** Language of the user search input */
11
+ queryLocale?: string;
12
+ /** @deprecated Use queryLocale */
13
+ locale?: string;
14
+ placeholder?: string;
15
+ messages?: Partial<CommerceAISearchMessages>;
16
+ enableAutocomplete?: boolean;
17
+ enableFacets?: boolean;
18
+ persistSession?: boolean;
19
+ /** Show microphone search controls. Default true. */
20
+ enableVoice?: boolean;
21
+ /** Show local image upload and drag-and-drop search controls. Default true. */
22
+ enableImageSearch?: boolean;
23
+ /** Show camera capture search controls independently of image upload. Default true. */
24
+ enableCameraSearch?: boolean;
25
+ cameraFacingMode?: CameraFacingMode;
26
+ enableTts?: boolean;
27
+ /** Enable built-in add-to-cart buttons and cart preview panel. Default false. */
28
+ enableCart?: boolean;
29
+ /** Enable multi-item shopping missions on text, voice, and image search. Default false. */
30
+ enableMissions?: boolean;
31
+ /** Currency for cart creation. Required when `enableCart` is true unless the server has a default. */
32
+ currency?: string;
33
+ /** Optional ISO country code used for commercetools price selection. */
34
+ country?: string;
35
+ className?: string;
36
+ onProductSelect?: (product: ProductCard) => void;
37
+ /** Fires after every cart fetch or mutation when `enableCart` is true. */
38
+ onCartChange?: (cart: CartSnapshot | null) => void;
39
+ /** Opens the host-owned checkout route for the current non-empty cart. */
40
+ onCheckout?: (cart: CartSnapshot) => void;
41
+ }
42
+ export declare function CommerceAISearch({ apiBaseUrl, theme, catalogLocale, queryLocale, locale, placeholder, messages: messageOverrides, enableAutocomplete, enableFacets, persistSession, enableVoice, enableImageSearch, enableCameraSearch, cameraFacingMode, enableTts, enableCart, enableMissions, currency, country, className, onProductSelect, onCartChange, onCheckout, }: CommerceAISearchProps): import("react").JSX.Element;
43
+ //# sourceMappingURL=CommerceAISearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommerceAISearch.d.ts","sourceRoot":"","sources":["../../src/components/CommerceAISearch.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,YAAY,EACZ,wBAAwB,EACxB,WAAW,EACX,SAAS,EACV,MAAM,+BAA+B,CAAC;AAavC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,kCAAkC,CAAC;AAE1C,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC;AAE3D,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,qDAAqD;IACrD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC7C,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qDAAqD;IACrD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uFAAuF;IACvF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iFAAiF;IACjF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2FAA2F;IAC3F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,KAAc,EACd,aAAa,EACb,WAAW,EACX,MAAM,EACN,WAAW,EACX,QAAQ,EAAE,gBAAgB,EAC1B,kBAA0B,EAC1B,YAAoB,EACpB,cAAqB,EACrB,WAAkB,EAClB,iBAAwB,EACxB,kBAAyB,EACzB,gBAAgC,EAChC,SAAgB,EAChB,UAAkB,EAClB,cAAsB,EACtB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,eAAe,EACf,YAAY,EACZ,UAAU,GACX,EAAE,qBAAqB,+BA0oBvB"}
@@ -0,0 +1,13 @@
1
+ import type { AddToCartLineItem, CommerceAISearchMessages, MissionSearchResult, ProductCard } from "../vendor-core/client.js";
2
+ export interface MissionResultsProps {
3
+ mission: MissionSearchResult;
4
+ messages: CommerceAISearchMessages;
5
+ enableCart: boolean;
6
+ isMutating: boolean;
7
+ addedProductIds?: Record<string, true>;
8
+ onProductSelect?: (product: ProductCard) => void;
9
+ onAddItem?: (product: ProductCard) => void;
10
+ onAddAll: (items: AddToCartLineItem[]) => Promise<unknown>;
11
+ }
12
+ export declare function MissionResults({ mission, messages, enableCart, isMutating, addedProductIds, onProductSelect, onAddItem, onAddAll, }: MissionResultsProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=MissionResults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MissionResults.d.ts","sourceRoot":"","sources":["../../src/components/MissionResults.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACZ,MAAM,+BAA+B,CAAC;AAGvC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,QAAQ,EAAE,wBAAwB,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACjD,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5D;AA+DD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,QAAQ,EACR,UAAU,EACV,UAAU,EACV,eAAe,EACf,eAAe,EACf,SAAS,EACT,QAAQ,GACT,EAAE,mBAAmB,+BA2IrB"}
@@ -0,0 +1,12 @@
1
+ import type { CommerceAISearchMessages, InterpretedSearchFilters, SearchFacetGroup, SuggestedFacet } from "../vendor-core/client.js";
2
+ interface SearchFacetsProps {
3
+ facets: SearchFacetGroup[];
4
+ suggestedFacets: SuggestedFacet[];
5
+ filters: InterpretedSearchFilters;
6
+ messages: CommerceAISearchMessages;
7
+ onChange: (filters: InterpretedSearchFilters) => void;
8
+ onNewSearch?: () => void;
9
+ }
10
+ export declare function SearchFacets({ facets, suggestedFacets, filters, messages, onChange, onNewSearch, }: SearchFacetsProps): import("react").JSX.Element | null;
11
+ export {};
12
+ //# sourceMappingURL=SearchFacets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFacets.d.ts","sourceRoot":"","sources":["../../src/components/SearchFacets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACf,MAAM,+BAA+B,CAAC;AAQvC,UAAU,iBAAiB;IACzB,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,OAAO,EAAE,wBAAwB,CAAC;IAClC,QAAQ,EAAE,wBAAwB,CAAC;IACnC,QAAQ,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,eAAe,EACf,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,WAAW,GACZ,EAAE,iBAAiB,sCA0DnB"}
@@ -0,0 +1,12 @@
1
+ import type { CommerceAISearchMessages } from "../vendor-core/client.js";
2
+ export interface VoiceStatusBannerProps {
3
+ isRecording: boolean;
4
+ isProcessing: boolean;
5
+ isLoadingTts: boolean;
6
+ error: string | null;
7
+ durationSeconds: number;
8
+ messages: Pick<CommerceAISearchMessages, "listening" | "tapMicToStop" | "understandingQuery" | "preparingAudioSummary" | "dismiss">;
9
+ onDismissError?: () => void;
10
+ }
11
+ export declare function VoiceStatusBanner({ isRecording, isProcessing, isLoadingTts, error, durationSeconds, messages, onDismissError, }: VoiceStatusBannerProps): import("react").JSX.Element;
12
+ //# sourceMappingURL=VoiceStatusBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VoiceStatusBanner.d.ts","sourceRoot":"","sources":["../../src/components/VoiceStatusBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAG9E,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,IAAI,CACZ,wBAAwB,EACxB,WAAW,GAAG,cAAc,GAAG,oBAAoB,GAAG,uBAAuB,GAAG,SAAS,CAC1F,CAAC;IACF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAkBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,eAAe,EACf,QAAQ,EACR,cAAc,GACf,EAAE,sBAAsB,+BAkDxB"}
@@ -0,0 +1,18 @@
1
+ import { type RefObject } from "react";
2
+ import { type CameraFacingMode } from "../utils/camera.js";
3
+ export interface UseCameraCaptureOptions {
4
+ facingMode?: CameraFacingMode;
5
+ }
6
+ export interface UseCameraCaptureReturn {
7
+ isOpen: boolean;
8
+ stream: MediaStream | null;
9
+ error: string | null;
10
+ facingMode: CameraFacingMode;
11
+ open: (nativeInputRef: RefObject<HTMLInputElement | null>) => void;
12
+ openOverlay: () => Promise<void>;
13
+ capturePhoto: (video: HTMLVideoElement) => Promise<File>;
14
+ close: () => void;
15
+ clearError: () => void;
16
+ }
17
+ export declare function useCameraCapture(options?: UseCameraCaptureOptions): UseCameraCaptureReturn;
18
+ //# sourceMappingURL=useCameraCapture.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCameraCapture.d.ts","sourceRoot":"","sources":["../../src/hooks/useCameraCapture.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjF,OAAO,EAML,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,IAAI,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC;IACnE,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACjC,YAAY,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE,uBAA4B,GACpC,sBAAsB,CA2ExB"}
@@ -0,0 +1,57 @@
1
+ import { type CartSnapshot, type CheckoutAddress, type CustomerSnapshot, type OrderSnapshot, type PaymentMethodOption, type PaymentSnapshot, type ShippingMethodSnapshot } from "../vendor-core/client.js";
2
+ export declare const ANONYMOUS_ID_STORAGE_KEY = "commerce-ai-tool:anonymousId";
3
+ export declare const CUSTOMER_SESSION_STORAGE_KEY = "commerce-ai-tool:customerSession";
4
+ export declare const CUSTOMER_STORAGE_KEY = "commerce-ai-tool:customer";
5
+ export interface AddToCartItem {
6
+ sku?: string;
7
+ productId?: string;
8
+ variantId?: number;
9
+ quantity?: number;
10
+ }
11
+ export interface UseCartOptions {
12
+ apiBaseUrl: string;
13
+ currency?: string;
14
+ country?: string;
15
+ catalogLocale?: string;
16
+ /** When false, skip network calls. Default true for standalone hook usage. */
17
+ enabled?: boolean;
18
+ onCartChange?: (cart: CartSnapshot | null) => void;
19
+ }
20
+ export interface UseCartReturn {
21
+ cart: CartSnapshot | null;
22
+ anonymousId: string;
23
+ customer: CustomerSnapshot | null;
24
+ isAuthenticated: boolean;
25
+ isLoading: boolean;
26
+ isMutating: boolean;
27
+ isLoggingIn: boolean;
28
+ error: string | null;
29
+ isCartOpen: boolean;
30
+ openCart: () => void;
31
+ closeCart: () => void;
32
+ toggleCart: () => void;
33
+ addToCart: (item: AddToCartItem) => Promise<CartSnapshot | null>;
34
+ addItems: (items: AddToCartItem[]) => Promise<CartSnapshot | null>;
35
+ removeFromCart: (lineItemId: string) => Promise<CartSnapshot | null>;
36
+ updateQuantity: (lineItemId: string, quantity: number) => Promise<CartSnapshot | null>;
37
+ setAddresses: (shippingAddress: CheckoutAddress, billingAddress?: CheckoutAddress) => Promise<CartSnapshot | null>;
38
+ /** Returns matching methods, or `null` when the request failed. */
39
+ getShippingMethods: () => Promise<ShippingMethodSnapshot[] | null>;
40
+ setShippingMethod: (shippingMethodId: string) => Promise<CartSnapshot | null>;
41
+ /** Returns matching methods, or `null` when the request failed. */
42
+ getPaymentMethods: () => Promise<PaymentMethodOption[] | null>;
43
+ authorizePayment: (method: string) => Promise<PaymentSnapshot | null>;
44
+ getOrder: (orderNumber: string) => Promise<OrderSnapshot | null>;
45
+ listOrders: () => Promise<OrderSnapshot[]>;
46
+ placeOrder: () => Promise<OrderSnapshot | null>;
47
+ login: (input: {
48
+ email: string;
49
+ password: string;
50
+ }) => Promise<CartSnapshot | null>;
51
+ logout: () => Promise<void>;
52
+ refresh: () => Promise<void>;
53
+ }
54
+ export declare function createAnonymousId(): string;
55
+ export declare function getOrCreateAnonymousId(): string;
56
+ export declare function useCart(options: UseCartOptions): UseCartReturn;
57
+ //# sourceMappingURL=useCart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCart.d.ts","sourceRoot":"","sources":["../../src/hooks/useCart.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK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O,CAAC,IAAI,CAAC,CAAC;CAC9B;AA+DD,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAED,wBAAgB,sBAAsB,IAAI,MAAM,CAQ/C;AAqCD,wBAAgB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,aAAa,CA4iB9D"}
@@ -0,0 +1,59 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import type { InterpretedSearchFilters, MissionSearchResult, ProductCard, SearchFacetGroup, SearchResult, SuggestedFacet } from "../vendor-core/client.js";
3
+ export interface SearchLocaleProps {
4
+ queryLocale?: string;
5
+ catalogLocale?: string;
6
+ /** @deprecated Use queryLocale */
7
+ locale?: string;
8
+ }
9
+ export interface SetQueryOptions {
10
+ /** When false, only updates the input without triggering a search. */
11
+ search?: boolean;
12
+ }
13
+ export declare function buildLocalePayload(options: SearchLocaleProps): Record<string, string>;
14
+ export declare function appendLocaleFields(formData: FormData, options: SearchLocaleProps): void;
15
+ export interface UseCommerceAISearchOptions extends SearchLocaleProps {
16
+ apiBaseUrl: string;
17
+ debounceMs?: number;
18
+ suggestionsDebounceMs?: number;
19
+ enableAutocomplete?: boolean;
20
+ enableFacets?: boolean;
21
+ persistSession?: boolean;
22
+ enableMissions?: boolean;
23
+ }
24
+ export interface UseCommerceAISearchReturn {
25
+ query: string;
26
+ setQuery: (query: string, options?: SetQueryOptions) => void;
27
+ suggestions: string[];
28
+ isLoadingSuggestions: boolean;
29
+ suggestionsError: string | null;
30
+ suggestionsReady: boolean;
31
+ selectSuggestion: (suggestion: string) => void;
32
+ results: ProductCard[];
33
+ setResults: Dispatch<SetStateAction<ProductCard[]>>;
34
+ mission: MissionSearchResult | null;
35
+ setMission: Dispatch<SetStateAction<MissionSearchResult | null>>;
36
+ meta: SearchResult["meta"] | null;
37
+ setMeta: Dispatch<SetStateAction<SearchResult["meta"] | null>>;
38
+ isLoading: boolean;
39
+ setIsLoading: Dispatch<SetStateAction<boolean>>;
40
+ hasSearched: boolean;
41
+ setHasSearched: Dispatch<SetStateAction<boolean>>;
42
+ error: string | null;
43
+ setError: Dispatch<SetStateAction<string | null>>;
44
+ search: (query?: string) => Promise<void>;
45
+ searchByImage: (file: File) => Promise<void>;
46
+ /** True when a facet refinement session is active (not set for mission results). */
47
+ hasFacetSession: boolean;
48
+ facets?: SearchFacetGroup[];
49
+ suggestedFacets?: SuggestedFacet[];
50
+ refineFilters?: (filters: InterpretedSearchFilters) => Promise<void>;
51
+ refine?: (query: string) => Promise<void>;
52
+ /** Clear session and run a fresh AI search with the current query. */
53
+ startNewSearch?: () => Promise<void>;
54
+ /** Apply a search payload (text, voice, or image) and clear the facet session for missions. */
55
+ applySearchResult: (data: SearchResult, queryOverride?: string) => void;
56
+ clear: () => void;
57
+ }
58
+ export declare function useCommerceAISearch(options: UseCommerceAISearchOptions): UseCommerceAISearchReturn;
59
+ //# sourceMappingURL=useCommerceAISearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCommerceAISearch.d.ts","sourceRoot":"","sources":["../../src/hooks/useCommerceAISearch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAC9G,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EACnB,WAAW,EACX,gBAAgB,EAChB,YAAY,EAEZ,cAAc,EAEf,MAAM,+BAA+B,CAAC;AAEvC,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,sEAAsE;IACtE,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAarF;AAED,wBAAgB,kBAAkB,CAAC,QAA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,OAAO,CAAC;IACrB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAClD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC;IAClD,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,oFAAoF;IACpF,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,+FAA+F;IAC/F,iBAAiB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,0BAA0B,GAClC,yBAAyB,CAyd3B"}
@@ -0,0 +1,3 @@
1
+ export declare function formatRecordingDuration(seconds: number): string;
2
+ export declare function useRecordingDuration(isRecording: boolean): number;
3
+ //# sourceMappingURL=useRecordingDuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useRecordingDuration.d.ts","sourceRoot":"","sources":["../../src/hooks/useRecordingDuration.ts"],"names":[],"mappings":"AAEA,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAiBjE"}
@@ -0,0 +1,4 @@
1
+ import type { ThemeMode } from "../vendor-core/client.js";
2
+ export declare function useTheme(theme?: ThemeMode): ThemeMode;
3
+ export declare function useResolvedTheme(theme?: ThemeMode): "light" | "dark" | "auto";
4
+ //# sourceMappingURL=useTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAE/D,wBAAgB,QAAQ,CAAC,KAAK,GAAE,SAAkB,GAAG,SAAS,CAiB7D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,SAAkB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAiBrF"}
@@ -0,0 +1,24 @@
1
+ import type { MissionSearchResult, ProductCard, SearchResult } from "../vendor-core/client.js";
2
+ import { type SearchLocaleProps } from "./useCommerceAISearch.js";
3
+ export interface UseVoiceSearchOptions extends SearchLocaleProps {
4
+ apiBaseUrl: string;
5
+ onResults?: (results: ProductCard[], meta: SearchResult["meta"], extras?: {
6
+ mission?: MissionSearchResult;
7
+ }) => void;
8
+ onTranscript?: (transcript: string) => void;
9
+ enableTts?: boolean;
10
+ enableMissions?: boolean;
11
+ }
12
+ export declare function useVoiceSearch(options: UseVoiceSearchOptions): {
13
+ isRecording: boolean;
14
+ isProcessing: boolean;
15
+ isLoadingTts: boolean;
16
+ error: string | null;
17
+ clearError: () => void;
18
+ audioSummary: string | null;
19
+ clearAudioSummary: () => void;
20
+ replayAudioSummary: () => void;
21
+ toggleRecording: () => Promise<void>;
22
+ stopRecording: () => void;
23
+ };
24
+ //# sourceMappingURL=useVoiceSearch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useVoiceSearch.d.ts","sourceRoot":"","sources":["../../src/hooks/useVoiceSearch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACpG,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAEtF,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,CACV,OAAO,EAAE,WAAW,EAAE,EACtB,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC,EAC1B,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,mBAAmB,CAAA;KAAE,KACvC,IAAI,CAAC;IACV,YAAY,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AA6BD,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB;;;;;;;;;;;EAmJ5D"}
@@ -0,0 +1,2 @@
1
+ export declare const ICON_STROKE = 1.25;
2
+ //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,OAAO,CAAC"}