@connectycube/chat-widget 0.36.0 → 0.37.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.
- package/README.md +203 -0
- package/dist/index.es.js +9802 -3634
- package/dist/index.umd.js +155 -99
- package/dist/react18.es.js +10020 -3852
- package/dist/types/App.d.ts +1 -1
- package/dist/types/components/calls/calls-nav-buttons.d.ts +5 -0
- package/dist/types/components/calls/calls-screen.d.ts +2 -0
- package/dist/types/components/connectycube-ui/stream-view.d.ts +47 -0
- package/dist/types/components/connectycube-ui/utils.d.ts +3 -0
- package/dist/types/components/home/main/chat-info-user.d.ts +1 -1
- package/dist/types/components/home/main/chat-input.d.ts +2 -2
- package/dist/types/components/home/main/message/call-message.d.ts +1 -1
- package/dist/types/components/home/main/message/message-attachment.d.ts +1 -1
- package/dist/types/components/home/main/message/message-status-mark.d.ts +1 -1
- package/dist/types/components/home/main/message/message.d.ts +1 -1
- package/dist/types/components/home/main/my-profile/my-block-list-item.d.ts +1 -1
- package/dist/types/components/home/sidebar/chat-item.d.ts +1 -1
- package/dist/types/components/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +1 -1
- package/dist/types/helpers/connectycube.d.ts +2 -2
- package/dist/types/helpers/widget.d.ts +1 -1
- package/dist/types/hooks/store/useAppDefaultChatStore.d.ts +1 -0
- package/dist/types/hooks/store/useProfileStore.d.ts +2 -2
- package/dist/types/hooks/useAppAuthorization.d.ts +1 -1
- package/dist/types/hooks/useCallHistory.d.ts +3 -3
- package/dist/types/hooks/useNotification.d.ts +1 -1
- package/dist/types/hooks/useTypingStatusText.d.ts +1 -1
- package/dist/types/lib/utils.d.ts +1 -1
- package/package.json +32 -34
- package/dist/types/components/calls/calls-fullscreen-stream.d.ts +0 -6
- package/dist/types/components/calls/calls-modal-screen.d.ts +0 -2
- package/dist/types/components/calls/calls-navigation/calls-nav-buttons.d.ts +0 -5
- package/dist/types/components/calls/calls-navigation/calls-nav-hung-up.d.ts +0 -2
- package/dist/types/components/calls/calls-navigation/calls-nav-screen-share.d.ts +0 -2
- package/dist/types/components/calls/calls-navigation/calls-nav-toggle-camera.d.ts +0 -2
- package/dist/types/components/calls/calls-navigation/calls-nav-toggle-mic.d.ts +0 -2
- /package/dist/types/components/calls/{calls-header-buttons.d.ts → calls-buttons.d.ts} +0 -0
package/dist/types/App.d.ts
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type StreamViewProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
stream?: MediaStream | null;
|
|
5
|
+
mirror?: boolean;
|
|
6
|
+
} & React.VideoHTMLAttributes<HTMLVideoElement>;
|
|
7
|
+
export declare const StreamView: React.ForwardRefExoticComponent<{
|
|
8
|
+
id?: string;
|
|
9
|
+
stream?: MediaStream | null;
|
|
10
|
+
mirror?: boolean;
|
|
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 = {
|
|
23
|
+
element: React.ReactElement<StreamViewProps>;
|
|
24
|
+
pipElement?: React.ReactElement<StreamViewProps>;
|
|
25
|
+
navElement?: React.ReactElement<HTMLElement>;
|
|
26
|
+
hideIconElement?: React.ReactElement;
|
|
27
|
+
showIconElement?: React.ReactElement;
|
|
28
|
+
containerClassName?: string;
|
|
29
|
+
fullscreenButtonClassName?: string;
|
|
30
|
+
fullscreenButtonIconClassName?: string;
|
|
31
|
+
pipContainerClassName?: string;
|
|
32
|
+
pipButtonClassName?: string;
|
|
33
|
+
pipButtonIconClassName?: string;
|
|
34
|
+
containerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
35
|
+
fullscreenButtonProps?: React.HTMLAttributes<HTMLButtonElement>;
|
|
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 = {
|
|
42
|
+
isFullscreen: boolean;
|
|
43
|
+
isPictureInPicture: boolean;
|
|
44
|
+
toggleFullscreen: () => Promise<void>;
|
|
45
|
+
togglePictureInPicture: () => void;
|
|
46
|
+
};
|
|
47
|
+
export declare const FullscreenStreamView: React.ForwardRefExoticComponent<FullscreenStreamViewProps & React.RefAttributes<FullscreenStreamViewRef>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { Dialogs } from 'connectycube/
|
|
2
|
+
import { Dialogs } from '@connectycube/react';
|
|
3
3
|
export interface ChatInputProps {
|
|
4
4
|
onSendMessage: (message: string, dialog?: Dialogs.Dialog) => void;
|
|
5
|
-
|
|
5
|
+
onSendAttachment: (files: File[]) => void;
|
|
6
6
|
setTextareaScrollOffset: React.Dispatch<React.SetStateAction<number>>;
|
|
7
7
|
}
|
|
8
8
|
declare const _default: React.NamedExoticComponent<ChatInputProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { CallType } from 'connectycube/
|
|
2
|
+
import { CallType } from '@connectycube/react';
|
|
3
3
|
import { CallHistorySignal } from '../../../../hooks/useCallHistory';
|
|
4
4
|
export interface CallMessageProps {
|
|
5
5
|
signal: CallHistorySignal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Config, Users, Auth, Chat, EmptyResponse, PushNotifications } from 'connectycube/
|
|
1
|
+
import { Config, Users, Auth, Chat, EmptyResponse, PushNotifications } from '@connectycube/react';
|
|
2
2
|
import { PushSubscriptionData } from './notifications';
|
|
3
3
|
export declare enum SIGNAL {
|
|
4
4
|
UPDATE_USER = "user/UPDATE"
|
|
@@ -45,7 +45,7 @@ export declare const sha256: (str: string) => Promise<string>;
|
|
|
45
45
|
export declare const getUserName: (user: Users.User | null | undefined, force?: boolean) => string;
|
|
46
46
|
export declare const getPhotoUrl: (photoOrAvatar?: string | null) => string;
|
|
47
47
|
export declare const generateConnectyCubeLogin: (userId?: string) => string;
|
|
48
|
-
export declare const createUserReport: (reportedUserId: number, reason: string) => Promise<import("connectycube
|
|
48
|
+
export declare const createUserReport: (reportedUserId: number, reason: string) => Promise<import("connectycube").Data.DataRecord>;
|
|
49
49
|
export declare const subscribeToPushNotifications: (pushSubscriptionData?: PushSubscriptionData) => Promise<PushNotifications.Subscription | undefined>;
|
|
50
50
|
export declare const unsubscribeFromPushNotifications: () => Promise<EmptyResponse[]>;
|
|
51
51
|
export declare const isCallsSupported: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Users } from 'connectycube/
|
|
1
|
+
import { Users } from '@connectycube/react';
|
|
2
2
|
export declare const buildExternalIdFromUsers: (users?: Users.User[]) => string;
|
|
3
3
|
export declare const sleep: (ms: number) => Promise<void>;
|
|
4
4
|
export declare const stripSpecificTailwindSupports: (css: string) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface ProfileState {
|
|
2
2
|
visible: boolean;
|
|
3
|
-
userId?: number;
|
|
4
|
-
showProfile: (userId?: number) => void;
|
|
3
|
+
userId?: number | null;
|
|
4
|
+
showProfile: (userId?: number | null) => void;
|
|
5
5
|
hideProfile: () => void;
|
|
6
6
|
}
|
|
7
7
|
declare const useProfileStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ProfileState>>;
|
|
@@ -7,9 +7,9 @@ export declare enum CallHistorySignal {
|
|
|
7
7
|
}
|
|
8
8
|
export type CallHistoryHook = {
|
|
9
9
|
sendAcceptCall: () => void;
|
|
10
|
-
sendRejectCall: () => void;
|
|
11
|
-
sendHungUpCall: () => void;
|
|
12
|
-
sendNotAnswerCall: () => void;
|
|
10
|
+
sendRejectCall: (userId?: number) => void;
|
|
11
|
+
sendHungUpCall: (userId?: number) => void;
|
|
12
|
+
sendNotAnswerCall: (userId?: number) => void;
|
|
13
13
|
};
|
|
14
14
|
declare function useCallHistory(): CallHistoryHook;
|
|
15
15
|
export default useCallHistory;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chat } from 'connectycube/
|
|
1
|
+
import { Chat } from '@connectycube/react';
|
|
2
2
|
type NotificationHook = {
|
|
3
3
|
showNotification: (title?: string, body?: string, icon?: string) => Promise<Notification | void>;
|
|
4
4
|
notifyWithSound: (title?: string, body?: string, icon?: string) => Promise<Notification | void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dialogs } from 'connectycube/
|
|
1
|
+
import { Dialogs } from '@connectycube/react';
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
4
4
|
export declare function createTempChat(id: string, name: string, type: 3 | 2, occupantsIds: number[], currentUserId: number, photo?: string, extensions?: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@connectycube/chat-widget",
|
|
3
3
|
"description": "A customizable React chat widget built on the ConnectyCube platform, enabling real-time messaging, calls, and user engagement in any web app.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.37.0",
|
|
5
5
|
"license": "GPL-3.0-only",
|
|
6
6
|
"homepage": "https://github.com/ConnectyCube/connectycube-chat-widget/chat-widget#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
57
|
"files": [
|
|
58
|
-
"dist"
|
|
59
|
-
"../../CHANGELOG.md"
|
|
58
|
+
"dist"
|
|
60
59
|
],
|
|
61
60
|
"publishConfig": {
|
|
62
61
|
"access": "public"
|
|
@@ -86,9 +85,8 @@
|
|
|
86
85
|
"coverage": "vitest run --coverage"
|
|
87
86
|
},
|
|
88
87
|
"dependencies": {
|
|
89
|
-
"@ai-sdk/google": "^2.0.
|
|
90
|
-
"@connectycube/
|
|
91
|
-
"@connectycube/use-chat": "^0.27.0",
|
|
88
|
+
"@ai-sdk/google": "^2.0.24",
|
|
89
|
+
"@connectycube/react": "4.7.7",
|
|
92
90
|
"@radix-ui/react-alert-dialog": "^1.1.15",
|
|
93
91
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
94
92
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
@@ -99,23 +97,22 @@
|
|
|
99
97
|
"@radix-ui/react-switch": "^1.2.6",
|
|
100
98
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
101
99
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
102
|
-
"ai": "^5.0.
|
|
100
|
+
"ai": "^5.0.81",
|
|
103
101
|
"class-variance-authority": "^0.7.1",
|
|
104
102
|
"clsx": "^2.1.1",
|
|
105
|
-
"connectycube": "^4.7.2",
|
|
106
103
|
"get-browser-fingerprint": "^4.1.1",
|
|
107
|
-
"i18next": "^25.
|
|
104
|
+
"i18next": "^25.6.0",
|
|
108
105
|
"linkify-react": "^4.3.2",
|
|
109
106
|
"linkifyjs": "^4.3.2",
|
|
110
|
-
"lucide-react": "^0.
|
|
107
|
+
"lucide-react": "^0.548.0",
|
|
111
108
|
"next-themes": "^0.4.6",
|
|
112
|
-
"react-hook-form": "^7.
|
|
113
|
-
"react-i18next": "^16.
|
|
109
|
+
"react-hook-form": "^7.65.0",
|
|
110
|
+
"react-i18next": "^16.2.1",
|
|
114
111
|
"react-icons": "^5.5.0",
|
|
115
112
|
"react-intersection-observer": "^9.16.0",
|
|
116
113
|
"react-player": "^2.16.1",
|
|
117
114
|
"sonner": "^2.0.7",
|
|
118
|
-
"virtua": "^0.
|
|
115
|
+
"virtua": "^0.46.4",
|
|
119
116
|
"zustand": "^5.0.8"
|
|
120
117
|
},
|
|
121
118
|
"peerDependencies": {
|
|
@@ -123,37 +120,38 @@
|
|
|
123
120
|
"react-dom": ">=18"
|
|
124
121
|
},
|
|
125
122
|
"devDependencies": {
|
|
126
|
-
"@eslint/js": "^9.
|
|
127
|
-
"@tailwindcss/
|
|
128
|
-
"@tailwindcss/
|
|
129
|
-
"@
|
|
130
|
-
"@types/
|
|
131
|
-
"@types/react
|
|
132
|
-
"@
|
|
133
|
-
"@
|
|
134
|
-
"
|
|
135
|
-
"eslint
|
|
136
|
-
"eslint-plugin-react-
|
|
123
|
+
"@eslint/js": "^9.38.0",
|
|
124
|
+
"@tailwindcss/cli": "^4.1.16",
|
|
125
|
+
"@tailwindcss/postcss": "^4.1.16",
|
|
126
|
+
"@tailwindcss/vite": "^4.1.16",
|
|
127
|
+
"@types/node": "^24.9.1",
|
|
128
|
+
"@types/react": "^19.2.2",
|
|
129
|
+
"@types/react-dom": "^19.2.2",
|
|
130
|
+
"@vitejs/plugin-react": "^5.1.0",
|
|
131
|
+
"@vitest/coverage-v8": "^4.0.4",
|
|
132
|
+
"eslint": "^9.38.0",
|
|
133
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
134
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
137
135
|
"globals": "^16.4.0",
|
|
138
|
-
"jsdom": "^27.0.
|
|
136
|
+
"jsdom": "^27.0.1",
|
|
139
137
|
"prettier": "3.6.2",
|
|
140
138
|
"tailwind-merge": "^3.3.1",
|
|
141
139
|
"tailwind-scrollbar": "^4.0.2",
|
|
142
|
-
"tailwindcss": "^4.1.
|
|
140
|
+
"tailwindcss": "^4.1.16",
|
|
143
141
|
"tw-animate-css": "^1.4.0",
|
|
144
|
-
"typescript": "^5.9.
|
|
145
|
-
"typescript-eslint": "^8.
|
|
146
|
-
"vite": "^7.1.
|
|
142
|
+
"typescript": "^5.9.3",
|
|
143
|
+
"typescript-eslint": "^8.46.2",
|
|
144
|
+
"vite": "^7.1.12",
|
|
147
145
|
"vite-plugin-dts": "^4.5.4",
|
|
148
|
-
"vitest": "^
|
|
146
|
+
"vitest": "^4.0.4"
|
|
149
147
|
},
|
|
150
148
|
"optionalDependencies": {
|
|
151
|
-
"@rollup/rollup-linux-x64-gnu": "4.52.
|
|
152
|
-
"@tailwindcss/oxide-linux-x64-gnu": "^4.1.
|
|
153
|
-
"lightningcss-linux-x64-gnu": "^1.30.
|
|
149
|
+
"@rollup/rollup-linux-x64-gnu": "4.52.5",
|
|
150
|
+
"@tailwindcss/oxide-linux-x64-gnu": "^4.1.16",
|
|
151
|
+
"lightningcss-linux-x64-gnu": "^1.30.2"
|
|
154
152
|
},
|
|
155
153
|
"engines": {
|
|
156
154
|
"node": ">=20.0.0",
|
|
157
155
|
"npm": ">=10.0.0"
|
|
158
156
|
}
|
|
159
|
-
}
|
|
157
|
+
}
|
|
File without changes
|