@assistant-ui/react 0.0.1
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/index.d.mts +212 -0
- package/dist/index.d.ts +212 -0
- package/dist/index.js +874 -0
- package/dist/index.mjs +852 -0
- package/package.json +62 -0
package/dist/index.d.mts
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
import { UseChatHelpers } from 'ai/react';
|
2
|
+
import * as react from 'react';
|
3
|
+
import { FC, PropsWithChildren } from 'react';
|
4
|
+
import { Message } from 'ai';
|
5
|
+
|
6
|
+
type ThreadProviderProps = {
|
7
|
+
chat: UseChatHelpers;
|
8
|
+
children: React.ReactNode;
|
9
|
+
};
|
10
|
+
declare const ThreadProvider: FC<ThreadProviderProps>;
|
11
|
+
|
12
|
+
declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
14
|
+
} & {
|
15
|
+
asChild?: boolean;
|
16
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
|
18
|
+
type ThreadEmptyProps = {
|
19
|
+
children: React.ReactNode;
|
20
|
+
};
|
21
|
+
declare const ThreadEmpty: FC<ThreadEmptyProps>;
|
22
|
+
|
23
|
+
type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
24
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
25
|
+
}[Keys];
|
26
|
+
|
27
|
+
type ThreadIfFilters = {
|
28
|
+
empty: boolean | undefined;
|
29
|
+
busy: boolean | undefined;
|
30
|
+
};
|
31
|
+
type ThreadIfProps = PropsWithChildren<RequireAtLeastOne<ThreadIfFilters>>;
|
32
|
+
declare const ThreadIf: FC<ThreadIfProps>;
|
33
|
+
|
34
|
+
declare const ThreadViewport: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
35
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
36
|
+
} & {
|
37
|
+
asChild?: boolean;
|
38
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
39
|
+
|
40
|
+
type ThreadMessagesProps = {
|
41
|
+
components: {
|
42
|
+
Message: React.ComponentType<{}>;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
declare const ThreadMessages: FC<ThreadMessagesProps>;
|
46
|
+
|
47
|
+
declare namespace index$5 {
|
48
|
+
export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadProvider as Provider, ThreadRoot as Root, ThreadViewport as Viewport };
|
49
|
+
}
|
50
|
+
|
51
|
+
declare const ComposerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
|
52
|
+
ref?: ((instance: HTMLFormElement | null) => void) | react.RefObject<HTMLFormElement> | null | undefined;
|
53
|
+
} & {
|
54
|
+
asChild?: boolean;
|
55
|
+
}, "key" | "asChild" | keyof react.FormHTMLAttributes<HTMLFormElement>> & react.RefAttributes<HTMLFormElement>>;
|
56
|
+
|
57
|
+
declare const ComposerInput: react.ForwardRefExoticComponent<Pick<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "key" | keyof react.TextareaHTMLAttributes<HTMLTextAreaElement>> & {
|
58
|
+
asChild?: boolean;
|
59
|
+
} & react.RefAttributes<HTMLTextAreaElement>>;
|
60
|
+
|
61
|
+
declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
62
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
63
|
+
} & {
|
64
|
+
asChild?: boolean;
|
65
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
66
|
+
|
67
|
+
declare const ComposerStop: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
68
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
69
|
+
} & {
|
70
|
+
asChild?: boolean;
|
71
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
72
|
+
|
73
|
+
declare namespace index$4 {
|
74
|
+
export { ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send, ComposerStop as Stop };
|
75
|
+
}
|
76
|
+
|
77
|
+
type MessageProviderProps = {
|
78
|
+
children?: React.ReactNode;
|
79
|
+
message: Message;
|
80
|
+
};
|
81
|
+
declare const MessageProvider: FC<MessageProviderProps>;
|
82
|
+
|
83
|
+
declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
84
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
85
|
+
} & {
|
86
|
+
asChild?: boolean;
|
87
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
88
|
+
|
89
|
+
type MessageIfFilters = {
|
90
|
+
user: boolean | undefined;
|
91
|
+
assistant: boolean | undefined;
|
92
|
+
editing: boolean | undefined;
|
93
|
+
hasBranches: boolean | undefined;
|
94
|
+
copied: boolean | undefined;
|
95
|
+
unstable_hoveringOrLast: boolean | undefined;
|
96
|
+
};
|
97
|
+
type MessageIfProps = RequireAtLeastOne<MessageIfFilters> & {
|
98
|
+
children: React.ReactNode;
|
99
|
+
};
|
100
|
+
declare const MessageIf: FC<MessageIfProps>;
|
101
|
+
|
102
|
+
declare const MessageContent: FC;
|
103
|
+
|
104
|
+
declare const MessageEditableContent: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
|
105
|
+
|
106
|
+
declare namespace index$3 {
|
107
|
+
export { MessageContent as Content, MessageEditableContent as EditableContent, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
|
108
|
+
}
|
109
|
+
|
110
|
+
declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
111
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
112
|
+
} & {
|
113
|
+
asChild?: boolean;
|
114
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
115
|
+
|
116
|
+
declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
117
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
118
|
+
} & {
|
119
|
+
asChild?: boolean;
|
120
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
121
|
+
|
122
|
+
declare const BranchPickerCount: FC;
|
123
|
+
|
124
|
+
declare const BranchPickerNumber: FC;
|
125
|
+
|
126
|
+
declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
127
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
128
|
+
} & {
|
129
|
+
asChild?: boolean;
|
130
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
131
|
+
|
132
|
+
declare namespace index$2 {
|
133
|
+
export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
|
134
|
+
}
|
135
|
+
|
136
|
+
declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
137
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
138
|
+
} & {
|
139
|
+
asChild?: boolean;
|
140
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
141
|
+
|
142
|
+
type ActionBarCopyProps = {
|
143
|
+
copiedDuration?: number;
|
144
|
+
};
|
145
|
+
declare const ActionBarCopy: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
146
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
147
|
+
} & {
|
148
|
+
asChild?: boolean;
|
149
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
|
150
|
+
|
151
|
+
declare const ActionBarReload: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
152
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
153
|
+
} & {
|
154
|
+
asChild?: boolean;
|
155
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
156
|
+
|
157
|
+
declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
158
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
159
|
+
} & {
|
160
|
+
asChild?: boolean;
|
161
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
162
|
+
|
163
|
+
declare namespace index$1 {
|
164
|
+
export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
|
165
|
+
}
|
166
|
+
|
167
|
+
declare const EditBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
168
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
169
|
+
} & {
|
170
|
+
asChild?: boolean;
|
171
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
172
|
+
|
173
|
+
declare const EditBarSave: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
174
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
175
|
+
} & {
|
176
|
+
asChild?: boolean;
|
177
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
178
|
+
|
179
|
+
declare const EditBarCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
180
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
181
|
+
} & {
|
182
|
+
asChild?: boolean;
|
183
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
184
|
+
|
185
|
+
declare namespace index {
|
186
|
+
export { EditBarCancel as Cancel, EditBarRoot as Root, EditBarSave as Save };
|
187
|
+
}
|
188
|
+
|
189
|
+
type BranchState = {
|
190
|
+
branchId: number;
|
191
|
+
branchCount: number;
|
192
|
+
};
|
193
|
+
|
194
|
+
type MessageEditState = {
|
195
|
+
isEditing: false;
|
196
|
+
} | {
|
197
|
+
isEditing: true;
|
198
|
+
value: string;
|
199
|
+
};
|
200
|
+
type MessageStore = {
|
201
|
+
message: Message;
|
202
|
+
editState: MessageEditState;
|
203
|
+
setEditState: (value: MessageEditState) => void;
|
204
|
+
branchState: BranchState;
|
205
|
+
isCopied: boolean;
|
206
|
+
setIsCopied: (value: boolean) => void;
|
207
|
+
isHovering: boolean;
|
208
|
+
setIsHovering: (value: boolean) => void;
|
209
|
+
};
|
210
|
+
declare const useMessageContext: <Selection>(consumerName: string, selector: (s: MessageStore) => Selection) => Selection;
|
211
|
+
|
212
|
+
export { index$1 as ActionBar, index$2 as BranchPicker, index$4 as Composer, index as EditBar, index$3 as Message, index$5 as Thread, useMessageContext as unstable_useMessageContext };
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,212 @@
|
|
1
|
+
import { UseChatHelpers } from 'ai/react';
|
2
|
+
import * as react from 'react';
|
3
|
+
import { FC, PropsWithChildren } from 'react';
|
4
|
+
import { Message } from 'ai';
|
5
|
+
|
6
|
+
type ThreadProviderProps = {
|
7
|
+
chat: UseChatHelpers;
|
8
|
+
children: React.ReactNode;
|
9
|
+
};
|
10
|
+
declare const ThreadProvider: FC<ThreadProviderProps>;
|
11
|
+
|
12
|
+
declare const ThreadRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
14
|
+
} & {
|
15
|
+
asChild?: boolean;
|
16
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
|
18
|
+
type ThreadEmptyProps = {
|
19
|
+
children: React.ReactNode;
|
20
|
+
};
|
21
|
+
declare const ThreadEmpty: FC<ThreadEmptyProps>;
|
22
|
+
|
23
|
+
type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
24
|
+
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
25
|
+
}[Keys];
|
26
|
+
|
27
|
+
type ThreadIfFilters = {
|
28
|
+
empty: boolean | undefined;
|
29
|
+
busy: boolean | undefined;
|
30
|
+
};
|
31
|
+
type ThreadIfProps = PropsWithChildren<RequireAtLeastOne<ThreadIfFilters>>;
|
32
|
+
declare const ThreadIf: FC<ThreadIfProps>;
|
33
|
+
|
34
|
+
declare const ThreadViewport: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
35
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
36
|
+
} & {
|
37
|
+
asChild?: boolean;
|
38
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
39
|
+
|
40
|
+
type ThreadMessagesProps = {
|
41
|
+
components: {
|
42
|
+
Message: React.ComponentType<{}>;
|
43
|
+
};
|
44
|
+
};
|
45
|
+
declare const ThreadMessages: FC<ThreadMessagesProps>;
|
46
|
+
|
47
|
+
declare namespace index$5 {
|
48
|
+
export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadProvider as Provider, ThreadRoot as Root, ThreadViewport as Viewport };
|
49
|
+
}
|
50
|
+
|
51
|
+
declare const ComposerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "ref"> & {
|
52
|
+
ref?: ((instance: HTMLFormElement | null) => void) | react.RefObject<HTMLFormElement> | null | undefined;
|
53
|
+
} & {
|
54
|
+
asChild?: boolean;
|
55
|
+
}, "key" | "asChild" | keyof react.FormHTMLAttributes<HTMLFormElement>> & react.RefAttributes<HTMLFormElement>>;
|
56
|
+
|
57
|
+
declare const ComposerInput: react.ForwardRefExoticComponent<Pick<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "key" | keyof react.TextareaHTMLAttributes<HTMLTextAreaElement>> & {
|
58
|
+
asChild?: boolean;
|
59
|
+
} & react.RefAttributes<HTMLTextAreaElement>>;
|
60
|
+
|
61
|
+
declare const ComposerSend: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
62
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
63
|
+
} & {
|
64
|
+
asChild?: boolean;
|
65
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
66
|
+
|
67
|
+
declare const ComposerStop: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
68
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
69
|
+
} & {
|
70
|
+
asChild?: boolean;
|
71
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
72
|
+
|
73
|
+
declare namespace index$4 {
|
74
|
+
export { ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send, ComposerStop as Stop };
|
75
|
+
}
|
76
|
+
|
77
|
+
type MessageProviderProps = {
|
78
|
+
children?: React.ReactNode;
|
79
|
+
message: Message;
|
80
|
+
};
|
81
|
+
declare const MessageProvider: FC<MessageProviderProps>;
|
82
|
+
|
83
|
+
declare const MessageRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
84
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
85
|
+
} & {
|
86
|
+
asChild?: boolean;
|
87
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
88
|
+
|
89
|
+
type MessageIfFilters = {
|
90
|
+
user: boolean | undefined;
|
91
|
+
assistant: boolean | undefined;
|
92
|
+
editing: boolean | undefined;
|
93
|
+
hasBranches: boolean | undefined;
|
94
|
+
copied: boolean | undefined;
|
95
|
+
unstable_hoveringOrLast: boolean | undefined;
|
96
|
+
};
|
97
|
+
type MessageIfProps = RequireAtLeastOne<MessageIfFilters> & {
|
98
|
+
children: React.ReactNode;
|
99
|
+
};
|
100
|
+
declare const MessageIf: FC<MessageIfProps>;
|
101
|
+
|
102
|
+
declare const MessageContent: FC;
|
103
|
+
|
104
|
+
declare const MessageEditableContent: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & react.RefAttributes<HTMLTextAreaElement>>;
|
105
|
+
|
106
|
+
declare namespace index$3 {
|
107
|
+
export { MessageContent as Content, MessageEditableContent as EditableContent, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
|
108
|
+
}
|
109
|
+
|
110
|
+
declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
111
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
112
|
+
} & {
|
113
|
+
asChild?: boolean;
|
114
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
115
|
+
|
116
|
+
declare const BranchPickerPrevious: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
117
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
118
|
+
} & {
|
119
|
+
asChild?: boolean;
|
120
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
121
|
+
|
122
|
+
declare const BranchPickerCount: FC;
|
123
|
+
|
124
|
+
declare const BranchPickerNumber: FC;
|
125
|
+
|
126
|
+
declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
127
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
128
|
+
} & {
|
129
|
+
asChild?: boolean;
|
130
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
131
|
+
|
132
|
+
declare namespace index$2 {
|
133
|
+
export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
|
134
|
+
}
|
135
|
+
|
136
|
+
declare const ActionBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
137
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
138
|
+
} & {
|
139
|
+
asChild?: boolean;
|
140
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
141
|
+
|
142
|
+
type ActionBarCopyProps = {
|
143
|
+
copiedDuration?: number;
|
144
|
+
};
|
145
|
+
declare const ActionBarCopy: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
146
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
147
|
+
} & {
|
148
|
+
asChild?: boolean;
|
149
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & ActionBarCopyProps & react.RefAttributes<HTMLButtonElement>>;
|
150
|
+
|
151
|
+
declare const ActionBarReload: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
152
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
153
|
+
} & {
|
154
|
+
asChild?: boolean;
|
155
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
156
|
+
|
157
|
+
declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
158
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
159
|
+
} & {
|
160
|
+
asChild?: boolean;
|
161
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
162
|
+
|
163
|
+
declare namespace index$1 {
|
164
|
+
export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
|
165
|
+
}
|
166
|
+
|
167
|
+
declare const EditBarRoot: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
168
|
+
ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
|
169
|
+
} & {
|
170
|
+
asChild?: boolean;
|
171
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
|
172
|
+
|
173
|
+
declare const EditBarSave: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
174
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
175
|
+
} & {
|
176
|
+
asChild?: boolean;
|
177
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
178
|
+
|
179
|
+
declare const EditBarCancel: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
180
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;
|
181
|
+
} & {
|
182
|
+
asChild?: boolean;
|
183
|
+
}, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
|
184
|
+
|
185
|
+
declare namespace index {
|
186
|
+
export { EditBarCancel as Cancel, EditBarRoot as Root, EditBarSave as Save };
|
187
|
+
}
|
188
|
+
|
189
|
+
type BranchState = {
|
190
|
+
branchId: number;
|
191
|
+
branchCount: number;
|
192
|
+
};
|
193
|
+
|
194
|
+
type MessageEditState = {
|
195
|
+
isEditing: false;
|
196
|
+
} | {
|
197
|
+
isEditing: true;
|
198
|
+
value: string;
|
199
|
+
};
|
200
|
+
type MessageStore = {
|
201
|
+
message: Message;
|
202
|
+
editState: MessageEditState;
|
203
|
+
setEditState: (value: MessageEditState) => void;
|
204
|
+
branchState: BranchState;
|
205
|
+
isCopied: boolean;
|
206
|
+
setIsCopied: (value: boolean) => void;
|
207
|
+
isHovering: boolean;
|
208
|
+
setIsHovering: (value: boolean) => void;
|
209
|
+
};
|
210
|
+
declare const useMessageContext: <Selection>(consumerName: string, selector: (s: MessageStore) => Selection) => Selection;
|
211
|
+
|
212
|
+
export { index$1 as ActionBar, index$2 as BranchPicker, index$4 as Composer, index as EditBar, index$3 as Message, index$5 as Thread, useMessageContext as unstable_useMessageContext };
|