react-native-chatbot-ai 0.0.4 → 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.
@@ -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,12 +1,12 @@
1
1
  "use strict";
2
2
 
3
- import { KContainer, KNavigation } from '@droppii/libs';
3
+ import { KContainer } from '@droppii/libs';
4
+ import ChatHeader from "./ChatHeader.js";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
- export const ChatBotAI = () => {
6
+ const ChatBotAI = () => {
6
7
  return /*#__PURE__*/_jsx(KContainer.Page, {
7
- children: /*#__PURE__*/_jsx(KNavigation.HeaderV2, {
8
- title: "Chatbot AI"
9
- })
8
+ children: /*#__PURE__*/_jsx(ChatHeader, {})
10
9
  });
11
10
  };
11
+ export default ChatBotAI;
12
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["KContainer","KNavigation","jsx","_jsx","ChatBotAI","Page","children","HeaderV2","title"],"sourceRoot":"../../../../src","sources":["components/chat/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,WAAW,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExD,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,oBACED,IAAA,CAACH,UAAU,CAACK,IAAI;IAAAC,QAAA,eACdH,IAAA,CAACF,WAAW,CAACM,QAAQ;MACnBC,KAAK,EAAC;IAAY,CACnB;EAAC,CACa,CAAC;AAEtB,CAAC","ignoreList":[]}
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 { ChatBotAI } from "../components/chat/index.js";
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__*/_jsxs(ChatContext.Provider, {
9
+ return /*#__PURE__*/_jsx(ChatContext.Provider, {
11
10
  value: {},
12
- children: [children, /*#__PURE__*/_jsx(ChatBotAI, {})]
11
+ children: children
13
12
  });
14
13
  };
15
14
  //# sourceMappingURL=ChatContext.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","ChatBotAI","jsx","_jsx","jsxs","_jsxs","ChatContext","ChatProvider","children","Provider","value"],"sourceRoot":"../../../src","sources":["context/ChatContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,OAAO;AAErC,SAASC,SAAS,QAAQ,6BAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,OAAO,MAAMC,WAAW,gBAAGN,aAAa,CAAkB,CAAC,CAAC,CAAC;AAE7D,OAAO,MAAMO,YAAY,GAAGA,CAAC;EAAEC;AAA4B,CAAC,KAAK;EAC/D,oBACEH,KAAA,CAACC,WAAW,CAACG,QAAQ;IAACC,KAAK,EAAE,CAAC,CAAE;IAAAF,QAAA,GAC7BA,QAAQ,eACTL,IAAA,CAACF,SAAS,IAAE,CAAC;EAAA,CACO,CAAC;AAE3B,CAAC","ignoreList":[]}
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,6 @@
1
+ "use strict";
2
+
3
+ export default {
4
+ bg_header: require('./bg_header.png')
5
+ };
6
+ //# sourceMappingURL=index.js.map
@@ -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":[]}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
- export { ChatBotAI } from "./components/chat/index.js";
3
+ import ChatBotAI from "./components/chat/index.js";
4
4
  export * from "./services/index.js";
5
+ export { ChatBotAI };
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ChatBotAI"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,4BAAmB;AAC7C,cAAc,qBAAY","ignoreList":[]}
1
+ {"version":3,"names":["ChatBotAI"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,4BAAmB;AACzC,cAAc,qBAAY;AAC1B,SAASA,SAAS","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ export declare const ChatHeader: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ChatHeader;
3
+ //# sourceMappingURL=ChatHeader.d.ts.map
@@ -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,2 +1,3 @@
1
- export declare const ChatBotAI: () => import("react/jsx-runtime").JSX.Element;
1
+ declare const ChatBotAI: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ChatBotAI;
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,+CAQrB,CAAC"}
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;AAGxE,eAAO,MAAM,WAAW,0CAAqC,CAAC;AAE9D,eAAO,MAAM,YAAY,GAAI,cAAc,iBAAiB,4CAO3D,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,5 @@
1
+ declare const _default: {
2
+ bg_header: any;
3
+ };
4
+ export default _default;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/images/index.ts"],"names":[],"mappings":";;;AAAA,wBAEE"}
@@ -1,3 +1,4 @@
1
- export { ChatBotAI } from './components/chat';
1
+ import ChatBotAI from './components/chat';
2
2
  export * from './services';
3
+ export { ChatBotAI };
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,cAAc,YAAY,CAAC"}
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"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "react-native-chatbot-ai",
3
- "version": "0.0.4",
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.tsx",
9
+ "source": "./src/index.ts",
10
10
  "types": "./lib/typescript/src/index.d.ts",
11
11
  "default": "./lib/module/index.js"
12
12
  },
@@ -76,8 +76,6 @@
76
76
  "eslint-plugin-prettier": "^5.5.4",
77
77
  "jest": "^29.7.0",
78
78
  "prettier": "^3.6.2",
79
- "react": "19.1.0",
80
- "react-native": "0.81.4",
81
79
  "react-native-builder-bob": "^0.40.13",
82
80
  "release-it": "^19.0.4",
83
81
  "typescript": "^5.9.2"
@@ -153,8 +151,10 @@
153
151
  "version": "0.54.5"
154
152
  },
155
153
  "dependencies": {
154
+ "@babel/runtime": "^7.28.4",
156
155
  "@tanstack/react-query": "^5.90.2",
157
156
  "axios": "^1.12.2",
157
+ "dayjs": "^1.11.18",
158
158
  "zustand": "^5.0.8"
159
159
  }
160
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,11 +1,12 @@
1
- import { KContainer, KNavigation } from '@droppii/libs';
1
+ import { KContainer } from '@droppii/libs';
2
+ import ChatHeader from './ChatHeader';
2
3
 
3
- export const ChatBotAI = () => {
4
+ const ChatBotAI = () => {
4
5
  return (
5
6
  <KContainer.Page>
6
- <KNavigation.HeaderV2
7
- title="Chatbot AI"
8
- />
7
+ <ChatHeader />
9
8
  </KContainer.Page>
10
9
  );
11
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
@@ -1,2 +1,3 @@
1
1
  declare module '@droppii/libs/*';
2
- declare module '@droppii/libs';
2
+ declare module '@droppii/libs';
3
+ declare module '*';
Binary file
@@ -0,0 +1,3 @@
1
+ export default {
2
+ bg_header: require('./bg_header.png'),
3
+ };
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import ChatBotAI from './components/chat';
2
+ export * from './services';
3
+ export { ChatBotAI };
package/src/index.tsx DELETED
@@ -1,2 +0,0 @@
1
- export { ChatBotAI } from './components/chat';
2
- export * from './services';