@connectycube/chat-widget 0.10.0

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.
Files changed (46) hide show
  1. package/README.md +142 -0
  2. package/dist/App.d.ts +19 -0
  3. package/dist/AppContext.d.ts +7 -0
  4. package/dist/AppProvider.d.ts +10 -0
  5. package/dist/components/home/home.d.ts +2 -0
  6. package/dist/components/home/main/chat-header.d.ts +6 -0
  7. package/dist/components/home/main/chat-info.d.ts +7 -0
  8. package/dist/components/home/main/chat-input.d.ts +8 -0
  9. package/dist/components/home/main/group-member.d.ts +8 -0
  10. package/dist/components/home/main/main.d.ts +2 -0
  11. package/dist/components/home/main/message.d.ts +11 -0
  12. package/dist/components/home/sidebar/chat-item.d.ts +7 -0
  13. package/dist/components/home/sidebar/chats-list.d.ts +6 -0
  14. package/dist/components/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +8 -0
  15. package/dist/components/home/sidebar/new-chat/create-group-chat/participant.d.ts +7 -0
  16. package/dist/components/home/sidebar/new-chat/new-chat-dialog.d.ts +9 -0
  17. package/dist/components/home/sidebar/new-chat/searched-user.d.ts +13 -0
  18. package/dist/components/home/sidebar/sidebar.d.ts +5 -0
  19. package/dist/components/home/sidebar/tabs/chats-tab.d.ts +2 -0
  20. package/dist/components/home/sidebar/tabs/users-tab.d.ts +5 -0
  21. package/dist/components/home/sidebar/user-item.d.ts +7 -0
  22. package/dist/components/home/sidebar/users-list.d.ts +7 -0
  23. package/dist/components/login.d.ts +6 -0
  24. package/dist/components/shadcn-ui/alert-dialog.d.ts +20 -0
  25. package/dist/components/shadcn-ui/avatar.d.ts +6 -0
  26. package/dist/components/shadcn-ui/badge.d.ts +9 -0
  27. package/dist/components/shadcn-ui/button.d.ts +11 -0
  28. package/dist/components/shadcn-ui/dialog.d.ts +19 -0
  29. package/dist/components/shadcn-ui/dropdown-menu.d.ts +27 -0
  30. package/dist/components/shadcn-ui/input.d.ts +3 -0
  31. package/dist/components/shadcn-ui/label.d.ts +5 -0
  32. package/dist/components/shadcn-ui/switch.d.ts +4 -0
  33. package/dist/components/shadcn-ui/tabs.d.ts +7 -0
  34. package/dist/components/shared/avatar.d.ts +8 -0
  35. package/dist/components/shared/confirmation-alert.d.ts +8 -0
  36. package/dist/components/shared/loader.d.ts +5 -0
  37. package/dist/connectycube.d.ts +18 -0
  38. package/dist/hooks/useAppContext.d.ts +3 -0
  39. package/dist/hooks/useNotificationSound.d.ts +2 -0
  40. package/dist/hooks/usePageFocus.d.ts +2 -0
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.es.js +12621 -0
  43. package/dist/index.umd.js +116 -0
  44. package/dist/lib/utils.d.ts +2 -0
  45. package/dist/main.d.ts +0 -0
  46. package/package.json +100 -0
package/README.md ADDED
@@ -0,0 +1,142 @@
1
+ # ConnectyCube Chat Widget
2
+
3
+ A React component that seamlessly integrates ConnectyCube's real-time chat capabilities into your web applications. This widget offers an out-of-the-box solution for embedding chat features—such as instant messaging, user presence, and file sharing—without the overhead of building a complete chat system from scratch.
4
+
5
+ ## Overview
6
+
7
+ The ConnectyCube Web Chat Widget for React is designed to simplify the process of adding chat functionality to your React apps. With a few configuration steps and minimal code, you can quickly enable robust, real-time communication powered by ConnectyCube. Key benefits include:
8
+
9
+ - **Easy Integration:** Plug the widget into your existing React projects.
10
+ - **Customizable Interface:** Adjust the look and feel to match your brand.
11
+ - **Real-Time Messaging:** Leverage ConnectyCube's reliable backend for instant communication.
12
+ - **Responsive Design:** Works seamlessly on both desktop and mobile devices.
13
+ - **Modular and Extensible:** Adapt the widget to your unique requirements.
14
+
15
+ ## Installation
16
+
17
+ ### React
18
+
19
+ ```
20
+ npm install @connectycube/chat-widget
21
+ ```
22
+
23
+ or
24
+
25
+ ```
26
+ yarn add @connectycube/chat-widget
27
+ ```
28
+
29
+ ### Vanilla JS
30
+
31
+ Add the following scripts on your html page somewhere in `head` element:
32
+
33
+ ```
34
+ <script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
35
+ <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
36
+ <script src="https://unpkg.com/connectycube@4/dist/connectycube.min.js"></script>
37
+ <script src="https://unpkg.com/@connectycube/chat-widget@latest/dist/index.umd.js"></script>
38
+ ```
39
+
40
+ ## Usage
41
+
42
+ ### Before you start
43
+
44
+ Before you start, make sure:
45
+
46
+ 1. You have access to your ConnectyCube account. If you don’t have an account, [sign up here](https://admin.connectycube.com/register).
47
+ 2. An app created in ConnectyCube dashboard. Once logged into [your ConnectyCube account](https://admin.connectycube.com/), create a new application and make a note of the app credentials (**App ID** and **Authorization Key**) that you’ll need for authentication.
48
+
49
+ ### Display widget
50
+
51
+ #### React
52
+
53
+ Import and place the following component in your app:
54
+
55
+ ```js
56
+ import ConnectyCubeChatWidget from "@connectycube/chat-widget";
57
+
58
+ ...
59
+
60
+ <ConnectyCubeChatWidget
61
+ userName={"Samuel"}
62
+ userId={111}
63
+ appId="111"
64
+ authKey="11111111-2222-3333-4444-55555555"
65
+ config={{ debug: { mode: 1 } }}
66
+ showOnlineUsersTab={false}
67
+ splitView={true}
68
+ />
69
+
70
+ // userName - how other users will see your user name
71
+ // userId - a User Id from your system
72
+ ```
73
+
74
+ See chat widget code samples https://github.com/ConnectyCube/connectycube-chat-widget-samples as a reference for faster integration.
75
+
76
+ #### Vanilla JS
77
+
78
+ Place the following script in your app:
79
+
80
+ ```html
81
+ <!doctype html>
82
+ <html lang="en">
83
+ <head>
84
+ <!-- ... -->
85
+ </head>
86
+ <body>
87
+ <!-- ... -->
88
+ <!-- @connectycube/chat-widget - start -->
89
+ <script src="https://unpkg.com/react@18/umd/react.production.min.js" crossorigin></script>
90
+ <script src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js" crossorigin></script>
91
+ <script src="https://unpkg.com/connectycube@4/dist/connectycube.min.js"></script>
92
+ <script src="https://unpkg.com/@connectycube/chat-widget@latest/dist/index.umd.js"></script>
93
+ <script>
94
+ const chatWidgetContainer = document.createElement('div');
95
+ chatWidgetContainer.id = 'ConnectyCube_chat-widget';
96
+ document.body.appendChild(chatWidgetContainer);
97
+ const props = {
98
+ appId: 1111,
99
+ authKey: '11111111-2222-3333-4444-55555555',
100
+ config: { debug: { mode: 1 } },
101
+ userName: 'Samuel', // how other users will see your user name
102
+ userId: 111, // a User Id from your system
103
+ showOnlineUsersTab: false,
104
+ splitView: true,
105
+ };
106
+ ReactDOM.createRoot(chatWidgetContainer).render(React.createElement(ConnectyCubeChatWidget, props));
107
+ </script>
108
+ <!-- @connectycube/chat-widget - end -->
109
+ </body>
110
+ </html>
111
+ ```
112
+
113
+ See chat widget code samples https://github.com/ConnectyCube/connectycube-chat-widget-samples as a reference for faster integration.
114
+
115
+ ## Props
116
+
117
+ | Prop Name | Type | Description |
118
+ | -------------------- | --------------------- | ------------------------------------------------------------- |
119
+ | `appId` | `number \| string` | The ConnectyCube Application ID |
120
+ | `authKey` | `string` | The ConnectyCube Authentication Key |
121
+ | `config` | `object` | _(Optional)_ Configuration options for ConnectyCube SDK |
122
+ | `userId` | `string` | A User Id from your system (at least 3 characters) |
123
+ | `userName` | `string` | User's name. This is how other users will see your user name |
124
+ | `muted` | `boolean` (`false`) | _(Optional)_ Do not play sound on incoming message |
125
+ | `splitView` | `boolean` (`false`) | _(Optional)_ Displays the chats in split view or single view |
126
+ | `showOnlineUsersTab` | `boolean` (`false`) | _(Optional)_ Displays users tab with the list of online users |
127
+ | `buttonStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the button |
128
+ | `portalStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the portal |
129
+ | `badgeStyle` | `React.CSSProperties` | _(Optional)_ Inline styles for the badge |
130
+ | `buttonClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the button |
131
+ | `portalClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the chat |
132
+ | `badgeClassName` | `string` | _(Optional)_ CSS class or Tailwind CSS classes for the badge |
133
+
134
+ ## Community and support
135
+
136
+ - [Blog](https://connectycube.com/blog)
137
+ - X (twitter)[@ConnectyCube](https://x.com/ConnectyCube)
138
+ - [Facebook](https://www.facebook.com/ConnectyCube)
139
+
140
+ ## Website
141
+
142
+ [https://connectycube.com](https://connectycube.com)
package/dist/App.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ import { Config } from '../../../node_modules/connectycube/dist/types/types';
2
+ type AppProps = {
3
+ appId: Config.Credentials['appId'];
4
+ authKey: Config.Credentials['authKey'];
5
+ userId?: string;
6
+ userName?: string;
7
+ config?: Config.Options;
8
+ muted?: boolean;
9
+ splitView?: boolean;
10
+ showOnlineUsersTab?: boolean;
11
+ buttonStyle?: React.CSSProperties;
12
+ portalStyle?: React.CSSProperties;
13
+ badgeStyle?: React.CSSProperties;
14
+ buttonClassName?: string;
15
+ portalClassName?: string;
16
+ badgeClassName?: string;
17
+ };
18
+ declare const App: React.FC<AppProps>;
19
+ export default App;
@@ -0,0 +1,7 @@
1
+ export interface AppContextProps {
2
+ muted: boolean;
3
+ splitView: boolean;
4
+ showOnlineUsersTab: boolean;
5
+ setUnreadCount: (c: number) => void;
6
+ }
7
+ export declare const AppContext: import('react').Context<AppContextProps | undefined>;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ interface AppProviderProps {
3
+ children?: React.ReactNode;
4
+ muted: boolean;
5
+ splitView: boolean;
6
+ showOnlineUsersTab: boolean;
7
+ setUnreadCount: (c: number) => void;
8
+ }
9
+ export declare const AppProvider: React.FC<AppProviderProps>;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ declare const Home: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Home;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatHeaderProps {
3
+ toggleProfile: () => void;
4
+ }
5
+ declare const _default: React.NamedExoticComponent<ChatHeaderProps>;
6
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatInfoProps {
3
+ showProfile: boolean;
4
+ toggleProfile: () => void;
5
+ }
6
+ declare const _default: React.NamedExoticComponent<ChatInfoProps>;
7
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatInputProps {
3
+ sendMessage: (message: string) => void;
4
+ sendMessageWithAttachment: (file: File) => void;
5
+ sendTypingStatus: () => void;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<ChatInputProps>;
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface GroupMemberProps {
3
+ userId: number;
4
+ name: string;
5
+ avatar?: string;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<GroupMemberProps>;
8
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const Main: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Main;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { Messages } from '../../../../../../node_modules/connectycube/dist/types/types';
3
+ export interface MessageProps {
4
+ message: Messages.Message;
5
+ isGroupChat: boolean;
6
+ dialogName: string;
7
+ senderName: string;
8
+ senderAvatar: string;
9
+ }
10
+ declare const Message: React.FC<MessageProps>;
11
+ export default Message;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { Dialogs } from '../../../../../../node_modules/connectycube/dist/types/types';
3
+ export interface ChatItemProps {
4
+ dialog: Dialogs.Dialog;
5
+ }
6
+ declare const ChatItem: React.FC<ChatItemProps>;
7
+ export default ChatItem;
@@ -0,0 +1,6 @@
1
+ import { default as React } from 'react';
2
+ export interface ChatsListProps {
3
+ searchTerm?: string;
4
+ }
5
+ declare const ChatsList: React.FC<ChatsListProps>;
6
+ export default ChatsList;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { Users } from '../../../../../../../../node_modules/connectycube/dist/types/types';
3
+ export interface CreateGroupChatProps {
4
+ users: Users.User[];
5
+ onCreateChat: (name: string) => void;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<CreateGroupChatProps>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface ParticipantProps {
3
+ avatar?: string;
4
+ name: string;
5
+ }
6
+ declare const _default: React.NamedExoticComponent<ParticipantProps>;
7
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export type ChatType = 'private' | 'group';
3
+ export interface NewChatDialogProps {
4
+ chatType: ChatType;
5
+ addUsersMode?: boolean;
6
+ onFinish: () => void;
7
+ }
8
+ declare const _default: React.NamedExoticComponent<NewChatDialogProps>;
9
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { ChatType } from './new-chat-dialog';
3
+ export interface SearchedUserProps {
4
+ id: number;
5
+ name: string;
6
+ avatar?: string;
7
+ chatType: ChatType;
8
+ onStartChat: (userId: number) => void;
9
+ isSelected: boolean;
10
+ onSelectUser: (userId: number, isSelected: boolean) => void;
11
+ }
12
+ declare const _default: React.NamedExoticComponent<SearchedUserProps>;
13
+ export default _default;
@@ -0,0 +1,5 @@
1
+ export interface SideBarProps {
2
+ showOnlineUsersTab?: boolean;
3
+ }
4
+ declare const SideBar: React.FC<SideBarProps>;
5
+ export default SideBar;
@@ -0,0 +1,2 @@
1
+ declare const ChatsTab: React.FC;
2
+ export default ChatsTab;
@@ -0,0 +1,5 @@
1
+ type UsersTabProps = {
2
+ onUser: () => void;
3
+ };
4
+ declare const UsersTab: React.FC<UsersTabProps>;
5
+ export default UsersTab;
@@ -0,0 +1,7 @@
1
+ import { Users } from '../../../../../../node_modules/connectycube/dist/types/types';
2
+ export interface UserItemProps {
3
+ user: Users.User;
4
+ onUser: () => void;
5
+ }
6
+ declare const UserItem: React.FC<UserItemProps>;
7
+ export default UserItem;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface UsersListProps {
3
+ searchTerm?: string;
4
+ onUser: () => void;
5
+ }
6
+ declare const UsersList: React.FC<UsersListProps>;
7
+ export default UsersList;
@@ -0,0 +1,6 @@
1
+ type LoginProps = {
2
+ login?: string;
3
+ name?: string;
4
+ };
5
+ declare const Login: React.FC<LoginProps>;
6
+ export default Login;
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
5
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "destructive" | "outline" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
7
+ }
8
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,11 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
8
+ asChild?: boolean;
9
+ }
10
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Button, buttonVariants };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DialogHeader: {
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ displayName: string;
12
+ };
13
+ declare const DialogFooter: {
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
18
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
19
+ export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
7
+ declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
8
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
15
+ inset?: boolean;
16
+ } & React.RefAttributes<HTMLDivElement>>;
17
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
18
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ inset?: boolean;
21
+ } & React.RefAttributes<HTMLDivElement>>;
22
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const DropdownMenuShortcut: {
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
25
+ displayName: string;
26
+ };
27
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
3
+ export { Input };
@@ -0,0 +1,5 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ import * as LabelPrimitive from "@radix-ui/react-label";
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ export interface AvatarProps {
3
+ imageUID?: string;
4
+ name: string;
5
+ className?: string | undefined;
6
+ }
7
+ declare const _default: React.NamedExoticComponent<AvatarProps>;
8
+ export default _default;
@@ -0,0 +1,8 @@
1
+ import { ReactElement } from 'react';
2
+ export interface ConfirmationAlertProps {
3
+ triggerChild: ReactElement;
4
+ title: string;
5
+ body: string;
6
+ onConfirm: () => void;
7
+ }
8
+ export declare const ConfirmationAlert: React.FC<ConfirmationAlertProps>;
@@ -0,0 +1,5 @@
1
+ export interface LoaderProps {
2
+ className?: string;
3
+ }
4
+ declare const Loader: React.FC<LoaderProps>;
5
+ export default Loader;
@@ -0,0 +1,18 @@
1
+ import { Chat, Users, Auth } from '../../../node_modules/connectycube/dist/types/types';
2
+ export declare const SESSION_KEY = "@connectycube/chat-widget:session";
3
+ export declare const tryReuseSession: (userName?: string) => Promise<boolean>;
4
+ export declare const tryRestoreSession: () => Promise<Auth.Session | null>;
5
+ export declare const createUserSession: (login: string, password: string) => Promise<Auth.Session>;
6
+ export declare const createSession: (login?: string, name?: string) => Promise<Auth.Session | null>;
7
+ export declare const destroyUserSession: () => Promise<void>;
8
+ export declare const userSignup: (login: string, password: string, name?: string) => Promise<Auth.Session>;
9
+ export declare const chatCredentials: () => Chat.ConnectionParams | null;
10
+ export declare const updateUserProfileIfNeeded: (session: Auth.Session, name?: string) => Promise<void>;
11
+ export declare const setSessionToLocalStorage: (session: Auth.Session) => void;
12
+ export declare const getSessionFromLocalStorage: () => Auth.Session | null;
13
+ export declare const getCurrentUser: () => Users.User | null | undefined;
14
+ export declare const getSessionToken: () => string | null;
15
+ export declare const getSessionUserId: () => number | null;
16
+ export declare const isSessionExpired: () => boolean;
17
+ export declare const sha256: (str: string) => Promise<string>;
18
+ export declare const getUserName: (user: Users.User | null | undefined) => string;
@@ -0,0 +1,3 @@
1
+ import { AppContextProps } from '../AppContext';
2
+ declare function useAppContext(): AppContextProps;
3
+ export default useAppContext;
@@ -0,0 +1,2 @@
1
+ declare function useNotificationSound(): () => void;
2
+ export default useNotificationSound;
@@ -0,0 +1,2 @@
1
+ declare function usePageFocus(): boolean;
2
+ export default usePageFocus;
@@ -0,0 +1 @@
1
+ export { default } from './App';