@moderta/mint-ai-assistant 0.1.0 → 0.1.2
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.ts +12 -9
- package/dist/mint-ai-assistant.cjs +21 -21
- package/dist/mint-ai-assistant.js +3754 -3206
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChatMessage } from '@moderta/api-contracts';
|
|
2
|
+
import { ChatMessageStatus } from '@moderta/api-contracts';
|
|
2
3
|
import { ChatRole } from '@moderta/api-contracts';
|
|
3
4
|
import { JSX as JSX_2 } from 'react';
|
|
4
5
|
import { ReactNode } from 'react';
|
|
5
6
|
|
|
7
|
+
export declare type AssistantFormRenderer = () => ReactNode;
|
|
8
|
+
|
|
6
9
|
export declare type AssistantPlacement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
7
10
|
|
|
8
|
-
export
|
|
9
|
-
role: ChatRole | 'system';
|
|
10
|
-
createdAt: string;
|
|
11
|
-
status?: ChatMessageStatus;
|
|
12
|
-
}
|
|
11
|
+
export { ChatMessage }
|
|
13
12
|
|
|
14
|
-
export
|
|
13
|
+
export { ChatMessageStatus }
|
|
15
14
|
|
|
16
15
|
export { ChatRole }
|
|
17
16
|
|
|
@@ -39,6 +38,10 @@ export declare interface MintAIConfig {
|
|
|
39
38
|
enableExpandMode?: boolean;
|
|
40
39
|
/** Arbitrary metadata forwarded with every chat request (e.g. orgId). */
|
|
41
40
|
context?: Record<string, unknown>;
|
|
41
|
+
/** Host-owned form UI rendered inside expanded assistant mode. */
|
|
42
|
+
formContent?: ReactNode;
|
|
43
|
+
/** Render prop alternative for host-owned form UI. Takes precedence over `formContent`. */
|
|
44
|
+
renderForm?: AssistantFormRenderer;
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
declare type ResolvedConfig = MintAIConfig & Required<Pick<MintAIConfig, 'placement' | 'title' | 'welcomeMessage' | 'defaultOpen' | 'enableExpandMode'>>;
|
|
@@ -51,10 +54,10 @@ export declare function SampleEmptyPanel({ onClose }: {
|
|
|
51
54
|
onClose?: () => void;
|
|
52
55
|
}): JSX_2.Element;
|
|
53
56
|
|
|
54
|
-
export declare function SampleExpandedMode({ onCollapse, onClose, }: {
|
|
57
|
+
export declare function SampleExpandedMode({ onCollapse, onClose, }: Readonly<{
|
|
55
58
|
onCollapse?: () => void;
|
|
56
59
|
onClose?: () => void;
|
|
57
|
-
}): JSX_2.Element;
|
|
60
|
+
}>): JSX_2.Element;
|
|
58
61
|
|
|
59
62
|
export declare function SampleShowcase({ initial }: {
|
|
60
63
|
initial?: Screen_2;
|