@distri/react 0.3.4 → 0.3.5

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.cts CHANGED
@@ -435,18 +435,6 @@ interface AgentSelectProps {
435
435
  }
436
436
  declare const AgentSelect: React__default.FC<AgentSelectProps>;
437
437
 
438
- interface AppSidebarProps {
439
- selectedThreadId: string;
440
- currentPage: 'chat' | 'agents';
441
- onNewChat: () => void;
442
- onThreadSelect: (threadId: string) => void;
443
- onThreadDelete: (threadId: string) => void;
444
- onThreadRename: (threadId: string, newTitle: string) => void;
445
- onLogoClick?: () => void;
446
- onPageChange: (page: 'chat' | 'agents') => void;
447
- }
448
- declare function AppSidebar({ selectedThreadId, currentPage, onNewChat, onThreadSelect, onThreadDelete, onThreadRename, onLogoClick, onPageChange, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
449
-
450
438
  interface AttachedImage {
451
439
  id: string;
452
440
  file: File;
@@ -525,7 +513,11 @@ interface ThemeProviderState {
525
513
  declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
526
514
  declare const useTheme: () => ThemeProviderState;
527
515
 
528
- declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
516
+ interface ThemeToggleProps {
517
+ theme?: 'dark' | 'light';
518
+ onThemeChange?: (theme: 'dark' | 'light') => void;
519
+ }
520
+ declare function ThemeToggle({ theme, onThemeChange }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
529
521
 
530
522
  interface AuthLoadingProps {
531
523
  children?: React__default.ReactNode;
@@ -591,6 +583,7 @@ interface DistriProviderProps {
591
583
  authReady?: boolean;
592
584
  };
593
585
  children: ReactNode;
586
+ /** @deprecated Theme is no longer managed by DistriProvider. Use ThemeProvider at app level instead. */
594
587
  defaultTheme?: 'dark' | 'light' | 'system';
595
588
  }
596
589
  /**
@@ -626,6 +619,7 @@ interface DistriAuthContextValue {
626
619
  theme: 'dark' | 'light';
627
620
  baseUrl: string;
628
621
  debug: boolean;
622
+ workspaceId?: string;
629
623
  };
630
624
  }
631
625
  interface DistriAuthProviderProps {
@@ -634,8 +628,9 @@ interface DistriAuthProviderProps {
634
628
  children: ReactNode;
635
629
  debug?: boolean;
636
630
  baseUrl?: string;
631
+ workspaceId?: string;
637
632
  }
638
- declare function DistriAuthProvider({ clientId, theme, children, debug, baseUrl }: DistriAuthProviderProps): react_jsx_runtime.JSX.Element;
633
+ declare function DistriAuthProvider({ clientId, theme, children, debug, baseUrl, workspaceId, }: DistriAuthProviderProps): react_jsx_runtime.JSX.Element;
639
634
  declare function useDistriAuth(): DistriAuthContextValue;
640
635
 
641
636
  interface UseChatMessagesOptions {
@@ -1134,4 +1129,4 @@ interface UserMessageRendererProps {
1134
1129
  }
1135
1130
  declare const UserMessageRenderer: React__default.FC<UserMessageRendererProps>;
1136
1131
 
1137
- export { ASK_FOLLOW_UP_TOOL_NAME, AgentSelect, AppSidebar, type AskFollowUpInput, type AskFollowUpOutput, AssistantMessageRenderer, type AssistantMessageRendererProps, type AttachedImage, AuthLoading, type AuthStatus, Badge, BrowserPreviewPanel, BrowserViewport, type BrowserViewportProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatContainerProps, type ChatCustomRenderers, type ChatEmptyStateCategory, type ChatEmptyStateController, type ChatEmptyStateOptions, type ChatEmptyStateStarter, ChatInner, ChatInput, type ChatInputProps, type ChatInstance, type ChatProps, type ChatState, type ChatStateStore, ConfigurationPanel, DialogRoot as Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, type DistriAnyTool, DistriAuthProvider, DistriContext, DistriProvider, type DistriUiTool, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtractedContent, type FollowUpQuestion, ImageRenderer, type ImageRendererProps, Input, LoadingAnimation, type LoadingAnimationConfig, type LoadingAnimationPreset, type LoadingAnimationProps, LoadingShimmer, MessageFeedback, type MessageFeedbackProps, MessageReadProvider, type MessageReadProviderProps, MessageReadTracker, type MessageReadTrackerProps, MessageRenderer, type MessageRendererProps, type ModelOption, type PlanState, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StepBasedRenderer, type StepBasedRendererProps, type StepState, type StreamingIndicator, StreamingTextRenderer, type StreamingTtsOptions, type TaskState, Textarea, ThemeProvider, ThemeToggle, ThinkingRenderer, type ThinkingRendererProps, TodosDisplay, type TodosDisplayProps, type ToolCallState, type ToolCallStatus, type ToolRendererMap, type ToolRendererProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TtsConfig, type TtsRequest, TypingIndicator, type UiToolProps, type UseAgentOptions, type UseAgentResult, type UseAgentsByUsageOptions, type UseAgentsByUsageResult, type UseAgentsResult, type UseChatMessagesOptions, type UseChatMessagesReturn, type UseChatOptions, type UseChatReturn, type UseConfigurationResult, type UseMessageReadStatusOptions, type UseMessageReadStatusResult, type UseMessageVoteOptions, type UseMessageVoteResult, type UseMessageVotesOptions, type UseMessageVotesResult, type UseThreadMessagesOptions, type UseThreadReadStatusOptions, type UseThreadReadStatusResult, type UseThreadsOptions, type UseThreadsResult, UserMessageRenderer, type UserMessageRendererProps, VoiceInput, type VoiceInputProps, createAskFollowUpTool, extractContent, useAgent, useAgentDefinitions, useAgentsByUsage, useChat, useChatMessages, useChatStateStore, useConfiguration, useDistri, useDistriAuth, useDistriToken, useMessageReadContext, useMessageReadStatus, useMessageVote, useMessageVotes, useSidebar, useSpeechToText, useTheme, useThreadReadStatus, useThreads, useTts, useWorkspace, wrapFnToolAsUiTool, wrapTools };
1132
+ export { ASK_FOLLOW_UP_TOOL_NAME, AgentSelect, type AskFollowUpInput, type AskFollowUpOutput, AssistantMessageRenderer, type AssistantMessageRendererProps, type AttachedImage, AuthLoading, type AuthStatus, Badge, BrowserPreviewPanel, BrowserViewport, type BrowserViewportProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatContainerProps, type ChatCustomRenderers, type ChatEmptyStateCategory, type ChatEmptyStateController, type ChatEmptyStateOptions, type ChatEmptyStateStarter, ChatInner, ChatInput, type ChatInputProps, type ChatInstance, type ChatProps, type ChatState, type ChatStateStore, ConfigurationPanel, DialogRoot as Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, type DistriAnyTool, DistriAuthProvider, DistriContext, DistriProvider, type DistriUiTool, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtractedContent, type FollowUpQuestion, ImageRenderer, type ImageRendererProps, Input, LoadingAnimation, type LoadingAnimationConfig, type LoadingAnimationPreset, type LoadingAnimationProps, LoadingShimmer, MessageFeedback, type MessageFeedbackProps, MessageReadProvider, type MessageReadProviderProps, MessageReadTracker, type MessageReadTrackerProps, MessageRenderer, type MessageRendererProps, type ModelOption, type PlanState, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StepBasedRenderer, type StepBasedRendererProps, type StepState, type StreamingIndicator, StreamingTextRenderer, type StreamingTtsOptions, type TaskState, Textarea, ThemeProvider, ThemeToggle, ThinkingRenderer, type ThinkingRendererProps, TodosDisplay, type TodosDisplayProps, type ToolCallState, type ToolCallStatus, type ToolRendererMap, type ToolRendererProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TtsConfig, type TtsRequest, TypingIndicator, type UiToolProps, type UseAgentOptions, type UseAgentResult, type UseAgentsByUsageOptions, type UseAgentsByUsageResult, type UseAgentsResult, type UseChatMessagesOptions, type UseChatMessagesReturn, type UseChatOptions, type UseChatReturn, type UseConfigurationResult, type UseMessageReadStatusOptions, type UseMessageReadStatusResult, type UseMessageVoteOptions, type UseMessageVoteResult, type UseMessageVotesOptions, type UseMessageVotesResult, type UseThreadMessagesOptions, type UseThreadReadStatusOptions, type UseThreadReadStatusResult, type UseThreadsOptions, type UseThreadsResult, UserMessageRenderer, type UserMessageRendererProps, VoiceInput, type VoiceInputProps, createAskFollowUpTool, extractContent, useAgent, useAgentDefinitions, useAgentsByUsage, useChat, useChatMessages, useChatStateStore, useConfiguration, useDistri, useDistriAuth, useDistriToken, useMessageReadContext, useMessageReadStatus, useMessageVote, useMessageVotes, useSidebar, useSpeechToText, useTheme, useThreadReadStatus, useThreads, useTts, useWorkspace, wrapFnToolAsUiTool, wrapTools };
package/dist/index.d.ts CHANGED
@@ -435,18 +435,6 @@ interface AgentSelectProps {
435
435
  }
436
436
  declare const AgentSelect: React__default.FC<AgentSelectProps>;
437
437
 
438
- interface AppSidebarProps {
439
- selectedThreadId: string;
440
- currentPage: 'chat' | 'agents';
441
- onNewChat: () => void;
442
- onThreadSelect: (threadId: string) => void;
443
- onThreadDelete: (threadId: string) => void;
444
- onThreadRename: (threadId: string, newTitle: string) => void;
445
- onLogoClick?: () => void;
446
- onPageChange: (page: 'chat' | 'agents') => void;
447
- }
448
- declare function AppSidebar({ selectedThreadId, currentPage, onNewChat, onThreadSelect, onThreadDelete, onThreadRename, onLogoClick, onPageChange, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
449
-
450
438
  interface AttachedImage {
451
439
  id: string;
452
440
  file: File;
@@ -525,7 +513,11 @@ interface ThemeProviderState {
525
513
  declare function ThemeProvider({ children, defaultTheme, storageKey, ...props }: ThemeProviderProps): react_jsx_runtime.JSX.Element;
526
514
  declare const useTheme: () => ThemeProviderState;
527
515
 
528
- declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
516
+ interface ThemeToggleProps {
517
+ theme?: 'dark' | 'light';
518
+ onThemeChange?: (theme: 'dark' | 'light') => void;
519
+ }
520
+ declare function ThemeToggle({ theme, onThemeChange }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
529
521
 
530
522
  interface AuthLoadingProps {
531
523
  children?: React__default.ReactNode;
@@ -591,6 +583,7 @@ interface DistriProviderProps {
591
583
  authReady?: boolean;
592
584
  };
593
585
  children: ReactNode;
586
+ /** @deprecated Theme is no longer managed by DistriProvider. Use ThemeProvider at app level instead. */
594
587
  defaultTheme?: 'dark' | 'light' | 'system';
595
588
  }
596
589
  /**
@@ -626,6 +619,7 @@ interface DistriAuthContextValue {
626
619
  theme: 'dark' | 'light';
627
620
  baseUrl: string;
628
621
  debug: boolean;
622
+ workspaceId?: string;
629
623
  };
630
624
  }
631
625
  interface DistriAuthProviderProps {
@@ -634,8 +628,9 @@ interface DistriAuthProviderProps {
634
628
  children: ReactNode;
635
629
  debug?: boolean;
636
630
  baseUrl?: string;
631
+ workspaceId?: string;
637
632
  }
638
- declare function DistriAuthProvider({ clientId, theme, children, debug, baseUrl }: DistriAuthProviderProps): react_jsx_runtime.JSX.Element;
633
+ declare function DistriAuthProvider({ clientId, theme, children, debug, baseUrl, workspaceId, }: DistriAuthProviderProps): react_jsx_runtime.JSX.Element;
639
634
  declare function useDistriAuth(): DistriAuthContextValue;
640
635
 
641
636
  interface UseChatMessagesOptions {
@@ -1134,4 +1129,4 @@ interface UserMessageRendererProps {
1134
1129
  }
1135
1130
  declare const UserMessageRenderer: React__default.FC<UserMessageRendererProps>;
1136
1131
 
1137
- export { ASK_FOLLOW_UP_TOOL_NAME, AgentSelect, AppSidebar, type AskFollowUpInput, type AskFollowUpOutput, AssistantMessageRenderer, type AssistantMessageRendererProps, type AttachedImage, AuthLoading, type AuthStatus, Badge, BrowserPreviewPanel, BrowserViewport, type BrowserViewportProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatContainerProps, type ChatCustomRenderers, type ChatEmptyStateCategory, type ChatEmptyStateController, type ChatEmptyStateOptions, type ChatEmptyStateStarter, ChatInner, ChatInput, type ChatInputProps, type ChatInstance, type ChatProps, type ChatState, type ChatStateStore, ConfigurationPanel, DialogRoot as Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, type DistriAnyTool, DistriAuthProvider, DistriContext, DistriProvider, type DistriUiTool, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtractedContent, type FollowUpQuestion, ImageRenderer, type ImageRendererProps, Input, LoadingAnimation, type LoadingAnimationConfig, type LoadingAnimationPreset, type LoadingAnimationProps, LoadingShimmer, MessageFeedback, type MessageFeedbackProps, MessageReadProvider, type MessageReadProviderProps, MessageReadTracker, type MessageReadTrackerProps, MessageRenderer, type MessageRendererProps, type ModelOption, type PlanState, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StepBasedRenderer, type StepBasedRendererProps, type StepState, type StreamingIndicator, StreamingTextRenderer, type StreamingTtsOptions, type TaskState, Textarea, ThemeProvider, ThemeToggle, ThinkingRenderer, type ThinkingRendererProps, TodosDisplay, type TodosDisplayProps, type ToolCallState, type ToolCallStatus, type ToolRendererMap, type ToolRendererProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TtsConfig, type TtsRequest, TypingIndicator, type UiToolProps, type UseAgentOptions, type UseAgentResult, type UseAgentsByUsageOptions, type UseAgentsByUsageResult, type UseAgentsResult, type UseChatMessagesOptions, type UseChatMessagesReturn, type UseChatOptions, type UseChatReturn, type UseConfigurationResult, type UseMessageReadStatusOptions, type UseMessageReadStatusResult, type UseMessageVoteOptions, type UseMessageVoteResult, type UseMessageVotesOptions, type UseMessageVotesResult, type UseThreadMessagesOptions, type UseThreadReadStatusOptions, type UseThreadReadStatusResult, type UseThreadsOptions, type UseThreadsResult, UserMessageRenderer, type UserMessageRendererProps, VoiceInput, type VoiceInputProps, createAskFollowUpTool, extractContent, useAgent, useAgentDefinitions, useAgentsByUsage, useChat, useChatMessages, useChatStateStore, useConfiguration, useDistri, useDistriAuth, useDistriToken, useMessageReadContext, useMessageReadStatus, useMessageVote, useMessageVotes, useSidebar, useSpeechToText, useTheme, useThreadReadStatus, useThreads, useTts, useWorkspace, wrapFnToolAsUiTool, wrapTools };
1132
+ export { ASK_FOLLOW_UP_TOOL_NAME, AgentSelect, type AskFollowUpInput, type AskFollowUpOutput, AssistantMessageRenderer, type AssistantMessageRendererProps, type AttachedImage, AuthLoading, type AuthStatus, Badge, BrowserPreviewPanel, BrowserViewport, type BrowserViewportProps, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chat, type ChatContainerProps, type ChatCustomRenderers, type ChatEmptyStateCategory, type ChatEmptyStateController, type ChatEmptyStateOptions, type ChatEmptyStateStarter, ChatInner, ChatInput, type ChatInputProps, type ChatInstance, type ChatProps, type ChatState, type ChatStateStore, ConfigurationPanel, DialogRoot as Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger, type DistriAnyTool, DistriAuthProvider, DistriContext, DistriProvider, type DistriUiTool, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type ExtractedContent, type FollowUpQuestion, ImageRenderer, type ImageRendererProps, Input, LoadingAnimation, type LoadingAnimationConfig, type LoadingAnimationPreset, type LoadingAnimationProps, LoadingShimmer, MessageFeedback, type MessageFeedbackProps, MessageReadProvider, type MessageReadProviderProps, MessageReadTracker, type MessageReadTrackerProps, MessageRenderer, type MessageRendererProps, type ModelOption, type PlanState, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StepBasedRenderer, type StepBasedRendererProps, type StepState, type StreamingIndicator, StreamingTextRenderer, type StreamingTtsOptions, type TaskState, Textarea, ThemeProvider, ThemeToggle, ThinkingRenderer, type ThinkingRendererProps, TodosDisplay, type TodosDisplayProps, type ToolCallState, type ToolCallStatus, type ToolRendererMap, type ToolRendererProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TtsConfig, type TtsRequest, TypingIndicator, type UiToolProps, type UseAgentOptions, type UseAgentResult, type UseAgentsByUsageOptions, type UseAgentsByUsageResult, type UseAgentsResult, type UseChatMessagesOptions, type UseChatMessagesReturn, type UseChatOptions, type UseChatReturn, type UseConfigurationResult, type UseMessageReadStatusOptions, type UseMessageReadStatusResult, type UseMessageVoteOptions, type UseMessageVoteResult, type UseMessageVotesOptions, type UseMessageVotesResult, type UseThreadMessagesOptions, type UseThreadReadStatusOptions, type UseThreadReadStatusResult, type UseThreadsOptions, type UseThreadsResult, UserMessageRenderer, type UserMessageRendererProps, VoiceInput, type VoiceInputProps, createAskFollowUpTool, extractContent, useAgent, useAgentDefinitions, useAgentsByUsage, useChat, useChatMessages, useChatStateStore, useConfiguration, useDistri, useDistriAuth, useDistriToken, useMessageReadContext, useMessageReadStatus, useMessageVote, useMessageVotes, useSidebar, useSpeechToText, useTheme, useThreadReadStatus, useThreads, useTts, useWorkspace, wrapFnToolAsUiTool, wrapTools };