@connectycube/chat-widget 0.16.0 → 0.18.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/LICENSE +231 -0
  2. package/README.md +2 -2
  3. package/dist/App.d.ts +12 -9
  4. package/dist/components/home/main/chat-header.d.ts +1 -4
  5. package/dist/components/home/main/chat-info-user.d.ts +2 -2
  6. package/dist/components/home/main/chat-input.d.ts +1 -1
  7. package/dist/components/home/main/message-attachment.d.ts +1 -1
  8. package/dist/components/home/main/message.d.ts +1 -1
  9. package/dist/components/home/main/my-profile/my-block-list-item.d.ts +7 -0
  10. package/dist/components/home/main/my-profile/my-block-list.d.ts +3 -0
  11. package/dist/components/home/main/my-profile/my-profile-settings.d.ts +2 -0
  12. package/dist/components/home/main/my-profile/my-profile.d.ts +3 -0
  13. package/dist/components/home/main/profile-info.d.ts +3 -0
  14. package/dist/components/home/sidebar/chat-item.d.ts +1 -1
  15. package/dist/components/home/sidebar/new-chat/create-group-chat/create-group-chat.d.ts +1 -1
  16. package/dist/components/shared/empty-content-placeholder.d.ts +2 -2
  17. package/dist/{connectycube.d.ts → helpers/connectycube.d.ts} +11 -2
  18. package/dist/helpers/notifications.d.ts +1 -0
  19. package/dist/hooks/index.d.ts +12 -6
  20. package/dist/hooks/store/useActiveTabsStore.d.ts +15 -0
  21. package/dist/hooks/store/useAppDefaultChatStore.d.ts +21 -0
  22. package/dist/hooks/store/useAppInterfaceStore.d.ts +21 -0
  23. package/dist/hooks/store/useAppNotificationStore.d.ts +22 -0
  24. package/dist/hooks/store/useAppQuickActionsStore.d.ts +17 -0
  25. package/dist/hooks/store/useAppSettingsStore.d.ts +18 -0
  26. package/dist/hooks/store/useDraftMessagesStore.d.ts +2 -2
  27. package/dist/hooks/store/useProfileStore.d.ts +9 -0
  28. package/dist/hooks/store/useUserSettingsStore.d.ts +11 -0
  29. package/dist/hooks/useAppAuthorization.d.ts +14 -0
  30. package/dist/hooks/useNotification.d.ts +7 -2
  31. package/dist/hooks/usePageFocus.d.ts +5 -1
  32. package/dist/hooks/useResizeScreenWidth.d.ts +10 -0
  33. package/dist/index.es.js +14107 -13716
  34. package/dist/index.umd.js +42 -42
  35. package/dist/lib/utils.d.ts +4 -2
  36. package/dist/locales/el/translation.json.d.ts +13 -3
  37. package/dist/locales/en/translation.json.d.ts +13 -3
  38. package/dist/locales/ua/translation.json.d.ts +12 -1
  39. package/package.json +36 -25
  40. package/dist/components/home/main/chat-info.d.ts +0 -7
  41. package/dist/hooks/store/useAppStore.d.ts +0 -64
  42. package/dist/hooks/useNotificationSound.d.ts +0 -2
  43. package/dist/notifications.d.ts +0 -2
  44. /package/dist/{hooks → helpers}/debounce.d.ts +0 -0
  45. /package/dist/{i18n.d.ts → helpers/i18n.d.ts} +0 -0
  46. /package/dist/{hooks → helpers}/throttle.d.ts +0 -0
@@ -1,4 +1,6 @@
1
- import { Dialogs } from '../../../../node_modules/connectycube/dist/types/types';
1
+ import { Dialogs } from '../../node_modules/connectycube/src/types';
2
2
  import { ClassValue } from 'clsx';
3
3
  export declare function cn(...inputs: ClassValue[]): string;
4
- export declare function createTempChat(id: string, name: string, type: 3 | 2, occupantsIds: number[], currentUserId: number, photo?: string): Dialogs.Dialog;
4
+ export declare function createTempChat(id: string, name: string, type: 3 | 2, occupantsIds: number[], currentUserId: number, photo?: string, extensions?: {
5
+ [key: string]: string;
6
+ }): Dialogs.Dialog;
@@ -44,8 +44,18 @@ declare const _default: {
44
44
  "WhatsWrongWithThisUser": "Τι θέλετε να αναφέρετε για αυτόν το χρήστη;",
45
45
  "ProvideReason": "Λόγος αναφοράς",
46
46
  "ReportCreatedSuccessfully": "Η αναφορά για το χρήστη έγινε",
47
- "ReportSubmitFailed": "Σφάλμα στη δημιουργία αναφοράς"
48
- }
49
- ;
47
+ "ReportSubmitFailed": "Σφάλμα στη δημιουργία αναφοράς",
48
+ "MyProfile": "Το προφίλ μου",
49
+ "YouBlocked": "Αυτός ο χρήστης σας έχει κάνει Block",
50
+ "BlockList": "Λίστα Blocked χρηστών",
51
+ "AddToBlockList": "Προσθήκη στη λίστα Blocked",
52
+ "AddToBlockList?": "Σίγουρα θέλετε να προσθέσετε το χρήστη {{name}} στη λίστα Blocked;",
53
+ "RemoveFromBlockList": "Αφαίρεση από τη λίστα Blocked",
54
+ "RemoveFromBlockList?": "Σίγουρα θέλετε να αφαιρέσετε το χρήστη {{name}} από τη λίστα Blocked;",
55
+ "BlockListEmpty": "Η Blocked λίστα είναι άδεια",
56
+ "NotificationSettings": "Ρυθμίσεις ειδοποιήσεων",
57
+ "Notifications": "Ειδοποιήσεις",
58
+ "NotificationSound": "Ήχος ειδοποίησης"
59
+ };
50
60
 
51
61
  export default _default;
@@ -44,8 +44,18 @@ declare const _default: {
44
44
  "WhatsWrongWithThisUser": "What's wrong with this user?",
45
45
  "ProvideReason": "Reason for reporting",
46
46
  "ReportCreatedSuccessfully": "Report has been created successfully",
47
- "ReportSubmitFailed": "Failed to submit report"
48
- }
49
- ;
47
+ "ReportSubmitFailed": "Failed to submit report",
48
+ "MyProfile": "My profile",
49
+ "YouBlocked": "You are blocked by this user",
50
+ "BlockList": "Block list",
51
+ "AddToBlockList": "Add to block list",
52
+ "AddToBlockList?": "Are you sure you want to add {{name}} to block list?",
53
+ "RemoveFromBlockList": "Remove from block list",
54
+ "RemoveFromBlockList?": "Are you sure you want to remove {{name}} from block list?",
55
+ "BlockListEmpty": "Block list is empty",
56
+ "NotificationSettings": "Notification settings",
57
+ "Notifications": "Notifications",
58
+ "NotificationSound": "Notification sound"
59
+ };
50
60
 
51
61
  export default _default;
@@ -44,7 +44,18 @@ declare const _default: {
44
44
  "WhatsWrongWithThisUser": "Що не так з цим користувачем?",
45
45
  "ProvideReason": "Підстава",
46
46
  "ReportCreatedSuccessfully": "Звіт поданий успішно",
47
- "ReportSubmitFailed": "Помилка при поданні звіту"
47
+ "ReportSubmitFailed": "Помилка при поданні звіту",
48
+ "MyProfile": "Мій профіль",
49
+ "YouBlocked": "Цей користувача вас заблокував",
50
+ "BlockList": "Список заблокованих",
51
+ "AddToBlockList": "Додати до списку заблокованих",
52
+ "AddToBlockList?": "Ви впевнені, що хочете додати {{name}} до списку заблокованих?",
53
+ "RemoveFromBlockList": "Видалити зі списку заблокованих",
54
+ "RemoveFromBlockList?": "Ви впевнені, що хочете видалити {{name}} зі списку заблокованих?",
55
+ "BlockListEmpty": "Список заблокованих порожній",
56
+ "NotificationSettings": "Налаштування сповіщень",
57
+ "Notifications": "Сповіщення",
58
+ "NotificationSound": "Звук сповіщення"
48
59
  };
49
60
 
50
61
  export default _default;
package/package.json CHANGED
@@ -1,27 +1,37 @@
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.16.0",
4
+ "version": "0.18.0",
5
+ "license": "GPL-3.0-only",
6
+ "homepage": "https://github.com/ConnectyCube/connectycube-chat-widget#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/ConnectyCube/connectycube-chat-widget/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/ConnectyCube/connectycube-chat-widget.git"
13
+ },
14
+ "author": "ConnectyCube team <support@connectycube.com>",
15
+ "contributors": [
16
+ {
17
+ "name": "Garry ConnectyCube",
18
+ "email": "admin@connectycube.com"
19
+ },
20
+ {
21
+ "name": "Vlad ConnectyCube",
22
+ "email": "vlad@connectycube.com"
23
+ }
24
+ ],
5
25
  "keywords": [
6
26
  "chat-widget",
27
+ "connectycube",
28
+ "typescript",
7
29
  "widget",
8
30
  "react",
9
31
  "chat",
10
32
  "instant-messaging",
11
33
  "chat-application"
12
34
  ],
13
- "license": "GPL-3.0-only",
14
- "author": "Garry ConnectyCube <admin@connectycube.com>",
15
- "contributors": [
16
- {
17
- "name": "Vlad ConnectyCube",
18
- "email": "vlad@connectycube.com"
19
- },
20
- {
21
- "name": "Garry ConnectyCube",
22
- "email": "admin@connectycube.com"
23
- }
24
- ],
25
35
  "type": "module",
26
36
  "types": "dist/index.d.ts",
27
37
  "main": "dist/index.umd.js",
@@ -54,7 +64,7 @@
54
64
  "lint": "eslint ."
55
65
  },
56
66
  "dependencies": {
57
- "@connectycube/use-chat": "^0.15.0",
67
+ "@connectycube/use-chat": "^0.16.0",
58
68
  "@radix-ui/react-alert-dialog": "^1.1.6",
59
69
  "@radix-ui/react-avatar": "^1.1.3",
60
70
  "@radix-ui/react-dialog": "^1.1.6",
@@ -65,12 +75,12 @@
65
75
  "@radix-ui/react-tabs": "^1.1.3",
66
76
  "class-variance-authority": "^0.7.1",
67
77
  "clsx": "^2.1.1",
68
- "connectycube": "^4.1.2",
78
+ "connectycube": "^4.1.3",
69
79
  "i18next": "^24.2.2",
70
80
  "jsdom": "^26.0.0",
71
81
  "linkify-react": "^4.2.0",
72
82
  "linkifyjs": "^4.2.0",
73
- "lucide-react": "^0.476.0",
83
+ "lucide-react": "^0.477.0",
74
84
  "next-themes": "^0.4.4",
75
85
  "react": "^18.3.1",
76
86
  "react-dom": "^18.3.1",
@@ -87,32 +97,33 @@
87
97
  "@eslint/js": "^9.21.0",
88
98
  "@tailwindcss/postcss": "^4.0.9",
89
99
  "@tailwindcss/vite": "^4.0.9",
90
- "@types/node": "^22.13.5",
91
- "@types/react": "18.3.12",
100
+ "@types/node": "^22.13.9",
101
+ "@types/react": "18.3.18",
92
102
  "@types/react-dom": "^18.3.5",
93
103
  "@types/react-i18next": "^8.1.0",
94
104
  "@types/react-scroll": "^1.8.10",
95
105
  "@vitejs/plugin-react": "^4.3.4",
96
106
  "@vitest/coverage-v8": "^3.0.7",
97
107
  "eslint": "^9.21.0",
98
- "eslint-plugin-react-hooks": "^5.1.0",
108
+ "eslint-plugin-react-hooks": "^5.2.0",
99
109
  "eslint-plugin-react-refresh": "^0.4.19",
100
110
  "globals": "^16.0.0",
101
111
  "npm-run-all": "^4.1.5",
102
- "prettier": "3.5.2",
112
+ "prettier": "3.5.3",
103
113
  "sonner": "^2.0.1",
104
114
  "tailwind-merge": "^3.0.2",
105
115
  "tailwindcss": "^4.0.9",
106
116
  "tailwindcss-animate": "^1.0.7",
107
- "typescript": "~5.7.3",
108
- "typescript-eslint": "^8.25.0",
117
+ "typescript": "^5.8.2",
118
+ "typescript-eslint": "^8.26.0",
109
119
  "vite": "^6.2.0",
110
120
  "vite-plugin-css-injected-by-js": "^3.5.2",
111
- "vite-plugin-dts": "^4.5.0",
121
+ "vite-plugin-dts": "^4.5.3",
112
122
  "vitest": "^3.0.7"
113
123
  },
114
124
  "optionalDependencies": {
115
125
  "@tailwindcss/oxide-linux-x64-gnu": "^4.0.9",
116
- "lightningcss-linux-x64-gnu": "^1.29.1"
126
+ "lightningcss-linux-x64-gnu": "^1.29.1",
127
+ "@rollup/rollup-linux-x64-gnu": "4.34.9"
117
128
  }
118
- }
129
+ }
@@ -1,7 +0,0 @@
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;
@@ -1,64 +0,0 @@
1
- export declare enum Tab {
2
- CHATS = "chats",
3
- USERS = "users"
4
- }
5
- export type QuickActions = {
6
- title?: string;
7
- description?: string;
8
- actions: string[];
9
- };
10
- export interface AppStoreState {
11
- opened: boolean;
12
- splitView: boolean;
13
- showOnlineUsersTab: boolean;
14
- activeTab: Tab;
15
- hideNewChatButton: boolean;
16
- quickActions: QuickActions;
17
- enableContentReporting: boolean;
18
- enableBlockList: boolean;
19
- muted: boolean;
20
- showNotifications: boolean;
21
- playSound: boolean;
22
- setOpened: (opened: boolean) => void;
23
- setSplitView: (splitView: boolean) => void;
24
- setShowOnlineUsersTab: (showOnlineUsersTab: boolean) => void;
25
- setActiveTab: (activeTab: Tab) => void;
26
- setHideNewChatButton: (hideNewChatButton: boolean) => void;
27
- setQuickActions: (quickActions: QuickActions) => void;
28
- setEnableContentReporting: (enableContentReporting: boolean) => void;
29
- setEnableBlockList: (enableBlockList: boolean) => void;
30
- setMuted: (muted: boolean) => void;
31
- setShowNotifications: (showNotifications: boolean) => void;
32
- setPlaySound: (playSound: boolean) => void;
33
- resetOpened: () => void;
34
- resetSplitView: () => void;
35
- resetShowOnlineUsersTab: () => void;
36
- resetActiveTab: () => void;
37
- resetHideNewChatButton: () => void;
38
- resetQuickActions: () => void;
39
- resetEnableContentReporting: () => void;
40
- resetEnableBlockList: () => void;
41
- resetMuted: () => void;
42
- resetShowNotifications: () => void;
43
- resetPlaySound: () => void;
44
- }
45
- export declare const appStoreInitialState: {
46
- opened: boolean;
47
- splitView: boolean;
48
- showOnlineUsersTab: boolean;
49
- activeTab: Tab;
50
- hideNewChatButton: boolean;
51
- quickActions: {
52
- title: string;
53
- description: string;
54
- actions: never[];
55
- };
56
- muted: boolean;
57
- showNotifications: boolean;
58
- playSound: boolean;
59
- enableContentReporting: boolean;
60
- enableBlockList: boolean;
61
- };
62
- declare const useAppStore: import('zustand').UseBoundStore<import('zustand').StoreApi<AppStoreState>>;
63
- export declare const resetAppStore: () => void;
64
- export default useAppStore;
@@ -1,2 +0,0 @@
1
- declare function useNotificationSound(): () => void;
2
- export default useNotificationSound;
@@ -1,2 +0,0 @@
1
- export declare const requestNotificationPermission: () => Promise<void>;
2
- export declare const showNotification: (title: string, body?: string, icon?: string) => Promise<void>;
File without changes
File without changes
File without changes