polarisrx 0.1.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.
@@ -0,0 +1 @@
1
+ export default function Widget(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Badge(): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ sessionId: string | null;
3
+ onClose: () => void;
4
+ }
5
+ export default function ChatPanel({ sessionId, onClose }: Props): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Message } from '../hooks/useChat';
2
+ interface Props {
3
+ message: Message;
4
+ }
5
+ export default function MessageBubble({ message }: Props): import("react").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import { PolarisRXConfig } from '../types';
2
+ export declare const WidgetProvider: import('react').Provider<PolarisRXConfig>;
3
+ export declare function useWidgetConfig(): PolarisRXConfig;
@@ -0,0 +1,12 @@
1
+ export interface Message {
2
+ id: string;
3
+ role: "user" | "assistant";
4
+ content: string;
5
+ }
6
+ interface ChatState {
7
+ messages: Message[];
8
+ loading: boolean;
9
+ send: (question: string) => Promise<void>;
10
+ }
11
+ export declare function useChat(sessionId: string | null): ChatState;
12
+ export {};
@@ -0,0 +1,8 @@
1
+ interface SessionState {
2
+ sessionId: string | null;
3
+ userUuid: string | null;
4
+ ready: boolean;
5
+ error: string | null;
6
+ }
7
+ export declare function useSession(): SessionState;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export { mount } from './mount';
2
+ export type { PolarisRXConfig } from './types';