@parlr/react-native 0.1.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 (223) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +918 -0
  3. package/lib/commonjs/components/AttachmentPicker.js +292 -0
  4. package/lib/commonjs/components/AttachmentPicker.js.map +1 -0
  5. package/lib/commonjs/components/AttachmentPreview.js +200 -0
  6. package/lib/commonjs/components/AttachmentPreview.js.map +1 -0
  7. package/lib/commonjs/components/ChatBubble.js +391 -0
  8. package/lib/commonjs/components/ChatBubble.js.map +1 -0
  9. package/lib/commonjs/components/EmptyState.js +115 -0
  10. package/lib/commonjs/components/EmptyState.js.map +1 -0
  11. package/lib/commonjs/components/ParlrChat.js +745 -0
  12. package/lib/commonjs/components/ParlrChat.js.map +1 -0
  13. package/lib/commonjs/components/ParlrConversationList.js +509 -0
  14. package/lib/commonjs/components/ParlrConversationList.js.map +1 -0
  15. package/lib/commonjs/components/PreChatForm.js +263 -0
  16. package/lib/commonjs/components/PreChatForm.js.map +1 -0
  17. package/lib/commonjs/components/RichMessage.js +284 -0
  18. package/lib/commonjs/components/RichMessage.js.map +1 -0
  19. package/lib/commonjs/components/SatisfactionSurvey.js +292 -0
  20. package/lib/commonjs/components/SatisfactionSurvey.js.map +1 -0
  21. package/lib/commonjs/components/TypingIndicator.js +86 -0
  22. package/lib/commonjs/components/TypingIndicator.js.map +1 -0
  23. package/lib/commonjs/core/api.js +310 -0
  24. package/lib/commonjs/core/api.js.map +1 -0
  25. package/lib/commonjs/core/config.js +40 -0
  26. package/lib/commonjs/core/config.js.map +1 -0
  27. package/lib/commonjs/core/errors.js +73 -0
  28. package/lib/commonjs/core/errors.js.map +1 -0
  29. package/lib/commonjs/core/offlineQueue.js +89 -0
  30. package/lib/commonjs/core/offlineQueue.js.map +1 -0
  31. package/lib/commonjs/core/pushNotifications.js +21 -0
  32. package/lib/commonjs/core/pushNotifications.js.map +1 -0
  33. package/lib/commonjs/core/session.js +130 -0
  34. package/lib/commonjs/core/session.js.map +1 -0
  35. package/lib/commonjs/core/theme.js +110 -0
  36. package/lib/commonjs/core/theme.js.map +1 -0
  37. package/lib/commonjs/core/types.js +6 -0
  38. package/lib/commonjs/core/types.js.map +1 -0
  39. package/lib/commonjs/core/websocket.js +245 -0
  40. package/lib/commonjs/core/websocket.js.map +1 -0
  41. package/lib/commonjs/hooks/useChat.js +462 -0
  42. package/lib/commonjs/hooks/useChat.js.map +1 -0
  43. package/lib/commonjs/hooks/useParlr.js +44 -0
  44. package/lib/commonjs/hooks/useParlr.js.map +1 -0
  45. package/lib/commonjs/index.js +185 -0
  46. package/lib/commonjs/index.js.map +1 -0
  47. package/lib/commonjs/package.json +1 -0
  48. package/lib/commonjs/provider/ParlrContext.js +38 -0
  49. package/lib/commonjs/provider/ParlrContext.js.map +1 -0
  50. package/lib/commonjs/provider/ParlrProvider.js +256 -0
  51. package/lib/commonjs/provider/ParlrProvider.js.map +1 -0
  52. package/lib/module/components/AttachmentPicker.js +287 -0
  53. package/lib/module/components/AttachmentPicker.js.map +1 -0
  54. package/lib/module/components/AttachmentPreview.js +195 -0
  55. package/lib/module/components/AttachmentPreview.js.map +1 -0
  56. package/lib/module/components/ChatBubble.js +386 -0
  57. package/lib/module/components/ChatBubble.js.map +1 -0
  58. package/lib/module/components/EmptyState.js +110 -0
  59. package/lib/module/components/EmptyState.js.map +1 -0
  60. package/lib/module/components/ParlrChat.js +740 -0
  61. package/lib/module/components/ParlrChat.js.map +1 -0
  62. package/lib/module/components/ParlrConversationList.js +504 -0
  63. package/lib/module/components/ParlrConversationList.js.map +1 -0
  64. package/lib/module/components/PreChatForm.js +258 -0
  65. package/lib/module/components/PreChatForm.js.map +1 -0
  66. package/lib/module/components/RichMessage.js +280 -0
  67. package/lib/module/components/RichMessage.js.map +1 -0
  68. package/lib/module/components/SatisfactionSurvey.js +287 -0
  69. package/lib/module/components/SatisfactionSurvey.js.map +1 -0
  70. package/lib/module/components/TypingIndicator.js +81 -0
  71. package/lib/module/components/TypingIndicator.js.map +1 -0
  72. package/lib/module/core/api.js +305 -0
  73. package/lib/module/core/api.js.map +1 -0
  74. package/lib/module/core/config.js +36 -0
  75. package/lib/module/core/config.js.map +1 -0
  76. package/lib/module/core/errors.js +64 -0
  77. package/lib/module/core/errors.js.map +1 -0
  78. package/lib/module/core/offlineQueue.js +82 -0
  79. package/lib/module/core/offlineQueue.js.map +1 -0
  80. package/lib/module/core/pushNotifications.js +16 -0
  81. package/lib/module/core/pushNotifications.js.map +1 -0
  82. package/lib/module/core/session.js +122 -0
  83. package/lib/module/core/session.js.map +1 -0
  84. package/lib/module/core/theme.js +105 -0
  85. package/lib/module/core/theme.js.map +1 -0
  86. package/lib/module/core/types.js +4 -0
  87. package/lib/module/core/types.js.map +1 -0
  88. package/lib/module/core/websocket.js +241 -0
  89. package/lib/module/core/websocket.js.map +1 -0
  90. package/lib/module/hooks/useChat.js +458 -0
  91. package/lib/module/hooks/useChat.js.map +1 -0
  92. package/lib/module/hooks/useParlr.js +40 -0
  93. package/lib/module/hooks/useParlr.js.map +1 -0
  94. package/lib/module/index.js +58 -0
  95. package/lib/module/index.js.map +1 -0
  96. package/lib/module/package.json +1 -0
  97. package/lib/module/provider/ParlrContext.js +35 -0
  98. package/lib/module/provider/ParlrContext.js.map +1 -0
  99. package/lib/module/provider/ParlrProvider.js +251 -0
  100. package/lib/module/provider/ParlrProvider.js.map +1 -0
  101. package/lib/typescript/commonjs/components/AttachmentPicker.d.ts +23 -0
  102. package/lib/typescript/commonjs/components/AttachmentPicker.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/components/AttachmentPreview.d.ts +16 -0
  104. package/lib/typescript/commonjs/components/AttachmentPreview.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/components/ChatBubble.d.ts +14 -0
  106. package/lib/typescript/commonjs/components/ChatBubble.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/components/EmptyState.d.ts +10 -0
  108. package/lib/typescript/commonjs/components/EmptyState.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/components/ParlrChat.d.ts +34 -0
  110. package/lib/typescript/commonjs/components/ParlrChat.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/components/ParlrConversationList.d.ts +17 -0
  112. package/lib/typescript/commonjs/components/ParlrConversationList.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/components/PreChatForm.d.ts +20 -0
  114. package/lib/typescript/commonjs/components/PreChatForm.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/components/RichMessage.d.ts +41 -0
  116. package/lib/typescript/commonjs/components/RichMessage.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/components/SatisfactionSurvey.d.ts +17 -0
  118. package/lib/typescript/commonjs/components/SatisfactionSurvey.d.ts.map +1 -0
  119. package/lib/typescript/commonjs/components/TypingIndicator.d.ts +7 -0
  120. package/lib/typescript/commonjs/components/TypingIndicator.d.ts.map +1 -0
  121. package/lib/typescript/commonjs/core/api.d.ts +37 -0
  122. package/lib/typescript/commonjs/core/api.d.ts.map +1 -0
  123. package/lib/typescript/commonjs/core/config.d.ts +9 -0
  124. package/lib/typescript/commonjs/core/config.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/core/errors.d.ts +35 -0
  126. package/lib/typescript/commonjs/core/errors.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/core/offlineQueue.d.ts +16 -0
  128. package/lib/typescript/commonjs/core/offlineQueue.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/core/pushNotifications.d.ts +6 -0
  130. package/lib/typescript/commonjs/core/pushNotifications.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/core/session.d.ts +15 -0
  132. package/lib/typescript/commonjs/core/session.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/core/theme.d.ts +43 -0
  134. package/lib/typescript/commonjs/core/theme.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/core/types.d.ts +185 -0
  136. package/lib/typescript/commonjs/core/types.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/core/websocket.d.ts +17 -0
  138. package/lib/typescript/commonjs/core/websocket.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/hooks/useChat.d.ts +35 -0
  140. package/lib/typescript/commonjs/hooks/useChat.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/hooks/useParlr.d.ts +11 -0
  142. package/lib/typescript/commonjs/hooks/useParlr.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/index.d.ts +30 -0
  144. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  145. package/lib/typescript/commonjs/package.json +1 -0
  146. package/lib/typescript/commonjs/provider/ParlrContext.d.ts +13 -0
  147. package/lib/typescript/commonjs/provider/ParlrContext.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/provider/ParlrProvider.d.ts +5 -0
  149. package/lib/typescript/commonjs/provider/ParlrProvider.d.ts.map +1 -0
  150. package/lib/typescript/module/components/AttachmentPicker.d.ts +23 -0
  151. package/lib/typescript/module/components/AttachmentPicker.d.ts.map +1 -0
  152. package/lib/typescript/module/components/AttachmentPreview.d.ts +16 -0
  153. package/lib/typescript/module/components/AttachmentPreview.d.ts.map +1 -0
  154. package/lib/typescript/module/components/ChatBubble.d.ts +14 -0
  155. package/lib/typescript/module/components/ChatBubble.d.ts.map +1 -0
  156. package/lib/typescript/module/components/EmptyState.d.ts +10 -0
  157. package/lib/typescript/module/components/EmptyState.d.ts.map +1 -0
  158. package/lib/typescript/module/components/ParlrChat.d.ts +34 -0
  159. package/lib/typescript/module/components/ParlrChat.d.ts.map +1 -0
  160. package/lib/typescript/module/components/ParlrConversationList.d.ts +17 -0
  161. package/lib/typescript/module/components/ParlrConversationList.d.ts.map +1 -0
  162. package/lib/typescript/module/components/PreChatForm.d.ts +20 -0
  163. package/lib/typescript/module/components/PreChatForm.d.ts.map +1 -0
  164. package/lib/typescript/module/components/RichMessage.d.ts +41 -0
  165. package/lib/typescript/module/components/RichMessage.d.ts.map +1 -0
  166. package/lib/typescript/module/components/SatisfactionSurvey.d.ts +17 -0
  167. package/lib/typescript/module/components/SatisfactionSurvey.d.ts.map +1 -0
  168. package/lib/typescript/module/components/TypingIndicator.d.ts +7 -0
  169. package/lib/typescript/module/components/TypingIndicator.d.ts.map +1 -0
  170. package/lib/typescript/module/core/api.d.ts +37 -0
  171. package/lib/typescript/module/core/api.d.ts.map +1 -0
  172. package/lib/typescript/module/core/config.d.ts +9 -0
  173. package/lib/typescript/module/core/config.d.ts.map +1 -0
  174. package/lib/typescript/module/core/errors.d.ts +35 -0
  175. package/lib/typescript/module/core/errors.d.ts.map +1 -0
  176. package/lib/typescript/module/core/offlineQueue.d.ts +16 -0
  177. package/lib/typescript/module/core/offlineQueue.d.ts.map +1 -0
  178. package/lib/typescript/module/core/pushNotifications.d.ts +6 -0
  179. package/lib/typescript/module/core/pushNotifications.d.ts.map +1 -0
  180. package/lib/typescript/module/core/session.d.ts +15 -0
  181. package/lib/typescript/module/core/session.d.ts.map +1 -0
  182. package/lib/typescript/module/core/theme.d.ts +43 -0
  183. package/lib/typescript/module/core/theme.d.ts.map +1 -0
  184. package/lib/typescript/module/core/types.d.ts +185 -0
  185. package/lib/typescript/module/core/types.d.ts.map +1 -0
  186. package/lib/typescript/module/core/websocket.d.ts +17 -0
  187. package/lib/typescript/module/core/websocket.d.ts.map +1 -0
  188. package/lib/typescript/module/hooks/useChat.d.ts +35 -0
  189. package/lib/typescript/module/hooks/useChat.d.ts.map +1 -0
  190. package/lib/typescript/module/hooks/useParlr.d.ts +11 -0
  191. package/lib/typescript/module/hooks/useParlr.d.ts.map +1 -0
  192. package/lib/typescript/module/index.d.ts +30 -0
  193. package/lib/typescript/module/index.d.ts.map +1 -0
  194. package/lib/typescript/module/package.json +1 -0
  195. package/lib/typescript/module/provider/ParlrContext.d.ts +13 -0
  196. package/lib/typescript/module/provider/ParlrContext.d.ts.map +1 -0
  197. package/lib/typescript/module/provider/ParlrProvider.d.ts +5 -0
  198. package/lib/typescript/module/provider/ParlrProvider.d.ts.map +1 -0
  199. package/package.json +120 -0
  200. package/src/components/AttachmentPicker.tsx +310 -0
  201. package/src/components/AttachmentPreview.tsx +209 -0
  202. package/src/components/ChatBubble.tsx +424 -0
  203. package/src/components/EmptyState.tsx +118 -0
  204. package/src/components/ParlrChat.tsx +863 -0
  205. package/src/components/ParlrConversationList.tsx +559 -0
  206. package/src/components/PreChatForm.tsx +313 -0
  207. package/src/components/RichMessage.tsx +353 -0
  208. package/src/components/SatisfactionSurvey.tsx +333 -0
  209. package/src/components/TypingIndicator.tsx +89 -0
  210. package/src/core/api.ts +406 -0
  211. package/src/core/config.ts +39 -0
  212. package/src/core/errors.ts +68 -0
  213. package/src/core/offlineQueue.ts +94 -0
  214. package/src/core/pushNotifications.ts +22 -0
  215. package/src/core/session.ts +156 -0
  216. package/src/core/theme.ts +133 -0
  217. package/src/core/types.ts +237 -0
  218. package/src/core/websocket.ts +270 -0
  219. package/src/hooks/useChat.ts +534 -0
  220. package/src/hooks/useParlr.ts +43 -0
  221. package/src/index.ts +98 -0
  222. package/src/provider/ParlrContext.ts +40 -0
  223. package/src/provider/ParlrProvider.tsx +338 -0
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "AttachmentPicker", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _AttachmentPicker.AttachmentPicker;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AttachmentPreview", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _AttachmentPreview.AttachmentPreview;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "ChatBubble", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _ChatBubble.ChatBubble;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "EmptyState", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _EmptyState.EmptyState;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "ParlrAuthError", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _errors.ParlrAuthError;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "ParlrChat", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _ParlrChat.ParlrChat;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "ParlrConnectionError", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _errors.ParlrConnectionError;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "ParlrConversationList", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _ParlrConversationList.ParlrConversationList;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "ParlrError", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _errors.ParlrError;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "ParlrNetworkError", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _errors.ParlrNetworkError;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "ParlrProvider", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _ParlrProvider.ParlrProvider;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "ParlrValidationError", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _errors.ParlrValidationError;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "PreChatForm", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _PreChatForm.PreChatForm;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "RichMessage", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _RichMessage.RichMessage;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "SatisfactionSurvey", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _SatisfactionSurvey.SatisfactionSurvey;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "TypingIndicator", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _TypingIndicator.TypingIndicator;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "defaultDarkTheme", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _theme.defaultDarkTheme;
106
+ }
107
+ });
108
+ Object.defineProperty(exports, "defaultLightTheme", {
109
+ enumerable: true,
110
+ get: function () {
111
+ return _theme.defaultLightTheme;
112
+ }
113
+ });
114
+ Object.defineProperty(exports, "flushQueue", {
115
+ enumerable: true,
116
+ get: function () {
117
+ return _offlineQueue.flushQueue;
118
+ }
119
+ });
120
+ Object.defineProperty(exports, "getQueuedMessages", {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _offlineQueue.getQueuedMessages;
124
+ }
125
+ });
126
+ Object.defineProperty(exports, "mergeTheme", {
127
+ enumerable: true,
128
+ get: function () {
129
+ return _theme.mergeTheme;
130
+ }
131
+ });
132
+ Object.defineProperty(exports, "queueMessage", {
133
+ enumerable: true,
134
+ get: function () {
135
+ return _offlineQueue.queueMessage;
136
+ }
137
+ });
138
+ Object.defineProperty(exports, "registerPushToken", {
139
+ enumerable: true,
140
+ get: function () {
141
+ return _pushNotifications.registerPushToken;
142
+ }
143
+ });
144
+ Object.defineProperty(exports, "removeFromQueue", {
145
+ enumerable: true,
146
+ get: function () {
147
+ return _offlineQueue.removeFromQueue;
148
+ }
149
+ });
150
+ Object.defineProperty(exports, "unregisterPushToken", {
151
+ enumerable: true,
152
+ get: function () {
153
+ return _pushNotifications.unregisterPushToken;
154
+ }
155
+ });
156
+ Object.defineProperty(exports, "useChat", {
157
+ enumerable: true,
158
+ get: function () {
159
+ return _useChat.useChat;
160
+ }
161
+ });
162
+ Object.defineProperty(exports, "useParlr", {
163
+ enumerable: true,
164
+ get: function () {
165
+ return _useParlr.useParlr;
166
+ }
167
+ });
168
+ var _ParlrProvider = require("./provider/ParlrProvider.js");
169
+ var _ParlrChat = require("./components/ParlrChat.js");
170
+ var _ParlrConversationList = require("./components/ParlrConversationList.js");
171
+ var _ChatBubble = require("./components/ChatBubble.js");
172
+ var _TypingIndicator = require("./components/TypingIndicator.js");
173
+ var _EmptyState = require("./components/EmptyState.js");
174
+ var _PreChatForm = require("./components/PreChatForm.js");
175
+ var _SatisfactionSurvey = require("./components/SatisfactionSurvey.js");
176
+ var _AttachmentPicker = require("./components/AttachmentPicker.js");
177
+ var _AttachmentPreview = require("./components/AttachmentPreview.js");
178
+ var _RichMessage = require("./components/RichMessage.js");
179
+ var _useParlr = require("./hooks/useParlr.js");
180
+ var _useChat = require("./hooks/useChat.js");
181
+ var _errors = require("./core/errors.js");
182
+ var _offlineQueue = require("./core/offlineQueue.js");
183
+ var _pushNotifications = require("./core/pushNotifications.js");
184
+ var _theme = require("./core/theme.js");
185
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_ParlrProvider","require","_ParlrChat","_ParlrConversationList","_ChatBubble","_TypingIndicator","_EmptyState","_PreChatForm","_SatisfactionSurvey","_AttachmentPicker","_AttachmentPreview","_RichMessage","_useParlr","_useChat","_errors","_offlineQueue","_pushNotifications","_theme"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,gBAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AAGA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAGA,IAAAa,OAAA,GAAAb,OAAA;AA2BA,IAAAc,aAAA,GAAAd,OAAA;AASA,IAAAe,kBAAA,GAAAf,OAAA;AAGA,IAAAgB,MAAA,GAAAhB,OAAA","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ParlrContext = void 0;
7
+ var _react = require("react");
8
+ var _theme = require("../core/theme.js");
9
+ // ---------------------------------------------------------------------------
10
+ // Parlr React Native SDK - React Context
11
+ // ---------------------------------------------------------------------------
12
+
13
+ /**
14
+ * Public context consumed by hooks (`useParlr`, `useChat`).
15
+ * Includes both user-facing state and internal plumbing (api, ws).
16
+ */
17
+
18
+ const NOOP = async () => {};
19
+ const ParlrContext = exports.ParlrContext = /*#__PURE__*/(0, _react.createContext)({
20
+ config: {
21
+ workspaceId: '',
22
+ apiBaseUrl: '',
23
+ wsUrl: '',
24
+ locale: 'fr',
25
+ debug: false
26
+ },
27
+ session: null,
28
+ isReady: false,
29
+ isConnected: false,
30
+ conversations: [],
31
+ unreadCount: 0,
32
+ identify: NOOP,
33
+ refreshConversations: NOOP,
34
+ theme: _theme.defaultLightTheme,
35
+ api: null,
36
+ ws: null
37
+ });
38
+ //# sourceMappingURL=ParlrContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_theme","NOOP","ParlrContext","exports","createContext","config","workspaceId","apiBaseUrl","wsUrl","locale","debug","session","isReady","isConnected","conversations","unreadCount","identify","refreshConversations","theme","defaultLightTheme","api","ws"],"sourceRoot":"../../../src","sources":["provider/ParlrContext.ts"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AANA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAMA,MAAME,IAAI,GAAG,MAAAA,CAAA,KAAY,CAAC,CAAC;AAEpB,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,gBAAG,IAAAE,oBAAa,EAAuB;EAC9DC,MAAM,EAAE;IACNC,WAAW,EAAE,EAAE;IACfC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,IAAI;IACZC,KAAK,EAAE;EACT,CAA0B;EAC1BC,OAAO,EAAE,IAAI;EACbC,OAAO,EAAE,KAAK;EACdC,WAAW,EAAE,KAAK;EAClBC,aAAa,EAAE,EAAE;EACjBC,WAAW,EAAE,CAAC;EACdC,QAAQ,EAAEf,IAAI;EACdgB,oBAAoB,EAAEhB,IAAI;EAC1BiB,KAAK,EAAEC,wBAAiB;EACxBC,GAAG,EAAE,IAAI;EACTC,EAAE,EAAE;AACN,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,256 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ParlrProvider = ParlrProvider;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _api = require("../core/api.js");
10
+ var _config = require("../core/config.js");
11
+ var _errors = require("../core/errors.js");
12
+ var _session = require("../core/session.js");
13
+ var _theme = require("../core/theme.js");
14
+ var _websocket = require("../core/websocket.js");
15
+ var _ParlrContext = require("./ParlrContext.js");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
+ // ---------------------------------------------------------------------------
19
+ // Parlr React Native SDK - Provider
20
+ // ---------------------------------------------------------------------------
21
+ //
22
+ // Initializes the session, REST client and WebSocket on mount, then provides
23
+ // them to the rest of the tree through React context.
24
+ // ---------------------------------------------------------------------------
25
+
26
+ // ---------------------------------------------------------------------------
27
+ // Props
28
+ // ---------------------------------------------------------------------------
29
+
30
+ // ---------------------------------------------------------------------------
31
+ // Debounce helper
32
+ // ---------------------------------------------------------------------------
33
+
34
+ function useDebouncedCallback(fn, delayMs) {
35
+ const timerRef = (0, _react.useRef)(null);
36
+ const fnRef = (0, _react.useRef)(fn);
37
+ fnRef.current = fn;
38
+ return (0, _react.useCallback)((...args) => {
39
+ if (timerRef.current) clearTimeout(timerRef.current);
40
+ timerRef.current = setTimeout(() => fnRef.current(...args), delayMs);
41
+ }, [delayMs]);
42
+ }
43
+
44
+ // ---------------------------------------------------------------------------
45
+ // Component
46
+ // ---------------------------------------------------------------------------
47
+
48
+ function ParlrProvider({
49
+ children,
50
+ ...configProps
51
+ }) {
52
+ // --- Resolved config (stable across renders unless props change) ----------
53
+ const config = (0, _react.useMemo)(() => (0, _config.resolveConfig)(configProps),
54
+ // eslint-disable-next-line react-hooks/exhaustive-deps
55
+ [configProps.workspaceId, configProps.apiBaseUrl, configProps.wsUrl, configProps.locale, configProps.debug, configProps.onError]);
56
+
57
+ // --- Resolve theme based on system color scheme + user overrides ----------
58
+ const colorScheme = (0, _reactNative.useColorScheme)();
59
+ const theme = (0, _react.useMemo)(() => {
60
+ const base = colorScheme === 'dark' ? _theme.defaultDarkTheme : _theme.defaultLightTheme;
61
+ return configProps.theme ? (0, _theme.mergeTheme)(base, configProps.theme) : base;
62
+ }, [colorScheme, configProps.theme]);
63
+
64
+ // --- State -----------------------------------------------------------------
65
+ const [session, setSession] = (0, _react.useState)(null);
66
+ const [isReady, setIsReady] = (0, _react.useState)(false);
67
+ const [isConnected, setIsConnected] = (0, _react.useState)(false);
68
+ const [conversations, setConversations] = (0, _react.useState)([]);
69
+
70
+ // --- Refs (singletons across the provider lifecycle) -----------------------
71
+ const sessionRef = (0, _react.useRef)(null);
72
+ const apiRef = (0, _react.useRef)(null);
73
+ const wsRef = (0, _react.useRef)(null);
74
+
75
+ // Keep ref in sync with state so the token accessor always returns latest.
76
+ sessionRef.current = session;
77
+
78
+ // --- Create API client (once per config) -----------------------------------
79
+ (0, _react.useEffect)(() => {
80
+ const api = (0, _api.createApiClient)(config, () => sessionRef.current?.token ?? null);
81
+ apiRef.current = api;
82
+ }, [config]);
83
+
84
+ // --- Fetch conversations (debounced) ---------------------------------------
85
+ const refreshConversationsImpl = (0, _react.useCallback)(async () => {
86
+ const api = apiRef.current;
87
+ /* istanbul ignore next -- defensive: apiRef always set by preceding effect */
88
+ if (!api || !sessionRef.current) return;
89
+ try {
90
+ const res = await api.listConversations();
91
+ setConversations(res.data);
92
+ } catch (err) {
93
+ if (config.debug) {
94
+ console.warn('[@parlr/react-native] Failed to refresh conversations:', err);
95
+ }
96
+ config.onError?.(err instanceof _errors.ParlrError ? err : new _errors.ParlrError(err instanceof Error ? err.message : String(err)));
97
+ }
98
+ }, [config]);
99
+ const refreshConversations = useDebouncedCallback(refreshConversationsImpl, 500);
100
+
101
+ // --- Create WS client (once per config) ------------------------------------
102
+ (0, _react.useEffect)(() => {
103
+ const ws = (0, _websocket.createWebSocket)(config);
104
+ wsRef.current = ws;
105
+ const offConnected = ws.on('auth_ok', () => setIsConnected(true));
106
+ const offAuthError = ws.on('auth_error', () => setIsConnected(false));
107
+ const offDisconnected = ws.on('disconnected', () => setIsConnected(false));
108
+
109
+ // When a new message arrives for any conversation, refresh list.
110
+ const offMessage = ws.on('new_message', () => {
111
+ refreshConversations();
112
+ });
113
+ const offConvUpdated = ws.on('conversation_updated', () => {
114
+ refreshConversations();
115
+ });
116
+ return () => {
117
+ offConnected();
118
+ offAuthError();
119
+ offDisconnected();
120
+ offMessage();
121
+ offConvUpdated();
122
+ ws.disconnect();
123
+ };
124
+ // eslint-disable-next-line react-hooks/exhaustive-deps
125
+ }, [config]);
126
+
127
+ // --- Bootstrap session on mount --------------------------------------------
128
+ (0, _react.useEffect)(() => {
129
+ let cancelled = false;
130
+ async function bootstrap() {
131
+ const api = apiRef.current;
132
+ if (!api) return;
133
+ try {
134
+ // 1. Try to restore a persisted session.
135
+ const existing = await (0, _session.loadSession)(config.workspaceId);
136
+ if (existing && (0, _session.isSessionValid)(existing)) {
137
+ if (!cancelled) {
138
+ setSession(existing);
139
+ sessionRef.current = existing;
140
+ }
141
+ } else {
142
+ // 2. Create a new session.
143
+ if (existing) {
144
+ await (0, _session.clearSession)(config.workspaceId);
145
+ }
146
+ const newSession = await api.createSession();
147
+ await (0, _session.saveSession)(config.workspaceId, newSession);
148
+ if (!cancelled) {
149
+ setSession(newSession);
150
+ sessionRef.current = newSession;
151
+ }
152
+ }
153
+ if (!cancelled) {
154
+ setIsReady(true);
155
+ }
156
+ } catch (err) {
157
+ console.error('[@parlr/react-native] Failed to bootstrap session:', err);
158
+ config.onError?.(err instanceof _errors.ParlrError ? err : new _errors.ParlrError(err instanceof Error ? err.message : String(err)));
159
+ if (!cancelled) {
160
+ setIsReady(true); // still "ready" so UI can render an error state
161
+ }
162
+ }
163
+ }
164
+ bootstrap();
165
+ return () => {
166
+ cancelled = true;
167
+ };
168
+ }, [config]);
169
+
170
+ // --- Connect WebSocket once session is available ---------------------------
171
+ (0, _react.useEffect)(() => {
172
+ if (session?.token && wsRef.current) {
173
+ wsRef.current.connect(session.token);
174
+ }
175
+ }, [session]);
176
+
177
+ // --- Auto-refresh session when expired -------------------------------------
178
+ (0, _react.useEffect)(() => {
179
+ if (!session || !apiRef.current) return;
180
+
181
+ // Check session validity periodically.
182
+ const interval = setInterval(async () => {
183
+ if (session && !(0, _session.isSessionValid)(session)) {
184
+ if (config.debug) {
185
+ console.log('[@parlr/react-native] Session expired, refreshing...');
186
+ }
187
+ try {
188
+ const api = apiRef.current;
189
+ /* istanbul ignore next -- defensive: apiRef always set by preceding effect */
190
+ if (!api) return;
191
+ const newSession = await api.createSession();
192
+ await (0, _session.saveSession)(config.workspaceId, newSession);
193
+ setSession(newSession);
194
+ sessionRef.current = newSession;
195
+ } catch (err) {
196
+ console.error('[@parlr/react-native] Failed to refresh session:', err);
197
+ config.onError?.(err instanceof _errors.ParlrError ? err : new _errors.ParlrError(err instanceof Error ? err.message : String(err)));
198
+ }
199
+ }
200
+ }, 60_000); // Check every minute.
201
+
202
+ return () => clearInterval(interval);
203
+ }, [session, config]);
204
+
205
+ // --- Fetch conversations once session is ready -----------------------------
206
+ (0, _react.useEffect)(() => {
207
+ if (isReady && session) {
208
+ refreshConversationsImpl();
209
+ }
210
+ }, [isReady, session, refreshConversationsImpl]);
211
+
212
+ // --- Poll conversations when WebSocket is not connected --------------------
213
+ // Without WS, the conversation list (unread counts, new conversations from
214
+ // agent replies) would never update. Poll every 10 s as a fallback.
215
+ (0, _react.useEffect)(() => {
216
+ if (!isReady || !session) return;
217
+ // Skip polling if WS is live — the new_message listener already refreshes.
218
+ if (isConnected) return;
219
+ const interval = setInterval(() => {
220
+ refreshConversationsImpl();
221
+ }, 10_000);
222
+ return () => clearInterval(interval);
223
+ }, [isReady, session, isConnected, refreshConversationsImpl]);
224
+
225
+ // --- Identify callback -----------------------------------------------------
226
+ const identify = (0, _react.useCallback)(async user => {
227
+ const api = apiRef.current;
228
+ if (!api) {
229
+ throw new Error('[@parlr/react-native] Cannot identify before SDK is initialised.');
230
+ }
231
+ await api.identify(user);
232
+ }, []);
233
+
234
+ // --- Unread count (derived) ------------------------------------------------
235
+ const unreadCount = (0, _react.useMemo)(() => conversations.reduce((sum, c) => sum + c.unreadCount, 0), [conversations]);
236
+
237
+ // --- Context value ---------------------------------------------------------
238
+ const value = (0, _react.useMemo)(() => ({
239
+ config,
240
+ session,
241
+ isReady,
242
+ isConnected,
243
+ conversations,
244
+ unreadCount,
245
+ identify,
246
+ refreshConversations: refreshConversationsImpl,
247
+ theme,
248
+ api: apiRef.current,
249
+ ws: wsRef.current
250
+ }), [config, session, isReady, isConnected, conversations, unreadCount, identify, refreshConversationsImpl, theme]);
251
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ParlrContext.ParlrContext.Provider, {
252
+ value: value,
253
+ children: children
254
+ });
255
+ }
256
+ //# sourceMappingURL=ParlrProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_api","_config","_errors","_session","_theme","_websocket","_ParlrContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","useDebouncedCallback","fn","delayMs","timerRef","useRef","fnRef","current","useCallback","args","clearTimeout","setTimeout","ParlrProvider","children","configProps","config","useMemo","resolveConfig","workspaceId","apiBaseUrl","wsUrl","locale","debug","onError","colorScheme","useColorScheme","theme","base","defaultDarkTheme","defaultLightTheme","mergeTheme","session","setSession","useState","isReady","setIsReady","isConnected","setIsConnected","conversations","setConversations","sessionRef","apiRef","wsRef","useEffect","api","createApiClient","token","refreshConversationsImpl","res","listConversations","data","err","console","warn","ParlrError","Error","message","String","refreshConversations","ws","createWebSocket","offConnected","on","offAuthError","offDisconnected","offMessage","offConvUpdated","disconnect","cancelled","bootstrap","existing","loadSession","isSessionValid","clearSession","newSession","createSession","saveSession","error","connect","interval","setInterval","log","clearInterval","identify","user","unreadCount","reduce","sum","c","value","jsx","ParlrContext","Provider"],"sourceRoot":"../../../src","sources":["provider/ParlrProvider.tsx"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,IAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAMA,IAAAM,MAAA,GAAAN,OAAA;AAYA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AAAyE,IAAAS,WAAA,GAAAT,OAAA;AAA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