@connectycube/chat-widget 0.15.2 → 0.16.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.
@@ -36,7 +36,15 @@ declare const _default: {
36
36
  "StartNewChat": "Έναρξη νέας συνομιλίας",
37
37
  "typing": "πληκτρολογεί",
38
38
  "Users": "Χρήστες",
39
- "you": "εσύ"
39
+ "you": "εσύ",
40
+ "Block": "Block",
41
+ "UnBlock": "Unblock",
42
+ "Report": "Αναφορά",
43
+ "ReportUser": "Αναφορά χρήστη",
44
+ "WhatsWrongWithThisUser": "Τι θέλετε να αναφέρετε για αυτόν το χρήστη;",
45
+ "ProvideReason": "Λόγος αναφοράς",
46
+ "ReportCreatedSuccessfully": "Η αναφορά για το χρήστη έγινε",
47
+ "ReportSubmitFailed": "Σφάλμα στη δημιουργία αναφοράς"
40
48
  }
41
49
  ;
42
50
 
@@ -36,7 +36,15 @@ declare const _default: {
36
36
  "StartNewChat": "Start new chat",
37
37
  "typing": "typing",
38
38
  "Users": "Users",
39
- "you": "you"
39
+ "you": "you",
40
+ "Block": "Block",
41
+ "UnBlock": "Unblock",
42
+ "Report": "Report",
43
+ "ReportUser": "Report user",
44
+ "WhatsWrongWithThisUser": "What's wrong with this user?",
45
+ "ProvideReason": "Reason for reporting",
46
+ "ReportCreatedSuccessfully": "Report has been created successfully",
47
+ "ReportSubmitFailed": "Failed to submit report"
40
48
  }
41
49
  ;
42
50
 
@@ -36,8 +36,15 @@ declare const _default: {
36
36
  "StartNewChat": "Розпочати новий чат",
37
37
  "typing": "друкує",
38
38
  "Users": "Користувачі",
39
- "you": "ви"
40
- }
41
- ;
39
+ "you": "ви",
40
+ "Block": "Заблокувати",
41
+ "UnBlock": "Розблокувати",
42
+ "Report": "Поскаржитися",
43
+ "ReportUser": "Поскаржитися на користувача",
44
+ "WhatsWrongWithThisUser": "Що не так з цим користувачем?",
45
+ "ProvideReason": "Підстава",
46
+ "ReportCreatedSuccessfully": "Звіт поданий успішно",
47
+ "ReportSubmitFailed": "Помилка при поданні звіту"
48
+ };
42
49
 
43
50
  export default _default;
package/dist/logo.png ADDED
Binary file
@@ -0,0 +1,2 @@
1
+ export declare const requestNotificationPermission: () => Promise<void>;
2
+ export declare const showNotification: (title: string, body?: string, icon?: string) => Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@connectycube/chat-widget",
3
3
  "description": "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
- "version": "0.15.2",
4
+ "version": "0.16.0",
5
5
  "keywords": [
6
6
  "chat-widget",
7
7
  "widget",
@@ -54,7 +54,7 @@
54
54
  "lint": "eslint ."
55
55
  },
56
56
  "dependencies": {
57
- "@connectycube/use-chat": "^0.14.4",
57
+ "@connectycube/use-chat": "^0.15.0",
58
58
  "@radix-ui/react-alert-dialog": "^1.1.6",
59
59
  "@radix-ui/react-avatar": "^1.1.3",
60
60
  "@radix-ui/react-dialog": "^1.1.6",
@@ -63,7 +63,6 @@
63
63
  "@radix-ui/react-slot": "^1.1.2",
64
64
  "@radix-ui/react-switch": "^1.1.3",
65
65
  "@radix-ui/react-tabs": "^1.1.3",
66
- "@reduxjs/toolkit": "^2.5.1",
67
66
  "class-variance-authority": "^0.7.1",
68
67
  "clsx": "^2.1.1",
69
68
  "connectycube": "^4.1.2",
@@ -71,48 +70,49 @@
71
70
  "jsdom": "^26.0.0",
72
71
  "linkify-react": "^4.2.0",
73
72
  "linkifyjs": "^4.2.0",
74
- "lucide-react": "^0.475.0",
73
+ "lucide-react": "^0.476.0",
74
+ "next-themes": "^0.4.4",
75
75
  "react": "^18.3.1",
76
76
  "react-dom": "^18.3.1",
77
77
  "react-hook-form": "^7.54.2",
78
78
  "react-i18next": "^15.4.1",
79
- "react-icons": "^5.4.0",
79
+ "react-icons": "^5.5.0",
80
80
  "react-intersection-observer": "^9.15.1",
81
- "react-redux": "^9.2.0",
82
- "react-router": "^7.1.5",
83
- "react-router-dom": "^7.1.5",
81
+ "react-router": "^7.2.0",
82
+ "react-router-dom": "^7.2.0",
84
83
  "react-scroll": "^1.9.3",
85
- "redux": "^5.0.1"
84
+ "zustand": "^5.0.3"
86
85
  },
87
86
  "devDependencies": {
88
- "@eslint/js": "^9.20.0",
89
- "@tailwindcss/postcss": "^4.0.7",
90
- "@tailwindcss/vite": "^4.0.7",
91
- "@types/node": "^22.13.4",
87
+ "@eslint/js": "^9.21.0",
88
+ "@tailwindcss/postcss": "^4.0.9",
89
+ "@tailwindcss/vite": "^4.0.9",
90
+ "@types/node": "^22.13.5",
92
91
  "@types/react": "18.3.12",
93
92
  "@types/react-dom": "^18.3.5",
94
93
  "@types/react-i18next": "^8.1.0",
95
94
  "@types/react-scroll": "^1.8.10",
96
95
  "@vitejs/plugin-react": "^4.3.4",
97
- "@vitest/coverage-v8": "^3.0.6",
98
- "eslint": "^9.20.1",
96
+ "@vitest/coverage-v8": "^3.0.7",
97
+ "eslint": "^9.21.0",
99
98
  "eslint-plugin-react-hooks": "^5.1.0",
100
99
  "eslint-plugin-react-refresh": "^0.4.19",
101
- "globals": "^15.15.0",
100
+ "globals": "^16.0.0",
102
101
  "npm-run-all": "^4.1.5",
103
- "prettier": "3.5.1",
104
- "tailwind-merge": "^3.0.1",
105
- "tailwindcss": "^4.0.7",
102
+ "prettier": "3.5.2",
103
+ "sonner": "^2.0.1",
104
+ "tailwind-merge": "^3.0.2",
105
+ "tailwindcss": "^4.0.9",
106
106
  "tailwindcss-animate": "^1.0.7",
107
107
  "typescript": "~5.7.3",
108
- "typescript-eslint": "^8.24.1",
109
- "vite": "^6.1.1",
108
+ "typescript-eslint": "^8.25.0",
109
+ "vite": "^6.2.0",
110
110
  "vite-plugin-css-injected-by-js": "^3.5.2",
111
111
  "vite-plugin-dts": "^4.5.0",
112
- "vitest": "^3.0.6"
112
+ "vitest": "^3.0.7"
113
113
  },
114
114
  "optionalDependencies": {
115
- "@tailwindcss/oxide-linux-x64-gnu": "^4.0.1",
115
+ "@tailwindcss/oxide-linux-x64-gnu": "^4.0.9",
116
116
  "lightningcss-linux-x64-gnu": "^1.29.1"
117
117
  }
118
- }
118
+ }
@@ -1,30 +0,0 @@
1
- import { Config } from '../../../node_modules/connectycube/dist/types/types';
2
- import { QuickActions } from './redux/slices/quickActions';
3
- export type AppProps = {
4
- appId: Config.Credentials['appId'];
5
- authKey: Config.Credentials['authKey'];
6
- userId?: string;
7
- userName?: string;
8
- userAvatar?: string;
9
- userProfileLink?: string;
10
- config?: Config.Options;
11
- muted?: boolean;
12
- splitView?: boolean;
13
- showOnlineUsersTab?: boolean;
14
- quickActions?: QuickActions;
15
- translation?: 'en' | 'el' | 'ua';
16
- buttonTitle?: string;
17
- portalStyle?: React.CSSProperties;
18
- buttonStyle?: React.CSSProperties;
19
- badgeStyle?: React.CSSProperties;
20
- portalClassName?: string;
21
- buttonClassName?: string;
22
- badgeClassName?: string;
23
- hideNewChatButton?: boolean;
24
- hideWidgetButton?: boolean;
25
- open?: boolean;
26
- onOpenChange?: (open: boolean) => void;
27
- onUnreadCountChange?: (count: number) => void;
28
- };
29
- declare const AppContainer: React.FC<AppProps>;
30
- export default AppContainer;
@@ -1,6 +0,0 @@
1
- import { TypedUseSelectorHook } from 'react-redux';
2
- import { AppStore, AppDispatch } from './store';
3
- type DispatchFunc = () => AppDispatch;
4
- export declare const useAppDispatch: DispatchFunc;
5
- export declare const useAppSelector: TypedUseSelectorHook<AppStore>;
6
- export {};
@@ -1,14 +0,0 @@
1
- export declare enum Tab {
2
- CHATS = "chats",
3
- USERS = "users"
4
- }
5
- export declare const muted: import('redux').Reducer<boolean>;
6
- export declare const setMuted: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "muted/setMuted">, resetMuted: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"muted/resetMuted">;
7
- export declare const splitView: import('redux').Reducer<boolean>;
8
- export declare const setSplitView: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "splitView/setSplitView">, resetSplitView: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"splitView/resetSplitView">;
9
- export declare const showOnlineUsersTab: import('redux').Reducer<boolean>;
10
- export declare const setShowOnlineUsersTab: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "showOnlineUsersTab/setShowOnlineUsersTab">, resetShowOnlineUsersTab: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"showOnlineUsersTab/resetShowOnlineUsersTab">;
11
- export declare const activeTab: import('redux').Reducer<Tab>;
12
- export declare const setActiveTab: import('@reduxjs/toolkit').ActionCreatorWithPayload<Tab, "activeTab/setActiveTab">, resetActiveTab: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"activeTab/resetActiveTab">;
13
- export declare const hideNewChatButton: import('redux').Reducer<boolean>;
14
- export declare const setHideNewChatButton: import('@reduxjs/toolkit').ActionCreatorWithPayload<boolean, "hideNewChatButton/setHideNewChatButton">, resetHideNewChatButton: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"hideNewChatButton/resetHideNewChatButton">;
@@ -1,9 +0,0 @@
1
- import { Middleware } from '@reduxjs/toolkit';
2
- type DraftMessage = {
3
- [dialogId: string]: string;
4
- };
5
- export declare const DRAFT_MESSAGES_KEY = "@connectycube/chat-widget:draftMessages";
6
- export declare const draftMessages: import('redux').Reducer<DraftMessage>;
7
- export declare const setDraftMessages: import('@reduxjs/toolkit').ActionCreatorWithPayload<DraftMessage, "draftMessages/setDraftMessages">, upsertDraftMessage: import('@reduxjs/toolkit').ActionCreatorWithPayload<DraftMessage, "draftMessages/upsertDraftMessage">, deleteDraftMessage: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "draftMessages/deleteDraftMessage">, resetDraftMessages: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"draftMessages/resetDraftMessages">;
8
- export declare const localStorageMiddleware: Middleware;
9
- export {};
@@ -1,7 +0,0 @@
1
- export type QuickActions = {
2
- title?: string;
3
- description?: string;
4
- actions: string[];
5
- };
6
- export declare const quickActions: import('redux').Reducer<QuickActions>;
7
- export declare const setQuickActions: import('@reduxjs/toolkit').ActionCreatorWithPayload<QuickActions, "quickActions/setQuickActions">, resetQuickActions: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"quickActions/resetQuickActions">;
@@ -1,2 +0,0 @@
1
- export declare const unreadCount: import('redux').Reducer<number>;
2
- export declare const setUnreadCount: import('@reduxjs/toolkit').ActionCreatorWithPayload<number, "unreadCount/setUnreadCount">, resetUnreadCount: import('@reduxjs/toolkit').ActionCreatorWithoutPayload<"unreadCount/resetUnreadCount">;
@@ -1,52 +0,0 @@
1
- export declare const rootReducer: import('redux').Reducer<{
2
- unreadCount: number;
3
- muted: boolean;
4
- splitView: boolean;
5
- showOnlineUsersTab: boolean;
6
- activeTab: import('./slices/app').Tab;
7
- hideNewChatButton: boolean;
8
- draftMessages: {
9
- [dialogId: string]: string;
10
- };
11
- quickActions: import('./slices/quickActions').QuickActions;
12
- }, import('redux').UnknownAction, Partial<{
13
- unreadCount: number | undefined;
14
- muted: boolean | undefined;
15
- splitView: boolean | undefined;
16
- showOnlineUsersTab: boolean | undefined;
17
- activeTab: import('./slices/app').Tab | undefined;
18
- hideNewChatButton: boolean | undefined;
19
- draftMessages: {
20
- [dialogId: string]: string;
21
- } | undefined;
22
- quickActions: import('./slices/quickActions').QuickActions | undefined;
23
- }>>;
24
- export declare const store: import('@reduxjs/toolkit').EnhancedStore<{
25
- unreadCount: number;
26
- muted: boolean;
27
- splitView: boolean;
28
- showOnlineUsersTab: boolean;
29
- activeTab: import('./slices/app').Tab;
30
- hideNewChatButton: boolean;
31
- draftMessages: {
32
- [dialogId: string]: string;
33
- };
34
- quickActions: import('./slices/quickActions').QuickActions;
35
- }, import('redux').UnknownAction, import('@reduxjs/toolkit').Tuple<[import('redux').StoreEnhancer<{
36
- dispatch: import('redux-thunk').ThunkDispatch<{
37
- unreadCount: number;
38
- muted: boolean;
39
- splitView: boolean;
40
- showOnlineUsersTab: boolean;
41
- activeTab: import('./slices/app').Tab;
42
- hideNewChatButton: boolean;
43
- draftMessages: {
44
- [dialogId: string]: string;
45
- };
46
- quickActions: import('./slices/quickActions').QuickActions;
47
- }, undefined, import('redux').UnknownAction>;
48
- }>, import('redux').StoreEnhancer]>>;
49
- export type AppDispatch = typeof store.dispatch;
50
- export type RootState = ReturnType<typeof store.getState>;
51
- export type AppStore = ReturnType<typeof rootReducer>;
52
- export declare const resetStore: (force?: boolean) => void;