@yourgpt/copilot-sdk 1.4.33 → 1.4.35
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 +2 -0
- package/dist/styles.css +129 -42
- package/dist/ui/index.cjs +213 -452
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +15 -7
- package/dist/ui/index.d.ts +15 -7
- package/dist/ui/index.js +213 -452
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -8,12 +8,12 @@ import { k as Thread, T as ToolDefinition, _ as ThreadStorageAdapter, X as Async
|
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
10
10
|
interface LoaderProps {
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
12
12
|
size?: "sm" | "md" | "lg";
|
|
13
13
|
text?: string;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
|
-
declare function Loader({ variant, size, text, className
|
|
16
|
+
declare function Loader({ variant, size, text, className }: LoaderProps): react_jsx_runtime.JSX.Element;
|
|
17
17
|
|
|
18
18
|
type MarkdownProps = {
|
|
19
19
|
children: string;
|
|
@@ -90,16 +90,20 @@ type MessageProps = {
|
|
|
90
90
|
} & React.HTMLProps<HTMLDivElement>;
|
|
91
91
|
declare const Message: ({ children, className, ...props }: MessageProps) => react_jsx_runtime.JSX.Element;
|
|
92
92
|
type MessageAvatarProps = {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
/** Image source URL */
|
|
94
|
+
src?: string;
|
|
95
|
+
/** Alt text for the image */
|
|
96
|
+
alt?: string;
|
|
95
97
|
/** Text fallback (e.g. "AI") */
|
|
96
98
|
fallback?: string;
|
|
97
99
|
/** Icon/component fallback (takes precedence over text fallback when src is empty) */
|
|
98
100
|
fallbackIcon?: React.ReactNode;
|
|
101
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
102
|
+
children?: React.ReactNode;
|
|
99
103
|
delayMs?: number;
|
|
100
104
|
className?: string;
|
|
101
105
|
};
|
|
102
|
-
declare const MessageAvatar: ({ src, alt, fallback, fallbackIcon, delayMs, className, }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare const MessageAvatar: ({ src, alt, fallback, fallbackIcon, children, delayMs, className, }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
103
107
|
type MessageContentProps = {
|
|
104
108
|
children: React.ReactNode;
|
|
105
109
|
markdown?: boolean;
|
|
@@ -1142,14 +1146,18 @@ type ChatProps = {
|
|
|
1142
1146
|
userAvatar?: {
|
|
1143
1147
|
src?: string;
|
|
1144
1148
|
fallback?: string;
|
|
1149
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
1150
|
+
component?: React__default.ReactNode;
|
|
1145
1151
|
};
|
|
1146
1152
|
/** Assistant avatar config */
|
|
1147
1153
|
assistantAvatar?: {
|
|
1148
1154
|
src?: string;
|
|
1149
1155
|
fallback?: string;
|
|
1156
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
1157
|
+
component?: React__default.ReactNode;
|
|
1150
1158
|
};
|
|
1151
1159
|
/** Loader variant for typing indicator */
|
|
1152
|
-
loaderVariant?: "
|
|
1160
|
+
loaderVariant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
1153
1161
|
/** Font size for messages: 'sm' (14px), 'base' (16px), 'lg' (18px) */
|
|
1154
1162
|
fontSize?: "sm" | "base" | "lg";
|
|
1155
1163
|
/** Maximum file size in bytes (default: 5MB) */
|
|
@@ -1359,7 +1367,7 @@ declare function BackButton({ className, children, disabled, "aria-label": ariaL
|
|
|
1359
1367
|
*/
|
|
1360
1368
|
type ThreadPickerCompoundProps = Omit<ThreadPickerProps, "value" | "threads" | "onSelect" | "onNewThread" | "onDeleteThread" | "disabled">;
|
|
1361
1369
|
declare function ThreadPickerCompound(props: ThreadPickerCompoundProps): react_jsx_runtime.JSX.Element | null;
|
|
1362
|
-
declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar, assistantAvatar, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, renderMessage, renderInput, renderHeader, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
1370
|
+
declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, renderMessage, renderInput, renderHeader, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
1363
1371
|
/**
|
|
1364
1372
|
* Chat component with compound component pattern.
|
|
1365
1373
|
*
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -8,12 +8,12 @@ import { k as Thread, T as ToolDefinition, _ as ThreadStorageAdapter, X as Async
|
|
|
8
8
|
import { ClassValue } from 'clsx';
|
|
9
9
|
|
|
10
10
|
interface LoaderProps {
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
12
12
|
size?: "sm" | "md" | "lg";
|
|
13
13
|
text?: string;
|
|
14
14
|
className?: string;
|
|
15
15
|
}
|
|
16
|
-
declare function Loader({ variant, size, text, className
|
|
16
|
+
declare function Loader({ variant, size, text, className }: LoaderProps): react_jsx_runtime.JSX.Element;
|
|
17
17
|
|
|
18
18
|
type MarkdownProps = {
|
|
19
19
|
children: string;
|
|
@@ -90,16 +90,20 @@ type MessageProps = {
|
|
|
90
90
|
} & React.HTMLProps<HTMLDivElement>;
|
|
91
91
|
declare const Message: ({ children, className, ...props }: MessageProps) => react_jsx_runtime.JSX.Element;
|
|
92
92
|
type MessageAvatarProps = {
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
/** Image source URL */
|
|
94
|
+
src?: string;
|
|
95
|
+
/** Alt text for the image */
|
|
96
|
+
alt?: string;
|
|
95
97
|
/** Text fallback (e.g. "AI") */
|
|
96
98
|
fallback?: string;
|
|
97
99
|
/** Icon/component fallback (takes precedence over text fallback when src is empty) */
|
|
98
100
|
fallbackIcon?: React.ReactNode;
|
|
101
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
102
|
+
children?: React.ReactNode;
|
|
99
103
|
delayMs?: number;
|
|
100
104
|
className?: string;
|
|
101
105
|
};
|
|
102
|
-
declare const MessageAvatar: ({ src, alt, fallback, fallbackIcon, delayMs, className, }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
106
|
+
declare const MessageAvatar: ({ src, alt, fallback, fallbackIcon, children, delayMs, className, }: MessageAvatarProps) => react_jsx_runtime.JSX.Element;
|
|
103
107
|
type MessageContentProps = {
|
|
104
108
|
children: React.ReactNode;
|
|
105
109
|
markdown?: boolean;
|
|
@@ -1142,14 +1146,18 @@ type ChatProps = {
|
|
|
1142
1146
|
userAvatar?: {
|
|
1143
1147
|
src?: string;
|
|
1144
1148
|
fallback?: string;
|
|
1149
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
1150
|
+
component?: React__default.ReactNode;
|
|
1145
1151
|
};
|
|
1146
1152
|
/** Assistant avatar config */
|
|
1147
1153
|
assistantAvatar?: {
|
|
1148
1154
|
src?: string;
|
|
1149
1155
|
fallback?: string;
|
|
1156
|
+
/** Custom avatar component - when provided, replaces the default avatar */
|
|
1157
|
+
component?: React__default.ReactNode;
|
|
1150
1158
|
};
|
|
1151
1159
|
/** Loader variant for typing indicator */
|
|
1152
|
-
loaderVariant?: "
|
|
1160
|
+
loaderVariant?: "dots" | "typing" | "wave" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
1153
1161
|
/** Font size for messages: 'sm' (14px), 'base' (16px), 'lg' (18px) */
|
|
1154
1162
|
fontSize?: "sm" | "base" | "lg";
|
|
1155
1163
|
/** Maximum file size in bytes (default: 5MB) */
|
|
@@ -1359,7 +1367,7 @@ declare function BackButton({ className, children, disabled, "aria-label": ariaL
|
|
|
1359
1367
|
*/
|
|
1360
1368
|
type ThreadPickerCompoundProps = Omit<ThreadPickerProps, "value" | "threads" | "onSelect" | "onNewThread" | "onDeleteThread" | "disabled">;
|
|
1361
1369
|
declare function ThreadPickerCompound(props: ThreadPickerCompoundProps): react_jsx_runtime.JSX.Element | null;
|
|
1362
|
-
declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar, assistantAvatar, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, renderMessage, renderInput, renderHeader, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
1370
|
+
declare function ChatComponent({ messages, onSendMessage, onStop, isLoading, children, placeholder, welcomeMessage, title, showHeader, header, threadPicker, logo, name, onClose, showPoweredBy, showUserAvatar, userAvatar: userAvatarProp, assistantAvatar: assistantAvatarProp, loaderVariant, fontSize, maxFileSize, allowedFileTypes, attachmentsEnabled, attachmentsDisabledTooltip, processAttachment: processAttachmentProp, suggestions, onSuggestionClick, welcome, recentThreads, onSelectThread, onDeleteThread, onViewMoreThreads, isProcessing, registeredTools, toolRenderers, onApproveToolExecution, onRejectToolExecution, showFollowUps, followUpClassName, followUpButtonClassName, renderMessage, renderInput, renderHeader, className, classNames, onNewChat, threads, currentThreadId, onSwitchThread, isThreadBusy, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
1363
1371
|
/**
|
|
1364
1372
|
* Chat component with compound component pattern.
|
|
1365
1373
|
*
|