@algenium/blocks 1.1.2 → 1.2.0-rc.2

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
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import React__default from 'react';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import { VariantProps } from 'class-variance-authority';
@@ -12,6 +13,84 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
12
13
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
13
14
  import { ClassValue } from 'clsx';
14
15
 
16
+ interface CalendarEvent {
17
+ id: string;
18
+ calendarId: string;
19
+ summary: string;
20
+ description?: string | null;
21
+ location?: string | null;
22
+ dtstart: string;
23
+ dtend: string;
24
+ allDay?: boolean;
25
+ status?: string;
26
+ rrule?: string | null;
27
+ referenceType?: string | null;
28
+ referenceId?: string | null;
29
+ attendees?: Array<{
30
+ email: string;
31
+ displayName?: string | null;
32
+ partstat: string;
33
+ role: string;
34
+ }>;
35
+ reminders?: Array<{
36
+ id: string;
37
+ triggerMinutes: number;
38
+ action: string;
39
+ }>;
40
+ }
41
+ interface CalendarData {
42
+ id: string;
43
+ ownerUserId: string;
44
+ name: string;
45
+ description?: string | null;
46
+ feedToken?: string;
47
+ }
48
+ interface CalendarContextValue {
49
+ calendars: CalendarData[];
50
+ events: CalendarEvent[];
51
+ isLoading: boolean;
52
+ error: string | null;
53
+ feedUrl: string | null;
54
+ refetch: () => void;
55
+ createEvent?: (data: Partial<CalendarEvent>) => Promise<void>;
56
+ updateEvent?: (eventId: string, data: Partial<CalendarEvent>) => Promise<void>;
57
+ deleteEvent?: (eventId: string) => Promise<void>;
58
+ rsvpEvent?: (eventId: string, partstat: string) => Promise<void>;
59
+ }
60
+ declare const CalendarContext: React.Context<CalendarContextValue | null>;
61
+ declare function useCalendarContext(): CalendarContextValue | null;
62
+
63
+ interface ChatConversationRoom {
64
+ id: string;
65
+ type: string;
66
+ lastMessageAt: string | null;
67
+ }
68
+ interface ChatConversation {
69
+ caseId: string;
70
+ caseNumber: string;
71
+ clientName: string | null;
72
+ caseStatus: string;
73
+ rooms: ChatConversationRoom[];
74
+ }
75
+ type ChatSidebarView = "list" | "chat";
76
+ interface ChatSidebarContextValue {
77
+ isOpen: boolean;
78
+ view: ChatSidebarView;
79
+ conversations: ChatConversation[];
80
+ isLoading: boolean;
81
+ activeCaseId: string | null;
82
+ activeRoomId: string | null;
83
+ toggle: () => void;
84
+ open: () => void;
85
+ close: () => void;
86
+ openChat: (caseId: string, roomId?: string) => void;
87
+ selectRoom: (roomId: string, caseId: string) => void;
88
+ back: () => void;
89
+ refetch: () => void;
90
+ }
91
+ declare const ChatSidebarContext: React.Context<ChatSidebarContextValue | null>;
92
+ declare function useChatSidebar(): ChatSidebarContextValue;
93
+
15
94
  /**
16
95
  * Blocks Context Interfaces
17
96
  *
@@ -328,6 +407,176 @@ interface NotificationsWidgetProps {
328
407
  }
329
408
  declare function NotificationsWidget({ notifications: propNotifications, onMarkAsRead: propOnMarkAsRead, onMarkAllAsRead: propOnMarkAllAsRead, onDismiss: propOnDismiss, onClearAll: propOnClearAll, onNotificationClick: propOnNotificationClick, size, maxVisible, playSound, soundUrl, className, emptyMessage, title, dotColor, showPulse, soundType, pulseStyle, soundCooldown, }: NotificationsWidgetProps): react_jsx_runtime.JSX.Element;
330
409
 
410
+ interface CalendarWidgetLabels {
411
+ title?: string;
412
+ noEvents?: string;
413
+ viewCalendar?: string;
414
+ }
415
+ interface CalendarWidgetProps {
416
+ calendarUrl?: string;
417
+ labels?: CalendarWidgetLabels;
418
+ onEventClick?: (event: CalendarEvent) => void;
419
+ className?: string;
420
+ }
421
+ declare function CalendarWidget({ calendarUrl, labels, onEventClick, className, }: CalendarWidgetProps): react_jsx_runtime.JSX.Element;
422
+
423
+ type CalendarViewMode = "month" | "week" | "day";
424
+ interface CalendarViewLabels {
425
+ month?: string;
426
+ week?: string;
427
+ day?: string;
428
+ today?: string;
429
+ newEvent?: string;
430
+ noEvents?: string;
431
+ }
432
+ interface CalendarViewProps {
433
+ events: CalendarEvent[];
434
+ isLoading?: boolean;
435
+ onEventClick?: (event: CalendarEvent) => void;
436
+ onDateSelect?: (date: Date) => void;
437
+ onCreateEvent?: () => void;
438
+ labels?: CalendarViewLabels;
439
+ className?: string;
440
+ }
441
+ declare function CalendarView({ events, isLoading, onEventClick, onDateSelect, onCreateEvent, labels, className, }: CalendarViewProps): react_jsx_runtime.JSX.Element;
442
+
443
+ interface EventDialogLabels {
444
+ createTitle?: string;
445
+ editTitle?: string;
446
+ summary?: string;
447
+ description?: string;
448
+ location?: string;
449
+ startDate?: string;
450
+ endDate?: string;
451
+ allDay?: string;
452
+ attendees?: string;
453
+ reminder?: string;
454
+ save?: string;
455
+ cancel?: string;
456
+ delete?: string;
457
+ }
458
+ interface EventDialogProps {
459
+ open: boolean;
460
+ onOpenChange: (open: boolean) => void;
461
+ event?: Partial<CalendarEvent>;
462
+ onSave: (data: Partial<CalendarEvent>) => Promise<void>;
463
+ onDelete?: () => Promise<void>;
464
+ labels?: EventDialogLabels;
465
+ }
466
+ declare function EventDialog({ open, onOpenChange, event, onSave, onDelete, labels, }: EventDialogProps): react_jsx_runtime.JSX.Element;
467
+
468
+ interface UpcomingEventsProps {
469
+ events: CalendarEvent[];
470
+ maxVisible?: number;
471
+ onEventClick?: (event: CalendarEvent) => void;
472
+ className?: string;
473
+ }
474
+ declare function UpcomingEvents({ events, maxVisible, onEventClick, className, }: UpcomingEventsProps): react_jsx_runtime.JSX.Element;
475
+
476
+ interface CalendarSubscribeButtonProps {
477
+ feedUrl: string;
478
+ label?: string;
479
+ }
480
+ declare function CalendarSubscribeButton({ feedUrl, label, }: CalendarSubscribeButtonProps): react_jsx_runtime.JSX.Element;
481
+
482
+ interface MiniCalendarProps {
483
+ selected?: Date;
484
+ onSelect?: (date: Date | undefined) => void;
485
+ events?: CalendarEvent[];
486
+ className?: string;
487
+ }
488
+ declare function MiniCalendar({ selected, onSelect, events, className, }: MiniCalendarProps): react_jsx_runtime.JSX.Element;
489
+
490
+ interface EventRsvpBadgeProps {
491
+ eventId: string;
492
+ currentStatus: string;
493
+ onRsvp: (eventId: string, partstat: string) => Promise<void>;
494
+ className?: string;
495
+ }
496
+ declare function EventRsvpBadge({ eventId, currentStatus, onRsvp, className, }: EventRsvpBadgeProps): react_jsx_runtime.JSX.Element;
497
+
498
+ interface ChatSidebarProviderProps {
499
+ fetchConversations: () => Promise<ChatConversation[]>;
500
+ children: React__default.ReactNode;
501
+ defaultOpen?: boolean;
502
+ }
503
+ declare function ChatSidebarProvider({ fetchConversations, children, defaultOpen, }: ChatSidebarProviderProps): react_jsx_runtime.JSX.Element;
504
+
505
+ interface ChatMessageData {
506
+ id: string;
507
+ chatRoomId: string;
508
+ senderId: string;
509
+ senderName: string | null;
510
+ senderRole: string;
511
+ content: string | null;
512
+ attachments: Array<{
513
+ id: string;
514
+ fileName: string;
515
+ fileSize: number;
516
+ mimeType: string;
517
+ }>;
518
+ createdAt: string;
519
+ }
520
+ interface ChatRoomConfig {
521
+ baseUrl: string;
522
+ getToken: () => Promise<string | null>;
523
+ }
524
+ interface UseChatRoomOptions {
525
+ minReconnectDelay?: number;
526
+ maxReconnectDelay?: number;
527
+ pingInterval?: number;
528
+ }
529
+ interface UseChatRoomResult {
530
+ messages: ChatMessageData[];
531
+ sendMessage: (content: string, attachmentIds?: string[]) => void;
532
+ sendTyping: (isTyping: boolean) => void;
533
+ isConnected: boolean;
534
+ error: string | null;
535
+ typingUsers: Array<{
536
+ userId: string;
537
+ userName: string | null;
538
+ }>;
539
+ loadMoreHistory: () => Promise<void>;
540
+ hasMoreHistory: boolean;
541
+ isLoadingHistory: boolean;
542
+ }
543
+ declare function useChatRoom(roomId: string | null | undefined, config: ChatRoomConfig, options?: UseChatRoomOptions): UseChatRoomResult;
544
+
545
+ interface ChatRoomViewLabels {
546
+ noMessages?: string;
547
+ placeholder?: string;
548
+ send?: string;
549
+ today?: string;
550
+ yesterday?: string;
551
+ attachFile?: string;
552
+ }
553
+ interface ChatRoomViewProps {
554
+ roomId: string;
555
+ currentUserId: string;
556
+ config: ChatRoomConfig;
557
+ roomLabel?: string;
558
+ labels?: ChatRoomViewLabels;
559
+ roleLabel?: (role: string) => string;
560
+ className?: string;
561
+ }
562
+ declare function ChatRoomView({ roomId, currentUserId, config, roomLabel, labels, roleLabel, className, }: ChatRoomViewProps): react_jsx_runtime.JSX.Element;
563
+
564
+ interface ChatSidebarLabels extends ChatRoomViewLabels {
565
+ title?: string;
566
+ noConversations?: string;
567
+ rooms?: string;
568
+ loading?: string;
569
+ }
570
+ interface ChatSidebarProps {
571
+ currentUserId: string;
572
+ config: ChatRoomConfig;
573
+ labels?: ChatSidebarLabels;
574
+ roleLabel?: (role: string) => string;
575
+ roomTypeLabel?: (type: string) => string;
576
+ className?: string;
577
+ }
578
+ declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
579
+
331
580
  declare const buttonVariants: (props?: ({
332
581
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
333
582
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -406,4 +655,4 @@ declare function ScrollBar({ className, orientation, ...props }: React.Component
406
655
 
407
656
  declare function cn(...inputs: ClassValue[]): string;
408
657
 
409
- export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, type BlocksNotification, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn, defaultLanguages, toggleVariants, useLanguageContext, useNotificationsContext };
658
+ export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useLanguageContext, useNotificationsContext };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import React__default from 'react';
2
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
5
  import { VariantProps } from 'class-variance-authority';
@@ -12,6 +13,84 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
12
13
  import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
13
14
  import { ClassValue } from 'clsx';
14
15
 
16
+ interface CalendarEvent {
17
+ id: string;
18
+ calendarId: string;
19
+ summary: string;
20
+ description?: string | null;
21
+ location?: string | null;
22
+ dtstart: string;
23
+ dtend: string;
24
+ allDay?: boolean;
25
+ status?: string;
26
+ rrule?: string | null;
27
+ referenceType?: string | null;
28
+ referenceId?: string | null;
29
+ attendees?: Array<{
30
+ email: string;
31
+ displayName?: string | null;
32
+ partstat: string;
33
+ role: string;
34
+ }>;
35
+ reminders?: Array<{
36
+ id: string;
37
+ triggerMinutes: number;
38
+ action: string;
39
+ }>;
40
+ }
41
+ interface CalendarData {
42
+ id: string;
43
+ ownerUserId: string;
44
+ name: string;
45
+ description?: string | null;
46
+ feedToken?: string;
47
+ }
48
+ interface CalendarContextValue {
49
+ calendars: CalendarData[];
50
+ events: CalendarEvent[];
51
+ isLoading: boolean;
52
+ error: string | null;
53
+ feedUrl: string | null;
54
+ refetch: () => void;
55
+ createEvent?: (data: Partial<CalendarEvent>) => Promise<void>;
56
+ updateEvent?: (eventId: string, data: Partial<CalendarEvent>) => Promise<void>;
57
+ deleteEvent?: (eventId: string) => Promise<void>;
58
+ rsvpEvent?: (eventId: string, partstat: string) => Promise<void>;
59
+ }
60
+ declare const CalendarContext: React.Context<CalendarContextValue | null>;
61
+ declare function useCalendarContext(): CalendarContextValue | null;
62
+
63
+ interface ChatConversationRoom {
64
+ id: string;
65
+ type: string;
66
+ lastMessageAt: string | null;
67
+ }
68
+ interface ChatConversation {
69
+ caseId: string;
70
+ caseNumber: string;
71
+ clientName: string | null;
72
+ caseStatus: string;
73
+ rooms: ChatConversationRoom[];
74
+ }
75
+ type ChatSidebarView = "list" | "chat";
76
+ interface ChatSidebarContextValue {
77
+ isOpen: boolean;
78
+ view: ChatSidebarView;
79
+ conversations: ChatConversation[];
80
+ isLoading: boolean;
81
+ activeCaseId: string | null;
82
+ activeRoomId: string | null;
83
+ toggle: () => void;
84
+ open: () => void;
85
+ close: () => void;
86
+ openChat: (caseId: string, roomId?: string) => void;
87
+ selectRoom: (roomId: string, caseId: string) => void;
88
+ back: () => void;
89
+ refetch: () => void;
90
+ }
91
+ declare const ChatSidebarContext: React.Context<ChatSidebarContextValue | null>;
92
+ declare function useChatSidebar(): ChatSidebarContextValue;
93
+
15
94
  /**
16
95
  * Blocks Context Interfaces
17
96
  *
@@ -328,6 +407,176 @@ interface NotificationsWidgetProps {
328
407
  }
329
408
  declare function NotificationsWidget({ notifications: propNotifications, onMarkAsRead: propOnMarkAsRead, onMarkAllAsRead: propOnMarkAllAsRead, onDismiss: propOnDismiss, onClearAll: propOnClearAll, onNotificationClick: propOnNotificationClick, size, maxVisible, playSound, soundUrl, className, emptyMessage, title, dotColor, showPulse, soundType, pulseStyle, soundCooldown, }: NotificationsWidgetProps): react_jsx_runtime.JSX.Element;
330
409
 
410
+ interface CalendarWidgetLabels {
411
+ title?: string;
412
+ noEvents?: string;
413
+ viewCalendar?: string;
414
+ }
415
+ interface CalendarWidgetProps {
416
+ calendarUrl?: string;
417
+ labels?: CalendarWidgetLabels;
418
+ onEventClick?: (event: CalendarEvent) => void;
419
+ className?: string;
420
+ }
421
+ declare function CalendarWidget({ calendarUrl, labels, onEventClick, className, }: CalendarWidgetProps): react_jsx_runtime.JSX.Element;
422
+
423
+ type CalendarViewMode = "month" | "week" | "day";
424
+ interface CalendarViewLabels {
425
+ month?: string;
426
+ week?: string;
427
+ day?: string;
428
+ today?: string;
429
+ newEvent?: string;
430
+ noEvents?: string;
431
+ }
432
+ interface CalendarViewProps {
433
+ events: CalendarEvent[];
434
+ isLoading?: boolean;
435
+ onEventClick?: (event: CalendarEvent) => void;
436
+ onDateSelect?: (date: Date) => void;
437
+ onCreateEvent?: () => void;
438
+ labels?: CalendarViewLabels;
439
+ className?: string;
440
+ }
441
+ declare function CalendarView({ events, isLoading, onEventClick, onDateSelect, onCreateEvent, labels, className, }: CalendarViewProps): react_jsx_runtime.JSX.Element;
442
+
443
+ interface EventDialogLabels {
444
+ createTitle?: string;
445
+ editTitle?: string;
446
+ summary?: string;
447
+ description?: string;
448
+ location?: string;
449
+ startDate?: string;
450
+ endDate?: string;
451
+ allDay?: string;
452
+ attendees?: string;
453
+ reminder?: string;
454
+ save?: string;
455
+ cancel?: string;
456
+ delete?: string;
457
+ }
458
+ interface EventDialogProps {
459
+ open: boolean;
460
+ onOpenChange: (open: boolean) => void;
461
+ event?: Partial<CalendarEvent>;
462
+ onSave: (data: Partial<CalendarEvent>) => Promise<void>;
463
+ onDelete?: () => Promise<void>;
464
+ labels?: EventDialogLabels;
465
+ }
466
+ declare function EventDialog({ open, onOpenChange, event, onSave, onDelete, labels, }: EventDialogProps): react_jsx_runtime.JSX.Element;
467
+
468
+ interface UpcomingEventsProps {
469
+ events: CalendarEvent[];
470
+ maxVisible?: number;
471
+ onEventClick?: (event: CalendarEvent) => void;
472
+ className?: string;
473
+ }
474
+ declare function UpcomingEvents({ events, maxVisible, onEventClick, className, }: UpcomingEventsProps): react_jsx_runtime.JSX.Element;
475
+
476
+ interface CalendarSubscribeButtonProps {
477
+ feedUrl: string;
478
+ label?: string;
479
+ }
480
+ declare function CalendarSubscribeButton({ feedUrl, label, }: CalendarSubscribeButtonProps): react_jsx_runtime.JSX.Element;
481
+
482
+ interface MiniCalendarProps {
483
+ selected?: Date;
484
+ onSelect?: (date: Date | undefined) => void;
485
+ events?: CalendarEvent[];
486
+ className?: string;
487
+ }
488
+ declare function MiniCalendar({ selected, onSelect, events, className, }: MiniCalendarProps): react_jsx_runtime.JSX.Element;
489
+
490
+ interface EventRsvpBadgeProps {
491
+ eventId: string;
492
+ currentStatus: string;
493
+ onRsvp: (eventId: string, partstat: string) => Promise<void>;
494
+ className?: string;
495
+ }
496
+ declare function EventRsvpBadge({ eventId, currentStatus, onRsvp, className, }: EventRsvpBadgeProps): react_jsx_runtime.JSX.Element;
497
+
498
+ interface ChatSidebarProviderProps {
499
+ fetchConversations: () => Promise<ChatConversation[]>;
500
+ children: React__default.ReactNode;
501
+ defaultOpen?: boolean;
502
+ }
503
+ declare function ChatSidebarProvider({ fetchConversations, children, defaultOpen, }: ChatSidebarProviderProps): react_jsx_runtime.JSX.Element;
504
+
505
+ interface ChatMessageData {
506
+ id: string;
507
+ chatRoomId: string;
508
+ senderId: string;
509
+ senderName: string | null;
510
+ senderRole: string;
511
+ content: string | null;
512
+ attachments: Array<{
513
+ id: string;
514
+ fileName: string;
515
+ fileSize: number;
516
+ mimeType: string;
517
+ }>;
518
+ createdAt: string;
519
+ }
520
+ interface ChatRoomConfig {
521
+ baseUrl: string;
522
+ getToken: () => Promise<string | null>;
523
+ }
524
+ interface UseChatRoomOptions {
525
+ minReconnectDelay?: number;
526
+ maxReconnectDelay?: number;
527
+ pingInterval?: number;
528
+ }
529
+ interface UseChatRoomResult {
530
+ messages: ChatMessageData[];
531
+ sendMessage: (content: string, attachmentIds?: string[]) => void;
532
+ sendTyping: (isTyping: boolean) => void;
533
+ isConnected: boolean;
534
+ error: string | null;
535
+ typingUsers: Array<{
536
+ userId: string;
537
+ userName: string | null;
538
+ }>;
539
+ loadMoreHistory: () => Promise<void>;
540
+ hasMoreHistory: boolean;
541
+ isLoadingHistory: boolean;
542
+ }
543
+ declare function useChatRoom(roomId: string | null | undefined, config: ChatRoomConfig, options?: UseChatRoomOptions): UseChatRoomResult;
544
+
545
+ interface ChatRoomViewLabels {
546
+ noMessages?: string;
547
+ placeholder?: string;
548
+ send?: string;
549
+ today?: string;
550
+ yesterday?: string;
551
+ attachFile?: string;
552
+ }
553
+ interface ChatRoomViewProps {
554
+ roomId: string;
555
+ currentUserId: string;
556
+ config: ChatRoomConfig;
557
+ roomLabel?: string;
558
+ labels?: ChatRoomViewLabels;
559
+ roleLabel?: (role: string) => string;
560
+ className?: string;
561
+ }
562
+ declare function ChatRoomView({ roomId, currentUserId, config, roomLabel, labels, roleLabel, className, }: ChatRoomViewProps): react_jsx_runtime.JSX.Element;
563
+
564
+ interface ChatSidebarLabels extends ChatRoomViewLabels {
565
+ title?: string;
566
+ noConversations?: string;
567
+ rooms?: string;
568
+ loading?: string;
569
+ }
570
+ interface ChatSidebarProps {
571
+ currentUserId: string;
572
+ config: ChatRoomConfig;
573
+ labels?: ChatSidebarLabels;
574
+ roleLabel?: (role: string) => string;
575
+ roomTypeLabel?: (type: string) => string;
576
+ className?: string;
577
+ }
578
+ declare function ChatSidebar({ currentUserId, config, labels, roleLabel, roomTypeLabel, className, }: ChatSidebarProps): react_jsx_runtime.JSX.Element | null;
579
+
331
580
  declare const buttonVariants: (props?: ({
332
581
  variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
333
582
  size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
@@ -406,4 +655,4 @@ declare function ScrollBar({ className, orientation, ...props }: React.Component
406
655
 
407
656
  declare function cn(...inputs: ClassValue[]): string;
408
657
 
409
- export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, type BlocksNotification, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, cn, defaultLanguages, toggleVariants, useLanguageContext, useNotificationsContext };
658
+ export { AvatarEditor, AvatarEditorDialog, type AvatarEditorDialogProps, type AvatarEditorProps, type BlocksLanguage, type BlocksNotification, Button, CalendarContext, type CalendarContextValue, type CalendarData, type CalendarEvent, CalendarSubscribeButton, type CalendarSubscribeButtonProps, CalendarView, type CalendarViewLabels, type CalendarViewMode, type CalendarViewProps, CalendarWidget, type CalendarWidgetLabels, type CalendarWidgetProps, type ChatConversation, type ChatConversationRoom, type ChatMessageData, type ChatRoomConfig, ChatRoomView, type ChatRoomViewLabels, type ChatRoomViewProps, ChatSidebar, ChatSidebarContext, type ChatSidebarContextValue, type ChatSidebarLabels, type ChatSidebarProps, ChatSidebarProvider, type ChatSidebarProviderProps, type ChatSidebarView, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EventDialog, type EventDialogLabels, type EventDialogProps, EventRsvpBadge, type EventRsvpBadgeProps, type Language, LanguageContext, type LanguageContextValue, LanguageSwitcher, type LanguageSwitcherLabels, type LanguageSwitcherProps, MiniCalendar, type MiniCalendarProps, type Notification, type NotificationType, NotificationsContext, type NotificationsContextValue, NotificationsWidget, type NotificationsWidgetProps, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ScrollArea, ScrollBar, Slider, ThemeSwitcher, type ThemeSwitcherLabels, type ThemeSwitcherProps, Toggle, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UpcomingEvents, type UpcomingEventsProps, type UseChatRoomResult, buttonVariants, cn, defaultLanguages, toggleVariants, useCalendarContext, useChatRoom, useChatSidebar, useLanguageContext, useNotificationsContext };