@webinex/chatify 1.0.0-rc3 → 1.0.2-rc3

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 (98) hide show
  1. package/dist/esm/index.js +1 -1
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/esm/types/core/action.d.ts +10 -4
  4. package/dist/esm/types/core/state.d.ts +2 -1
  5. package/dist/esm/types/core/useGetAccountsQuery.d.ts +3 -1
  6. package/dist/esm/types/core/useGetChatListQuery.d.ts +3 -1
  7. package/dist/esm/types/core/useGetChatQuery.d.ts +3 -1
  8. package/dist/esm/types/ui/Icon.d.ts +8 -8
  9. package/dist/index.d.ts +21 -14
  10. package/package.json +92 -92
  11. package/src/ChatifyContext.tsx +41 -41
  12. package/src/core/action.tsx +421 -405
  13. package/src/core/client.ts +143 -143
  14. package/src/core/index.ts +17 -17
  15. package/src/core/models.tsx +82 -82
  16. package/src/core/reducer.tsx +87 -87
  17. package/src/core/state.ts +93 -92
  18. package/src/core/useAddChatMutation.tsx +22 -22
  19. package/src/core/useAddMemberMutation.tsx +25 -25
  20. package/src/core/useFetchNextMutation.tsx +28 -28
  21. package/src/core/useGetAccountsQuery.tsx +30 -33
  22. package/src/core/useGetChatListQuery.tsx +30 -33
  23. package/src/core/useGetChatQuery.tsx +31 -34
  24. package/src/core/useGetMessagesQuery.tsx +35 -35
  25. package/src/core/useReadMonitor.tsx +32 -32
  26. package/src/core/useRemoveMemberMutation.tsx +23 -23
  27. package/src/core/useSendMutation.tsx +24 -24
  28. package/src/core/useSignalRMonitor.tsx +66 -66
  29. package/src/core/useUpdateChatNameMutation.tsx +23 -23
  30. package/src/index.ts +3 -3
  31. package/src/styles/aside.scss +94 -94
  32. package/src/styles/chat.scss +222 -222
  33. package/src/styles/index.scss +79 -79
  34. package/src/styles/keyframes.scss +14 -14
  35. package/src/styles/mixins.scss +20 -20
  36. package/src/styles/settings.scss +5 -5
  37. package/src/styles/variables.scss +10 -10
  38. package/src/ui/AddChatButton.tsx +15 -15
  39. package/src/ui/Avatar.tsx +18 -18
  40. package/src/ui/ChatList/ChatList.tsx +42 -42
  41. package/src/ui/ChatList/ChatListItemBox.tsx +22 -22
  42. package/src/ui/ChatList/ChatListItemLastMessage.tsx +13 -13
  43. package/src/ui/ChatList/ChatListItemLastMessageAuthor.tsx +20 -20
  44. package/src/ui/ChatList/ChatListItemLastMessageContent.tsx +21 -21
  45. package/src/ui/ChatList/ChatListItemName.tsx +13 -13
  46. package/src/ui/ChatList/ChatListItemUnreadCount.tsx +12 -12
  47. package/src/ui/ChatList/index.ts +7 -7
  48. package/src/ui/ChatName.tsx +10 -10
  49. package/src/ui/ChatPanel/ChatBody.tsx +44 -44
  50. package/src/ui/ChatPanel/ChatHeader.tsx +33 -33
  51. package/src/ui/ChatPanel/ChatHeaderMembers.tsx +26 -26
  52. package/src/ui/ChatPanel/ChatHeaderName.tsx +67 -67
  53. package/src/ui/ChatPanel/ChatMembersButton.tsx +21 -21
  54. package/src/ui/ChatPanel/ChatMembersPanel.tsx +117 -117
  55. package/src/ui/ChatPanel/ChatPanel.tsx +27 -27
  56. package/src/ui/ChatPanel/index.ts +6 -6
  57. package/src/ui/Chatify.tsx +148 -148
  58. package/src/ui/CreateChatPanel/CreateChatForm.tsx +36 -36
  59. package/src/ui/CreateChatPanel/CreateChatMemberInput.tsx +66 -66
  60. package/src/ui/CreateChatPanel/CreateChatNameInput.tsx +25 -25
  61. package/src/ui/CreateChatPanel/CreateChatPanel.tsx +33 -33
  62. package/src/ui/CreateChatPanel/index.ts +4 -4
  63. package/src/ui/Icon.tsx +33 -33
  64. package/src/ui/InputBox/InputBox.tsx +38 -38
  65. package/src/ui/InputBox/InputFilesBox.tsx +9 -9
  66. package/src/ui/InputBox/InputSubmitButtonBox.tsx +17 -17
  67. package/src/ui/InputBox/InputTextBox.tsx +50 -50
  68. package/src/ui/InputBox/index.ts +4 -4
  69. package/src/ui/Layout/Aside.tsx +10 -10
  70. package/src/ui/Layout/Body.tsx +10 -10
  71. package/src/ui/Layout/Footer.tsx +3 -3
  72. package/src/ui/Layout/Header.tsx +10 -10
  73. package/src/ui/Layout/Main.tsx +15 -15
  74. package/src/ui/Layout/index.ts +5 -5
  75. package/src/ui/Message/MessageAuthor.tsx +13 -13
  76. package/src/ui/Message/MessageBox.tsx +20 -20
  77. package/src/ui/Message/MessageContent.tsx +13 -13
  78. package/src/ui/Message/MessageInfoBox.tsx +25 -25
  79. package/src/ui/Message/MessageRow.tsx +24 -24
  80. package/src/ui/Message/MessageText.tsx +7 -7
  81. package/src/ui/Message/index.ts +6 -6
  82. package/src/ui/MessageReadObserver.tsx +45 -45
  83. package/src/ui/MessageSkeleton.tsx +19 -19
  84. package/src/ui/Next.tsx +48 -48
  85. package/src/ui/SendingMessage/SendingMessageBox.tsx +16 -16
  86. package/src/ui/SendingMessage/SendingMessageContent.tsx +13 -13
  87. package/src/ui/SendingMessage/SendingMessageInfoBox.tsx +13 -13
  88. package/src/ui/SendingMessage/SendingMessageText.tsx +7 -7
  89. package/src/ui/SendingMessage/index.ts +4 -4
  90. package/src/ui/SystemMessage/SystemMessageBox.tsx +20 -20
  91. package/src/ui/SystemMessage/SystemMessageRow.tsx +43 -43
  92. package/src/ui/SystemMessage/index.ts +2 -2
  93. package/src/ui/customize.tsx +45 -45
  94. package/src/ui/index.ts +11 -11
  95. package/src/ui/localizer.tsx +80 -80
  96. package/src/util/index.ts +2 -2
  97. package/src/util/uniqBy.tsx +17 -17
  98. package/src/util/uniqId.tsx +3 -3
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "@webinex/chatify",
3
- "description": "Webinex Wispo",
4
- "private": false,
5
- "version": "1.0.0-rc3",
6
- "author": "Webinex Dev",
7
- "license": "Apache-2.0",
8
- "main": "dist/cjs/index.js",
9
- "module": "dist/esm/index.js",
10
- "types": "dist/index.d.ts",
11
- "type": "module",
12
- "targets": {
13
- "demo": {
14
- "source": "./example/index.html",
15
- "isLibrary": false
16
- }
17
- },
18
- "files": [
19
- "dist",
20
- "src"
21
- ],
22
- "scripts": {
23
- "build": "rimraf dist && rimraf add && rollup -c --environment ENV:production --failAfterWarnings",
24
- "start": "rollup -c -w",
25
- "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
26
- "prettier:write": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
27
- "prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
28
- "parcel": "parcel --target demo --dist-dir ./dist/demo",
29
- "parcel:build": "rimraf ../Webinex.Chatify.Example/wwwroot && cross-env NODE_ENV=production parcel build --target demo --dist-dir ../Webinex.Chatify.Example/wwwroot"
30
- },
31
- "devDependencies": {
32
- "@microsoft/signalr": "^8.0.0",
33
- "@parcel/transformer-sass": "2.9.2",
34
- "@rollup/plugin-commonjs": "^24.0.1",
35
- "@rollup/plugin-eslint": "^9.0.3",
36
- "@rollup/plugin-image": "^3.0.2",
37
- "@rollup/plugin-node-resolve": "^15.0.2",
38
- "@rollup/plugin-typescript": "^11.1.0",
39
- "@types/react": "^18.0.33",
40
- "@types/react-dom": "^18.0.11",
41
- "antd": "^5.11.5",
42
- "axios": "^1.6.2",
43
- "buffer": "^5.5.0||^6.0.0",
44
- "classnames": "^2.3.2",
45
- "cross-env": "^7.0.3",
46
- "dayjs": "^1.11.7",
47
- "eslint": "^8.38.0",
48
- "eslint-config-react-app": "^7.0.1",
49
- "immer": "^10.0.3",
50
- "is-hotkey": "^0.2.0",
51
- "parcel": "^2.10.3",
52
- "postcss": "^8.4.21",
53
- "prettier": "^2.8.7",
54
- "process": "^0.11.10",
55
- "react": "^18.2.0",
56
- "react-dom": "^18.2.0",
57
- "rimraf": "^5.0.5",
58
- "rollup": "^3.20.2",
59
- "rollup-plugin-copy": "^3.4.0",
60
- "rollup-plugin-dts": "^5.3.0",
61
- "rollup-plugin-peer-deps-external": "^2.2.4",
62
- "rollup-plugin-postcss": "^4.0.2",
63
- "rollup-plugin-scss": "^4.0.0",
64
- "rollup-plugin-terser": "^7.0.2",
65
- "rollup-plugin-visualizer": "^5.11.0",
66
- "sass": "^1.66.1",
67
- "shallow-equal": "^3.1.0",
68
- "slate": "^0.94.1",
69
- "slate-history": "^0.93.0",
70
- "slate-react": "^0.98.3",
71
- "tslib": "^2.6.2",
72
- "typescript": "^5.2.2"
73
- },
74
- "peerDependencies": {
75
- "@ant-design/icons": "^5.2.6",
76
- "@ctrl/tinycolor": "^4.0.2",
77
- "@microsoft/signalr": "^8.0.0",
78
- "antd": ">=5",
79
- "axios": ">=1",
80
- "classnames": ">=2",
81
- "dayjs": ">=1.8",
82
- "immer": ">=8",
83
- "is-hotkey": ">=0",
84
- "react": ">=16",
85
- "react-dom": ">=16",
86
- "shallow-equal": ">=3",
87
- "slate": "^0.94.1",
88
- "slate-history": "^0.93.0",
89
- "slate-react": "^0.98.3"
90
- },
91
- "dependencies": {}
92
- }
1
+ {
2
+ "name": "@webinex/chatify",
3
+ "description": "Webinex Wispo",
4
+ "private": false,
5
+ "version": "1.0.2-rc3",
6
+ "author": "Webinex Dev",
7
+ "license": "Apache-2.0",
8
+ "main": "dist/cjs/index.js",
9
+ "module": "dist/esm/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "type": "module",
12
+ "targets": {
13
+ "demo": {
14
+ "source": "./example/index.html",
15
+ "isLibrary": false
16
+ }
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "src"
21
+ ],
22
+ "scripts": {
23
+ "build": "rimraf dist && rimraf add && rollup -c --environment ENV:production --failAfterWarnings",
24
+ "start": "rollup -c -w",
25
+ "lint": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
26
+ "prettier:write": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
27
+ "prettier:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx}\"",
28
+ "parcel": "parcel --target demo --dist-dir ./dist/demo",
29
+ "parcel:build": "rimraf ../Webinex.Chatify.Example/wwwroot && cross-env NODE_ENV=production parcel build --target demo --dist-dir ../Webinex.Chatify.Example/wwwroot"
30
+ },
31
+ "devDependencies": {
32
+ "@microsoft/signalr": "^8.0.0",
33
+ "@parcel/transformer-sass": "2.9.2",
34
+ "@rollup/plugin-commonjs": "^24.0.1",
35
+ "@rollup/plugin-eslint": "^9.0.3",
36
+ "@rollup/plugin-image": "^3.0.2",
37
+ "@rollup/plugin-node-resolve": "^15.0.2",
38
+ "@rollup/plugin-typescript": "^11.1.0",
39
+ "@types/react": "^18.0.33",
40
+ "@types/react-dom": "^18.0.11",
41
+ "antd": "^5.11.5",
42
+ "axios": "^1.6.2",
43
+ "buffer": "^5.5.0||^6.0.0",
44
+ "classnames": "^2.3.2",
45
+ "cross-env": "^7.0.3",
46
+ "dayjs": "^1.11.7",
47
+ "eslint": "^8.38.0",
48
+ "eslint-config-react-app": "^7.0.1",
49
+ "immer": "^10.0.3",
50
+ "is-hotkey": "^0.2.0",
51
+ "parcel": "^2.10.3",
52
+ "postcss": "^8.4.21",
53
+ "prettier": "^2.8.7",
54
+ "process": "^0.11.10",
55
+ "react": "^18.2.0",
56
+ "react-dom": "^18.2.0",
57
+ "rimraf": "^5.0.5",
58
+ "rollup": "^3.20.2",
59
+ "rollup-plugin-copy": "^3.4.0",
60
+ "rollup-plugin-dts": "^5.3.0",
61
+ "rollup-plugin-peer-deps-external": "^2.2.4",
62
+ "rollup-plugin-postcss": "^4.0.2",
63
+ "rollup-plugin-scss": "^4.0.0",
64
+ "rollup-plugin-terser": "^7.0.2",
65
+ "rollup-plugin-visualizer": "^5.11.0",
66
+ "sass": "^1.66.1",
67
+ "shallow-equal": "^3.1.0",
68
+ "slate": "^0.94.1",
69
+ "slate-history": "^0.93.0",
70
+ "slate-react": "^0.98.3",
71
+ "tslib": "^2.6.2",
72
+ "typescript": "^5.2.2"
73
+ },
74
+ "peerDependencies": {
75
+ "@ant-design/icons": "^5.2.6",
76
+ "@ctrl/tinycolor": "^4.0.2",
77
+ "@microsoft/signalr": "^8.0.0",
78
+ "antd": ">=5",
79
+ "axios": ">=1",
80
+ "classnames": ">=2",
81
+ "dayjs": ">=1.8",
82
+ "immer": ">=8",
83
+ "is-hotkey": ">=0",
84
+ "react": ">=16",
85
+ "react-dom": ">=16",
86
+ "shallow-equal": ">=3",
87
+ "slate": "^0.94.1",
88
+ "slate-history": "^0.93.0",
89
+ "slate-react": "^0.98.3"
90
+ },
91
+ "dependencies": {}
92
+ }
@@ -1,41 +1,41 @@
1
- import React, { PropsWithChildren, useContext } from 'react';
2
- import { ReducerProvider } from './core/reducer';
3
- import { ChatifyClient } from './core/client';
4
- import { useSignalRMonitor } from './core/useSignalRMonitor';
5
-
6
- const MeContext = React.createContext<string>(null!);
7
- const ClientContext = React.createContext<ChatifyClient>(null!);
8
-
9
- export function useClient() {
10
- return useContext(ClientContext);
11
- }
12
-
13
- export function useMe() {
14
- return useContext(MeContext);
15
- }
16
-
17
- export interface ChatifyContextValue {
18
- me: string;
19
- client: ChatifyClient;
20
- }
21
-
22
- function ChatifyContextWrapper(props: PropsWithChildren<{}>) {
23
- const { children } = props;
24
- const me = useMe();
25
- const client = useClient();
26
- useSignalRMonitor(me, client);
27
-
28
- return <>{children}</>;
29
- }
30
-
31
- export function ChatifyContext({ value, children }: PropsWithChildren<{ value: ChatifyContextValue }>) {
32
- return (
33
- <ClientContext.Provider value={value.client}>
34
- <MeContext.Provider value={value.me}>
35
- <ReducerProvider>
36
- <ChatifyContextWrapper>{children}</ChatifyContextWrapper>
37
- </ReducerProvider>
38
- </MeContext.Provider>
39
- </ClientContext.Provider>
40
- );
41
- }
1
+ import React, { PropsWithChildren, useContext } from 'react';
2
+ import { ReducerProvider } from './core/reducer';
3
+ import { ChatifyClient } from './core/client';
4
+ import { useSignalRMonitor } from './core/useSignalRMonitor';
5
+
6
+ const MeContext = React.createContext<string>(null!);
7
+ const ClientContext = React.createContext<ChatifyClient>(null!);
8
+
9
+ export function useClient() {
10
+ return useContext(ClientContext);
11
+ }
12
+
13
+ export function useMe() {
14
+ return useContext(MeContext);
15
+ }
16
+
17
+ export interface ChatifyContextValue {
18
+ me: string;
19
+ client: ChatifyClient;
20
+ }
21
+
22
+ function ChatifyContextWrapper(props: PropsWithChildren<{}>) {
23
+ const { children } = props;
24
+ const me = useMe();
25
+ const client = useClient();
26
+ useSignalRMonitor(me, client);
27
+
28
+ return <>{children}</>;
29
+ }
30
+
31
+ export function ChatifyContext({ value, children }: PropsWithChildren<{ value: ChatifyContextValue }>) {
32
+ return (
33
+ <ClientContext.Provider value={value.client}>
34
+ <MeContext.Provider value={value.me}>
35
+ <ReducerProvider>
36
+ <ChatifyContextWrapper>{children}</ChatifyContextWrapper>
37
+ </ReducerProvider>
38
+ </MeContext.Provider>
39
+ </ClientContext.Provider>
40
+ );
41
+ }