@connectycube/chat-widget 0.39.1 → 0.39.3
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.es.js +5645 -5449
- package/dist/index.umd.js +96 -68
- package/dist/types/App.d.ts +3 -2
- package/dist/types/components/connectycube-ui/alert-dialog.d.ts +27 -0
- package/dist/types/components/connectycube-ui/attachment.d.ts +43 -0
- package/dist/types/components/connectycube-ui/avatar.d.ts +16 -0
- package/dist/types/components/{shadcn-ui → connectycube-ui}/badge.d.ts +5 -4
- package/dist/types/components/connectycube-ui/button.d.ts +11 -0
- package/dist/types/components/connectycube-ui/chat-bubble.d.ts +31 -0
- package/dist/types/components/connectycube-ui/chat-input.d.ts +26 -0
- package/dist/types/components/connectycube-ui/chat-list.d.ts +30 -0
- package/dist/types/components/connectycube-ui/checkbox.d.ts +10 -0
- package/dist/types/components/connectycube-ui/dialog-item.d.ts +45 -0
- package/dist/types/components/connectycube-ui/dialogs-list.d.ts +13 -0
- package/dist/types/components/connectycube-ui/dismiss-layer.d.ts +10 -0
- package/dist/types/components/connectycube-ui/file-picker.d.ts +21 -0
- package/dist/types/components/connectycube-ui/formatted-date.d.ts +8 -0
- package/dist/types/components/connectycube-ui/input.d.ts +4 -0
- package/dist/types/components/connectycube-ui/label.d.ts +4 -0
- package/dist/types/components/connectycube-ui/link-preview.d.ts +20 -0
- package/dist/types/components/connectycube-ui/linkify-text.d.ts +13 -0
- package/dist/types/components/connectycube-ui/placeholder-text.d.ts +8 -0
- package/dist/types/components/connectycube-ui/presence.d.ts +21 -0
- package/dist/types/components/connectycube-ui/quick-actions.d.ts +13 -0
- package/dist/types/components/connectycube-ui/search.d.ts +14 -0
- package/dist/types/components/connectycube-ui/spinner.d.ts +9 -0
- package/dist/types/components/connectycube-ui/status-call.d.ts +8 -0
- package/dist/types/components/connectycube-ui/status-indicator.d.ts +19 -0
- package/dist/types/components/connectycube-ui/status-sent.d.ts +7 -0
- package/dist/types/components/connectycube-ui/stream-view.d.ts +19 -36
- package/dist/types/components/connectycube-ui/switch.d.ts +5 -0
- package/dist/types/components/connectycube-ui/utils.d.ts +1 -0
- package/dist/types/components/home/main/ai-dropdown-menu/ai-dropdown-change-tone.d.ts +2 -2
- package/dist/types/components/home/main/ai-dropdown-menu/ai-dropdown-get-summary.d.ts +2 -2
- package/dist/types/components/home/main/{chat-input.d.ts → chat-footer.d.ts} +6 -3
- package/dist/types/components/home/main/chat-message.d.ts +10 -0
- package/dist/types/components/home/main/chat-messages-list.d.ts +5 -1
- package/dist/types/components/home/main/link-previews-list.d.ts +7 -0
- package/dist/types/components/home/main/my-profile/my-presence-select.d.ts +3 -0
- package/dist/types/components/home/sidebar/chat-item.d.ts +1 -1
- package/dist/types/components/home/sidebar/chats-list.d.ts +2 -2
- package/dist/types/components/home/sidebar/user-item.d.ts +2 -2
- package/dist/types/components/widget/widget-app.d.ts +4 -6
- package/dist/types/components/widget/widget-button.d.ts +1 -1
- package/dist/types/components/widget/widget-messages-badge.d.ts +1 -1
- package/dist/types/components/widget/widget-online-badge.d.ts +1 -1
- package/dist/types/helpers/connectycube.d.ts +18 -10
- package/dist/types/helpers/i18n.d.ts +1 -5
- package/dist/types/helpers/widget.d.ts +2 -1
- package/dist/types/hooks/index.d.ts +1 -0
- package/dist/types/hooks/store/useAppInterfaceStore.d.ts +3 -0
- package/dist/types/hooks/store/useAppSettingsStore.d.ts +2 -6
- package/dist/types/hooks/store/useUserSettingsStore.d.ts +3 -3
- package/dist/types/hooks/useAppAuthorization.d.ts +2 -7
- package/dist/types/hooks/useAppPresets.d.ts +3 -2
- package/dist/types/hooks/useCallActions.d.ts +4 -0
- package/dist/types/locales/el/translation.json.d.ts +6 -2
- package/dist/types/locales/en/translation.json.d.ts +6 -2
- package/dist/types/locales/es/translation.json.d.ts +138 -0
- package/dist/types/locales/ua/translation.json.d.ts +6 -2
- package/package.json +36 -33
- package/dist/types/components/calls/calls-buttons.d.ts +0 -3
- package/dist/types/components/home/main/chat-input-file.d.ts +0 -6
- package/dist/types/components/home/main/message/call-message.d.ts +0 -13
- package/dist/types/components/home/main/message/message-attachment.d.ts +0 -9
- package/dist/types/components/home/main/message/message-body.d.ts +0 -7
- package/dist/types/components/home/main/message/message-status-mark.d.ts +0 -7
- package/dist/types/components/home/main/message/message-text-summary.d.ts +0 -9
- package/dist/types/components/home/main/message/message-url-preview.d.ts +0 -8
- package/dist/types/components/home/main/message/message.d.ts +0 -16
- package/dist/types/components/home/main/user-status/user-status-badge.d.ts +0 -8
- package/dist/types/components/home/main/user-status/user-status-select.d.ts +0 -3
- package/dist/types/components/home/main/user-status/user-status.d.ts +0 -7
- package/dist/types/components/shadcn-ui/avatar.d.ts +0 -6
- package/dist/types/components/shadcn-ui/button.d.ts +0 -10
- package/dist/types/components/shadcn-ui/checkbox.d.ts +0 -4
- package/dist/types/components/shadcn-ui/class-names.d.ts +0 -50
- package/dist/types/components/shadcn-ui/input.d.ts +0 -3
- package/dist/types/components/shadcn-ui/label.d.ts +0 -4
- package/dist/types/components/shadcn-ui/skeleton.d.ts +0 -2
- package/dist/types/components/shadcn-ui/switch.d.ts +0 -4
- package/dist/types/components/shadcn-ui/tooltip.d.ts +0 -7
- package/dist/types/components/shared/avatar.d.ts +0 -15
- package/dist/types/components/shared/chat-status-mark.d.ts +0 -3
- package/dist/types/components/shared/confirmation-alert.d.ts +0 -8
- package/dist/types/components/shared/empty-content-placeholder.d.ts +0 -7
- package/dist/types/components/shared/loader.d.ts +0 -6
- package/dist/types/components/widget/widget-overlay.d.ts +0 -8
package/dist/types/App.d.ts
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { Config } from '@connectycube/react';
|
|
2
3
|
import { AppPresets } from './hooks/useAppPresets';
|
|
3
|
-
import * as React from 'react';
|
|
4
4
|
export type AppProps = AppPresets & {
|
|
5
5
|
appId: number | string;
|
|
6
6
|
authKey: string;
|
|
7
7
|
config?: Config.Options;
|
|
8
8
|
userId?: string;
|
|
9
9
|
userName?: string;
|
|
10
|
+
userEmail?: string;
|
|
10
11
|
userAvatar?: string;
|
|
11
12
|
userProfileLink?: string;
|
|
12
|
-
translation?:
|
|
13
|
+
translation?: string;
|
|
13
14
|
disableClickOutside?: boolean;
|
|
14
15
|
disableEscKeyPress?: boolean;
|
|
15
16
|
hideWidgetButton?: boolean;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ButtonProps } from './button';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
4
|
+
interface AlertDialogProps extends AlertDialogPrimitive.AlertDialogProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
cancelTitle?: string;
|
|
8
|
+
actionTitle?: string;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
onConfirm?: () => void;
|
|
11
|
+
rootProps?: AlertDialogPrimitive.AlertDialogProps;
|
|
12
|
+
triggerElement: React.ReactElement;
|
|
13
|
+
triggerProps?: AlertDialogPrimitive.AlertDialogTriggerProps;
|
|
14
|
+
portalProps?: AlertDialogPrimitive.AlertDialogPortalProps;
|
|
15
|
+
overlayProps?: AlertDialogPrimitive.AlertDialogOverlayProps;
|
|
16
|
+
contentProps?: AlertDialogPrimitive.AlertDialogContentProps;
|
|
17
|
+
headerProps?: React.ComponentProps<'div'>;
|
|
18
|
+
titleProps?: AlertDialogPrimitive.AlertDialogTitleProps;
|
|
19
|
+
descriptionProps?: AlertDialogPrimitive.AlertDialogDescriptionProps;
|
|
20
|
+
footerProps?: React.ComponentProps<'div'>;
|
|
21
|
+
cancelProps?: AlertDialogPrimitive.AlertDialogCancelProps;
|
|
22
|
+
cancelButtonProps?: ButtonProps;
|
|
23
|
+
actionProps?: AlertDialogPrimitive.AlertDialogActionProps;
|
|
24
|
+
actionButtonProps?: ButtonProps;
|
|
25
|
+
}
|
|
26
|
+
declare const AlertDialog: React.ForwardRefExoticComponent<AlertDialogProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
export { AlertDialog, type AlertDialogProps };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface AttachmentProps {
|
|
4
|
+
pending?: boolean;
|
|
5
|
+
uid?: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
mimeType?: string;
|
|
8
|
+
onReady?: () => void;
|
|
9
|
+
linkProps?: AttachmentLinkProps;
|
|
10
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
11
|
+
}
|
|
12
|
+
interface AttachmentLinkProps extends React.ComponentProps<'a'>, Omit<AttachmentProps, 'url' & 'containerProps' & 'mimeType'> {
|
|
13
|
+
}
|
|
14
|
+
interface AttachmentImageProps extends React.ComponentProps<'img'>, Omit<AttachmentProps, 'containerProps' & 'mimeType'> {
|
|
15
|
+
}
|
|
16
|
+
interface AttachmentAudioProps extends React.ComponentProps<'audio'>, Omit<AttachmentProps, 'linkProps' & 'mimeType'> {
|
|
17
|
+
}
|
|
18
|
+
interface AttachmentVideoProps extends React.ComponentProps<'video'>, Omit<AttachmentProps, 'linkProps' & 'mimeType'> {
|
|
19
|
+
maxSize?: number;
|
|
20
|
+
}
|
|
21
|
+
interface AttachmentFileProps extends LucideProps, Omit<AttachmentProps, 'containerProps' & 'mimeType'> {
|
|
22
|
+
name?: string | undefined;
|
|
23
|
+
iconElement?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
interface AttachmentFailedProps extends LucideProps, Omit<AttachmentProps, 'linkProps' & 'mimeType'> {
|
|
26
|
+
name?: string | undefined;
|
|
27
|
+
iconElement?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
declare const AttachmentLink: React.ForwardRefExoticComponent<Omit<AttachmentLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
30
|
+
declare const AttachmentAudio: React.ForwardRefExoticComponent<Omit<AttachmentAudioProps, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
31
|
+
declare const AttachmentVideo: React.ForwardRefExoticComponent<Omit<AttachmentVideoProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
32
|
+
declare const AttachmentImage: React.ForwardRefExoticComponent<Omit<AttachmentImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
33
|
+
declare function AttachmentFile({ url, name, pending, iconElement, linkProps, ...props }: AttachmentFileProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
declare namespace AttachmentFile {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
declare function AttachmentFailed({ name, pending, iconElement, containerProps, ...props }: AttachmentFailedProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
declare namespace AttachmentFailed {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
41
|
+
declare function AttachmentBase({ mimeType, onReady, containerProps, linkProps, ...props }: AttachmentProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
declare const Attachment: React.MemoExoticComponent<typeof AttachmentBase>;
|
|
43
|
+
export { Attachment, AttachmentLink, AttachmentImage, AttachmentAudio, AttachmentVideo, AttachmentFile, AttachmentFailed, type AttachmentLinkProps, type AttachmentImageProps, type AttachmentAudioProps, type AttachmentVideoProps, type AttachmentFileProps, type AttachmentFailedProps, type AttachmentProps, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PresenceStatus, PresenceBadgeProps } from './presence';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
+
interface AvatarProps extends AvatarPrimitive.AvatarProps {
|
|
5
|
+
src?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
fallbackIconElement?: React.ReactNode | undefined;
|
|
8
|
+
online?: boolean | undefined;
|
|
9
|
+
presence?: PresenceStatus;
|
|
10
|
+
onlineProps?: React.ComponentProps<'div'>;
|
|
11
|
+
presenceProps?: PresenceBadgeProps;
|
|
12
|
+
imageProps?: AvatarPrimitive.AvatarImageProps;
|
|
13
|
+
fallbackProps?: AvatarPrimitive.AvatarFallbackProps;
|
|
14
|
+
}
|
|
15
|
+
declare const Avatar: React.NamedExoticComponent<AvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { Avatar, type AvatarProps };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof badgeVariants> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
3
6
|
declare const badgeVariants: (props?: ({
|
|
4
7
|
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Badge, badgeVariants };
|
|
9
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLElement>>;
|
|
10
|
+
export { Badge, type BadgeProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface ButtonProps extends React.ComponentProps<'button'>, VariantProps<typeof buttonVariants> {
|
|
4
|
+
asChild?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
8
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button, buttonVariants, type ButtonProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AvatarProps } from './avatar';
|
|
2
|
+
import { FormattedDateProps } from './formatted-date';
|
|
3
|
+
import { StatusSentProps } from './status-sent';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
interface ChatBubbleProps extends React.ComponentProps<'div'> {
|
|
6
|
+
onView?: () => void;
|
|
7
|
+
isLast?: boolean;
|
|
8
|
+
date?: FormattedDateProps['date'];
|
|
9
|
+
language?: FormattedDateProps['language'];
|
|
10
|
+
formattedDateProps?: FormattedDateProps;
|
|
11
|
+
}
|
|
12
|
+
interface ChatBubbleMessageProps extends ChatBubbleProps {
|
|
13
|
+
fromMe: boolean;
|
|
14
|
+
sameSenderAbove: boolean;
|
|
15
|
+
title?: string;
|
|
16
|
+
senderName?: string;
|
|
17
|
+
senderAvatar?: AvatarProps['src'];
|
|
18
|
+
statusSent?: StatusSentProps['status'];
|
|
19
|
+
avatarProps?: AvatarProps;
|
|
20
|
+
bubbleProps?: React.ComponentProps<'div'>;
|
|
21
|
+
titleProps?: React.ComponentProps<'span'>;
|
|
22
|
+
statusSentProps?: StatusSentProps;
|
|
23
|
+
}
|
|
24
|
+
interface ChatBubbleInfoProps extends ChatBubbleProps {
|
|
25
|
+
info?: string | undefined;
|
|
26
|
+
iconElement?: React.ReactNode;
|
|
27
|
+
infoProps?: React.ComponentProps<'span'>;
|
|
28
|
+
}
|
|
29
|
+
declare const ChatBubbleMessage: React.NamedExoticComponent<Omit<ChatBubbleMessageProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
+
declare const ChatBubbleInfo: React.NamedExoticComponent<Omit<ChatBubbleInfoProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export { ChatBubbleMessage, ChatBubbleInfo, type ChatBubbleMessageProps, type ChatBubbleInfoProps };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TextareaAutosizeProps } from 'react-textarea-autosize';
|
|
2
|
+
import { LucideProps } from 'lucide-react';
|
|
3
|
+
import { LabelProps } from './label';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
interface ChatInputSendProps extends LabelProps {
|
|
6
|
+
onSend: () => void;
|
|
7
|
+
iconElement?: React.ReactNode;
|
|
8
|
+
iconProps?: LucideProps;
|
|
9
|
+
}
|
|
10
|
+
interface ChatInputProps extends TextareaAutosizeProps, Omit<React.ComponentProps<'textarea'>, 'style'> {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
pending?: boolean;
|
|
13
|
+
draft?: string;
|
|
14
|
+
onSend?: (value?: string) => void;
|
|
15
|
+
onDraft?: (value?: string) => void;
|
|
16
|
+
onTyping?: (typing?: boolean) => void;
|
|
17
|
+
onHeightGrow?: (data: {
|
|
18
|
+
height: number;
|
|
19
|
+
shift: number;
|
|
20
|
+
}) => void;
|
|
21
|
+
hideChatInputSend?: boolean;
|
|
22
|
+
chatInputSendProps?: ChatInputSendProps;
|
|
23
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
24
|
+
}
|
|
25
|
+
declare const ChatInput: React.ForwardRefExoticComponent<Omit<ChatInputProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
26
|
+
export { ChatInput, type ChatInputProps };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { VirtualizerProps, VirtualizerHandle } from 'virtua';
|
|
2
|
+
import { FilePickerDropzoneProps } from './file-picker';
|
|
3
|
+
import { QuickActionsProps } from './quick-actions';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
interface ChatListProps extends VirtualizerProps {
|
|
6
|
+
key: string;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
textareaMeasurement: {
|
|
9
|
+
height: number;
|
|
10
|
+
shift: number;
|
|
11
|
+
};
|
|
12
|
+
offsetToReach?: number;
|
|
13
|
+
onScrollStartReached?: () => void;
|
|
14
|
+
onScrollEndReached?: () => void;
|
|
15
|
+
onListReset?: (prev: string | undefined, next: string | undefined) => void;
|
|
16
|
+
onListCreate?: () => void;
|
|
17
|
+
onListGrow?: () => void;
|
|
18
|
+
enableFilePickerDropzone?: boolean;
|
|
19
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
20
|
+
filePickerDropzoneProps?: FilePickerDropzoneProps;
|
|
21
|
+
quickActionsProps?: QuickActionsProps;
|
|
22
|
+
quickActionsVisible?: boolean;
|
|
23
|
+
minItemsCount?: number;
|
|
24
|
+
}
|
|
25
|
+
interface ChatListHandle extends VirtualizerHandle {
|
|
26
|
+
scrollToBottom: (force?: boolean) => void;
|
|
27
|
+
setShift: (shift: boolean) => void;
|
|
28
|
+
}
|
|
29
|
+
declare const ChatList: React.ForwardRefExoticComponent<ChatListProps & React.RefAttributes<ChatListHandle>>;
|
|
30
|
+
export { ChatList, type ChatListProps, type ChatListHandle };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
4
|
+
interface CheckboxProps extends CheckboxPrimitive.CheckboxProps {
|
|
5
|
+
iconElement?: React.ReactNode;
|
|
6
|
+
iconProps?: LucideProps;
|
|
7
|
+
indicatorProps?: CheckboxPrimitive.CheckboxIndicatorProps;
|
|
8
|
+
}
|
|
9
|
+
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export { Checkbox, type CheckboxProps };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AvatarProps } from './avatar';
|
|
2
|
+
import { LucideProps } from 'lucide-react';
|
|
3
|
+
import { FormattedDateProps } from './formatted-date';
|
|
4
|
+
import { StatusSentProps } from './status-sent';
|
|
5
|
+
import { PresenceStatus } from './presence';
|
|
6
|
+
import { BadgeProps } from './badge';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
interface DialogItemProps extends React.ComponentProps<'div'> {
|
|
9
|
+
index?: number;
|
|
10
|
+
isPrivateDialog?: boolean;
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
onSelect?: () => void;
|
|
13
|
+
name: string;
|
|
14
|
+
photo?: string;
|
|
15
|
+
userOnline?: boolean;
|
|
16
|
+
userPresence?: PresenceStatus;
|
|
17
|
+
hasGroupIcon?: boolean;
|
|
18
|
+
lastSentStatus?: StatusSentProps['status'];
|
|
19
|
+
lastSentDate?: FormattedDateProps['date'];
|
|
20
|
+
lastSenderName?: string;
|
|
21
|
+
lastMessage?: string;
|
|
22
|
+
typingStatusText?: string;
|
|
23
|
+
draft?: string;
|
|
24
|
+
draftLabel?: string;
|
|
25
|
+
unreadCount?: number;
|
|
26
|
+
language?: string;
|
|
27
|
+
divider?: 'top' | 'bottom' | 'both' | 'none';
|
|
28
|
+
avatarProps?: AvatarProps;
|
|
29
|
+
contentProps?: React.ComponentProps<'div'>;
|
|
30
|
+
headerProps?: React.ComponentProps<'div'>;
|
|
31
|
+
headerLeftProps?: React.ComponentProps<'div'>;
|
|
32
|
+
groupIconProps?: LucideProps;
|
|
33
|
+
nameProps?: React.ComponentProps<'span'>;
|
|
34
|
+
headerRightProps?: React.ComponentProps<'div'>;
|
|
35
|
+
statusSentIconProps?: StatusSentProps;
|
|
36
|
+
formattedDateProps?: FormattedDateProps;
|
|
37
|
+
footerProps?: React.ComponentProps<'div'>;
|
|
38
|
+
lastMessageProps?: React.ComponentProps<'span'>;
|
|
39
|
+
draftLabelProps?: React.ComponentProps<'span'>;
|
|
40
|
+
lastSenderNameProps?: React.ComponentProps<'span'>;
|
|
41
|
+
unreadBadgeProps?: BadgeProps;
|
|
42
|
+
dividerProps?: React.ComponentProps<'div'>;
|
|
43
|
+
}
|
|
44
|
+
declare const DialogItem: React.NamedExoticComponent<Omit<DialogItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
export { DialogItem, type DialogItemProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { VListHandle, VListProps } from 'virtua';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface DialogsListProps extends VListProps {
|
|
4
|
+
pending?: boolean;
|
|
5
|
+
pendingListLength?: number;
|
|
6
|
+
offsetToReach?: number;
|
|
7
|
+
placeholderVisible?: boolean;
|
|
8
|
+
placeholderTitles?: string[];
|
|
9
|
+
onScrollStartReached?: () => void;
|
|
10
|
+
onScrollEndReached?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const DialogsList: React.ForwardRefExoticComponent<DialogsListProps & React.RefAttributes<VListHandle>>;
|
|
13
|
+
export { DialogsList, type DialogsListProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface DismissLayerProps extends React.ComponentProps<'div'> {
|
|
3
|
+
active: boolean;
|
|
4
|
+
onDismiss: () => void;
|
|
5
|
+
disableClickOutside?: boolean;
|
|
6
|
+
disableEscKeyPress?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const DismissLayer: React.ForwardRefExoticComponent<Omit<DismissLayerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { DismissLayer, type DismissLayerProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import { LabelProps } from './label';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
interface FilePickerInputProps extends React.ComponentProps<'input'> {
|
|
5
|
+
onSelectFile?: (files: File[]) => void;
|
|
6
|
+
onInvalidFile?: () => void;
|
|
7
|
+
iconElement?: React.ReactNode;
|
|
8
|
+
labelProps?: LabelProps;
|
|
9
|
+
iconProps?: LucideProps;
|
|
10
|
+
}
|
|
11
|
+
interface FilePickerDropzoneProps extends FilePickerInputProps {
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
dropZoneProps?: React.ComponentProps<'div'>;
|
|
15
|
+
placeholderContainerProps?: React.ComponentProps<'div'>;
|
|
16
|
+
iconProps?: LucideProps;
|
|
17
|
+
placeholderProps?: React.ComponentProps<'span'>;
|
|
18
|
+
}
|
|
19
|
+
declare const FilePickerInput: React.ForwardRefExoticComponent<Omit<FilePickerInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
20
|
+
declare const FilePickerDropzone: React.ForwardRefExoticComponent<Omit<FilePickerDropzoneProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { FilePickerInput, FilePickerDropzone, FilePickerInput as Input, FilePickerDropzone as Dropzone, type FilePickerInputProps, type FilePickerDropzoneProps, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface FormattedDateProps extends React.ComponentProps<'span'> {
|
|
3
|
+
date?: Date | string | number | null | undefined;
|
|
4
|
+
language?: string;
|
|
5
|
+
distanceToNow?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const FormattedDate: React.NamedExoticComponent<Omit<FormattedDateProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
8
|
+
export { FormattedDate, type FormattedDateProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type InputProps = React.ComponentProps<'input'>;
|
|
3
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export { Input, type InputProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface LinkPreviewProps extends React.ComponentProps<'a'> {
|
|
4
|
+
thin?: boolean;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ComponentProps<'img'>['src'];
|
|
8
|
+
image?: React.ComponentProps<'img'>['src'];
|
|
9
|
+
onReady?: () => void;
|
|
10
|
+
iconFallbackElement?: React.ReactElement;
|
|
11
|
+
titleContainerProps?: React.ComponentProps<'div'>;
|
|
12
|
+
iconProps?: React.ComponentProps<'img'>;
|
|
13
|
+
iconFallbackProps?: LucideProps;
|
|
14
|
+
titleProps?: React.ComponentProps<'span'>;
|
|
15
|
+
descriptionProps?: React.ComponentProps<'div'>;
|
|
16
|
+
imageContainerProps?: React.ComponentProps<'div'>;
|
|
17
|
+
imageProps?: React.ComponentProps<'img'>;
|
|
18
|
+
}
|
|
19
|
+
declare const LinkPreview: React.NamedExoticComponent<Omit<LinkPreviewProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
20
|
+
export { LinkPreview, type LinkPreviewProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Opts } from 'linkifyjs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface LinkifyTextProps extends React.ComponentProps<'p'> {
|
|
4
|
+
text?: string;
|
|
5
|
+
pending?: boolean;
|
|
6
|
+
onReady?: () => void;
|
|
7
|
+
linkifyProps?: Opts;
|
|
8
|
+
skeletonContainerProps?: React.ComponentProps<'div'>;
|
|
9
|
+
skeletonLineProps?: React.ComponentProps<'span'>;
|
|
10
|
+
skeletonLinesClassNames?: string[];
|
|
11
|
+
}
|
|
12
|
+
declare const LinkifyText: React.NamedExoticComponent<Omit<LinkifyTextProps, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
13
|
+
export { LinkifyText, type LinkifyTextProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface PlaceholderTextProps extends React.ComponentProps<'div'> {
|
|
3
|
+
title?: string;
|
|
4
|
+
titles?: string[];
|
|
5
|
+
rowProps?: React.ComponentProps<'div'>;
|
|
6
|
+
}
|
|
7
|
+
declare const PlaceholderText: React.ForwardRefExoticComponent<Omit<PlaceholderTextProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export { PlaceholderText, type PlaceholderTextProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type PresenceStatus = 'available' | 'busy' | 'away' | 'unknown' | undefined;
|
|
3
|
+
interface PresenceProps extends React.ComponentProps<'div'> {
|
|
4
|
+
badge?: boolean;
|
|
5
|
+
status: PresenceStatus;
|
|
6
|
+
label: string;
|
|
7
|
+
badgeProps?: PresenceBadgeProps;
|
|
8
|
+
labelProps?: React.ComponentProps<'span'>;
|
|
9
|
+
}
|
|
10
|
+
interface PresenceBadgeProps extends React.ComponentProps<'svg'> {
|
|
11
|
+
status?: PresenceStatus;
|
|
12
|
+
}
|
|
13
|
+
declare function PresenceBadge({ status, ...props }: PresenceBadgeProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
declare namespace PresenceBadge {
|
|
15
|
+
var displayName: string;
|
|
16
|
+
}
|
|
17
|
+
declare function Presence({ badge, status, label, badgeProps, labelProps, ...props }: PresenceProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare namespace Presence {
|
|
19
|
+
var displayName: string;
|
|
20
|
+
}
|
|
21
|
+
export { Presence, PresenceBadge, type PresenceStatus, type PresenceProps, type PresenceBadgeProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface QuickActionsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
actions?: string[];
|
|
6
|
+
onAction?: (action: string) => void;
|
|
7
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
8
|
+
titleProps?: React.ComponentProps<'h2'>;
|
|
9
|
+
descriptionProps?: React.ComponentProps<'span'>;
|
|
10
|
+
actionProps?: React.ComponentProps<'div'>;
|
|
11
|
+
}
|
|
12
|
+
declare const QuickActions: React.ForwardRefExoticComponent<QuickActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { QuickActions, type QuickActionsProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputProps } from './input';
|
|
2
|
+
import { LucideProps } from 'lucide-react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
interface SearchProps extends InputProps {
|
|
5
|
+
onSearch?: (value: string) => void;
|
|
6
|
+
onCancel?: () => void;
|
|
7
|
+
hasSearchIcon?: boolean;
|
|
8
|
+
hasCancelIcon?: boolean;
|
|
9
|
+
searchIconProps?: LucideProps;
|
|
10
|
+
cancelIconProps?: LucideProps;
|
|
11
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
12
|
+
}
|
|
13
|
+
declare const Search: React.ForwardRefExoticComponent<Omit<SearchProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export { Search, type SearchProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface SpinnerProps extends LucideProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
type?: 'default' | 'circle';
|
|
6
|
+
layout?: 'absolute' | 'centered' | 'overlay' | 'flow';
|
|
7
|
+
}
|
|
8
|
+
declare const Spinner: React.FC<SpinnerProps>;
|
|
9
|
+
export { Spinner, type SpinnerProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface StatusCallProps extends LucideProps {
|
|
4
|
+
fromMe?: boolean;
|
|
5
|
+
status?: 'reject' | 'notAnswer' | 'hungUp' | 'cancel' | undefined;
|
|
6
|
+
}
|
|
7
|
+
declare const StatusCall: React.FC<StatusCallProps>;
|
|
8
|
+
export { StatusCall, type StatusCallProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
3
|
+
type StatusName = string | 'unknown';
|
|
4
|
+
interface StatusIndicatorProps extends React.ComponentProps<'div'> {
|
|
5
|
+
status?: StatusName;
|
|
6
|
+
statusColorConfig?: Record<StatusName, string>;
|
|
7
|
+
statusProps?: React.ComponentProps<'div'>;
|
|
8
|
+
tooltipProviderProps?: TooltipPrimitive.TooltipProviderProps;
|
|
9
|
+
tooltipProps?: TooltipPrimitive.TooltipProps;
|
|
10
|
+
tooltipTriggerProps?: TooltipPrimitive.TooltipTriggerProps;
|
|
11
|
+
tooltipPortalProps?: TooltipPrimitive.TooltipPortalProps;
|
|
12
|
+
tooltipContentProps?: TooltipPrimitive.TooltipContentProps;
|
|
13
|
+
tooltipArrowProps?: TooltipPrimitive.TooltipArrowProps;
|
|
14
|
+
tooltip?: string;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const StatusIndicator: React.ForwardRefExoticComponent<Omit<StatusIndicatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { StatusIndicator, type StatusName, type StatusIndicatorProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface StatusSentProps extends LucideProps {
|
|
4
|
+
status?: 'wait' | 'sent' | 'read' | 'lost' | null | undefined;
|
|
5
|
+
}
|
|
6
|
+
declare const StatusSent: React.FC<StatusSentProps>;
|
|
7
|
+
export { StatusSent, type StatusSentProps };
|
|
@@ -1,47 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { LucideProps } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface StreamViewProps extends React.ComponentProps<'video'> {
|
|
4
4
|
stream?: MediaStream | null;
|
|
5
5
|
mirror?: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} & React.VideoHTMLAttributes<HTMLVideoElement> & React.RefAttributes<HTMLVideoElement>>;
|
|
12
|
-
export declare const LocalStreamView: React.ForwardRefExoticComponent<{
|
|
13
|
-
id?: string;
|
|
14
|
-
stream?: MediaStream | null;
|
|
15
|
-
mirror?: boolean;
|
|
16
|
-
} & React.VideoHTMLAttributes<HTMLVideoElement> & React.RefAttributes<HTMLVideoElement>>;
|
|
17
|
-
export declare const RemoteStreamView: React.ForwardRefExoticComponent<{
|
|
18
|
-
id?: string;
|
|
19
|
-
stream?: MediaStream | null;
|
|
20
|
-
mirror?: boolean;
|
|
21
|
-
} & React.VideoHTMLAttributes<HTMLVideoElement> & React.RefAttributes<HTMLVideoElement>>;
|
|
22
|
-
export type FullscreenStreamViewProps = {
|
|
6
|
+
}
|
|
7
|
+
declare const StreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
8
|
+
declare const LocalStreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
9
|
+
declare const RemoteStreamView: React.ForwardRefExoticComponent<Omit<StreamViewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
10
|
+
interface FullscreenStreamViewProps extends React.ComponentProps<'div'> {
|
|
23
11
|
element: React.ReactElement<StreamViewProps>;
|
|
24
12
|
pipElement?: React.ReactElement<StreamViewProps>;
|
|
25
13
|
navElement?: React.ReactElement<HTMLElement>;
|
|
26
14
|
hideIconElement?: React.ReactElement;
|
|
27
15
|
showIconElement?: React.ReactElement;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fullscreenButtonIconProps?: React.HTMLAttributes<SVGElement>;
|
|
37
|
-
pipContainerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
38
|
-
pipButtonProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
39
|
-
pipButtonIconProps?: React.HTMLAttributes<SVGElement>;
|
|
40
|
-
};
|
|
41
|
-
export type FullscreenStreamViewRef = {
|
|
16
|
+
containerProps?: React.ComponentProps<'div'>;
|
|
17
|
+
fullscreenButtonProps?: React.ComponentProps<'button'>;
|
|
18
|
+
fullscreenButtonIconProps?: LucideProps;
|
|
19
|
+
pipProps?: React.ComponentProps<'div'>;
|
|
20
|
+
pipButtonProps?: React.ComponentProps<'button'>;
|
|
21
|
+
pipButtonIconProps?: LucideProps;
|
|
22
|
+
}
|
|
23
|
+
interface FullscreenStreamViewRef extends React.ComponentRef<'div'> {
|
|
42
24
|
isFullscreen: boolean;
|
|
43
25
|
isPictureInPicture: boolean;
|
|
44
26
|
toggleFullscreen: () => Promise<void>;
|
|
45
27
|
togglePictureInPicture: () => void;
|
|
46
|
-
}
|
|
47
|
-
|
|
28
|
+
}
|
|
29
|
+
declare const FullscreenStreamView: React.ForwardRefExoticComponent<Omit<FullscreenStreamViewProps, "ref"> & React.RefAttributes<FullscreenStreamViewRef>>;
|
|
30
|
+
export { StreamView, LocalStreamView, RemoteStreamView, FullscreenStreamView, type StreamViewProps, type FullscreenStreamViewProps, type FullscreenStreamViewRef, };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
3
|
+
type SwitchProps = React.ComponentProps<typeof SwitchPrimitive.Root>;
|
|
4
|
+
declare function Switch(props: SwitchProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export { Switch, type SwitchProps };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AIDropdownMenuSubKeys } from '../../../../helpers/widget';
|
|
3
|
-
import {
|
|
3
|
+
import { LanguageModelV3 } from '@ai-sdk/provider';
|
|
4
4
|
type AIDropdownChangeToneProps = {
|
|
5
5
|
activeKey: AIDropdownMenuSubKeys;
|
|
6
6
|
setActiveKey: (active: AIDropdownMenuSubKeys) => void;
|
|
7
7
|
enabled: boolean;
|
|
8
|
-
aiModel:
|
|
8
|
+
aiModel: LanguageModelV3;
|
|
9
9
|
message: string;
|
|
10
10
|
changeMessage: (message: string) => void;
|
|
11
11
|
setProcessing: (processing: boolean) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { AIDropdownMenuSubKeys } from '../../../../helpers/widget';
|
|
3
|
-
import {
|
|
3
|
+
import { LanguageModelV3 } from '@ai-sdk/provider';
|
|
4
4
|
type AIDropdownGetSummaryProps = {
|
|
5
5
|
activeKey: AIDropdownMenuSubKeys;
|
|
6
6
|
setActiveKey: (active: AIDropdownMenuSubKeys) => void;
|
|
7
7
|
enabled: boolean;
|
|
8
|
-
aiModel:
|
|
8
|
+
aiModel: LanguageModelV3;
|
|
9
9
|
};
|
|
10
10
|
declare const AIDropdownGetSummary: React.FC<AIDropdownGetSummaryProps>;
|
|
11
11
|
export default AIDropdownGetSummary;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Dialogs } from '@connectycube/react';
|
|
3
|
-
export interface
|
|
3
|
+
export interface ChatFooterProps {
|
|
4
4
|
onSendMessage: (message: string, dialog?: Dialogs.Dialog) => void;
|
|
5
5
|
onSendAttachment: (files: File[]) => void;
|
|
6
|
-
|
|
6
|
+
onHeightGrow: React.Dispatch<React.SetStateAction<{
|
|
7
|
+
height: number;
|
|
8
|
+
shift: number;
|
|
9
|
+
}>>;
|
|
7
10
|
}
|
|
8
|
-
declare const _default: React.NamedExoticComponent<
|
|
11
|
+
declare const _default: React.NamedExoticComponent<ChatFooterProps>;
|
|
9
12
|
export default _default;
|