@developer_tribe/react-native-comnyx 0.14.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/Comnyx.podspec +10 -2
  2. package/README.md +50 -0
  3. package/android/build.gradle +1 -0
  4. package/android/consumer-rules.pro +23 -0
  5. package/android/generated/java/com/comnyx/NativeComnyxSpec.java +46 -0
  6. package/android/generated/jni/RNComnyxSpec-generated.cpp +23 -1
  7. package/android/generated/jni/RNComnyxSpec.h +7 -0
  8. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI-generated.cpp +21 -0
  9. package/android/generated/jni/react/renderer/components/RNComnyxSpec/RNComnyxSpecJSI.h +70 -0
  10. package/android/src/main/AndroidManifest.xml +11 -1
  11. package/android/src/main/AndroidManifestNew.xml +11 -1
  12. package/android/src/main/java/com/comnyx/ComnyxMediaPickerModule.kt +105 -19
  13. package/android/src/main/java/com/comnyx/ComnyxModule.kt +7 -0
  14. package/android/src/main/java/com/comnyx/src/messaging/firebase/FirebaseMessagingService.kt +4 -6
  15. package/android/src/main/res/xml/comnyx_file_paths.xml +12 -0
  16. package/ios/APNService.swift +9 -9
  17. package/ios/Comnyx.swift +17 -8
  18. package/ios/ComnyxMediaPicker.m +6 -0
  19. package/ios/ComnyxMediaPicker.swift +106 -26
  20. package/ios/ComnyxMessaging.swift +2 -0
  21. package/ios/PrivacyInfo.xcprivacy +32 -0
  22. package/ios/comnyx_post_install.rb +25 -0
  23. package/ios/generated/RCTAppDependencyProvider.h +25 -0
  24. package/ios/generated/RCTAppDependencyProvider.mm +55 -0
  25. package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
  26. package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
  27. package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
  28. package/ios/generated/RCTThirdPartyComponentsProvider.mm +23 -0
  29. package/ios/generated/RNComnyxSpec/RNComnyxSpec-generated.mm +53 -0
  30. package/ios/generated/RNComnyxSpec/RNComnyxSpec.h +67 -0
  31. package/ios/generated/RNComnyxSpecJSI-generated.cpp +38 -0
  32. package/ios/generated/RNComnyxSpecJSI.h +89 -0
  33. package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
  34. package/lib/commonjs/NativeComnyxMediaPicker.js +46 -6
  35. package/lib/commonjs/NativeComnyxMediaPicker.js.map +1 -1
  36. package/lib/commonjs/api/conversations.js +6 -6
  37. package/lib/commonjs/api/conversations.js.map +1 -1
  38. package/lib/commonjs/api/customers.js +3 -2
  39. package/lib/commonjs/api/customers.js.map +1 -1
  40. package/lib/commonjs/api/media.js +20 -6
  41. package/lib/commonjs/api/media.js.map +1 -1
  42. package/lib/commonjs/api/messages.js +3 -2
  43. package/lib/commonjs/api/messages.js.map +1 -1
  44. package/lib/commonjs/assets/gallery.png +0 -0
  45. package/lib/commonjs/assets/video-play.png +0 -0
  46. package/lib/commonjs/components/ChatList.js +93 -45
  47. package/lib/commonjs/components/ChatList.js.map +1 -1
  48. package/lib/commonjs/components/ComnyxErrorBoundary.js +92 -0
  49. package/lib/commonjs/components/ComnyxErrorBoundary.js.map +1 -0
  50. package/lib/commonjs/components/CustomerForm.js +2 -2
  51. package/lib/commonjs/components/CustomerForm.js.map +1 -1
  52. package/lib/commonjs/components/MediaMessageItem.js +4 -3
  53. package/lib/commonjs/components/MediaMessageItem.js.map +1 -1
  54. package/lib/commonjs/components/MediaPickerButton.js +211 -14
  55. package/lib/commonjs/components/MediaPickerButton.js.map +1 -1
  56. package/lib/commonjs/components/MediaViewerModal.js +7 -0
  57. package/lib/commonjs/components/MediaViewerModal.js.map +1 -1
  58. package/lib/commonjs/components/MessageInput.js +63 -13
  59. package/lib/commonjs/components/MessageInput.js.map +1 -1
  60. package/lib/commonjs/components/MessageItem.js +1 -2
  61. package/lib/commonjs/components/MessageItem.js.map +1 -1
  62. package/lib/commonjs/constants/translations.js +87 -116
  63. package/lib/commonjs/constants/translations.js.map +1 -1
  64. package/lib/commonjs/hooks/usePolling.js +25 -21
  65. package/lib/commonjs/hooks/usePolling.js.map +1 -1
  66. package/lib/commonjs/hooks/useThemeColors.js +12 -1
  67. package/lib/commonjs/hooks/useThemeColors.js.map +1 -1
  68. package/lib/commonjs/index.js.map +1 -1
  69. package/lib/commonjs/notifications/initializeNotifications.js +19 -16
  70. package/lib/commonjs/notifications/initializeNotifications.js.map +1 -1
  71. package/lib/commonjs/register/Accumulator.js +19 -6
  72. package/lib/commonjs/register/Accumulator.js.map +1 -1
  73. package/lib/commonjs/register/collectData.js +1 -1
  74. package/lib/commonjs/register/collectData.js.map +1 -1
  75. package/lib/commonjs/store/store.js +6 -0
  76. package/lib/commonjs/store/store.js.map +1 -1
  77. package/lib/commonjs/support/ComnyxSupport.js +60 -15
  78. package/lib/commonjs/support/ComnyxSupport.js.map +1 -1
  79. package/lib/commonjs/support/SupportConfigContext.js +24 -0
  80. package/lib/commonjs/support/SupportConfigContext.js.map +1 -0
  81. package/lib/commonjs/types/Theme.js +30 -2
  82. package/lib/commonjs/types/Theme.js.map +1 -1
  83. package/lib/commonjs/version.js +1 -1
  84. package/lib/module/NativeComnyxMediaPicker.js +43 -6
  85. package/lib/module/NativeComnyxMediaPicker.js.map +1 -1
  86. package/lib/module/api/conversations.js +6 -6
  87. package/lib/module/api/conversations.js.map +1 -1
  88. package/lib/module/api/customers.js +3 -2
  89. package/lib/module/api/customers.js.map +1 -1
  90. package/lib/module/api/media.js +21 -6
  91. package/lib/module/api/media.js.map +1 -1
  92. package/lib/module/api/messages.js +3 -2
  93. package/lib/module/api/messages.js.map +1 -1
  94. package/lib/module/assets/gallery.png +0 -0
  95. package/lib/module/assets/video-play.png +0 -0
  96. package/lib/module/components/ChatList.js +94 -46
  97. package/lib/module/components/ChatList.js.map +1 -1
  98. package/lib/module/components/ComnyxErrorBoundary.js +87 -0
  99. package/lib/module/components/ComnyxErrorBoundary.js.map +1 -0
  100. package/lib/module/components/CustomerForm.js +2 -2
  101. package/lib/module/components/CustomerForm.js.map +1 -1
  102. package/lib/module/components/MediaMessageItem.js +4 -3
  103. package/lib/module/components/MediaMessageItem.js.map +1 -1
  104. package/lib/module/components/MediaPickerButton.js +215 -18
  105. package/lib/module/components/MediaPickerButton.js.map +1 -1
  106. package/lib/module/components/MediaViewerModal.js +8 -1
  107. package/lib/module/components/MediaViewerModal.js.map +1 -1
  108. package/lib/module/components/MessageInput.js +64 -14
  109. package/lib/module/components/MessageInput.js.map +1 -1
  110. package/lib/module/components/MessageItem.js +1 -2
  111. package/lib/module/components/MessageItem.js.map +1 -1
  112. package/lib/module/constants/translations.js +87 -116
  113. package/lib/module/constants/translations.js.map +1 -1
  114. package/lib/module/hooks/usePolling.js +25 -21
  115. package/lib/module/hooks/usePolling.js.map +1 -1
  116. package/lib/module/hooks/useThemeColors.js +13 -2
  117. package/lib/module/hooks/useThemeColors.js.map +1 -1
  118. package/lib/module/index.js +0 -1
  119. package/lib/module/index.js.map +1 -1
  120. package/lib/module/notifications/initializeNotifications.js +19 -16
  121. package/lib/module/notifications/initializeNotifications.js.map +1 -1
  122. package/lib/module/register/Accumulator.js +19 -6
  123. package/lib/module/register/Accumulator.js.map +1 -1
  124. package/lib/module/register/collectData.js +1 -1
  125. package/lib/module/register/collectData.js.map +1 -1
  126. package/lib/module/store/store.js +6 -0
  127. package/lib/module/store/store.js.map +1 -1
  128. package/lib/module/support/ComnyxSupport.js +61 -16
  129. package/lib/module/support/ComnyxSupport.js.map +1 -1
  130. package/lib/module/support/SupportConfigContext.js +19 -0
  131. package/lib/module/support/SupportConfigContext.js.map +1 -0
  132. package/lib/module/types/Theme.js +30 -2
  133. package/lib/module/types/Theme.js.map +1 -1
  134. package/lib/module/version.js +1 -1
  135. package/lib/typescript/src/NativeComnyxMediaPicker.d.ts +11 -0
  136. package/lib/typescript/src/NativeComnyxMediaPicker.d.ts.map +1 -1
  137. package/lib/typescript/src/api/conversations.d.ts +2 -2
  138. package/lib/typescript/src/api/conversations.d.ts.map +1 -1
  139. package/lib/typescript/src/api/customers.d.ts +1 -1
  140. package/lib/typescript/src/api/customers.d.ts.map +1 -1
  141. package/lib/typescript/src/api/media.d.ts +3 -3
  142. package/lib/typescript/src/api/media.d.ts.map +1 -1
  143. package/lib/typescript/src/api/messages.d.ts +1 -1
  144. package/lib/typescript/src/api/messages.d.ts.map +1 -1
  145. package/lib/typescript/src/components/ChatList.d.ts.map +1 -1
  146. package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts +18 -0
  147. package/lib/typescript/src/components/ComnyxErrorBoundary.d.ts.map +1 -0
  148. package/lib/typescript/src/components/MediaMessageItem.d.ts.map +1 -1
  149. package/lib/typescript/src/components/MediaPickerButton.d.ts.map +1 -1
  150. package/lib/typescript/src/components/MediaViewerModal.d.ts.map +1 -1
  151. package/lib/typescript/src/components/MessageInput.d.ts.map +1 -1
  152. package/lib/typescript/src/components/MessageItem.d.ts.map +1 -1
  153. package/lib/typescript/src/constants/translations.d.ts.map +1 -1
  154. package/lib/typescript/src/hooks/usePolling.d.ts.map +1 -1
  155. package/lib/typescript/src/hooks/useThemeColors.d.ts.map +1 -1
  156. package/lib/typescript/src/index.d.ts +2 -0
  157. package/lib/typescript/src/index.d.ts.map +1 -1
  158. package/lib/typescript/src/notifications/initializeNotifications.d.ts.map +1 -1
  159. package/lib/typescript/src/register/Accumulator.d.ts.map +1 -1
  160. package/lib/typescript/src/register/collectData.d.ts +4 -1
  161. package/lib/typescript/src/register/collectData.d.ts.map +1 -1
  162. package/lib/typescript/src/store/store.d.ts +6 -2
  163. package/lib/typescript/src/store/store.d.ts.map +1 -1
  164. package/lib/typescript/src/support/ComnyxSupport.d.ts +56 -2
  165. package/lib/typescript/src/support/ComnyxSupport.d.ts.map +1 -1
  166. package/lib/typescript/src/support/SupportConfigContext.d.ts +58 -0
  167. package/lib/typescript/src/support/SupportConfigContext.d.ts.map +1 -0
  168. package/lib/typescript/src/support/index.d.ts +1 -0
  169. package/lib/typescript/src/support/index.d.ts.map +1 -1
  170. package/lib/typescript/src/types/Conversation.d.ts +2 -2
  171. package/lib/typescript/src/types/Conversation.d.ts.map +1 -1
  172. package/lib/typescript/src/types/Customer.d.ts +1 -1
  173. package/lib/typescript/src/types/Customer.d.ts.map +1 -1
  174. package/lib/typescript/src/types/LocalizationKeys.d.ts +0 -1
  175. package/lib/typescript/src/types/LocalizationKeys.d.ts.map +1 -1
  176. package/lib/typescript/src/types/MessageResponse.d.ts +7 -4
  177. package/lib/typescript/src/types/MessageResponse.d.ts.map +1 -1
  178. package/lib/typescript/src/types/Theme.d.ts +26 -0
  179. package/lib/typescript/src/types/Theme.d.ts.map +1 -1
  180. package/lib/typescript/src/version.d.ts +1 -1
  181. package/package.json +12 -25
  182. package/src/NativeComnyxMediaPicker.ts +46 -7
  183. package/src/api/conversations.ts +6 -4
  184. package/src/api/customers.ts +3 -1
  185. package/src/api/media.ts +32 -10
  186. package/src/api/messages.ts +3 -1
  187. package/src/assets/gallery.png +0 -0
  188. package/src/assets/video-play.png +0 -0
  189. package/src/components/ChatList.tsx +115 -55
  190. package/src/components/ComnyxErrorBoundary.tsx +91 -0
  191. package/src/components/CustomerForm.tsx +2 -2
  192. package/src/components/MediaMessageItem.tsx +10 -3
  193. package/src/components/MediaPickerButton.tsx +238 -17
  194. package/src/components/MediaViewerModal.tsx +8 -1
  195. package/src/components/MessageInput.tsx +89 -16
  196. package/src/components/MessageItem.tsx +12 -14
  197. package/src/constants/translations.ts +87 -116
  198. package/src/hooks/usePolling.ts +21 -11
  199. package/src/hooks/useThemeColors.ts +11 -2
  200. package/src/index.ts +12 -0
  201. package/src/notifications/initializeNotifications.ts +22 -20
  202. package/src/register/Accumulator.ts +26 -9
  203. package/src/register/collectData.ts +10 -2
  204. package/src/store/store.ts +11 -3
  205. package/src/support/ComnyxSupport.tsx +128 -22
  206. package/src/support/SupportConfigContext.tsx +79 -0
  207. package/src/support/index.ts +7 -0
  208. package/src/types/Conversation.ts +2 -2
  209. package/src/types/Customer.ts +1 -2
  210. package/src/types/LocalizationKeys.ts +0 -1
  211. package/src/types/MessageResponse.ts +4 -4
  212. package/src/types/Theme.ts +38 -0
  213. package/src/version.ts +1 -1
@@ -1,24 +1,33 @@
1
1
  "use strict";
2
2
 
3
3
  import { View, TouchableOpacity, Image } from 'react-native';
4
+ import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
5
  import { ChatList } from "../components/ChatList.js";
5
6
  import { CustomerForm } from "../components/CustomerForm.js";
6
- import { useEffect, useState } from 'react';
7
+ import { useEffect, useMemo, useState } from 'react';
7
8
  import { AppText } from "../components/AppText.js";
8
9
  import { useThemeColors } from "../hooks/useThemeColors.js";
9
10
  import { usePolling } from "../hooks/usePolling.js";
10
11
  import { useAppStore } from "../store/store.js";
11
12
  import { ScaledSheet } from "../components/ScaledSheet.js";
12
13
  import { accumulator } from "../register/Accumulator.js";
14
+ import { SupportConfigProvider } from "./SupportConfigContext.js";
15
+ import { ComnyxErrorBoundary } from "../components/ComnyxErrorBoundary.js";
13
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
17
  const closeIcon = require('../assets/x-close.png');
15
- export function ComnyxSupport({
18
+ function ComnyxSupportInner({
16
19
  language = 'en',
17
20
  theme = 'dark',
18
21
  fake = false,
19
22
  onBack,
20
23
  themes,
21
- containerStyle
24
+ themeOverride,
25
+ containerStyle,
26
+ renderHeader,
27
+ renderEmptyState,
28
+ renderErrorState,
29
+ renderMessage,
30
+ onBeforeSend
22
31
  }) {
23
32
  const {
24
33
  customer,
@@ -29,13 +38,24 @@ export function ComnyxSupport({
29
38
  }));
30
39
  const [initLoading, setInitLoading] = useState(true);
31
40
  const themeColors = useThemeColors();
41
+ const insets = useSafeAreaInsets();
32
42
  usePolling();
43
+ const supportConfig = useMemo(() => ({
44
+ renderHeader,
45
+ renderEmptyState,
46
+ renderErrorState,
47
+ renderMessage,
48
+ onBeforeSend
49
+ }), [renderHeader, renderEmptyState, renderErrorState, renderMessage, onBeforeSend]);
33
50
  useEffect(() => {
34
51
  if (!accumulator.isListenerCalledOnce()) {
35
52
  accumulator.flush().then(() => {
36
53
  setTimeout(() => {
37
54
  setInitLoading(false);
38
55
  }, 100);
56
+ }).catch(err => {
57
+ console.error('[Comnyx] accumulator.flush failed', err);
58
+ setInitLoading(false);
39
59
  });
40
60
  } else {
41
61
  setInitLoading(false);
@@ -49,24 +69,37 @@ export function ComnyxSupport({
49
69
  }
50
70
  }, [customer, customer?.external_id]);
51
71
  useEffect(() => {
52
- //TOOD: getState().initApp({language,theme,fake,rtlFix,themes})
53
72
  useAppStore.getState().setLanguage(language);
54
73
  useAppStore.getState().setTheme(theme);
55
74
  useAppStore.getState().setFake(fake);
56
75
  if (themes) {
57
76
  useAppStore.getState().setThemes(themes);
58
77
  }
59
- }, [language, theme, fake, themes]);
78
+ if (themeOverride) {
79
+ useAppStore.getState().setThemeOverride(themeOverride);
80
+ }
81
+ }, [language, theme, fake, themes, themeOverride]);
82
+ let body;
60
83
  if (!customer) {
61
84
  //NOTE: customer yoksa register hiç çalışmamış
62
- return /*#__PURE__*/_jsxs(View, {
85
+ body = /*#__PURE__*/_jsxs(View, {
63
86
  style: [styles.container, {
64
87
  backgroundColor: themeColors.background
65
88
  }],
66
89
  children: [/*#__PURE__*/_jsx(TouchableOpacity, {
67
90
  activeOpacity: 1,
68
- style: [styles.iconContainer],
91
+ style: [styles.iconContainer, {
92
+ top: Math.max(insets.top, 16) + 16
93
+ }],
69
94
  onPress: onBack,
95
+ accessibilityRole: "button",
96
+ accessibilityLabel: "Close support",
97
+ hitSlop: {
98
+ top: 12,
99
+ bottom: 12,
100
+ left: 12,
101
+ right: 12
102
+ },
70
103
  children: /*#__PURE__*/_jsx(Image, {
71
104
  source: closeIcon,
72
105
  style: [styles.closeIcon, {
@@ -82,19 +115,32 @@ export function ComnyxSupport({
82
115
  });
83
116
  } else if (!formSubmitted) {
84
117
  //NOTE: customer var ama forSubmitted false (name===null)
85
- return /*#__PURE__*/_jsx(CustomerForm, {
118
+ body = /*#__PURE__*/_jsx(CustomerForm, {
86
119
  loading: initLoading,
87
120
  onBack: onBack,
88
121
  containerStyle: containerStyle
89
122
  });
123
+ } else {
124
+ body = /*#__PURE__*/_jsx(View, {
125
+ style: [styles.container, {
126
+ backgroundColor: themeColors.background
127
+ }, containerStyle],
128
+ children: /*#__PURE__*/_jsx(ChatList, {
129
+ initLoading: initLoading,
130
+ onBack: onBack
131
+ })
132
+ });
90
133
  }
91
- return /*#__PURE__*/_jsx(View, {
92
- style: [styles.container, {
93
- backgroundColor: themeColors.background
94
- }, containerStyle],
95
- children: /*#__PURE__*/_jsx(ChatList, {
96
- initLoading: initLoading,
97
- onBack: onBack
134
+ return /*#__PURE__*/_jsx(SupportConfigProvider, {
135
+ value: supportConfig,
136
+ children: body
137
+ });
138
+ }
139
+ export function ComnyxSupport(props) {
140
+ return /*#__PURE__*/_jsx(ComnyxErrorBoundary, {
141
+ onBack: props.onBack,
142
+ children: /*#__PURE__*/_jsx(ComnyxSupportInner, {
143
+ ...props
98
144
  })
99
145
  });
100
146
  }
@@ -105,7 +151,6 @@ const styles = ScaledSheet.create({
105
151
  },
106
152
  iconContainer: {
107
153
  position: 'absolute',
108
- top: '60@vs',
109
154
  left: '24@s'
110
155
  },
111
156
  closeIcon: {
@@ -1 +1 @@
1
- {"version":3,"names":["View","TouchableOpacity","Image","ChatList","CustomerForm","useEffect","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","jsx","_jsx","jsxs","_jsxs","closeIcon","require","ComnyxSupport","language","theme","fake","onBack","themes","containerStyle","customer","formSubmitted","s","initLoading","setInitLoading","themeColors","isListenerCalledOnce","flush","then","setTimeout","external_id","setState","data","getState","setLanguage","setTheme","setFake","setThemes","style","styles","container","backgroundColor","background","children","activeOpacity","iconContainer","onPress","source","tintColor","text","textAlign","localization","loading","create","flex","justifyContent","position","top","left","width","height"],"sourceRoot":"../../../src","sources":["support/ComnyxSupport.tsx"],"mappings":";;AAAA,SAC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K,CAAC;QAAE,CAC5D;MAAC,CACc,CAAC,eACnBzC,IAAA,CAACP,OAAO;QACNqC,KAAK,EAAE;UAAEY,SAAS,EAAE;QAAS,CAAE;QAC/BC,YAAY,EAAC;MAA6B,CAC3C,CAAC;IAAA,CACE,CAAC;EAEX,CAAC,MAAM,IAAI,CAAC9B,aAAa,EAAE;IACzB;IACA,oBACEb,IAAA,CAACV,YAAY;MACXsD,OAAO,EAAE7B,WAAY;MACrBN,MAAM,EAAEA,MAAO;MACfE,cAAc,EAAEA;IAAe,CAChC,CAAC;EAEN;EAEA,oBACEX,IAAA,CAACd,IAAI;IACH4C,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MAAEC,eAAe,EAAEhB,WAAW,CAACiB;IAAW,CAAC,EAC3CvB,cAAc,CACd;IAAAwB,QAAA,eAEFnC,IAAA,CAACX,QAAQ;MAAC0B,WAAW,EAAEA,WAAY;MAACN,MAAM,EAAEA;IAAO,CAAE;EAAC,CAClD,CAAC;AAEX;AAEA,MAAMsB,MAAM,GAAGlC,WAAW,CAACgD,MAAM,CAAC;EAChCb,SAAS,EAAE;IACTc,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDV,aAAa,EAAE;IACbW,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,OAAO;IACZC,IAAI,EAAE;EACR,CAAC;EACD/C,SAAS,EAAE;IACTgD,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["View","TouchableOpacity","Image","useSafeAreaInsets","ChatList","CustomerForm","useEffect","useMemo","useState","AppText","useThemeColors","usePolling","useAppStore","ScaledSheet","accumulator","SupportConfigProvider","ComnyxErrorBoundary","jsx","_jsx","jsxs","_jsxs","closeIcon","require","ComnyxSupportInner","language","theme","fake","onBack","themes","themeOverride","containerStyle","renderHeader","renderEmptyState","renderErrorState","renderMessage","onBeforeSend","customer","formSubmitted","s","initLoading","setInitLoading","themeColors","insets","supportConfig","isListenerCalledOnce","flush","then","setTimeout","catch","err","console","error","external_id","setState","data","getState","setLanguage","setTheme","setFake","setThemes","setThemeOverride","body","style","styles","container","backgroundColor","background","children","activeOpacity","iconContainer","top","Math","max","onPress","accessibilityRole","accessibilityLabel","hitSlop","bottom","left","right","source","tintColor","text","textAlign","localization","loading","value","ComnyxSupport","props","create","flex","justifyContent","position","width","height"],"sourceRoot":"../../../src","sources":["support/ComnyxSupport.tsx"],"mappings":";;AAAA,SACEA,IAAI,EACJC,gBAAgB,EAChBC,KAAK,QAGA,cAAc;AACrB,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,QAAQ,QAAQ,2BAAwB;AACjD,SAASC,YAAY,QAAQ,+BAA4B;AAIzD,SAASC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAA2B,OAAO;AACvE,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,UAAU,QAAQ,wBAAqB;AAChD,SAASC,WAAW,QAAQ,mBAAgB;AAC5C,SAASC,WAAW,QAAQ,8BAA2B;AACvD,SAASC,WAAW,QAAQ,4BAAyB;AACrD,SACEC,qBAAqB,QAEhB,2BAAwB;AAC/B,SAASC,mBAAmB,QAAQ,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AACxE,MAAMC,SAAS,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AA+DlD,SAASC,kBAAkBA,CAAC;EAC1BC,QAAQ,GAAG,IAAI;EACfC,KAAK,GAAG,MAAM;EACdC,IAAI,GAAG,KAAK;EACZC,MAAM;EACNC,MAAM;EACNC,aAAa;EACbC,cAAc;EACdC,YAAY;EACZC,gBAAgB;EAChBC,gBAAgB;EAChBC,aAAa;EACbC;AACkB,CAAC,EAAE;EACrB,MAAM;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAGzB,WAAW,CAAE0B,CAA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B,CAAC;EACDtB,aAAa,EAAE;IACbuB,QAAQ,EAAE,UAAU;IACpBd,IAAI,EAAE;EACR,CAAC;EACDzD,SAAS,EAAE;IACTwE,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ import { createContext, useContext } from 'react';
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ const EMPTY_CONFIG = {};
6
+ const SupportConfigContext = /*#__PURE__*/createContext(EMPTY_CONFIG);
7
+ export function SupportConfigProvider({
8
+ value,
9
+ children
10
+ }) {
11
+ return /*#__PURE__*/_jsx(SupportConfigContext.Provider, {
12
+ value: value,
13
+ children: children
14
+ });
15
+ }
16
+ export function useSupportConfig() {
17
+ return useContext(SupportConfigContext);
18
+ }
19
+ //# sourceMappingURL=SupportConfigContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","jsx","_jsx","EMPTY_CONFIG","SupportConfigContext","SupportConfigProvider","value","children","Provider","useSupportConfig"],"sourceRoot":"../../../src","sources":["support/SupportConfigContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAwB,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AA0DlE,MAAMC,YAA2B,GAAG,CAAC,CAAC;AAEtC,MAAMC,oBAAoB,gBAAGL,aAAa,CAAgBI,YAAY,CAAC;AAEvE,OAAO,SAASE,qBAAqBA,CAAC;EACpCC,KAAK;EACLC;AAIF,CAAC,EAAE;EACD,oBACEL,IAAA,CAACE,oBAAoB,CAACI,QAAQ;IAACF,KAAK,EAAEA,KAAM;IAAAC,QAAA,EACzCA;EAAQ,CACoB,CAAC;AAEpC;AAEA,OAAO,SAASE,gBAAgBA,CAAA,EAAkB;EAChD,OAAOT,UAAU,CAACI,oBAAoB,CAAC;AACzC","ignoreList":[]}
@@ -19,7 +19,12 @@ export const lightTheme = {
19
19
  ghost: '#EFEFEF',
20
20
  navy: '#191A21',
21
21
  lavender: '#E0E0E0',
22
- silver: '#C7C7C7'
22
+ silver: '#C7C7C7',
23
+ link: '#0066CC',
24
+ toastBackground: '#333333',
25
+ toastText: '#FFFFFF',
26
+ playIcon: '#FFFFFF',
27
+ videoPlaceholder: '#1A1A2E'
23
28
  };
24
29
  export const darkTheme = {
25
30
  primary: '#4361EE',
@@ -40,6 +45,29 @@ export const darkTheme = {
40
45
  ghost: '#202129',
41
46
  navy: '#F5F5F5',
42
47
  lavender: '#262730',
43
- silver: '#44454D'
48
+ silver: '#44454D',
49
+ link: '#4D9FFF',
50
+ toastBackground: '#2A2A2A',
51
+ toastText: '#FFFFFF',
52
+ playIcon: '#FFFFFF',
53
+ videoPlaceholder: '#1A1A2E'
44
54
  };
55
+
56
+ /**
57
+ * Partial override for a single theme mode. Consumers can change one or more
58
+ * tokens without redeclaring the whole palette.
59
+ */
60
+
61
+ /**
62
+ * Full override map accepted by `ComnyxSupport.themeOverride`. Any token not
63
+ * provided falls back to the built-in light/dark palette.
64
+ *
65
+ * @example
66
+ * <ComnyxSupport
67
+ * themeOverride={{
68
+ * light: { primary: '#FF6B6B', link: '#FF9999' },
69
+ * dark: { primary: '#FF9999' },
70
+ * }}
71
+ * />
72
+ */
45
73
  //# sourceMappingURL=Theme.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;AAsBA,OAAO,MAAMA,UAAuB,GAAG;EACrCC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE;AACV,CAAC;AAED,OAAO,MAAMC,SAAsB,GAAG;EACpCnB,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["lightTheme","primary","secondary","background","light_text","text","error","success","green","light_green","warning","info","border","dark_background","gainsboro","slate","ghost","navy","lavender","silver","link","toastBackground","toastText","playIcon","videoPlaceholder","darkTheme"],"sourceRoot":"../../../src","sources":["types/Theme.ts"],"mappings":";;AA2BA,OAAO,MAAMA,UAAuB,GAAG;EACrCC,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE,SAAS;EACnBC,gBAAgB,EAAE;AACpB,CAAC;AAED,OAAO,MAAMC,SAAsB,GAAG;EACpCxB,OAAO,EAAE,SAAS;EAClBC,SAAS,EAAE,SAAS;EACpBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,SAAS;EAChBC,WAAW,EAAE,SAAS;EACtBC,OAAO,EAAE,SAAS;EAClBC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,KAAK,EAAE,SAAS;EAChBC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,IAAI,EAAE,SAAS;EACfC,eAAe,EAAE,SAAS;EAC1BC,SAAS,EAAE,SAAS;EACpBC,QAAQ,EAAE,SAAS;EACnBC,gBAAgB,EAAE;AACpB,CAAC;;AAOD;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
 
3
3
  // This file is auto-generated. Do not edit manually.
4
- export const VERSION = '0.14.0';
4
+ export const VERSION = '0.16.0';
5
5
  //# sourceMappingURL=version.js.map
@@ -1,7 +1,18 @@
1
1
  import type { MediaAsset } from './types/MediaTypes';
2
2
  export declare function pickMedia(): Promise<MediaAsset[]>;
3
+ export declare function pickImage(): Promise<MediaAsset[]>;
4
+ export declare function pickVideo(): Promise<MediaAsset[]>;
3
5
  export declare function openVideo(uri: string): Promise<void>;
4
6
  export declare function generateThumbnail(videoUrl: string): Promise<string | null>;
5
7
  export declare function deleteTempFile(uri: string): Promise<void>;
8
+ /**
9
+ * Android only. Converts a local file URI returned by the picker into a
10
+ * `content://` URI served by the Comnyx FileProvider, suitable for crossing
11
+ * process boundaries (e.g. sharing to another app, system ACTION_VIEW).
12
+ *
13
+ * On iOS, returns the input URI unchanged since iOS does not have the
14
+ * FileUriExposedException problem.
15
+ */
16
+ export declare function getShareableUri(fileUri: string): Promise<string>;
6
17
  export declare function cleanupTempFiles(): Promise<void>;
7
18
  //# sourceMappingURL=NativeComnyxMediaPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAwBvD;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtD"}
1
+ {"version":3,"file":"NativeComnyxMediaPicker.d.ts","sourceRoot":"","sources":["../../../src/NativeComnyxMediaPicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAwBrD,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAOvD;AAED,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAM1D;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAMxB;AAED,wBAAsB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAK/D;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQtE;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKtD"}
@@ -2,6 +2,6 @@ import type { ConversationResponse } from '../types/Conversation';
2
2
  import type { ApiOptions } from '../types/ApiOptions';
3
3
  export declare function getCustomerConversation(externalId: string, created_at: Date | undefined, page: number, options: ApiOptions & {
4
4
  per_page?: number;
5
- }): Promise<ConversationResponse>;
6
- export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions): Promise<ConversationResponse>;
5
+ }, signal?: AbortSignal): Promise<ConversationResponse>;
6
+ export declare function getNewCustomerConversation(externalId: string, created_at: Date | undefined, options: ApiOptions, signal?: AbortSignal): Promise<ConversationResponse>;
7
7
  //# sourceMappingURL=conversations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC1C,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,oBAAoB,CAAC,CAa/B"}
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../../../src/api/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAU,EAChB,OAAO,EAAE,UAAU,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3C,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAiB/B;AAED,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,IAAI,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CAa/B"}
@@ -1,5 +1,5 @@
1
1
  import type { CreateCustomerRequest, Customer } from '../types/Customer';
2
- export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string): Promise<{
2
+ export declare function updateCustomer(customerData: CreateCustomerRequest, externalId?: string, signal?: AbortSignal): Promise<{
3
3
  customer: Customer;
4
4
  }>;
5
5
  //# sourceMappingURL=customers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC,CASjC"}
1
+ {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../../../src/api/customers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIzE,wBAAgB,cAAc,CAC5B,YAAY,EAAE,qBAAqB,EACnC,UAAU,CAAC,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC,CAUjC"}
@@ -1,7 +1,7 @@
1
1
  import type { UploadUrlResponse } from '../types/MediaTypes';
2
2
  import type { MessageResponse } from '../types/MessageResponse';
3
3
  import type { ApiOptions } from '../types/ApiOptions';
4
- export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions): Promise<UploadUrlResponse>;
5
- export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions): Promise<void>;
6
- export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions): Promise<MessageResponse>;
4
+ export declare function getUploadUrl(fileName: string, contentType: string, options: ApiOptions, signal?: AbortSignal): Promise<UploadUrlResponse>;
5
+ export declare function uploadFileToS3(uploadUrl: string, fileUri: string, contentType: string, onProgress?: (percentage: number) => void, options?: ApiOptions, signal?: AbortSignal): Promise<void>;
6
+ export declare function sendMediaMessage(externalId: string, fileUrls: string[], mediaType: 'image' | 'video', content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
7
7
  //# sourceMappingURL=media.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,iBAAiB,CAAC,CAU5B;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,CAAC,EAAE,UAAU,GACnB,OAAO,CAAC,IAAI,CAAC,CAqDf;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,EAAE,OAAO,GAAG,OAAO,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,eAAe,CAAC,CAqB1B"}
1
+ {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/api/media.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAYtD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,iBAAiB,CAAC,CAc5B;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,EACzC,OAAO,CAAC,EAAE,UAAU,EACpB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,IAAI,CAAC,CA+Df;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAAE,EAClB,SAAS,EAAE,OAAO,GAAG,OAAO,EAC5B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAsB1B"}
@@ -1,4 +1,4 @@
1
1
  import type { MessageResponse } from '../types/MessageResponse';
2
2
  import type { ApiOptions } from '../types/ApiOptions';
3
- export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions): Promise<MessageResponse>;
3
+ export declare function sendCustomerMessage(externalId: string, content: string, options: ApiOptions, signal?: AbortSignal): Promise<MessageResponse>;
4
4
  //# sourceMappingURL=messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,eAAe,CAAC,CAuB1B"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../../src/api/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,UAAU,EACnB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,eAAe,CAAC,CAwB1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAsKA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CAskBA"}
1
+ {"version":3,"file":"ChatList.d.ts","sourceRoot":"","sources":["../../../../src/components/ChatList.tsx"],"names":[],"mappings":"AAgLA,wBAAgB,QAAQ,CAAC,EACvB,WAAW,EACX,MAAM,GACP,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,2CA0nBA"}
@@ -0,0 +1,18 @@
1
+ import { Component, type ReactNode, type ErrorInfo } from 'react';
2
+ interface Props {
3
+ children: ReactNode;
4
+ onBack?: () => void;
5
+ fallback?: (reset: () => void) => ReactNode;
6
+ }
7
+ interface State {
8
+ hasError: boolean;
9
+ }
10
+ export declare class ComnyxErrorBoundary extends Component<Props, State> {
11
+ state: State;
12
+ static getDerivedStateFromError(): State;
13
+ componentDidCatch(error: Error, info: ErrorInfo): void;
14
+ reset: () => void;
15
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode>> | import("react/jsx-runtime").JSX.Element;
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=ComnyxErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComnyxErrorBoundary.d.ts","sourceRoot":"","sources":["../../../../src/components/ComnyxErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAMlE,UAAU,KAAK;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CAC7C;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IAC9D,KAAK,EAAE,KAAK,CAAuB;IAEnC,MAAM,CAAC,wBAAwB,IAAI,KAAK;IAIxC,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS;IAI/C,KAAK,aAEH;IAEF,MAAM;CA2BP"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAsFpE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CA2KA"}
1
+ {"version":3,"file":"MediaMessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaMessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AA6FpE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CA2KA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaPickerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaPickerButton.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAItD,wBAAgB,iBAAiB,CAAC,EAChC,eAAe,GAChB,EAAE;IACD,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CACjD,2CAoBA"}
1
+ {"version":3,"file":"MediaPickerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaPickerButton.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAUtD,wBAAgB,iBAAiB,CAAC,EAChC,eAAe,GAChB,EAAE;IACD,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;CACjD,2CAmKA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaViewerModal.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaViewerModal.tsx"],"names":[],"mappings":"AAcA,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,2CAmEA"}
1
+ {"version":3,"file":"MediaViewerModal.d.ts","sourceRoot":"","sources":["../../../../src/components/MediaViewerModal.tsx"],"names":[],"mappings":"AAcA,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,OAAO,EACP,QAAQ,EACR,SAAS,EACT,YAAY,GACb,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,2CA0EA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AAuBA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,2CAyWA"}
1
+ {"version":3,"file":"MessageInput.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageInput.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,YAAY,CAAC,EAC3B,cAAc,GACf,EAAE;IACD,cAAc,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,2CAmbA"}
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAyBpE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CASA"}
1
+ {"version":3,"file":"MessageItem.d.ts","sourceRoot":"","sources":["../../../../src/components/MessageItem.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAiBpE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,sBAAsB,CAAC;IAC7B,WAAW,EAAE,MAAM,IAAI,CAAC;CACzB,2CASA"}
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,CAyuD1D,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../../src/constants/translations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,YAAY,EAAE,gBAAgB,CA4sD1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,SAuCzB"}
1
+ {"version":3,"file":"usePolling.d.ts","sourceRoot":"","sources":["../../../../src/hooks/usePolling.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,SAiDzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9D,wBAAgB,cAAc,IAAI,WAAW,CAE5C"}
1
+ {"version":3,"file":"useThemeColors.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useThemeColors.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGzE,wBAAgB,cAAc,IAAI,WAAW,CAS5C"}
@@ -4,6 +4,8 @@ export { Comnyx } from './register';
4
4
  export { ComnyxSupport } from './support';
5
5
  export { ComnyxNotifications } from './notifications';
6
6
  export { NotificationPermissionStatus } from './NativeComnyx';
7
+ export type { ThemeColors, ThemeColorsOverride, ThemeOverrideConfig, } from './types/Theme';
8
+ export type { SupportConfig, SupportHeaderRenderProps, SupportErrorRenderProps, SupportMessageRenderProps, SupportSendPayload, } from './support';
7
9
  export { registerOneSignalForComnyx } from './register/collectData';
8
10
  export { useIsComnyxRegistered } from './hooks/useIsComnyxRegistered';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,YAAY,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;AAwFD,wBAAsB,uBAAuB,CAC3C,MAAM,GAAE,6BAAkC,oBAqF3C"}
1
+ {"version":3,"file":"initializeNotifications.d.ts","sourceRoot":"","sources":["../../../../src/notifications/initializeNotifications.ts"],"names":[],"mappings":"AAyBA,MAAM,WAAW,6BAA6B;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACrE;AAyFD,wBAAsB,uBAAuB,CAC3C,MAAM,GAAE,6BAAkC,oBAsF3C"}
@@ -1 +1 @@
1
- {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI/D,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAwD;IAC7E,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAsCtD,KAAK;IAeX,QAAQ;IAiBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
1
+ {"version":3,"file":"Accumulator.d.ts","sourceRoot":"","sources":["../../../../src/register/Accumulator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,mBAAmB,CAAC;AAIhF,qBAAa,WAAW;IACtB,OAAO,CAAC,YAAY,CAAsC;IAC1D,OAAO,CAAC,aAAa,CAAwD;IAC7E,OAAO,CAAC,QAAQ,CACT;IACP,OAAO,CAAC,qBAAqB,CAAkB;;IAG/C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC;IASjE,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IA4CtD,KAAK;IAwBX,QAAQ;IAmBR,KAAK;IAML,KAAK;IAQL,KAAK;IAIL,GAAG;IAIH,oBAAoB;CAGrB;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
@@ -1,3 +1,6 @@
1
- export declare function collectData<T>(key: string | Record<string, any>, value?: T): void;
1
+ import type { CustomParameter } from '../types/Customer';
2
+ import { accumulator } from './Accumulator';
3
+ export declare function collectData(key: string, value: CustomParameter['value']): void;
4
+ export declare function collectData(data: Partial<Parameters<typeof accumulator.add>[0]>): void;
2
5
  export declare function registerOneSignalForComnyx(external_id: string): void;
3
6
  //# sourceMappingURL=collectData.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,QAa1E;AAGD,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,QAQ7D"}
1
+ {"version":3,"file":"collectData.d.ts","sourceRoot":"","sources":["../../../../src/register/collectData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AAChF,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GACnD,IAAI,CAAC;AAoBR,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,QAQ7D"}
@@ -3,6 +3,8 @@ import type { AppConversationMessage } from '../types/Conversation';
3
3
  import type { LanguageCode } from '../types/Language';
4
4
  import type { Customer } from '../types/Customer';
5
5
  import type { LocalizationKeys } from '../types/LocalizationKeys';
6
+ import type { GlobalTheme } from '../types/GlobalTheme';
7
+ import type { ThemeOverrideConfig } from '../types/Theme';
6
8
  interface AppStoreState {
7
9
  baseHeight: number;
8
10
  baseWidth: number;
@@ -11,7 +13,8 @@ interface AppStoreState {
11
13
  language: LanguageCode;
12
14
  theme: 'light' | 'dark';
13
15
  fake: boolean;
14
- themes: any;
16
+ themes: GlobalTheme;
17
+ themeOverride: ThemeOverrideConfig;
15
18
  firstMessage: AppConversationMessage | null;
16
19
  setData: (cb: (prevData: AppConversationMessage[] | null) => AppConversationMessage[] | null) => void;
17
20
  setFirstMessage: (message: AppConversationMessage | null) => void;
@@ -19,7 +22,8 @@ interface AppStoreState {
19
22
  setLanguage: (language: LanguageCode) => void;
20
23
  setTheme: (theme: 'light' | 'dark') => void;
21
24
  setFake: (fake: boolean) => void;
22
- setThemes: (themes: any) => void;
25
+ setThemes: (themes: GlobalTheme) => void;
26
+ setThemeOverride: (themeOverride: ThemeOverrideConfig) => void;
23
27
  updateBaseDimensions: (config: {
24
28
  baseHeight: number;
25
29
  baseWidth: number;
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../src/store/store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGlE,UAAU,aAAa;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,sB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AW;;;;;;;;;;EAYvB,CAAC"}
@@ -1,14 +1,68 @@
1
1
  import { type ViewStyle, type StyleProp } from 'react-native';
2
2
  import type { LanguageCode } from '../types/Language';
3
+ import type { GlobalTheme } from '../types/GlobalTheme';
4
+ import type { ThemeOverrideConfig } from '../types/Theme';
5
+ import { type SupportConfig } from './SupportConfigContext';
3
6
  interface SupportComnyxProps {
7
+ /** Language code used for localised UI strings. Defaults to `'en'`. */
4
8
  language?: LanguageCode;
9
+ /** Colour palette mode. Defaults to `'dark'`. */
5
10
  theme?: 'light' | 'dark';
11
+ /** Render the chat in fake/demo mode (no network). */
6
12
  fake?: boolean;
13
+ /** Called when the user taps the close button. */
7
14
  onBack: () => void;
8
- themes?: any;
15
+ /**
16
+ * Font-family provider. Shape: `{ family: (languageCode) => FamilyWeight }`.
17
+ * Not related to colour theming — use `themeOverride` for colours.
18
+ */
19
+ themes?: GlobalTheme;
20
+ /**
21
+ * Partial override for the built-in colour palette. Only the tokens you
22
+ * specify are replaced; the rest fall back to the default light/dark theme.
23
+ *
24
+ * @example
25
+ * <ComnyxSupport
26
+ * themeOverride={{
27
+ * light: { primary: '#FF6B6B', link: '#FF9999' },
28
+ * dark: { primary: '#FF9999' },
29
+ * }}
30
+ * />
31
+ */
32
+ themeOverride?: ThemeOverrideConfig;
33
+ /**
34
+ * @deprecated No longer consumed. Kept for backward compatibility and will
35
+ * be removed in a future major release.
36
+ */
9
37
  rtlFix?: boolean;
38
+ /** Additional style merged onto the root container. */
10
39
  containerStyle?: StyleProp<ViewStyle>;
40
+ /**
41
+ * Replace the built-in header. Receives `{ onBack }`. Return `null` to hide
42
+ * the header entirely.
43
+ */
44
+ renderHeader?: SupportConfig['renderHeader'];
45
+ /** Replace the built-in empty-state card shown when there are no messages. */
46
+ renderEmptyState?: SupportConfig['renderEmptyState'];
47
+ /**
48
+ * Replace the built-in init-failed screen. Receives `{ retry }` to trigger a
49
+ * first-page refetch.
50
+ */
51
+ renderErrorState?: SupportConfig['renderErrorState'];
52
+ /**
53
+ * Wrap or replace individual message bubbles. Receives
54
+ * `{ message, defaultNode }` — return `defaultNode` as-is for no change,
55
+ * wrap it for decorations (reactions, swipe actions), or render a fully
56
+ * custom bubble.
57
+ */
58
+ renderMessage?: SupportConfig['renderMessage'];
59
+ /**
60
+ * Called immediately before a message is dispatched. Throw or reject to
61
+ * cancel the send — the user's input and any pending media are preserved.
62
+ * Use for analytics, rate limiting, moderation or injecting extra context.
63
+ */
64
+ onBeforeSend?: SupportConfig['onBeforeSend'];
11
65
  }
12
- export declare function ComnyxSupport({ language, theme, fake, onBack, themes, containerStyle, }: SupportComnyxProps): import("react/jsx-runtime").JSX.Element;
66
+ export declare function ComnyxSupport(props: SupportComnyxProps): import("react/jsx-runtime").JSX.Element;
13
67
  export {};
14
68
  //# sourceMappingURL=ComnyxSupport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ComnyxSupport.d.ts","sourceRoot":"","sources":["../../../../src/support/ComnyxSupport.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAUtD,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAe,EACf,KAAc,EACd,IAAY,EACZ,MAAM,EACN,MAAM,EACN,cAAc,GACf,EAAE,kBAAkB,2CAiFpB"}
1
+ {"version":3,"file":"ComnyxSupport.d.ts","sourceRoot":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