movius-chats 1.0.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 +249 -0
- package/lib/commonjs/assets/Icons/ArrowBack2RoundedIcon.js +2 -0
- package/lib/commonjs/assets/Icons/ArrowBack2RoundedIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/CameraIcon.js +2 -0
- package/lib/commonjs/assets/Icons/CameraIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/CheckAllIcon.js +2 -0
- package/lib/commonjs/assets/Icons/CheckAllIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/CheckIcon.js +2 -0
- package/lib/commonjs/assets/Icons/CheckIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/EmojiFunnySquareIcon.js +2 -0
- package/lib/commonjs/assets/Icons/EmojiFunnySquareIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/LoadingIcon.js +2 -0
- package/lib/commonjs/assets/Icons/LoadingIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/MicrophoneIcon.js +2 -0
- package/lib/commonjs/assets/Icons/MicrophoneIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/PaperClipIcon.js +2 -0
- package/lib/commonjs/assets/Icons/PaperClipIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/PaperPlaneIcon.js +2 -0
- package/lib/commonjs/assets/Icons/PaperPlaneIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/PauseIcon.js +2 -0
- package/lib/commonjs/assets/Icons/PauseIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/PlayIcon.js +2 -0
- package/lib/commonjs/assets/Icons/PlayIcon.js.map +1 -0
- package/lib/commonjs/assets/Icons/XIcon.js +2 -0
- package/lib/commonjs/assets/Icons/XIcon.js.map +1 -0
- package/lib/commonjs/components/AudioPlayer/AudioPlayer.js +2 -0
- package/lib/commonjs/components/AudioPlayer/AudioPlayer.js.map +1 -0
- package/lib/commonjs/components/ChatBubble/ChatBubble.js +2 -0
- package/lib/commonjs/components/ChatBubble/ChatBubble.js.map +1 -0
- package/lib/commonjs/components/ChatBubble/MessageContent.js +2 -0
- package/lib/commonjs/components/ChatBubble/MessageContent.js.map +1 -0
- package/lib/commonjs/components/ChatBubble/MessageStatus.js +2 -0
- package/lib/commonjs/components/ChatBubble/MessageStatus.js.map +1 -0
- package/lib/commonjs/components/ChatInput/ChatInput.js +2 -0
- package/lib/commonjs/components/ChatInput/ChatInput.js.map +1 -0
- package/lib/commonjs/components/MediaViewer/MediaViewer.js +2 -0
- package/lib/commonjs/components/MediaViewer/MediaViewer.js.map +1 -0
- package/lib/commonjs/components/TypingComponent/TypingIndicator.js +2 -0
- package/lib/commonjs/components/TypingComponent/TypingIndicator.js.map +1 -0
- package/lib/commonjs/context/AudioContext.js +2 -0
- package/lib/commonjs/context/AudioContext.js.map +1 -0
- package/lib/commonjs/context/ChatContext.js +2 -0
- package/lib/commonjs/context/ChatContext.js.map +1 -0
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/utils/datefunc.js +2 -0
- package/lib/commonjs/utils/datefunc.js.map +1 -0
- package/lib/module/assets/Icons/ArrowBack2RoundedIcon.js +2 -0
- package/lib/module/assets/Icons/ArrowBack2RoundedIcon.js.map +1 -0
- package/lib/module/assets/Icons/CameraIcon.js +2 -0
- package/lib/module/assets/Icons/CameraIcon.js.map +1 -0
- package/lib/module/assets/Icons/CheckAllIcon.js +2 -0
- package/lib/module/assets/Icons/CheckAllIcon.js.map +1 -0
- package/lib/module/assets/Icons/CheckIcon.js +2 -0
- package/lib/module/assets/Icons/CheckIcon.js.map +1 -0
- package/lib/module/assets/Icons/EmojiFunnySquareIcon.js +2 -0
- package/lib/module/assets/Icons/EmojiFunnySquareIcon.js.map +1 -0
- package/lib/module/assets/Icons/LoadingIcon.js +2 -0
- package/lib/module/assets/Icons/LoadingIcon.js.map +1 -0
- package/lib/module/assets/Icons/MicrophoneIcon.js +2 -0
- package/lib/module/assets/Icons/MicrophoneIcon.js.map +1 -0
- package/lib/module/assets/Icons/PaperClipIcon.js +2 -0
- package/lib/module/assets/Icons/PaperClipIcon.js.map +1 -0
- package/lib/module/assets/Icons/PaperPlaneIcon.js +2 -0
- package/lib/module/assets/Icons/PaperPlaneIcon.js.map +1 -0
- package/lib/module/assets/Icons/PauseIcon.js +2 -0
- package/lib/module/assets/Icons/PauseIcon.js.map +1 -0
- package/lib/module/assets/Icons/PlayIcon.js +2 -0
- package/lib/module/assets/Icons/PlayIcon.js.map +1 -0
- package/lib/module/assets/Icons/XIcon.js +2 -0
- package/lib/module/assets/Icons/XIcon.js.map +1 -0
- package/lib/module/components/AudioPlayer/AudioPlayer.js +2 -0
- package/lib/module/components/AudioPlayer/AudioPlayer.js.map +1 -0
- package/lib/module/components/ChatBubble/ChatBubble.js +2 -0
- package/lib/module/components/ChatBubble/ChatBubble.js.map +1 -0
- package/lib/module/components/ChatBubble/MessageContent.js +2 -0
- package/lib/module/components/ChatBubble/MessageContent.js.map +1 -0
- package/lib/module/components/ChatBubble/MessageStatus.js +2 -0
- package/lib/module/components/ChatBubble/MessageStatus.js.map +1 -0
- package/lib/module/components/ChatInput/ChatInput.js +2 -0
- package/lib/module/components/ChatInput/ChatInput.js.map +1 -0
- package/lib/module/components/MediaViewer/MediaViewer.js +2 -0
- package/lib/module/components/MediaViewer/MediaViewer.js.map +1 -0
- package/lib/module/components/TypingComponent/TypingIndicator.js +2 -0
- package/lib/module/components/TypingComponent/TypingIndicator.js.map +1 -0
- package/lib/module/context/AudioContext.js +2 -0
- package/lib/module/context/AudioContext.js.map +1 -0
- package/lib/module/context/ChatContext.js +2 -0
- package/lib/module/context/ChatContext.js.map +1 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/utils/datefunc.js +2 -0
- package/lib/module/utils/datefunc.js.map +1 -0
- package/lib/typescript/assets/Icons/ArrowBack2RoundedIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/CameraIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/CheckAllIcon.d.ts +4 -0
- package/lib/typescript/assets/Icons/CheckIcon.d.ts +4 -0
- package/lib/typescript/assets/Icons/EmojiFunnySquareIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/LoadingIcon.d.ts +4 -0
- package/lib/typescript/assets/Icons/MicrophoneIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/PaperClipIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/PaperPlaneIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/PauseIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/PlayIcon.d.ts +5 -0
- package/lib/typescript/assets/Icons/XIcon.d.ts +4 -0
- package/lib/typescript/components/AudioPlayer/AudioPlayer.d.ts +4 -0
- package/lib/typescript/components/AudioPlayer/types.d.ts +5 -0
- package/lib/typescript/components/ChatBubble/ChatBubble.d.ts +4 -0
- package/lib/typescript/components/ChatBubble/MessageContent.d.ts +4 -0
- package/lib/typescript/components/ChatBubble/MessageStatus.d.ts +4 -0
- package/lib/typescript/components/ChatBubble/types.d.ts +18 -0
- package/lib/typescript/components/ChatInput/ChatInput.d.ts +4 -0
- package/lib/typescript/components/ChatInput/types.d.ts +20 -0
- package/lib/typescript/components/MediaViewer/MediaViewer.d.ts +4 -0
- package/lib/typescript/components/MediaViewer/types.d.ts +5 -0
- package/lib/typescript/components/TypingComponent/TypingIndicator.d.ts +11 -0
- package/lib/typescript/context/AudioContext.d.ts +10 -0
- package/lib/typescript/context/ChatContext.d.ts +19 -0
- package/lib/typescript/index.d.ts +4 -0
- package/lib/typescript/types/index.d.ts +85 -0
- package/lib/typescript/utils/datefunc.d.ts +1 -0
- package/package.json +93 -0
- package/src/assets/Icons/ArrowBack2RoundedIcon.tsx +25 -0
- package/src/assets/Icons/CameraIcon.tsx +20 -0
- package/src/assets/Icons/CheckAllIcon.tsx +13 -0
- package/src/assets/Icons/CheckIcon.tsx +11 -0
- package/src/assets/Icons/EmojiFunnySquareIcon.tsx +41 -0
- package/src/assets/Icons/LoadingIcon.tsx +15 -0
- package/src/assets/Icons/MicrophoneIcon.tsx +24 -0
- package/src/assets/Icons/PaperClipIcon.tsx +17 -0
- package/src/assets/Icons/PaperPlaneIcon.tsx +24 -0
- package/src/assets/Icons/PauseIcon.tsx +21 -0
- package/src/assets/Icons/PlayIcon.tsx +20 -0
- package/src/assets/Icons/XIcon.tsx +20 -0
- package/src/components/AudioPlayer/AudioPlayer.tsx +259 -0
- package/src/components/AudioPlayer/types.ts +5 -0
- package/src/components/ChatBubble/ChatBubble.tsx +137 -0
- package/src/components/ChatBubble/MessageContent.tsx +143 -0
- package/src/components/ChatBubble/MessageStatus.tsx +68 -0
- package/src/components/ChatBubble/types.ts +21 -0
- package/src/components/ChatInput/ChatInput.tsx +207 -0
- package/src/components/ChatInput/types.ts +22 -0
- package/src/components/MediaViewer/MediaViewer.tsx +101 -0
- package/src/components/MediaViewer/types.ts +5 -0
- package/src/components/TypingComponent/TypingIndicator.tsx +119 -0
- package/src/context/AudioContext.tsx +30 -0
- package/src/context/ChatContext.tsx +40 -0
- package/src/index.tsx +103 -0
- package/src/types/index.ts +94 -0
- package/src/utils/datefunc.ts +5 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Message } from "../../types";
|
|
2
|
+
export interface ChatBubbleProps {
|
|
3
|
+
message: Message;
|
|
4
|
+
isCurrentUser: boolean;
|
|
5
|
+
isFirstInSequence: boolean;
|
|
6
|
+
onLongPress?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface MessageContentProps extends ChatBubbleProps {
|
|
9
|
+
onMediaPress: (type: "image" | "video", url: string) => void;
|
|
10
|
+
isVideoPlaying?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface MessageStatusProps {
|
|
13
|
+
time: string;
|
|
14
|
+
status?: "read" | "delivered" | "sent";
|
|
15
|
+
isCurrentUser: boolean;
|
|
16
|
+
hasText: boolean;
|
|
17
|
+
hasAudio: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Message } from "../../types";
|
|
2
|
+
export interface ChatInputProps {
|
|
3
|
+
onSendMessage: (message: Omit<Message, "id" | "time" | "status">) => void;
|
|
4
|
+
onTypingStart?: () => void;
|
|
5
|
+
onTypingEnd?: () => void;
|
|
6
|
+
onAttachmentPress?: () => void;
|
|
7
|
+
onCameraPress?: () => void;
|
|
8
|
+
onAudioRecordStart?: () => void;
|
|
9
|
+
onAudioRecordEnd?: () => void;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
CustomEmojiIcon?: () => React.ReactNode;
|
|
12
|
+
CustomAttachmentIcon?: () => React.ReactNode;
|
|
13
|
+
CustomCameraIcon?: () => React.ReactNode;
|
|
14
|
+
CustomSendIcon?: () => React.ReactNode;
|
|
15
|
+
CustomMicrophoneIcon?: () => React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export interface InputHeightState {
|
|
18
|
+
height: number;
|
|
19
|
+
isMultiline: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface TypingUser {
|
|
2
|
+
id: string;
|
|
3
|
+
avatar: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
interface TypingIndicatorProps {
|
|
7
|
+
typingUsers: TypingUser[];
|
|
8
|
+
currentUserId: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const TypingIndicator: ({ typingUsers, currentUserId, }: TypingIndicatorProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface AudioContextType {
|
|
3
|
+
currentlyPlayingId: string | null;
|
|
4
|
+
setCurrentlyPlayingId: (id: string | null) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const AudioProvider: React.FC<{
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const useAudio: () => AudioContextType;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChatScreenProps } from "../types";
|
|
3
|
+
interface ChatContextType extends ChatScreenProps {
|
|
4
|
+
mediaUrl: {
|
|
5
|
+
imageUrl: string;
|
|
6
|
+
videoUrl: string;
|
|
7
|
+
};
|
|
8
|
+
setMediaUrl: (url: {
|
|
9
|
+
imageUrl: string;
|
|
10
|
+
videoUrl: string;
|
|
11
|
+
}) => void;
|
|
12
|
+
isVideoPlaying: boolean;
|
|
13
|
+
setIsVideoPlaying: (playing: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const ChatProvider: React.FC<ChatScreenProps & {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const useChatContext: () => ChatContextType;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ImageStyle, TextStyle, ViewStyle } from "react-native";
|
|
2
|
+
export interface Message {
|
|
3
|
+
id: string;
|
|
4
|
+
text?: string;
|
|
5
|
+
image?: string;
|
|
6
|
+
video?: string;
|
|
7
|
+
audio?: string;
|
|
8
|
+
senderId: string;
|
|
9
|
+
time: string;
|
|
10
|
+
status: "read" | "delivered" | "sent";
|
|
11
|
+
senderName?: string;
|
|
12
|
+
senderAvatar?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ChatScreenProps {
|
|
15
|
+
messages: Message[];
|
|
16
|
+
currentUserId: string;
|
|
17
|
+
onSendMessage: (message: Omit<Message, "id" | "time" | "status">) => void;
|
|
18
|
+
onMessageLongPress?: (message: Message) => void;
|
|
19
|
+
onAttachmentPress?: () => void;
|
|
20
|
+
onAudioRecordEnd?: () => void;
|
|
21
|
+
onAudioRecordStart?: () => void;
|
|
22
|
+
onCameraPress?: () => void;
|
|
23
|
+
typingUsers?: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
avatar: string;
|
|
26
|
+
name: string;
|
|
27
|
+
}>;
|
|
28
|
+
onTypingStart?: () => void;
|
|
29
|
+
onTypingEnd?: () => void;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
theme?: {
|
|
32
|
+
colors?: {
|
|
33
|
+
sentMessageTailColor?: string;
|
|
34
|
+
receivedMessageTailColor?: string;
|
|
35
|
+
timestamp?: string;
|
|
36
|
+
inputsIconsColor?: string;
|
|
37
|
+
sendIconsColor?: string;
|
|
38
|
+
placeholderTextColor?: string;
|
|
39
|
+
audioPlayIconColor?: string;
|
|
40
|
+
audioPauseIconColor?: string;
|
|
41
|
+
videoPlayIconColor?: string;
|
|
42
|
+
};
|
|
43
|
+
bubbleStyle?: {
|
|
44
|
+
sent?: ViewStyle;
|
|
45
|
+
received?: ViewStyle;
|
|
46
|
+
avatarTextStyle?: TextStyle;
|
|
47
|
+
userNameStyle?: TextStyle;
|
|
48
|
+
avatarImageStyle?: ImageStyle;
|
|
49
|
+
typingContainerStyle?: ViewStyle;
|
|
50
|
+
additionalTypingUsersContainerStyle?: ViewStyle;
|
|
51
|
+
additionalTypingUsersTextStyle?: TextStyle;
|
|
52
|
+
};
|
|
53
|
+
messageStyle?: {
|
|
54
|
+
textStyle?: TextStyle;
|
|
55
|
+
audioPlayButtonStyle?: ViewStyle;
|
|
56
|
+
audioKnobStyle?: ViewStyle;
|
|
57
|
+
progressBarStyle?: ViewStyle;
|
|
58
|
+
activeProgressBarStyle?: ViewStyle;
|
|
59
|
+
audioDurationStyle?: TextStyle;
|
|
60
|
+
};
|
|
61
|
+
inputStyles?: {
|
|
62
|
+
inputSectionContainerStyle?: ViewStyle;
|
|
63
|
+
inputContainerStyle?: ViewStyle;
|
|
64
|
+
sendButtonStyle?: ViewStyle;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
showAvatars?: boolean;
|
|
68
|
+
showUserNames?: boolean;
|
|
69
|
+
showEmojiButton?: boolean;
|
|
70
|
+
showAttachmentsButton?: boolean;
|
|
71
|
+
showCameraButton?: boolean;
|
|
72
|
+
showVoiceRecordButton?: boolean;
|
|
73
|
+
showBubbleTail?: boolean;
|
|
74
|
+
showMessageStatus?: boolean;
|
|
75
|
+
renderCustomInput?: () => React.ReactNode;
|
|
76
|
+
renderCustomVideoBubbleError?: () => React.ReactNode;
|
|
77
|
+
renderCustomTyping?: () => React.ReactNode;
|
|
78
|
+
CustomEmojiIcon?: () => React.ReactNode;
|
|
79
|
+
CustomAttachmentIcon?: () => React.ReactNode;
|
|
80
|
+
CustomCameraIcon?: () => React.ReactNode;
|
|
81
|
+
CustomSendIcon?: () => React.ReactNode;
|
|
82
|
+
CustomMicrophoneIcon?: () => React.ReactNode;
|
|
83
|
+
CustomPlayIcon?: () => React.ReactNode;
|
|
84
|
+
CustomPauseIcon?: () => React.ReactNode;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const formatDuration: (time: number) => string;
|
package/package.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "movius-chats",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A highly customizable, feature-rich chat interface component for React Native applications",
|
|
5
|
+
"main": "lib/commonjs/index.js",
|
|
6
|
+
"module": "lib/module/index.js",
|
|
7
|
+
"types": "lib/typescript/index.d.ts",
|
|
8
|
+
"react-native": "src",
|
|
9
|
+
"source": "src",
|
|
10
|
+
"files": [
|
|
11
|
+
"src",
|
|
12
|
+
"lib",
|
|
13
|
+
"!**/__tests__",
|
|
14
|
+
"!**/__fixtures__",
|
|
15
|
+
"!**/__mocks__"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "jest",
|
|
19
|
+
"typescript": "tsc --noEmit",
|
|
20
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
21
|
+
"prepare": "yarn build",
|
|
22
|
+
"build": "yarn clean && yarn build:js && yarn build:types",
|
|
23
|
+
"build:types": "tsc --project tsconfig.types.json",
|
|
24
|
+
"build:js": "rollup -c rollup.config.cjs",
|
|
25
|
+
"clean": "rimraf lib",
|
|
26
|
+
"release": "release-it",
|
|
27
|
+
"example": "yarn --cwd example"
|
|
28
|
+
},
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/David-Atueyi/Movius-Chats.git"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"react-native",
|
|
35
|
+
"chat",
|
|
36
|
+
"messaging",
|
|
37
|
+
"ui-component"
|
|
38
|
+
],
|
|
39
|
+
"author": "",
|
|
40
|
+
"license": "ISC",
|
|
41
|
+
"type": "commonjs",
|
|
42
|
+
"bugs": {
|
|
43
|
+
"url": "https://github.com/David-Atueyi/Movius-Chats/issues"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://github.com/David-Atueyi/Movius-Chats#readme",
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"react": ">=16.8.0",
|
|
48
|
+
"react-native": "*",
|
|
49
|
+
"react-native-reanimated": "*"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"react-native-image-zoom-viewer": "^3.0.1",
|
|
53
|
+
"react-native-sound": "^0.11.2",
|
|
54
|
+
"react-native-svg": "15.2.0",
|
|
55
|
+
"react-native-video": "^6.9.1",
|
|
56
|
+
"twrnc": "^4.6.1"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@babel/core": "^7.23.3",
|
|
60
|
+
"@babel/preset-env": "^7.23.3",
|
|
61
|
+
"@babel/preset-react": "^7.23.3",
|
|
62
|
+
"@babel/preset-typescript": "^7.23.3",
|
|
63
|
+
"@babel/plugin-transform-class-properties": "^7.23.3",
|
|
64
|
+
"@babel/plugin-transform-private-methods": "^7.23.3",
|
|
65
|
+
"@babel/plugin-transform-private-property-in-object": "^7.23.3",
|
|
66
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
67
|
+
"@rollup/plugin-commonjs": "^28.0.2",
|
|
68
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
69
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
70
|
+
"@types/jest": "^29.5.11",
|
|
71
|
+
"@types/react": "18.3.18",
|
|
72
|
+
"@types/react-native": "^0.73.0",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
74
|
+
"@typescript-eslint/parser": "^6.19.0",
|
|
75
|
+
"eslint": "^8.56.0",
|
|
76
|
+
"eslint-config-prettier": "^9.1.0",
|
|
77
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
78
|
+
"jest": "^29.7.0",
|
|
79
|
+
"metro-react-native-babel-preset": "^0.77.0",
|
|
80
|
+
"prettier": "^3.2.0",
|
|
81
|
+
"react-native-reanimated": "^3.0.0",
|
|
82
|
+
"rimraf": "^6.0.1",
|
|
83
|
+
"rollup": "^4.34.9",
|
|
84
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
85
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
86
|
+
"typescript": "^5.3.3"
|
|
87
|
+
},
|
|
88
|
+
"prettier": {
|
|
89
|
+
"singleQuote": true,
|
|
90
|
+
"tabWidth": 2,
|
|
91
|
+
"trailingComma": "es5"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const ArrowBack2RoundedIcon = ({
|
|
6
|
+
style,
|
|
7
|
+
color,
|
|
8
|
+
}: {
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
color?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<Svg style={style} fill={color} viewBox="0 0 48 48">
|
|
14
|
+
<Path
|
|
15
|
+
fillRule="evenodd"
|
|
16
|
+
stroke="currentColor"
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
strokeLinejoin="round"
|
|
19
|
+
strokeWidth="4"
|
|
20
|
+
d="M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z"
|
|
21
|
+
clipRule="evenodd"
|
|
22
|
+
></Path>
|
|
23
|
+
</Svg>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
import { Circle, G, Path, Svg } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
export const CameraIcon = ({
|
|
5
|
+
style,
|
|
6
|
+
color
|
|
7
|
+
}: {
|
|
8
|
+
style?: ViewStyle;
|
|
9
|
+
color?: string;
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
13
|
+
<G fill="none" strokeWidth="1.5" stroke={color}>
|
|
14
|
+
<Circle cx="12" cy="13" r="3"></Circle>
|
|
15
|
+
<Path d="M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z"></Path>
|
|
16
|
+
<Path strokeLinecap="round" d="M19 10h-1"></Path>
|
|
17
|
+
</G>
|
|
18
|
+
</Svg>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const CheckAllIcon = ({ style }: { style?: ViewStyle }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
8
|
+
<Path
|
|
9
|
+
d="M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"
|
|
10
|
+
></Path>
|
|
11
|
+
</Svg>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const CheckIcon = ({ style }: { style?: ViewStyle }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
8
|
+
<Path d="m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z"></Path>
|
|
9
|
+
</Svg>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { Ellipse, G, Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const EmojiFunnySquareIcon = ({ style ,color}: { style?: ViewStyle,color?: string }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
8
|
+
<G fill="none" stroke={color}>
|
|
9
|
+
<Path
|
|
10
|
+
strokeLinecap="round"
|
|
11
|
+
strokeWidth="1.5"
|
|
12
|
+
d="M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001"
|
|
13
|
+
></Path>
|
|
14
|
+
<Ellipse
|
|
15
|
+
cx="14.509"
|
|
16
|
+
cy="9.774"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
rx="1"
|
|
19
|
+
ry="1.5"
|
|
20
|
+
transform="rotate(-15 14.51 9.774)"
|
|
21
|
+
></Ellipse>
|
|
22
|
+
<Ellipse
|
|
23
|
+
cx="8.714"
|
|
24
|
+
cy="11.328"
|
|
25
|
+
fill="currentColor"
|
|
26
|
+
rx="1"
|
|
27
|
+
ry="1.5"
|
|
28
|
+
transform="rotate(-15 8.714 11.328)"
|
|
29
|
+
></Ellipse>
|
|
30
|
+
<Path
|
|
31
|
+
strokeWidth="1.5"
|
|
32
|
+
d="M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z"
|
|
33
|
+
></Path>
|
|
34
|
+
<Path
|
|
35
|
+
strokeWidth="1.5"
|
|
36
|
+
d="m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935"
|
|
37
|
+
></Path>
|
|
38
|
+
</G>
|
|
39
|
+
</Svg>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
export const LoadingIcon = ({ style }: { style?: ViewStyle }) => {
|
|
5
|
+
return (
|
|
6
|
+
<Svg
|
|
7
|
+
style={style}
|
|
8
|
+
viewBox="0 0 1024 1024"
|
|
9
|
+
>
|
|
10
|
+
<Path
|
|
11
|
+
d="M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36"
|
|
12
|
+
></Path>
|
|
13
|
+
</Svg>
|
|
14
|
+
);
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { G, Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const MicrophoneIcon = ({
|
|
6
|
+
style,
|
|
7
|
+
color,
|
|
8
|
+
}: {
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
color?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
14
|
+
<G fill="none" strokeWidth="1.5" stroke={color}>
|
|
15
|
+
<Path d="M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z"></Path>
|
|
16
|
+
<Path
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
d="M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3"
|
|
19
|
+
opacity=".5"
|
|
20
|
+
></Path>
|
|
21
|
+
</G>
|
|
22
|
+
</Svg>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
import { ViewStyle } from "react-native";
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const PaperClipIcon = ({
|
|
6
|
+
style,
|
|
7
|
+
color,
|
|
8
|
+
}: {
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
color?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<Svg style={style} fill={color} viewBox="0 0 24 24">
|
|
14
|
+
<Path d="M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z"></Path>
|
|
15
|
+
</Svg>
|
|
16
|
+
);
|
|
17
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
|
|
3
|
+
import Svg, { G, Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const PaperPlaneIcon = ({
|
|
6
|
+
style,
|
|
7
|
+
color,
|
|
8
|
+
}: {
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
color?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
14
|
+
<G fill="none" strokeWidth="1.5" stroke={color}>
|
|
15
|
+
<Path d="m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z"></Path>
|
|
16
|
+
<Path
|
|
17
|
+
strokeLinecap="round"
|
|
18
|
+
d="m17.79 6.21l-4.211 4.165"
|
|
19
|
+
opacity=".5"
|
|
20
|
+
></Path>
|
|
21
|
+
</G>
|
|
22
|
+
</Svg>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
import Svg, { Path } from "react-native-svg";
|
|
3
|
+
|
|
4
|
+
export const PauseIcon = ({
|
|
5
|
+
style,
|
|
6
|
+
color,
|
|
7
|
+
}: {
|
|
8
|
+
style?: ViewStyle;
|
|
9
|
+
color?: string;
|
|
10
|
+
}) => {
|
|
11
|
+
return (
|
|
12
|
+
<Svg style={style} viewBox="0 0 15 15">
|
|
13
|
+
<Path
|
|
14
|
+
fill={color}
|
|
15
|
+
fillRule="evenodd"
|
|
16
|
+
d="M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z"
|
|
17
|
+
clipRule="evenodd"
|
|
18
|
+
></Path>
|
|
19
|
+
</Svg>
|
|
20
|
+
);
|
|
21
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
|
|
3
|
+
import Svg, { Path } from "react-native-svg";
|
|
4
|
+
|
|
5
|
+
export const PlayIcon = ({
|
|
6
|
+
style,
|
|
7
|
+
color,
|
|
8
|
+
}: {
|
|
9
|
+
style?: ViewStyle;
|
|
10
|
+
color?: string;
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<Svg style={style} viewBox="0 0 24 24">
|
|
14
|
+
<Path
|
|
15
|
+
fill={color}
|
|
16
|
+
d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"
|
|
17
|
+
></Path>
|
|
18
|
+
</Svg>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ViewStyle } from "react-native";
|
|
2
|
+
import { Line, Svg } from "react-native-svg";
|
|
3
|
+
import tw from "twrnc"; // assuming you're using twrnc for styling
|
|
4
|
+
|
|
5
|
+
export function XIcon({ style }: { style?: ViewStyle }) {
|
|
6
|
+
return (
|
|
7
|
+
<Svg
|
|
8
|
+
viewBox="0 0 24 24"
|
|
9
|
+
fill="none"
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
strokeWidth="2"
|
|
12
|
+
strokeLinecap="round"
|
|
13
|
+
strokeLinejoin="round"
|
|
14
|
+
style={tw.style("feather feather-x", style)}
|
|
15
|
+
>
|
|
16
|
+
<Line x1="18" y1="6" x2="6" y2="18"></Line>
|
|
17
|
+
<Line x1="6" y1="6" x2="18" y2="18"></Line>
|
|
18
|
+
</Svg>
|
|
19
|
+
);
|
|
20
|
+
}
|