@moderta/mint-ai-assistant 0.1.2 → 0.1.5

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
@@ -29,11 +29,11 @@ export function App() {
29
29
  return (
30
30
  <MintAIAssistant
31
31
  baseUrl="https://api.moderta.io/ai"
32
- getToken={() => localStorage.getItem('token') ?? undefined}
33
- title="Mint AI"
34
- placement="bottom-right"
35
- enableExpandMode={false}
36
- context={{ orgId: 'org_123' }}
32
+ getToken={() => localStorage.getItem('token') ?? undefined}
33
+ title="Mint AI"
34
+ placement="bottom-right"
35
+ enableExpandMode={false}
36
+ context={{ orgId: 'org_123' }}
37
37
  />
38
38
  );
39
39
  }
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import { ReactNode } from 'react';
6
6
 
7
7
  export declare type AssistantFormRenderer = () => ReactNode;
8
8
 
9
- export declare type AssistantPlacement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
9
+ export declare type AssistantPlacement = "bottom-right" | "bottom-left" | "top-right" | "top-left";
10
10
 
11
11
  export { ChatMessage }
12
12
 
@@ -24,6 +24,8 @@ export declare interface MintAIAssistantProps extends MintAIConfig {
24
24
  export declare interface MintAIConfig {
25
25
  /** Base URL of the assistant API, e.g. `https://api.moderta.io`. */
26
26
  baseUrl: string;
27
+ /** Optional stable user identifier forwarded to the chat backend. */
28
+ userId?: string;
27
29
  /** Returns the bearer token for the current user (sync or async). */
28
30
  getToken?: TokenGetter;
29
31
  /** Where the floating launcher sits. Default: `bottom-right`. */
@@ -46,25 +48,6 @@ export declare interface MintAIConfig {
46
48
 
47
49
  declare type ResolvedConfig = MintAIConfig & Required<Pick<MintAIConfig, 'placement' | 'title' | 'welcomeMessage' | 'defaultOpen' | 'enableExpandMode'>>;
48
50
 
49
- export declare function SampleConversationPanel({ onClose }: {
50
- onClose?: () => void;
51
- }): JSX_2.Element;
52
-
53
- export declare function SampleEmptyPanel({ onClose }: {
54
- onClose?: () => void;
55
- }): JSX_2.Element;
56
-
57
- export declare function SampleExpandedMode({ onCollapse, onClose, }: Readonly<{
58
- onCollapse?: () => void;
59
- onClose?: () => void;
60
- }>): JSX_2.Element;
61
-
62
- export declare function SampleShowcase({ initial }: {
63
- initial?: Screen_2;
64
- }): JSX_2.Element;
65
-
66
- declare type Screen_2 = 'empty' | 'conversation' | 'expanded';
67
-
68
51
  export declare type TokenGetter = () => string | undefined | Promise<string | undefined>;
69
52
 
70
53
  export declare function useChat(): {