@jazzmine-ui/react 0.1.4 → 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 +8 -0
- package/dist/components/ChatInterface/types.d.ts +8 -0
- package/dist/components/JazzmineChat/types.d.ts +2 -0
- package/dist/components/SearchModal/SearchModal.d.ts +3 -0
- package/dist/components/SearchModal/index.d.ts +2 -0
- package/dist/components/SearchModal/types.d.ts +10 -0
- package/dist/components/Sidebar/types.d.ts +15 -1
- package/dist/index.d.ts +2 -0
- package/dist/jazzmine-ui.js +1238 -904
- package/dist/jazzmine-ui.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/dist/types/client.d.ts +56 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,13 @@ Peer dependencies:
|
|
|
17
17
|
|
|
18
18
|
- react
|
|
19
19
|
- react-dom
|
|
20
|
+
- react-markdown
|
|
21
|
+
|
|
22
|
+
If your project does not already include peer dependencies, install everything together:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @jazzmine-ui/react react react-dom react-markdown
|
|
26
|
+
```
|
|
20
27
|
|
|
21
28
|
## Styles
|
|
22
29
|
|
|
@@ -405,6 +412,7 @@ interface IJazzmineClient {
|
|
|
405
412
|
- This package does not import from @jazzmine-ui/sdk directly.
|
|
406
413
|
- Any SDK client that structurally matches IJazzmineClient works.
|
|
407
414
|
- JazzmineChat is a client-side component and includes a use client directive.
|
|
415
|
+
- react-markdown is externalized and must be present in the consuming app.
|
|
408
416
|
|
|
409
417
|
## Development
|
|
410
418
|
|
|
@@ -8,7 +8,15 @@ export interface ChatInterfaceProps {
|
|
|
8
8
|
onSend: (text: string, contexts?: Context[]) => void;
|
|
9
9
|
onNewChat: () => void;
|
|
10
10
|
onSelectChat: (chatId: string) => void;
|
|
11
|
+
onRenameChat?: (chatId: string, newTitle?: string) => void;
|
|
11
12
|
onDeleteChat?: (chatId: string) => void;
|
|
13
|
+
onSearchClick?: () => void;
|
|
14
|
+
onLoadMore?: () => void;
|
|
15
|
+
hasMore?: boolean;
|
|
16
|
+
isLoadingChats?: boolean;
|
|
17
|
+
isSearchOpen?: boolean;
|
|
18
|
+
searchQuery?: string;
|
|
19
|
+
onSearchQueryChange?: (query: string) => void;
|
|
12
20
|
loadingText?: string;
|
|
13
21
|
loadingVariant?: "text-and-dots" | "dots-only";
|
|
14
22
|
isLoading?: boolean;
|
|
@@ -2,6 +2,8 @@ import type { IJazzmineClient } from '../../types/client';
|
|
|
2
2
|
export interface JazzmineChatProps {
|
|
3
3
|
/** A JazzmineClient instance from @jazzmine-ui/sdk */
|
|
4
4
|
client: IJazzmineClient;
|
|
5
|
+
/** User identifier used for listing and searching conversations. Default: 'user' */
|
|
6
|
+
userId?: string;
|
|
5
7
|
/** Displayed as the assistant's name in the UI. Default: agent name from /health */
|
|
6
8
|
assistantName?: string;
|
|
7
9
|
/** Placeholder text for the message input */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Chat } from '../../types';
|
|
2
|
+
export interface SearchModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSelectConversation: (conversationId: string) => void;
|
|
6
|
+
searchQuery: string;
|
|
7
|
+
onSearchQueryChange: (query: string) => void;
|
|
8
|
+
results: Chat[];
|
|
9
|
+
isSearching: boolean;
|
|
10
|
+
}
|
|
@@ -14,9 +14,23 @@ export interface SidebarProps {
|
|
|
14
14
|
chatActions?: ChatAction[];
|
|
15
15
|
onNewChat: () => void;
|
|
16
16
|
onSelectChat: (chatId: string) => void;
|
|
17
|
-
onRenameChat?: (chatId: string) => void;
|
|
17
|
+
onRenameChat?: (chatId: string, newTitle?: string) => void;
|
|
18
18
|
onDeleteChat?: (chatId: string) => void;
|
|
19
19
|
onArchiveChat?: (chatId: string) => void;
|
|
20
|
+
/** Called when the search button is clicked */
|
|
21
|
+
onSearchClick?: () => void;
|
|
22
|
+
/** Called when user scrolls to the bottom of the chat list (infinite scroll) */
|
|
23
|
+
onLoadMore?: () => void;
|
|
24
|
+
/** Whether more conversations are available to load */
|
|
25
|
+
hasMore?: boolean;
|
|
26
|
+
/** Whether conversations are currently being loaded */
|
|
27
|
+
isLoadingChats?: boolean;
|
|
28
|
+
/** Whether conversation search input is visible */
|
|
29
|
+
isSearchOpen?: boolean;
|
|
30
|
+
/** Current conversation search query */
|
|
31
|
+
searchQuery?: string;
|
|
32
|
+
/** Called when search query changes */
|
|
33
|
+
onSearchQueryChange?: (query: string) => void;
|
|
20
34
|
className?: string;
|
|
21
35
|
collapsed?: boolean;
|
|
22
36
|
onToggleCollapse?: (value?: boolean) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,10 +3,12 @@ export { Sidebar } from './components/Sidebar';
|
|
|
3
3
|
export { MessageList } from './components/MessageList';
|
|
4
4
|
export { FloatingChatWidget } from './components/FloatingChatWidget';
|
|
5
5
|
export { JazzmineChat } from './components/JazzmineChat';
|
|
6
|
+
export { SearchModal } from './components/SearchModal';
|
|
6
7
|
export type { ChatInterfaceProps } from './components/ChatInterface';
|
|
7
8
|
export type { SidebarProps } from './components/Sidebar';
|
|
8
9
|
export type { MessageListProps } from './components/MessageList';
|
|
9
10
|
export type { FloatingChatWidgetProps } from './components/FloatingChatWidget';
|
|
10
11
|
export type { JazzmineChatProps } from './components/JazzmineChat';
|
|
12
|
+
export type { SearchModalProps } from './components/SearchModal';
|
|
11
13
|
export type { IJazzmineClient } from './types/client';
|
|
12
14
|
export type { Message, Chat } from './types';
|