@bienui/core 1.0.7 → 1.0.9
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/bien-ui.cjs.js +28 -28
- package/dist/bien-ui.cjs.js.map +1 -1
- package/dist/bien-ui.css +1 -1
- package/dist/bien-ui.esm.js +10273 -9778
- package/dist/bien-ui.esm.js.map +1 -1
- package/dist/components/Feedback/AIChatbox.d.ts +83 -0
- package/dist/components/Feedback/index.d.ts +1 -0
- package/dist/components/Layout/SplitPanel.d.ts +20 -0
- package/dist/components/Layout/index.d.ts +1 -0
- package/dist/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export type AIChatRole = 'assistant' | 'user' | 'system';
|
|
2
|
+
export type AIChatboxStatus = 'idle' | 'composing' | 'sending' | 'thinking' | 'streaming' | 'error' | 'disabled';
|
|
3
|
+
export type AIChatMessageStatus = 'pending' | 'complete' | 'error';
|
|
4
|
+
export type AIChatToolStatus = 'queued' | 'running' | 'success' | 'error';
|
|
5
|
+
export type AIChatActionVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'accent' | 'purple' | 'blue' | 'teal';
|
|
6
|
+
export interface AIChatCitation {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
href?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface AIChatAction {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
variant?: AIChatActionVariant;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AIChatToolCall {
|
|
19
|
+
id: string;
|
|
20
|
+
toolName: string;
|
|
21
|
+
status: AIChatToolStatus;
|
|
22
|
+
summary?: string;
|
|
23
|
+
input?: React.ReactNode;
|
|
24
|
+
output?: React.ReactNode;
|
|
25
|
+
durationMs?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface AIChatArtifactField {
|
|
28
|
+
label: string;
|
|
29
|
+
value: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export interface AIChatArtifactCard {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
description?: string;
|
|
35
|
+
fields?: AIChatArtifactField[];
|
|
36
|
+
footer?: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
export interface AIChatMessage {
|
|
39
|
+
id: string;
|
|
40
|
+
role: AIChatRole;
|
|
41
|
+
content: React.ReactNode;
|
|
42
|
+
timestamp?: string;
|
|
43
|
+
status?: AIChatMessageStatus;
|
|
44
|
+
avatarSlot?: React.ReactNode;
|
|
45
|
+
citations?: AIChatCitation[];
|
|
46
|
+
actions?: AIChatAction[];
|
|
47
|
+
toolCalls?: AIChatToolCall[];
|
|
48
|
+
artifacts?: AIChatArtifactCard[];
|
|
49
|
+
}
|
|
50
|
+
export interface AIChatboxProps {
|
|
51
|
+
messages: AIChatMessage[];
|
|
52
|
+
inputValue: string;
|
|
53
|
+
onInputChange: (value: string) => void;
|
|
54
|
+
onSend?: (value: string) => void;
|
|
55
|
+
onRetry?: (message?: AIChatMessage) => void;
|
|
56
|
+
status?: AIChatboxStatus;
|
|
57
|
+
title?: string;
|
|
58
|
+
subtitle?: string;
|
|
59
|
+
placeholder?: string;
|
|
60
|
+
suggestions?: string[];
|
|
61
|
+
onSuggestionClick?: (suggestion: string) => void;
|
|
62
|
+
emptyState?: React.ReactNode;
|
|
63
|
+
assistantName?: string;
|
|
64
|
+
assistantAvatar?: React.ReactNode;
|
|
65
|
+
userAvatar?: React.ReactNode;
|
|
66
|
+
userName?: string;
|
|
67
|
+
agentModeLabel?: string;
|
|
68
|
+
capabilities?: string[];
|
|
69
|
+
errorMessage?: string;
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
readOnly?: boolean;
|
|
72
|
+
onStop?: () => void;
|
|
73
|
+
onClearConversation?: () => void;
|
|
74
|
+
onMessageAction?: (action: AIChatAction, message: AIChatMessage) => void;
|
|
75
|
+
onCitationClick?: (citation: AIChatCitation, message: AIChatMessage) => void;
|
|
76
|
+
autoScroll?: boolean;
|
|
77
|
+
showHeader?: boolean;
|
|
78
|
+
showComposer?: boolean;
|
|
79
|
+
maxHeight?: string | number;
|
|
80
|
+
className?: string;
|
|
81
|
+
style?: React.CSSProperties;
|
|
82
|
+
}
|
|
83
|
+
export declare function AIChatbox({ messages, inputValue, onInputChange, onSend, onRetry, status, title, subtitle, placeholder, suggestions, onSuggestionClick, emptyState, assistantName, assistantAvatar, userAvatar, userName, agentModeLabel, capabilities, errorMessage, disabled, readOnly, onStop, onClearConversation, onMessageAction, onCitationClick, autoScroll, showHeader, showComposer, maxHeight, className, style, }: AIChatboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@ export { Loading } from './Loading';
|
|
|
2
2
|
export { EmptyState } from './EmptyState';
|
|
3
3
|
export { Banner } from './Banner';
|
|
4
4
|
export { Callout } from './Callout';
|
|
5
|
+
export { AIChatbox } from './AIChatbox';
|
|
5
6
|
export { Modal } from './Modal';
|
|
6
7
|
export { Accordion } from './Accordion';
|
|
7
8
|
export { Tabs } from './Tabs';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SplitPanelProps {
|
|
3
|
+
/** Child panels to render - should be exactly 2 elements */
|
|
4
|
+
children: [ReactNode, ReactNode];
|
|
5
|
+
/** Split direction */
|
|
6
|
+
direction?: 'horizontal' | 'vertical';
|
|
7
|
+
/** Initial split position as percentage (0-100) */
|
|
8
|
+
initialSize?: number;
|
|
9
|
+
/** Minimum size for first panel in pixels */
|
|
10
|
+
minSize?: number;
|
|
11
|
+
/** Maximum size for first panel in pixels */
|
|
12
|
+
maxSize?: number;
|
|
13
|
+
/** Whether the split is resizable */
|
|
14
|
+
resizable?: boolean;
|
|
15
|
+
/** Additional CSS classes */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Callback when split size changes */
|
|
18
|
+
onResize?: (size: number) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function SplitPanel({ children, direction, initialSize, minSize, maxSize, resizable, className, onResize, }: SplitPanelProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import './styles/index.css';
|
|
|
2
2
|
export { BienProvider } from './components/Providers';
|
|
3
3
|
export { TooltipProvider } from './components/Providers';
|
|
4
4
|
export { ToastProvider, useToast } from './components/Providers';
|
|
5
|
-
export { Container, Grid, VStack, HStack, Section, Spacer, Divider, } from './components/Layout';
|
|
5
|
+
export { Container, Grid, VStack, HStack, Section, Spacer, Divider, SplitPanel, } from './components/Layout';
|
|
6
6
|
export { Input, Textarea, MarkdownTextarea, Select, MultiSelect, Checkbox, Radio, RadioGroup, Switch, Slider, DatePicker, } from './components/Forms';
|
|
7
7
|
export { Link, Breadcrumb, Header, Sidenav } from './components/Navigation';
|
|
8
|
-
export { Text, Card, Badge, Avatar, AvatarGroup, ProfileAvatar, Timeline, Meter, CircularMeter, Table, List, ListItem, DescriptionList, DescriptionTerm, DescriptionDetails, ColorSwatch, } from './components/Display';
|
|
9
|
-
export { Loading, EmptyState, Banner, Callout, Modal, Accordion, Tabs, Stepper, } from './components/Feedback';
|
|
8
|
+
export { Text, Card, Badge, Tags, Avatar, AvatarGroup, ProfileAvatar, Timeline, Meter, CircularMeter, Table, List, ListItem, DescriptionList, DescriptionTerm, DescriptionDetails, ColorSwatch, Logo, } from './components/Display';
|
|
9
|
+
export { Loading, EmptyState, Banner, Callout, AIChatbox, Modal, Accordion, Tabs, Stepper, } from './components/Feedback';
|
|
10
10
|
export { Button, Tooltip, Menu, MenuItem, MenuDivider, MenuGroup, Hotspot, DraggableList, DraggableListProvider, FileDrop, Panel, Drawer, } from './components/Interactive';
|
|
11
11
|
export { ThinkingText } from './components/Utils';
|
|
12
12
|
export * from './components/Icons';
|
package/package.json
CHANGED