@userflow-tech/react-native 0.2.0 → 0.3.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 (852) hide show
  1. package/README.md +116 -77
  2. package/app.plugin.js +11 -3
  3. package/babel-plugin/index.d.ts.map +1 -1
  4. package/babel-plugin/index.js +53 -6
  5. package/babel-plugin/index.js.map +1 -1
  6. package/babel-plugin.js +11 -3
  7. package/docs/deep-linking.md +70 -33
  8. package/docs/isolation.md +75 -0
  9. package/docs/troubleshooting.md +40 -17
  10. package/docs/webview-custom-banner-poc.md +64 -0
  11. package/expo-plugin/withUserflow.d.ts +3 -2
  12. package/expo-plugin/withUserflow.d.ts.map +1 -1
  13. package/expo-plugin/withUserflow.js +14 -8
  14. package/expo-plugin/withUserflow.js.map +1 -1
  15. package/lib/commonjs/anchors/AutoAnchorRegistry.js +37 -11
  16. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  17. package/lib/commonjs/anchors/fiber/fiberPath.js +122 -0
  18. package/lib/commonjs/anchors/fiber/fiberPath.js.map +1 -0
  19. package/lib/commonjs/anchors/fiber/findAnchorFiber.js +60 -50
  20. package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -1
  21. package/lib/commonjs/anchors/fiber/resolveFiberPath.js +220 -0
  22. package/lib/commonjs/anchors/fiber/resolveFiberPath.js.map +1 -0
  23. package/lib/commonjs/anchors/fiber/visibleRect.js +147 -0
  24. package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -0
  25. package/lib/commonjs/anchors/fiber/visibleScreens.js +73 -36
  26. package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
  27. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js +66 -0
  28. package/lib/commonjs/anchors/fiber/walkVisibleFibers.js.map +1 -0
  29. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js +51 -0
  30. package/lib/commonjs/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  31. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +22 -15
  32. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -1
  33. package/lib/commonjs/anchors/semanticMatcher.js +26 -8
  34. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -1
  35. package/lib/commonjs/anonymousId.js +4 -1
  36. package/lib/commonjs/anonymousId.js.map +1 -1
  37. package/lib/commonjs/authoring/ElementPickerOverlay.js +126 -50
  38. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
  39. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +32 -10
  40. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  41. package/lib/commonjs/authoring/chrome/ChromeButton.js +8 -3
  42. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -1
  43. package/lib/commonjs/authoring/chrome/ChromeIcon.js +4 -0
  44. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -1
  45. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +23 -10
  46. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -1
  47. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +19 -12
  48. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -1
  49. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +10 -0
  50. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -1
  51. package/lib/commonjs/authoring/chrome/icons/circle-exclamation.png +0 -0
  52. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  53. package/lib/commonjs/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  54. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation.png +0 -0
  55. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  56. package/lib/commonjs/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  57. package/lib/commonjs/authoring/chrome/tokens.js +7 -6
  58. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -1
  59. package/lib/commonjs/authoring/elementPickerController.js.map +1 -1
  60. package/lib/commonjs/authoring/fingerprintFromInstance.js +204 -4
  61. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -1
  62. package/lib/commonjs/authoring/hitTest.js +264 -16
  63. package/lib/commonjs/authoring/hitTest.js.map +1 -1
  64. package/lib/commonjs/authoring/hostAtPoint.js +204 -0
  65. package/lib/commonjs/authoring/hostAtPoint.js.map +1 -0
  66. package/lib/commonjs/content/BannerStepButton.js +68 -0
  67. package/lib/commonjs/content/BannerStepButton.js.map +1 -0
  68. package/lib/commonjs/content/buttonAppearance.js +16 -0
  69. package/lib/commonjs/content/buttonAppearance.js.map +1 -1
  70. package/lib/commonjs/content/resolveBannerButtonChrome.js +44 -0
  71. package/lib/commonjs/content/resolveBannerButtonChrome.js.map +1 -0
  72. package/lib/commonjs/content/themeColor.js +15 -0
  73. package/lib/commonjs/content/themeColor.js.map +1 -1
  74. package/lib/commonjs/deepLinking.js +4 -4
  75. package/lib/commonjs/evalJs/EvalJsHost.js +244 -0
  76. package/lib/commonjs/evalJs/EvalJsHost.js.map +1 -0
  77. package/lib/commonjs/evalJs/bootstrap.js +84 -0
  78. package/lib/commonjs/evalJs/bootstrap.js.map +1 -0
  79. package/lib/commonjs/evalJs/bridgeMessages.js +143 -0
  80. package/lib/commonjs/evalJs/bridgeMessages.js.map +1 -0
  81. package/lib/commonjs/evalJs/evalJsBridge.js +31 -0
  82. package/lib/commonjs/evalJs/evalJsBridge.js.map +1 -0
  83. package/lib/commonjs/evalJs/evalJsController.js +124 -0
  84. package/lib/commonjs/evalJs/evalJsController.js.map +1 -0
  85. package/lib/commonjs/evalJs/getWebView.js +81 -0
  86. package/lib/commonjs/evalJs/getWebView.js.map +1 -0
  87. package/lib/commonjs/evalJs/injectEvalPending.js +19 -0
  88. package/lib/commonjs/evalJs/injectEvalPending.js.map +1 -0
  89. package/lib/commonjs/evalJs/types.js +2 -0
  90. package/lib/commonjs/evalJs/types.js.map +1 -0
  91. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js +40 -0
  92. package/lib/commonjs/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  93. package/lib/commonjs/expo-router/index.js +19 -0
  94. package/lib/commonjs/expo-router/index.js.map +1 -1
  95. package/lib/commonjs/expo-router/redirectSystemPath.js +75 -0
  96. package/lib/commonjs/expo-router/redirectSystemPath.js.map +1 -0
  97. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +2 -2
  98. package/lib/commonjs/index.js +118 -43
  99. package/lib/commonjs/index.js.map +1 -1
  100. package/lib/commonjs/lifecycle.js.map +1 -1
  101. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +14 -11
  102. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  103. package/lib/commonjs/navigation/openFlowNavigateUrl.js +12 -5
  104. package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -1
  105. package/lib/commonjs/pairing/PairingController.js +245 -27
  106. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  107. package/lib/commonjs/pairing/PreviewModeBanner.js +55 -16
  108. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  109. package/lib/commonjs/pairing/deepLink.js +22 -5
  110. package/lib/commonjs/pairing/deepLink.js.map +1 -1
  111. package/lib/commonjs/pairing/deviceId.js +47 -0
  112. package/lib/commonjs/pairing/deviceId.js.map +1 -0
  113. package/lib/commonjs/pairing/diagnostics.js +5 -4
  114. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  115. package/lib/commonjs/pairing/tokenStorage.js +47 -7
  116. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  117. package/lib/commonjs/pairing/usePairingState.js +3 -1
  118. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  119. package/lib/commonjs/pairing/usePreviewBarHold.js +139 -0
  120. package/lib/commonjs/pairing/usePreviewBarHold.js.map +1 -0
  121. package/lib/commonjs/runtime/BannerHost.js +96 -0
  122. package/lib/commonjs/runtime/BannerHost.js.map +1 -0
  123. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js +99 -0
  124. package/lib/commonjs/runtime/EmbedBannerPlaceholder.js.map +1 -0
  125. package/lib/commonjs/runtime/SdkErrorBoundary.js +61 -0
  126. package/lib/commonjs/runtime/SdkErrorBoundary.js.map +1 -0
  127. package/lib/commonjs/runtime/TargetPressBridge.js +19 -12
  128. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  129. package/lib/commonjs/runtime/UserflowOverlay.js +97 -0
  130. package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -0
  131. package/lib/commonjs/runtime/UserflowProvider.js +135 -65
  132. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  133. package/lib/commonjs/runtime/bannerEngine.js +63 -0
  134. package/lib/commonjs/runtime/bannerEngine.js.map +1 -0
  135. package/lib/commonjs/runtime/bannerEngineContext.js +11 -0
  136. package/lib/commonjs/runtime/bannerEngineContext.js.map +1 -0
  137. package/lib/commonjs/runtime/bannerPlacement.js +37 -0
  138. package/lib/commonjs/runtime/bannerPlacement.js.map +1 -0
  139. package/lib/commonjs/runtime/embedBannerRegistry.js +30 -0
  140. package/lib/commonjs/runtime/embedBannerRegistry.js.map +1 -0
  141. package/lib/commonjs/runtime/flowEngine.js +75 -3
  142. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  143. package/lib/commonjs/runtime/isolateCall.js +48 -0
  144. package/lib/commonjs/runtime/isolateCall.js.map +1 -0
  145. package/lib/commonjs/runtime/reportSdkError.js +19 -0
  146. package/lib/commonjs/runtime/reportSdkError.js.map +1 -0
  147. package/lib/commonjs/runtime/useBannerSession.js +37 -0
  148. package/lib/commonjs/runtime/useBannerSession.js.map +1 -0
  149. package/lib/commonjs/screenTracker.js +34 -9
  150. package/lib/commonjs/screenTracker.js.map +1 -1
  151. package/lib/commonjs/surfaces/BannerBar.js +160 -0
  152. package/lib/commonjs/surfaces/BannerBar.js.map +1 -0
  153. package/lib/commonjs/surfaces/BannerSurface.js +78 -0
  154. package/lib/commonjs/surfaces/BannerSurface.js.map +1 -0
  155. package/lib/commonjs/surfaces/MadeWithUserflow.js +12 -8
  156. package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -1
  157. package/lib/commonjs/surfaces/ModalSurface.js +1 -1
  158. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  159. package/lib/commonjs/surfaces/TooltipSurface.js +17 -1
  160. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  161. package/lib/commonjs/surfaces/bannerBarLayout.js +88 -0
  162. package/lib/commonjs/surfaces/bannerBarLayout.js.map +1 -0
  163. package/lib/commonjs/surfaces/bannerBarTokens.js +42 -0
  164. package/lib/commonjs/surfaces/bannerBarTokens.js.map +1 -0
  165. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +277 -0
  166. package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  167. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js +46 -0
  168. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  169. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js +26 -0
  170. package/lib/commonjs/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  171. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +41 -0
  172. package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  173. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +74 -0
  174. package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  175. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js +152 -0
  176. package/lib/commonjs/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  177. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +148 -0
  178. package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  179. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js +13 -0
  180. package/lib/commonjs/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  181. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js +49 -0
  182. package/lib/commonjs/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  183. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js +83 -0
  184. package/lib/commonjs/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  185. package/lib/commonjs/surfaces/resolveBannerTheme.js +22 -0
  186. package/lib/commonjs/surfaces/resolveBannerTheme.js.map +1 -0
  187. package/lib/commonjs/surfaces/safeArea.js +23 -0
  188. package/lib/commonjs/surfaces/safeArea.js.map +1 -1
  189. package/lib/commonjs/version.js +1 -1
  190. package/lib/module/anchors/AutoAnchorRegistry.js +37 -11
  191. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  192. package/lib/module/anchors/fiber/fiberPath.js +118 -0
  193. package/lib/module/anchors/fiber/fiberPath.js.map +1 -0
  194. package/lib/module/anchors/fiber/findAnchorFiber.js +60 -50
  195. package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -1
  196. package/lib/module/anchors/fiber/resolveFiberPath.js +215 -0
  197. package/lib/module/anchors/fiber/resolveFiberPath.js.map +1 -0
  198. package/lib/module/anchors/fiber/visibleRect.js +139 -0
  199. package/lib/module/anchors/fiber/visibleRect.js.map +1 -0
  200. package/lib/module/anchors/fiber/visibleScreens.js +73 -37
  201. package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
  202. package/lib/module/anchors/fiber/walkVisibleFibers.js +61 -0
  203. package/lib/module/anchors/fiber/walkVisibleFibers.js.map +1 -0
  204. package/lib/module/anchors/isInstanceOnVisibleScreen.js +46 -0
  205. package/lib/module/anchors/isInstanceOnVisibleScreen.js.map +1 -0
  206. package/lib/module/anchors/resolveAutoAnchorHost.js +22 -15
  207. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -1
  208. package/lib/module/anchors/semanticMatcher.js +26 -9
  209. package/lib/module/anchors/semanticMatcher.js.map +1 -1
  210. package/lib/module/anonymousId.js +4 -2
  211. package/lib/module/anonymousId.js.map +1 -1
  212. package/lib/module/authoring/ElementPickerOverlay.js +128 -52
  213. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
  214. package/lib/module/authoring/chrome/ChromeBottomSheet.js +32 -10
  215. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -1
  216. package/lib/module/authoring/chrome/ChromeButton.js +8 -3
  217. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -1
  218. package/lib/module/authoring/chrome/ChromeIcon.js +4 -0
  219. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -1
  220. package/lib/module/authoring/chrome/ChromeTopBar.js +23 -10
  221. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -1
  222. package/lib/module/authoring/chrome/DoubleTapBridge.js +19 -12
  223. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -1
  224. package/lib/module/authoring/chrome/doubleTapMonitor.js +10 -0
  225. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -1
  226. package/lib/module/authoring/chrome/icons/circle-exclamation.png +0 -0
  227. package/lib/module/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  228. package/lib/module/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/triangle-exclamation.png +0 -0
  230. package/lib/module/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  231. package/lib/module/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  232. package/lib/module/authoring/chrome/tokens.js +7 -6
  233. package/lib/module/authoring/chrome/tokens.js.map +1 -1
  234. package/lib/module/authoring/elementPickerController.js.map +1 -1
  235. package/lib/module/authoring/fingerprintFromInstance.js +198 -4
  236. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -1
  237. package/lib/module/authoring/hitTest.js +264 -18
  238. package/lib/module/authoring/hitTest.js.map +1 -1
  239. package/lib/module/authoring/hostAtPoint.js +199 -0
  240. package/lib/module/authoring/hostAtPoint.js.map +1 -0
  241. package/lib/module/content/BannerStepButton.js +63 -0
  242. package/lib/module/content/BannerStepButton.js.map +1 -0
  243. package/lib/module/content/buttonAppearance.js +14 -0
  244. package/lib/module/content/buttonAppearance.js.map +1 -1
  245. package/lib/module/content/resolveBannerButtonChrome.js +41 -0
  246. package/lib/module/content/resolveBannerButtonChrome.js.map +1 -0
  247. package/lib/module/content/themeColor.js +14 -0
  248. package/lib/module/content/themeColor.js.map +1 -1
  249. package/lib/module/deepLinking.js +4 -4
  250. package/lib/module/evalJs/EvalJsHost.js +239 -0
  251. package/lib/module/evalJs/EvalJsHost.js.map +1 -0
  252. package/lib/module/evalJs/bootstrap.js +76 -0
  253. package/lib/module/evalJs/bootstrap.js.map +1 -0
  254. package/lib/module/evalJs/bridgeMessages.js +139 -0
  255. package/lib/module/evalJs/bridgeMessages.js.map +1 -0
  256. package/lib/module/evalJs/evalJsBridge.js +25 -0
  257. package/lib/module/evalJs/evalJsBridge.js.map +1 -0
  258. package/lib/module/evalJs/evalJsController.js +119 -0
  259. package/lib/module/evalJs/evalJsController.js.map +1 -0
  260. package/lib/module/evalJs/getWebView.js +76 -0
  261. package/lib/module/evalJs/getWebView.js.map +1 -0
  262. package/lib/module/evalJs/injectEvalPending.js +15 -0
  263. package/lib/module/evalJs/injectEvalPending.js.map +1 -0
  264. package/lib/module/evalJs/types.js +2 -0
  265. package/lib/module/evalJs/types.js.map +1 -0
  266. package/lib/module/evalJs/useEvalJsWebViewInjection.js +35 -0
  267. package/lib/module/evalJs/useEvalJsWebViewInjection.js.map +1 -0
  268. package/lib/module/expo-router/index.js +1 -0
  269. package/lib/module/expo-router/index.js.map +1 -1
  270. package/lib/module/expo-router/redirectSystemPath.js +70 -0
  271. package/lib/module/expo-router/redirectSystemPath.js.map +1 -0
  272. package/lib/module/expo-router/useUserflowExpoRouter.js +2 -2
  273. package/lib/module/index.js +114 -45
  274. package/lib/module/index.js.map +1 -1
  275. package/lib/module/lifecycle.js.map +1 -1
  276. package/lib/module/navigation/WithUserflowReactNavigation.js +14 -11
  277. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  278. package/lib/module/navigation/openFlowNavigateUrl.js +12 -5
  279. package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -1
  280. package/lib/module/pairing/PairingController.js +245 -27
  281. package/lib/module/pairing/PairingController.js.map +1 -1
  282. package/lib/module/pairing/PreviewModeBanner.js +54 -16
  283. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  284. package/lib/module/pairing/deepLink.js +21 -5
  285. package/lib/module/pairing/deepLink.js.map +1 -1
  286. package/lib/module/pairing/deviceId.js +41 -0
  287. package/lib/module/pairing/deviceId.js.map +1 -0
  288. package/lib/module/pairing/diagnostics.js +5 -4
  289. package/lib/module/pairing/diagnostics.js.map +1 -1
  290. package/lib/module/pairing/tokenStorage.js +47 -7
  291. package/lib/module/pairing/tokenStorage.js.map +1 -1
  292. package/lib/module/pairing/usePairingState.js +3 -1
  293. package/lib/module/pairing/usePairingState.js.map +1 -1
  294. package/lib/module/pairing/usePreviewBarHold.js +134 -0
  295. package/lib/module/pairing/usePreviewBarHold.js.map +1 -0
  296. package/lib/module/runtime/BannerHost.js +92 -0
  297. package/lib/module/runtime/BannerHost.js.map +1 -0
  298. package/lib/module/runtime/EmbedBannerPlaceholder.js +94 -0
  299. package/lib/module/runtime/EmbedBannerPlaceholder.js.map +1 -0
  300. package/lib/module/runtime/SdkErrorBoundary.js +55 -0
  301. package/lib/module/runtime/SdkErrorBoundary.js.map +1 -0
  302. package/lib/module/runtime/TargetPressBridge.js +19 -12
  303. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  304. package/lib/module/runtime/UserflowOverlay.js +92 -0
  305. package/lib/module/runtime/UserflowOverlay.js.map +1 -0
  306. package/lib/module/runtime/UserflowProvider.js +136 -66
  307. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  308. package/lib/module/runtime/bannerEngine.js +55 -0
  309. package/lib/module/runtime/bannerEngine.js.map +1 -0
  310. package/lib/module/runtime/bannerEngineContext.js +7 -0
  311. package/lib/module/runtime/bannerEngineContext.js.map +1 -0
  312. package/lib/module/runtime/bannerPlacement.js +30 -0
  313. package/lib/module/runtime/bannerPlacement.js.map +1 -0
  314. package/lib/module/runtime/embedBannerRegistry.js +24 -0
  315. package/lib/module/runtime/embedBannerRegistry.js.map +1 -0
  316. package/lib/module/runtime/flowEngine.js +72 -3
  317. package/lib/module/runtime/flowEngine.js.map +1 -1
  318. package/lib/module/runtime/isolateCall.js +43 -0
  319. package/lib/module/runtime/isolateCall.js.map +1 -0
  320. package/lib/module/runtime/reportSdkError.js +15 -0
  321. package/lib/module/runtime/reportSdkError.js.map +1 -0
  322. package/lib/module/runtime/useBannerSession.js +33 -0
  323. package/lib/module/runtime/useBannerSession.js.map +1 -0
  324. package/lib/module/screenTracker.js +33 -9
  325. package/lib/module/screenTracker.js.map +1 -1
  326. package/lib/module/surfaces/BannerBar.js +155 -0
  327. package/lib/module/surfaces/BannerBar.js.map +1 -0
  328. package/lib/module/surfaces/BannerSurface.js +72 -0
  329. package/lib/module/surfaces/BannerSurface.js.map +1 -0
  330. package/lib/module/surfaces/MadeWithUserflow.js +11 -7
  331. package/lib/module/surfaces/MadeWithUserflow.js.map +1 -1
  332. package/lib/module/surfaces/ModalSurface.js +1 -1
  333. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  334. package/lib/module/surfaces/TooltipSurface.js +17 -1
  335. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  336. package/lib/module/surfaces/bannerBarLayout.js +69 -0
  337. package/lib/module/surfaces/bannerBarLayout.js.map +1 -0
  338. package/lib/module/surfaces/bannerBarTokens.js +37 -0
  339. package/lib/module/surfaces/bannerBarTokens.js.map +1 -0
  340. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +272 -0
  341. package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -0
  342. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js +42 -0
  343. package/lib/module/surfaces/bannerWebView/bannerAutoRunEvalJs.js.map +1 -0
  344. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js +19 -0
  345. package/lib/module/surfaces/bannerWebView/bannerAutoRunSession.js.map +1 -0
  346. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +35 -0
  347. package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -0
  348. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +69 -0
  349. package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -0
  350. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js +148 -0
  351. package/lib/module/surfaces/bannerWebView/bannerWebFrameCss.js.map +1 -0
  352. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +143 -0
  353. package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -0
  354. package/lib/module/surfaces/bannerWebView/buttonClassName.js +9 -0
  355. package/lib/module/surfaces/bannerWebView/buttonClassName.js.map +1 -0
  356. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js +42 -0
  357. package/lib/module/surfaces/bannerWebView/resolveCdnHost.js.map +1 -0
  358. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js +79 -0
  359. package/lib/module/surfaces/bannerWebView/richContentDocToHtml.js.map +1 -0
  360. package/lib/module/surfaces/resolveBannerTheme.js +16 -0
  361. package/lib/module/surfaces/resolveBannerTheme.js.map +1 -0
  362. package/lib/module/surfaces/safeArea.js +22 -0
  363. package/lib/module/surfaces/safeArea.js.map +1 -1
  364. package/lib/module/version.js +1 -1
  365. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  366. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  367. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts +12 -0
  368. package/lib/typescript/commonjs/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  370. package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  371. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  372. package/lib/typescript/commonjs/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +32 -0
  374. package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  375. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +6 -1
  376. package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  377. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  378. package/lib/typescript/commonjs/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  380. package/lib/typescript/commonjs/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  381. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +6 -4
  383. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/anonymousId.d.ts +1 -0
  385. package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +1 -0
  387. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  389. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  391. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  392. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  394. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  397. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +7 -6
  399. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -1
  400. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +2 -3
  401. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +57 -2
  403. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +47 -3
  405. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +7 -0
  407. package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts +14 -0
  409. package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +4 -0
  411. package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts +8 -0
  413. package/lib/typescript/commonjs/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  414. package/lib/typescript/commonjs/src/content/themeColor.d.ts +2 -0
  415. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/content/types.d.ts +1 -0
  417. package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -1
  418. package/lib/typescript/commonjs/src/deepLinking.d.ts +4 -4
  419. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts +14 -0
  420. package/lib/typescript/commonjs/src/evalJs/EvalJsHost.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts +18 -0
  422. package/lib/typescript/commonjs/src/evalJs/bootstrap.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts +37 -0
  424. package/lib/typescript/commonjs/src/evalJs/bridgeMessages.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts +16 -0
  426. package/lib/typescript/commonjs/src/evalJs/evalJsBridge.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts +24 -0
  428. package/lib/typescript/commonjs/src/evalJs/evalJsController.d.ts.map +1 -0
  429. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts +64 -0
  430. package/lib/typescript/commonjs/src/evalJs/getWebView.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts +4 -0
  432. package/lib/typescript/commonjs/src/evalJs/injectEvalPending.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/evalJs/types.d.ts +53 -0
  434. package/lib/typescript/commonjs/src/evalJs/types.d.ts.map +1 -0
  435. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  436. package/lib/typescript/commonjs/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/src/expo-router/index.d.ts +1 -0
  438. package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts +50 -0
  440. package/lib/typescript/commonjs/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  442. package/lib/typescript/commonjs/src/index.d.ts +16 -1
  443. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/lifecycle.d.ts +4 -1
  445. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  446. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +71 -4
  449. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  450. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +9 -1
  451. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +6 -2
  453. package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -1
  454. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts +12 -0
  455. package/lib/typescript/commonjs/src/pairing/deviceId.d.ts.map +1 -0
  456. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +3 -2
  457. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +14 -2
  459. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  461. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts +19 -0
  462. package/lib/typescript/commonjs/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  463. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts +16 -0
  464. package/lib/typescript/commonjs/src/runtime/BannerHost.d.ts.map +1 -0
  465. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  466. package/lib/typescript/commonjs/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts +34 -0
  468. package/lib/typescript/commonjs/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts +15 -0
  471. package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -0
  472. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +9 -3
  473. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  474. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts +12 -0
  475. package/lib/typescript/commonjs/src/runtime/bannerEngine.d.ts.map +1 -0
  476. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts +5 -0
  477. package/lib/typescript/commonjs/src/runtime/bannerEngineContext.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts +12 -0
  479. package/lib/typescript/commonjs/src/runtime/bannerPlacement.d.ts.map +1 -0
  480. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts +5 -0
  481. package/lib/typescript/commonjs/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  482. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +25 -1
  483. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  484. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts +20 -0
  485. package/lib/typescript/commonjs/src/runtime/isolateCall.d.ts.map +1 -0
  486. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts +10 -0
  487. package/lib/typescript/commonjs/src/runtime/reportSdkError.d.ts.map +1 -0
  488. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts +5 -0
  489. package/lib/typescript/commonjs/src/runtime/useBannerSession.d.ts.map +1 -0
  490. package/lib/typescript/commonjs/src/screenTracker.d.ts +7 -3
  491. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  492. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts +14 -0
  493. package/lib/typescript/commonjs/src/surfaces/BannerBar.d.ts.map +1 -0
  494. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +15 -0
  495. package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -0
  496. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +10 -6
  497. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  498. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  499. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts +15 -0
  500. package/lib/typescript/commonjs/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  501. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts +20 -0
  502. package/lib/typescript/commonjs/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  503. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  504. package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  505. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  506. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  507. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  508. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  509. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  510. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  511. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  512. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  513. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  514. package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  515. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  516. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  517. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  518. package/lib/typescript/commonjs/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  519. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  520. package/lib/typescript/commonjs/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  521. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  522. package/lib/typescript/commonjs/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  523. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts +7 -0
  524. package/lib/typescript/commonjs/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  525. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +6 -0
  526. package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -1
  527. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  528. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +14 -0
  529. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  530. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts +12 -0
  531. package/lib/typescript/module/src/anchors/fiber/fiberPath.d.ts.map +1 -0
  532. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +5 -4
  533. package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -1
  534. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts +24 -0
  535. package/lib/typescript/module/src/anchors/fiber/resolveFiberPath.d.ts.map +1 -0
  536. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +32 -0
  537. package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -0
  538. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +6 -1
  539. package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
  540. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts +20 -0
  541. package/lib/typescript/module/src/anchors/fiber/walkVisibleFibers.d.ts.map +1 -0
  542. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts +19 -0
  543. package/lib/typescript/module/src/anchors/isInstanceOnVisibleScreen.d.ts.map +1 -0
  544. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -1
  545. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +6 -4
  546. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -1
  547. package/lib/typescript/module/src/anonymousId.d.ts +1 -0
  548. package/lib/typescript/module/src/anonymousId.d.ts.map +1 -1
  549. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +1 -0
  550. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
  551. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +14 -3
  552. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -1
  553. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -1
  554. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +1 -1
  555. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -1
  556. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +12 -4
  557. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -1
  558. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -1
  559. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +5 -0
  560. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -1
  561. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +7 -6
  562. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -1
  563. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +2 -3
  564. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -1
  565. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +57 -2
  566. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -1
  567. package/lib/typescript/module/src/authoring/hitTest.d.ts +47 -3
  568. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
  569. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +7 -0
  570. package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -0
  571. package/lib/typescript/module/src/content/BannerStepButton.d.ts +14 -0
  572. package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -0
  573. package/lib/typescript/module/src/content/buttonAppearance.d.ts +4 -0
  574. package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -1
  575. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts +8 -0
  576. package/lib/typescript/module/src/content/resolveBannerButtonChrome.d.ts.map +1 -0
  577. package/lib/typescript/module/src/content/themeColor.d.ts +2 -0
  578. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  579. package/lib/typescript/module/src/content/types.d.ts +1 -0
  580. package/lib/typescript/module/src/content/types.d.ts.map +1 -1
  581. package/lib/typescript/module/src/deepLinking.d.ts +4 -4
  582. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts +14 -0
  583. package/lib/typescript/module/src/evalJs/EvalJsHost.d.ts.map +1 -0
  584. package/lib/typescript/module/src/evalJs/bootstrap.d.ts +18 -0
  585. package/lib/typescript/module/src/evalJs/bootstrap.d.ts.map +1 -0
  586. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts +37 -0
  587. package/lib/typescript/module/src/evalJs/bridgeMessages.d.ts.map +1 -0
  588. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts +16 -0
  589. package/lib/typescript/module/src/evalJs/evalJsBridge.d.ts.map +1 -0
  590. package/lib/typescript/module/src/evalJs/evalJsController.d.ts +24 -0
  591. package/lib/typescript/module/src/evalJs/evalJsController.d.ts.map +1 -0
  592. package/lib/typescript/module/src/evalJs/getWebView.d.ts +64 -0
  593. package/lib/typescript/module/src/evalJs/getWebView.d.ts.map +1 -0
  594. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts +4 -0
  595. package/lib/typescript/module/src/evalJs/injectEvalPending.d.ts.map +1 -0
  596. package/lib/typescript/module/src/evalJs/types.d.ts +53 -0
  597. package/lib/typescript/module/src/evalJs/types.d.ts.map +1 -0
  598. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts +12 -0
  599. package/lib/typescript/module/src/evalJs/useEvalJsWebViewInjection.d.ts.map +1 -0
  600. package/lib/typescript/module/src/expo-router/index.d.ts +1 -0
  601. package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -1
  602. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts +50 -0
  603. package/lib/typescript/module/src/expo-router/redirectSystemPath.d.ts.map +1 -0
  604. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +2 -2
  605. package/lib/typescript/module/src/index.d.ts +16 -1
  606. package/lib/typescript/module/src/index.d.ts.map +1 -1
  607. package/lib/typescript/module/src/lifecycle.d.ts +4 -1
  608. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  609. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  610. package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -1
  611. package/lib/typescript/module/src/pairing/PairingController.d.ts +71 -4
  612. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  613. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +9 -1
  614. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  615. package/lib/typescript/module/src/pairing/deepLink.d.ts +6 -2
  616. package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -1
  617. package/lib/typescript/module/src/pairing/deviceId.d.ts +12 -0
  618. package/lib/typescript/module/src/pairing/deviceId.d.ts.map +1 -0
  619. package/lib/typescript/module/src/pairing/diagnostics.d.ts +3 -2
  620. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  621. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +14 -2
  622. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  623. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  624. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts +19 -0
  625. package/lib/typescript/module/src/pairing/usePreviewBarHold.d.ts.map +1 -0
  626. package/lib/typescript/module/src/runtime/BannerHost.d.ts +16 -0
  627. package/lib/typescript/module/src/runtime/BannerHost.d.ts.map +1 -0
  628. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts +18 -0
  629. package/lib/typescript/module/src/runtime/EmbedBannerPlaceholder.d.ts.map +1 -0
  630. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts +34 -0
  631. package/lib/typescript/module/src/runtime/SdkErrorBoundary.d.ts.map +1 -0
  632. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  633. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts +15 -0
  634. package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -0
  635. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +9 -3
  636. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  637. package/lib/typescript/module/src/runtime/bannerEngine.d.ts +12 -0
  638. package/lib/typescript/module/src/runtime/bannerEngine.d.ts.map +1 -0
  639. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts +5 -0
  640. package/lib/typescript/module/src/runtime/bannerEngineContext.d.ts.map +1 -0
  641. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts +12 -0
  642. package/lib/typescript/module/src/runtime/bannerPlacement.d.ts.map +1 -0
  643. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts +5 -0
  644. package/lib/typescript/module/src/runtime/embedBannerRegistry.d.ts.map +1 -0
  645. package/lib/typescript/module/src/runtime/flowEngine.d.ts +25 -1
  646. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  647. package/lib/typescript/module/src/runtime/isolateCall.d.ts +20 -0
  648. package/lib/typescript/module/src/runtime/isolateCall.d.ts.map +1 -0
  649. package/lib/typescript/module/src/runtime/reportSdkError.d.ts +10 -0
  650. package/lib/typescript/module/src/runtime/reportSdkError.d.ts.map +1 -0
  651. package/lib/typescript/module/src/runtime/useBannerSession.d.ts +5 -0
  652. package/lib/typescript/module/src/runtime/useBannerSession.d.ts.map +1 -0
  653. package/lib/typescript/module/src/screenTracker.d.ts +7 -3
  654. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  655. package/lib/typescript/module/src/surfaces/BannerBar.d.ts +14 -0
  656. package/lib/typescript/module/src/surfaces/BannerBar.d.ts.map +1 -0
  657. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +15 -0
  658. package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -0
  659. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +10 -6
  660. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -1
  661. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  662. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts +15 -0
  663. package/lib/typescript/module/src/surfaces/bannerBarLayout.d.ts.map +1 -0
  664. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts +20 -0
  665. package/lib/typescript/module/src/surfaces/bannerBarTokens.d.ts.map +1 -0
  666. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts +10 -0
  667. package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -0
  668. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts +7 -0
  669. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunEvalJs.d.ts.map +1 -0
  670. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts +6 -0
  671. package/lib/typescript/module/src/surfaces/bannerWebView/bannerAutoRunSession.d.ts.map +1 -0
  672. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +13 -0
  673. package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -0
  674. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts +5 -0
  675. package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -0
  676. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts +6 -0
  677. package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebFrameCss.d.ts.map +1 -0
  678. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts +9 -0
  679. package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -0
  680. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts +3 -0
  681. package/lib/typescript/module/src/surfaces/bannerWebView/buttonClassName.d.ts.map +1 -0
  682. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts +10 -0
  683. package/lib/typescript/module/src/surfaces/bannerWebView/resolveCdnHost.d.ts.map +1 -0
  684. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts +3 -0
  685. package/lib/typescript/module/src/surfaces/bannerWebView/richContentDocToHtml.d.ts.map +1 -0
  686. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts +7 -0
  687. package/lib/typescript/module/src/surfaces/resolveBannerTheme.d.ts.map +1 -0
  688. package/lib/typescript/module/src/surfaces/safeArea.d.ts +6 -0
  689. package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -1
  690. package/lib/typescript/module/src/version.d.ts +1 -1
  691. package/package.json +4 -3
  692. package/src/anchors/AutoAnchorRegistry.ts +41 -11
  693. package/src/anchors/fiber/fiberPath.ts +117 -0
  694. package/src/anchors/fiber/findAnchorFiber.ts +57 -47
  695. package/src/anchors/fiber/resolveFiberPath.ts +215 -0
  696. package/src/anchors/fiber/visibleRect.ts +153 -0
  697. package/src/anchors/fiber/visibleScreens.ts +74 -36
  698. package/src/anchors/fiber/walkVisibleFibers.ts +65 -0
  699. package/src/anchors/isInstanceOnVisibleScreen.ts +55 -0
  700. package/src/anchors/resolveAutoAnchorHost.ts +17 -15
  701. package/src/anchors/semanticMatcher.ts +38 -14
  702. package/src/anonymousId.ts +2 -1
  703. package/src/authoring/ElementPickerOverlay.tsx +168 -59
  704. package/src/authoring/chrome/ChromeBottomSheet.tsx +49 -8
  705. package/src/authoring/chrome/ChromeButton.tsx +9 -4
  706. package/src/authoring/chrome/ChromeIcon.tsx +10 -1
  707. package/src/authoring/chrome/ChromeTopBar.tsx +39 -15
  708. package/src/authoring/chrome/DoubleTapBridge.tsx +19 -12
  709. package/src/authoring/chrome/doubleTapMonitor.ts +10 -0
  710. package/src/authoring/chrome/icons/circle-exclamation.png +0 -0
  711. package/src/authoring/chrome/icons/circle-exclamation@2x.png +0 -0
  712. package/src/authoring/chrome/icons/circle-exclamation@3x.png +0 -0
  713. package/src/authoring/chrome/icons/triangle-exclamation.png +0 -0
  714. package/src/authoring/chrome/icons/triangle-exclamation@2x.png +0 -0
  715. package/src/authoring/chrome/icons/triangle-exclamation@3x.png +0 -0
  716. package/src/authoring/chrome/tokens.ts +7 -2
  717. package/src/authoring/elementPickerController.ts +2 -4
  718. package/src/authoring/fingerprintFromInstance.ts +170 -4
  719. package/src/authoring/hitTest.ts +324 -16
  720. package/src/authoring/hostAtPoint.ts +247 -0
  721. package/src/content/BannerStepButton.tsx +91 -0
  722. package/src/content/buttonAppearance.ts +16 -0
  723. package/src/content/resolveBannerButtonChrome.ts +49 -0
  724. package/src/content/themeColor.ts +15 -0
  725. package/src/content/types.ts +1 -0
  726. package/src/deepLinking.ts +4 -4
  727. package/src/evalJs/EvalJsHost.tsx +255 -0
  728. package/src/evalJs/bootstrap.ts +83 -0
  729. package/src/evalJs/bridgeMessages.ts +134 -0
  730. package/src/evalJs/evalJsBridge.ts +42 -0
  731. package/src/evalJs/evalJsController.ts +127 -0
  732. package/src/evalJs/getWebView.ts +124 -0
  733. package/src/evalJs/injectEvalPending.ts +14 -0
  734. package/src/evalJs/types.ts +56 -0
  735. package/src/evalJs/useEvalJsWebViewInjection.ts +37 -0
  736. package/src/expo-router/index.ts +8 -0
  737. package/src/expo-router/redirectSystemPath.ts +86 -0
  738. package/src/expo-router/useUserflowExpoRouter.ts +2 -2
  739. package/src/index.ts +129 -45
  740. package/src/lifecycle.ts +4 -1
  741. package/src/navigation/WithUserflowReactNavigation.tsx +13 -10
  742. package/src/navigation/openFlowNavigateUrl.ts +12 -5
  743. package/src/pairing/PairingController.ts +283 -29
  744. package/src/pairing/PreviewModeBanner.tsx +71 -14
  745. package/src/pairing/deepLink.ts +23 -5
  746. package/src/pairing/deviceId.ts +43 -0
  747. package/src/pairing/diagnostics.ts +6 -4
  748. package/src/pairing/tokenStorage.ts +60 -7
  749. package/src/pairing/usePairingState.ts +2 -0
  750. package/src/pairing/usePreviewBarHold.ts +160 -0
  751. package/src/runtime/BannerHost.tsx +102 -0
  752. package/src/runtime/EmbedBannerPlaceholder.tsx +115 -0
  753. package/src/runtime/SdkErrorBoundary.tsx +77 -0
  754. package/src/runtime/TargetPressBridge.tsx +19 -12
  755. package/src/runtime/UserflowOverlay.tsx +118 -0
  756. package/src/runtime/UserflowProvider.tsx +139 -64
  757. package/src/runtime/bannerEngine.ts +55 -0
  758. package/src/runtime/bannerEngineContext.ts +5 -0
  759. package/src/runtime/bannerPlacement.ts +36 -0
  760. package/src/runtime/embedBannerRegistry.ts +28 -0
  761. package/src/runtime/flowEngine.ts +76 -3
  762. package/src/runtime/isolateCall.ts +53 -0
  763. package/src/runtime/reportSdkError.ts +12 -0
  764. package/src/runtime/useBannerSession.ts +35 -0
  765. package/src/screenTracker.ts +34 -8
  766. package/src/surfaces/BannerBar.tsx +176 -0
  767. package/src/surfaces/BannerSurface.tsx +82 -0
  768. package/src/surfaces/MadeWithUserflow.tsx +15 -10
  769. package/src/surfaces/ModalSurface.tsx +1 -1
  770. package/src/surfaces/TooltipSurface.tsx +17 -1
  771. package/src/surfaces/bannerBarLayout.ts +74 -0
  772. package/src/surfaces/bannerBarTokens.ts +34 -0
  773. package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +312 -0
  774. package/src/surfaces/bannerWebView/bannerAutoRunEvalJs.ts +44 -0
  775. package/src/surfaces/bannerWebView/bannerAutoRunSession.ts +19 -0
  776. package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +38 -0
  777. package/src/surfaces/bannerWebView/bannerThemeStyles.ts +91 -0
  778. package/src/surfaces/bannerWebView/bannerWebFrameCss.ts +145 -0
  779. package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +178 -0
  780. package/src/surfaces/bannerWebView/buttonClassName.ts +15 -0
  781. package/src/surfaces/bannerWebView/resolveCdnHost.ts +47 -0
  782. package/src/surfaces/bannerWebView/richContentDocToHtml.ts +99 -0
  783. package/src/surfaces/resolveBannerTheme.ts +18 -0
  784. package/src/surfaces/safeArea.ts +29 -0
  785. package/src/version.ts +1 -1
  786. package/vendor/core/dist/attributes.d.ts.map +1 -1
  787. package/vendor/core/dist/attributes.js +4 -4
  788. package/vendor/core/dist/attributes.js.map +1 -1
  789. package/vendor/core/dist/engine/BannerSessionEngine.d.ts +73 -0
  790. package/vendor/core/dist/engine/BannerSessionEngine.d.ts.map +1 -0
  791. package/vendor/core/dist/engine/BannerSessionEngine.js +236 -0
  792. package/vendor/core/dist/engine/BannerSessionEngine.js.map +1 -0
  793. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +41 -1
  794. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  795. package/vendor/core/dist/engine/FlowSessionEngine.js +167 -28
  796. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  797. package/vendor/core/dist/engine/PairingEngine.d.ts +38 -2
  798. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  799. package/vendor/core/dist/engine/PairingEngine.js +19 -2
  800. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  801. package/vendor/core/dist/engine/UserflowCore.d.ts +10 -1
  802. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  803. package/vendor/core/dist/engine/UserflowCore.js +47 -27
  804. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  805. package/vendor/core/dist/engine/handleActions.d.ts +17 -3
  806. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  807. package/vendor/core/dist/engine/handleActions.js +17 -14
  808. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  809. package/vendor/core/dist/engine/trackCondition.d.ts +2 -0
  810. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -1
  811. package/vendor/core/dist/engine/trackCondition.js +4 -2
  812. package/vendor/core/dist/engine/trackCondition.js.map +1 -1
  813. package/vendor/core/dist/engine/trackStepTriggers.d.ts +11 -1
  814. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -1
  815. package/vendor/core/dist/engine/trackStepTriggers.js +42 -16
  816. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -1
  817. package/vendor/core/dist/errors.d.ts +11 -1
  818. package/vendor/core/dist/errors.d.ts.map +1 -1
  819. package/vendor/core/dist/errors.js +2 -1
  820. package/vendor/core/dist/errors.js.map +1 -1
  821. package/vendor/core/dist/eventAttributes.d.ts.map +1 -1
  822. package/vendor/core/dist/eventAttributes.js +4 -2
  823. package/vendor/core/dist/eventAttributes.js.map +1 -1
  824. package/vendor/core/dist/index.d.ts +4 -1
  825. package/vendor/core/dist/index.d.ts.map +1 -1
  826. package/vendor/core/dist/index.js +1 -0
  827. package/vendor/core/dist/index.js.map +1 -1
  828. package/vendor/core/dist/normalizeAttributes.js +9 -7
  829. package/vendor/core/dist/normalizeAttributes.js.map +1 -1
  830. package/vendor/core/dist/transport/pairing.d.ts +5 -0
  831. package/vendor/core/dist/transport/pairing.d.ts.map +1 -1
  832. package/vendor/core/dist/transport/pairing.js +69 -2
  833. package/vendor/core/dist/transport/pairing.js.map +1 -1
  834. package/vendor/core/dist/transport/phoenix.d.ts +8 -0
  835. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  836. package/vendor/core/dist/transport/phoenix.js +16 -2
  837. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  838. package/vendor/core/dist/version.d.ts +1 -1
  839. package/vendor/core/dist/version.js +1 -1
  840. package/vendor/core/package.json +1 -1
  841. package/vendor/protocol/dist/autoData.d.ts +8 -15
  842. package/vendor/protocol/dist/autoData.d.ts.map +1 -1
  843. package/vendor/protocol/dist/autoData.js.map +1 -1
  844. package/vendor/protocol/dist/flows.d.ts +58 -2
  845. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  846. package/vendor/protocol/dist/flows.js +20 -2
  847. package/vendor/protocol/dist/flows.js.map +1 -1
  848. package/vendor/protocol/dist/messages.d.ts +22 -12
  849. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  850. package/vendor/protocol/dist/messages.js +5 -2
  851. package/vendor/protocol/dist/messages.js.map +1 -1
  852. package/vendor/protocol/package.json +1 -1
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BANNER_WEB_FRAME_CSS = void 0;
7
+ /**
8
+ * Banner + bubble-button subset of web `bubble-frame.styl` for custom-banner WebViews.
9
+ * Custom theme CSS targets the same class names as userflow.js.
10
+ */
11
+ const BANNER_WEB_FRAME_CSS = exports.BANNER_WEB_FRAME_CSS = `
12
+ .userflowjs-theme-root {
13
+ line-height: var(--userflow-line-height, 24px);
14
+ color: var(--userflow-main-foreground-color, inherit);
15
+ font-weight: var(--userflow-font-weight-normal, 400);
16
+ }
17
+ .userflowjs-theme-root, .userflowjs-theme-root button {
18
+ font-family: var(--userflow-font-family, system-ui, sans-serif);
19
+ font-size: var(--userflow-font-size, 16px);
20
+ }
21
+ .userflowjs-theme-root b, .userflowjs-theme-root strong {
22
+ font-weight: var(--userflow-font-weight-bold, 600);
23
+ }
24
+ .userflowjs-theme-root a {
25
+ color: var(--userflow-link-color, inherit);
26
+ text-decoration: underline;
27
+ }
28
+ .userflowjs-theme-root h1 {
29
+ font-size: var(--userflow-h1-font-size, 1.25em);
30
+ font-weight: var(--userflow-font-weight-bold, 600);
31
+ margin: 0 0 16px;
32
+ }
33
+ .userflowjs-theme-root h2 {
34
+ font-size: var(--userflow-h2-font-size, 1.125em);
35
+ font-weight: var(--userflow-font-weight-bold, 600);
36
+ margin: 0 0 16px;
37
+ }
38
+ .userflowjs-theme-root p {
39
+ margin: 0 0 16px;
40
+ }
41
+ .userflowjs-button-reset {
42
+ outline: 0;
43
+ border: 0;
44
+ padding: 0;
45
+ margin: 0;
46
+ background-color: transparent;
47
+ cursor: pointer;
48
+ }
49
+ .userflowjs-bubble-button-base {
50
+ display: inline-block;
51
+ padding: calc((var(--userflow-button-height, 32px) - var(--userflow-line-height, 24px)) / 2) var(--userflow-font-size, 16px);
52
+ text-align: center;
53
+ white-space: nowrap;
54
+ overflow: hidden;
55
+ text-overflow: ellipsis;
56
+ border-radius: 0.375em;
57
+ font-size: var(--userflow-font-size, 16px);
58
+ font-weight: var(--userflow-font-weight-bold, 600);
59
+ height: var(--userflow-button-height, 32px);
60
+ line-height: var(--userflow-line-height, 24px);
61
+ border: 0;
62
+ cursor: pointer;
63
+ }
64
+ .userflowjs-bubble-button {
65
+ display: inline-flex;
66
+ align-items: center;
67
+ }
68
+ .userflowjs-bubble-button--primary,
69
+ .userflowjs-bubble-button--default,
70
+ .userflowjs-bubble-button--banner-primary,
71
+ .userflowjs-bubble-button--banner-secondary {
72
+ font-family: var(--userflow-font-family, system-ui, sans-serif);
73
+ border-radius: var(--userflow-button-border-radius, 0.375em);
74
+ min-width: var(--userflow-button-min-width, 0);
75
+ white-space: normal;
76
+ max-width: 100%;
77
+ }
78
+ .userflowjs-bubble-button--banner-primary {
79
+ background-color: var(--userflow-banner-foreground-color);
80
+ color: var(--userflow-banner-background-color);
81
+ padding-left: 12px;
82
+ padding-right: 12px;
83
+ }
84
+ .userflowjs-bubble-button--banner-secondary {
85
+ background-color: var(--userflow-banner-background-color);
86
+ color: var(--userflow-banner-foreground-color);
87
+ border: 1px solid var(--userflow-banner-foreground-color);
88
+ padding-left: 12px;
89
+ padding-right: 12px;
90
+ }
91
+ .userflowjs-banner-root {
92
+ position: relative;
93
+ background: var(--userflow-banner-background-color);
94
+ color: var(--userflow-banner-foreground-color);
95
+ padding: 8px;
96
+ display: flex;
97
+ justify-content: space-between;
98
+ align-items: center;
99
+ box-sizing: border-box;
100
+ }
101
+ .userflowjs-banner-root--content-layout-START .userflowjs-banner-inner {
102
+ justify-content: flex-start;
103
+ }
104
+ .userflowjs-banner-root--content-layout-CENTER .userflowjs-banner-inner {
105
+ justify-content: center;
106
+ }
107
+ .userflowjs-banner-root--content-layout-SPACE_BETWEEN .userflowjs-banner-inner {
108
+ justify-content: space-between;
109
+ }
110
+ .userflowjs-banner-inner {
111
+ flex: 1 1 auto;
112
+ display: flex;
113
+ flex-wrap: wrap;
114
+ align-items: center;
115
+ column-gap: 16px;
116
+ row-gap: 8px;
117
+ margin: 0 8px;
118
+ min-width: 0;
119
+ }
120
+ .userflowjs-banner-content {
121
+ white-space: pre-wrap;
122
+ overflow-wrap: break-word;
123
+ flex-shrink: 1;
124
+ min-width: 0;
125
+ }
126
+ .userflowjs-banner-buttons {
127
+ display: flex;
128
+ gap: 8px;
129
+ flex-shrink: 0;
130
+ }
131
+ .userflowjs-banner-start-spacer {
132
+ flex: 1 1 0;
133
+ max-width: var(--userflow-button-height, 32px);
134
+ height: var(--userflow-button-height, 32px);
135
+ }
136
+ .userflowjs-banner-close {
137
+ flex-shrink: 0;
138
+ display: flex;
139
+ align-items: center;
140
+ justify-content: center;
141
+ width: var(--userflow-button-height, 32px);
142
+ height: var(--userflow-button-height, 32px);
143
+ color: var(--userflow-banner-foreground-color);
144
+ background: transparent;
145
+ padding: 0;
146
+ border-radius: 4px;
147
+ }
148
+ .userflowjs-banner-close:hover {
149
+ background-color: var(--userflow-banner-hover-background-color, rgba(0,0,0,0.08));
150
+ }
151
+ `;
152
+ //# sourceMappingURL=bannerWebFrameCss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BANNER_WEB_FRAME_CSS","exports"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/bannerWebFrameCss.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACO,MAAMA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,GAAG;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.buildCustomBannerBodyHtml = buildCustomBannerBodyHtml;
7
+ exports.buildCustomBannerHtml = buildCustomBannerHtml;
8
+ var _core = require("@userflow-tech/core");
9
+ var _protocol = require("@userflow-tech/protocol");
10
+ var _bootstrap = require("../../evalJs/bootstrap.js");
11
+ var _bannerAutoRunEvalJs = require("./bannerAutoRunEvalJs.js");
12
+ var _bannerThemeStyles = require("./bannerThemeStyles.js");
13
+ var _bannerWebFrameCss = require("./bannerWebFrameCss.js");
14
+ var _buttonClassName = require("./buttonClassName.js");
15
+ var _resolveCdnHost = require("./resolveCdnHost.js");
16
+ var _richContentDocToHtml = require("./richContentDocToHtml.js");
17
+ function contentLayoutClass(layout) {
18
+ switch (layout) {
19
+ case _protocol.BannerContentLayout.CENTER:
20
+ return 'userflowjs-banner-root--content-layout-CENTER';
21
+ case _protocol.BannerContentLayout.SPACE_BETWEEN:
22
+ return 'userflowjs-banner-root--content-layout-SPACE_BETWEEN';
23
+ case _protocol.BannerContentLayout.START:
24
+ default:
25
+ return 'userflowjs-banner-root--content-layout-START';
26
+ }
27
+ }
28
+ function layoutMeasureScript() {
29
+ return `
30
+ (function(){
31
+ function postLayout(){
32
+ var root=document.querySelector('.userflowjs-banner-root');
33
+ if(!root||!window.ReactNativeWebView||!window.ReactNativeWebView.postMessage)return;
34
+ var rectH=root.getBoundingClientRect().height;
35
+ var scrollH=root.scrollHeight;
36
+ var h=Math.ceil(Math.max(scrollH,rectH));
37
+ var vh=window.innerHeight||0;
38
+ if(vh>0&&h>=vh-2){
39
+ var sum=0;
40
+ for(var i=0;i<root.childNodes.length;i++){
41
+ var node=root.childNodes[i];
42
+ if(node&&node.nodeType===1){
43
+ var el=node;
44
+ sum+=el.scrollHeight||el.offsetHeight||0;
45
+ }
46
+ }
47
+ if(sum>0&&sum<h) h=Math.ceil(sum);
48
+ }
49
+ window.ReactNativeWebView.postMessage(JSON.stringify({__userflow:1,type:'bannerLayout',height:h}));
50
+ }
51
+ window.__userflowBannerLayout=postLayout;
52
+ if(typeof ResizeObserver!=='undefined'){
53
+ var root=document.querySelector('.userflowjs-banner-root');
54
+ if(root){new ResizeObserver(postLayout).observe(root);}
55
+ }
56
+ window.addEventListener('load',postLayout);
57
+ setTimeout(postLayout,0);
58
+ })();
59
+ `;
60
+ }
61
+ function bannerInteractionScript() {
62
+ return `
63
+ (function(){
64
+ function post(msg){
65
+ if(window.ReactNativeWebView&&window.ReactNativeWebView.postMessage){
66
+ window.ReactNativeWebView.postMessage(JSON.stringify(Object.assign({__userflow:1},msg)));
67
+ }
68
+ }
69
+ document.addEventListener('click',function(ev){
70
+ var t=ev.target;
71
+ if(!t||!t.closest)return;
72
+ var btn=t.closest('[data-userflow-banner-button]');
73
+ if(btn){
74
+ ev.preventDefault();
75
+ post({type:'bannerButton',buttonId:btn.getAttribute('data-userflow-banner-button')});
76
+ return;
77
+ }
78
+ var close=t.closest('[data-userflow-banner-dismiss]');
79
+ if(close){
80
+ ev.preventDefault();
81
+ window.__userflowBannerEvalDismissed=true;
82
+ post({type:'bannerDismiss'});
83
+ }
84
+ });
85
+ })();
86
+ `;
87
+ }
88
+
89
+ /** Runs eval-only button scripts once the banner document (and `window.userflow`) exists. */
90
+ function bannerAutoRunEvalScript(banner, lookupAttribute) {
91
+ const codes = (0, _bannerAutoRunEvalJs.collectBannerAutoRunEvalCodes)(banner, lookupAttribute);
92
+ if (codes.length === 0) {
93
+ return '';
94
+ }
95
+ const runs = codes.map(code => (0, _bootstrap.wrapCode)(code)).join('');
96
+ return `
97
+ (function(){
98
+ if(window.__userflowBannerEvalDismissed||window.__userflowBannerEvalRan)return;
99
+ window.__userflowBannerEvalRan=true;
100
+ function run(){
101
+ if(window.__userflowBannerEvalDismissed)return;
102
+ ${runs}
103
+ }
104
+ if(document.readyState==='loading'){
105
+ document.addEventListener('DOMContentLoaded',run,{once:true});
106
+ }else{
107
+ run();
108
+ }
109
+ })();
110
+ `;
111
+ }
112
+ function buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options) {
113
+ const banner = session.version.banner;
114
+ const theme = session.version.theme;
115
+ const layoutClass = contentLayoutClass(banner.contentLayout);
116
+ const themeStyle = (0, _bannerThemeStyles.bannerThemeStyleAttribute)(theme);
117
+ const customCssUrl = (0, _resolveCdnHost.resolveCustomStylesheetUrl)(serverEndpoint, theme);
118
+ const maxInner = banner.maxContentWidth != null ? ` style="max-width:${banner.maxContentWidth}px"` : '';
119
+ const contentHtml = (0, _richContentDocToHtml.richContentDocToHtml)(banner.content, lookupAttribute);
120
+ const buttonsHtml = banner.buttons.map(button => {
121
+ const label = escapeAttr((0, _core.interpolateVariables)(button.text, lookupAttribute));
122
+ const classes = escapeAttr((0, _buttonClassName.buttonClassName)(button.appearance));
123
+ return `<button type="button" class="${classes}" data-userflow-banner-button="${escapeAttr(button.id)}"><span class="userflowjs-bubble-button-text">${label}</span></button>`;
124
+ }).join('');
125
+ const closeHtml = session.version.closeDisabled ? '<div class="userflowjs-banner-start-spacer"></div>' : '<button type="button" class="userflowjs-banner-close userflowjs-button-reset" data-userflow-banner-dismiss="1" aria-label="Dismiss">×</button>';
126
+ const customLink = customCssUrl ? `<link rel="stylesheet" href="${escapeAttr(customCssUrl)}" />` : '';
127
+ return `
128
+ <style>${_bannerWebFrameCss.BANNER_WEB_FRAME_CSS}</style>
129
+ ${customLink}
130
+ <div class="userflowjs-banner-root userflowjs-theme-root ${layoutClass}" style="${themeStyle}">
131
+ <div class="userflowjs-banner-start-spacer"></div>
132
+ <div class="userflowjs-banner-inner"${maxInner}>
133
+ <div class="userflowjs-banner-content">${contentHtml}</div>
134
+ ${buttonsHtml ? `<div class="userflowjs-banner-buttons">${buttonsHtml}</div>` : ''}
135
+ </div>
136
+ ${closeHtml}
137
+ </div>
138
+ <script>${layoutMeasureScript()}${bannerInteractionScript()}${options?.skipAutoRunEval ? '' : bannerAutoRunEvalScript(banner, lookupAttribute)}</script>
139
+ `;
140
+ }
141
+ function buildCustomBannerHtml(context, session, lookupAttribute, serverEndpoint, options) {
142
+ const body = buildCustomBannerBodyHtml(session, lookupAttribute, serverEndpoint, options);
143
+ return (0, _bootstrap.buildBootstrapHtml)(context, body);
144
+ }
145
+ function escapeAttr(value) {
146
+ return value.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;');
147
+ }
148
+ //# sourceMappingURL=buildCustomBannerHtml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_protocol","_bootstrap","_bannerAutoRunEvalJs","_bannerThemeStyles","_bannerWebFrameCss","_buttonClassName","_resolveCdnHost","_richContentDocToHtml","contentLayoutClass","layout","BannerContentLayout","CENTER","SPACE_BETWEEN","START","layoutMeasureScript","bannerInteractionScript","bannerAutoRunEvalScript","banner","lookupAttribute","codes","collectBannerAutoRunEvalCodes","length","runs","map","code","wrapCode","join","buildCustomBannerBodyHtml","session","serverEndpoint","options","version","theme","layoutClass","contentLayout","themeStyle","bannerThemeStyleAttribute","customCssUrl","resolveCustomStylesheetUrl","maxInner","maxContentWidth","contentHtml","richContentDocToHtml","content","buttonsHtml","buttons","button","label","escapeAttr","interpolateVariables","text","classes","buttonClassName","appearance","id","closeHtml","closeDisabled","customLink","BANNER_WEB_FRAME_CSS","skipAutoRunEval","buildCustomBannerHtml","context","body","buildBootstrapHtml","value","replace"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/buildCustomBannerHtml.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.buttonClassName = buttonClassName;
7
+ /** Mirrors web `TreeDoc.buttonClassName`. */
8
+ function buttonClassName(appearance) {
9
+ const value = appearance || 'default';
10
+ const known = value === 'primary' || value === 'PRIMARY' || value === 'default' || value === 'DEFAULT' || value === 'banner-primary' || value === 'banner-secondary';
11
+ return 'userflowjs-bubble-button ' + (known ? `userflowjs-bubble-button--${value.toLowerCase()}` : value);
12
+ }
13
+ //# sourceMappingURL=buttonClassName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["buttonClassName","appearance","value","known","toLowerCase"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/buttonClassName.ts"],"mappings":";;;;;;AAAA;AACO,SAASA,eAAeA,CAACC,UAAqC,EAAU;EAC7E,MAAMC,KAAK,GAAGD,UAAU,IAAI,SAAS;EACrC,MAAME,KAAK,GACTD,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,SAAS,IACnBA,KAAK,KAAK,gBAAgB,IAC1BA,KAAK,KAAK,kBAAkB;EAC9B,OACE,2BAA2B,IAC1BC,KAAK,GAAG,6BAA6BD,KAAK,CAACE,WAAW,CAAC,CAAC,EAAE,GAAGF,KAAK,CAAC;AAExE","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.resolveCdnHost = resolveCdnHost;
7
+ exports.resolveCustomStylesheetUrl = resolveCustomStylesheetUrl;
8
+ exports.themeHasPublishedCustomCss = themeHasPublishedCustomCss;
9
+ exports.themePublishedCssVersion = themePublishedCssVersion;
10
+ /**
11
+ * Map the end-user websocket host to the theme stylesheet CDN host
12
+ * (same convention as web userflow.js).
13
+ */
14
+ function resolveCdnHost(serverEndpoint) {
15
+ const trimmed = serverEndpoint.replace(/\/$/, '');
16
+ let host = trimmed;
17
+ if (host.startsWith('https://')) {
18
+ host = host.slice('https://'.length);
19
+ } else if (host.startsWith('http://')) {
20
+ host = host.slice('http://'.length);
21
+ }
22
+ if (host.startsWith('e.')) {
23
+ return `cdn.${host.slice(2)}`;
24
+ }
25
+ if (host.includes('localhost') || host.includes('127.0.0.1')) {
26
+ return 'cdn.userflow.com';
27
+ }
28
+ return `cdn.${host}`;
29
+ }
30
+ function themePublishedCssVersion(theme) {
31
+ const cssVersion = theme.cssVersion;
32
+ if (typeof cssVersion !== 'string' && typeof cssVersion !== 'number') {
33
+ return null;
34
+ }
35
+ const version = String(cssVersion);
36
+ return version ? version : null;
37
+ }
38
+ function themeHasPublishedCustomCss(theme) {
39
+ return themePublishedCssVersion(theme) != null;
40
+ }
41
+ function resolveCustomStylesheetUrl(serverEndpoint, theme) {
42
+ const version = themePublishedCssVersion(theme);
43
+ if (!version) {
44
+ return null;
45
+ }
46
+ const cdnHost = resolveCdnHost(serverEndpoint);
47
+ return `https://${cdnHost}/themes/${theme.id}/stylesheets/${version}/custom.css`;
48
+ }
49
+ //# sourceMappingURL=resolveCdnHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["resolveCdnHost","serverEndpoint","trimmed","replace","host","startsWith","slice","length","includes","themePublishedCssVersion","theme","cssVersion","version","String","themeHasPublishedCustomCss","resolveCustomStylesheetUrl","cdnHost","id"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/resolveCdnHost.ts"],"mappings":";;;;;;;;;AAEA;AACA;AACA;AACA;AACO,SAASA,cAAcA,CAACC,cAAsB,EAAU;EAC7D,MAAMC,OAAO,GAAGD,cAAc,CAACE,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;EACjD,IAAIC,IAAI,GAAGF,OAAO;EAClB,IAAIE,IAAI,CAACC,UAAU,CAAC,UAAU,CAAC,EAAE;IAC/BD,IAAI,GAAGA,IAAI,CAACE,KAAK,CAAC,UAAU,CAACC,MAAM,CAAC;EACtC,CAAC,MAAM,IAAIH,IAAI,CAACC,UAAU,CAAC,SAAS,CAAC,EAAE;IACrCD,IAAI,GAAGA,IAAI,CAACE,KAAK,CAAC,SAAS,CAACC,MAAM,CAAC;EACrC;EACA,IAAIH,IAAI,CAACC,UAAU,CAAC,IAAI,CAAC,EAAE;IACzB,OAAO,OAAOD,IAAI,CAACE,KAAK,CAAC,CAAC,CAAC,EAAE;EAC/B;EACA,IAAIF,IAAI,CAACI,QAAQ,CAAC,WAAW,CAAC,IAAIJ,IAAI,CAACI,QAAQ,CAAC,WAAW,CAAC,EAAE;IAC5D,OAAO,kBAAkB;EAC3B;EACA,OAAO,OAAOJ,IAAI,EAAE;AACtB;AAEO,SAASK,wBAAwBA,CAACC,KAAoB,EAAiB;EAC5E,MAAMC,UAAU,GAAGD,KAAK,CAACC,UAAU;EACnC,IAAI,OAAOA,UAAU,KAAK,QAAQ,IAAI,OAAOA,UAAU,KAAK,QAAQ,EAAE;IACpE,OAAO,IAAI;EACb;EACA,MAAMC,OAAO,GAAGC,MAAM,CAACF,UAAU,CAAC;EAClC,OAAOC,OAAO,GAAGA,OAAO,GAAG,IAAI;AACjC;AAEO,SAASE,0BAA0BA,CAACJ,KAAoB,EAAW;EACxE,OAAOD,wBAAwB,CAACC,KAAK,CAAC,IAAI,IAAI;AAChD;AAEO,SAASK,0BAA0BA,CACxCd,cAAsB,EACtBS,KAAoB,EACL;EACf,MAAME,OAAO,GAAGH,wBAAwB,CAACC,KAAK,CAAC;EAC/C,IAAI,CAACE,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EACA,MAAMI,OAAO,GAAGhB,cAAc,CAACC,cAAc,CAAC;EAC9C,OAAO,WAAWe,OAAO,WAAWN,KAAK,CAACO,EAAE,gBAAgBL,OAAO,aAAa;AAClF","ignoreList":[]}
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.richContentDocToHtml = richContentDocToHtml;
7
+ var _core = require("@userflow-tech/core");
8
+ var _deserialize = require("../../content/deserialize.js");
9
+ function escapeHtml(text) {
10
+ return text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
11
+ }
12
+ function inlineNodesToHtml(nodes, lookupAttribute) {
13
+ let html = '';
14
+ for (const node of nodes) {
15
+ if ((0, _deserialize.isText)(node)) {
16
+ let text = node.text;
17
+ if (node.silent) {
18
+ continue;
19
+ }
20
+ text = (0, _core.interpolateVariables)(text, lookupAttribute);
21
+ let chunk = escapeHtml(text);
22
+ if (node.bold) {
23
+ chunk = `<strong>${chunk}</strong>`;
24
+ }
25
+ if (node.italic) {
26
+ chunk = `<em>${chunk}</em>`;
27
+ }
28
+ if (node.underline) {
29
+ chunk = `<u>${chunk}</u>`;
30
+ }
31
+ if (node.code) {
32
+ chunk = `<code>${chunk}</code>`;
33
+ }
34
+ html += chunk;
35
+ continue;
36
+ }
37
+ if (node.type === 'link') {
38
+ const href = escapeHtml((0, _deserialize.stringifyPlaintextDoc)(node.href, {
39
+ lookupAttribute
40
+ }));
41
+ const inner = inlineNodesToHtml(node.children, lookupAttribute);
42
+ const target = node.target === 'new' ? ' target="_blank" rel="noopener noreferrer"' : '';
43
+ html += `<a href="${href}"${target}>${inner}</a>`;
44
+ continue;
45
+ }
46
+ if (node.type === 'attribute') {
47
+ const value = lookupAttribute(node.attributeName ?? '') ?? node.fallback ?? '';
48
+ html += escapeHtml(value);
49
+ }
50
+ }
51
+ return html;
52
+ }
53
+ function blockToHtml(node, lookupAttribute) {
54
+ switch (node.type) {
55
+ case 'paragraph':
56
+ return `<p>${inlineNodesToHtml(node.children, lookupAttribute)}</p>`;
57
+ case 'heading1':
58
+ return `<h1>${inlineNodesToHtml(node.children, lookupAttribute)}</h1>`;
59
+ case 'heading2':
60
+ return `<h2>${inlineNodesToHtml(node.children, lookupAttribute)}</h2>`;
61
+ case 'quote':
62
+ return `<blockquote>${inlineNodesToHtml(node.children, lookupAttribute)}</blockquote>`;
63
+ case 'unordered-list':
64
+ return `<ul>${node.children.map(item => `<li>${inlineNodesToHtml(item.children, lookupAttribute)}</li>`).join('')}</ul>`;
65
+ case 'ordered-list':
66
+ return `<ol>${node.children.map(item => `<li>${inlineNodesToHtml(item.children, lookupAttribute)}</li>`).join('')}</ol>`;
67
+ case 'code-block':
68
+ return `<pre><code>${inlineNodesToHtml(node.children, lookupAttribute)}</code></pre>`;
69
+ case 'container':
70
+ {
71
+ const extra = node.className ? ` ${escapeHtml(node.className)}` : '';
72
+ const inner = node.children.map(child => blockToHtml(child, lookupAttribute)).join('');
73
+ return `<div class="p-like${extra}">${inner}</div>`;
74
+ }
75
+ default:
76
+ return '';
77
+ }
78
+ }
79
+ function richContentDocToHtml(content, lookupAttribute) {
80
+ const doc = typeof content === 'string' || content == null ? (0, _deserialize.deserializeRichContentDoc)(content) : content;
81
+ return doc.children.map(block => blockToHtml(block, lookupAttribute)).join('');
82
+ }
83
+ //# sourceMappingURL=richContentDocToHtml.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_deserialize","escapeHtml","text","replace","inlineNodesToHtml","nodes","lookupAttribute","html","node","isText","silent","interpolateVariables","chunk","bold","italic","underline","code","type","href","stringifyPlaintextDoc","inner","children","target","value","attributeName","fallback","blockToHtml","map","item","join","extra","className","child","richContentDocToHtml","content","doc","deserializeRichContentDoc","block"],"sourceRoot":"../../../../src","sources":["surfaces/bannerWebView/richContentDocToHtml.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.DEFAULT_BANNER_FOREGROUND_COLOR = exports.DEFAULT_BANNER_BACKGROUND_COLOR = void 0;
7
+ exports.resolveBannerBackgroundColor = resolveBannerBackgroundColor;
8
+ exports.resolveBannerForegroundColor = resolveBannerForegroundColor;
9
+ /** Default banner chrome when theme banner tokens are unset (matches product / web debugger palette). */
10
+ const DEFAULT_BANNER_BACKGROUND_COLOR = exports.DEFAULT_BANNER_BACKGROUND_COLOR = '#0A1A24';
11
+ const DEFAULT_BANNER_FOREGROUND_COLOR = exports.DEFAULT_BANNER_FOREGROUND_COLOR = '#FFFFFF';
12
+ function readThemeColor(theme, key) {
13
+ const value = theme[key];
14
+ return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
15
+ }
16
+ function resolveBannerBackgroundColor(theme) {
17
+ return readThemeColor(theme, 'bannerBackgroundColor') ?? DEFAULT_BANNER_BACKGROUND_COLOR;
18
+ }
19
+ function resolveBannerForegroundColor(theme) {
20
+ return readThemeColor(theme, 'bannerForegroundColor') ?? DEFAULT_BANNER_FOREGROUND_COLOR;
21
+ }
22
+ //# sourceMappingURL=resolveBannerTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DEFAULT_BANNER_BACKGROUND_COLOR","exports","DEFAULT_BANNER_FOREGROUND_COLOR","readThemeColor","theme","key","value","trim","length","undefined","resolveBannerBackgroundColor","resolveBannerForegroundColor"],"sourceRoot":"../../../src","sources":["surfaces/resolveBannerTheme.ts"],"mappings":";;;;;;;;AAEA;AACO,MAAMA,+BAA+B,GAAAC,OAAA,CAAAD,+BAAA,GAAG,SAAS;AACjD,MAAME,+BAA+B,GAAAD,OAAA,CAAAC,+BAAA,GAAG,SAAS;AAExD,SAASC,cAAcA,CAACC,KAAoB,EAAEC,GAAW,EAAsB;EAC7E,MAAMC,KAAK,GAAGF,KAAK,CAACC,GAAG,CAAC;EACxB,OAAO,OAAOC,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACC,IAAI,CAAC,CAAC,CAACC,MAAM,GAAG,CAAC,GAAGF,KAAK,CAACC,IAAI,CAAC,CAAC,GAAGE,SAAS;AACxF;AAEO,SAASC,4BAA4BA,CAACN,KAAoB,EAAU;EACzE,OAAOD,cAAc,CAACC,KAAK,EAAE,uBAAuB,CAAC,IAAIJ,+BAA+B;AAC1F;AAEO,SAASW,4BAA4BA,CAACP,KAAoB,EAAU;EACzE,OAAOD,cAAc,CAACC,KAAK,EAAE,uBAAuB,CAAC,IAAIF,+BAA+B;AAC1F","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.getSafeAreaInsetsContext = getSafeAreaInsetsContext;
6
7
  exports.resetSafeAreaInsetsCacheForTests = resetSafeAreaInsetsCacheForTests;
7
8
  exports.useUserflowSafeAreaInsets = useUserflowSafeAreaInsets;
8
9
  const ZERO_INSETS = {
@@ -12,6 +13,7 @@ const ZERO_INSETS = {
12
13
  left: 0
13
14
  };
14
15
  let cachedHook;
16
+ let cachedInsetsContext;
15
17
 
16
18
  /**
17
19
  * Resolve `useSafeAreaInsets` from the optional peer `react-native-safe-area-context`.
@@ -39,8 +41,29 @@ function useUserflowSafeAreaInsets() {
39
41
  return resolveUseSafeAreaInsets()();
40
42
  }
41
43
 
44
+ /**
45
+ * `SafeAreaInsetsContext` from the optional peer, or `null` when it is not installed.
46
+ * In-flow banners override this so host screens do not add the inset the banner already consumed.
47
+ */
48
+ function getSafeAreaInsetsContext() {
49
+ if (cachedInsetsContext !== undefined) return cachedInsetsContext;
50
+ if (typeof require !== 'function') {
51
+ cachedInsetsContext = null;
52
+ return null;
53
+ }
54
+ try {
55
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
56
+ const mod = require('react-native-safe-area-context');
57
+ cachedInsetsContext = mod.SafeAreaInsetsContext ?? null;
58
+ } catch {
59
+ cachedInsetsContext = null;
60
+ }
61
+ return cachedInsetsContext;
62
+ }
63
+
42
64
  /** @internal */
43
65
  function resetSafeAreaInsetsCacheForTests() {
44
66
  cachedHook = undefined;
67
+ cachedInsetsContext = undefined;
45
68
  }
46
69
  //# sourceMappingURL=safeArea.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["ZERO_INSETS","top","right","bottom","left","cachedHook","resolveUseSafeAreaInsets","undefined","require","mod","useSafeAreaInsets","useUserflowSafeAreaInsets","resetSafeAreaInsetsCacheForTests"],"sourceRoot":"../../../src","sources":["surfaces/safeArea.ts"],"mappings":";;;;;;;AAOA,MAAMA,WAAuB,GAAG;EAAEC,GAAG,EAAE,CAAC;EAAEC,KAAK,EAAE,CAAC;EAAEC,MAAM,EAAE,CAAC;EAAEC,IAAI,EAAE;AAAE,CAAC;AAIxE,IAAIC,UAAkD;;AAEtD;AACA;AACA;AACA;AACA,SAASC,wBAAwBA,CAAA,EAAwB;EACvD,IAAID,UAAU,KAAKE,SAAS,EAAE,OAAOF,UAAU,KAAK,MAAML,WAAW,CAAC;EAEtE,IAAI,OAAOQ,OAAO,KAAK,UAAU,EAAE;IACjCH,UAAU,GAAG,IAAI;IACjB,OAAO,MAAML,WAAW;EAC1B;EAEA,IAAI;IACF;IACA;IACA,MAAMS,GAAG,GAAGD,OAAO,CAAC,gCAAgC,CAEnD;IACDH,UAAU,GAAG,OAAOI,GAAG,CAACC,iBAAiB,KAAK,UAAU,GAAGD,GAAG,CAACC,iBAAiB,GAAG,IAAI;EACzF,CAAC,CAAC,MAAM;IACNL,UAAU,GAAG,IAAI;EACnB;EAEA,OAAOA,UAAU,KAAK,MAAML,WAAW,CAAC;AAC1C;;AAEA;AACO,SAASW,yBAAyBA,CAAA,EAAe;EACtD,OAAOL,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACrC;;AAEA;AACO,SAASM,gCAAgCA,CAAA,EAAS;EACvDP,UAAU,GAAGE,SAAS;AACxB","ignoreList":[]}
1
+ {"version":3,"names":["ZERO_INSETS","top","right","bottom","left","cachedHook","cachedInsetsContext","resolveUseSafeAreaInsets","undefined","require","mod","useSafeAreaInsets","useUserflowSafeAreaInsets","getSafeAreaInsetsContext","SafeAreaInsetsContext","resetSafeAreaInsetsCacheForTests"],"sourceRoot":"../../../src","sources":["surfaces/safeArea.ts"],"mappings":";;;;;;;;AASA,MAAMA,WAAuB,GAAG;EAAEC,GAAG,EAAE,CAAC;EAAEC,KAAK,EAAE,CAAC;EAAEC,MAAM,EAAE,CAAC;EAAEC,IAAI,EAAE;AAAE,CAAC;AAIxE,IAAIC,UAAkD;AACtD,IAAIC,mBAAkE;;AAEtE;AACA;AACA;AACA;AACA,SAASC,wBAAwBA,CAAA,EAAwB;EACvD,IAAIF,UAAU,KAAKG,SAAS,EAAE,OAAOH,UAAU,KAAK,MAAML,WAAW,CAAC;EAEtE,IAAI,OAAOS,OAAO,KAAK,UAAU,EAAE;IACjCJ,UAAU,GAAG,IAAI;IACjB,OAAO,MAAML,WAAW;EAC1B;EAEA,IAAI;IACF;IACA;IACA,MAAMU,GAAG,GAAGD,OAAO,CAAC,gCAAgC,CAEnD;IACDJ,UAAU,GAAG,OAAOK,GAAG,CAACC,iBAAiB,KAAK,UAAU,GAAGD,GAAG,CAACC,iBAAiB,GAAG,IAAI;EACzF,CAAC,CAAC,MAAM;IACNN,UAAU,GAAG,IAAI;EACnB;EAEA,OAAOA,UAAU,KAAK,MAAML,WAAW,CAAC;AAC1C;;AAEA;AACO,SAASY,yBAAyBA,CAAA,EAAe;EACtD,OAAOL,wBAAwB,CAAC,CAAC,CAAC,CAAC;AACrC;;AAEA;AACA;AACA;AACA;AACO,SAASM,wBAAwBA,CAAA,EAAsC;EAC5E,IAAIP,mBAAmB,KAAKE,SAAS,EAAE,OAAOF,mBAAmB;EAEjE,IAAI,OAAOG,OAAO,KAAK,UAAU,EAAE;IACjCH,mBAAmB,GAAG,IAAI;IAC1B,OAAO,IAAI;EACb;EAEA,IAAI;IACF;IACA,MAAMI,GAAG,GAAGD,OAAO,CAAC,gCAAgC,CAEnD;IACDH,mBAAmB,GAAGI,GAAG,CAACI,qBAAqB,IAAI,IAAI;EACzD,CAAC,CAAC,MAAM;IACNR,mBAAmB,GAAG,IAAI;EAC5B;EAEA,OAAOA,mBAAmB;AAC5B;;AAEA;AACO,SAASS,gCAAgCA,CAAA,EAAS;EACvDV,UAAU,GAAGG,SAAS;EACtBF,mBAAmB,GAAGE,SAAS;AACjC","ignoreList":[]}
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.SDK_VERSION = void 0;
7
7
  /** Generated by scripts/write-version.mjs — do not edit. */
8
- const SDK_VERSION = exports.SDK_VERSION = '0.2.0';
8
+ const SDK_VERSION = exports.SDK_VERSION = '0.3.0';
9
9
  //# sourceMappingURL=version.js.map
@@ -144,6 +144,10 @@ export class AutoAnchorRegistry {
144
144
  updateInstance(instanceId, patch) {
145
145
  const inst = this.instances.get(instanceId);
146
146
  if (!inst) return;
147
+ // Stamped hosts call this on every render; notifying for a no-op patch
148
+ // re-renders registry subscribers, which re-render the stamps.
149
+ const keys = Object.keys(patch);
150
+ if (keys.every(key => Object.is(inst[key], patch[key]))) return;
147
151
  const prevIds = {
148
152
  manualId: inst.manualId,
149
153
  userflowId: inst.userflowId,
@@ -311,6 +315,20 @@ export class AutoAnchorRegistry {
311
315
  return byManual.length > 1 || byManual.some(i => i.ambiguous);
312
316
  }
313
317
 
318
+ /**
319
+ * Whether `inst` still has a look-alike inside `include`.
320
+ *
321
+ * The stored {@link AutoAnchorInstance.ambiguous} flag is registry-wide, so a
322
+ * copy on a covered screen keeps it set. Visibility can only clear that, never
323
+ * add ambiguity: an instance the registry considers unique stays unique.
324
+ */
325
+ isAmbiguousAmong(inst, include) {
326
+ if (!inst.ambiguous) return false;
327
+ const peers = list => list.filter(i => i === inst || include(i));
328
+ if (inst.manualId) return peers(this.getInstancesByManualId(inst.manualId)).length > 1;
329
+ return this.isTwinWithin(inst, peers(this.getInstancesByTemplatePath(inst.templatePath))) || this.isTwinWithin(inst, peers(this.getInstancesByRegistryKey(inst.registryKey)));
330
+ }
331
+
314
332
  /** Test helper — drop every instance and reset ids. */
315
333
  clear() {
316
334
  this.instances.clear();
@@ -355,6 +373,24 @@ export class AutoAnchorRegistry {
355
373
  }
356
374
  }
357
375
 
376
+ /**
377
+ * True when `inst` cannot be told apart from another instance in `list`.
378
+ * An unlabelled group only: no content of its own, or a content signature a
379
+ * peer shares.
380
+ */
381
+ isTwinWithin(inst, list) {
382
+ const unlabelled = list.length > 1 && list.every(i => !i.manualId);
383
+ if (!unlabelled) return false;
384
+ const sig = contentSignature(inst);
385
+ if (!sig) return true;
386
+ let count = 0;
387
+ for (const peer of list) {
388
+ if (contentSignature(peer) === sig) count += 1;
389
+ if (count > 1) return true;
390
+ }
391
+ return false;
392
+ }
393
+
358
394
  /**
359
395
  * Instances sharing a template path are only twins while they look alike.
360
396
  * Four rows from one `field()` helper are indistinguishable at register time
@@ -364,18 +400,8 @@ export class AutoAnchorRegistry {
364
400
  */
365
401
  recomputeAmbiguity(registryKey, templatePath, manualId) {
366
402
  const mark = list => {
367
- const unlabelled = list.length > 1 && list.every(i => !i.manualId);
368
- const shared = new Map();
369
- if (unlabelled) {
370
- for (const i of list) {
371
- const sig = contentSignature(i);
372
- if (sig) shared.set(sig, (shared.get(sig) ?? 0) + 1);
373
- }
374
- }
375
403
  for (const i of list) {
376
- const sig = unlabelled ? contentSignature(i) : undefined;
377
- const twins = unlabelled && (!sig || (shared.get(sig) ?? 0) > 1);
378
- i.ambiguous = twins || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
404
+ i.ambiguous = this.isTwinWithin(i, list) || (i.manualId ? this.getInstancesByManualId(i.manualId).length > 1 : false);
379
405
  }
380
406
  };
381
407
  mark(this.getInstancesByRegistryKey(registryKey));