react-native-srschat 0.1.0 → 0.1.1
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/dist/index.d.ts +12 -0
- package/dist/index.js +243 -0
- package/package.json +38 -188
- package/README.md +0 -33
- package/android/generated/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
- package/android/generated/android/app/build/generated/source/codegen/jni/RNSrschatSpec-generated.cpp +0 -22
- package/android/generated/android/app/build/generated/source/codegen/jni/RNSrschatSpec.h +0 -24
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNSrschatSpec/RNSrschatSpecJSI-generated.cpp +0 -17
- package/android/generated/android/app/build/generated/source/codegen/jni/react/renderer/components/RNSrschatSpec/RNSrschatSpecJSI.h +0 -19
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm +0 -2321
- package/ios/generated/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec.h +0 -2761
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI-generated.cpp +0 -2923
- package/ios/generated/build/generated/ios/FBReactNativeSpecJSI.h +0 -7718
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.h +0 -18
- package/ios/generated/build/generated/ios/RCTModulesConformingToProtocolsProvider.mm +0 -33
- package/ios/generated/build/generated/ios/RNSrschatSpec/RNSrschatSpec-generated.mm +0 -16
- package/ios/generated/build/generated/ios/RNSrschatSpec/RNSrschatSpec.h +0 -35
- package/ios/generated/build/generated/ios/RNSrschatSpecJSI-generated.cpp +0 -17
- package/ios/generated/build/generated/ios/RNSrschatSpecJSI.h +0 -19
- package/lib/commonjs/components/Chat.js +0 -43
- package/lib/commonjs/components/Chat.js.map +0 -1
- package/lib/commonjs/components/ChatInput.js +0 -64
- package/lib/commonjs/components/ChatInput.js.map +0 -1
- package/lib/commonjs/components/ChatMessage.js +0 -58
- package/lib/commonjs/components/ChatMessage.js.map +0 -1
- package/lib/commonjs/index.js +0 -37
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/types.js +0 -2
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/components/Chat.js +0 -39
- package/lib/module/components/Chat.js.map +0 -1
- package/lib/module/components/ChatInput.js +0 -60
- package/lib/module/components/ChatInput.js.map +0 -1
- package/lib/module/components/ChatMessage.js +0 -54
- package/lib/module/components/ChatMessage.js.map +0 -1
- package/lib/module/index.js +0 -8
- package/lib/module/index.js.map +0 -1
- package/lib/module/types.js +0 -2
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/commonjs/package.json +0 -1
- package/lib/typescript/commonjs/src/components/Chat.d.ts +0 -3
- package/lib/typescript/commonjs/src/components/Chat.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ChatInput.d.ts +0 -6
- package/lib/typescript/commonjs/src/components/ChatInput.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/components/ChatMessage.d.ts +0 -8
- package/lib/typescript/commonjs/src/components/ChatMessage.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -4
- package/lib/typescript/commonjs/src/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/types.d.ts +0 -12
- package/lib/typescript/commonjs/src/types.d.ts.map +0 -1
- package/lib/typescript/module/package.json +0 -1
- package/lib/typescript/module/src/components/Chat.d.ts +0 -3
- package/lib/typescript/module/src/components/Chat.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ChatInput.d.ts +0 -6
- package/lib/typescript/module/src/components/ChatInput.d.ts.map +0 -1
- package/lib/typescript/module/src/components/ChatMessage.d.ts +0 -8
- package/lib/typescript/module/src/components/ChatMessage.d.ts.map +0 -1
- package/lib/typescript/module/src/index.d.ts +0 -4
- package/lib/typescript/module/src/index.d.ts.map +0 -1
- package/lib/typescript/module/src/types.d.ts +0 -12
- package/lib/typescript/module/src/types.d.ts.map +0 -1
- package/src/components/Chat.tsx +0 -34
- package/src/components/ChatInput.tsx +0 -58
- package/src/components/ChatMessage.tsx +0 -51
- package/src/index.tsx +0 -6
- package/src/types.ts +0 -12
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
|
|
10
|
-
@interface RCTModulesConformingToProtocolsProvider: NSObject
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames;
|
|
13
|
-
|
|
14
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames;
|
|
15
|
-
|
|
16
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames;
|
|
17
|
-
|
|
18
|
-
@end
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
#import "RCTModulesConformingToProtocolsProvider.h"
|
|
9
|
-
|
|
10
|
-
@implementation RCTModulesConformingToProtocolsProvider
|
|
11
|
-
|
|
12
|
-
+(NSArray<NSString *> *)imageURLLoaderClassNames
|
|
13
|
-
{
|
|
14
|
-
return @[
|
|
15
|
-
|
|
16
|
-
];
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
+(NSArray<NSString *> *)imageDataDecoderClassNames
|
|
20
|
-
{
|
|
21
|
-
return @[
|
|
22
|
-
|
|
23
|
-
];
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
+(NSArray<NSString *> *)URLRequestHandlerClassNames
|
|
27
|
-
{
|
|
28
|
-
return @[
|
|
29
|
-
|
|
30
|
-
];
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#import "RNSrschatSpec.h"
|
|
15
|
-
|
|
16
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#ifndef __cplusplus
|
|
15
|
-
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
// Avoid multiple includes of RNSrschatSpec symbols
|
|
19
|
-
#ifndef RNSrschatSpec_H
|
|
20
|
-
#define RNSrschatSpec_H
|
|
21
|
-
|
|
22
|
-
#import <Foundation/Foundation.h>
|
|
23
|
-
#import <RCTRequired/RCTRequired.h>
|
|
24
|
-
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
-
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
-
#import <React/RCTBridgeModule.h>
|
|
27
|
-
#import <React/RCTCxxConvert.h>
|
|
28
|
-
#import <React/RCTManagedPointer.h>
|
|
29
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
-
#import <optional>
|
|
31
|
-
#import <vector>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#endif // RNSrschatSpec_H
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNSrschatSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Chat = Chat;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _ChatMessage = require("./ChatMessage.js");
|
|
9
|
-
var _ChatInput = require("./ChatInput.js");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function Chat({
|
|
12
|
-
userId,
|
|
13
|
-
messages,
|
|
14
|
-
onSendMessage
|
|
15
|
-
}) {
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
17
|
-
style: styles.container,
|
|
18
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
19
|
-
data: messages,
|
|
20
|
-
keyExtractor: item => item.id,
|
|
21
|
-
renderItem: ({
|
|
22
|
-
item
|
|
23
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatMessage.ChatMessage, {
|
|
24
|
-
message: item,
|
|
25
|
-
isOwnMessage: item.sender === userId
|
|
26
|
-
}),
|
|
27
|
-
style: styles.messageList,
|
|
28
|
-
inverted: true
|
|
29
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ChatInput.ChatInput, {
|
|
30
|
-
onSend: onSendMessage
|
|
31
|
-
})]
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
const styles = _reactNative.StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
flex: 1,
|
|
37
|
-
backgroundColor: '#F2F2F7'
|
|
38
|
-
},
|
|
39
|
-
messageList: {
|
|
40
|
-
flex: 1
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=Chat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_ChatMessage","_ChatInput","_jsxRuntime","Chat","userId","messages","onSendMessage","jsxs","View","style","styles","container","children","jsx","FlatList","data","keyExtractor","item","id","renderItem","ChatMessage","message","isOwnMessage","sender","messageList","inverted","ChatInput","onSend","StyleSheet","create","flex","backgroundColor"],"sourceRoot":"../../../src","sources":["components/Chat.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AAEjC,SAASI,IAAIA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAyB,CAAC,EAAE;EACnE,oBACE,IAAAJ,WAAA,CAAAK,IAAA,EAACT,YAAA,CAAAU,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAV,WAAA,CAAAW,GAAA,EAACf,YAAA,CAAAgB,QAAQ;MACPC,IAAI,EAAEV,QAAS;MACfW,YAAY,EAAGC,IAAI,IAAKA,IAAI,CAACC,EAAG;MAChCC,UAAU,EAAEA,CAAC;QAAEF;MAAK,CAAC,kBACnB,IAAAf,WAAA,CAAAW,GAAA,EAACb,YAAA,CAAAoB,WAAW;QACVC,OAAO,EAAEJ,IAAK;QACdK,YAAY,EAAEL,IAAI,CAACM,MAAM,KAAKnB;MAAO,CACtC,CACD;MACFK,KAAK,EAAEC,MAAM,CAACc,WAAY;MAC1BC,QAAQ;IAAA,CACT,CAAC,eACF,IAAAvB,WAAA,CAAAW,GAAA,EAACZ,UAAA,CAAAyB,SAAS;MAACC,MAAM,EAAErB;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEX;AAEA,MAAMI,MAAM,GAAGkB,uBAAU,CAACC,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACDP,WAAW,EAAE;IACXM,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ChatInput = ChatInput;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function ChatInput({
|
|
12
|
-
onSend
|
|
13
|
-
}) {
|
|
14
|
-
const [message, setMessage] = (0, _react.useState)('');
|
|
15
|
-
const handleSend = () => {
|
|
16
|
-
if (message.trim()) {
|
|
17
|
-
onSend(message.trim());
|
|
18
|
-
setMessage('');
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
22
|
-
style: styles.container,
|
|
23
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
24
|
-
style: styles.input,
|
|
25
|
-
value: message,
|
|
26
|
-
onChangeText: setMessage,
|
|
27
|
-
placeholder: "Type a message...",
|
|
28
|
-
multiline: true
|
|
29
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
30
|
-
onPress: handleSend,
|
|
31
|
-
style: styles.sendButton,
|
|
32
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
33
|
-
name: "send",
|
|
34
|
-
size: 24,
|
|
35
|
-
color: "#007AFF"
|
|
36
|
-
})
|
|
37
|
-
})]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
const styles = _reactNative.StyleSheet.create({
|
|
41
|
-
container: {
|
|
42
|
-
flexDirection: 'row',
|
|
43
|
-
padding: 10,
|
|
44
|
-
borderTopWidth: 1,
|
|
45
|
-
borderTopColor: '#E5E5EA',
|
|
46
|
-
backgroundColor: 'white'
|
|
47
|
-
},
|
|
48
|
-
input: {
|
|
49
|
-
flex: 1,
|
|
50
|
-
borderWidth: 1,
|
|
51
|
-
borderColor: '#E5E5EA',
|
|
52
|
-
borderRadius: 20,
|
|
53
|
-
paddingHorizontal: 15,
|
|
54
|
-
paddingVertical: 8,
|
|
55
|
-
marginRight: 10,
|
|
56
|
-
maxHeight: 100
|
|
57
|
-
},
|
|
58
|
-
sendButton: {
|
|
59
|
-
justifyContent: 'center',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
width: 44
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
//# sourceMappingURL=ChatInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_vectorIcons","_jsxRuntime","ChatInput","onSend","message","setMessage","useState","handleSend","trim","jsxs","View","style","styles","container","children","jsx","TextInput","input","value","onChangeText","placeholder","multiline","TouchableOpacity","onPress","sendButton","Ionicons","name","size","color","StyleSheet","create","flexDirection","padding","borderTopWidth","borderTopColor","backgroundColor","flex","borderWidth","borderColor","borderRadius","paddingHorizontal","paddingVertical","marginRight","maxHeight","justifyContent","alignItems","width"],"sourceRoot":"../../../src","sources":["components/ChatInput.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA8C,IAAAG,WAAA,GAAAH,OAAA;AAMvC,SAASI,SAASA,CAAC;EAAEC;AAAuB,CAAC,EAAE;EACpD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAE1C,MAAMC,UAAU,GAAGA,CAAA,KAAM;IACvB,IAAIH,OAAO,CAACI,IAAI,CAAC,CAAC,EAAE;MAClBL,MAAM,CAACC,OAAO,CAACI,IAAI,CAAC,CAAC,CAAC;MACtBH,UAAU,CAAC,EAAE,CAAC;IAChB;EACF,CAAC;EAED,oBACE,IAAAJ,WAAA,CAAAQ,IAAA,EAACV,YAAA,CAAAW,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAb,WAAA,CAAAc,GAAA,EAAChB,YAAA,CAAAiB,SAAS;MACRL,KAAK,EAAEC,MAAM,CAACK,KAAM;MACpBC,KAAK,EAAEd,OAAQ;MACfe,YAAY,EAAEd,UAAW;MACzBe,WAAW,EAAC,mBAAmB;MAC/BC,SAAS;IAAA,CACV,CAAC,eACF,IAAApB,WAAA,CAAAc,GAAA,EAAChB,YAAA,CAAAuB,gBAAgB;MAACC,OAAO,EAAEhB,UAAW;MAACI,KAAK,EAAEC,MAAM,CAACY,UAAW;MAAAV,QAAA,eAC9D,IAAAb,WAAA,CAAAc,GAAA,EAACf,YAAA,CAAAyB,QAAQ;QAACC,IAAI,EAAC,MAAM;QAACC,IAAI,EAAE,EAAG;QAACC,KAAK,EAAC;MAAS,CAAE;IAAC,CAClC,CAAC;EAAA,CACf,CAAC;AAEX;AAEA,MAAMhB,MAAM,GAAGiB,uBAAU,CAACC,MAAM,CAAC;EAC/BjB,SAAS,EAAE;IACTkB,aAAa,EAAE,KAAK;IACpBC,OAAO,EAAE,EAAE;IACXC,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE,SAAS;IACzBC,eAAe,EAAE;EACnB,CAAC;EACDlB,KAAK,EAAE;IACLmB,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE;EACb,CAAC;EACDnB,UAAU,EAAE;IACVoB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ChatMessage = ChatMessage;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
|
-
function ChatMessage({
|
|
10
|
-
message,
|
|
11
|
-
isOwnMessage
|
|
12
|
-
}) {
|
|
13
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
14
|
-
style: [styles.messageContainer, isOwnMessage ? styles.ownMessage : styles.otherMessage],
|
|
15
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
16
|
-
style: styles.sender,
|
|
17
|
-
children: message.sender
|
|
18
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
19
|
-
style: styles.messageText,
|
|
20
|
-
children: message.text
|
|
21
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
22
|
-
style: styles.timestamp,
|
|
23
|
-
children: new Date(message.timestamp).toLocaleTimeString()
|
|
24
|
-
})]
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const styles = _reactNative.StyleSheet.create({
|
|
28
|
-
messageContainer: {
|
|
29
|
-
padding: 10,
|
|
30
|
-
marginVertical: 5,
|
|
31
|
-
marginHorizontal: 10,
|
|
32
|
-
maxWidth: '80%',
|
|
33
|
-
borderRadius: 10
|
|
34
|
-
},
|
|
35
|
-
ownMessage: {
|
|
36
|
-
alignSelf: 'flex-end',
|
|
37
|
-
backgroundColor: '#007AFF'
|
|
38
|
-
},
|
|
39
|
-
otherMessage: {
|
|
40
|
-
alignSelf: 'flex-start',
|
|
41
|
-
backgroundColor: '#E5E5EA'
|
|
42
|
-
},
|
|
43
|
-
sender: {
|
|
44
|
-
fontSize: 12,
|
|
45
|
-
color: '#666',
|
|
46
|
-
marginBottom: 2
|
|
47
|
-
},
|
|
48
|
-
messageText: {
|
|
49
|
-
fontSize: 16
|
|
50
|
-
},
|
|
51
|
-
timestamp: {
|
|
52
|
-
fontSize: 10,
|
|
53
|
-
color: '#666',
|
|
54
|
-
alignSelf: 'flex-end',
|
|
55
|
-
marginTop: 2
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=ChatMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_jsxRuntime","ChatMessage","message","isOwnMessage","jsxs","View","style","styles","messageContainer","ownMessage","otherMessage","children","jsx","Text","sender","messageText","text","timestamp","Date","toLocaleTimeString","StyleSheet","create","padding","marginVertical","marginHorizontal","maxWidth","borderRadius","alignSelf","backgroundColor","fontSize","color","marginBottom","marginTop"],"sourceRoot":"../../../src","sources":["components/ChatMessage.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAsD,IAAAC,WAAA,GAAAD,OAAA;AAQ/C,SAASE,WAAWA,CAAC;EAAEC,OAAO;EAAEC;AAA+B,CAAC,EAAE;EACvE,oBACE,IAAAH,WAAA,CAAAI,IAAA,EAACN,YAAA,CAAAO,IAAI;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,gBAAgB,EAAEL,YAAY,GAAGI,MAAM,CAACE,UAAU,GAAGF,MAAM,CAACG,YAAY,CAAE;IAAAC,QAAA,gBAC7F,IAAAX,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;MAACP,KAAK,EAAEC,MAAM,CAACO,MAAO;MAAAH,QAAA,EAAET,OAAO,CAACY;IAAM,CAAO,CAAC,eACnD,IAAAd,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;MAACP,KAAK,EAAEC,MAAM,CAACQ,WAAY;MAAAJ,QAAA,EAAET,OAAO,CAACc;IAAI,CAAO,CAAC,eACtD,IAAAhB,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;MAACP,KAAK,EAAEC,MAAM,CAACU,SAAU;MAAAN,QAAA,EAC3B,IAAIO,IAAI,CAAChB,OAAO,CAACe,SAAS,CAAC,CAACE,kBAAkB,CAAC;IAAC,CAC7C,CAAC;EAAA,CACH,CAAC;AAEX;AAEA,MAAMZ,MAAM,GAAGa,uBAAU,CAACC,MAAM,CAAC;EAC/Bb,gBAAgB,EAAE;IAChBc,OAAO,EAAE,EAAE;IACXC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE,EAAE;IACpBC,QAAQ,EAAE,KAAK;IACfC,YAAY,EAAE;EAChB,CAAC;EACDjB,UAAU,EAAE;IACVkB,SAAS,EAAE,UAAU;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDlB,YAAY,EAAE;IACZiB,SAAS,EAAE,YAAY;IACvBC,eAAe,EAAE;EACnB,CAAC;EACDd,MAAM,EAAE;IACNe,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbC,YAAY,EAAE;EAChB,CAAC;EACDhB,WAAW,EAAE;IACXc,QAAQ,EAAE;EACZ,CAAC;EACDZ,SAAS,EAAE;IACTY,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbH,SAAS,EAAE,UAAU;IACrBK,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _exportNames = {
|
|
7
|
-
multiply: true
|
|
8
|
-
};
|
|
9
|
-
exports.multiply = multiply;
|
|
10
|
-
var _Chat = require("./components/Chat.js");
|
|
11
|
-
Object.keys(_Chat).forEach(function (key) {
|
|
12
|
-
if (key === "default" || key === "__esModule") return;
|
|
13
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
14
|
-
if (key in exports && exports[key] === _Chat[key]) return;
|
|
15
|
-
Object.defineProperty(exports, key, {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
get: function () {
|
|
18
|
-
return _Chat[key];
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
});
|
|
22
|
-
var _types = require("./types.js");
|
|
23
|
-
Object.keys(_types).forEach(function (key) {
|
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
|
25
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
26
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
27
|
-
Object.defineProperty(exports, key, {
|
|
28
|
-
enumerable: true,
|
|
29
|
-
get: function () {
|
|
30
|
-
return _types[key];
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
function multiply(a, b) {
|
|
35
|
-
return a * b;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_Chat","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_types","multiply","a","b"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;AAIA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AALO,SAASU,QAAQA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACrD,OAAOD,CAAC,GAAGC,CAAC;AACd","ignoreList":[]}
|
package/lib/commonjs/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, FlatList, StyleSheet } from 'react-native';
|
|
4
|
-
import { ChatMessage } from "./ChatMessage.js";
|
|
5
|
-
import { ChatInput } from "./ChatInput.js";
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export function Chat({
|
|
8
|
-
userId,
|
|
9
|
-
messages,
|
|
10
|
-
onSendMessage
|
|
11
|
-
}) {
|
|
12
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
13
|
-
style: styles.container,
|
|
14
|
-
children: [/*#__PURE__*/_jsx(FlatList, {
|
|
15
|
-
data: messages,
|
|
16
|
-
keyExtractor: item => item.id,
|
|
17
|
-
renderItem: ({
|
|
18
|
-
item
|
|
19
|
-
}) => /*#__PURE__*/_jsx(ChatMessage, {
|
|
20
|
-
message: item,
|
|
21
|
-
isOwnMessage: item.sender === userId
|
|
22
|
-
}),
|
|
23
|
-
style: styles.messageList,
|
|
24
|
-
inverted: true
|
|
25
|
-
}), /*#__PURE__*/_jsx(ChatInput, {
|
|
26
|
-
onSend: onSendMessage
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
const styles = StyleSheet.create({
|
|
31
|
-
container: {
|
|
32
|
-
flex: 1,
|
|
33
|
-
backgroundColor: '#F2F2F7'
|
|
34
|
-
},
|
|
35
|
-
messageList: {
|
|
36
|
-
flex: 1
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=Chat.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","FlatList","StyleSheet","ChatMessage","ChatInput","jsx","_jsx","jsxs","_jsxs","Chat","userId","messages","onSendMessage","style","styles","container","children","data","keyExtractor","item","id","renderItem","message","isOwnMessage","sender","messageList","inverted","onSend","create","flex","backgroundColor"],"sourceRoot":"../../../src","sources":["components/Chat.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAEzD,SAASC,WAAW,QAAQ,kBAAe;AAC3C,SAASC,SAAS,QAAQ,gBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExC,OAAO,SAASC,IAAIA,CAAC;EAAEC,MAAM;EAAEC,QAAQ;EAAEC;AAAyB,CAAC,EAAE;EACnE,oBACEJ,KAAA,CAACR,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BV,IAAA,CAACL,QAAQ;MACPgB,IAAI,EAAEN,QAAS;MACfO,YAAY,EAAGC,IAAI,IAAKA,IAAI,CAACC,EAAG;MAChCC,UAAU,EAAEA,CAAC;QAAEF;MAAK,CAAC,kBACnBb,IAAA,CAACH,WAAW;QACVmB,OAAO,EAAEH,IAAK;QACdI,YAAY,EAAEJ,IAAI,CAACK,MAAM,KAAKd;MAAO,CACtC,CACD;MACFG,KAAK,EAAEC,MAAM,CAACW,WAAY;MAC1BC,QAAQ;IAAA,CACT,CAAC,eACFpB,IAAA,CAACF,SAAS;MAACuB,MAAM,EAAEf;IAAc,CAAE,CAAC;EAAA,CAChC,CAAC;AAEX;AAEA,MAAME,MAAM,GAAGZ,UAAU,CAAC0B,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACDL,WAAW,EAAE;IACXI,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { View, TextInput, TouchableOpacity, StyleSheet } from 'react-native';
|
|
5
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
-
export function ChatInput({
|
|
8
|
-
onSend
|
|
9
|
-
}) {
|
|
10
|
-
const [message, setMessage] = useState('');
|
|
11
|
-
const handleSend = () => {
|
|
12
|
-
if (message.trim()) {
|
|
13
|
-
onSend(message.trim());
|
|
14
|
-
setMessage('');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
18
|
-
style: styles.container,
|
|
19
|
-
children: [/*#__PURE__*/_jsx(TextInput, {
|
|
20
|
-
style: styles.input,
|
|
21
|
-
value: message,
|
|
22
|
-
onChangeText: setMessage,
|
|
23
|
-
placeholder: "Type a message...",
|
|
24
|
-
multiline: true
|
|
25
|
-
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
26
|
-
onPress: handleSend,
|
|
27
|
-
style: styles.sendButton,
|
|
28
|
-
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
29
|
-
name: "send",
|
|
30
|
-
size: 24,
|
|
31
|
-
color: "#007AFF"
|
|
32
|
-
})
|
|
33
|
-
})]
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
const styles = StyleSheet.create({
|
|
37
|
-
container: {
|
|
38
|
-
flexDirection: 'row',
|
|
39
|
-
padding: 10,
|
|
40
|
-
borderTopWidth: 1,
|
|
41
|
-
borderTopColor: '#E5E5EA',
|
|
42
|
-
backgroundColor: 'white'
|
|
43
|
-
},
|
|
44
|
-
input: {
|
|
45
|
-
flex: 1,
|
|
46
|
-
borderWidth: 1,
|
|
47
|
-
borderColor: '#E5E5EA',
|
|
48
|
-
borderRadius: 20,
|
|
49
|
-
paddingHorizontal: 15,
|
|
50
|
-
paddingVertical: 8,
|
|
51
|
-
marginRight: 10,
|
|
52
|
-
maxHeight: 100
|
|
53
|
-
},
|
|
54
|
-
sendButton: {
|
|
55
|
-
justifyContent: 'center',
|
|
56
|
-
alignItems: 'center',
|
|
57
|
-
width: 44
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
//# sourceMappingURL=ChatInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useState","View","TextInput","TouchableOpacity","StyleSheet","Ionicons","jsx","_jsx","jsxs","_jsxs","ChatInput","onSend","message","setMessage","handleSend","trim","style","styles","container","children","input","value","onChangeText","placeholder","multiline","onPress","sendButton","name","size","color","create","flexDirection","padding","borderTopWidth","borderTopColor","backgroundColor","flex","borderWidth","borderColor","borderRadius","paddingHorizontal","paddingVertical","marginRight","maxHeight","justifyContent","alignItems","width"],"sourceRoot":"../../../src","sources":["components/ChatInput.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,OAAO;AAChC,SAASC,IAAI,EAAEC,SAAS,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,cAAc;AAC5E,SAASC,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAM9C,OAAO,SAASC,SAASA,CAAC;EAAEC;AAAuB,CAAC,EAAE;EACpD,MAAM,CAACC,OAAO,EAAEC,UAAU,CAAC,GAAGb,QAAQ,CAAC,EAAE,CAAC;EAE1C,MAAMc,UAAU,GAAGA,CAAA,KAAM;IACvB,IAAIF,OAAO,CAACG,IAAI,CAAC,CAAC,EAAE;MAClBJ,MAAM,CAACC,OAAO,CAACG,IAAI,CAAC,CAAC,CAAC;MACtBF,UAAU,CAAC,EAAE,CAAC;IAChB;EACF,CAAC;EAED,oBACEJ,KAAA,CAACR,IAAI;IAACe,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5BZ,IAAA,CAACL,SAAS;MACRc,KAAK,EAAEC,MAAM,CAACG,KAAM;MACpBC,KAAK,EAAET,OAAQ;MACfU,YAAY,EAAET,UAAW;MACzBU,WAAW,EAAC,mBAAmB;MAC/BC,SAAS;IAAA,CACV,CAAC,eACFjB,IAAA,CAACJ,gBAAgB;MAACsB,OAAO,EAAEX,UAAW;MAACE,KAAK,EAAEC,MAAM,CAACS,UAAW;MAAAP,QAAA,eAC9DZ,IAAA,CAACF,QAAQ;QAACsB,IAAI,EAAC,MAAM;QAACC,IAAI,EAAE,EAAG;QAACC,KAAK,EAAC;MAAS,CAAE;IAAC,CAClC,CAAC;EAAA,CACf,CAAC;AAEX;AAEA,MAAMZ,MAAM,GAAGb,UAAU,CAAC0B,MAAM,CAAC;EAC/BZ,SAAS,EAAE;IACTa,aAAa,EAAE,KAAK;IACpBC,OAAO,EAAE,EAAE;IACXC,cAAc,EAAE,CAAC;IACjBC,cAAc,EAAE,SAAS;IACzBC,eAAe,EAAE;EACnB,CAAC;EACDf,KAAK,EAAE;IACLgB,IAAI,EAAE,CAAC;IACPC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE,EAAE;IAChBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,WAAW,EAAE,EAAE;IACfC,SAAS,EAAE;EACb,CAAC;EACDjB,UAAU,EAAE;IACVkB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import { View, Text, StyleSheet } from 'react-native';
|
|
4
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
-
export function ChatMessage({
|
|
6
|
-
message,
|
|
7
|
-
isOwnMessage
|
|
8
|
-
}) {
|
|
9
|
-
return /*#__PURE__*/_jsxs(View, {
|
|
10
|
-
style: [styles.messageContainer, isOwnMessage ? styles.ownMessage : styles.otherMessage],
|
|
11
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
12
|
-
style: styles.sender,
|
|
13
|
-
children: message.sender
|
|
14
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
15
|
-
style: styles.messageText,
|
|
16
|
-
children: message.text
|
|
17
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
18
|
-
style: styles.timestamp,
|
|
19
|
-
children: new Date(message.timestamp).toLocaleTimeString()
|
|
20
|
-
})]
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
messageContainer: {
|
|
25
|
-
padding: 10,
|
|
26
|
-
marginVertical: 5,
|
|
27
|
-
marginHorizontal: 10,
|
|
28
|
-
maxWidth: '80%',
|
|
29
|
-
borderRadius: 10
|
|
30
|
-
},
|
|
31
|
-
ownMessage: {
|
|
32
|
-
alignSelf: 'flex-end',
|
|
33
|
-
backgroundColor: '#007AFF'
|
|
34
|
-
},
|
|
35
|
-
otherMessage: {
|
|
36
|
-
alignSelf: 'flex-start',
|
|
37
|
-
backgroundColor: '#E5E5EA'
|
|
38
|
-
},
|
|
39
|
-
sender: {
|
|
40
|
-
fontSize: 12,
|
|
41
|
-
color: '#666',
|
|
42
|
-
marginBottom: 2
|
|
43
|
-
},
|
|
44
|
-
messageText: {
|
|
45
|
-
fontSize: 16
|
|
46
|
-
},
|
|
47
|
-
timestamp: {
|
|
48
|
-
fontSize: 10,
|
|
49
|
-
color: '#666',
|
|
50
|
-
alignSelf: 'flex-end',
|
|
51
|
-
marginTop: 2
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
//# sourceMappingURL=ChatMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["View","Text","StyleSheet","jsx","_jsx","jsxs","_jsxs","ChatMessage","message","isOwnMessage","style","styles","messageContainer","ownMessage","otherMessage","children","sender","messageText","text","timestamp","Date","toLocaleTimeString","create","padding","marginVertical","marginHorizontal","maxWidth","borderRadius","alignSelf","backgroundColor","fontSize","color","marginBottom","marginTop"],"sourceRoot":"../../../src","sources":["components/ChatMessage.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQtD,OAAO,SAASC,WAAWA,CAAC;EAAEC,OAAO;EAAEC;AAA+B,CAAC,EAAE;EACvE,oBACEH,KAAA,CAACN,IAAI;IAACU,KAAK,EAAE,CAACC,MAAM,CAACC,gBAAgB,EAAEH,YAAY,GAAGE,MAAM,CAACE,UAAU,GAAGF,MAAM,CAACG,YAAY,CAAE;IAAAC,QAAA,gBAC7FX,IAAA,CAACH,IAAI;MAACS,KAAK,EAAEC,MAAM,CAACK,MAAO;MAAAD,QAAA,EAAEP,OAAO,CAACQ;IAAM,CAAO,CAAC,eACnDZ,IAAA,CAACH,IAAI;MAACS,KAAK,EAAEC,MAAM,CAACM,WAAY;MAAAF,QAAA,EAAEP,OAAO,CAACU;IAAI,CAAO,CAAC,eACtDd,IAAA,CAACH,IAAI;MAACS,KAAK,EAAEC,MAAM,CAACQ,SAAU;MAAAJ,QAAA,EAC3B,IAAIK,IAAI,CAACZ,OAAO,CAACW,SAAS,CAAC,CAACE,kBAAkB,CAAC;IAAC,CAC7C,CAAC;EAAA,CACH,CAAC;AAEX;AAEA,MAAMV,MAAM,GAAGT,UAAU,CAACoB,MAAM,CAAC;EAC/BV,gBAAgB,EAAE;IAChBW,OAAO,EAAE,EAAE;IACXC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE,EAAE;IACpBC,QAAQ,EAAE,KAAK;IACfC,YAAY,EAAE;EAChB,CAAC;EACDd,UAAU,EAAE;IACVe,SAAS,EAAE,UAAU;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDf,YAAY,EAAE;IACZc,SAAS,EAAE,YAAY;IACvBC,eAAe,EAAE;EACnB,CAAC;EACDb,MAAM,EAAE;IACNc,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbC,YAAY,EAAE;EAChB,CAAC;EACDf,WAAW,EAAE;IACXa,QAAQ,EAAE;EACZ,CAAC;EACDX,SAAS,EAAE;IACTW,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbH,SAAS,EAAE,UAAU;IACrBK,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/index.js
DELETED
package/lib/module/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["multiply","a","b"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,OAAO,SAASA,QAAQA,CAACC,CAAS,EAAEC,CAAS,EAAU;EACrD,OAAOD,CAAC,GAAGC,CAAC;AACd;AAEA,cAAc,sBAAmB;AACjC,cAAc,YAAS","ignoreList":[]}
|
package/lib/module/types.js
DELETED
package/lib/module/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chat.d.ts","sourceRoot":"","sources":["../../../../../src/components/Chat.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAI1C,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,SAAS,2CAkBlE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatInput.tsx"],"names":[],"mappings":"AAIA,UAAU,cAAc;IACtB,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC;AAED,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,cAAc,2CAwBnD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Message } from '../types';
|
|
2
|
-
interface ChatMessageProps {
|
|
3
|
-
message: Message;
|
|
4
|
-
isOwnMessage: boolean;
|
|
5
|
-
}
|
|
6
|
-
export declare function ChatMessage({ message, isOwnMessage }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=ChatMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChatMessage.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatMessage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE,gBAAgB,2CAUtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAErD;AAED,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Message {
|
|
2
|
-
id: string;
|
|
3
|
-
text: string;
|
|
4
|
-
sender: string;
|
|
5
|
-
timestamp: number;
|
|
6
|
-
}
|
|
7
|
-
export interface ChatProps {
|
|
8
|
-
userId: string;
|
|
9
|
-
messages: Message[];
|
|
10
|
-
onSendMessage: (text: string) => void;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"module"}
|