@akropolys/kiku 1.8.0 → 2.0.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.
package/dist/index.d.mts CHANGED
@@ -20,38 +20,13 @@ interface SearchBarProps {
20
20
  }
21
21
  declare function SearchBar({ placeholder, limit, debounceMs, onSelect, className, inputClassName, dropdownClassName, renderResult, theme, classNames, }: SearchBarProps): React.JSX.Element;
22
22
 
23
- interface ChatWidgetProps {
24
- title?: string;
25
- placeholder?: string;
26
- emptyStateText?: string;
27
- emptyStateSuggestions?: string;
28
- defaultCurrency?: string;
29
- className?: string;
30
- theme?: AkropolysTheme;
31
- classNames?: {
32
- root?: string;
33
- header?: string;
34
- messageBubble?: string;
35
- input?: string;
36
- };
37
- onSelectSource?: (source: ChatSource) => void;
38
- enableVoice?: boolean;
39
- /** Enable 📷 visual style-match search */
40
- enableVision?: boolean;
41
- visionCategoryHint?: string;
42
- /** Enable 🔊 TTS voice audio responses from AI */
43
- enableAudioResponse?: boolean;
44
- /** Optional AI voice preset */
45
- ttsVoice?: string;
46
- autoSpeakResponses?: boolean;
47
- }
48
- declare function ChatWidget({ title, placeholder, emptyStateText, emptyStateSuggestions, defaultCurrency, className, theme, classNames, onSelectSource, enableVoice, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses }: ChatWidgetProps): React.JSX.Element;
49
-
50
23
  interface KikuButtonProps {
51
24
  label?: React.ReactNode;
52
25
  children?: React.ReactNode;
53
26
  icon?: React.ReactNode;
54
27
  title?: string;
28
+ /** Wordmark shown in place of the name in the topbar. */
29
+ logo?: string;
55
30
  placeholder?: string;
56
31
  backdropColor?: string;
57
32
  backdropBlur?: string | number;
@@ -76,7 +51,7 @@ interface KikuButtonProps {
76
51
  ttsVoice?: string;
77
52
  autoSpeakResponses?: boolean;
78
53
  }
79
- declare function KikuButton({ label, children, icon, title, placeholder, backdropColor, backdropBlur, className, onSelectSource, defaultCurrency, chips, theme, classNames, enableVoice, voiceLang, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses, }: KikuButtonProps): React.JSX.Element;
54
+ declare function KikuButton({ label, children, icon, title, logo, placeholder, backdropColor, backdropBlur, className, onSelectSource, defaultCurrency, chips, theme, classNames, enableVoice, voiceLang, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses, }: KikuButtonProps): React.JSX.Element;
80
55
 
81
56
  interface SparkleProps {
82
57
  productName: string;
@@ -98,36 +73,14 @@ interface SparkleProps {
98
73
  }
99
74
  declare function Sparkle({ productName, limit, onResult, backdropColor, backdropBlur, className, onNavigate, theme, classNames, product, children, }: SparkleProps): React.JSX.Element;
100
75
 
101
- interface VoiceButtonProps {
102
- onTranscript: (text: string) => void;
103
- onInterim?: (text: string) => void;
104
- /** BCP-47 tag. Defaults to the page's <html lang>, then the browser language. */
105
- lang?: string;
106
- className?: string;
107
- disabled?: boolean;
108
- /** Raw SpeechRecognition error code — 'not-allowed', 'audio-capture', etc. */
109
- onError?: (code: string) => void;
110
- }
111
- /**
112
- * VoiceButton — speech to text input with pause-based utterance detection.
113
- */
114
- declare function VoiceButton({ onTranscript, onInterim, lang, className, disabled, onError, }: VoiceButtonProps): React.JSX.Element | null;
115
-
116
76
  interface VisualSearchProps {
117
- /** Called with search results + the base64 preview when Gemini responds. */
77
+ /** Called with search results + the base64 preview when the model responds. */
118
78
  onResults: (res: VisualSearchResponse, previewBase64: string) => void;
119
79
  onError?: (err: Error) => void;
120
- /**
121
- * Category hint sent to Gemini to sharpen the match_query.
122
- * e.g. "dress", "curtains", "sofa", "shoes"
123
- */
124
80
  categoryHint?: string;
125
81
  className?: string;
126
82
  disabled?: boolean;
127
83
  }
128
- /**
129
- * VisualSearch — camera/image-upload button for style-match search.
130
- */
131
84
  declare function VisualSearch({ onResults, onError, categoryHint, className, disabled, }: VisualSearchProps): React.JSX.Element;
132
85
 
133
86
  interface ScoutRailProps {
@@ -135,10 +88,11 @@ interface ScoutRailProps {
135
88
  themeAttr?: string;
136
89
  onAsk?: (scout: Scout) => void;
137
90
  onNew?: (avatar: string) => void;
91
+ compact?: boolean;
138
92
  open?: boolean;
139
93
  onOpenChange?: (open: boolean) => void;
140
94
  }
141
- declare function ScoutRail({ className, themeAttr, onAsk, onNew, open: openProp, onOpenChange }: ScoutRailProps): React.JSX.Element;
95
+ declare function ScoutRail({ className, themeAttr, onAsk, onNew, open: openProp, onOpenChange, compact, }: ScoutRailProps): React.JSX.Element;
142
96
 
143
97
  type ScoutMood = 'watching' | 'resting' | 'struck' | 'gone';
144
98
  interface ScoutCharacterProps {
@@ -225,18 +179,9 @@ declare global {
225
179
  };
226
180
  }
227
181
  }
228
- /**
229
- * Normalizes a Shopify product object into Akropolys entity format.
230
- */
231
182
  declare function normalizeShopifyProduct(p: ShopifyProduct): Record<string, any>;
232
- /**
233
- * Native Shopify Cart Integration.
234
- */
235
183
  declare function shopifyAddToCart(items: ChatSource[]): Promise<any>;
236
- /**
237
- * Native Shopify Get Cart.
238
- */
239
184
  declare function shopifyGetCart(): Promise<any>;
240
185
  declare function initKiku(customConfig?: StandaloneConfig): void;
241
186
 
242
- export { ChatWidget, type ChatWidgetProps, KikuButton, type KikuButtonProps, ChatWidget as KikuChat, type ChatWidgetProps as KikuChatProps, ScoutCharacter, type ScoutCharacterProps, ScoutRail, type ScoutRailProps, SearchBar, type SearchBarProps, type ShopifyProduct, Sparkle, type StandaloneConfig, VisualSearch, type VisualSearchProps, VoiceButton, type VoiceButtonProps, initKiku, normalizeShopifyProduct, shopifyAddToCart, shopifyGetCart };
187
+ export { KikuButton, type KikuButtonProps, ScoutCharacter, type ScoutCharacterProps, ScoutRail, type ScoutRailProps, SearchBar, type SearchBarProps, type ShopifyProduct, Sparkle, type StandaloneConfig, VisualSearch, type VisualSearchProps, initKiku, normalizeShopifyProduct, shopifyAddToCart, shopifyGetCart };
package/dist/index.d.ts CHANGED
@@ -20,38 +20,13 @@ interface SearchBarProps {
20
20
  }
21
21
  declare function SearchBar({ placeholder, limit, debounceMs, onSelect, className, inputClassName, dropdownClassName, renderResult, theme, classNames, }: SearchBarProps): React.JSX.Element;
22
22
 
23
- interface ChatWidgetProps {
24
- title?: string;
25
- placeholder?: string;
26
- emptyStateText?: string;
27
- emptyStateSuggestions?: string;
28
- defaultCurrency?: string;
29
- className?: string;
30
- theme?: AkropolysTheme;
31
- classNames?: {
32
- root?: string;
33
- header?: string;
34
- messageBubble?: string;
35
- input?: string;
36
- };
37
- onSelectSource?: (source: ChatSource) => void;
38
- enableVoice?: boolean;
39
- /** Enable 📷 visual style-match search */
40
- enableVision?: boolean;
41
- visionCategoryHint?: string;
42
- /** Enable 🔊 TTS voice audio responses from AI */
43
- enableAudioResponse?: boolean;
44
- /** Optional AI voice preset */
45
- ttsVoice?: string;
46
- autoSpeakResponses?: boolean;
47
- }
48
- declare function ChatWidget({ title, placeholder, emptyStateText, emptyStateSuggestions, defaultCurrency, className, theme, classNames, onSelectSource, enableVoice, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses }: ChatWidgetProps): React.JSX.Element;
49
-
50
23
  interface KikuButtonProps {
51
24
  label?: React.ReactNode;
52
25
  children?: React.ReactNode;
53
26
  icon?: React.ReactNode;
54
27
  title?: string;
28
+ /** Wordmark shown in place of the name in the topbar. */
29
+ logo?: string;
55
30
  placeholder?: string;
56
31
  backdropColor?: string;
57
32
  backdropBlur?: string | number;
@@ -76,7 +51,7 @@ interface KikuButtonProps {
76
51
  ttsVoice?: string;
77
52
  autoSpeakResponses?: boolean;
78
53
  }
79
- declare function KikuButton({ label, children, icon, title, placeholder, backdropColor, backdropBlur, className, onSelectSource, defaultCurrency, chips, theme, classNames, enableVoice, voiceLang, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses, }: KikuButtonProps): React.JSX.Element;
54
+ declare function KikuButton({ label, children, icon, title, logo, placeholder, backdropColor, backdropBlur, className, onSelectSource, defaultCurrency, chips, theme, classNames, enableVoice, voiceLang, enableVision, visionCategoryHint, enableAudioResponse, ttsVoice, autoSpeakResponses, }: KikuButtonProps): React.JSX.Element;
80
55
 
81
56
  interface SparkleProps {
82
57
  productName: string;
@@ -98,36 +73,14 @@ interface SparkleProps {
98
73
  }
99
74
  declare function Sparkle({ productName, limit, onResult, backdropColor, backdropBlur, className, onNavigate, theme, classNames, product, children, }: SparkleProps): React.JSX.Element;
100
75
 
101
- interface VoiceButtonProps {
102
- onTranscript: (text: string) => void;
103
- onInterim?: (text: string) => void;
104
- /** BCP-47 tag. Defaults to the page's <html lang>, then the browser language. */
105
- lang?: string;
106
- className?: string;
107
- disabled?: boolean;
108
- /** Raw SpeechRecognition error code — 'not-allowed', 'audio-capture', etc. */
109
- onError?: (code: string) => void;
110
- }
111
- /**
112
- * VoiceButton — speech to text input with pause-based utterance detection.
113
- */
114
- declare function VoiceButton({ onTranscript, onInterim, lang, className, disabled, onError, }: VoiceButtonProps): React.JSX.Element | null;
115
-
116
76
  interface VisualSearchProps {
117
- /** Called with search results + the base64 preview when Gemini responds. */
77
+ /** Called with search results + the base64 preview when the model responds. */
118
78
  onResults: (res: VisualSearchResponse, previewBase64: string) => void;
119
79
  onError?: (err: Error) => void;
120
- /**
121
- * Category hint sent to Gemini to sharpen the match_query.
122
- * e.g. "dress", "curtains", "sofa", "shoes"
123
- */
124
80
  categoryHint?: string;
125
81
  className?: string;
126
82
  disabled?: boolean;
127
83
  }
128
- /**
129
- * VisualSearch — camera/image-upload button for style-match search.
130
- */
131
84
  declare function VisualSearch({ onResults, onError, categoryHint, className, disabled, }: VisualSearchProps): React.JSX.Element;
132
85
 
133
86
  interface ScoutRailProps {
@@ -135,10 +88,11 @@ interface ScoutRailProps {
135
88
  themeAttr?: string;
136
89
  onAsk?: (scout: Scout) => void;
137
90
  onNew?: (avatar: string) => void;
91
+ compact?: boolean;
138
92
  open?: boolean;
139
93
  onOpenChange?: (open: boolean) => void;
140
94
  }
141
- declare function ScoutRail({ className, themeAttr, onAsk, onNew, open: openProp, onOpenChange }: ScoutRailProps): React.JSX.Element;
95
+ declare function ScoutRail({ className, themeAttr, onAsk, onNew, open: openProp, onOpenChange, compact, }: ScoutRailProps): React.JSX.Element;
142
96
 
143
97
  type ScoutMood = 'watching' | 'resting' | 'struck' | 'gone';
144
98
  interface ScoutCharacterProps {
@@ -225,18 +179,9 @@ declare global {
225
179
  };
226
180
  }
227
181
  }
228
- /**
229
- * Normalizes a Shopify product object into Akropolys entity format.
230
- */
231
182
  declare function normalizeShopifyProduct(p: ShopifyProduct): Record<string, any>;
232
- /**
233
- * Native Shopify Cart Integration.
234
- */
235
183
  declare function shopifyAddToCart(items: ChatSource[]): Promise<any>;
236
- /**
237
- * Native Shopify Get Cart.
238
- */
239
184
  declare function shopifyGetCart(): Promise<any>;
240
185
  declare function initKiku(customConfig?: StandaloneConfig): void;
241
186
 
242
- export { ChatWidget, type ChatWidgetProps, KikuButton, type KikuButtonProps, ChatWidget as KikuChat, type ChatWidgetProps as KikuChatProps, ScoutCharacter, type ScoutCharacterProps, ScoutRail, type ScoutRailProps, SearchBar, type SearchBarProps, type ShopifyProduct, Sparkle, type StandaloneConfig, VisualSearch, type VisualSearchProps, VoiceButton, type VoiceButtonProps, initKiku, normalizeShopifyProduct, shopifyAddToCart, shopifyGetCart };
187
+ export { KikuButton, type KikuButtonProps, ScoutCharacter, type ScoutCharacterProps, ScoutRail, type ScoutRailProps, SearchBar, type SearchBarProps, type ShopifyProduct, Sparkle, type StandaloneConfig, VisualSearch, type VisualSearchProps, initKiku, normalizeShopifyProduct, shopifyAddToCart, shopifyGetCart };