@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.
Files changed (56) hide show
  1. package/dist/components/ChatInterface/ChatInterface.d.ts +4 -0
  2. package/dist/components/ChatInterface/index.d.ts +2 -0
  3. package/dist/components/ChatInterface/types.d.ts +17 -0
  4. package/dist/components/ChatWindow/ChatWindow.d.ts +4 -0
  5. package/dist/components/ChatWindow/index.d.ts +2 -0
  6. package/dist/components/ChatWindow/types.d.ts +18 -0
  7. package/dist/components/FloatingChatWidget/FloatingChatWidget.d.ts +4 -0
  8. package/dist/components/FloatingChatWidget/index.d.ts +2 -0
  9. package/dist/components/FloatingChatWidget/types.d.ts +13 -0
  10. package/dist/components/JazzmineChat/JazzmineChat.d.ts +3 -0
  11. package/dist/components/JazzmineChat/index.d.ts +2 -0
  12. package/dist/components/JazzmineChat/types.d.ts +13 -0
  13. package/dist/components/MessageList/MessageList.d.ts +4 -0
  14. package/dist/components/MessageList/index.d.ts +2 -0
  15. package/dist/components/MessageList/types.d.ts +13 -0
  16. package/dist/components/Navbar/Navbar.d.ts +4 -0
  17. package/dist/components/Navbar/index.d.ts +2 -0
  18. package/dist/components/Navbar/types.d.ts +11 -0
  19. package/dist/components/Sidebar/Sidebar.d.ts +4 -0
  20. package/dist/components/Sidebar/index.d.ts +2 -0
  21. package/dist/components/Sidebar/types.d.ts +23 -0
  22. package/dist/components/internal/Avatar/Avatar.d.ts +4 -0
  23. package/dist/components/internal/Avatar/index.d.ts +2 -0
  24. package/dist/components/internal/Avatar/types.d.ts +7 -0
  25. package/dist/components/internal/Button/Button.d.ts +4 -0
  26. package/dist/components/internal/Button/index.d.ts +2 -0
  27. package/dist/components/internal/Button/types.d.ts +6 -0
  28. package/dist/components/internal/ContextModal/ContextModal.d.ts +4 -0
  29. package/dist/components/internal/ContextModal/index.d.ts +2 -0
  30. package/dist/components/internal/ContextModal/types.d.ts +8 -0
  31. package/dist/components/internal/ContextPanel/ContextPanel.d.ts +4 -0
  32. package/dist/components/internal/ContextPanel/index.d.ts +2 -0
  33. package/dist/components/internal/ContextPanel/types.d.ts +6 -0
  34. package/dist/components/internal/ContextReference/ContextReference.d.ts +4 -0
  35. package/dist/components/internal/ContextReference/index.d.ts +2 -0
  36. package/dist/components/internal/ContextReference/types.d.ts +5 -0
  37. package/dist/components/internal/Message/Message.d.ts +4 -0
  38. package/dist/components/internal/Message/index.d.ts +2 -0
  39. package/dist/components/internal/Message/types.d.ts +15 -0
  40. package/dist/components/internal/MessageInput/MessageInput.d.ts +4 -0
  41. package/dist/components/internal/MessageInput/index.d.ts +2 -0
  42. package/dist/components/internal/MessageInput/types.d.ts +6 -0
  43. package/dist/components/internal/StatusIndicator/StatusIndicator.d.ts +3 -0
  44. package/dist/components/internal/StatusIndicator/index.d.ts +2 -0
  45. package/dist/components/internal/StatusIndicator/types.d.ts +6 -0
  46. package/dist/index.d.ts +12 -1
  47. package/dist/jazzmine-ui.js +2479 -3104
  48. package/dist/jazzmine-ui.umd.cjs +10 -39
  49. package/dist/main.d.ts +3 -0
  50. package/dist/style.d.ts +1 -0
  51. package/dist/types/client.d.ts +32 -0
  52. package/dist/types/index.d.ts +20 -0
  53. package/dist/utils/highlightText.d.ts +8 -0
  54. package/dist/utils/index.d.ts +2 -0
  55. package/dist/utils/stripMarkdown.d.ts +4 -0
  56. package/package.json +13 -8
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import "../../styles/variables.css";
3
+ import type { ChatInterfaceProps } from "./types";
4
+ export declare const ChatInterface: React.FC<ChatInterfaceProps>;
@@ -0,0 +1,2 @@
1
+ export { ChatInterface } from './ChatInterface';
2
+ export type { ChatInterfaceProps } from './types';
@@ -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,4 @@
1
+ import React from "react";
2
+ import "../../styles/variables.css";
3
+ import type { ChatWindowProps } from "./types";
4
+ export declare const ChatWindow: React.FC<ChatWindowProps>;
@@ -0,0 +1,2 @@
1
+ export { ChatWindow } from './ChatWindow';
2
+ export type { ChatWindowProps } from './types';
@@ -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,4 @@
1
+ import React from 'react';
2
+ import '../../styles/variables.css';
3
+ import type { FloatingChatWidgetProps } from './types';
4
+ export declare const FloatingChatWidget: React.FC<FloatingChatWidgetProps>;
@@ -0,0 +1,2 @@
1
+ export { FloatingChatWidget } from './FloatingChatWidget';
2
+ export type { FloatingChatWidgetProps } from './types';
@@ -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,3 @@
1
+ import React from 'react';
2
+ import type { JazzmineChatProps } from './types';
3
+ export declare const JazzmineChat: React.FC<JazzmineChatProps>;
@@ -0,0 +1,2 @@
1
+ export { JazzmineChat } from './JazzmineChat';
2
+ export type { JazzmineChatProps } from './types';
@@ -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,4 @@
1
+ import React from "react";
2
+ import "../../styles/variables.css";
3
+ import type { MessageListProps } from "./types";
4
+ export declare const MessageList: React.FC<MessageListProps>;
@@ -0,0 +1,2 @@
1
+ export { MessageList } from './MessageList';
2
+ export type { MessageListProps } from './types';
@@ -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,4 @@
1
+ import React from "react";
2
+ import "../../styles/variables.css";
3
+ import type { NavbarProps } from "./types";
4
+ export declare const Navbar: React.FC<NavbarProps>;
@@ -0,0 +1,2 @@
1
+ export { Navbar } from "./Navbar";
2
+ export type { NavbarProps } from "./types";
@@ -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,4 @@
1
+ import React from "react";
2
+ import "../../styles/variables.css";
3
+ import type { SidebarProps } from "./types";
4
+ export declare const Sidebar: React.FC<SidebarProps>;
@@ -0,0 +1,2 @@
1
+ export { Sidebar } from './Sidebar';
2
+ export type { SidebarProps } from './types';
@@ -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,4 @@
1
+ import React from 'react';
2
+ import "../../../styles/variables.css";
3
+ import type { AvatarProps } from './types';
4
+ export declare const Avatar: React.FC<AvatarProps>;
@@ -0,0 +1,2 @@
1
+ export { Avatar } from './Avatar';
2
+ export type { AvatarProps } from './types';
@@ -0,0 +1,7 @@
1
+ export interface AvatarProps {
2
+ src?: string;
3
+ alt?: string;
4
+ size?: 'small' | 'medium' | 'large';
5
+ fallbackText?: string;
6
+ className?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import '../../../styles/variables.css';
3
+ import type { ButtonProps } from './types';
4
+ export declare const Button: React.FC<ButtonProps>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export type { ButtonProps } from './types';
@@ -0,0 +1,6 @@
1
+ import type { ButtonHTMLAttributes } from 'react';
2
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ variant?: 'primary' | 'secondary' | 'ghost';
4
+ size?: 'small' | 'medium' | 'large';
5
+ className?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ContextModalProps } from './types';
3
+ import '../../../styles/variables.css';
4
+ export declare const ContextModal: React.FC<ContextModalProps>;
@@ -0,0 +1,2 @@
1
+ export { ContextModal } from './ContextModal';
2
+ export type { ContextModalProps } from './types';
@@ -0,0 +1,8 @@
1
+ import type { Context } from '../../../types';
2
+ export interface ContextModalProps {
3
+ contexts: Context[];
4
+ isOpen: boolean;
5
+ onClose: () => void;
6
+ onRemoveContext?: (contextId: string) => void;
7
+ className?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ContextPanelProps } from './types';
3
+ import '../../../styles/variables.css';
4
+ export declare const ContextPanel: React.FC<ContextPanelProps>;
@@ -0,0 +1,2 @@
1
+ export { ContextPanel } from './ContextPanel';
2
+ export type { ContextPanelProps } from './types';
@@ -0,0 +1,6 @@
1
+ import type { Context } from '../../../types';
2
+ export interface ContextPanelProps {
3
+ contexts: Context[];
4
+ onRemoveContext: (contextId: string) => void;
5
+ className?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { ContextReferenceProps } from './types';
3
+ import '../../../styles/variables.css';
4
+ export declare const ContextReference: React.FC<ContextReferenceProps>;
@@ -0,0 +1,2 @@
1
+ export { ContextReference } from './ContextReference';
2
+ export type { ContextReferenceProps } from './types';
@@ -0,0 +1,5 @@
1
+ import type { Context } from '../../../types';
2
+ export interface ContextReferenceProps {
3
+ contexts: Context[];
4
+ className?: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { MessageProps } from "./types";
3
+ import "../../../styles/variables.css";
4
+ export declare const Message: React.FC<MessageProps>;
@@ -0,0 +1,2 @@
1
+ export { Message } from './Message';
2
+ export type { MessageProps } from './types';
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { MessageInputProps } from "./types";
3
+ import "../../../styles/variables.css";
4
+ export declare const MessageInput: React.FC<MessageInputProps>;
@@ -0,0 +1,2 @@
1
+ export { MessageInput } from './MessageInput';
2
+ export type { MessageInputProps } from './types';
@@ -0,0 +1,6 @@
1
+ export interface MessageInputProps {
2
+ onSend: (text: string) => void;
3
+ placeholder?: string;
4
+ disabled?: boolean;
5
+ className?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ import type { StatusIndicatorProps } from "./types";
3
+ export declare const StatusIndicator: React.FC<StatusIndicatorProps>;
@@ -0,0 +1,2 @@
1
+ export { StatusIndicator } from "./StatusIndicator";
2
+ export type { StatusIndicatorProps } from "./types";
@@ -0,0 +1,6 @@
1
+ export interface StatusIndicatorProps {
2
+ status: string;
3
+ visible: boolean;
4
+ variant?: 'text-and-dots' | 'dots-only';
5
+ className?: string;
6
+ }
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';