react-native-chatbot-ai 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/lib/module/assets/svgIcon/IconChatArrow.js +0 -1
  2. package/lib/module/assets/svgIcon/IconChatArrow.js.map +1 -1
  3. package/lib/module/assets/svgIcon/IconPdf.js +27 -0
  4. package/lib/module/assets/svgIcon/IconPdf.js.map +1 -0
  5. package/lib/module/assets/svgIcon/IconThinkingStep.js +0 -1
  6. package/lib/module/assets/svgIcon/IconThinkingStep.js.map +1 -1
  7. package/lib/module/components/chat/ChatMessageList.js.map +1 -1
  8. package/lib/module/components/chat/footer/index.js +328 -0
  9. package/lib/module/components/chat/footer/index.js.map +1 -0
  10. package/lib/module/components/chat/footer/item/UploadFileItem.js +163 -0
  11. package/lib/module/components/chat/footer/item/UploadFileItem.js.map +1 -0
  12. package/lib/module/components/chat/footer/item/UploadImageItem.js +94 -0
  13. package/lib/module/components/chat/footer/item/UploadImageItem.js.map +1 -0
  14. package/lib/module/components/chat/index.js +1 -1
  15. package/lib/module/components/chat/index.js.map +1 -1
  16. package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js +89 -28
  17. package/lib/module/components/chat/item/ChatAIAnswerMessageItem.js.map +1 -1
  18. package/lib/module/components/chat/item/ChatUserMessageItem.js +122 -15
  19. package/lib/module/components/chat/item/ChatUserMessageItem.js.map +1 -1
  20. package/lib/module/components/portal/Toast.js +193 -0
  21. package/lib/module/components/portal/Toast.js.map +1 -0
  22. package/lib/module/components/portal/index.js +15 -0
  23. package/lib/module/components/portal/index.js.map +1 -0
  24. package/lib/module/constants/index.js +9 -0
  25. package/lib/module/constants/index.js.map +1 -0
  26. package/lib/module/context/ChatContext.js +8 -5
  27. package/lib/module/context/ChatContext.js.map +1 -1
  28. package/lib/module/hooks/message/useMessage.js +0 -1
  29. package/lib/module/hooks/message/useMessage.js.map +1 -1
  30. package/lib/module/hooks/message/useSendMessage.js +3 -3
  31. package/lib/module/hooks/message/useSendMessage.js.map +1 -1
  32. package/lib/module/hooks/upload/useFileUpload.js +94 -0
  33. package/lib/module/hooks/upload/useFileUpload.js.map +1 -0
  34. package/lib/module/hooks/upload/useImageUpload.js +92 -0
  35. package/lib/module/hooks/upload/useImageUpload.js.map +1 -0
  36. package/lib/module/hooks/useAndroidBackHandler.js +20 -0
  37. package/lib/module/hooks/useAndroidBackHandler.js.map +1 -0
  38. package/lib/module/services/endpoints.js +3 -0
  39. package/lib/module/services/endpoints.js.map +1 -1
  40. package/lib/module/types/index.js +1 -0
  41. package/lib/module/types/index.js.map +1 -1
  42. package/lib/module/types/ui.js +4 -0
  43. package/lib/module/types/ui.js.map +1 -0
  44. package/lib/module/utils/common.js +31 -0
  45. package/lib/module/utils/common.js.map +1 -0
  46. package/lib/module/utils/device.js +137 -0
  47. package/lib/module/utils/device.js.map +1 -0
  48. package/lib/module/utils/ui.js +28 -0
  49. package/lib/module/utils/ui.js.map +1 -0
  50. package/lib/typescript/src/assets/svgIcon/IconChatArrow.d.ts.map +1 -1
  51. package/lib/typescript/src/assets/svgIcon/IconPdf.d.ts +7 -0
  52. package/lib/typescript/src/assets/svgIcon/IconPdf.d.ts.map +1 -0
  53. package/lib/typescript/src/assets/svgIcon/IconThinkingStep.d.ts.map +1 -1
  54. package/lib/typescript/src/components/chat/ChatMessageList.d.ts.map +1 -1
  55. package/lib/typescript/src/components/chat/footer/index.d.ts +16 -0
  56. package/lib/typescript/src/components/chat/footer/index.d.ts.map +1 -0
  57. package/lib/typescript/src/components/chat/footer/item/UploadFileItem.d.ts +9 -0
  58. package/lib/typescript/src/components/chat/footer/item/UploadFileItem.d.ts.map +1 -0
  59. package/lib/typescript/src/components/chat/footer/item/UploadImageItem.d.ts +9 -0
  60. package/lib/typescript/src/components/chat/footer/item/UploadImageItem.d.ts.map +1 -0
  61. package/lib/typescript/src/components/chat/item/ChatAIAnswerMessageItem.d.ts +9 -0
  62. package/lib/typescript/src/components/chat/item/ChatAIAnswerMessageItem.d.ts.map +1 -1
  63. package/lib/typescript/src/components/chat/item/ChatUserMessageItem.d.ts.map +1 -1
  64. package/lib/typescript/src/components/portal/Toast.d.ts +4 -0
  65. package/lib/typescript/src/components/portal/Toast.d.ts.map +1 -0
  66. package/lib/typescript/src/components/portal/index.d.ts +3 -0
  67. package/lib/typescript/src/components/portal/index.d.ts.map +1 -0
  68. package/lib/typescript/src/constants/index.d.ts +6 -0
  69. package/lib/typescript/src/constants/index.d.ts.map +1 -0
  70. package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
  71. package/lib/typescript/src/hooks/message/useMessage.d.ts.map +1 -1
  72. package/lib/typescript/src/hooks/message/useSendMessage.d.ts +2 -1
  73. package/lib/typescript/src/hooks/message/useSendMessage.d.ts.map +1 -1
  74. package/lib/typescript/src/hooks/upload/useFileUpload.d.ts +15 -0
  75. package/lib/typescript/src/hooks/upload/useFileUpload.d.ts.map +1 -0
  76. package/lib/typescript/src/hooks/upload/useImageUpload.d.ts +15 -0
  77. package/lib/typescript/src/hooks/upload/useImageUpload.d.ts.map +1 -0
  78. package/lib/typescript/src/hooks/useAndroidBackHandler.d.ts +4 -0
  79. package/lib/typescript/src/hooks/useAndroidBackHandler.d.ts.map +1 -0
  80. package/lib/typescript/src/services/endpoints.d.ts +3 -0
  81. package/lib/typescript/src/services/endpoints.d.ts.map +1 -1
  82. package/lib/typescript/src/types/chat.d.ts +6 -0
  83. package/lib/typescript/src/types/chat.d.ts.map +1 -1
  84. package/lib/typescript/src/types/dto.d.ts +10 -1
  85. package/lib/typescript/src/types/dto.d.ts.map +1 -1
  86. package/lib/typescript/src/types/index.d.ts +1 -0
  87. package/lib/typescript/src/types/index.d.ts.map +1 -1
  88. package/lib/typescript/src/types/ui.d.ts +7 -0
  89. package/lib/typescript/src/types/ui.d.ts.map +1 -0
  90. package/lib/typescript/src/utils/common.d.ts +10 -0
  91. package/lib/typescript/src/utils/common.d.ts.map +1 -0
  92. package/lib/typescript/src/utils/device.d.ts +11 -0
  93. package/lib/typescript/src/utils/device.d.ts.map +1 -0
  94. package/lib/typescript/src/utils/ui.d.ts +12 -0
  95. package/lib/typescript/src/utils/ui.d.ts.map +1 -0
  96. package/package.json +8 -3
  97. package/src/assets/svgIcon/IconChatArrow.tsx +1 -7
  98. package/src/assets/svgIcon/IconPdf.tsx +26 -0
  99. package/src/assets/svgIcon/IconThinkingStep.tsx +1 -7
  100. package/src/components/chat/ChatMessageList.tsx +3 -6
  101. package/src/components/chat/footer/index.tsx +410 -0
  102. package/src/components/chat/footer/item/UploadFileItem.tsx +181 -0
  103. package/src/components/chat/footer/item/UploadImageItem.tsx +91 -0
  104. package/src/components/chat/index.tsx +1 -1
  105. package/src/components/chat/item/ChatAIAnswerMessageItem.tsx +118 -38
  106. package/src/components/chat/item/ChatUserMessageItem.tsx +145 -13
  107. package/src/components/portal/Toast.tsx +315 -0
  108. package/src/components/portal/index.tsx +13 -0
  109. package/src/constants/index.ts +9 -0
  110. package/src/context/ChatContext.tsx +6 -2
  111. package/src/hooks/message/useMessage.ts +0 -1
  112. package/src/hooks/message/useSendMessage.ts +4 -4
  113. package/src/hooks/upload/useFileUpload.ts +126 -0
  114. package/src/hooks/upload/useImageUpload.ts +123 -0
  115. package/src/hooks/useAndroidBackHandler.ts +29 -0
  116. package/src/services/endpoints.ts +3 -0
  117. package/src/types/chat.ts +2 -0
  118. package/src/types/dto.ts +16 -1
  119. package/src/types/index.ts +1 -0
  120. package/src/types/ui.ts +12 -0
  121. package/src/utils/common.ts +40 -0
  122. package/src/utils/device.ts +170 -0
  123. package/src/utils/ui.tsx +32 -0
  124. package/lib/module/components/chat/ChatFooter.js +0 -91
  125. package/lib/module/components/chat/ChatFooter.js.map +0 -1
  126. package/lib/typescript/src/components/chat/ChatFooter.d.ts +0 -3
  127. package/lib/typescript/src/components/chat/ChatFooter.d.ts.map +0 -1
  128. package/src/components/chat/ChatFooter.tsx +0 -99
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+
3
+ export const isSameFile = (a, b) => a.filename === b.filename && a.size === b.size && a.mime === b.mime;
4
+ export const formatFileSize = bytes => {
5
+ if (bytes === 0) return '0 B';
6
+ const k = 1024;
7
+ const sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
8
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
9
+ const size = parseFloat((bytes / Math.pow(k, i)).toFixed(2));
10
+ return `${size} ${sizes[i]}`;
11
+ };
12
+ export const shortenFileName = (name, options = {}) => {
13
+ const {
14
+ maxLength = 30,
15
+ keepStart = 8,
16
+ keepEnd = 2
17
+ } = options;
18
+ if (name.length <= maxLength) return name;
19
+ const dotIndex = name.lastIndexOf('.');
20
+ const ext = dotIndex !== -1 ? name.slice(dotIndex) : '';
21
+ const base = dotIndex !== -1 ? name.slice(0, dotIndex) : name;
22
+
23
+ // Tính toán độ dài phần đầu & cuối
24
+ const available = maxLength - ext.length - 3; // trừ "...”
25
+ const startLen = keepStart ?? Math.floor(available / 2);
26
+ const endLen = keepEnd ?? Math.floor(available / 2);
27
+ const start = base.slice(0, startLen);
28
+ const end = base.slice(-endLen);
29
+ return `${start}...${end}${ext}`;
30
+ };
31
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isSameFile","a","b","filename","size","mime","formatFileSize","bytes","k","sizes","i","Math","floor","log","parseFloat","pow","toFixed","shortenFileName","name","options","maxLength","keepStart","keepEnd","length","dotIndex","lastIndexOf","ext","slice","base","available","startLen","endLen","start","end"],"sourceRoot":"../../../src","sources":["utils/common.ts"],"mappings":";;AAAA,OAAO,MAAMA,UAAU,GAAGA,CAACC,CAAM,EAAEC,CAAM,KACvCD,CAAC,CAACE,QAAQ,KAAKD,CAAC,CAACC,QAAQ,IAAIF,CAAC,CAACG,IAAI,KAAKF,CAAC,CAACE,IAAI,IAAIH,CAAC,CAACI,IAAI,KAAKH,CAAC,CAACG,IAAI;AAErE,OAAO,MAAMC,cAAc,GAAIC,KAAa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ACC,KAAK,CAACiB,SAAS,GAAG,CAAC,CAAC;EACvD,MAAME,MAAM,GAAGT,OAAO,IAAIX,IAAI,CAACC,KAAK,CAACiB,SAAS,GAAG,CAAC,CAAC;EAEnD,MAAMG,KAAK,GAAGJ,IAAI,CAACD,KAAK,CAAC,CAAC,EAAEG,QAAQ,CAAC;EACrC,MAAMG,GAAG,GAAGL,IAAI,CAACD,KAAK,CAAC,CAACI,MAAM,CAAC;EAE/B,OAAO,GAAGC,KAAK,MAAMC,GAAG,GAAGP,GAAG,EAAE;AAClC,CAAC","ignoreList":[]}
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ import { pick } from '@react-native-documents/picker';
4
+ import UIUtils from "../utils/ui.js";
5
+ import { PermissionsAndroid, Platform } from 'react-native';
6
+ import { openCamera, openPicker } from 'react-native-image-crop-picker';
7
+ import { check, PERMISSIONS, request } from 'react-native-permissions';
8
+ const READ_MEDIA_IMAGES = 'android.permission.READ_MEDIA_IMAGES';
9
+ const pickerOptions = {
10
+ writeTempFile: true,
11
+ mediaType: 'photo',
12
+ compressImageQuality: 0.8,
13
+ width: 1280,
14
+ height: 1280,
15
+ compressImageMaxHeight: 1280,
16
+ compressImageMaxWidth: 1280,
17
+ cropping: false,
18
+ cropperCircleOverlay: true,
19
+ waitAnimationEnd: true,
20
+ includeExif: false,
21
+ forceJpg: true,
22
+ cropperChooseText: 'Hoàn tất',
23
+ cropperCancelText: 'Hủy'
24
+ };
25
+ const requestPermission = async (perm, requestMessage, disableToast = false) => {
26
+ try {
27
+ //handle android function check can't return status code blocked
28
+ let granted = Platform.OS === 'android' ? await request(perm) : await check(perm);
29
+ if (granted === 'unavailable') {
30
+ UIUtils.toast.open({
31
+ title: 'Tính năng hiện tại không khả dụng, vui lòng thử lại sau'
32
+ });
33
+ return false;
34
+ }
35
+ if (granted === 'granted' || granted === 'limited') {
36
+ return true;
37
+ }
38
+ if (granted === 'denied' && Platform.OS === 'ios') {
39
+ const result = await request(perm);
40
+ if (result === 'granted' || result === 'limited') {
41
+ return true;
42
+ }
43
+ }
44
+ if (requestMessage && granted === 'blocked') {
45
+ UIUtils.toast.open({
46
+ title: requestMessage
47
+ });
48
+ }
49
+ return false;
50
+ } catch (err) {
51
+ if (!disableToast) {
52
+ UIUtils.toast.open({
53
+ title: 'Có lỗi xảy ra, vui lòng thử lại'
54
+ });
55
+ }
56
+ return false;
57
+ }
58
+ };
59
+ const requestReadPhotoPermission = async (disableToast = false) => {
60
+ const perm = Platform.select({
61
+ ios: PERMISSIONS.IOS.PHOTO_LIBRARY,
62
+ default: Platform.Version >= 33 ? READ_MEDIA_IMAGES : PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE
63
+ });
64
+ return requestPermission(perm, 'Vui lòng cấp quyền truy cập vào "Thư viện ảnh" của bạn trước khi sử dụng tính năng này', disableToast);
65
+ };
66
+ const requestCameraPermission = async () => {
67
+ const perm = Platform.select({
68
+ ios: PERMISSIONS.IOS.CAMERA,
69
+ default: PERMISSIONS.ANDROID.CAMERA
70
+ });
71
+ return requestPermission(perm, 'Droppii cần truy cập vào "Máy ảnh" của bạn');
72
+ };
73
+ export const openImagePicker = options => {
74
+ return new Promise(async resolve => {
75
+ try {
76
+ const isGranted = await requestReadPhotoPermission();
77
+ if (!isGranted) {
78
+ throw new Error('No permission');
79
+ }
80
+ const value = await openPicker({
81
+ ...pickerOptions,
82
+ ...options
83
+ });
84
+ resolve(value);
85
+ } catch (error) {
86
+ resolve(undefined);
87
+ }
88
+ });
89
+ };
90
+ export const openImageMultiplePicker = options => {
91
+ return new Promise(async resolve => {
92
+ try {
93
+ const isGranted = await requestReadPhotoPermission();
94
+ if (!isGranted) {
95
+ throw new Error('No permission');
96
+ }
97
+ const value = await openPicker({
98
+ ...pickerOptions,
99
+ ...options,
100
+ multiple: true
101
+ });
102
+ resolve(value);
103
+ } catch (error) {
104
+ resolve([]);
105
+ }
106
+ });
107
+ };
108
+ export const openCameraPicker = options => {
109
+ return new Promise(async resolve => {
110
+ try {
111
+ const isGranted = await requestCameraPermission();
112
+ if (!isGranted) {
113
+ throw new Error('No permission');
114
+ }
115
+ const value = await openCamera({
116
+ ...pickerOptions,
117
+ ...options
118
+ });
119
+ resolve(value);
120
+ } catch (error) {
121
+ resolve(undefined);
122
+ }
123
+ });
124
+ };
125
+ export const openDocumentPicker = async options => {
126
+ try {
127
+ const [result] = await pick({
128
+ mode: 'open',
129
+ ...options
130
+ });
131
+ console.log(result);
132
+ return result;
133
+ } catch (err) {
134
+ return undefined;
135
+ }
136
+ };
137
+ //# sourceMappingURL=device.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["pick","UIUtils","PermissionsAndroid","Platform","openCamera","openPicker","check","PERMISSIONS","request","READ_MEDIA_IMAGES","pickerOptions","writeTempFile","mediaType","compressImageQuality","width","height","compressImageMaxHeight","compressImageMaxWidth","cropping","cropperCircleOverlay","waitAnimationEnd","includeExif","forceJpg","cropperChooseText","cropperCancelText","requestPermission","perm","requestMessage","disableToast","granted","OS","toast","open","title","result","err","requestReadPhotoPermission","select","ios","IOS","PHOTO_LIBRARY","default","Version","READ_EXTERNAL_STORAGE","requestCameraPermission","CAMERA","ANDROID","openImagePicker","options","Promise","resolve","isGranted","Error","value","error","undefined","openImageMultiplePicker","multiple","openCameraPicker","openDocumentPicker","mode","console","log"],"sourceRoot":"../../../src","sources":["utils/device.ts"],"mappings":";;AAAA,SAAgCA,IAAI,QAAQ,gCAAgC;AAC5E,OAAOC,OAAO,MAAM,gBAAa;AACjC,SAASC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAEEC,UAAU,EACVC,UAAU,QAGL,gCAAgC;AACvC,SAASC,KAAK,EAAEC,WAAW,EAAEC,OAAO,QAAQ,0BAA0B;AAItE,MAAMC,iBAAiB,GAAG,sCAAsC;AAEhE,MAAMC,aAAa,GAAG;EACpBC,aAAa,EAAE,IAAI;EACnBC,SAAS,EAAE,OAAO;EAClBC,oBAAoB,EAAE,GAAG;EACz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AM;EACf,CAAC,CAAC,OAAOC,GAAG,EAAE;IACZ,OAAOoB,SAAS;EAClB;AACF,CAAC","ignoreList":[]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ // @ts-ignore
4
+
5
+ import { toastRef } from "../constants/index.js";
6
+ // @ts-ignore
7
+
8
+ class UIUtils {
9
+ toast = {
10
+ open: params => {
11
+ toastRef.current?.open(params);
12
+ },
13
+ dismiss: () => {
14
+ toastRef.current?.dismiss();
15
+ },
16
+ showError: (error, withToast = true) => {
17
+ const msg = error?.message || error?.response?.message || error?.data?.message || error?.response?.data?.message || 'Có lỗi xảy ra, vui lòng thử lại';
18
+ withToast && toastRef.current?.open({
19
+ title: msg,
20
+ theme: 'danger',
21
+ stretch: true
22
+ });
23
+ return msg;
24
+ }
25
+ };
26
+ }
27
+ export default new UIUtils();
28
+ //# sourceMappingURL=ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["toastRef","UIUtils","toast","open","params","current","dismiss","showError","error","withToast","msg","message","response","data","title","theme","stretch"],"sourceRoot":"../../../src","sources":["utils/ui.tsx"],"mappings":";;AAAA;;AAEA,SAASA,QAAQ,QAAQ,uBAAc;AACvC;;AAGA,MAAMC,OAAO,CAAC;EACZC,KAAK,GAAG;IACNC,IAAI,EAEFC,MAAyE,IACtE;MACHJ,QAAQ,CAACK,OAAO,EAAEF,IAAI,CAACC,MAAM,CAAC;IAChC,CAAC;IACDE,OAAO,EAAEA,CAAA,KAAM;MACbN,QAAQ,CAACK,OAAO,EAAEC,OAAO,CAAC,CAAC;IAC7B,CAAC;IACDC,SAAS,EAAEA,CAACC,KAAU,EAAEC,SAAS,GAAG,IAAI,KAAK;MAC3C,MAAMC,GAAG,GACPF,KAAK,EAAEG,OAAO,IACdH,KAAK,EAAEI,QAAQ,EAAED,OAAO,IACxBH,KAAK,EAAEK,IAAI,EAAEF,OAAO,IACpBH,KAAK,EAAEI,QAAQ,EAAEC,IAAI,EAAEF,OAAO,IAC9B,iCAAiC;MACnCF,SAAS,IACPT,QAAQ,CAACK,OAAO,EAAEF,IAAI,CAAC;QAAEW,KAAK,EAAEJ,GAAG;QAAEK,KAAK,EAAE,QAAQ;QAAEC,OAAO,EAAE;MAAK,CAAC,CAAC;MACxE,OAAON,GAAG;IACZ;EACF,CAAC;AACH;AAEA,eAAe,IAAIT,OAAO,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"IconChatArrow.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconChatArrow.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,4CAiBzC,CAAC"}
1
+ {"version":3,"file":"IconChatArrow.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconChatArrow.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,4CAWzC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ width?: number;
3
+ height?: number;
4
+ }
5
+ export declare const IconPdf: (props: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=IconPdf.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconPdf.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconPdf.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,OAAO,GAAI,OAAO,KAAK,4CAkBnC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconThinkingStep.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconThinkingStep.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,4CAwC5C,CAAC"}
1
+ {"version":3,"file":"IconThinkingStep.d.ts","sourceRoot":"","sources":["../../../../../src/assets/svgIcon/IconThinkingStep.tsx"],"names":[],"mappings":"AAEA,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,GAAI,OAAO,KAAK,4CAkC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatMessageList.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,eAAe,+CAkDpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ChatMessageList.d.ts","sourceRoot":"","sources":["../../../../../src/components/chat/ChatMessageList.tsx"],"names":[],"mappings":"AAUA,QAAA,MAAM,eAAe,+CA+CpB,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { Image } from 'react-native-image-crop-picker';
2
+ import { DocumentPickerResponse } from '@react-native-documents/picker';
3
+ export interface ImageUpload extends Image {
4
+ streamId?: string;
5
+ remoteUrl?: string;
6
+ uploadType: 'image';
7
+ }
8
+ export interface FileUpload extends DocumentPickerResponse {
9
+ streamId?: string;
10
+ remoteUrl?: string;
11
+ uploadType: 'file';
12
+ }
13
+ export type UploadItem = ImageUpload | FileUpload;
14
+ declare const ChatFooter: () => import("react/jsx-runtime").JSX.Element;
15
+ export default ChatFooter;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/footer/index.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAG5D,OAAO,EAAE,sBAAsB,EAAS,MAAM,gCAAgC,CAAC;AAM/E,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,UAAU,CAAC;AAMlD,QAAA,MAAM,UAAU,+CAsTf,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FileUpload } from '..';
2
+ interface Props {
3
+ item: FileUpload;
4
+ onRemove?: (item: FileUpload) => void;
5
+ onSuccess?: (item: FileUpload) => void;
6
+ }
7
+ declare const UploadFileItem: ({ item, onRemove, onSuccess }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default UploadFileItem;
9
+ //# sourceMappingURL=UploadFileItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadFileItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/chat/footer/item/UploadFileItem.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAMhC,UAAU,KAAK;IACb,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACxC;AACD,QAAA,MAAM,cAAc,GAAI,+BAA+B,KAAK,4CAuG3D,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ImageUpload } from '..';
2
+ interface Props {
3
+ item: ImageUpload;
4
+ onSuccess?: (item: ImageUpload) => void;
5
+ onRemove?: (item: ImageUpload) => void;
6
+ }
7
+ declare const UploadImageItem: ({ item, onSuccess, onRemove }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default UploadImageItem;
9
+ //# sourceMappingURL=UploadImageItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UploadImageItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/chat/footer/item/UploadImageItem.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAKjC,UAAU,KAAK;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AAED,QAAA,MAAM,eAAe,GAAI,+BAA+B,KAAK,4CAwC5D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -3,6 +3,15 @@ interface ChatAIAnswerMessageItemProps {
3
3
  item: IMessageItem;
4
4
  isLast?: boolean;
5
5
  }
6
+ /**
7
+ * Tách markdown thành các block độc lập (paragraph, code block, list...)
8
+ */
9
+ export declare function splitMarkdownBlocks(text: string): string[];
10
+ /**
11
+ * Hook quản lý render markdown stream incremental
12
+ * @param text - markdown content (stream liên tục cập nhật)
13
+ */
14
+ export declare function useStreamingMarkdownBlocks(text: string): string[];
6
15
  declare const ChatAIAnswerMessageItem: ({ item, isLast, }: ChatAIAnswerMessageItemProps) => import("react/jsx-runtime").JSX.Element;
7
16
  export default ChatAIAnswerMessageItem;
8
17
  //# sourceMappingURL=ChatAIAnswerMessageItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatAIAnswerMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatAIAnswerMessageItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAW9C,UAAU,4BAA4B;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAwED,QAAA,MAAM,uBAAuB,GAAI,mBAG9B,4BAA4B,4CAyD9B,CAAC;AACF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"ChatAIAnswerMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatAIAnswerMessageItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAW9C,UAAU,4BAA4B;IACpC,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAOD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CA+C1D;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,YAoCtD;AAmED,QAAA,MAAM,uBAAuB,GAAI,mBAG9B,4BAA4B,4CA2C9B,CAAC;AACF,eAAe,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatUserMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatUserMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,UAAU,wBAAwB;IAChC,IAAI,EAAE,YAAY,CAAC;CACpB;AACD,QAAA,MAAM,mBAAmB,GAAI,UAAU,wBAAwB,4CAW9D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ChatUserMessageItem.d.ts","sourceRoot":"","sources":["../../../../../../src/components/chat/item/ChatUserMessageItem.tsx"],"names":[],"mappings":"AASA,OAAO,EAAe,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAU3D,UAAU,wBAAwB;IAChC,IAAI,EAAE,YAAY,CAAC;CACpB;AAOD,QAAA,MAAM,mBAAmB,GAAI,UAAU,wBAAwB,4CAwF9D,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { WithToastProps } from '../../types/ui';
2
+ declare const _default: import("react").NamedExoticComponent<import("react").RefAttributes<WithToastProps>>;
3
+ export default _default;
4
+ //# sourceMappingURL=Toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/Toast.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;;AA+PhD,wBAA2B"}
@@ -0,0 +1,3 @@
1
+ declare const Portal: import("react").MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
2
+ export default Portal;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/portal/index.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,MAAM,oFAMV,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { WithToastProps } from '../types';
2
+ export declare const toastRef: import("react").RefObject<WithToastProps | null>;
3
+ export declare const Z_INDEX_PRIORITY: {
4
+ toast: number;
5
+ };
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/constants/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,eAAO,MAAM,QAAQ,kDAA8B,CAAC;AACpD,eAAO,MAAM,gBAAgB;;CAE5B,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,0CAItB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAOpD,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;AAIxE,eAAO,MAAM,WAAW,0CAItB,CAAC;AAEH,eAAO,MAAM,cAAc,uBAAgC,CAAC;AAE5D,eAAO,MAAM,YAAY,GAAI,OAAO,iBAAiB,4CAUpD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAetE,eAAO,MAAM,UAAU;;CA+EtB,CAAC"}
1
+ {"version":3,"file":"useMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useMessage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAetE,eAAO,MAAM,UAAU;;CA8EtB,CAAC"}
@@ -1,5 +1,6 @@
1
+ import { IAttachment } from '../../types';
1
2
  export declare const useSendMessage: () => {
2
- onSendMessage: (message: string) => Promise<void>;
3
+ onSendMessage: (message: string, attachments?: IAttachment[]) => Promise<void>;
3
4
  stopStream: () => void;
4
5
  };
5
6
  //# sourceMappingURL=useSendMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,cAAc;6BAKP,MAAM;;CA2CzB,CAAC"}
1
+ {"version":3,"file":"useSendMessage.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/message/useSendMessage.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAuC,MAAM,aAAa,CAAC;AAI/E,eAAO,MAAM,cAAc;6BAKP,MAAM,gBAAgB,WAAW,EAAE;;CA2CtD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { FileUpload } from '../../components/chat/footer';
2
+ interface UseFileUploadProps {
3
+ file: FileUpload;
4
+ onSuccess?: (data: any) => void;
5
+ onError?: (err: any) => void;
6
+ }
7
+ export declare const useFileUpload: ({ file, onSuccess, onError, }: UseFileUploadProps) => {
8
+ progress: number;
9
+ isUploading: boolean;
10
+ isSuccess: boolean;
11
+ isError: boolean;
12
+ cancel: () => void | undefined;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=useFileUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFileUpload.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/upload/useFileUpload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAc1D,UAAU,kBAAkB;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,GAAI,+BAI3B,kBAAkB;;;;;;CAmGpB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { ImageUpload } from '../../components/chat/footer';
2
+ interface UseImageUploadProps {
3
+ file: ImageUpload;
4
+ onSuccess?: (data: any) => void;
5
+ onError?: (err: any) => void;
6
+ }
7
+ export declare const useImageUpload: ({ file, onSuccess, onError, }: UseImageUploadProps) => {
8
+ progress: number;
9
+ isUploading: boolean;
10
+ isSuccess: boolean;
11
+ isError: boolean;
12
+ cancel: () => void | undefined;
13
+ };
14
+ export {};
15
+ //# sourceMappingURL=useImageUpload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useImageUpload.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/upload/useImageUpload.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAc3D,UAAU,mBAAmB;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,cAAc,GAAI,+BAI5B,mBAAmB;;;;;;CAgGrB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { DependencyList } from 'react';
2
+ declare const useAndroidBackHandler: (callback?: () => any, deps?: DependencyList) => void;
3
+ export default useAndroidBackHandler;
4
+ //# sourceMappingURL=useAndroidBackHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAndroidBackHandler.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useAndroidBackHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAe,MAAM,OAAO,CAAC;AAGpD,QAAA,MAAM,qBAAqB,GACzB,WAAW,MAAM,GAAG,EACpB,OAAM,cAAmB,SAoB1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -5,5 +5,8 @@ export declare const ENDPOINTS: {
5
5
  getStreamMessage: (sessionId: string) => string;
6
6
  createSession: string;
7
7
  };
8
+ uploaderService: {
9
+ upload: string;
10
+ };
8
11
  };
9
12
  //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;oCAGU,MAAM;sCAEJ,MAAM;;;CAIvC,CAAC"}
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/services/endpoints.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;oCAGU,MAAM;sCAEJ,MAAM;;;;;;CAOvC,CAAC"}
@@ -4,11 +4,17 @@ export interface ChatContextType {
4
4
  apiAddress: string;
5
5
  userId: string;
6
6
  cartButton?: JSX.Element;
7
+ openImageViewer?: (images: {
8
+ url: string;
9
+ }[], index: number) => void;
7
10
  }
8
11
  export interface ChatProviderProps {
9
12
  apiAddress: string;
10
13
  userId: string;
11
14
  cartButton?: JSX.Element;
15
+ openImageViewer?: (images: {
16
+ url: string;
17
+ }[], index: number) => void;
12
18
  }
13
19
  export interface SessionStore {
14
20
  sessionId?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/types/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,kBAAkB;IACjC,W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MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,IAAI,CAAC;CACzE"}
@@ -8,6 +8,15 @@ export interface SuggetionResponse {
8
8
  group_suggestion_id: string;
9
9
  suggestions: ISuggestionItem[];
10
10
  }
11
+ export interface IAttachment {
12
+ type: 'image' | 'file';
13
+ source_type: 'url';
14
+ data: string;
15
+ name?: string;
16
+ size?: number;
17
+ loading?: boolean;
18
+ mime_type: 'image/jpeg' | 'image/png' | 'image/webp' | 'image/jpg' | 'application/pdf';
19
+ }
11
20
  export interface IMessageItem {
12
21
  id: string;
13
22
  content: string;
@@ -19,7 +28,7 @@ export interface IMessageItem {
19
28
  metadata: Record<string, any>;
20
29
  created_at: string;
21
30
  modified_at: string;
22
- attachments: any[];
31
+ attachments: IAttachment[];
23
32
  }
24
33
  export interface SessionDetailResponse {
25
34
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"dto.d.ts","sourceRoot":"","sources":["../../../../src/types/dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,eAAe,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,IAAI,EAAE,WAAW,CAAC;IAClB,I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CAAC;KAChB,CAAC;CACH"}
@@ -1,4 +1,5 @@
1
1
  export * from './common';
2
2
  export * from './dto';
3
3
  export * from './chat';
4
+ export * from './ui';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface WithToastProps {
2
+ open: (payload: KToastBarProps & {
3
+ contentContainerStyle?: StyleProp<ViewStyle>;
4
+ }) => void;
5
+ dismiss: () => void;
6
+ }
7
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/types/ui.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,CAEJ,OAAO,EAAE,cAAc,GAAG;QAAE,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;KAAE,KACvE,IAAI,CAAC;IACV,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -0,0 +1,10 @@
1
+ export declare const isSameFile: (a: any, b: any) => boolean;
2
+ export declare const formatFileSize: (bytes: number) => string;
3
+ interface ShortenOptions {
4
+ maxLength?: number;
5
+ keepStart?: number;
6
+ keepEnd?: number;
7
+ }
8
+ export declare const shortenFileName: (name: string, options?: ShortenOptions) => string;
9
+ export {};
10
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/utils/common.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,GAAI,GAAG,GAAG,EAAE,GAAG,GAAG,YAC4B,CAAC;AAEtE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,MAU9C,CAAC;AAEF,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,eAAe,GAAI,MAAM,MAAM,EAAE,UAAS,cAAmB,WAkBzE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { DocumentPickerOptions } from '@react-native-documents/picker';
2
+ import { Image, Options, PossibleArray } from 'react-native-image-crop-picker';
3
+ type MediaType<O> = O extends {
4
+ mediaType: 'photo';
5
+ } ? Image : never;
6
+ export declare const openImagePicker: (options?: Options) => Promise<PossibleArray<Options, MediaType<Options>> | undefined>;
7
+ export declare const openImageMultiplePicker: (options?: Options) => Promise<PossibleArray<Options, MediaType<Options>[]> | undefined>;
8
+ export declare const openCameraPicker: (options?: Options) => Promise<PossibleArray<Options, MediaType<Options>> | undefined>;
9
+ export declare const openDocumentPicker: (options?: DocumentPickerOptions) => Promise<import("@react-native-documents/picker").DocumentPickerResponse | undefined>;
10
+ export {};
11
+ //# sourceMappingURL=device.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../../../src/utils/device.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAQ,MAAM,gCAAgC,CAAC;AAG7E,OAAO,EACL,KAAK,EAGL,OAAO,EACP,aAAa,EACd,MAAM,gCAAgC,CAAC;AAGxC,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS;IAAE,SAAS,EAAE,OAAO,CAAA;CAAE,GAAG,KAAK,GAAG,KAAK,CAAC;AAoFrE,eAAO,MAAM,eAAe,GAC1B,UAAU,OAAO,KAChB,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAgBhE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,UAAU,OAAO,KAChB,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,CAiBlE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC3B,UAAU,OAAO,KAChB,OAAO,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,GAAG,SAAS,CAiBhE,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAU,UAAU,qBAAqB,yFAWvE,CAAC"}
@@ -0,0 +1,12 @@
1
+ declare class UIUtils {
2
+ toast: {
3
+ open: (params: KToastBarProps & {
4
+ contentContainerStyle?: StyleProp<ViewStyle>;
5
+ }) => void;
6
+ dismiss: () => void;
7
+ showError: (error: any, withToast?: boolean) => any;
8
+ };
9
+ }
10
+ declare const _default: UIUtils;
11
+ export default _default;
12
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../../../../src/utils/ui.tsx"],"names":[],"mappings":"AAMA,cAAM,OAAO;IACX,KAAK;uBAGO,cAAc,GAAG;YAAE,qBAAqB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;SAAE;;2BAOxD,GAAG;MAWtB;CACH;;AAED,wBAA6B"}