@afncdelacru/brady-chat 0.4.5 → 0.4.6

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
@@ -37,6 +37,9 @@ interface BradyChatContextType {
37
37
  setIsHidden: React.Dispatch<React.SetStateAction<boolean>>;
38
38
  hideBradyForModal: () => void;
39
39
  restoreBradyAfterModal: () => void;
40
+ setUserText: (text: string) => void;
41
+ userTextToSend?: string;
42
+ setUserTextToSend?: (text: string | undefined) => void;
40
43
  }
41
44
  declare function BradyChatProvider({ children }: {
42
45
  children: ReactNode;
@@ -55,8 +58,12 @@ interface EnhancedBradyChatProps {
55
58
  * Typically you pass something like `/bradyIcon.png` from your app's public assets.
56
59
  */
57
60
  avatarSrc: string;
61
+ /**
62
+ * If set, will immediately set the input value and send it as a user message.
63
+ */
64
+ setUserText?: string;
58
65
  }
59
- declare function EnhancedBradyChat({ modeVariant, avatarSrc }: EnhancedBradyChatProps): react_jsx_runtime.JSX.Element;
66
+ declare function EnhancedBradyChat({ modeVariant, avatarSrc, setUserText }: EnhancedBradyChatProps): react_jsx_runtime.JSX.Element;
60
67
 
61
68
  declare const DEFAULT_BRADY_API_KEY: string;
62
69
  declare const API_URL: string;
package/dist/index.d.ts CHANGED
@@ -37,6 +37,9 @@ interface BradyChatContextType {
37
37
  setIsHidden: React.Dispatch<React.SetStateAction<boolean>>;
38
38
  hideBradyForModal: () => void;
39
39
  restoreBradyAfterModal: () => void;
40
+ setUserText: (text: string) => void;
41
+ userTextToSend?: string;
42
+ setUserTextToSend?: (text: string | undefined) => void;
40
43
  }
41
44
  declare function BradyChatProvider({ children }: {
42
45
  children: ReactNode;
@@ -55,8 +58,12 @@ interface EnhancedBradyChatProps {
55
58
  * Typically you pass something like `/bradyIcon.png` from your app's public assets.
56
59
  */
57
60
  avatarSrc: string;
61
+ /**
62
+ * If set, will immediately set the input value and send it as a user message.
63
+ */
64
+ setUserText?: string;
58
65
  }
59
- declare function EnhancedBradyChat({ modeVariant, avatarSrc }: EnhancedBradyChatProps): react_jsx_runtime.JSX.Element;
66
+ declare function EnhancedBradyChat({ modeVariant, avatarSrc, setUserText }: EnhancedBradyChatProps): react_jsx_runtime.JSX.Element;
60
67
 
61
68
  declare const DEFAULT_BRADY_API_KEY: string;
62
69
  declare const API_URL: string;