@nascentdigital/funnel-apps 4.4.18

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 (486) hide show
  1. package/dist/react/app/domain/AppService.d.ts +19 -0
  2. package/dist/react/app/domain/AppService.js +19 -0
  3. package/dist/react/app/domain/AppServiceClient.d.ts +7 -0
  4. package/dist/react/app/domain/AppServiceClient.js +57 -0
  5. package/dist/react/app/domain/AppState.d.ts +1 -0
  6. package/dist/react/app/domain/AppState.js +2 -0
  7. package/dist/react/app/domain/index.d.ts +3 -0
  8. package/dist/react/app/domain/index.js +19 -0
  9. package/dist/react/app/server/AbstractAppService.d.ts +17 -0
  10. package/dist/react/app/server/AbstractAppService.js +24 -0
  11. package/dist/react/app/server/AppServices.d.ts +11 -0
  12. package/dist/react/app/server/AppServices.js +92 -0
  13. package/dist/react/app/server/index.d.ts +4 -0
  14. package/dist/react/app/server/index.js +20 -0
  15. package/dist/react/app/web/App.d.ts +38 -0
  16. package/dist/react/app/web/App.js +116 -0
  17. package/dist/react/app/web/AppContainer.d.ts +16 -0
  18. package/dist/react/app/web/AppContainer.js +109 -0
  19. package/dist/react/app/web/AppContext.d.ts +7 -0
  20. package/dist/react/app/web/AppContext.js +6 -0
  21. package/dist/react/app/web/AppLayout.d.ts +7 -0
  22. package/dist/react/app/web/AppLayout.js +34 -0
  23. package/dist/react/app/web/AppPage.d.ts +13 -0
  24. package/dist/react/app/web/AppPage.js +30 -0
  25. package/dist/react/app/web/AppRoot.d.ts +7 -0
  26. package/dist/react/app/web/AppRoot.js +43 -0
  27. package/dist/react/app/web/index.d.ts +5 -0
  28. package/dist/react/app/web/index.js +21 -0
  29. package/dist/react/app/web/useApp.d.ts +2 -0
  30. package/dist/react/app/web/useApp.js +33 -0
  31. package/dist/react/auth0/server/Auth0IdentityService.d.ts +25 -0
  32. package/dist/react/auth0/server/Auth0IdentityService.js +84 -0
  33. package/dist/react/auth0/server/Auth0Profile.d.ts +19 -0
  34. package/dist/react/auth0/server/Auth0Profile.js +108 -0
  35. package/dist/react/auth0/server/Auth0ProfileFactory.d.ts +15 -0
  36. package/dist/react/auth0/server/Auth0ProfileFactory.js +51 -0
  37. package/dist/react/auth0/server/Auth0ProfileManagementService.d.ts +17 -0
  38. package/dist/react/auth0/server/Auth0ProfileManagementService.js +127 -0
  39. package/dist/react/auth0/server/Auth0ProfileServices.d.ts +13 -0
  40. package/dist/react/auth0/server/Auth0ProfileServices.js +19 -0
  41. package/dist/react/auth0/server/Auth0ProfileStore.d.ts +17 -0
  42. package/dist/react/auth0/server/Auth0ProfileStore.js +83 -0
  43. package/dist/react/auth0/server/Auth0ProfileUserService.d.ts +16 -0
  44. package/dist/react/auth0/server/Auth0ProfileUserService.js +48 -0
  45. package/dist/react/auth0/server/index.d.ts +4 -0
  46. package/dist/react/auth0/server/index.js +20 -0
  47. package/dist/react/auth0/web/Auth0IdentityClient.d.ts +34 -0
  48. package/dist/react/auth0/web/Auth0IdentityClient.js +200 -0
  49. package/dist/react/auth0/web/Auth0IdentityClientProvider.d.ts +35 -0
  50. package/dist/react/auth0/web/Auth0IdentityClientProvider.js +67 -0
  51. package/dist/react/auth0/web/index.d.ts +1 -0
  52. package/dist/react/auth0/web/index.js +17 -0
  53. package/dist/react/bridge/core/BridgeConnection.d.ts +6 -0
  54. package/dist/react/bridge/core/BridgeConnection.js +2 -0
  55. package/dist/react/bridge/core/BridgeConstants.d.ts +7 -0
  56. package/dist/react/bridge/core/BridgeConstants.js +15 -0
  57. package/dist/react/bridge/core/BridgeEvent.d.ts +52 -0
  58. package/dist/react/bridge/core/BridgeEvent.js +28 -0
  59. package/dist/react/bridge/core/BridgeMethod.d.ts +12 -0
  60. package/dist/react/bridge/core/BridgeMethod.js +2 -0
  61. package/dist/react/bridge/core/BridgeMethodCall.d.ts +23 -0
  62. package/dist/react/bridge/core/BridgeMethodCall.js +37 -0
  63. package/dist/react/bridge/core/BridgeMethods.d.ts +35 -0
  64. package/dist/react/bridge/core/BridgeMethods.js +2 -0
  65. package/dist/react/bridge/core/BridgeState.d.ts +24 -0
  66. package/dist/react/bridge/core/BridgeState.js +2 -0
  67. package/dist/react/bridge/core/index.d.ts +7 -0
  68. package/dist/react/bridge/core/index.js +23 -0
  69. package/dist/react/bridge/web/Bridge.d.ts +32 -0
  70. package/dist/react/bridge/web/Bridge.js +183 -0
  71. package/dist/react/bridge/web/BridgeContext.d.ts +8 -0
  72. package/dist/react/bridge/web/BridgeContext.js +6 -0
  73. package/dist/react/bridge/web/BridgeGlobals.d.ts +12 -0
  74. package/dist/react/bridge/web/BridgeGlobals.js +2 -0
  75. package/dist/react/bridge/web/BridgeProvider.d.ts +7 -0
  76. package/dist/react/bridge/web/BridgeProvider.js +36 -0
  77. package/dist/react/bridge/web/index.d.ts +6 -0
  78. package/dist/react/bridge/web/index.js +22 -0
  79. package/dist/react/bridge/web/useBridge.d.ts +3 -0
  80. package/dist/react/bridge/web/useBridge.js +39 -0
  81. package/dist/react/bridge/web/useBridgeState.d.ts +2 -0
  82. package/dist/react/bridge/web/useBridgeState.js +43 -0
  83. package/dist/react/bridge/web/useSafeArea.d.ts +1 -0
  84. package/dist/react/bridge/web/useSafeArea.js +11 -0
  85. package/dist/react/content/core/AppContentClient.d.ts +14 -0
  86. package/dist/react/content/core/AppContentClient.js +51 -0
  87. package/dist/react/content/core/ContentClientContext.d.ts +7 -0
  88. package/dist/react/content/core/ContentClientContext.js +6 -0
  89. package/dist/react/content/core/index.d.ts +1 -0
  90. package/dist/react/content/core/index.js +17 -0
  91. package/dist/react/content/domain/ContentAppRequest.d.ts +20 -0
  92. package/dist/react/content/domain/ContentAppRequest.js +11 -0
  93. package/dist/react/content/domain/index.d.ts +1 -0
  94. package/dist/react/content/domain/index.js +17 -0
  95. package/dist/react/content/server/ContentAppService.d.ts +11 -0
  96. package/dist/react/content/server/ContentAppService.js +34 -0
  97. package/dist/react/content/server/index.d.ts +1 -0
  98. package/dist/react/content/server/index.js +17 -0
  99. package/dist/react/content/web/ContentProvider.d.ts +5 -0
  100. package/dist/react/content/web/ContentProvider.js +17 -0
  101. package/dist/react/content/web/index.d.ts +6 -0
  102. package/dist/react/content/web/index.js +22 -0
  103. package/dist/react/content/web/useCollection.d.ts +10 -0
  104. package/dist/react/content/web/useCollection.js +22 -0
  105. package/dist/react/content/web/useCollections.d.ts +10 -0
  106. package/dist/react/content/web/useCollections.js +32 -0
  107. package/dist/react/content/web/useContentClient.d.ts +1 -0
  108. package/dist/react/content/web/useContentClient.js +9 -0
  109. package/dist/react/cookies/web/CookieService.d.ts +25 -0
  110. package/dist/react/cookies/web/CookieService.js +45 -0
  111. package/dist/react/cookies/web/CookieServiceContext.d.ts +7 -0
  112. package/dist/react/cookies/web/CookieServiceContext.js +6 -0
  113. package/dist/react/cookies/web/CookieServiceProvider.d.ts +6 -0
  114. package/dist/react/cookies/web/CookieServiceProvider.js +16 -0
  115. package/dist/react/cookies/web/index.d.ts +3 -0
  116. package/dist/react/cookies/web/index.js +19 -0
  117. package/dist/react/cookies/web/useCookieService.d.ts +2 -0
  118. package/dist/react/cookies/web/useCookieService.js +29 -0
  119. package/dist/react/identity/core/AbstractIdentityClient.d.ts +22 -0
  120. package/dist/react/identity/core/AbstractIdentityClient.js +31 -0
  121. package/dist/react/identity/core/IdentityClient.d.ts +22 -0
  122. package/dist/react/identity/core/IdentityClient.js +13 -0
  123. package/dist/react/identity/core/IdentityClientContext.d.ts +7 -0
  124. package/dist/react/identity/core/IdentityClientContext.js +6 -0
  125. package/dist/react/identity/core/index.d.ts +6 -0
  126. package/dist/react/identity/core/index.js +22 -0
  127. package/dist/react/identity/core/useIdentity.d.ts +10 -0
  128. package/dist/react/identity/core/useIdentity.js +39 -0
  129. package/dist/react/identity/core/useIdentityClient.d.ts +2 -0
  130. package/dist/react/identity/core/useIdentityClient.js +17 -0
  131. package/dist/react/identity/domain/AnonymousIdentity.d.ts +15 -0
  132. package/dist/react/identity/domain/AnonymousIdentity.js +27 -0
  133. package/dist/react/identity/domain/AuthenticatedIdentity.d.ts +25 -0
  134. package/dist/react/identity/domain/AuthenticatedIdentity.js +32 -0
  135. package/dist/react/identity/domain/Identity.d.ts +6 -0
  136. package/dist/react/identity/domain/Identity.js +2 -0
  137. package/dist/react/identity/domain/IdentityAppRequest.d.ts +8 -0
  138. package/dist/react/identity/domain/IdentityAppRequest.js +10 -0
  139. package/dist/react/identity/domain/index.d.ts +4 -0
  140. package/dist/react/identity/domain/index.js +20 -0
  141. package/dist/react/identity/server/IdentityAppService.d.ts +9 -0
  142. package/dist/react/identity/server/IdentityAppService.js +32 -0
  143. package/dist/react/identity/server/IdentityService.d.ts +17 -0
  144. package/dist/react/identity/server/IdentityService.js +25 -0
  145. package/dist/react/identity/server/index.d.ts +4 -0
  146. package/dist/react/identity/server/index.js +20 -0
  147. package/dist/react/identity/web/WebIdentityClientProvider.d.ts +8 -0
  148. package/dist/react/identity/web/WebIdentityClientProvider.js +27 -0
  149. package/dist/react/identity/web/WebIdentityProvider.d.ts +5 -0
  150. package/dist/react/identity/web/WebIdentityProvider.js +21 -0
  151. package/dist/react/identity/web/bridge/AppBridgeIdentityClient.d.ts +14 -0
  152. package/dist/react/identity/web/bridge/AppBridgeIdentityClient.js +47 -0
  153. package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.d.ts +2 -0
  154. package/dist/react/identity/web/bridge/AppBridgeIdentityClientProvider.js +28 -0
  155. package/dist/react/identity/web/bridge/index.d.ts +1 -0
  156. package/dist/react/identity/web/bridge/index.js +17 -0
  157. package/dist/react/identity/web/index.d.ts +3 -0
  158. package/dist/react/identity/web/index.js +19 -0
  159. package/dist/react/nav/core/SpecSourceContext.d.ts +7 -0
  160. package/dist/react/nav/core/SpecSourceContext.js +6 -0
  161. package/dist/react/nav/core/index.d.ts +2 -0
  162. package/dist/react/nav/core/index.js +18 -0
  163. package/dist/react/nav/core/useSpec.d.ts +3 -0
  164. package/dist/react/nav/core/useSpec.js +30 -0
  165. package/dist/react/nav/domain/Icon.d.ts +2 -0
  166. package/dist/react/nav/domain/Icon.js +2 -0
  167. package/dist/react/nav/domain/Modal.d.ts +25 -0
  168. package/dist/react/nav/domain/Modal.js +28 -0
  169. package/dist/react/nav/domain/Navigation.d.ts +13 -0
  170. package/dist/react/nav/domain/Navigation.js +2 -0
  171. package/dist/react/nav/domain/NavigationCommand.d.ts +14 -0
  172. package/dist/react/nav/domain/NavigationCommand.js +2 -0
  173. package/dist/react/nav/domain/Route.d.ts +12 -0
  174. package/dist/react/nav/domain/Route.js +2 -0
  175. package/dist/react/nav/domain/Routes.d.ts +6 -0
  176. package/dist/react/nav/domain/Routes.js +74 -0
  177. package/dist/react/nav/domain/Screen.d.ts +24 -0
  178. package/dist/react/nav/domain/Screen.js +28 -0
  179. package/dist/react/nav/domain/Skeleton.d.ts +26 -0
  180. package/dist/react/nav/domain/Skeleton.js +2 -0
  181. package/dist/react/nav/domain/Spec.d.ts +33 -0
  182. package/dist/react/nav/domain/Spec.js +124 -0
  183. package/dist/react/nav/domain/SpecSource.d.ts +21 -0
  184. package/dist/react/nav/domain/SpecSource.js +28 -0
  185. package/dist/react/nav/domain/Stack.d.ts +35 -0
  186. package/dist/react/nav/domain/Stack.js +44 -0
  187. package/dist/react/nav/domain/Tabs.d.ts +37 -0
  188. package/dist/react/nav/domain/Tabs.js +45 -0
  189. package/dist/react/nav/domain/icons/ImageIcon.d.ts +2 -0
  190. package/dist/react/nav/domain/icons/ImageIcon.js +7 -0
  191. package/dist/react/nav/domain/icons/LucideIcon.d.ts +2 -0
  192. package/dist/react/nav/domain/icons/LucideIcon.js +7 -0
  193. package/dist/react/nav/domain/icons/index.d.ts +2 -0
  194. package/dist/react/nav/domain/icons/index.js +18 -0
  195. package/dist/react/nav/domain/index.d.ts +14 -0
  196. package/dist/react/nav/domain/index.js +30 -0
  197. package/dist/react/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
  198. package/dist/react/nav/domain/sources/AbstractSpecSource.js +64 -0
  199. package/dist/react/nav/domain/sources/StaticSpecSource.d.ts +9 -0
  200. package/dist/react/nav/domain/sources/StaticSpecSource.js +16 -0
  201. package/dist/react/nav/domain/sources/index.d.ts +2 -0
  202. package/dist/react/nav/domain/sources/index.js +18 -0
  203. package/dist/react/nav/server/SpecService.d.ts +9 -0
  204. package/dist/react/nav/server/SpecService.js +31 -0
  205. package/dist/react/nav/server/exports.d.ts +1 -0
  206. package/dist/react/nav/server/exports.js +17 -0
  207. package/dist/react/nav/server/index.d.ts +2 -0
  208. package/dist/react/nav/server/index.js +38 -0
  209. package/dist/react/nav/web/WebSpecProvider.d.ts +2 -0
  210. package/dist/react/nav/web/WebSpecProvider.js +41 -0
  211. package/dist/react/nav/web/index.d.ts +3 -0
  212. package/dist/react/nav/web/index.js +19 -0
  213. package/dist/react/nav/web/navigator/NativeNavigator.d.ts +13 -0
  214. package/dist/react/nav/web/navigator/NativeNavigator.js +47 -0
  215. package/dist/react/nav/web/navigator/Navigator.d.ts +7 -0
  216. package/dist/react/nav/web/navigator/Navigator.js +2 -0
  217. package/dist/react/nav/web/navigator/NavigatorContext.d.ts +7 -0
  218. package/dist/react/nav/web/navigator/NavigatorContext.js +6 -0
  219. package/dist/react/nav/web/navigator/WebNavigator.d.ts +13 -0
  220. package/dist/react/nav/web/navigator/WebNavigator.js +38 -0
  221. package/dist/react/nav/web/navigator/index.d.ts +5 -0
  222. package/dist/react/nav/web/navigator/index.js +21 -0
  223. package/dist/react/nav/web/navigator/useNavigator.d.ts +1 -0
  224. package/dist/react/nav/web/navigator/useNavigator.js +17 -0
  225. package/dist/react/nav.d.ts +1 -0
  226. package/dist/react/nav.js +37 -0
  227. package/dist/react/profile/core/AbstractProfileClient.d.ts +18 -0
  228. package/dist/react/profile/core/AbstractProfileClient.js +31 -0
  229. package/dist/react/profile/core/ProfileClient.d.ts +21 -0
  230. package/dist/react/profile/core/ProfileClient.js +2 -0
  231. package/dist/react/profile/core/ProfileClientContext.d.ts +7 -0
  232. package/dist/react/profile/core/ProfileClientContext.js +6 -0
  233. package/dist/react/profile/core/index.d.ts +6 -0
  234. package/dist/react/profile/core/index.js +22 -0
  235. package/dist/react/profile/core/useProfile.d.ts +9 -0
  236. package/dist/react/profile/core/useProfile.js +47 -0
  237. package/dist/react/profile/core/useProfileClient.d.ts +2 -0
  238. package/dist/react/profile/core/useProfileClient.js +17 -0
  239. package/dist/react/profile/core/useProfileStore.d.ts +2 -0
  240. package/dist/react/profile/core/useProfileStore.js +28 -0
  241. package/dist/react/profile/domain/Profile.d.ts +80 -0
  242. package/dist/react/profile/domain/Profile.js +209 -0
  243. package/dist/react/profile/domain/ProfileAppRequest.d.ts +15 -0
  244. package/dist/react/profile/domain/ProfileAppRequest.js +12 -0
  245. package/dist/react/profile/domain/ProfileStore.d.ts +65 -0
  246. package/dist/react/profile/domain/ProfileStore.js +180 -0
  247. package/dist/react/profile/domain/index.d.ts +3 -0
  248. package/dist/react/profile/domain/index.js +19 -0
  249. package/dist/react/profile/server/ProfileAppService.d.ts +11 -0
  250. package/dist/react/profile/server/ProfileAppService.js +49 -0
  251. package/dist/react/profile/server/ProfileManagementService.d.ts +28 -0
  252. package/dist/react/profile/server/ProfileManagementService.js +3 -0
  253. package/dist/react/profile/server/ProfileServices.d.ts +22 -0
  254. package/dist/react/profile/server/ProfileServices.js +24 -0
  255. package/dist/react/profile/server/ProfileUserService.d.ts +5 -0
  256. package/dist/react/profile/server/ProfileUserService.js +2 -0
  257. package/dist/react/profile/server/index.d.ts +5 -0
  258. package/dist/react/profile/server/index.js +21 -0
  259. package/dist/react/profile/web/WebProfile.d.ts +11 -0
  260. package/dist/react/profile/web/WebProfile.js +37 -0
  261. package/dist/react/profile/web/WebProfileClient.d.ts +9 -0
  262. package/dist/react/profile/web/WebProfileClient.js +76 -0
  263. package/dist/react/profile/web/WebProfileProvider.d.ts +5 -0
  264. package/dist/react/profile/web/WebProfileProvider.js +62 -0
  265. package/dist/react/profile/web/WebProfileStore.d.ts +8 -0
  266. package/dist/react/profile/web/WebProfileStore.js +32 -0
  267. package/dist/react/profile/web/index.d.ts +3 -0
  268. package/dist/react/profile/web/index.js +19 -0
  269. package/dist/react/push/domain/PushAppRequest.d.ts +13 -0
  270. package/dist/react/push/domain/PushAppRequest.js +12 -0
  271. package/dist/react/push/domain/PushStore.d.ts +7 -0
  272. package/dist/react/push/domain/PushStore.js +9 -0
  273. package/dist/react/push/domain/index.d.ts +2 -0
  274. package/dist/react/push/domain/index.js +18 -0
  275. package/dist/react/push/server/PushService.d.ts +22 -0
  276. package/dist/react/push/server/PushService.js +57 -0
  277. package/dist/react/push/server/index.d.ts +3 -0
  278. package/dist/react/push/server/index.js +19 -0
  279. package/dist/react/push/server/keygen.d.ts +1 -0
  280. package/dist/react/push/server/keygen.js +8 -0
  281. package/dist/react/push/web/PushClient.d.ts +35 -0
  282. package/dist/react/push/web/PushClient.js +204 -0
  283. package/dist/react/push/web/PushContext.d.ts +7 -0
  284. package/dist/react/push/web/PushContext.js +6 -0
  285. package/dist/react/push/web/PushProvider.d.ts +6 -0
  286. package/dist/react/push/web/PushProvider.js +42 -0
  287. package/dist/react/push/web/index.d.ts +4 -0
  288. package/dist/react/push/web/index.js +20 -0
  289. package/dist/react/push/web/usePushClient.d.ts +3 -0
  290. package/dist/react/push/web/usePushClient.js +40 -0
  291. package/dist/react/server.d.ts +7 -0
  292. package/dist/react/server.js +23 -0
  293. package/dist/react/ui/web/HideSplash.d.ts +1 -0
  294. package/dist/react/ui/web/HideSplash.js +28 -0
  295. package/dist/react/ui/web/Link.d.ts +6 -0
  296. package/dist/react/ui/web/Link.js +12 -0
  297. package/dist/react/ui/web/SafeArea.d.ts +9 -0
  298. package/dist/react/ui/web/SafeArea.js +26 -0
  299. package/dist/react/ui/web/index.d.ts +3 -0
  300. package/dist/react/ui/web/index.js +19 -0
  301. package/dist/react/web.d.ts +10 -0
  302. package/dist/react/web.js +26 -0
  303. package/dist/reactnative/app/domain/AppService.d.ts +19 -0
  304. package/dist/reactnative/app/domain/AppService.js +19 -0
  305. package/dist/reactnative/app/domain/AppServiceClient.d.ts +7 -0
  306. package/dist/reactnative/app/domain/AppServiceClient.js +57 -0
  307. package/dist/reactnative/app/domain/AppState.d.ts +1 -0
  308. package/dist/reactnative/app/domain/AppState.js +2 -0
  309. package/dist/reactnative/app/domain/index.d.ts +3 -0
  310. package/dist/reactnative/app/domain/index.js +19 -0
  311. package/dist/reactnative/app/rn/AppContainer.d.ts +10 -0
  312. package/dist/reactnative/app/rn/AppContainer.js +77 -0
  313. package/dist/reactnative/app/rn/AppRoot.d.ts +5 -0
  314. package/dist/reactnative/app/rn/AppRoot.js +22 -0
  315. package/dist/reactnative/app/rn/AppServiceClient.d.ts +4 -0
  316. package/dist/reactnative/app/rn/AppServiceClient.js +44 -0
  317. package/dist/reactnative/app/rn/index.d.ts +5 -0
  318. package/dist/reactnative/app/rn/index.js +22 -0
  319. package/dist/reactnative/auth0/rn/Auth0IdentityClient.d.ts +33 -0
  320. package/dist/reactnative/auth0/rn/Auth0IdentityClient.js +234 -0
  321. package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.d.ts +27 -0
  322. package/dist/reactnative/auth0/rn/Auth0IdentityClientProvider.js +60 -0
  323. package/dist/reactnative/auth0/rn/index.d.ts +2 -0
  324. package/dist/reactnative/auth0/rn/index.js +18 -0
  325. package/dist/reactnative/bridge/core/BridgeConnection.d.ts +6 -0
  326. package/dist/reactnative/bridge/core/BridgeConnection.js +2 -0
  327. package/dist/reactnative/bridge/core/BridgeConstants.d.ts +7 -0
  328. package/dist/reactnative/bridge/core/BridgeConstants.js +15 -0
  329. package/dist/reactnative/bridge/core/BridgeEvent.d.ts +52 -0
  330. package/dist/reactnative/bridge/core/BridgeEvent.js +28 -0
  331. package/dist/reactnative/bridge/core/BridgeMethod.d.ts +12 -0
  332. package/dist/reactnative/bridge/core/BridgeMethod.js +2 -0
  333. package/dist/reactnative/bridge/core/BridgeMethodCall.d.ts +23 -0
  334. package/dist/reactnative/bridge/core/BridgeMethodCall.js +37 -0
  335. package/dist/reactnative/bridge/core/BridgeMethods.d.ts +35 -0
  336. package/dist/reactnative/bridge/core/BridgeMethods.js +2 -0
  337. package/dist/reactnative/bridge/core/BridgeState.d.ts +24 -0
  338. package/dist/reactnative/bridge/core/BridgeState.js +2 -0
  339. package/dist/reactnative/bridge/core/index.d.ts +7 -0
  340. package/dist/reactnative/bridge/core/index.js +23 -0
  341. package/dist/reactnative/bridge/rn/BridgeProxy.d.ts +35 -0
  342. package/dist/reactnative/bridge/rn/BridgeProxy.js +331 -0
  343. package/dist/reactnative/bridge/rn/BridgeProxyContext.d.ts +8 -0
  344. package/dist/reactnative/bridge/rn/BridgeProxyContext.js +6 -0
  345. package/dist/reactnative/bridge/rn/BridgeProxyProvider.d.ts +8 -0
  346. package/dist/reactnative/bridge/rn/BridgeProxyProvider.js +39 -0
  347. package/dist/reactnative/bridge/rn/BridgeWebview.d.ts +7 -0
  348. package/dist/reactnative/bridge/rn/BridgeWebview.js +51 -0
  349. package/dist/reactnative/bridge/rn/index.d.ts +7 -0
  350. package/dist/reactnative/bridge/rn/index.js +23 -0
  351. package/dist/reactnative/bridge/rn/useBridgeProxy.d.ts +3 -0
  352. package/dist/reactnative/bridge/rn/useBridgeProxy.js +38 -0
  353. package/dist/reactnative/bridge/rn/useBridgeProxyCalls.d.ts +3 -0
  354. package/dist/reactnative/bridge/rn/useBridgeProxyCalls.js +32 -0
  355. package/dist/reactnative/bridge/rn/useBridgeProxyState.d.ts +2 -0
  356. package/dist/reactnative/bridge/rn/useBridgeProxyState.js +46 -0
  357. package/dist/reactnative/identity/core/AbstractIdentityClient.d.ts +22 -0
  358. package/dist/reactnative/identity/core/AbstractIdentityClient.js +31 -0
  359. package/dist/reactnative/identity/core/IdentityClient.d.ts +22 -0
  360. package/dist/reactnative/identity/core/IdentityClient.js +13 -0
  361. package/dist/reactnative/identity/core/IdentityClientContext.d.ts +7 -0
  362. package/dist/reactnative/identity/core/IdentityClientContext.js +6 -0
  363. package/dist/reactnative/identity/core/index.d.ts +6 -0
  364. package/dist/reactnative/identity/core/index.js +22 -0
  365. package/dist/reactnative/identity/core/useIdentity.d.ts +10 -0
  366. package/dist/reactnative/identity/core/useIdentity.js +39 -0
  367. package/dist/reactnative/identity/core/useIdentityClient.d.ts +2 -0
  368. package/dist/reactnative/identity/core/useIdentityClient.js +17 -0
  369. package/dist/reactnative/identity/domain/AnonymousIdentity.d.ts +15 -0
  370. package/dist/reactnative/identity/domain/AnonymousIdentity.js +27 -0
  371. package/dist/reactnative/identity/domain/AuthenticatedIdentity.d.ts +25 -0
  372. package/dist/reactnative/identity/domain/AuthenticatedIdentity.js +32 -0
  373. package/dist/reactnative/identity/domain/Identity.d.ts +6 -0
  374. package/dist/reactnative/identity/domain/Identity.js +2 -0
  375. package/dist/reactnative/identity/domain/IdentityAppRequest.d.ts +8 -0
  376. package/dist/reactnative/identity/domain/IdentityAppRequest.js +10 -0
  377. package/dist/reactnative/identity/domain/index.d.ts +4 -0
  378. package/dist/reactnative/identity/domain/index.js +20 -0
  379. package/dist/reactnative/identity/rn/RNIdentityClientProvider.d.ts +8 -0
  380. package/dist/reactnative/identity/rn/RNIdentityClientProvider.js +22 -0
  381. package/dist/reactnative/identity/rn/RNIdentityProvider.d.ts +5 -0
  382. package/dist/reactnative/identity/rn/RNIdentityProvider.js +14 -0
  383. package/dist/reactnative/identity/rn/index.d.ts +3 -0
  384. package/dist/reactnative/identity/rn/index.js +19 -0
  385. package/dist/reactnative/nav/core/SpecSourceContext.d.ts +7 -0
  386. package/dist/reactnative/nav/core/SpecSourceContext.js +6 -0
  387. package/dist/reactnative/nav/core/index.d.ts +2 -0
  388. package/dist/reactnative/nav/core/index.js +18 -0
  389. package/dist/reactnative/nav/core/useSpec.d.ts +3 -0
  390. package/dist/reactnative/nav/core/useSpec.js +30 -0
  391. package/dist/reactnative/nav/domain/Icon.d.ts +2 -0
  392. package/dist/reactnative/nav/domain/Icon.js +2 -0
  393. package/dist/reactnative/nav/domain/Modal.d.ts +25 -0
  394. package/dist/reactnative/nav/domain/Modal.js +28 -0
  395. package/dist/reactnative/nav/domain/Navigation.d.ts +13 -0
  396. package/dist/reactnative/nav/domain/Navigation.js +2 -0
  397. package/dist/reactnative/nav/domain/NavigationCommand.d.ts +14 -0
  398. package/dist/reactnative/nav/domain/NavigationCommand.js +2 -0
  399. package/dist/reactnative/nav/domain/Route.d.ts +12 -0
  400. package/dist/reactnative/nav/domain/Route.js +2 -0
  401. package/dist/reactnative/nav/domain/Routes.d.ts +6 -0
  402. package/dist/reactnative/nav/domain/Routes.js +74 -0
  403. package/dist/reactnative/nav/domain/Screen.d.ts +24 -0
  404. package/dist/reactnative/nav/domain/Screen.js +28 -0
  405. package/dist/reactnative/nav/domain/Skeleton.d.ts +26 -0
  406. package/dist/reactnative/nav/domain/Skeleton.js +2 -0
  407. package/dist/reactnative/nav/domain/Spec.d.ts +33 -0
  408. package/dist/reactnative/nav/domain/Spec.js +124 -0
  409. package/dist/reactnative/nav/domain/SpecSource.d.ts +21 -0
  410. package/dist/reactnative/nav/domain/SpecSource.js +28 -0
  411. package/dist/reactnative/nav/domain/Stack.d.ts +35 -0
  412. package/dist/reactnative/nav/domain/Stack.js +44 -0
  413. package/dist/reactnative/nav/domain/Tabs.d.ts +37 -0
  414. package/dist/reactnative/nav/domain/Tabs.js +45 -0
  415. package/dist/reactnative/nav/domain/icons/ImageIcon.d.ts +2 -0
  416. package/dist/reactnative/nav/domain/icons/ImageIcon.js +7 -0
  417. package/dist/reactnative/nav/domain/icons/LucideIcon.d.ts +2 -0
  418. package/dist/reactnative/nav/domain/icons/LucideIcon.js +7 -0
  419. package/dist/reactnative/nav/domain/icons/index.d.ts +2 -0
  420. package/dist/reactnative/nav/domain/icons/index.js +18 -0
  421. package/dist/reactnative/nav/domain/index.d.ts +14 -0
  422. package/dist/reactnative/nav/domain/index.js +30 -0
  423. package/dist/reactnative/nav/domain/sources/AbstractSpecSource.d.ts +23 -0
  424. package/dist/reactnative/nav/domain/sources/AbstractSpecSource.js +64 -0
  425. package/dist/reactnative/nav/domain/sources/StaticSpecSource.d.ts +9 -0
  426. package/dist/reactnative/nav/domain/sources/StaticSpecSource.js +16 -0
  427. package/dist/reactnative/nav/domain/sources/index.d.ts +2 -0
  428. package/dist/reactnative/nav/domain/sources/index.js +18 -0
  429. package/dist/reactnative/nav/rn/NavigationEngine.d.ts +1 -0
  430. package/dist/reactnative/nav/rn/NavigationEngine.js +155 -0
  431. package/dist/reactnative/nav/rn/NavigationScreen.d.ts +9 -0
  432. package/dist/reactnative/nav/rn/NavigationScreen.js +215 -0
  433. package/dist/reactnative/nav/rn/RNSpecProvider.d.ts +2 -0
  434. package/dist/reactnative/nav/rn/RNSpecProvider.js +30 -0
  435. package/dist/reactnative/nav/rn/RNSpecSource.d.ts +5 -0
  436. package/dist/reactnative/nav/rn/RNSpecSource.js +30 -0
  437. package/dist/reactnative/nav/rn/index.d.ts +4 -0
  438. package/dist/reactnative/nav/rn/index.js +20 -0
  439. package/dist/reactnative/profile/domain/Profile.d.ts +80 -0
  440. package/dist/reactnative/profile/domain/Profile.js +209 -0
  441. package/dist/reactnative/profile/domain/ProfileAppRequest.d.ts +15 -0
  442. package/dist/reactnative/profile/domain/ProfileAppRequest.js +12 -0
  443. package/dist/reactnative/profile/domain/ProfileStore.d.ts +65 -0
  444. package/dist/reactnative/profile/domain/ProfileStore.js +180 -0
  445. package/dist/reactnative/profile/domain/index.d.ts +3 -0
  446. package/dist/reactnative/profile/domain/index.js +19 -0
  447. package/dist/reactnative/push/domain/PushAppRequest.d.ts +13 -0
  448. package/dist/reactnative/push/domain/PushAppRequest.js +12 -0
  449. package/dist/reactnative/push/domain/PushStore.d.ts +7 -0
  450. package/dist/reactnative/push/domain/PushStore.js +9 -0
  451. package/dist/reactnative/push/domain/index.d.ts +2 -0
  452. package/dist/reactnative/push/domain/index.js +18 -0
  453. package/dist/reactnative/push/rn/PushClient.d.ts +32 -0
  454. package/dist/reactnative/push/rn/PushClient.js +247 -0
  455. package/dist/reactnative/push/rn/PushContext.d.ts +7 -0
  456. package/dist/reactnative/push/rn/PushContext.js +6 -0
  457. package/dist/reactnative/push/rn/PushProvider.d.ts +2 -0
  458. package/dist/reactnative/push/rn/PushProvider.js +45 -0
  459. package/dist/reactnative/push/rn/index.d.ts +3 -0
  460. package/dist/reactnative/push/rn/index.js +19 -0
  461. package/dist/reactnative/push/rn/usePushClient.d.ts +3 -0
  462. package/dist/reactnative/push/rn/usePushClient.js +40 -0
  463. package/dist/reactnative/rn.d.ts +7 -0
  464. package/dist/reactnative/rn.js +23 -0
  465. package/dist/reactnative/ui/rn/Tailwind.d.ts +175 -0
  466. package/dist/reactnative/ui/rn/Tailwind.js +211 -0
  467. package/dist/reactnative/ui/rn/atomic/Button.d.ts +97 -0
  468. package/dist/reactnative/ui/rn/atomic/Button.js +75 -0
  469. package/dist/reactnative/ui/rn/atomic/TextField.d.ts +112 -0
  470. package/dist/reactnative/ui/rn/atomic/TextField.js +135 -0
  471. package/dist/reactnative/ui/rn/atomic/index.d.ts +2 -0
  472. package/dist/reactnative/ui/rn/atomic/index.js +18 -0
  473. package/dist/reactnative/ui/rn/index.d.ts +1 -0
  474. package/dist/reactnative/ui/rn/index.js +17 -0
  475. package/dist/styles/rn/_index.css +2 -0
  476. package/dist/styles/rn/atomic/Button.css +54 -0
  477. package/dist/styles/rn/atomic/TextField.css +77 -0
  478. package/dist/styles/rn/atomic/_index.css +2 -0
  479. package/dist/styles/rn/base/_index.css +1 -0
  480. package/dist/styles/rn/base/tailwind.css +3 -0
  481. package/dist/styles/rn.css +1 -0
  482. package/dist/styles/web/_index.css +1 -0
  483. package/dist/styles/web/layout/SafeArea.css +17 -0
  484. package/dist/styles/web/layout/_index.css +1 -0
  485. package/dist/styles/web.css +1 -0
  486. package/package.json +87 -0
@@ -0,0 +1,234 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Auth0IdentityClient = void 0;
4
+ const funnel_core_1 = require("@nascentdigital/funnel-core");
5
+ const react_native_auth0_1 = require("react-native-auth0");
6
+ const rn_1 = require("../../identity/rn");
7
+ // class
8
+ class Auth0IdentityClient extends rn_1.AbstractIdentityClient {
9
+ constructor(args) {
10
+ var _a;
11
+ // construct base
12
+ super();
13
+ // initialize instance variables
14
+ this.scope = args.scope;
15
+ this.customScheme = args.customScheme;
16
+ this.ephemeralSession = (_a = args.ephemeralSession) !== null && _a !== void 0 ? _a : false;
17
+ this.audience = args.audience;
18
+ this.userDb = args.userDb;
19
+ this.connections = new Map(Object.entries(args.connections));
20
+ console.log('[Auth0IdentityClient] constructed with userDb', this.userDb);
21
+ }
22
+ get availableMethods() {
23
+ return rn_1.IdentityClient.Method.all;
24
+ }
25
+ get auth0() {
26
+ // throw if not bound
27
+ const { _auth0 } = this;
28
+ if (!_auth0) {
29
+ throw new funnel_core_1.InvalidOperationError('Attempt to access auth0 before being bount');
30
+ }
31
+ // return interface
32
+ return _auth0;
33
+ }
34
+ set auth0(auth0) {
35
+ console.debug('[Auth0IdentityClient] setting auth0');
36
+ // bind context (needed for methods)
37
+ this._auth0 = auth0;
38
+ // update identity
39
+ const { user, isLoading } = auth0;
40
+ if (!isLoading) {
41
+ // get api token (if required)
42
+ if (user) {
43
+ this.getApiToken()
44
+ .then(apiToken => {
45
+ var _a, _b;
46
+ if (apiToken) {
47
+ console.log('[Auth0IdentityClient] creating authenticated user', { user, apiToken });
48
+ this.identity = new rn_1.AuthenticatedIdentity({
49
+ id: user.sub,
50
+ verified: (_b = (_a = user.emailVerified) !== null && _a !== void 0 ? _a : user.phoneNumberVerified) !== null && _b !== void 0 ? _b : false,
51
+ email: user.email,
52
+ nickname: user.nickname,
53
+ name: user.name,
54
+ apiToken
55
+ });
56
+ }
57
+ else {
58
+ console.log('[Auth0IdentityClient] no token for user', user);
59
+ this.identity = new rn_1.AnonymousIdentity({ id: 'test' });
60
+ }
61
+ })
62
+ .catch(e => {
63
+ console.error('[Auth0IdentityClient] failed to fetch token', e);
64
+ this.identity = new rn_1.AnonymousIdentity({ id: 'test' });
65
+ });
66
+ }
67
+ else {
68
+ console.log('[Auth0IdentityClient] no user is logged in', user);
69
+ this.identity = new rn_1.AnonymousIdentity({ id: 'test' });
70
+ }
71
+ }
72
+ }
73
+ async getApiToken() {
74
+ // skip if there's no audience
75
+ const { audience } = this;
76
+ if (!audience) {
77
+ return undefined;
78
+ }
79
+ // TODO: invalidate after some threshold
80
+ // create new promise if required
81
+ let { _apiTokenPromise } = this;
82
+ if (!_apiTokenPromise) {
83
+ _apiTokenPromise = new Promise((resolve, reject) => {
84
+ this.auth0
85
+ .getApiCredentials(audience, undefined, undefined, { audience })
86
+ .then(credentials => resolve(credentials.accessToken))
87
+ .catch(e => {
88
+ console.error('[Auth0IdentityClient] failed to fetch API token', e);
89
+ reject(new funnel_core_1.NotAuthenticatedError('Unable to fetch API token'));
90
+ });
91
+ });
92
+ }
93
+ // return promise
94
+ return _apiTokenPromise;
95
+ }
96
+ async login(method) {
97
+ var _a;
98
+ // determine connection
99
+ const { auth0, scope, audience, customScheme, ephemeralSession, connections } = this;
100
+ let connection = method
101
+ ? (_a = connections.get(method)) !== null && _a !== void 0 ? _a : undefined
102
+ : undefined;
103
+ switch (method) {
104
+ case 'google':
105
+ connection = connection !== null && connection !== void 0 ? connection : 'google-oauth2';
106
+ break;
107
+ case 'apple':
108
+ connection = connection !== null && connection !== void 0 ? connection : 'apple';
109
+ break;
110
+ case 'facebook':
111
+ connection = connection !== null && connection !== void 0 ? connection : 'facebook';
112
+ break;
113
+ case 'linkedin':
114
+ connection = connection !== null && connection !== void 0 ? connection : 'linkedin';
115
+ break;
116
+ }
117
+ console.log('[Auth0IdentityClient] signing in with connection', connection);
118
+ // authenticate (profile comes later)
119
+ try {
120
+ await auth0.authorize({ scope, audience, connection }, { customScheme, ephemeralSession });
121
+ }
122
+ // handle errors
123
+ catch (e) {
124
+ // handle web auth error
125
+ if (e instanceof react_native_auth0_1.WebAuthError) {
126
+ switch (e.code) {
127
+ // ignore cancellation
128
+ case react_native_auth0_1.WebAuthErrorCodes.USER_CANCELLED:
129
+ console.log('[Auth0IdentityClient] login cancelled');
130
+ break;
131
+ // TODO: or display an error
132
+ default:
133
+ console.error('[Auth0IdentityClient] login failed', e.code);
134
+ break;
135
+ }
136
+ }
137
+ // or unexpected errors
138
+ else {
139
+ console.error('[Auth0IdentityClient] failed to authenticate', e);
140
+ }
141
+ }
142
+ }
143
+ async loginWithEmail(email, password) {
144
+ // try to login
145
+ const { auth0, scope, audience, userDb = '' } = this;
146
+ try {
147
+ await auth0.loginWithPasswordRealm({
148
+ username: email,
149
+ password,
150
+ scope,
151
+ audience,
152
+ realm: userDb
153
+ });
154
+ console.log(`[Auth0IdentityClient] login success for ${email}`);
155
+ }
156
+ // handle errors
157
+ catch (e) {
158
+ console.error('[Auth0IdentityClient] email login failed', e);
159
+ }
160
+ }
161
+ async logout() {
162
+ const { auth0, customScheme, ephemeralSession } = this;
163
+ if (ephemeralSession) {
164
+ await auth0.clearCredentials();
165
+ }
166
+ else {
167
+ await auth0.clearSession({}, { customScheme });
168
+ }
169
+ }
170
+ async createAccount(email, password) {
171
+ // try to create account
172
+ const { auth0, scope, userDb = '' } = this;
173
+ try {
174
+ console.log(`[Auth0IdentityClient] creating mail account for ${email} in ${userDb}`);
175
+ const user = await auth0.createUser({
176
+ email,
177
+ password,
178
+ connection: userDb,
179
+ scope
180
+ });
181
+ console.log('[Auth0IdentityClient] user created', user);
182
+ }
183
+ // handle errors
184
+ catch (e) {
185
+ // handle web auth error
186
+ if (e instanceof react_native_auth0_1.AuthError) {
187
+ switch (e.code) {
188
+ // email issues
189
+ case 'user_exists':
190
+ case 'invalid_signup':
191
+ console.log('[Auth0IdentityClient] email already exists');
192
+ break;
193
+ // password issues
194
+ case 'invalid_password':
195
+ console.log('[Auth0IdentityClient] password isn\'t strong enough');
196
+ break;
197
+ case 'password_leaked':
198
+ console.log('[Auth0IdentityClient] password has been leaked and can\'t be used');
199
+ break;
200
+ // TODO: or display an error
201
+ default:
202
+ console.error('[Auth0IdentityClient] email create account failed', e.code);
203
+ break;
204
+ }
205
+ }
206
+ else if (e instanceof Error) {
207
+ console.error(`[Auth0IdentityClient] email create account failed for ${e.constructor.name}`, e);
208
+ }
209
+ // or unexpected errors
210
+ else {
211
+ console.error('[Auth0IdentityClient] email create account failed', e);
212
+ }
213
+ }
214
+ }
215
+ async resetAccount(email) {
216
+ // try to reset password
217
+ const { auth0, scope, userDb = '' } = this;
218
+ try {
219
+ await auth0.resetPassword({
220
+ email,
221
+ connection: userDb,
222
+ scope
223
+ });
224
+ }
225
+ // handle errors
226
+ catch (e) {
227
+ console.error('[Auth0IdentityClient] email reset password failed', e);
228
+ }
229
+ }
230
+ async deleteAccount() {
231
+ throw new funnel_core_1.NotImplementedError();
232
+ }
233
+ }
234
+ exports.Auth0IdentityClient = Auth0IdentityClient;
@@ -0,0 +1,27 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { IdentityClient, RNIdentityClientProvider } from '../../identity/rn';
3
+ import { Auth0IdentityClient } from './Auth0IdentityClient';
4
+ export declare class Auth0IdentityClientProvider implements RNIdentityClientProvider {
5
+ readonly domain: string;
6
+ readonly clientId: string;
7
+ readonly scope: string;
8
+ readonly customScheme: string;
9
+ readonly ephemeralSession: boolean;
10
+ readonly audience?: string;
11
+ readonly userDb?: string;
12
+ readonly connections: Readonly<Partial<Record<IdentityClient.Method, string>>>;
13
+ constructor(args: Auth0IdentityClientProvider.ConstructorArgs);
14
+ createProvider(): ({ children }: PropsWithChildren) => import("react").JSX.Element;
15
+ readonly ProviderComponent: typeof Auth0IdentityProvider;
16
+ }
17
+ export declare namespace Auth0IdentityClientProvider {
18
+ type ConstructorArgs = Auth0IdentityClient.ConstructorArgs & {
19
+ domain: string;
20
+ clientId: string;
21
+ };
22
+ }
23
+ declare function Auth0IdentityProvider({ children, ...args }: Auth0IdentityProvider.Props): import("react").JSX.Element;
24
+ export declare namespace Auth0IdentityProvider {
25
+ type Props = PropsWithChildren & Auth0IdentityClient.ConstructorArgs;
26
+ }
27
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Auth0IdentityClientProvider = void 0;
15
+ const react_1 = require("react");
16
+ const react_native_auth0_1 = require("react-native-auth0");
17
+ const rn_1 = require("../../identity/rn");
18
+ const Auth0IdentityClient_1 = require("./Auth0IdentityClient");
19
+ // class
20
+ class Auth0IdentityClientProvider {
21
+ constructor(args) {
22
+ var _a, _b;
23
+ this.ProviderComponent = Auth0IdentityProvider;
24
+ // initialize instance variables
25
+ this.domain = args.domain;
26
+ this.clientId = args.clientId;
27
+ this.scope = args.scope;
28
+ this.customScheme = args.customScheme;
29
+ this.ephemeralSession = (_a = args.ephemeralSession) !== null && _a !== void 0 ? _a : false;
30
+ this.audience = args.audience;
31
+ this.userDb = args.userDb;
32
+ this.connections = (_b = args.connections) !== null && _b !== void 0 ? _b : {};
33
+ }
34
+ createProvider() {
35
+ // bind props
36
+ const { domain, clientId, scope, customScheme, ephemeralSession, audience, userDb, connections } = this;
37
+ // return provider
38
+ return function Provider({ children }) {
39
+ return (<react_native_auth0_1.Auth0Provider domain={domain} clientId={clientId}>
40
+ <Auth0IdentityProvider scope={scope} customScheme={customScheme} ephemeralSession={ephemeralSession} audience={audience} userDb={userDb} connections={connections}>
41
+ {children}
42
+ </Auth0IdentityProvider>
43
+ </react_native_auth0_1.Auth0Provider>);
44
+ };
45
+ }
46
+ }
47
+ exports.Auth0IdentityClientProvider = Auth0IdentityClientProvider;
48
+ // provider
49
+ function Auth0IdentityProvider(_a) {
50
+ var { children } = _a, args = __rest(_a, ["children"]);
51
+ // bind context
52
+ const identityClient = (0, react_1.useMemo)(() => new Auth0IdentityClient_1.Auth0IdentityClient(args), [args]);
53
+ const context = (0, react_1.useMemo)(() => ({ identityClient }), [identityClient]);
54
+ // bind auth0
55
+ identityClient.auth0 = (0, react_native_auth0_1.useAuth0)();
56
+ // render
57
+ return (<rn_1.IdentityClientContext.Provider value={context}>
58
+ {children}
59
+ </rn_1.IdentityClientContext.Provider>);
60
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Auth0IdentityClient';
2
+ export * from './Auth0IdentityClientProvider';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Auth0IdentityClient"), exports);
18
+ __exportStar(require("./Auth0IdentityClientProvider"), exports);
@@ -0,0 +1,6 @@
1
+ export type BridgeConnection = 'uninitialized' | 'initializing' | 'ready' | 'error';
2
+ export declare namespace BridgeConnection {
3
+ type ConnectArgs = {
4
+ webViewId: string;
5
+ };
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export declare namespace BridgeConstants {
2
+ namespace Window {
3
+ const initialState: "__nd_bridge_initialState";
4
+ const bridgeId: "__nd_bridgeId";
5
+ const bridge: "__nd_bridge";
6
+ }
7
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeConstants = void 0;
4
+ // namespace
5
+ var BridgeConstants;
6
+ (function (BridgeConstants) {
7
+ // internals
8
+ let Window;
9
+ (function (Window) {
10
+ // global variables
11
+ Window.initialState = '__nd_bridge_initialState';
12
+ Window.bridgeId = '__nd_bridgeId';
13
+ Window.bridge = '__nd_bridge';
14
+ })(Window = BridgeConstants.Window || (BridgeConstants.Window = {}));
15
+ })(BridgeConstants || (exports.BridgeConstants = BridgeConstants = {}));
@@ -0,0 +1,52 @@
1
+ import { SerializedIsometricError } from '@nascentdigital/funnel-core';
2
+ import { JsonValue } from 'type-fest';
3
+ import { BridgeMethod } from './BridgeMethod';
4
+ import { BridgeState } from './BridgeState';
5
+ export type BridgeEvent = BridgeEvent.Log | BridgeEvent.State.Sync | BridgeEvent.State.Set | BridgeEvent.Call.Invoke | BridgeEvent.Call.Result | BridgeEvent.Call.Error;
6
+ export declare namespace BridgeEvent {
7
+ type Log = {
8
+ __type: 'log';
9
+ webViewId: string;
10
+ level: Log.Level;
11
+ args: JsonValue[];
12
+ };
13
+ namespace Log {
14
+ type Level = 'debug' | 'info' | 'warn' | 'error';
15
+ }
16
+ namespace State {
17
+ type Sync = {
18
+ __type: 'state.sync';
19
+ state: BridgeState;
20
+ };
21
+ type Set = {
22
+ __type: 'state.set';
23
+ key: string;
24
+ value: JsonValue;
25
+ };
26
+ }
27
+ namespace Call {
28
+ type Invoke<TMethod extends BridgeMethod = BridgeMethod> = {
29
+ __type: 'call.invocation';
30
+ webViewId: string;
31
+ id: string;
32
+ method: TMethod['name'];
33
+ args: TMethod['args'];
34
+ };
35
+ type Result<TMethod extends BridgeMethod = BridgeMethod> = {
36
+ __type: 'call.result';
37
+ webViewId: string;
38
+ id: string;
39
+ method: TMethod['name'];
40
+ result: TMethod['result'];
41
+ };
42
+ type Error<TMethod extends BridgeMethod = BridgeMethod> = {
43
+ __type: 'call.error';
44
+ webViewId: string;
45
+ id: string;
46
+ method: TMethod['name'];
47
+ error: SerializedIsometricError;
48
+ };
49
+ }
50
+ function filter(event: any): event is BridgeEvent;
51
+ function parse(eventData: string): BridgeEvent | undefined;
52
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeEvent = void 0;
4
+ // extension
5
+ var BridgeEvent;
6
+ (function (BridgeEvent) {
7
+ // methods
8
+ function filter(event) {
9
+ return !!event
10
+ && typeof event === 'object'
11
+ && !Array.isArray(event)
12
+ && '__type' in event && typeof event.__type === 'string';
13
+ }
14
+ BridgeEvent.filter = filter;
15
+ function parse(eventData) {
16
+ // convert event
17
+ try {
18
+ // bail if not
19
+ const event = JSON.parse(eventData);
20
+ return filter(event) ? event : undefined;
21
+ }
22
+ // handle failure
23
+ catch (_a) {
24
+ return undefined;
25
+ }
26
+ }
27
+ BridgeEvent.parse = parse;
28
+ })(BridgeEvent || (exports.BridgeEvent = BridgeEvent = {}));
@@ -0,0 +1,12 @@
1
+ import { Transform } from '@nascentdigital/funnel-core';
2
+ import { JsonValue } from 'type-fest';
3
+ export type BridgeMethod<TMethodName extends string = string> = {
4
+ name: TMethodName;
5
+ args: BridgeMethod.Args;
6
+ result: BridgeMethod.Result;
7
+ };
8
+ export declare namespace BridgeMethod {
9
+ type Args = Record<string, JsonValue>;
10
+ type Result = JsonValue;
11
+ type Signature<TMethod extends BridgeMethod = BridgeMethod> = Transform.Async<TMethod['args'], TMethod['result']>;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ import { Callback, IsometricError } from '@nascentdigital/funnel-core';
2
+ import { BridgeEvent } from './BridgeEvent';
3
+ import { BridgeMethod } from './BridgeMethod';
4
+ export declare class BridgeMethodCall<TMethod extends BridgeMethod = BridgeMethod> {
5
+ readonly call: BridgeEvent.Call.Invoke<TMethod>;
6
+ private readonly _onResolve;
7
+ private readonly _onReject;
8
+ private _status;
9
+ constructor(args: BridgeMethodCall.ConstructorArgs<TMethod>);
10
+ get id(): string;
11
+ get method(): TMethod["name"];
12
+ get status(): BridgeMethodCall.Status;
13
+ resolve(result: TMethod['result']): Promise<void>;
14
+ reject(error: IsometricError): Promise<void>;
15
+ }
16
+ export declare namespace BridgeMethodCall {
17
+ type Status = 'pending' | 'resolved' | 'rejected';
18
+ type ConstructorArgs<TMethod extends BridgeMethod = BridgeMethod> = {
19
+ call: BridgeEvent.Call.Invoke<TMethod>;
20
+ onResolve: Callback.Async<TMethod['result']>;
21
+ onReject: Callback.Async<IsometricError>;
22
+ };
23
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BridgeMethodCall = void 0;
4
+ // class
5
+ class BridgeMethodCall {
6
+ constructor(args) {
7
+ // initialize instance variables
8
+ this.call = args.call;
9
+ this._onResolve = args.onResolve;
10
+ this._onReject = args.onReject;
11
+ this._status = 'pending';
12
+ }
13
+ get id() {
14
+ return this.call.id;
15
+ }
16
+ get method() {
17
+ return this.call.method;
18
+ }
19
+ get status() {
20
+ return this._status;
21
+ }
22
+ async resolve(result) {
23
+ console.debug('[BridgeMethodCall] resolving call with:', result);
24
+ // mark as resolved
25
+ this._status = 'resolved';
26
+ // resolve
27
+ await this._onResolve(result);
28
+ }
29
+ async reject(error) {
30
+ console.debug('[BridgeMethodCall] rejecting call with:', error);
31
+ // mark as resolved
32
+ this._status = 'rejected';
33
+ // resolve
34
+ await this._onReject(error);
35
+ }
36
+ }
37
+ exports.BridgeMethodCall = BridgeMethodCall;
@@ -0,0 +1,35 @@
1
+ import { StringKeyOf } from 'type-fest';
2
+ import type { NavigationCommand } from '../../nav/domain';
3
+ import { BridgeConnection } from './BridgeConnection';
4
+ import { BridgeMethod } from './BridgeMethod';
5
+ export type BridgeMethods<TMethod extends BridgeMethod = BridgeMethod> = {
6
+ [TMethodName in TMethod['name']]: BridgeMethod<TMethodName>;
7
+ };
8
+ export declare namespace BridgeMethods {
9
+ type Signatures<TMethods extends BridgeMethods = BridgeMethods> = {
10
+ [TMethodName in StringKeyOf<TMethods>]: BridgeMethod.Signature<TMethods[TMethodName]>;
11
+ };
12
+ type ForName<TMethods extends BridgeMethods = BridgeMethods, TMethodName extends StringKeyOf<TMethods> = StringKeyOf<TMethods>> = ({
13
+ [TKey in TMethodName]: TMethods[TKey];
14
+ })[TMethodName];
15
+ type Handler<TMethods extends BridgeMethods = BridgeMethods, TMethodName extends StringKeyOf<TMethods> = StringKeyOf<TMethods>> = (method: TMethodName, args: Args<TMethods, TMethodName>) => Promise<Result<TMethods, TMethodName>>;
16
+ type Args<TMethods extends BridgeMethods, TMethodName extends StringKeyOf<TMethods>> = TMethods[TMethodName]['args'];
17
+ type Result<TMethods extends BridgeMethods, TMethodName extends StringKeyOf<TMethods>> = TMethods[TMethodName]['result'];
18
+ type Native<TMethods extends BridgeMethods = BridgeMethods> = TMethods & {
19
+ 'app.connect': {
20
+ name: 'app.connect';
21
+ args: BridgeConnection.ConnectArgs;
22
+ result: true;
23
+ };
24
+ 'app.hideSplash': {
25
+ name: 'app.hideSplash';
26
+ args: {};
27
+ result: true;
28
+ };
29
+ 'app.navigate': {
30
+ name: 'app.navigate';
31
+ args: NavigationCommand;
32
+ result: true;
33
+ };
34
+ };
35
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ import type { Insets } from '@nascentdigital/funnel-core';
2
+ import { Jsonify, JsonValue, StringKeyOf } from 'type-fest';
3
+ import type { Identity } from '../../identity/domain';
4
+ import type { Profile } from '../../profile/domain';
5
+ export type BridgeState<TState extends BridgeState.Custom = BridgeState.Custom> = BridgeState.Core & TState;
6
+ export declare namespace BridgeState {
7
+ type Core = {
8
+ identityData: Identity.Data | null;
9
+ profileData: Jsonify<Profile.Data> | null;
10
+ safeArea: Readonly<Insets>;
11
+ };
12
+ type Custom = Omit<Record<string, JsonValue>, keyof Core>;
13
+ type Key<TState extends Custom = Custom> = StringKeyOf<Core> | StringKeyOf<TState>;
14
+ type Value<TState extends Custom, TKey extends Key<TState>> = TKey extends StringKeyOf<Core> ? Core[TKey] : TState[TKey];
15
+ type ValueBroken<TState extends Custom, TKey extends Key<TState>> = ({
16
+ [K in keyof TState]: TState[K];
17
+ } & {
18
+ [K in keyof Core]: Core[K];
19
+ })[TKey];
20
+ type Change<TState extends Custom, TKey extends Key<TState> = Key<TState>> = {
21
+ key: TKey;
22
+ value: Value<TState, TKey>;
23
+ };
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export * from './BridgeConnection';
2
+ export * from './BridgeConstants';
3
+ export * from './BridgeEvent';
4
+ export * from './BridgeMethod';
5
+ export * from './BridgeMethodCall';
6
+ export * from './BridgeMethods';
7
+ export * from './BridgeState';
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BridgeConnection"), exports);
18
+ __exportStar(require("./BridgeConstants"), exports);
19
+ __exportStar(require("./BridgeEvent"), exports);
20
+ __exportStar(require("./BridgeMethod"), exports);
21
+ __exportStar(require("./BridgeMethodCall"), exports);
22
+ __exportStar(require("./BridgeMethods"), exports);
23
+ __exportStar(require("./BridgeState"), exports);