mr-chat-bird 1.0.0 → 1.0.2
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/package.json +41 -21
- package/app/layout.tsx +0 -69
- package/app/page.tsx +0 -9
- package/eslint.config.mjs +0 -11
- package/index.ts +0 -1
- package/next-env.d.ts +0 -5
- package/next.config.mjs +0 -30
- package/postcss.config.cjs +0 -14
- package/public/favicon.svg +0 -1
- package/src/components/ChatUserList/ChatUserList.module.css +0 -253
- package/src/components/ChatUserList/ChatUserList.tsx +0 -434
- package/src/components/ChatUserList/ChatUserList.type.tsx +0 -12
- package/src/components/ChatUserList/ChatUserMessage.tsx +0 -362
- package/src/components/ChatUserList/users_list.json +0 -648
- package/src/components/ColorSchemeToggle/ColorSchemeToggle.tsx +0 -15
- package/src/components/EmojiPickerPopover/EmojiPickerPopover.tsx +0 -72
- package/src/components/MrChat/index.tsx +0 -34
- package/src/components/RichTextEditor/DropzoneMenuItem.tsx +0 -33
- package/src/components/RichTextEditor/EmojiNode.tsx +0 -36
- package/src/components/RichTextEditor/RichTextEditor.module.css +0 -95
- package/src/components/RichTextEditor/RichTextEditor.tsx +0 -248
- package/src/components/UserProfile/UserProfileDrawer.module.css +0 -120
- package/src/components/UserProfile/UserProfileDrawer.tsx +0 -115
- package/src/components/VirtualizedList/ChatScrollContainer.tsx +0 -92
- package/src/components/VirtualizedList/index.tsx +0 -31
- package/src/lib/axios.ts +0 -12
- package/src/lib/socket.ts +0 -29
- package/src/store/provider.tsx +0 -8
- package/src/store/slices/ChatSlice.ts +0 -249
- package/src/store/socket/index.tsx +0 -32
- package/src/store/store.ts +0 -11
- package/src/theme.ts +0 -84
- package/src/utils/environment.ts +0 -5
- package/src/utils/helper.ts +0 -36
- package/src/utils/icons/richText/Add.svg +0 -1
- package/src/utils/icons/richText/AddReaction.svg +0 -1
- package/src/utils/icons/richText/Docs.svg +0 -1
- package/src/utils/icons/richText/Image.svg +0 -1
- package/src/utils/icons/richText/TextFormat.svg +0 -1
- package/tsconfig.json +0 -25
package/src/utils/helper.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export const getChatDisplayTime = (
|
|
2
|
-
timestamp?: string | number | Date
|
|
3
|
-
) => {
|
|
4
|
-
if (!timestamp) return "";
|
|
5
|
-
|
|
6
|
-
const msgDate = new Date(timestamp);
|
|
7
|
-
|
|
8
|
-
const today = new Date();
|
|
9
|
-
const yesterday = new Date();
|
|
10
|
-
yesterday.setDate(today.getDate() - 1);
|
|
11
|
-
|
|
12
|
-
const isToday =
|
|
13
|
-
msgDate.toDateString() === today.toDateString();
|
|
14
|
-
|
|
15
|
-
const isYesterday =
|
|
16
|
-
msgDate.toDateString() === yesterday.toDateString();
|
|
17
|
-
|
|
18
|
-
const time = msgDate.toLocaleTimeString("en-GB", {
|
|
19
|
-
hour: "2-digit",
|
|
20
|
-
minute: "2-digit",
|
|
21
|
-
hour12: false,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
if (isToday) {
|
|
25
|
-
return time;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (isYesterday) {
|
|
29
|
-
return "Yesterday";
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return msgDate.toLocaleDateString(undefined, {
|
|
33
|
-
day: "numeric",
|
|
34
|
-
month: "short",
|
|
35
|
-
});
|
|
36
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000"><path d="M440-440H240q-17 0-28.5-11.5T200-480q0-17 11.5-28.5T240-520h200v-200q0-17 11.5-28.5T480-760q17 0 28.5 11.5T520-720v200h200q17 0 28.5 11.5T760-480q0 17-11.5 28.5T720-440H520v200q0 17-11.5 28.5T480-200q-17 0-28.5-11.5T440-240v-200Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000"><path d="M480-480Zm0 400q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q33 0 65 5t62 15q23 8 29 23.5t1 30.5q-5 15-18.5 23.5T588-781q-26-9-52.5-14t-55.5-5q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-18-2-36t-6-35q-5-19 5-31t25-15q15-3 29.5 4.5T871-564q5 20 7 41t2 43q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm320-680h-40q-17 0-28.5-11.5T720-800q0-17 11.5-28.5T760-840h40v-40q0-17 11.5-28.5T840-920q17 0 28.5 11.5T880-880v40h40q17 0 28.5 11.5T960-800q0 17-11.5 28.5T920-760h-40v40q0 17-11.5 28.5T840-680q-17 0-28.5-11.5T800-720v-40ZM620-520q25 0 42.5-17.5T680-580q0-25-17.5-42.5T620-640q-25 0-42.5 17.5T560-580q0 25 17.5 42.5T620-520Zm-280 0q25 0 42.5-17.5T400-580q0-25-17.5-42.5T340-640q-25 0-42.5 17.5T280-580q0 25 17.5 42.5T340-520Zm140 260q58 0 107-28t79-76q6-12-1-24t-21-12H316q-14 0-21 12t-1 24q30 48 79.5 76T480-260Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path d="M14 3v4a1 1 0 0 0 1 1h4"></path><path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z"></path><path d="M9 9l1 0"></path><path d="M9 13l6 0"></path><path d="M9 17l6 0"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0 0v-560 560Zm80-80h400q12 0 18-11t-2-21L586-459q-6-8-16-8t-16 8L450-320l-74-99q-6-8-16-8t-16 8l-80 107q-8 10-2 21t18 11Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000"><path d="M240-200q-17 0-28.5-11.5T200-240q0-17 11.5-28.5T240-280h480q17 0 28.5 11.5T760-240q0 17-11.5 28.5T720-200H240Zm54-208 137-368q4-11 13.5-17.5T466-800h28q12 0 21.5 6.5T529-776l137 369q6 17-4 32t-28 15q-11 0-20.5-6.5T600-384l-30-88H392l-32 89q-4 11-13 17t-20 6q-19 0-29.5-15.5T294-408Zm120-128h132l-64-182h-4l-64 182Z"/></svg>
|
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"types": ["node"],
|
|
4
|
-
"target": "ES2020",
|
|
5
|
-
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
-
"allowJs": true,
|
|
7
|
-
"skipLibCheck": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"module": "esnext",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"resolveJsonModule": true,
|
|
15
|
-
"isolatedModules": true,
|
|
16
|
-
"jsx": "preserve",
|
|
17
|
-
"incremental": false,
|
|
18
|
-
"paths": {
|
|
19
|
-
"@/*": ["./*"]
|
|
20
|
-
},
|
|
21
|
-
"plugins": [{ "name": "next" }]
|
|
22
|
-
},
|
|
23
|
-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
24
|
-
"exclude": ["node_modules"]
|
|
25
|
-
}
|