react-native-chatbot-ai 0.0.3 → 0.0.5
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/lib/module/components/chat/ChatHeader.js +52 -0
- package/lib/module/components/chat/ChatHeader.js.map +1 -0
- package/lib/module/components/chat/index.js +6 -10
- package/lib/module/components/chat/index.js.map +1 -1
- package/lib/module/context/ChatContext.js +3 -4
- package/lib/module/context/ChatContext.js.map +1 -1
- package/lib/module/images/bg_header.png +0 -0
- package/lib/module/images/index.js +6 -0
- package/lib/module/images/index.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/index.js +0 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/components/chat/ChatHeader.d.ts +3 -0
- package/lib/typescript/src/components/chat/ChatHeader.d.ts.map +1 -0
- package/lib/typescript/src/components/chat/index.d.ts +2 -1
- package/lib/typescript/src/components/chat/index.d.ts.map +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/images/index.d.ts +5 -0
- package/lib/typescript/src/images/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +0 -1
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/components/chat/ChatHeader.tsx +41 -0
- package/src/components/chat/index.tsx +8 -5
- package/src/context/ChatContext.tsx +0 -2
- package/src/ignore.d.ts +1 -0
- package/src/images/bg_header.png +0 -0
- package/src/images/index.ts +3 -0
- package/src/index.ts +3 -0
- package/src/utils/index.ts +0 -4
- package/src/index.tsx +0 -2
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { KColors, KContainer, KImage, KLabel, KSpacingValue } from '@droppii/libs';
|
|
4
|
+
import images from '../../assets/images';
|
|
5
|
+
import { ImageBackground, StatusBar, StyleSheet } from 'react-native';
|
|
6
|
+
import { useCallback } from 'react';
|
|
7
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
export const ChatHeader = () => {
|
|
10
|
+
const insets = useSafeAreaInsets();
|
|
11
|
+
const renderStatusBar = useCallback(() => {
|
|
12
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
13
|
+
height: insets.top,
|
|
14
|
+
background: "transparent",
|
|
15
|
+
children: /*#__PURE__*/_jsx(StatusBar, {
|
|
16
|
+
translucent: true
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}, [insets.top]);
|
|
20
|
+
return /*#__PURE__*/_jsxs(ImageBackground, {
|
|
21
|
+
source: images.bg_header,
|
|
22
|
+
resizeMode: "cover",
|
|
23
|
+
children: [renderStatusBar(), /*#__PURE__*/_jsxs(KContainer.View, {
|
|
24
|
+
style: styles.header,
|
|
25
|
+
children: [/*#__PURE__*/_jsx(KImage.VectorIcons, {
|
|
26
|
+
name: "menu-ai",
|
|
27
|
+
size: 24,
|
|
28
|
+
color: KColors.white
|
|
29
|
+
}), /*#__PURE__*/_jsx(KLabel.Text, {
|
|
30
|
+
flex: true,
|
|
31
|
+
typo: "TitleBlockMedium",
|
|
32
|
+
color: KColors.white,
|
|
33
|
+
children: 'Chatbot AI'
|
|
34
|
+
}), /*#__PURE__*/_jsx(KImage.VectorIcons, {
|
|
35
|
+
name: "chat-dot-plus",
|
|
36
|
+
size: 24,
|
|
37
|
+
color: KColors.white
|
|
38
|
+
})]
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export default ChatHeader;
|
|
43
|
+
const styles = StyleSheet.create({
|
|
44
|
+
header: {
|
|
45
|
+
paddingHorizontal: KSpacingValue['0.75rem'],
|
|
46
|
+
paddingVertical: KSpacingValue['0.5rem'],
|
|
47
|
+
flexDirection: 'row',
|
|
48
|
+
gap: KSpacingValue['0.5rem'],
|
|
49
|
+
alignItems: 'center'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=ChatHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["KColors","KContainer","KImage","KLabel","KSpacingValue","images","ImageBackground","StatusBar","StyleSheet","useCallback","useSafeAreaInsets","jsx","_jsx","jsxs","_jsxs","ChatHeader","insets","renderStatusBar","View","height","top","background","children","translucent","source","bg_header","resizeMode","style","styles","header","VectorIcons","name","size","color","white","Text","flex","typo","create","paddingHorizontal","paddingVertical","flexDirection","gap","alignItems"],"sourceRoot":"../../../../src","sources":["components/chat/ChatHeader.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,UAAU,EAAEC,MAAM,EAAEC,MAAM,EAAEC,aAAa,QAAQ,eAAe;AAClF,OAAOC,MAAM,MAAM,qBAAqB;AACxC,SAASC,eAAe,EAAEC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AACrE,SAASC,WAAW,QAAQ,OAAO;AACnC,SAASC,iBAAiB,QAAQ,gCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEnE,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAM;EAC9B,MAAMC,MAAM,GAAGN,iBAAiB,CAAC,CAAC;EAElC,MAAMO,eAAe,GAAGR,WAAW,CAAC,MAAM;IACxC,oBACEG,IAAA,CAACX,UAAU,CAACiB,IAAI;MAACC,MAAM,EAAEH,MAAM,CAACI,GAAI;MAACC,UAAU,EAAC,aAAa;MAAAC,QAAA,eAC3DV,IAAA,CAACL,SAAS;QAACgB,WAAW;MAAA,CAAE;IAAC,CACV,CAAC;EAEtB,CAAC,EAAE,CAACP,MAAM,CAACI,GAAG,CAAC,CAAC;EAChB,oBACEN,KAAA,CAACR,eAAe;IAACkB,MAAM,EAAEnB,MAAM,CAACoB,SAAU;IAACC,UAAU,EAAC,OAAO;IAAAJ,QAAA,GAC1DL,eAAe,CAAC,CAAC,eAClBH,KAAA,CAACb,UAAU,CAACiB,IAAI;MAACS,KAAK,EAAEC,MAAM,CAACC,MAAO;MAAAP,QAAA,gBACpCV,IAAA,CAACV,MAAM,CAAC4B,WAAW;QAACC,IAAI,EAAC,SAAS;QAACC,IAAI,EAAE,EAAG;QAACC,KAAK,EAAEjC,OAAO,CAACkC;MAAM,CAAE,CAAC,eACrEtB,IAAA,CAACT,MAAM,CAACgC,IAAI;QAACC,IAAI;QAACC,IAAI,EAAC,kBAAkB;QAACJ,KAAK,EAAEjC,OAAO,CAACkC,KAAM;QAAAZ,QAAA,EAC5D;MAAY,CACF,CAAC,eACdV,IAAA,CAACV,MAAM,CAAC4B,WAAW;QAACC,IAAI,EAAC,eAAe;QAACC,IAAI,EAAE,EAAG;QAACC,KAAK,EAAEjC,OAAO,CAACkC;MAAM,CAAE,CAAC;IAAA,CAC5D,CAAC;EAAA,CACH,CAAC;AAEtB,CAAC;AAED,eAAenB,UAAU;AAEzB,MAAMa,MAAM,GAAGpB,UAAU,CAAC8B,MAAM,CAAC;EAC/BT,MAAM,EAAE;IACNU,iBAAiB,EAAEnC,aAAa,CAAC,SAAS,CAAC;IAC3CoC,eAAe,EAAEpC,aAAa,CAAC,QAAQ,CAAC;IACxCqC,aAAa,EAAE,KAAK;IACpBC,GAAG,EAAEtC,aAAa,CAAC,QAAQ,CAAC;IAC5BuC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { KContainer } from '@droppii/libs';
|
|
4
|
+
import ChatHeader from "./ChatHeader.js";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
return /*#__PURE__*/_jsx(
|
|
7
|
-
|
|
8
|
-
backgroundColor: 'red',
|
|
9
|
-
flex: 1
|
|
10
|
-
},
|
|
11
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
12
|
-
children: "Chatbot AI"
|
|
13
|
-
})
|
|
6
|
+
const ChatBotAI = () => {
|
|
7
|
+
return /*#__PURE__*/_jsx(KContainer.Page, {
|
|
8
|
+
children: /*#__PURE__*/_jsx(ChatHeader, {})
|
|
14
9
|
});
|
|
15
10
|
};
|
|
11
|
+
export default ChatBotAI;
|
|
16
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["KContainer","ChatHeader","jsx","_jsx","ChatBotAI","Page","children"],"sourceRoot":"../../../../src","sources":["components/chat/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,eAAe;AAC1C,OAAOC,UAAU,MAAM,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,MAAMC,SAAS,GAAGA,CAAA,KAAM;EACtB,oBACED,IAAA,CAACH,UAAU,CAACK,IAAI;IAAAC,QAAA,eACdH,IAAA,CAACF,UAAU,IAAE;EAAC,CACC,CAAC;AAEtB,CAAC;AAED,eAAeG,SAAS","ignoreList":[]}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { createContext } from 'react';
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
export const ChatContext = /*#__PURE__*/createContext({});
|
|
7
6
|
export const ChatProvider = ({
|
|
8
7
|
children
|
|
9
8
|
}) => {
|
|
10
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/_jsx(ChatContext.Provider, {
|
|
11
10
|
value: {},
|
|
12
|
-
children:
|
|
11
|
+
children: children
|
|
13
12
|
});
|
|
14
13
|
};
|
|
15
14
|
//# sourceMappingURL=ChatContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","
|
|
1
|
+
{"version":3,"names":["createContext","jsx","_jsx","ChatContext","ChatProvider","children","Provider","value"],"sourceRoot":"../../../src","sources":["context/ChatContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtC,OAAO,MAAMC,WAAW,gBAAGH,aAAa,CAAkB,CAAC,CAAC,CAAC;AAE7D,OAAO,MAAMI,YAAY,GAAGA,CAAC;EAAEC;AAA4B,CAAC,KAAK;EAC/D,oBACEH,IAAA,CAACC,WAAW,CAACG,QAAQ;IAACC,KAAK,EAAE,CAAC,CAAE;IAAAF,QAAA,EAC7BA;EAAQ,CACW,CAAC;AAE3B,CAAC","ignoreList":[]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["bg_header","require"],"sourceRoot":"../../../src","sources":["images/index.ts"],"mappings":";;AAAA,eAAe;EACbA,SAAS,EAAEC,OAAO,CAAC,iBAAiB;AACtC,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ChatBotAI"],"sourceRoot":"../../src","sources":["index.
|
|
1
|
+
{"version":3,"names":["ChatBotAI"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,4BAAmB;AACzC,cAAc,qBAAY;AAC1B,SAASA,SAAS","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatHeader.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,UAAU,+CAsBtB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/index.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,SAAS,+CAMd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAAqC,CAAC;AAE9D,eAAO,MAAM,YAAY,GAAI,cAAc,iBAAiB,4CAM3D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/images/index.ts"],"names":[],"mappings":";;;AAAA,wBAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-chatbot-ai",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "React Native library for Chatbot AI",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": {
|
|
9
|
-
"source": "./src/index.
|
|
9
|
+
"source": "./src/index.ts",
|
|
10
10
|
"types": "./lib/typescript/src/index.d.ts",
|
|
11
11
|
"default": "./lib/module/index.js"
|
|
12
12
|
},
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@commitlint/config-conventional": "^19.8.1",
|
|
63
|
-
"@droppii/libs": "git+ssh://git@github.com:droppii/mobile-components.git#v1.0.77",
|
|
64
63
|
"@eslint/compat": "^1.3.2",
|
|
65
64
|
"@eslint/eslintrc": "^3.3.1",
|
|
66
65
|
"@eslint/js": "^9.35.0",
|
|
@@ -77,8 +76,6 @@
|
|
|
77
76
|
"eslint-plugin-prettier": "^5.5.4",
|
|
78
77
|
"jest": "^29.7.0",
|
|
79
78
|
"prettier": "^3.6.2",
|
|
80
|
-
"react": "19.1.0",
|
|
81
|
-
"react-native": "0.81.4",
|
|
82
79
|
"react-native-builder-bob": "^0.40.13",
|
|
83
80
|
"release-it": "^19.0.4",
|
|
84
81
|
"typescript": "^5.9.2"
|
|
@@ -154,8 +151,10 @@
|
|
|
154
151
|
"version": "0.54.5"
|
|
155
152
|
},
|
|
156
153
|
"dependencies": {
|
|
154
|
+
"@babel/runtime": "^7.28.4",
|
|
157
155
|
"@tanstack/react-query": "^5.90.2",
|
|
158
156
|
"axios": "^1.12.2",
|
|
157
|
+
"dayjs": "^1.11.18",
|
|
159
158
|
"zustand": "^5.0.8"
|
|
160
159
|
}
|
|
161
160
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { KColors, KContainer, KImage, KLabel, KSpacingValue } from '@droppii/libs';
|
|
2
|
+
import images from '../../assets/images';
|
|
3
|
+
import { ImageBackground, StatusBar, StyleSheet } from 'react-native';
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
6
|
+
|
|
7
|
+
export const ChatHeader = () => {
|
|
8
|
+
const insets = useSafeAreaInsets();
|
|
9
|
+
|
|
10
|
+
const renderStatusBar = useCallback(() => {
|
|
11
|
+
return (
|
|
12
|
+
<KContainer.View height={insets.top} background="transparent">
|
|
13
|
+
<StatusBar translucent />
|
|
14
|
+
</KContainer.View>
|
|
15
|
+
);
|
|
16
|
+
}, [insets.top]);
|
|
17
|
+
return (
|
|
18
|
+
<ImageBackground source={images.bg_header} resizeMode="cover">
|
|
19
|
+
{renderStatusBar()}
|
|
20
|
+
<KContainer.View style={styles.header}>
|
|
21
|
+
<KImage.VectorIcons name="menu-ai" size={24} color={KColors.white} />
|
|
22
|
+
<KLabel.Text flex typo="TitleBlockMedium" color={KColors.white}>
|
|
23
|
+
{'Chatbot AI'}
|
|
24
|
+
</KLabel.Text>
|
|
25
|
+
<KImage.VectorIcons name="chat-dot-plus" size={24} color={KColors.white} />
|
|
26
|
+
</KContainer.View>
|
|
27
|
+
</ImageBackground>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default ChatHeader;
|
|
32
|
+
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
header: {
|
|
35
|
+
paddingHorizontal: KSpacingValue['0.75rem'],
|
|
36
|
+
paddingVertical: KSpacingValue['0.5rem'],
|
|
37
|
+
flexDirection: 'row',
|
|
38
|
+
gap: KSpacingValue['0.5rem'],
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
},
|
|
41
|
+
});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KContainer } from '@droppii/libs';
|
|
2
|
+
import ChatHeader from './ChatHeader';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
const ChatBotAI = () => {
|
|
4
5
|
return (
|
|
5
|
-
<
|
|
6
|
-
<
|
|
7
|
-
</
|
|
6
|
+
<KContainer.Page>
|
|
7
|
+
<ChatHeader />
|
|
8
|
+
</KContainer.Page>
|
|
8
9
|
);
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export default ChatBotAI;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createContext } from 'react';
|
|
2
2
|
import type { ChatContextType, ChatProviderProps } from '../types/chat';
|
|
3
|
-
import { ChatBotAI } from '../components/chat';
|
|
4
3
|
|
|
5
4
|
export const ChatContext = createContext<ChatContextType>({});
|
|
6
5
|
|
|
@@ -8,7 +7,6 @@ export const ChatProvider = ({ children }: ChatProviderProps) => {
|
|
|
8
7
|
return (
|
|
9
8
|
<ChatContext.Provider value={{}}>
|
|
10
9
|
{children}
|
|
11
|
-
<ChatBotAI />
|
|
12
10
|
</ChatContext.Provider>
|
|
13
11
|
);
|
|
14
12
|
};
|
package/src/ignore.d.ts
CHANGED
|
Binary file
|
package/src/index.ts
ADDED
package/src/utils/index.ts
CHANGED
package/src/index.tsx
DELETED