@assistant-ui/react 0.0.14 → 0.0.16

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 CHANGED
@@ -66,7 +66,7 @@ declare const ThreadSuggestion: react.ForwardRefExoticComponent<Pick<Omit<react.
66
66
  autoSend?: boolean;
67
67
  } & react.RefAttributes<HTMLButtonElement>>;
68
68
 
69
- declare namespace index$4 {
69
+ declare namespace index$5 {
70
70
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadScrollToBottom as ScrollToBottom, ThreadSuggestion as Suggestion, ThreadViewport as Viewport };
71
71
  }
72
72
 
@@ -98,7 +98,7 @@ type ComposerIfFilters = {
98
98
  type ComposerIfProps = PropsWithChildren<RequireAtLeastOne<ComposerIfFilters>>;
99
99
  declare const ComposerIf: FC<ComposerIfProps>;
100
100
 
101
- declare namespace index$3 {
101
+ declare namespace index$4 {
102
102
  export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
103
103
  }
104
104
 
@@ -199,8 +199,14 @@ type MessageContentProps = {
199
199
  };
200
200
  declare const MessageContent: FC<MessageContentProps>;
201
201
 
202
- declare namespace index$2 {
203
- export { MessageContent as Content, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
202
+ declare const MessageLoading: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
203
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
204
+ } & {
205
+ asChild?: boolean;
206
+ }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
207
+
208
+ declare namespace index$3 {
209
+ export { MessageContent as Content, MessageIf as If, MessageLoading as Loading, MessageProvider as Provider, MessageRoot as Root };
204
210
  }
205
211
 
206
212
  declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -227,7 +233,7 @@ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.
227
233
  hideWhenSingleBranch?: boolean;
228
234
  } & react.RefAttributes<HTMLDivElement>>;
229
235
 
230
- declare namespace index$1 {
236
+ declare namespace index$2 {
231
237
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
232
238
  }
233
239
 
@@ -262,10 +268,22 @@ declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.Det
262
268
  asChild?: boolean;
263
269
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
264
270
 
265
- declare namespace index {
271
+ declare namespace index$1 {
266
272
  export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
267
273
  }
268
274
 
275
+ type ContentPartProviderProps = PropsWithChildren<{
276
+ part: ThreadMessage["content"][number];
277
+ isLoading: boolean;
278
+ }>;
279
+ declare const ContentPartProvider: FC<ContentPartProviderProps>;
280
+
281
+ declare const ContentPartLoadingIndicator: FC;
282
+
283
+ declare namespace index {
284
+ export { ContentPartLoadingIndicator as LoadingIndicator, ContentPartProvider as Provider };
285
+ }
286
+
269
287
  type VercelAIAssistantProviderProps = PropsWithChildren<{
270
288
  chat: UseChatHelpers;
271
289
  } | {
@@ -297,6 +315,8 @@ type MessageState = {
297
315
  parentId: string | null;
298
316
  branches: string[];
299
317
  isLast: boolean;
318
+ loadingIndicator: ReactNode | null;
319
+ setLoadingIndicator: (value: ReactNode | null) => void;
300
320
  isCopied: boolean;
301
321
  setIsCopied: (value: boolean) => void;
302
322
  isHovering: boolean;
@@ -321,4 +341,4 @@ declare const useGoToNextBranch: () => (() => void) | null;
321
341
 
322
342
  declare const useGoToPreviousBranch: () => (() => void) | null;
323
343
 
324
- export { index as ActionBarPrimitive, type AppendContentPart, type AppendMessage, index$1 as BranchPickerPrimitive, index$3 as ComposerPrimitive, type ImageContentPart, index$2 as MessagePrimitive, type VercelRSCMessage as RSCMessage, type TextContentPart, index$4 as ThreadPrimitive, VercelAIAssistantProvider, type VercelAIAssistantProviderProps, VercelRSCAssistantProvider, type VercelRSCAssistantProviderProps, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };
344
+ export { index$1 as ActionBarPrimitive, type AppendContentPart, type AppendMessage, index$2 as BranchPickerPrimitive, index$4 as ComposerPrimitive, index as ContentPartPrimitive, type ImageContentPart, index$3 as MessagePrimitive, type VercelRSCMessage as RSCMessage, type TextContentPart, index$5 as ThreadPrimitive, VercelAIAssistantProvider, type VercelAIAssistantProviderProps, VercelRSCAssistantProvider, type VercelRSCAssistantProviderProps, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };
package/dist/index.d.ts CHANGED
@@ -66,7 +66,7 @@ declare const ThreadSuggestion: react.ForwardRefExoticComponent<Pick<Omit<react.
66
66
  autoSend?: boolean;
67
67
  } & react.RefAttributes<HTMLButtonElement>>;
68
68
 
69
- declare namespace index$4 {
69
+ declare namespace index$5 {
70
70
  export { ThreadEmpty as Empty, ThreadIf as If, ThreadMessages as Messages, ThreadRoot as Root, ThreadScrollToBottom as ScrollToBottom, ThreadSuggestion as Suggestion, ThreadViewport as Viewport };
71
71
  }
72
72
 
@@ -98,7 +98,7 @@ type ComposerIfFilters = {
98
98
  type ComposerIfProps = PropsWithChildren<RequireAtLeastOne<ComposerIfFilters>>;
99
99
  declare const ComposerIf: FC<ComposerIfProps>;
100
100
 
101
- declare namespace index$3 {
101
+ declare namespace index$4 {
102
102
  export { ComposerCancel as Cancel, ComposerIf as If, ComposerInput as Input, ComposerRoot as Root, ComposerSend as Send };
103
103
  }
104
104
 
@@ -199,8 +199,14 @@ type MessageContentProps = {
199
199
  };
200
200
  declare const MessageContent: FC<MessageContentProps>;
201
201
 
202
- declare namespace index$2 {
203
- export { MessageContent as Content, MessageIf as If, MessageProvider as Provider, MessageRoot as Root };
202
+ declare const MessageLoading: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
203
+ ref?: ((instance: HTMLDivElement | null) => void) | react.RefObject<HTMLDivElement> | null | undefined;
204
+ } & {
205
+ asChild?: boolean;
206
+ }, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>>;
207
+
208
+ declare namespace index$3 {
209
+ export { MessageContent as Content, MessageIf as If, MessageLoading as Loading, MessageProvider as Provider, MessageRoot as Root };
204
210
  }
205
211
 
206
212
  declare const BranchPickerNext: react.ForwardRefExoticComponent<Pick<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
@@ -227,7 +233,7 @@ declare const BranchPickerRoot: react.ForwardRefExoticComponent<Pick<Omit<react.
227
233
  hideWhenSingleBranch?: boolean;
228
234
  } & react.RefAttributes<HTMLDivElement>>;
229
235
 
230
- declare namespace index$1 {
236
+ declare namespace index$2 {
231
237
  export { BranchPickerCount as Count, BranchPickerNext as Next, BranchPickerNumber as Number, BranchPickerPrevious as Previous, BranchPickerRoot as Root };
232
238
  }
233
239
 
@@ -262,10 +268,22 @@ declare const ActionBarEdit: react.ForwardRefExoticComponent<Pick<Omit<react.Det
262
268
  asChild?: boolean;
263
269
  }, "key" | "asChild" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & react.RefAttributes<HTMLButtonElement>>;
264
270
 
265
- declare namespace index {
271
+ declare namespace index$1 {
266
272
  export { ActionBarCopy as Copy, ActionBarEdit as Edit, ActionBarReload as Reload, ActionBarRoot as Root };
267
273
  }
268
274
 
275
+ type ContentPartProviderProps = PropsWithChildren<{
276
+ part: ThreadMessage["content"][number];
277
+ isLoading: boolean;
278
+ }>;
279
+ declare const ContentPartProvider: FC<ContentPartProviderProps>;
280
+
281
+ declare const ContentPartLoadingIndicator: FC;
282
+
283
+ declare namespace index {
284
+ export { ContentPartLoadingIndicator as LoadingIndicator, ContentPartProvider as Provider };
285
+ }
286
+
269
287
  type VercelAIAssistantProviderProps = PropsWithChildren<{
270
288
  chat: UseChatHelpers;
271
289
  } | {
@@ -297,6 +315,8 @@ type MessageState = {
297
315
  parentId: string | null;
298
316
  branches: string[];
299
317
  isLast: boolean;
318
+ loadingIndicator: ReactNode | null;
319
+ setLoadingIndicator: (value: ReactNode | null) => void;
300
320
  isCopied: boolean;
301
321
  setIsCopied: (value: boolean) => void;
302
322
  isHovering: boolean;
@@ -321,4 +341,4 @@ declare const useGoToNextBranch: () => (() => void) | null;
321
341
 
322
342
  declare const useGoToPreviousBranch: () => (() => void) | null;
323
343
 
324
- export { index as ActionBarPrimitive, type AppendContentPart, type AppendMessage, index$1 as BranchPickerPrimitive, index$3 as ComposerPrimitive, type ImageContentPart, index$2 as MessagePrimitive, type VercelRSCMessage as RSCMessage, type TextContentPart, index$4 as ThreadPrimitive, VercelAIAssistantProvider, type VercelAIAssistantProviderProps, VercelRSCAssistantProvider, type VercelRSCAssistantProviderProps, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };
344
+ export { index$1 as ActionBarPrimitive, type AppendContentPart, type AppendMessage, index$2 as BranchPickerPrimitive, index$4 as ComposerPrimitive, index as ContentPartPrimitive, type ImageContentPart, index$3 as MessagePrimitive, type VercelRSCMessage as RSCMessage, type TextContentPart, index$5 as ThreadPrimitive, VercelAIAssistantProvider, type VercelAIAssistantProviderProps, VercelRSCAssistantProvider, type VercelRSCAssistantProviderProps, useMessageContext as unstable_useMessageContext, useBeginMessageEdit, useCopyMessage, useGoToNextBranch, useGoToPreviousBranch, useReloadMessage };