@jazzmine-ui/react 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/components/ChatInterface/ChatInterface.d.ts +4 -0
- package/dist/components/ChatInterface/index.d.ts +2 -0
- package/dist/components/ChatInterface/types.d.ts +17 -0
- package/dist/components/ChatWindow/ChatWindow.d.ts +4 -0
- package/dist/components/ChatWindow/index.d.ts +2 -0
- package/dist/components/ChatWindow/types.d.ts +18 -0
- package/dist/components/FloatingChatWidget/FloatingChatWidget.d.ts +4 -0
- package/dist/components/FloatingChatWidget/index.d.ts +2 -0
- package/dist/components/FloatingChatWidget/types.d.ts +13 -0
- package/dist/components/JazzmineChat/JazzmineChat.d.ts +3 -0
- package/dist/components/JazzmineChat/index.d.ts +2 -0
- package/dist/components/JazzmineChat/types.d.ts +13 -0
- package/dist/components/MessageList/MessageList.d.ts +4 -0
- package/dist/components/MessageList/index.d.ts +2 -0
- package/dist/components/MessageList/types.d.ts +13 -0
- package/dist/components/Navbar/Navbar.d.ts +4 -0
- package/dist/components/Navbar/index.d.ts +2 -0
- package/dist/components/Navbar/types.d.ts +11 -0
- package/dist/components/Sidebar/Sidebar.d.ts +4 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/types.d.ts +23 -0
- package/dist/components/internal/Avatar/Avatar.d.ts +4 -0
- package/dist/components/internal/Avatar/index.d.ts +2 -0
- package/dist/components/internal/Avatar/types.d.ts +7 -0
- package/dist/components/internal/Button/Button.d.ts +4 -0
- package/dist/components/internal/Button/index.d.ts +2 -0
- package/dist/components/internal/Button/types.d.ts +6 -0
- package/dist/components/internal/ContextModal/ContextModal.d.ts +4 -0
- package/dist/components/internal/ContextModal/index.d.ts +2 -0
- package/dist/components/internal/ContextModal/types.d.ts +8 -0
- package/dist/components/internal/ContextPanel/ContextPanel.d.ts +4 -0
- package/dist/components/internal/ContextPanel/index.d.ts +2 -0
- package/dist/components/internal/ContextPanel/types.d.ts +6 -0
- package/dist/components/internal/ContextReference/ContextReference.d.ts +4 -0
- package/dist/components/internal/ContextReference/index.d.ts +2 -0
- package/dist/components/internal/ContextReference/types.d.ts +5 -0
- package/dist/components/internal/Message/Message.d.ts +4 -0
- package/dist/components/internal/Message/index.d.ts +2 -0
- package/dist/components/internal/Message/types.d.ts +15 -0
- package/dist/components/internal/MessageInput/MessageInput.d.ts +4 -0
- package/dist/components/internal/MessageInput/index.d.ts +2 -0
- package/dist/components/internal/MessageInput/types.d.ts +6 -0
- package/dist/components/internal/StatusIndicator/StatusIndicator.d.ts +3 -0
- package/dist/components/internal/StatusIndicator/index.d.ts +2 -0
- package/dist/components/internal/StatusIndicator/types.d.ts +6 -0
- package/dist/index.d.ts +12 -1
- package/dist/jazzmine-ui.js +2479 -3104
- package/dist/jazzmine-ui.umd.cjs +10 -39
- package/dist/main.d.ts +3 -0
- package/dist/style.d.ts +1 -0
- package/dist/types/client.d.ts +32 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/utils/highlightText.d.ts +8 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/stripMarkdown.d.ts +4 -0
- package/package.json +13 -8
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Message, Context } from "../../types";
|
|
2
|
+
import type { Chat } from "../../types";
|
|
3
|
+
export interface ChatInterfaceProps {
|
|
4
|
+
messages: Message[];
|
|
5
|
+
chats: Chat[];
|
|
6
|
+
activeChatId?: string;
|
|
7
|
+
assistantName?: string;
|
|
8
|
+
onSend: (text: string, contexts?: Context[]) => void;
|
|
9
|
+
onNewChat: () => void;
|
|
10
|
+
onSelectChat: (chatId: string) => void;
|
|
11
|
+
onDeleteChat?: (chatId: string) => void;
|
|
12
|
+
loadingText?: string;
|
|
13
|
+
loadingVariant?: "text-and-dots" | "dots-only";
|
|
14
|
+
isLoading?: boolean;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Message, Context } from '../../types';
|
|
2
|
+
export interface ChatWindowProps {
|
|
3
|
+
messages: Message[];
|
|
4
|
+
assistantName?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
7
|
+
loadingVariant?: 'text-and-dots' | 'dots-only';
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
onSend: (text: string) => void;
|
|
10
|
+
inputPlaceholder?: string;
|
|
11
|
+
inputDisabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
searchQuery?: string;
|
|
14
|
+
activeSearchMessageId?: string;
|
|
15
|
+
selectedContexts?: Context[];
|
|
16
|
+
onAddContext?: (context: Context) => void;
|
|
17
|
+
onRemoveContext?: (contextId: string) => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Message } from '../../types';
|
|
2
|
+
export interface FloatingChatWidgetProps {
|
|
3
|
+
messages: Message[];
|
|
4
|
+
assistantName?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
7
|
+
loadingVariant?: 'text-and-dots' | 'dots-only';
|
|
8
|
+
initialOpen?: boolean;
|
|
9
|
+
onOpen?: (open: boolean) => void;
|
|
10
|
+
onSend?: (text: string) => void;
|
|
11
|
+
logo?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IJazzmineClient } from '../../types/client';
|
|
2
|
+
export interface JazzmineChatProps {
|
|
3
|
+
/** A JazzmineClient instance from @jazzmine-ui/sdk */
|
|
4
|
+
client: IJazzmineClient;
|
|
5
|
+
/** Displayed as the assistant's name in the UI. Default: agent name from /health */
|
|
6
|
+
assistantName?: string;
|
|
7
|
+
/** Placeholder text for the message input */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Additional CSS class for the root element */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Called when an unrecoverable error occurs */
|
|
12
|
+
onError?: (error: Error) => void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Message, Context } from '../../types';
|
|
2
|
+
export interface MessageListProps {
|
|
3
|
+
messages: Message[];
|
|
4
|
+
assistantName?: string;
|
|
5
|
+
isLoading?: boolean;
|
|
6
|
+
loadingText?: string;
|
|
7
|
+
loadingVariant?: 'text-and-dots' | 'dots-only';
|
|
8
|
+
className?: string;
|
|
9
|
+
searchQuery?: string;
|
|
10
|
+
activeSearchMessageId?: string;
|
|
11
|
+
onAddContext?: (context: Context) => void;
|
|
12
|
+
scrollRef?: React.RefObject<HTMLDivElement | null> | ((node: HTMLDivElement | null) => void);
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface NavbarProps {
|
|
2
|
+
assistantName?: string;
|
|
3
|
+
onToggleSidebar: () => void;
|
|
4
|
+
className?: string;
|
|
5
|
+
searchQuery?: string;
|
|
6
|
+
onSearchChange?: (query: string) => void;
|
|
7
|
+
searchResultsCount?: number;
|
|
8
|
+
currentSearchIndex?: number;
|
|
9
|
+
onSearchNext?: () => void;
|
|
10
|
+
onSearchPrev?: () => void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Chat } from '../../types';
|
|
2
|
+
export interface ChatAction {
|
|
3
|
+
label: string;
|
|
4
|
+
icon?: React.ReactNode;
|
|
5
|
+
onClick: (chatId: string) => void;
|
|
6
|
+
danger?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SidebarProps {
|
|
9
|
+
chats: Chat[];
|
|
10
|
+
activeChatId?: string;
|
|
11
|
+
assistantName?: string;
|
|
12
|
+
logo?: string;
|
|
13
|
+
logoAlt?: string;
|
|
14
|
+
chatActions?: ChatAction[];
|
|
15
|
+
onNewChat: () => void;
|
|
16
|
+
onSelectChat: (chatId: string) => void;
|
|
17
|
+
onRenameChat?: (chatId: string) => void;
|
|
18
|
+
onDeleteChat?: (chatId: string) => void;
|
|
19
|
+
onArchiveChat?: (chatId: string) => void;
|
|
20
|
+
className?: string;
|
|
21
|
+
collapsed?: boolean;
|
|
22
|
+
onToggleCollapse?: (value?: boolean) => void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Context } from '../../../types';
|
|
2
|
+
export interface MessageProps {
|
|
3
|
+
text?: string;
|
|
4
|
+
sender: 'user' | 'assistant';
|
|
5
|
+
avatar?: string;
|
|
6
|
+
assistantName?: string;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
loadingText?: string;
|
|
9
|
+
loadingVariant?: 'text-and-dots' | 'dots-only';
|
|
10
|
+
searchQuery?: string;
|
|
11
|
+
isActiveSearchResult?: boolean;
|
|
12
|
+
messageId?: string;
|
|
13
|
+
contexts?: Context[];
|
|
14
|
+
onAddContext?: (context: Context) => void;
|
|
15
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
export {}
|
|
1
|
+
export { ChatInterface } from './components/ChatInterface';
|
|
2
|
+
export { Sidebar } from './components/Sidebar';
|
|
3
|
+
export { MessageList } from './components/MessageList';
|
|
4
|
+
export { FloatingChatWidget } from './components/FloatingChatWidget';
|
|
5
|
+
export { JazzmineChat } from './components/JazzmineChat';
|
|
6
|
+
export type { ChatInterfaceProps } from './components/ChatInterface';
|
|
7
|
+
export type { SidebarProps } from './components/Sidebar';
|
|
8
|
+
export type { MessageListProps } from './components/MessageList';
|
|
9
|
+
export type { FloatingChatWidgetProps } from './components/FloatingChatWidget';
|
|
10
|
+
export type { JazzmineChatProps } from './components/JazzmineChat';
|
|
11
|
+
export type { IJazzmineClient } from './types/client';
|
|
12
|
+
export type { Message, Chat } from './types';
|