@repzo/widget-react-native 1.0.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 (448) hide show
  1. package/README.md +482 -0
  2. package/lib/commonjs/agent-ui-blocks.js +159 -0
  3. package/lib/commonjs/agent-ui-blocks.js.map +1 -0
  4. package/lib/commonjs/api/client.js +267 -0
  5. package/lib/commonjs/api/client.js.map +1 -0
  6. package/lib/commonjs/api/realtime.js +193 -0
  7. package/lib/commonjs/api/realtime.js.map +1 -0
  8. package/lib/commonjs/api/sse-parser.js +58 -0
  9. package/lib/commonjs/api/sse-parser.js.map +1 -0
  10. package/lib/commonjs/controller.js +23 -0
  11. package/lib/commonjs/controller.js.map +1 -0
  12. package/lib/commonjs/device-id.js +75 -0
  13. package/lib/commonjs/device-id.js.map +1 -0
  14. package/lib/commonjs/events.js +49 -0
  15. package/lib/commonjs/events.js.map +1 -0
  16. package/lib/commonjs/i18n.js +106 -0
  17. package/lib/commonjs/i18n.js.map +1 -0
  18. package/lib/commonjs/index.js +98 -0
  19. package/lib/commonjs/index.js.map +1 -0
  20. package/lib/commonjs/locales.js +85 -0
  21. package/lib/commonjs/locales.js.map +1 -0
  22. package/lib/commonjs/package.json +1 -0
  23. package/lib/commonjs/push/push-notifications.js +208 -0
  24. package/lib/commonjs/push/push-notifications.js.map +1 -0
  25. package/lib/commonjs/state/use-widget-state.js +23 -0
  26. package/lib/commonjs/state/use-widget-state.js.map +1 -0
  27. package/lib/commonjs/state/widget-store.js +1682 -0
  28. package/lib/commonjs/state/widget-store.js.map +1 -0
  29. package/lib/commonjs/storage.js +147 -0
  30. package/lib/commonjs/storage.js.map +1 -0
  31. package/lib/commonjs/types.js +44 -0
  32. package/lib/commonjs/types.js.map +1 -0
  33. package/lib/commonjs/ui/WidgetProvider.js +404 -0
  34. package/lib/commonjs/ui/WidgetProvider.js.map +1 -0
  35. package/lib/commonjs/ui/components/AgentUiBlocks.js +864 -0
  36. package/lib/commonjs/ui/components/AgentUiBlocks.js.map +1 -0
  37. package/lib/commonjs/ui/components/Avatar.js +76 -0
  38. package/lib/commonjs/ui/components/Avatar.js.map +1 -0
  39. package/lib/commonjs/ui/components/ConversationRow.js +155 -0
  40. package/lib/commonjs/ui/components/ConversationRow.js.map +1 -0
  41. package/lib/commonjs/ui/components/ErrorBoundary.js +44 -0
  42. package/lib/commonjs/ui/components/ErrorBoundary.js.map +1 -0
  43. package/lib/commonjs/ui/components/Gradient.js +168 -0
  44. package/lib/commonjs/ui/components/Gradient.js.map +1 -0
  45. package/lib/commonjs/ui/components/Launcher.js +125 -0
  46. package/lib/commonjs/ui/components/Launcher.js.map +1 -0
  47. package/lib/commonjs/ui/components/Markdown.js +257 -0
  48. package/lib/commonjs/ui/components/Markdown.js.map +1 -0
  49. package/lib/commonjs/ui/components/OutboundMessageCard.js +157 -0
  50. package/lib/commonjs/ui/components/OutboundMessageCard.js.map +1 -0
  51. package/lib/commonjs/ui/components/WidgetPanel.js +131 -0
  52. package/lib/commonjs/ui/components/WidgetPanel.js.map +1 -0
  53. package/lib/commonjs/ui/components/icons.js +383 -0
  54. package/lib/commonjs/ui/components/icons.js.map +1 -0
  55. package/lib/commonjs/ui/hooks/use-keyboard-overlap.js +113 -0
  56. package/lib/commonjs/ui/hooks/use-keyboard-overlap.js.map +1 -0
  57. package/lib/commonjs/ui/hooks/use-reduce-motion.js +38 -0
  58. package/lib/commonjs/ui/hooks/use-reduce-motion.js.map +1 -0
  59. package/lib/commonjs/ui/hooks/use-widget-insets.js +41 -0
  60. package/lib/commonjs/ui/hooks/use-widget-insets.js.map +1 -0
  61. package/lib/commonjs/ui/screens/chat/ChatView.js +590 -0
  62. package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -0
  63. package/lib/commonjs/ui/screens/chat/ChatView.styles.js +362 -0
  64. package/lib/commonjs/ui/screens/chat/ChatView.styles.js.map +1 -0
  65. package/lib/commonjs/ui/screens/chat/ChatView.types.js +6 -0
  66. package/lib/commonjs/ui/screens/chat/ChatView.types.js.map +1 -0
  67. package/lib/commonjs/ui/screens/conversations/ConversationsList.js +150 -0
  68. package/lib/commonjs/ui/screens/conversations/ConversationsList.js.map +1 -0
  69. package/lib/commonjs/ui/screens/conversations/ConversationsList.styles.js +118 -0
  70. package/lib/commonjs/ui/screens/conversations/ConversationsList.styles.js.map +1 -0
  71. package/lib/commonjs/ui/screens/conversations/ConversationsList.types.js +6 -0
  72. package/lib/commonjs/ui/screens/conversations/ConversationsList.types.js.map +1 -0
  73. package/lib/commonjs/ui/screens/home/HomeView.js +336 -0
  74. package/lib/commonjs/ui/screens/home/HomeView.js.map +1 -0
  75. package/lib/commonjs/ui/screens/home/HomeView.styles.js +245 -0
  76. package/lib/commonjs/ui/screens/home/HomeView.styles.js.map +1 -0
  77. package/lib/commonjs/ui/screens/home/HomeView.types.js +6 -0
  78. package/lib/commonjs/ui/screens/home/HomeView.types.js.map +1 -0
  79. package/lib/commonjs/ui/screens/home/greeting.js +49 -0
  80. package/lib/commonjs/ui/screens/home/greeting.js.map +1 -0
  81. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.js +229 -0
  82. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.js.map +1 -0
  83. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.styles.js +125 -0
  84. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.styles.js.map +1 -0
  85. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.types.js +6 -0
  86. package/lib/commonjs/ui/screens/pre-chat/PreChatForm.types.js.map +1 -0
  87. package/lib/commonjs/ui/styles/global.js +55 -0
  88. package/lib/commonjs/ui/styles/global.js.map +1 -0
  89. package/lib/commonjs/ui/styles/theme.js +148 -0
  90. package/lib/commonjs/ui/styles/theme.js.map +1 -0
  91. package/lib/commonjs/ui/utils/conversations.js +125 -0
  92. package/lib/commonjs/ui/utils/conversations.js.map +1 -0
  93. package/lib/commonjs/ui/utils/html.js +44 -0
  94. package/lib/commonjs/ui/utils/html.js.map +1 -0
  95. package/lib/commonjs/ui/utils/native-gradient.js +65 -0
  96. package/lib/commonjs/ui/utils/native-gradient.js.map +1 -0
  97. package/lib/commonjs/ui/utils/rtl.js +56 -0
  98. package/lib/commonjs/ui/utils/rtl.js.map +1 -0
  99. package/lib/commonjs/ui/utils/safe-url.js +67 -0
  100. package/lib/commonjs/ui/utils/safe-url.js.map +1 -0
  101. package/lib/module/agent-ui-blocks.js +152 -0
  102. package/lib/module/agent-ui-blocks.js.map +1 -0
  103. package/lib/module/api/client.js +261 -0
  104. package/lib/module/api/client.js.map +1 -0
  105. package/lib/module/api/realtime.js +189 -0
  106. package/lib/module/api/realtime.js.map +1 -0
  107. package/lib/module/api/sse-parser.js +53 -0
  108. package/lib/module/api/sse-parser.js.map +1 -0
  109. package/lib/module/controller.js +19 -0
  110. package/lib/module/controller.js.map +1 -0
  111. package/lib/module/device-id.js +69 -0
  112. package/lib/module/device-id.js.map +1 -0
  113. package/lib/module/events.js +44 -0
  114. package/lib/module/events.js.map +1 -0
  115. package/lib/module/i18n.js +99 -0
  116. package/lib/module/i18n.js.map +1 -0
  117. package/lib/module/index.js +55 -0
  118. package/lib/module/index.js.map +1 -0
  119. package/lib/module/locales.js +80 -0
  120. package/lib/module/locales.js.map +1 -0
  121. package/lib/module/package.json +1 -0
  122. package/lib/module/push/push-notifications.js +204 -0
  123. package/lib/module/push/push-notifications.js.map +1 -0
  124. package/lib/module/state/use-widget-state.js +18 -0
  125. package/lib/module/state/use-widget-state.js.map +1 -0
  126. package/lib/module/state/widget-store.js +1677 -0
  127. package/lib/module/state/widget-store.js.map +1 -0
  128. package/lib/module/storage.js +141 -0
  129. package/lib/module/storage.js.map +1 -0
  130. package/lib/module/types.js +40 -0
  131. package/lib/module/types.js.map +1 -0
  132. package/lib/module/ui/WidgetProvider.js +400 -0
  133. package/lib/module/ui/WidgetProvider.js.map +1 -0
  134. package/lib/module/ui/components/AgentUiBlocks.js +857 -0
  135. package/lib/module/ui/components/AgentUiBlocks.js.map +1 -0
  136. package/lib/module/ui/components/Avatar.js +71 -0
  137. package/lib/module/ui/components/Avatar.js.map +1 -0
  138. package/lib/module/ui/components/ConversationRow.js +150 -0
  139. package/lib/module/ui/components/ConversationRow.js.map +1 -0
  140. package/lib/module/ui/components/ErrorBoundary.js +39 -0
  141. package/lib/module/ui/components/ErrorBoundary.js.map +1 -0
  142. package/lib/module/ui/components/Gradient.js +165 -0
  143. package/lib/module/ui/components/Gradient.js.map +1 -0
  144. package/lib/module/ui/components/Launcher.js +121 -0
  145. package/lib/module/ui/components/Launcher.js.map +1 -0
  146. package/lib/module/ui/components/Markdown.js +253 -0
  147. package/lib/module/ui/components/Markdown.js.map +1 -0
  148. package/lib/module/ui/components/OutboundMessageCard.js +153 -0
  149. package/lib/module/ui/components/OutboundMessageCard.js.map +1 -0
  150. package/lib/module/ui/components/WidgetPanel.js +127 -0
  151. package/lib/module/ui/components/WidgetPanel.js.map +1 -0
  152. package/lib/module/ui/components/icons.js +370 -0
  153. package/lib/module/ui/components/icons.js.map +1 -0
  154. package/lib/module/ui/hooks/use-keyboard-overlap.js +109 -0
  155. package/lib/module/ui/hooks/use-keyboard-overlap.js.map +1 -0
  156. package/lib/module/ui/hooks/use-reduce-motion.js +34 -0
  157. package/lib/module/ui/hooks/use-reduce-motion.js.map +1 -0
  158. package/lib/module/ui/hooks/use-widget-insets.js +37 -0
  159. package/lib/module/ui/hooks/use-widget-insets.js.map +1 -0
  160. package/lib/module/ui/screens/chat/ChatView.js +586 -0
  161. package/lib/module/ui/screens/chat/ChatView.js.map +1 -0
  162. package/lib/module/ui/screens/chat/ChatView.styles.js +358 -0
  163. package/lib/module/ui/screens/chat/ChatView.styles.js.map +1 -0
  164. package/lib/module/ui/screens/chat/ChatView.types.js +4 -0
  165. package/lib/module/ui/screens/chat/ChatView.types.js.map +1 -0
  166. package/lib/module/ui/screens/conversations/ConversationsList.js +146 -0
  167. package/lib/module/ui/screens/conversations/ConversationsList.js.map +1 -0
  168. package/lib/module/ui/screens/conversations/ConversationsList.styles.js +114 -0
  169. package/lib/module/ui/screens/conversations/ConversationsList.styles.js.map +1 -0
  170. package/lib/module/ui/screens/conversations/ConversationsList.types.js +4 -0
  171. package/lib/module/ui/screens/conversations/ConversationsList.types.js.map +1 -0
  172. package/lib/module/ui/screens/home/HomeView.js +332 -0
  173. package/lib/module/ui/screens/home/HomeView.js.map +1 -0
  174. package/lib/module/ui/screens/home/HomeView.styles.js +242 -0
  175. package/lib/module/ui/screens/home/HomeView.styles.js.map +1 -0
  176. package/lib/module/ui/screens/home/HomeView.types.js +4 -0
  177. package/lib/module/ui/screens/home/HomeView.types.js.map +1 -0
  178. package/lib/module/ui/screens/home/greeting.js +44 -0
  179. package/lib/module/ui/screens/home/greeting.js.map +1 -0
  180. package/lib/module/ui/screens/pre-chat/PreChatForm.js +225 -0
  181. package/lib/module/ui/screens/pre-chat/PreChatForm.js.map +1 -0
  182. package/lib/module/ui/screens/pre-chat/PreChatForm.styles.js +121 -0
  183. package/lib/module/ui/screens/pre-chat/PreChatForm.styles.js.map +1 -0
  184. package/lib/module/ui/screens/pre-chat/PreChatForm.types.js +4 -0
  185. package/lib/module/ui/screens/pre-chat/PreChatForm.types.js.map +1 -0
  186. package/lib/module/ui/styles/global.js +51 -0
  187. package/lib/module/ui/styles/global.js.map +1 -0
  188. package/lib/module/ui/styles/theme.js +137 -0
  189. package/lib/module/ui/styles/theme.js.map +1 -0
  190. package/lib/module/ui/utils/conversations.js +115 -0
  191. package/lib/module/ui/utils/conversations.js.map +1 -0
  192. package/lib/module/ui/utils/html.js +39 -0
  193. package/lib/module/ui/utils/html.js.map +1 -0
  194. package/lib/module/ui/utils/native-gradient.js +60 -0
  195. package/lib/module/ui/utils/native-gradient.js.map +1 -0
  196. package/lib/module/ui/utils/rtl.js +49 -0
  197. package/lib/module/ui/utils/rtl.js.map +1 -0
  198. package/lib/module/ui/utils/safe-url.js +59 -0
  199. package/lib/module/ui/utils/safe-url.js.map +1 -0
  200. package/lib/typescript/commonjs/agent-ui-blocks.d.ts +20 -0
  201. package/lib/typescript/commonjs/agent-ui-blocks.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/api/client.d.ts +115 -0
  203. package/lib/typescript/commonjs/api/client.d.ts.map +1 -0
  204. package/lib/typescript/commonjs/api/realtime.d.ts +39 -0
  205. package/lib/typescript/commonjs/api/realtime.d.ts.map +1 -0
  206. package/lib/typescript/commonjs/api/sse-parser.d.ts +13 -0
  207. package/lib/typescript/commonjs/api/sse-parser.d.ts.map +1 -0
  208. package/lib/typescript/commonjs/controller.d.ts +15 -0
  209. package/lib/typescript/commonjs/controller.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/device-id.d.ts +15 -0
  211. package/lib/typescript/commonjs/device-id.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/events.d.ts +41 -0
  213. package/lib/typescript/commonjs/events.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/i18n.d.ts +78 -0
  215. package/lib/typescript/commonjs/i18n.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/index.d.ts +103 -0
  217. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/locales.d.ts +18 -0
  219. package/lib/typescript/commonjs/locales.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/package.json +1 -0
  221. package/lib/typescript/commonjs/push/push-notifications.d.ts +71 -0
  222. package/lib/typescript/commonjs/push/push-notifications.d.ts.map +1 -0
  223. package/lib/typescript/commonjs/state/use-widget-state.d.ts +10 -0
  224. package/lib/typescript/commonjs/state/use-widget-state.d.ts.map +1 -0
  225. package/lib/typescript/commonjs/state/widget-store.d.ts +227 -0
  226. package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -0
  227. package/lib/typescript/commonjs/storage.d.ts +42 -0
  228. package/lib/typescript/commonjs/storage.d.ts.map +1 -0
  229. package/lib/typescript/commonjs/types.d.ts +391 -0
  230. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  231. package/lib/typescript/commonjs/ui/WidgetProvider.d.ts +15 -0
  232. package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -0
  233. package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts +27 -0
  234. package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts.map +1 -0
  235. package/lib/typescript/commonjs/ui/components/Avatar.d.ts +19 -0
  236. package/lib/typescript/commonjs/ui/components/Avatar.d.ts.map +1 -0
  237. package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts +26 -0
  238. package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts.map +1 -0
  239. package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts +27 -0
  240. package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +1 -0
  241. package/lib/typescript/commonjs/ui/components/Gradient.d.ts +33 -0
  242. package/lib/typescript/commonjs/ui/components/Gradient.d.ts.map +1 -0
  243. package/lib/typescript/commonjs/ui/components/Launcher.d.ts +18 -0
  244. package/lib/typescript/commonjs/ui/components/Launcher.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/ui/components/Markdown.d.ts +19 -0
  246. package/lib/typescript/commonjs/ui/components/Markdown.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/ui/components/OutboundMessageCard.d.ts +20 -0
  248. package/lib/typescript/commonjs/ui/components/OutboundMessageCard.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/ui/components/WidgetPanel.d.ts +26 -0
  250. package/lib/typescript/commonjs/ui/components/WidgetPanel.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/ui/components/icons.d.ts +38 -0
  252. package/lib/typescript/commonjs/ui/components/icons.d.ts.map +1 -0
  253. package/lib/typescript/commonjs/ui/hooks/use-keyboard-overlap.d.ts +33 -0
  254. package/lib/typescript/commonjs/ui/hooks/use-keyboard-overlap.d.ts.map +1 -0
  255. package/lib/typescript/commonjs/ui/hooks/use-reduce-motion.d.ts +11 -0
  256. package/lib/typescript/commonjs/ui/hooks/use-reduce-motion.d.ts.map +1 -0
  257. package/lib/typescript/commonjs/ui/hooks/use-widget-insets.d.ts +16 -0
  258. package/lib/typescript/commonjs/ui/hooks/use-widget-insets.d.ts.map +1 -0
  259. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts +11 -0
  260. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -0
  261. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts +349 -0
  262. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts.map +1 -0
  263. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +48 -0
  264. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -0
  265. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts +10 -0
  266. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.styles.d.ts +113 -0
  268. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.styles.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts +31 -0
  270. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts +17 -0
  272. package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts +227 -0
  274. package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts +40 -0
  276. package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/ui/screens/home/greeting.d.ts +19 -0
  278. package/lib/typescript/commonjs/ui/screens/home/greeting.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.d.ts +7 -0
  280. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.styles.d.ts +115 -0
  282. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.styles.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.types.d.ts +20 -0
  284. package/lib/typescript/commonjs/ui/screens/pre-chat/PreChatForm.types.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/ui/styles/global.d.ts +46 -0
  286. package/lib/typescript/commonjs/ui/styles/global.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/ui/styles/theme.d.ts +103 -0
  288. package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/ui/utils/conversations.d.ts +41 -0
  290. package/lib/typescript/commonjs/ui/utils/conversations.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/ui/utils/html.d.ts +10 -0
  292. package/lib/typescript/commonjs/ui/utils/html.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/ui/utils/native-gradient.d.ts +61 -0
  294. package/lib/typescript/commonjs/ui/utils/native-gradient.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/ui/utils/rtl.d.ts +33 -0
  296. package/lib/typescript/commonjs/ui/utils/rtl.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/ui/utils/safe-url.d.ts +21 -0
  298. package/lib/typescript/commonjs/ui/utils/safe-url.d.ts.map +1 -0
  299. package/lib/typescript/module/agent-ui-blocks.d.ts +20 -0
  300. package/lib/typescript/module/agent-ui-blocks.d.ts.map +1 -0
  301. package/lib/typescript/module/api/client.d.ts +115 -0
  302. package/lib/typescript/module/api/client.d.ts.map +1 -0
  303. package/lib/typescript/module/api/realtime.d.ts +39 -0
  304. package/lib/typescript/module/api/realtime.d.ts.map +1 -0
  305. package/lib/typescript/module/api/sse-parser.d.ts +13 -0
  306. package/lib/typescript/module/api/sse-parser.d.ts.map +1 -0
  307. package/lib/typescript/module/controller.d.ts +15 -0
  308. package/lib/typescript/module/controller.d.ts.map +1 -0
  309. package/lib/typescript/module/device-id.d.ts +15 -0
  310. package/lib/typescript/module/device-id.d.ts.map +1 -0
  311. package/lib/typescript/module/events.d.ts +41 -0
  312. package/lib/typescript/module/events.d.ts.map +1 -0
  313. package/lib/typescript/module/i18n.d.ts +78 -0
  314. package/lib/typescript/module/i18n.d.ts.map +1 -0
  315. package/lib/typescript/module/index.d.ts +103 -0
  316. package/lib/typescript/module/index.d.ts.map +1 -0
  317. package/lib/typescript/module/locales.d.ts +18 -0
  318. package/lib/typescript/module/locales.d.ts.map +1 -0
  319. package/lib/typescript/module/package.json +1 -0
  320. package/lib/typescript/module/push/push-notifications.d.ts +71 -0
  321. package/lib/typescript/module/push/push-notifications.d.ts.map +1 -0
  322. package/lib/typescript/module/state/use-widget-state.d.ts +10 -0
  323. package/lib/typescript/module/state/use-widget-state.d.ts.map +1 -0
  324. package/lib/typescript/module/state/widget-store.d.ts +227 -0
  325. package/lib/typescript/module/state/widget-store.d.ts.map +1 -0
  326. package/lib/typescript/module/storage.d.ts +42 -0
  327. package/lib/typescript/module/storage.d.ts.map +1 -0
  328. package/lib/typescript/module/types.d.ts +391 -0
  329. package/lib/typescript/module/types.d.ts.map +1 -0
  330. package/lib/typescript/module/ui/WidgetProvider.d.ts +15 -0
  331. package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -0
  332. package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts +27 -0
  333. package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts.map +1 -0
  334. package/lib/typescript/module/ui/components/Avatar.d.ts +19 -0
  335. package/lib/typescript/module/ui/components/Avatar.d.ts.map +1 -0
  336. package/lib/typescript/module/ui/components/ConversationRow.d.ts +26 -0
  337. package/lib/typescript/module/ui/components/ConversationRow.d.ts.map +1 -0
  338. package/lib/typescript/module/ui/components/ErrorBoundary.d.ts +27 -0
  339. package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +1 -0
  340. package/lib/typescript/module/ui/components/Gradient.d.ts +33 -0
  341. package/lib/typescript/module/ui/components/Gradient.d.ts.map +1 -0
  342. package/lib/typescript/module/ui/components/Launcher.d.ts +18 -0
  343. package/lib/typescript/module/ui/components/Launcher.d.ts.map +1 -0
  344. package/lib/typescript/module/ui/components/Markdown.d.ts +19 -0
  345. package/lib/typescript/module/ui/components/Markdown.d.ts.map +1 -0
  346. package/lib/typescript/module/ui/components/OutboundMessageCard.d.ts +20 -0
  347. package/lib/typescript/module/ui/components/OutboundMessageCard.d.ts.map +1 -0
  348. package/lib/typescript/module/ui/components/WidgetPanel.d.ts +26 -0
  349. package/lib/typescript/module/ui/components/WidgetPanel.d.ts.map +1 -0
  350. package/lib/typescript/module/ui/components/icons.d.ts +38 -0
  351. package/lib/typescript/module/ui/components/icons.d.ts.map +1 -0
  352. package/lib/typescript/module/ui/hooks/use-keyboard-overlap.d.ts +33 -0
  353. package/lib/typescript/module/ui/hooks/use-keyboard-overlap.d.ts.map +1 -0
  354. package/lib/typescript/module/ui/hooks/use-reduce-motion.d.ts +11 -0
  355. package/lib/typescript/module/ui/hooks/use-reduce-motion.d.ts.map +1 -0
  356. package/lib/typescript/module/ui/hooks/use-widget-insets.d.ts +16 -0
  357. package/lib/typescript/module/ui/hooks/use-widget-insets.d.ts.map +1 -0
  358. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts +11 -0
  359. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -0
  360. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts +349 -0
  361. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts.map +1 -0
  362. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +48 -0
  363. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -0
  364. package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts +10 -0
  365. package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts.map +1 -0
  366. package/lib/typescript/module/ui/screens/conversations/ConversationsList.styles.d.ts +113 -0
  367. package/lib/typescript/module/ui/screens/conversations/ConversationsList.styles.d.ts.map +1 -0
  368. package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts +31 -0
  369. package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -0
  370. package/lib/typescript/module/ui/screens/home/HomeView.d.ts +17 -0
  371. package/lib/typescript/module/ui/screens/home/HomeView.d.ts.map +1 -0
  372. package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts +227 -0
  373. package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts.map +1 -0
  374. package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts +40 -0
  375. package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts.map +1 -0
  376. package/lib/typescript/module/ui/screens/home/greeting.d.ts +19 -0
  377. package/lib/typescript/module/ui/screens/home/greeting.d.ts.map +1 -0
  378. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.d.ts +7 -0
  379. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.d.ts.map +1 -0
  380. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.styles.d.ts +115 -0
  381. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.styles.d.ts.map +1 -0
  382. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.types.d.ts +20 -0
  383. package/lib/typescript/module/ui/screens/pre-chat/PreChatForm.types.d.ts.map +1 -0
  384. package/lib/typescript/module/ui/styles/global.d.ts +46 -0
  385. package/lib/typescript/module/ui/styles/global.d.ts.map +1 -0
  386. package/lib/typescript/module/ui/styles/theme.d.ts +103 -0
  387. package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -0
  388. package/lib/typescript/module/ui/utils/conversations.d.ts +41 -0
  389. package/lib/typescript/module/ui/utils/conversations.d.ts.map +1 -0
  390. package/lib/typescript/module/ui/utils/html.d.ts +10 -0
  391. package/lib/typescript/module/ui/utils/html.d.ts.map +1 -0
  392. package/lib/typescript/module/ui/utils/native-gradient.d.ts +61 -0
  393. package/lib/typescript/module/ui/utils/native-gradient.d.ts.map +1 -0
  394. package/lib/typescript/module/ui/utils/rtl.d.ts +33 -0
  395. package/lib/typescript/module/ui/utils/rtl.d.ts.map +1 -0
  396. package/lib/typescript/module/ui/utils/safe-url.d.ts +21 -0
  397. package/lib/typescript/module/ui/utils/safe-url.d.ts.map +1 -0
  398. package/metro.js +40 -0
  399. package/package.json +116 -0
  400. package/src/agent-ui-blocks.ts +302 -0
  401. package/src/api/client.ts +332 -0
  402. package/src/api/realtime.ts +225 -0
  403. package/src/api/sse-parser.ts +51 -0
  404. package/src/controller.ts +20 -0
  405. package/src/device-id.ts +71 -0
  406. package/src/events.ts +74 -0
  407. package/src/i18n.ts +114 -0
  408. package/src/index.tsx +199 -0
  409. package/src/locales.ts +80 -0
  410. package/src/push/push-notifications.ts +254 -0
  411. package/src/state/use-widget-state.ts +20 -0
  412. package/src/state/widget-store.ts +1815 -0
  413. package/src/storage.ts +153 -0
  414. package/src/types.ts +445 -0
  415. package/src/ui/WidgetProvider.tsx +434 -0
  416. package/src/ui/components/AgentUiBlocks.tsx +912 -0
  417. package/src/ui/components/Avatar.tsx +86 -0
  418. package/src/ui/components/ConversationRow.tsx +163 -0
  419. package/src/ui/components/ErrorBoundary.tsx +49 -0
  420. package/src/ui/components/Gradient.tsx +165 -0
  421. package/src/ui/components/Launcher.tsx +128 -0
  422. package/src/ui/components/Markdown.tsx +291 -0
  423. package/src/ui/components/OutboundMessageCard.tsx +154 -0
  424. package/src/ui/components/WidgetPanel.tsx +133 -0
  425. package/src/ui/components/icons.tsx +315 -0
  426. package/src/ui/hooks/use-keyboard-overlap.ts +134 -0
  427. package/src/ui/hooks/use-reduce-motion.ts +39 -0
  428. package/src/ui/hooks/use-widget-insets.ts +44 -0
  429. package/src/ui/screens/chat/ChatView.styles.ts +357 -0
  430. package/src/ui/screens/chat/ChatView.tsx +690 -0
  431. package/src/ui/screens/chat/ChatView.types.ts +46 -0
  432. package/src/ui/screens/conversations/ConversationsList.styles.ts +111 -0
  433. package/src/ui/screens/conversations/ConversationsList.tsx +144 -0
  434. package/src/ui/screens/conversations/ConversationsList.types.ts +33 -0
  435. package/src/ui/screens/home/HomeView.styles.ts +246 -0
  436. package/src/ui/screens/home/HomeView.tsx +336 -0
  437. package/src/ui/screens/home/HomeView.types.ts +42 -0
  438. package/src/ui/screens/home/greeting.ts +50 -0
  439. package/src/ui/screens/pre-chat/PreChatForm.styles.ts +120 -0
  440. package/src/ui/screens/pre-chat/PreChatForm.tsx +221 -0
  441. package/src/ui/screens/pre-chat/PreChatForm.types.ts +22 -0
  442. package/src/ui/styles/global.ts +50 -0
  443. package/src/ui/styles/theme.ts +155 -0
  444. package/src/ui/utils/conversations.ts +122 -0
  445. package/src/ui/utils/html.ts +58 -0
  446. package/src/ui/utils/native-gradient.ts +60 -0
  447. package/src/ui/utils/rtl.ts +43 -0
  448. package/src/ui/utils/safe-url.ts +63 -0
@@ -0,0 +1,46 @@
1
+ /** Props and label bundle for the chat thread. */
2
+
3
+ import type { AgentUiAction, Message, WidgetAttachment } from '../../../types';
4
+ import type { AgentUiBlockLabels } from '../../components/AgentUiBlocks';
5
+
6
+ export interface ChatLabels {
7
+ back: string;
8
+ loading: string;
9
+ loadEarlier: string;
10
+ emptyConversation: string;
11
+ messagePlaceholder: string;
12
+ failedToSend: string;
13
+ thinking: string;
14
+ team: string;
15
+ statusOnline: string;
16
+ statusAway: string;
17
+ close: string;
18
+ today: string;
19
+ yesterday: string;
20
+ conversationUpdated: string;
21
+ procedureSend: string;
22
+ procedureSent: string;
23
+ blocks: AgentUiBlockLabels;
24
+ }
25
+
26
+ export interface ChatViewProps {
27
+ messages: Message[];
28
+ loading: boolean;
29
+ hasMoreMessages: boolean;
30
+ agentTyping: boolean;
31
+ color: string;
32
+ /** Whoever is handling this thread, once the backend assigns someone. */
33
+ agentName?: string | null;
34
+ agentAvatar?: string | null;
35
+ isOnline: boolean;
36
+ prefillText?: string;
37
+ offlineMessage?: string;
38
+ locale: string;
39
+ labels: ChatLabels;
40
+ onSendMessage: (body: string, attachments?: WidgetAttachment[], action?: AgentUiAction) => void;
41
+ onIdentifyVisitor?: (data: { email?: string; name?: string; phone?: string }) => Promise<void>;
42
+ onLoadMore: () => void;
43
+ onTyping: (isTyping: boolean) => void;
44
+ onBack: () => void;
45
+ onClose: () => void;
46
+ }
@@ -0,0 +1,111 @@
1
+ /** Styles for the Messages space: centered header, row list and the floating pill. */
2
+
3
+ import { StyleSheet } from 'react-native';
4
+
5
+ import { rowDividerInset } from '../../components/ConversationRow';
6
+ import { fontSize, palette, radius, shadows, spacing } from '../../styles/theme';
7
+
8
+ export const styles = StyleSheet.create({
9
+ header: {
10
+ alignItems: 'center',
11
+ justifyContent: 'center',
12
+ // Leaves room for the absolutely-placed close button on both sides so the
13
+ // title stays optically centered.
14
+ paddingHorizontal: spacing.xxl + spacing.lg,
15
+ paddingTop: spacing.lg,
16
+ paddingBottom: spacing.md,
17
+ borderBottomWidth: StyleSheet.hairlineWidth,
18
+ borderBottomColor: palette.borderSoft,
19
+ },
20
+ headerCopy: {
21
+ alignItems: 'center',
22
+ gap: 2,
23
+ },
24
+ title: {
25
+ fontSize: fontSize.title,
26
+ fontWeight: '600',
27
+ color: palette.ink,
28
+ },
29
+ statusLine: {
30
+ flexDirection: 'row',
31
+ alignItems: 'center',
32
+ gap: spacing.xs + 2,
33
+ },
34
+ statusDot: {
35
+ width: 7,
36
+ height: 7,
37
+ borderRadius: 3.5,
38
+ },
39
+ statusText: {
40
+ fontSize: fontSize.caption,
41
+ color: palette.textMuted,
42
+ },
43
+ close: {
44
+ position: 'absolute',
45
+ end: spacing.lg,
46
+ top: 0,
47
+ bottom: 0,
48
+ justifyContent: 'center',
49
+ paddingHorizontal: spacing.xs,
50
+ },
51
+ listContent: {
52
+ flexGrow: 1,
53
+ },
54
+ listContentEmpty: {
55
+ justifyContent: 'center',
56
+ },
57
+ divider: {
58
+ marginStart: rowDividerInset(),
59
+ },
60
+ empty: {
61
+ alignItems: 'center',
62
+ paddingHorizontal: spacing.xxl,
63
+ paddingVertical: 48,
64
+ },
65
+ emptyIcon: {
66
+ width: 64,
67
+ height: 64,
68
+ borderRadius: 32,
69
+ alignItems: 'center',
70
+ justifyContent: 'center',
71
+ marginBottom: spacing.lg,
72
+ },
73
+ emptyTitle: {
74
+ fontSize: fontSize.body,
75
+ fontWeight: '600',
76
+ color: palette.ink,
77
+ textAlign: 'center',
78
+ },
79
+ emptySubtitle: {
80
+ fontSize: fontSize.meta,
81
+ color: palette.textSubtle,
82
+ marginTop: spacing.xs,
83
+ textAlign: 'center',
84
+ },
85
+ fabWrapper: {
86
+ position: 'absolute',
87
+ left: 0,
88
+ right: 0,
89
+ bottom: spacing.lg,
90
+ alignItems: 'center',
91
+ },
92
+ fab: {
93
+ flexDirection: 'row',
94
+ alignItems: 'center',
95
+ gap: spacing.sm,
96
+ minHeight: 46,
97
+ paddingHorizontal: spacing.xl,
98
+ paddingVertical: spacing.md,
99
+ borderRadius: radius.pill,
100
+ ...shadows.floating,
101
+ },
102
+ fabPressed: {
103
+ opacity: 0.9,
104
+ transform: [{ scale: 0.98 }],
105
+ },
106
+ fabLabel: {
107
+ color: palette.white,
108
+ fontSize: fontSize.meta,
109
+ fontWeight: '600',
110
+ },
111
+ });
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Messages space — conversation rows plus the floating "new conversation"
3
+ * pill. Port of `client/src/widget/components/ConversationsList.tsx`.
4
+ *
5
+ * Rows are shared with the Home space's recent preview, and both sort for
6
+ * themselves because the store keeps conversations in arrival order.
7
+ */
8
+
9
+ import { useCallback, useMemo, useState } from 'react';
10
+ import { FlatList, Pressable, RefreshControl, Text, View } from 'react-native';
11
+
12
+ import { ConversationRow } from '../../components/ConversationRow';
13
+ import { ArrowRightIcon, ChatOutlineIcon, CloseIcon } from '../../components/icons';
14
+ import { globalStyles } from '../../styles/global';
15
+ import { palette, spacing, withAlpha } from '../../styles/theme';
16
+ import { sortByRecency } from '../../utils/conversations';
17
+ import { flipForRTL } from '../../utils/rtl';
18
+ import { styles } from './ConversationsList.styles';
19
+ import type { ConversationsListProps } from './ConversationsList.types';
20
+
21
+ export function ConversationsList({
22
+ conversations,
23
+ unreadByConversation,
24
+ color,
25
+ allowNewConversations,
26
+ showPreviousConversations,
27
+ isOnline,
28
+ startConversationLabel,
29
+ labels,
30
+ onSelect,
31
+ onNewConversation,
32
+ onRefresh,
33
+ onClose,
34
+ }: ConversationsListProps) {
35
+ const [refreshing, setRefreshing] = useState(false);
36
+
37
+ const visibleConversations = useMemo(
38
+ () => (showPreviousConversations ? sortByRecency(conversations) : []),
39
+ [conversations, showPreviousConversations]
40
+ );
41
+
42
+ // The realtime stream can drop messages while backgrounded, so let the
43
+ // visitor force the same refresh the app does when it returns to the front.
44
+ const handleRefresh = useCallback(async () => {
45
+ setRefreshing(true);
46
+ try {
47
+ await onRefresh();
48
+ } finally {
49
+ setRefreshing(false);
50
+ }
51
+ }, [onRefresh]);
52
+
53
+ const isEmpty = visibleConversations.length === 0;
54
+
55
+ return (
56
+ <View style={globalStyles.screen}>
57
+ <View style={styles.header}>
58
+ <View style={styles.headerCopy}>
59
+ <Text style={styles.title}>{labels.messages}</Text>
60
+ <View style={styles.statusLine}>
61
+ <View
62
+ style={[
63
+ styles.statusDot,
64
+ { backgroundColor: isOnline ? palette.online : palette.textSubtle },
65
+ ]}
66
+ />
67
+ <Text style={styles.statusText}>
68
+ {isOnline ? labels.statusOnline : labels.statusAway}
69
+ </Text>
70
+ </View>
71
+ </View>
72
+ <Pressable
73
+ onPress={onClose}
74
+ accessibilityRole="button"
75
+ accessibilityLabel={labels.close}
76
+ hitSlop={12}
77
+ style={styles.close}>
78
+ <CloseIcon size={18} />
79
+ </Pressable>
80
+ </View>
81
+
82
+ <FlatList
83
+ data={visibleConversations}
84
+ keyExtractor={(item) => item.id}
85
+ contentContainerStyle={[
86
+ styles.listContent,
87
+ isEmpty && styles.listContentEmpty,
88
+ { paddingBottom: allowNewConversations ? 84 : spacing.xl },
89
+ ]}
90
+ ItemSeparatorComponent={() => <View style={[globalStyles.divider, styles.divider]} />}
91
+ refreshControl={
92
+ showPreviousConversations ? (
93
+ <RefreshControl
94
+ refreshing={refreshing}
95
+ onRefresh={handleRefresh}
96
+ tintColor={color}
97
+ colors={[color]}
98
+ />
99
+ ) : undefined
100
+ }
101
+ ListEmptyComponent={
102
+ <View style={styles.empty}>
103
+ <View style={[styles.emptyIcon, { backgroundColor: withAlpha(color, 0.08) }]}>
104
+ <ChatOutlineIcon size={30} color={color} />
105
+ </View>
106
+ <Text style={styles.emptyTitle}>
107
+ {showPreviousConversations ? labels.noMessages : labels.historyHidden}
108
+ </Text>
109
+ {allowNewConversations ? (
110
+ <Text style={styles.emptySubtitle}>{labels.startBelow}</Text>
111
+ ) : null}
112
+ </View>
113
+ }
114
+ renderItem={({ item }) => (
115
+ <ConversationRow
116
+ conversation={item}
117
+ color={color}
118
+ fallbackName={labels.team}
119
+ timeLabels={labels.time}
120
+ unreadCount={unreadByConversation[item.id] ?? 0}
121
+ unreadLabel={labels.unread}
122
+ onPress={() => onSelect(item.id)}
123
+ />
124
+ )}
125
+ />
126
+
127
+ {allowNewConversations ? (
128
+ <View style={styles.fabWrapper} pointerEvents="box-none">
129
+ <Pressable
130
+ onPress={onNewConversation}
131
+ accessibilityRole="button"
132
+ style={({ pressed }) => [
133
+ styles.fab,
134
+ { backgroundColor: color },
135
+ pressed && styles.fabPressed,
136
+ ]}>
137
+ <Text style={styles.fabLabel}>{startConversationLabel}</Text>
138
+ <ArrowRightIcon size={16} color={palette.white} style={flipForRTL()} />
139
+ </Pressable>
140
+ </View>
141
+ ) : null}
142
+ </View>
143
+ );
144
+ }
@@ -0,0 +1,33 @@
1
+ /** Props and label bundle for the Messages space. */
2
+
3
+ import type { Conversation } from '../../../types';
4
+ import type { RelativeTimeLabels } from '../../utils/conversations';
5
+
6
+ export interface ConversationsListLabels {
7
+ messages: string;
8
+ noMessages: string;
9
+ historyHidden: string;
10
+ startBelow: string;
11
+ close: string;
12
+ team: string;
13
+ statusOnline: string;
14
+ statusAway: string;
15
+ time: RelativeTimeLabels;
16
+ /** Template with a `{count}` token. */
17
+ unread: string;
18
+ }
19
+
20
+ export interface ConversationsListProps {
21
+ conversations: Conversation[];
22
+ unreadByConversation: Record<string, number>;
23
+ color: string;
24
+ allowNewConversations: boolean;
25
+ showPreviousConversations: boolean;
26
+ isOnline: boolean;
27
+ startConversationLabel: string;
28
+ labels: ConversationsListLabels;
29
+ onSelect: (conversationId: string) => void;
30
+ onNewConversation: () => void;
31
+ onRefresh: () => Promise<void> | void;
32
+ onClose: () => void;
33
+ }
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Styles and layout constants for the Home space. The constants live next to
3
+ * the sheet so the component and the styles can never disagree about them.
4
+ */
5
+
6
+ import { I18nManager, StyleSheet } from 'react-native';
7
+
8
+ import { rowDividerInset } from '../../components/ConversationRow';
9
+ import { fontSize, palette, radius, shadows, spacing } from '../../styles/theme';
10
+ import { START_ALIGN } from '../../utils/rtl';
11
+
12
+ /**
13
+ * Header geometry in dp, measured off the web widget so the two surfaces line
14
+ * up: a tall header with the greeting pinned low, a start card that overhangs
15
+ * the seam by a fixed amount rather than half its height, and a fade that is a
16
+ * straight white ramp over the bottom of the header, starting just under the
17
+ * heading.
18
+ */
19
+ export const HEADER_MIN_HEIGHT = 228;
20
+ /** Between the greeting and whatever comes next: the seam, or the start card. */
21
+ export const HEADER_BOTTOM_PADDING = 36;
22
+ export const START_CARD_LIFT = 28;
23
+ export const START_CARD_MIN_HEIGHT = 76;
24
+ export const HEADER_FADE_HEIGHT = 90;
25
+ export const CLOSE_BUTTON_SIZE = 28;
26
+ export const CLOSE_ICON_SIZE = 14;
27
+
28
+ export const styles = StyleSheet.create({
29
+ contentContainer: {
30
+ flexGrow: 1,
31
+ },
32
+ // Tall on purpose, with the greeting pinned to the bottom by `headerSpacer`:
33
+ // the close row stays at the top and the heading sits just above the seam.
34
+ header: {
35
+ minHeight: HEADER_MIN_HEIGHT,
36
+ paddingHorizontal: spacing.xl,
37
+ paddingTop: spacing.xl,
38
+ // When the start card is shown the component grows this to clear the card.
39
+ paddingBottom: HEADER_BOTTOM_PADDING,
40
+ overflow: 'hidden',
41
+ },
42
+ imageScrim: {
43
+ ...StyleSheet.absoluteFillObject,
44
+ backgroundColor: 'rgba(0,0,0,0.16)',
45
+ },
46
+ // Always as tall as the logo slot, so the greeting lands in the same place
47
+ // whether or not the workspace uploaded a logo.
48
+ headerTop: {
49
+ flexDirection: 'row',
50
+ alignItems: 'flex-start',
51
+ justifyContent: 'space-between',
52
+ minHeight: 40,
53
+ },
54
+ // Soaks up the header's spare height so the greeting hugs the seam, and
55
+ // never shrinks below the gap the web widget keeps under the close row.
56
+ headerSpacer: {
57
+ flex: 1,
58
+ minHeight: 40,
59
+ },
60
+ logo: {
61
+ width: 132,
62
+ height: 40,
63
+ },
64
+ closeButton: {
65
+ marginStart: 'auto',
66
+ padding: (CLOSE_BUTTON_SIZE - CLOSE_ICON_SIZE) / 2,
67
+ borderRadius: radius.pill,
68
+ backgroundColor: 'rgba(255,255,255,0.18)',
69
+ },
70
+ heading: {
71
+ textAlign: START_ALIGN,
72
+ fontSize: fontSize.display,
73
+ lineHeight: fontSize.display * 1.15,
74
+ fontWeight: '600',
75
+ marginBottom: spacing.md,
76
+ },
77
+ subheading: {
78
+ textAlign: START_ALIGN,
79
+ fontSize: fontSize.body,
80
+ lineHeight: fontSize.body * 1.4,
81
+ },
82
+
83
+ // Meets the header on a straight seam. No top padding here: the start card
84
+ // is pulled up past this edge, and the rest of the content takes its spacing
85
+ // from `bodyContent`.
86
+ body: {
87
+ flex: 1,
88
+ backgroundColor: palette.white,
89
+ paddingHorizontal: spacing.xl,
90
+ paddingBottom: spacing.xxl,
91
+ },
92
+ bodyContent: {
93
+ flex: 1,
94
+ paddingTop: spacing.xl,
95
+ },
96
+
97
+ offlineNotice: {
98
+ flexDirection: 'row',
99
+ alignItems: 'flex-start',
100
+ gap: spacing.sm + 2,
101
+ padding: spacing.md,
102
+ borderRadius: radius.md,
103
+ backgroundColor: palette.warningBg,
104
+ borderWidth: StyleSheet.hairlineWidth,
105
+ borderColor: palette.warningBorder,
106
+ marginBottom: spacing.lg,
107
+ },
108
+ offlineText: {
109
+ textAlign: START_ALIGN,
110
+ flex: 1,
111
+ fontSize: fontSize.meta,
112
+ lineHeight: fontSize.meta * 1.4,
113
+ color: palette.warningText,
114
+ },
115
+
116
+ startCardSlot: {
117
+ marginTop: -START_CARD_LIFT,
118
+ },
119
+ // Neutral and opaque, like the web card: it spans two backgrounds, and a
120
+ // translucent or brand-tinted fill would let the header bleed through its
121
+ // top or stain the seam. Shadowed because without it the half over the
122
+ // header reads as a flat cut-out.
123
+ startCard: {
124
+ flexDirection: 'row',
125
+ alignItems: 'center',
126
+ gap: spacing.md,
127
+ minHeight: START_CARD_MIN_HEIGHT,
128
+ paddingHorizontal: spacing.xl,
129
+ paddingVertical: spacing.lg + 2,
130
+ borderRadius: radius.lg,
131
+ borderWidth: StyleSheet.hairlineWidth,
132
+ borderColor: palette.border,
133
+ backgroundColor: palette.surface,
134
+ ...shadows.card,
135
+ },
136
+ startCardPressed: {
137
+ opacity: 0.85,
138
+ },
139
+ startIcon: {
140
+ width: 40,
141
+ height: 40,
142
+ borderRadius: 20,
143
+ alignItems: 'center',
144
+ justifyContent: 'center',
145
+ },
146
+ startCopy: {
147
+ flex: 1,
148
+ minWidth: 0,
149
+ },
150
+ startTitle: {
151
+ textAlign: START_ALIGN,
152
+ fontSize: fontSize.title,
153
+ fontWeight: '600',
154
+ color: palette.ink,
155
+ },
156
+ startSubtitle: {
157
+ textAlign: START_ALIGN,
158
+ fontSize: fontSize.meta,
159
+ color: palette.textSubtle,
160
+ marginTop: 2,
161
+ },
162
+
163
+ recentHeader: {
164
+ flexDirection: 'row',
165
+ alignItems: 'center',
166
+ justifyContent: 'space-between',
167
+ minHeight: 28,
168
+ marginBottom: spacing.sm,
169
+ },
170
+ recentTitle: {
171
+ textAlign: START_ALIGN,
172
+ fontSize: fontSize.caption,
173
+ fontWeight: '700',
174
+ color: palette.textMuted,
175
+ letterSpacing: I18nManager.isRTL ? 0 : 0.6,
176
+ textTransform: 'uppercase',
177
+ },
178
+ viewAllButton: {
179
+ minHeight: 32,
180
+ paddingHorizontal: spacing.xs,
181
+ justifyContent: 'center',
182
+ },
183
+ viewAllLabel: {
184
+ textAlign: START_ALIGN,
185
+ fontSize: fontSize.meta,
186
+ fontWeight: '600',
187
+ },
188
+ // Border rather than a shadow: `overflow: hidden` keeps the rows' ripple
189
+ // inside the rounded corners, and would clip a shadow on iOS anyway.
190
+ recentCard: {
191
+ overflow: 'hidden',
192
+ },
193
+ recentDivider: {
194
+ marginStart: rowDividerInset(spacing.lg),
195
+ },
196
+ // Absorbs the slack so the status strip stays pinned to the bottom, and
197
+ // centers the empty hint when there is nothing else to show.
198
+ spacer: {
199
+ flex: 1,
200
+ minHeight: spacing.lg,
201
+ justifyContent: 'center',
202
+ },
203
+ emptyHint: {
204
+ alignItems: 'center',
205
+ gap: spacing.sm,
206
+ paddingVertical: spacing.xl,
207
+ },
208
+ emptyHintText: {
209
+ fontSize: fontSize.meta,
210
+ color: palette.textSubtle,
211
+ textAlign: 'center',
212
+ },
213
+
214
+ statusStrip: {
215
+ flexDirection: 'row',
216
+ alignItems: 'center',
217
+ gap: spacing.sm + 2,
218
+ minHeight: 56,
219
+ paddingTop: spacing.lg,
220
+ marginTop: spacing.lg,
221
+ borderTopWidth: StyleSheet.hairlineWidth,
222
+ borderTopColor: palette.borderSoft,
223
+ },
224
+ avatarStack: {
225
+ flexDirection: 'row',
226
+ alignItems: 'center',
227
+ },
228
+ avatarStackItem: {
229
+ borderWidth: 2,
230
+ borderColor: palette.white,
231
+ },
232
+ avatarStackOverlap: {
233
+ marginStart: -10,
234
+ },
235
+ statusDot: {
236
+ width: 8,
237
+ height: 8,
238
+ borderRadius: 4,
239
+ },
240
+ statusText: {
241
+ textAlign: START_ALIGN,
242
+ flex: 1,
243
+ fontSize: fontSize.meta,
244
+ color: palette.textMuted,
245
+ },
246
+ });