@digo-labs/ui 0.1.16 → 0.1.17
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/blocks/chat-thread.d.ts +5 -2
- package/dist/components/attachment.d.ts +11 -0
- package/dist/components/bubble.d.ts +18 -0
- package/dist/components/marker.d.ts +9 -0
- package/dist/components/message-scroller.d.ts +19 -0
- package/dist/components/message.d.ts +15 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5092 -4721
- package/dist/index.js.map +1 -1
- package/dist/styles/attachment.d.ts +121 -0
- package/dist/styles/bubble.d.ts +191 -0
- package/dist/styles/chat-thread.d.ts +24 -64
- package/dist/styles/dropzone.d.ts +10 -10
- package/dist/styles/field.d.ts +5 -5
- package/dist/styles/google-signin-button.d.ts +5 -5
- package/dist/styles/index.d.ts +5 -0
- package/dist/styles/marker.d.ts +104 -0
- package/dist/styles/message-scroller.d.ts +69 -0
- package/dist/styles/message.d.ts +77 -0
- package/dist/styles/number-field.d.ts +5 -5
- package/dist/styles/prompt-input.d.ts +0 -48
- package/dist/styles/properties.d.ts +5 -5
- package/package.json +4 -3
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { TextMessage } from '@digo-labs/common';
|
|
1
|
+
import { FilePayload, TextMessage } from '@digo-labs/common';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
import { ComponentStylesProps } from '../utils/styles';
|
|
4
4
|
export interface ChatThreadMessage {
|
|
5
|
+
id?: string;
|
|
5
6
|
role: 'user' | 'assistant' | 'error';
|
|
6
7
|
content: TextMessage['content'];
|
|
8
|
+
attachments?: FilePayload[];
|
|
7
9
|
stopReason?: string;
|
|
8
10
|
}
|
|
9
11
|
type Properties = RootProperties & ComponentStylesProps<'chatThread'>;
|
|
10
12
|
export declare function ChatThread(properties: Properties): import("react").JSX.Element;
|
|
11
13
|
interface RootProperties extends ComponentProps<'div'> {
|
|
12
14
|
messages: ChatThreadMessage[];
|
|
13
|
-
|
|
15
|
+
isStreaming?: boolean;
|
|
16
|
+
autoScroll?: boolean;
|
|
14
17
|
}
|
|
15
18
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FilePayload } from '@digo-labs/common';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ComponentStylesProps } from '../utils/styles';
|
|
4
|
+
type Properties = RootProperties & ComponentStylesProps<'attachment'>;
|
|
5
|
+
export declare function Attachment(properties: Properties): import("react").JSX.Element;
|
|
6
|
+
interface RootProperties extends ComponentProps<'div'> {
|
|
7
|
+
file: FilePayload;
|
|
8
|
+
preview?: boolean;
|
|
9
|
+
onRemove?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Align, Side, Subset } from '@digo-labs/common';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { ComponentStylesProps } from '../utils/styles';
|
|
5
|
+
type Properties = RootProperties & ComponentStylesProps<'bubble'>;
|
|
6
|
+
export declare function Bubble(properties: Properties): import("react").JSX.Element;
|
|
7
|
+
interface RootProperties extends ComponentProps<'div'> {
|
|
8
|
+
align?: Subset<Align, 'start' | 'end'>;
|
|
9
|
+
}
|
|
10
|
+
export declare function BubbleContent(properties: useRender.ComponentProps<'div'>): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
11
|
+
interface ReactionsProperties extends ComponentProps<'div'> {
|
|
12
|
+
side?: Subset<Side, 'top' | 'bottom'>;
|
|
13
|
+
align?: Subset<Align, 'start' | 'end'>;
|
|
14
|
+
}
|
|
15
|
+
export declare function BubbleReactions(properties: ReactionsProperties): import("react").JSX.Element;
|
|
16
|
+
type GroupProperties = ComponentProps<'div'> & Pick<ComponentStylesProps<'bubble'>, 'classNames'>;
|
|
17
|
+
export declare function BubbleGroup(properties: GroupProperties): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { ComponentStylesProps } from '../utils/styles';
|
|
4
|
+
type Properties = RootProperties & ComponentStylesProps<'marker'>;
|
|
5
|
+
export declare function Marker(properties: Properties): import("react").JSX.Element;
|
|
6
|
+
type RootProperties = useRender.ComponentProps<'div'>;
|
|
7
|
+
export declare function MarkerIcon(properties: ComponentProps<'span'>): import("react").JSX.Element;
|
|
8
|
+
export declare function MarkerContent(properties: ComponentProps<'span'>): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { MessageScroller as MessageScrollerPrimitive } from '@shadcn/react/message-scroller';
|
|
3
|
+
import { ComponentStylesProps } from '../utils/styles';
|
|
4
|
+
export declare const MessageScrollerProvider: ({ autoScroll, children, defaultScrollPosition, scrollEdgeThreshold, scrollPreviousItemPeek, scrollMargin, }: {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
autoScroll?: boolean;
|
|
7
|
+
defaultScrollPosition?: import('@shadcn/react/message-scroller').MessageScrollerDefaultScrollPosition;
|
|
8
|
+
scrollEdgeThreshold?: number;
|
|
9
|
+
scrollPreviousItemPeek?: number;
|
|
10
|
+
scrollMargin?: number;
|
|
11
|
+
}) => import("react").JSX.Element;
|
|
12
|
+
type Properties = RootProperties & ComponentStylesProps<'messageScroller'>;
|
|
13
|
+
export declare function MessageScroller(properties: Properties): import("react").JSX.Element;
|
|
14
|
+
type RootProperties = ComponentProps<typeof MessageScrollerPrimitive.Root>;
|
|
15
|
+
export declare function MessageScrollerViewport(properties: ComponentProps<typeof MessageScrollerPrimitive.Viewport>): import("react").JSX.Element;
|
|
16
|
+
export declare function MessageScrollerContent(properties: ComponentProps<typeof MessageScrollerPrimitive.Content>): import("react").JSX.Element;
|
|
17
|
+
export declare function MessageScrollerItem(properties: ComponentProps<typeof MessageScrollerPrimitive.Item>): import("react").JSX.Element;
|
|
18
|
+
export declare function MessageScrollerButton(properties: ComponentProps<typeof MessageScrollerPrimitive.Button>): import("react").JSX.Element;
|
|
19
|
+
export { useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from '@shadcn/react/message-scroller';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Align, Subset } from '@digo-labs/common';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { ComponentStylesProps } from '../utils/styles';
|
|
4
|
+
type Properties = RootProperties & ComponentStylesProps<'message'>;
|
|
5
|
+
export declare function Message(properties: Properties): import("react").JSX.Element;
|
|
6
|
+
interface RootProperties extends ComponentProps<'div'> {
|
|
7
|
+
align?: Subset<Align, 'start' | 'end'>;
|
|
8
|
+
}
|
|
9
|
+
export declare function MessageAvatar(properties: ComponentProps<'div'>): import("react").JSX.Element;
|
|
10
|
+
export declare function MessageContent(properties: ComponentProps<'div'>): import("react").JSX.Element;
|
|
11
|
+
export declare function MessageHeader(properties: ComponentProps<'div'>): import("react").JSX.Element;
|
|
12
|
+
export declare function MessageFooter(properties: ComponentProps<'div'>): import("react").JSX.Element;
|
|
13
|
+
type GroupProperties = ComponentProps<'div'> & ComponentStylesProps<'message'>;
|
|
14
|
+
export declare function MessageGroup(properties: GroupProperties): import("react").JSX.Element;
|
|
15
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -44,10 +44,12 @@ export * from './blocks/user-info';
|
|
|
44
44
|
export * from './blocks/user-menu';
|
|
45
45
|
export * from './components/accordion';
|
|
46
46
|
export * from './components/alert';
|
|
47
|
+
export * from './components/attachment';
|
|
47
48
|
export * from './components/autocomplete';
|
|
48
49
|
export * from './components/avatar';
|
|
49
50
|
export * from './components/badge';
|
|
50
51
|
export * from './components/breadcrumb';
|
|
52
|
+
export * from './components/bubble';
|
|
51
53
|
export * from './components/button';
|
|
52
54
|
export * from './components/chart';
|
|
53
55
|
export * from './components/checkbox';
|
|
@@ -78,6 +80,9 @@ export * from './components/label';
|
|
|
78
80
|
export * from './components/masonry';
|
|
79
81
|
export * from './components/kbd';
|
|
80
82
|
export * from './components/menu';
|
|
83
|
+
export * from './components/marker';
|
|
84
|
+
export * from './components/message';
|
|
85
|
+
export * from './components/message-scroller';
|
|
81
86
|
export * from './components/navigation-menu';
|
|
82
87
|
export * from './components/number-field';
|
|
83
88
|
export * from './components/pagination';
|