@userflow-tech/react-native 0.1.0 → 0.2.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 (850) hide show
  1. package/README.md +114 -68
  2. package/app.plugin.js +13 -0
  3. package/babel-plugin/index.d.ts +43 -0
  4. package/babel-plugin/index.d.ts.map +1 -0
  5. package/babel-plugin/index.js +862 -0
  6. package/babel-plugin/index.js.map +1 -0
  7. package/babel-plugin.js +13 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +20 -17
  10. package/docs/theme-mapping.md +44 -15
  11. package/docs/troubleshooting.md +37 -30
  12. package/expo-plugin/withUserflow.d.ts +17 -0
  13. package/expo-plugin/withUserflow.d.ts.map +1 -0
  14. package/expo-plugin/withUserflow.js +99 -0
  15. package/expo-plugin/withUserflow.js.map +1 -0
  16. package/lib/commonjs/anchors/AutoAnchorRegistry.js +125 -3
  17. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  18. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  19. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  20. package/lib/commonjs/anchors/autoAnchor.js +1 -1
  21. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  22. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  23. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  24. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  25. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  26. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  27. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  28. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  29. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  30. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  31. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  32. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  33. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  34. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  35. package/lib/commonjs/anchors/hintsCodec.js +1 -1
  36. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  37. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  38. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
  39. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  40. package/lib/commonjs/anchors/semanticMatcher.js +285 -0
  41. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  42. package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
  43. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  44. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  45. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  46. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  47. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  48. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
  49. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  50. package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
  51. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  52. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  53. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  54. package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
  55. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  56. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  57. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  58. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
  59. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  60. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
  61. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  62. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
  63. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  64. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  65. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  66. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  67. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  68. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  69. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  70. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  71. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  72. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  73. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  74. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  75. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  76. package/lib/commonjs/authoring/chrome/tokens.js +150 -0
  77. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  78. package/lib/commonjs/authoring/doubleTap.js +23 -0
  79. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  80. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  81. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  82. package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
  83. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  84. package/lib/commonjs/authoring/hitTest.js +106 -0
  85. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  86. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  87. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  88. package/lib/commonjs/content/StepButton.js +19 -4
  89. package/lib/commonjs/content/StepButton.js.map +1 -1
  90. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  91. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  92. package/lib/commonjs/content/themeColor.js +11 -0
  93. package/lib/commonjs/content/themeColor.js.map +1 -1
  94. package/lib/commonjs/deviceContext.js +158 -0
  95. package/lib/commonjs/deviceContext.js.map +1 -0
  96. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
  97. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  98. package/lib/commonjs/hostAppVersion.js +242 -0
  99. package/lib/commonjs/hostAppVersion.js.map +1 -0
  100. package/lib/commonjs/index.js +118 -5
  101. package/lib/commonjs/index.js.map +1 -1
  102. package/lib/commonjs/lifecycle.js +2 -0
  103. package/lib/commonjs/lifecycle.js.map +1 -1
  104. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
  105. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  106. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  107. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  108. package/lib/commonjs/pairing/PairingController.js +29 -2
  109. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  110. package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
  111. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  112. package/lib/commonjs/pairing/diagnostics.js +11 -2
  113. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  114. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  115. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  116. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  117. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  118. package/lib/commonjs/pairing/tokenStorage.js +25 -2
  119. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  120. package/lib/commonjs/pairing/usePairingState.js +3 -1
  121. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  122. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  123. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  124. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  125. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  126. package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
  127. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  128. package/lib/commonjs/runtime/UserflowProvider.js +74 -20
  129. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  130. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  131. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  132. package/lib/commonjs/runtime/flowEngine.js +3 -1
  133. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  134. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  135. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  136. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  137. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  138. package/lib/commonjs/screenTracker.js +46 -4
  139. package/lib/commonjs/screenTracker.js.map +1 -1
  140. package/lib/commonjs/surfaces/CardFade.js +31 -0
  141. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  142. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  143. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  144. package/lib/commonjs/surfaces/ModalSurface.js +50 -34
  145. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  146. package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
  147. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  148. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  149. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  150. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  151. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  152. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  153. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  154. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  155. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  156. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  157. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  158. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  159. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  160. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  161. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  162. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  163. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  164. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  165. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  166. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  167. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  168. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  169. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  170. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  171. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  172. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  173. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  174. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  175. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  176. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  177. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  178. package/lib/commonjs/version.js +1 -1
  179. package/lib/module/anchors/AutoAnchorRegistry.js +126 -3
  180. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  181. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  182. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  183. package/lib/module/anchors/autoAnchor.js +1 -1
  184. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  185. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  186. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  187. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  188. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  189. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  190. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  191. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  192. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  193. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  194. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  195. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  196. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  197. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  198. package/lib/module/anchors/hintsCodec.js +1 -1
  199. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  200. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  201. package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
  202. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  203. package/lib/module/anchors/semanticMatcher.js +280 -0
  204. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  205. package/lib/module/authoring/ElementPickerOverlay.js +485 -0
  206. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  207. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  208. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  209. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  210. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  211. package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
  212. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  213. package/lib/module/authoring/chrome/ChromeButton.js +89 -0
  214. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  215. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  216. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  217. package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
  218. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  219. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  220. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  221. package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
  222. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  223. package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
  224. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  225. package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
  226. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  227. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  228. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  230. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  231. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  232. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  233. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  234. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  235. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  236. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  237. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  238. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  239. package/lib/module/authoring/chrome/tokens.js +146 -0
  240. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  241. package/lib/module/authoring/doubleTap.js +18 -0
  242. package/lib/module/authoring/doubleTap.js.map +1 -0
  243. package/lib/module/authoring/elementPickerController.js +97 -0
  244. package/lib/module/authoring/elementPickerController.js.map +1 -0
  245. package/lib/module/authoring/fingerprintFromInstance.js +187 -0
  246. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  247. package/lib/module/authoring/hitTest.js +100 -0
  248. package/lib/module/authoring/hitTest.js.map +1 -0
  249. package/lib/module/content/RichContentRenderer.js +12 -2
  250. package/lib/module/content/RichContentRenderer.js.map +1 -1
  251. package/lib/module/content/StepButton.js +19 -4
  252. package/lib/module/content/StepButton.js.map +1 -1
  253. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  254. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  255. package/lib/module/content/themeColor.js +10 -0
  256. package/lib/module/content/themeColor.js.map +1 -1
  257. package/lib/module/deviceContext.js +142 -0
  258. package/lib/module/deviceContext.js.map +1 -0
  259. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
  260. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  261. package/lib/module/hostAppVersion.js +225 -0
  262. package/lib/module/hostAppVersion.js.map +1 -0
  263. package/lib/module/index.js +119 -6
  264. package/lib/module/index.js.map +1 -1
  265. package/lib/module/lifecycle.js +2 -0
  266. package/lib/module/lifecycle.js.map +1 -1
  267. package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
  268. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  269. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  270. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  271. package/lib/module/pairing/PairingController.js +30 -3
  272. package/lib/module/pairing/PairingController.js.map +1 -1
  273. package/lib/module/pairing/PreviewModeBanner.js +212 -85
  274. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  275. package/lib/module/pairing/diagnostics.js +10 -2
  276. package/lib/module/pairing/diagnostics.js.map +1 -1
  277. package/lib/module/pairing/elementPickerRelay.js +87 -0
  278. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  279. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  280. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  281. package/lib/module/pairing/tokenStorage.js +24 -2
  282. package/lib/module/pairing/tokenStorage.js.map +1 -1
  283. package/lib/module/pairing/usePairingState.js +3 -1
  284. package/lib/module/pairing/usePairingState.js.map +1 -1
  285. package/lib/module/runtime/FlowRenderer.js +45 -21
  286. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  287. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  288. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  289. package/lib/module/runtime/TargetPressBridge.js +12 -43
  290. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  291. package/lib/module/runtime/UserflowProvider.js +74 -20
  292. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  293. package/lib/module/runtime/changedTouchPoints.js +43 -0
  294. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  295. package/lib/module/runtime/flowEngine.js +3 -1
  296. package/lib/module/runtime/flowEngine.js.map +1 -1
  297. package/lib/module/runtime/flowSessionViewState.js +32 -7
  298. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  299. package/lib/module/runtime/useFlowSessionState.js +2 -1
  300. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  301. package/lib/module/screenTracker.js +42 -4
  302. package/lib/module/screenTracker.js.map +1 -1
  303. package/lib/module/surfaces/CardFade.js +26 -0
  304. package/lib/module/surfaces/CardFade.js.map +1 -0
  305. package/lib/module/surfaces/CloseButton.js +10 -6
  306. package/lib/module/surfaces/CloseButton.js.map +1 -1
  307. package/lib/module/surfaces/ModalSurface.js +52 -36
  308. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  309. package/lib/module/surfaces/TooltipSurface.js +368 -90
  310. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  311. package/lib/module/surfaces/cardTransition.js +64 -0
  312. package/lib/module/surfaces/cardTransition.js.map +1 -0
  313. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  314. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  315. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  316. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  317. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  318. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  319. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  320. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  321. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  322. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  323. package/lib/module/surfaces/themeChrome.js +3 -1
  324. package/lib/module/surfaces/themeChrome.js.map +1 -1
  325. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  326. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  327. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  328. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  329. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  330. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  331. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  332. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  333. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  334. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  335. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  336. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  337. package/lib/module/surfaces/tooltip/rect.js +11 -0
  338. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  339. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  340. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  341. package/lib/module/version.js +1 -1
  342. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +27 -1
  343. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  345. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +1 -1
  347. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  348. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  350. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  352. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  354. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  356. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  358. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  360. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +1 -1
  362. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  363. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  365. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
  367. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
  369. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  371. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  373. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  375. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  377. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  379. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  381. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  383. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  385. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  387. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  389. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
  391. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  393. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  394. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
  395. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  396. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
  397. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  398. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
  399. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  401. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  402. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  403. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  404. package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
  405. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  406. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  407. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  408. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  410. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  411. package/lib/typescript/commonjs/src/index.d.ts +53 -2
  412. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
  414. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  415. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  417. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
  419. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  420. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
  421. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
  423. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  424. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  425. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  426. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  427. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  428. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
  429. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  430. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  432. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  433. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  434. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  436. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  437. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
  438. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  440. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  441. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  442. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  443. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  445. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  446. package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
  447. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  448. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  449. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  450. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  451. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  452. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
  453. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  456. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  458. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  460. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  462. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  464. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  466. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  467. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  468. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  470. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  472. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  474. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  475. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  476. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  477. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  478. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  479. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  480. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  481. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  482. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  484. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  486. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  487. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  488. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +27 -1
  489. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  490. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  491. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  492. package/lib/typescript/module/src/anchors/autoAnchor.d.ts +1 -1
  493. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  494. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  495. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  496. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  497. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  498. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  499. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  500. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  501. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  502. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  503. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  504. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  505. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  506. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  507. package/lib/typescript/module/src/anchors/hintsCodec.d.ts +1 -1
  508. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  509. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  510. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  511. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  512. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
  513. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  514. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
  515. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  516. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  517. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  518. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  519. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  520. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  521. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  522. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  523. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  524. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  525. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  526. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  527. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  528. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  529. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  530. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  531. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  532. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  533. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  534. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  535. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  536. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
  537. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  538. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  539. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  540. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
  541. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  542. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
  543. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  544. package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
  545. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  546. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  547. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  548. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  549. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  550. package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
  551. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  552. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  553. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  554. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  555. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  556. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  557. package/lib/typescript/module/src/index.d.ts +53 -2
  558. package/lib/typescript/module/src/index.d.ts.map +1 -1
  559. package/lib/typescript/module/src/lifecycle.d.ts +6 -0
  560. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  561. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  562. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  563. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  564. package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
  565. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  566. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
  567. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  568. package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
  569. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  570. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  571. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  572. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  573. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  574. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
  575. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  576. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  577. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  578. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  579. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  580. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  581. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  582. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  583. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
  584. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  585. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  586. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  587. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  588. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  589. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  590. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  591. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  592. package/lib/typescript/module/src/screenTracker.d.ts +21 -3
  593. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  594. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  595. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  596. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  597. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  598. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
  599. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  600. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  601. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  602. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  603. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  604. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  605. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  606. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  607. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  608. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  609. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  610. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  611. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  612. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  613. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  614. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  615. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  616. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  617. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  618. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  619. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  620. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  621. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  622. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  623. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  624. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  625. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  626. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  627. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  628. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  629. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  630. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  631. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  632. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  633. package/lib/typescript/module/src/version.d.ts +1 -1
  634. package/package.json +32 -18
  635. package/src/anchors/AutoAnchorRegistry.ts +140 -3
  636. package/src/anchors/anchorChangeTicker.ts +10 -0
  637. package/src/anchors/autoAnchor.ts +1 -1
  638. package/src/anchors/elementConditionEvaluator.ts +29 -16
  639. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  640. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  641. package/src/anchors/fiber/fiberInternals.ts +166 -3
  642. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  643. package/src/anchors/fiber/readHostContent.ts +146 -0
  644. package/src/anchors/fiberAnchorCache.ts +45 -0
  645. package/src/anchors/hintsCodec.ts +1 -1
  646. package/src/anchors/resolveAnchorHost.ts +23 -23
  647. package/src/anchors/resolveAutoAnchorHost.ts +180 -0
  648. package/src/anchors/semanticMatcher.ts +361 -0
  649. package/src/authoring/ElementPickerOverlay.tsx +553 -0
  650. package/src/authoring/capturePickerScreenshot.ts +90 -0
  651. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  652. package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
  653. package/src/authoring/chrome/ChromeButton.tsx +103 -0
  654. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  655. package/src/authoring/chrome/ChromeIcon.tsx +40 -0
  656. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  657. package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
  658. package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
  659. package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
  660. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  661. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  662. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  663. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  664. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  665. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  666. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  667. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  668. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  669. package/src/authoring/chrome/icons/xmark.png +0 -0
  670. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  671. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  672. package/src/authoring/chrome/tokens.ts +106 -0
  673. package/src/authoring/doubleTap.ts +27 -0
  674. package/src/authoring/elementPickerController.ts +135 -0
  675. package/src/authoring/fingerprintFromInstance.ts +152 -0
  676. package/src/authoring/hitTest.ts +133 -0
  677. package/src/content/RichContentRenderer.tsx +22 -1
  678. package/src/content/StepButton.tsx +17 -2
  679. package/src/content/resolveStepButtonChrome.ts +12 -6
  680. package/src/content/themeColor.ts +10 -0
  681. package/src/deviceContext.ts +168 -0
  682. package/src/expo-router/useUserflowExpoRouter.ts +47 -4
  683. package/src/hostAppVersion.ts +258 -0
  684. package/src/index.ts +148 -4
  685. package/src/lifecycle.ts +8 -0
  686. package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
  687. package/src/navigation/isOverlayPresentation.ts +76 -0
  688. package/src/pairing/PairingController.ts +32 -3
  689. package/src/pairing/PreviewModeBanner.tsx +250 -94
  690. package/src/pairing/diagnostics.ts +10 -2
  691. package/src/pairing/elementPickerRelay.ts +100 -0
  692. package/src/pairing/resolvePreviewChrome.ts +57 -0
  693. package/src/pairing/tokenStorage.ts +31 -2
  694. package/src/pairing/usePairingState.ts +2 -0
  695. package/src/runtime/FlowRenderer.tsx +55 -27
  696. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  697. package/src/runtime/TargetPressBridge.tsx +14 -32
  698. package/src/runtime/UserflowProvider.tsx +76 -13
  699. package/src/runtime/changedTouchPoints.ts +34 -0
  700. package/src/runtime/flowEngine.ts +2 -0
  701. package/src/runtime/flowSessionViewState.ts +42 -4
  702. package/src/runtime/useFlowSessionState.ts +2 -0
  703. package/src/screenTracker.ts +46 -4
  704. package/src/surfaces/CardFade.tsx +18 -0
  705. package/src/surfaces/CloseButton.tsx +17 -7
  706. package/src/surfaces/MadeWithUserflow.tsx +1 -1
  707. package/src/surfaces/ModalSurface.tsx +48 -35
  708. package/src/surfaces/TooltipSurface.tsx +406 -86
  709. package/src/surfaces/cardTransition.ts +67 -0
  710. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  711. package/src/surfaces/resolveModalLayout.ts +16 -8
  712. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  713. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  714. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  715. package/src/surfaces/themeChrome.ts +5 -3
  716. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  717. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  718. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  719. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  720. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  721. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  722. package/src/surfaces/tooltip/rect.ts +11 -0
  723. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  724. package/src/version.ts +1 -1
  725. package/vendor/core/LICENSE +76 -0
  726. package/vendor/core/README.md +9 -0
  727. package/vendor/core/dist/attributes.d.ts +15 -0
  728. package/vendor/core/dist/attributes.d.ts.map +1 -0
  729. package/vendor/core/dist/attributes.js +55 -0
  730. package/vendor/core/dist/attributes.js.map +1 -0
  731. package/vendor/core/dist/constants.d.ts +21 -0
  732. package/vendor/core/dist/constants.d.ts.map +1 -0
  733. package/vendor/core/dist/constants.js +21 -0
  734. package/vendor/core/dist/constants.js.map +1 -0
  735. package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
  736. package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
  737. package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
  738. package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
  739. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +160 -0
  740. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
  741. package/vendor/core/dist/engine/FlowSessionEngine.js +571 -0
  742. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
  743. package/vendor/core/dist/engine/PairingEngine.d.ts +135 -0
  744. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
  745. package/vendor/core/dist/engine/PairingEngine.js +396 -0
  746. package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
  747. package/vendor/core/dist/engine/UserflowCore.d.ts +145 -0
  748. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
  749. package/vendor/core/dist/engine/UserflowCore.js +329 -0
  750. package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
  751. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  752. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  753. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  754. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  755. package/vendor/core/dist/engine/handleActions.d.ts +42 -0
  756. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
  757. package/vendor/core/dist/engine/handleActions.js +198 -0
  758. package/vendor/core/dist/engine/handleActions.js.map +1 -0
  759. package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
  760. package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
  761. package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
  762. package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
  763. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  764. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  765. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  766. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  767. package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
  768. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  769. package/vendor/core/dist/engine/trackCondition.js +177 -0
  770. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  771. package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
  772. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  773. package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
  774. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  775. package/vendor/core/dist/errors.d.ts +9 -0
  776. package/vendor/core/dist/errors.d.ts.map +1 -0
  777. package/vendor/core/dist/errors.js +15 -0
  778. package/vendor/core/dist/errors.js.map +1 -0
  779. package/vendor/core/dist/eventAttributes.d.ts +7 -0
  780. package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
  781. package/vendor/core/dist/eventAttributes.js +31 -0
  782. package/vendor/core/dist/eventAttributes.js.map +1 -0
  783. package/vendor/core/dist/index.d.ts +31 -0
  784. package/vendor/core/dist/index.d.ts.map +1 -0
  785. package/vendor/core/dist/index.js +22 -0
  786. package/vendor/core/dist/index.js.map +1 -0
  787. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  788. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  789. package/vendor/core/dist/normalizeAttributes.js +127 -0
  790. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  791. package/vendor/core/dist/transport/backoff.d.ts +11 -0
  792. package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
  793. package/vendor/core/dist/transport/backoff.js +17 -0
  794. package/vendor/core/dist/transport/backoff.js.map +1 -0
  795. package/vendor/core/dist/transport/pairing.d.ts +121 -0
  796. package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
  797. package/vendor/core/dist/transport/pairing.js +551 -0
  798. package/vendor/core/dist/transport/pairing.js.map +1 -0
  799. package/vendor/core/dist/transport/phoenix.d.ts +228 -0
  800. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
  801. package/vendor/core/dist/transport/phoenix.js +811 -0
  802. package/vendor/core/dist/transport/phoenix.js.map +1 -0
  803. package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
  804. package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
  805. package/vendor/core/dist/transport/rateLimiter.js +30 -0
  806. package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
  807. package/vendor/core/dist/transport/scheduler.d.ts +12 -0
  808. package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
  809. package/vendor/core/dist/transport/scheduler.js +11 -0
  810. package/vendor/core/dist/transport/scheduler.js.map +1 -0
  811. package/vendor/core/dist/types.d.ts +60 -0
  812. package/vendor/core/dist/types.d.ts.map +1 -0
  813. package/vendor/core/dist/types.js +2 -0
  814. package/vendor/core/dist/types.js.map +1 -0
  815. package/vendor/core/dist/version.d.ts +3 -0
  816. package/vendor/core/dist/version.d.ts.map +1 -0
  817. package/vendor/core/dist/version.js +3 -0
  818. package/vendor/core/dist/version.js.map +1 -0
  819. package/vendor/core/package.json +20 -0
  820. package/vendor/protocol/LICENSE +76 -0
  821. package/vendor/protocol/README.md +8 -0
  822. package/vendor/protocol/dist/attributes.d.ts +43 -0
  823. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  824. package/vendor/protocol/dist/attributes.js +15 -0
  825. package/vendor/protocol/dist/attributes.js.map +1 -0
  826. package/vendor/protocol/dist/autoData.d.ts +232 -0
  827. package/vendor/protocol/dist/autoData.d.ts.map +1 -0
  828. package/vendor/protocol/dist/autoData.js +78 -0
  829. package/vendor/protocol/dist/autoData.js.map +1 -0
  830. package/vendor/protocol/dist/events.d.ts +24 -0
  831. package/vendor/protocol/dist/events.d.ts.map +1 -0
  832. package/vendor/protocol/dist/events.js +8 -0
  833. package/vendor/protocol/dist/events.js.map +1 -0
  834. package/vendor/protocol/dist/flows.d.ts +360 -0
  835. package/vendor/protocol/dist/flows.d.ts.map +1 -0
  836. package/vendor/protocol/dist/flows.js +201 -0
  837. package/vendor/protocol/dist/flows.js.map +1 -0
  838. package/vendor/protocol/dist/index.d.ts +25 -0
  839. package/vendor/protocol/dist/index.d.ts.map +1 -0
  840. package/vendor/protocol/dist/index.js +17 -0
  841. package/vendor/protocol/dist/index.js.map +1 -0
  842. package/vendor/protocol/dist/messages.d.ts +187 -0
  843. package/vendor/protocol/dist/messages.d.ts.map +1 -0
  844. package/vendor/protocol/dist/messages.js +61 -0
  845. package/vendor/protocol/dist/messages.js.map +1 -0
  846. package/vendor/protocol/dist/pairing.d.ts +82 -0
  847. package/vendor/protocol/dist/pairing.d.ts.map +1 -0
  848. package/vendor/protocol/dist/pairing.js +146 -0
  849. package/vendor/protocol/dist/pairing.js.map +1 -0
  850. package/vendor/protocol/package.json +17 -0
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Animated } from 'react-native';
5
+
6
+ /** Bars enter with web's `250ms` feel and leave a touch faster. */
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const CHROME_BAR_ENTER_MS = 220;
9
+ export const CHROME_BAR_EXIT_MS = 160;
10
+ /**
11
+ * Slides + fades an authoring chrome bar on and off screen. The bar translates
12
+ * by its own measured height toward {@link ChromeBarTransitionProps.edge}, so it
13
+ * leaves fully off-screen instead of shrinking in place.
14
+ *
15
+ * This only drives the animation; the parent keeps the bar mounted across the
16
+ * exit with {@link useChromeBarMounted} and drops it once the exit has run.
17
+ */
18
+ export function ChromeBarTransition({
19
+ visible,
20
+ edge,
21
+ style,
22
+ pointerEvents,
23
+ children,
24
+ testID
25
+ }) {
26
+ const progress = React.useRef(new Animated.Value(0)).current;
27
+ const [height, setHeight] = React.useState(0);
28
+ React.useEffect(() => {
29
+ // Pin the start point: a native-driven ramp is computed from the JS value,
30
+ // which the previous native animation left behind.
31
+ progress.setValue(visible ? 0 : 1);
32
+ const animation = Animated.timing(progress, {
33
+ toValue: visible ? 1 : 0,
34
+ duration: visible ? CHROME_BAR_ENTER_MS : CHROME_BAR_EXIT_MS,
35
+ useNativeDriver: true
36
+ });
37
+ animation.start();
38
+ return () => {
39
+ animation.stop();
40
+ };
41
+ }, [progress, visible]);
42
+ const onLayout = React.useCallback(event => {
43
+ const next = event.nativeEvent.layout.height;
44
+ setHeight(prev => Math.abs(prev - next) < 0.5 ? prev : next);
45
+ }, []);
46
+
47
+ // Until the bar is measured, fade only — the slide engages on the next frame
48
+ // once the height is known, while opacity is still near zero.
49
+ const transform = height > 0 ? [{
50
+ translateY: progress.interpolate({
51
+ inputRange: [0, 1],
52
+ outputRange: [edge === 'top' ? -height : height, 0]
53
+ })
54
+ }] : undefined;
55
+ return /*#__PURE__*/_jsx(Animated.View, {
56
+ testID: testID,
57
+ pointerEvents: visible ? pointerEvents : 'none',
58
+ onLayout: onLayout,
59
+ style: [style, transform ? {
60
+ opacity: progress,
61
+ transform
62
+ } : {
63
+ opacity: progress
64
+ }],
65
+ children: children
66
+ });
67
+ }
68
+
69
+ /**
70
+ * Keeps a bar mounted while `visible` and for {@link CHROME_BAR_EXIT_MS} after
71
+ * it flips false, so {@link ChromeBarTransition} can run its exit before the
72
+ * parent drops it.
73
+ */
74
+ export function useChromeBarMounted(visible) {
75
+ const [mounted, setMounted] = React.useState(visible);
76
+ React.useEffect(() => {
77
+ if (visible) {
78
+ setMounted(true);
79
+ return;
80
+ }
81
+ const timer = setTimeout(() => setMounted(false), CHROME_BAR_EXIT_MS);
82
+ return () => {
83
+ clearTimeout(timer);
84
+ };
85
+ }, [visible]);
86
+ return mounted;
87
+ }
88
+ //# sourceMappingURL=ChromeBarTransition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Animated","jsx","_jsx","CHROME_BAR_ENTER_MS","CHROME_BAR_EXIT_MS","ChromeBarTransition","visible","edge","style","pointerEvents","children","testID","progress","useRef","Value","current","height","setHeight","useState","useEffect","setValue","animation","timing","toValue","duration","useNativeDriver","start","stop","onLayout","useCallback","event","next","nativeEvent","layout","prev","Math","abs","transform","translateY","interpolate","inputRange","outputRange","undefined","View","opacity","useChromeBarMounted","mounted","setMounted","timer","setTimeout","clearTimeout"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeBarTransition.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAwD,cAAc;;AAEvF;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,OAAO,MAAMC,mBAAmB,GAAG,GAAG;AACtC,OAAO,MAAMC,kBAAkB,GAAG,GAAG;AAerC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAC;EAClCC,OAAO;EACPC,IAAI;EACJC,KAAK;EACLC,aAAa;EACbC,QAAQ;EACRC;AACwB,CAAC,EAAsB;EAC/C,MAAMC,QAAQ,GAAGb,KAAK,CAACc,MAAM,CAAC,IAAIb,QAAQ,CAACc,KAAK,CAAC,CAAC,CAAC,CAAC,CAACC,OAAO;EAC5D,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGlB,KAAK,CAACmB,QAAQ,CAAC,CAAC,CAAC;EAE7CnB,KAAK,CAACoB,SAAS,CAAC,MAAM;IACpB;IACA;IACAP,QAAQ,CAACQ,QAAQ,CAACd,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAClC,MAAMe,SAAS,GAAGrB,QAAQ,CAACsB,MAAM,CAACV,QAAQ,EAAE;MAC1CW,OAAO,EAAEjB,OAAO,GAAG,CAAC,GAAG,CAAC;MACxBkB,QAAQ,EAAElB,OAAO,GAAGH,mBAAmB,GAAGC,kBAAkB;MAC5DqB,eAAe,EAAE;IACnB,CAAC,CAAC;IACFJ,SAAS,CAACK,K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CAACZ,OAAO,CAAC;EAErDP,KAAK,CAACoB,SAAS,CAAC,MAAM;IACpB,IAAIb,OAAO,EAAE;MACXyC,UAAU,CAAC,IAAI,CAAC;MAChB;IACF;IACA,MAAMC,KAAK,GAAGC,UAAU,CAAC,MAAMF,UAAU,CAAC,KAAK,CAAC,EAAE3C,kBAAkB,CAAC;IACrE,OAAO,MAAM;MACX8C,YAAY,CAACF,KAAK,CAAC;IACrB,CAAC;EACH,CAAC,EAAE,CAAC1C,OAAO,CAAC,CAAC;EAEb,OAAOwC,OAAO;AAChB","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { StyleSheet, Text, View } from 'react-native';
5
+ import { useUserflowSafeAreaInsets } from "../../surfaces/safeArea.js";
6
+ import { chromeColors, chromeShadows, chromeSpace, chromeText } from "./tokens.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * Full-bleed authoring bottom bar. Content is top-aligned; bottom padding
10
+ * includes the home-indicator inset.
11
+ */
12
+ export function ChromeBottomSheet({
13
+ children,
14
+ helperText,
15
+ onMeasureHeight,
16
+ testID = 'userflow-chrome-bottom-sheet'
17
+ }) {
18
+ const insets = useUserflowSafeAreaInsets();
19
+ const onLayout = React.useCallback(event => {
20
+ onMeasureHeight?.(event.nativeEvent.layout.height);
21
+ }, [onMeasureHeight]);
22
+ return /*#__PURE__*/_jsxs(View, {
23
+ testID: testID,
24
+ onLayout: onLayout,
25
+ style: [styles.bar, chromeShadows.card, {
26
+ paddingBottom: chromeSpace[24] + insets.bottom
27
+ }],
28
+ children: [helperText ? /*#__PURE__*/_jsx(Text, {
29
+ style: [chromeText.labelSmBold, styles.helper, {
30
+ color: chromeColors.invertedText
31
+ }],
32
+ children: helperText
33
+ }) : null, /*#__PURE__*/_jsx(View, {
34
+ style: styles.row,
35
+ children: children
36
+ })]
37
+ });
38
+ }
39
+ const styles = StyleSheet.create({
40
+ bar: {
41
+ backgroundColor: chromeColors.primaryText,
42
+ paddingTop: chromeSpace[24],
43
+ paddingHorizontal: chromeSpace[24],
44
+ gap: chromeSpace[16]
45
+ },
46
+ helper: {
47
+ alignSelf: 'stretch',
48
+ textAlign: 'center'
49
+ },
50
+ row: {
51
+ flexDirection: 'row',
52
+ flexWrap: 'nowrap',
53
+ alignItems: 'center',
54
+ alignSelf: 'stretch',
55
+ justifyContent: 'center',
56
+ gap: chromeSpace[8]
57
+ }
58
+ });
59
+ //# sourceMappingURL=ChromeBottomSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","Text","View","useUserflowSafeAreaInsets","chromeColors","chromeShadows","chromeSpace","chromeText","jsx","_jsx","jsxs","_jsxs","ChromeBottomSheet","children","helperText","onMeasureHeight","testID","insets","onLayout","useCallback","event","nativeEvent","layout","height","style","styles","bar","card","paddingBottom","bottom","labelSmBold","helper","color","invertedText","row","create","backgroundColor","primaryText","paddingTop","paddingHorizontal","gap","alignSelf","textAlign","flexDirection","flexWrap","alignItems","justifyContent"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeBottomSheet.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAgC,cAAc;AAE7E,SAASC,yBAAyB,QAAQ,4BAAyB;AAEnE,SAASC,YAAY,EAAEC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAShF;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAC;EAChCC,QAAQ;EACRC,UAAU;EACVC,eAAe;EACfC,MAAM,GAAG;AACa,CAAC,EAAsB;EAC7C,MAAMC,MAAM,GAAGd,yBAAyB,CAAC,CAAC;EAE1C,MAAMe,QAAQ,GAAGnB,KAAK,CAACoB,WAAW,CAC/BC,KAAwB,IAAK;IAC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ACpB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
5
+ import { ChromeIcon } from "./ChromeIcon.js";
6
+ import { chromeColors, chromeRadius, chromeShadows, chromeSpace, chromeText } from "./tokens.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * Pill button. `primary` / `secondary` take an optional leading icon;
10
+ * `icon` is the 40×40 circular control used in the preview top bar.
11
+ */
12
+ export function ChromeButton({
13
+ variant = 'primary',
14
+ label,
15
+ icon,
16
+ onPress,
17
+ disabled = false,
18
+ accessibilityLabel,
19
+ testID,
20
+ flex = false
21
+ }) {
22
+ const iconOnly = variant === 'icon';
23
+ const tint = variant === 'primary' ? chromeColors.invertedText : chromeColors.blue500;
24
+ return /*#__PURE__*/_jsxs(Pressable, {
25
+ accessibilityRole: "button",
26
+ accessibilityLabel: accessibilityLabel,
27
+ disabled: disabled,
28
+ onPress: onPress,
29
+ testID: testID,
30
+ style: ({
31
+ pressed
32
+ }) => [iconOnly ? styles.icon : styles.pill, variant === 'primary' ? styles.primary : styles.secondary, variant === 'primary' ? chromeShadows.button : chromeShadows.buttonSubtle, flex ? styles.flex : null, {
33
+ opacity: disabled ? 0.5 : pressed ? 0.75 : 1
34
+ }],
35
+ children: [icon ? /*#__PURE__*/_jsx(View, {
36
+ style: styles.iconWrap,
37
+ pointerEvents: "none",
38
+ children: /*#__PURE__*/_jsx(ChromeIcon, {
39
+ name: icon,
40
+ tintColor: tint,
41
+ size: 16
42
+ })
43
+ }) : null, label && !iconOnly ? /*#__PURE__*/_jsx(Text, {
44
+ numberOfLines: 1,
45
+ style: [chromeText.buttonLabel, styles.label, {
46
+ color: tint
47
+ }],
48
+ children: label
49
+ }) : null]
50
+ });
51
+ }
52
+ const styles = StyleSheet.create({
53
+ pill: {
54
+ flexDirection: 'row',
55
+ flexShrink: 1,
56
+ alignItems: 'center',
57
+ justifyContent: 'center',
58
+ gap: chromeSpace[8],
59
+ paddingHorizontal: chromeSpace[24],
60
+ paddingVertical: chromeSpace[12],
61
+ borderRadius: chromeRadius.fullyRounded
62
+ },
63
+ label: {
64
+ flexShrink: 1
65
+ },
66
+ icon: {
67
+ width: 40,
68
+ height: 40,
69
+ alignItems: 'center',
70
+ justifyContent: 'center',
71
+ borderRadius: chromeRadius.fullyRounded
72
+ },
73
+ primary: {
74
+ backgroundColor: chromeColors.blue500
75
+ },
76
+ secondary: {
77
+ backgroundColor: chromeColors.white,
78
+ borderWidth: 1,
79
+ borderColor: chromeColors.blue500
80
+ },
81
+ flex: {
82
+ flex: 1
83
+ },
84
+ iconWrap: {
85
+ width: 16,
86
+ height: 16
87
+ }
88
+ });
89
+ //# sourceMappingURL=ChromeButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","StyleSheet","Text","View","ChromeIcon","chromeColors","chromeRadius","chromeShadows","chromeSpace","chromeText","jsx","_jsx","jsxs","_jsxs","ChromeButton","variant","label","icon","onPress","disabled","accessibilityLabel","testID","flex","iconOnly","tint","invertedText","blue500","accessibilityRole","style","pressed","styles","pill","primary","secondary","button","buttonSubtle","opacity","children","iconWrap","pointerEvents","name","tintColor","size","numberOfLines","buttonLabel","color","create","flexDirection","flexShrink","alignItems","justifyContent","gap","paddingHorizontal","paddingVertical","borderRadius","fullyRounded","width","height","backgroundColor","white","borderWidth","borderColor"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeButton.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEhE,SAASC,UAAU,QAA6B,iBAAc;AAC9D,SAASC,YAAY,EAAEC,YAAY,EAAEC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAA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
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
5
+ import { ABSOLUTE_FILL } from "../../surfaces/absoluteFill.js";
6
+ import { ChromeIcon } from "./ChromeIcon.js";
7
+ import { chromeColors, chromeRadius, chromeShadows, chromeSpace, chromeText } from "./tokens.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * Centered authoring dialog with scrim, header, body, footer slot, and close.
11
+ * Footer `children` are typically a pair of `ChromeButton`s with `flex`.
12
+ */
13
+ export function ChromeDialog({
14
+ title,
15
+ body,
16
+ onClose,
17
+ children,
18
+ testID = 'userflow-chrome-dialog'
19
+ }) {
20
+ return /*#__PURE__*/_jsxs(View, {
21
+ accessibilityViewIsModal: true,
22
+ pointerEvents: "auto",
23
+ style: styles.root,
24
+ testID: testID,
25
+ children: [/*#__PURE__*/_jsx(Pressable, {
26
+ accessibilityRole: "button",
27
+ accessibilityLabel: "Dismiss",
28
+ onPress: onClose,
29
+ style: styles.scrim,
30
+ testID: "userflow-chrome-dialog-scrim"
31
+ }), /*#__PURE__*/_jsx(View, {
32
+ pointerEvents: "box-none",
33
+ style: styles.cardSlot,
34
+ testID: "userflow-chrome-dialog-card-slot",
35
+ children: /*#__PURE__*/_jsxs(View, {
36
+ style: [styles.card, chromeShadows.dialog],
37
+ children: [/*#__PURE__*/_jsx(View, {
38
+ style: styles.header,
39
+ children: /*#__PURE__*/_jsx(Text, {
40
+ style: [chromeText.dialogTitle, {
41
+ color: chromeColors.primaryText
42
+ }],
43
+ children: title
44
+ })
45
+ }), /*#__PURE__*/_jsx(View, {
46
+ style: styles.body,
47
+ children: /*#__PURE__*/_jsx(Text, {
48
+ style: [chromeText.dialogBody, {
49
+ color: chromeColors.primaryText
50
+ }],
51
+ children: body
52
+ })
53
+ }), /*#__PURE__*/_jsx(View, {
54
+ style: styles.footer,
55
+ children: children
56
+ }), /*#__PURE__*/_jsx(Pressable, {
57
+ accessibilityRole: "button",
58
+ accessibilityLabel: "Close",
59
+ hitSlop: 8,
60
+ onPress: onClose,
61
+ style: styles.close,
62
+ testID: "userflow-chrome-dialog-close",
63
+ children: /*#__PURE__*/_jsx(ChromeIcon, {
64
+ name: "xmark",
65
+ size: 14,
66
+ tintColor: chromeColors.primaryText
67
+ })
68
+ })]
69
+ })
70
+ })]
71
+ });
72
+ }
73
+ const styles = StyleSheet.create({
74
+ root: {
75
+ ...ABSOLUTE_FILL,
76
+ alignItems: 'center',
77
+ // Vertically centered — Figma's y:444 on the Pro Max frame is a snap to the
78
+ // example element, not a placement spec.
79
+ justifyContent: 'center'
80
+ },
81
+ scrim: {
82
+ ...ABSOLUTE_FILL,
83
+ backgroundColor: chromeColors.overlay
84
+ },
85
+ cardSlot: {
86
+ alignSelf: 'stretch',
87
+ paddingHorizontal: chromeSpace[24]
88
+ },
89
+ card: {
90
+ width: '100%',
91
+ maxWidth: 382,
92
+ alignSelf: 'center',
93
+ backgroundColor: chromeColors.bgMiddle,
94
+ borderRadius: chromeRadius.lg
95
+ },
96
+ header: {
97
+ paddingTop: chromeSpace[24],
98
+ paddingHorizontal: chromeSpace[24],
99
+ paddingBottom: chromeSpace[16],
100
+ paddingRight: chromeSpace[24] + 16
101
+ },
102
+ body: {
103
+ paddingHorizontal: chromeSpace[24],
104
+ paddingVertical: chromeSpace[8]
105
+ },
106
+ footer: {
107
+ flexDirection: 'row',
108
+ alignItems: 'center',
109
+ justifyContent: 'flex-end',
110
+ gap: chromeSpace[8],
111
+ paddingTop: chromeSpace[16],
112
+ paddingHorizontal: chromeSpace[24],
113
+ paddingBottom: chromeSpace[24]
114
+ },
115
+ close: {
116
+ position: 'absolute',
117
+ top: chromeSpace[8],
118
+ right: chromeSpace[8],
119
+ width: 32,
120
+ height: 32,
121
+ borderRadius: chromeRadius.md,
122
+ alignItems: 'center',
123
+ justifyContent: 'center'
124
+ }
125
+ });
126
+ //# sourceMappingURL=ChromeDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","StyleSheet","Text","View","ABSOLUTE_FILL","ChromeIcon","chromeColors","chromeRadius","chromeShadows","chromeSpace","chromeText","jsx","_jsx","jsxs","_jsxs","ChromeDialog","title","body","onClose","children","testID","accessibilityViewIsModal","pointerEvents","style","styles","root","accessibilityRole","accessibilityLabel","onPress","scrim","cardSlot","card","dialog","header","dialogTitle","color","primaryText","dialogBody","footer","hitSlop","close","name","size","tintColor","create","alignItems","justifyContent","backgroundColor","overlay","alignSelf","paddingHorizontal","width","maxWidth","bgMiddle","borderRadius","lg","paddingTop","paddingBottom","paddingRight","paddingVertical","flexDirection","gap","position","top","right","height","md"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeDialog.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAEhE,SAASC,aAAa,QAAQ,gCAA6B;AAE3D,SAASC,UAAU,QAAQ,iBAAc;AACzC,SAASC,YAAY,EAAEC,YAAY,EAAEC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAU9F;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAC;EAC3BC,KAAK;EACLC,IAAI;EACJC,OAAO;EACPC,QAAQ;EACRC,MAAM,GAAG;AACQ,CAAC,EAAsB;EACxC,oBACEN,KAAA,CAACX,IAAI;IAACkB,wBAAwB;IAACC,aAAa,EAAC,MAAM;IAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;IAACL,MAAM,EAAEA,MAAO;IAAAD,QAAA,gBACrFP,IAAA,CAACZ,SAAS;MACR0B,iBAAiB,EAAC,QAAQ;MAC1BC,kBAAkB,EAAC,SAAS;MAC5BC,OAAO,EAAEV,OAAQ;MACjBK,KAAK,EAAEC,MAAM,CAACK,KAAM;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D,WAAW,CAAC,EAAE;EAC/B,CAAC;EACD+B,KAAK,EAAE;IACLsB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAEtD,WAAW,CAAC,CAAC,CAAC;IACnBuD,KAAK,EAAEvD,WAAW,CAAC,CAAC,CAAC;IACrB0C,KAAK,EAAE,EAAE;IACTc,MAAM,EAAE,EAAE;IACVX,YAAY,EAAE/C,YAAY,CAAC2D,EAAE;IAC7BrB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Image } from 'react-native';
5
+ import arrowLeftFromBracket from './icons/arrow-left-from-bracket.png';
6
+ import arrowRotateLeft from './icons/arrow-rotate-left.png';
7
+ import xmark from './icons/xmark.png';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const SOURCES = {
10
+ 'arrow-left-from-bracket': arrowLeftFromBracket,
11
+ 'arrow-rotate-left': arrowRotateLeft,
12
+ xmark
13
+ };
14
+ /** Monochrome PNG glyph tinted via `tintColor` (white source assets). */
15
+ export function ChromeIcon({
16
+ name,
17
+ tintColor,
18
+ size = 16,
19
+ style,
20
+ testID
21
+ }) {
22
+ return /*#__PURE__*/_jsx(Image, {
23
+ accessibilityIgnoresInvertColors: true,
24
+ source: SOURCES[name],
25
+ style: [{
26
+ width: size,
27
+ height: size,
28
+ tintColor
29
+ }, style],
30
+ testID: testID
31
+ });
32
+ }
33
+ //# sourceMappingURL=ChromeIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Image","arrowLeftFromBracket","arrowRotateLeft","xmark","jsx","_jsx","SOURCES","ChromeIcon","name","tintColor","size","style","testID","accessibilityIgnoresInvertColors","source","width","height"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeIcon.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,KAAK,QAAyC,cAAc;AAErE,OAAOC,oBAAoB,MAAM,qCAAqC;AACtE,OAAOC,eAAe,MAAM,+BAA+B;AAC3D,OAAOC,KAAK,MAAM,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAItC,MAAMC,OAAuC,GAAG;EAC9C,yBAAyB,EAAEL,oBAAoB;EAC/C,mBAAmB,EAAEC,eAAe;EACpCC;AACF,CAAC;AAUD;AACA,OAAO,SAASI,UAAUA,CAAC;EACzBC,IAAI;EACJC,SAAS;EACTC,IAAI,GAAG,EAAE;EACTC,KAAK;EACLC;AACe,CAAC,EAAsB;EACtC,oBACEP,IAAA,CAACL,KAAK;IACJa,gCAAgC;IAChCC,MAAM,EAAER,OAAO,CAACE,IAAI,CAAE;IACtBG,KAAK,EAAE,CAAC;MAAEI,KAAK,EAAEL,IAAI;MAAEM,MAAM,EAAEN,IAAI;MAAED;IAAU,CAAC,EAAEE,KAAK,CAAE;IACzDC,MAAM,EAAEA;EAAO,CAChB,CAAC;AAEN","ignoreList":[]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { StyleSheet, Text, View } from 'react-native';
5
+ import { TooltipNotch, tooltipNotchDiamondSide } from "../../surfaces/tooltip/TooltipNotch.js";
6
+ import { chromeColors, chromeRadius, chromeShadows, chromeSpace, chromeText } from "./tokens.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const CHROME_TOOLTIP_NOTCH_SIZE = 8;
9
+ export const CHROME_TOOLTIP_DEFAULT_DURATION_MS = 5000;
10
+ /**
11
+ * Onboarding bubble with an upward notch. Pointer-events none so it does not
12
+ * steal the double-tap that shows/hides authoring chrome.
13
+ */
14
+ export function ChromeTooltip({
15
+ children,
16
+ visible = true,
17
+ durationMs = CHROME_TOOLTIP_DEFAULT_DURATION_MS,
18
+ onDismiss,
19
+ testID = 'userflow-chrome-tooltip'
20
+ }) {
21
+ const [dismissed, setDismissed] = React.useState(false);
22
+ const onDismissRef = React.useRef(onDismiss);
23
+ onDismissRef.current = onDismiss;
24
+ React.useEffect(() => {
25
+ if (!visible) {
26
+ setDismissed(false);
27
+ return;
28
+ }
29
+ if (durationMs <= 0) return;
30
+ const id = setTimeout(() => {
31
+ setDismissed(true);
32
+ onDismissRef.current?.();
33
+ }, durationMs);
34
+ return () => {
35
+ clearTimeout(id);
36
+ };
37
+ }, [visible, durationMs]);
38
+ if (!visible || dismissed) return null;
39
+ const diamond = tooltipNotchDiamondSide(CHROME_TOOLTIP_NOTCH_SIZE);
40
+ return /*#__PURE__*/_jsxs(View, {
41
+ pointerEvents: "none",
42
+ style: styles.root,
43
+ testID: testID,
44
+ children: [/*#__PURE__*/_jsx(View, {
45
+ style: styles.notchClip,
46
+ children: /*#__PURE__*/_jsx(TooltipNotch, {
47
+ left: (16 - diamond) / 2,
48
+ notchColor: chromeColors.primaryText,
49
+ notchSize: CHROME_TOOLTIP_NOTCH_SIZE,
50
+ top: CHROME_TOOLTIP_NOTCH_SIZE - diamond / 2
51
+ })
52
+ }), /*#__PURE__*/_jsx(View, {
53
+ style: [styles.bubble, chromeShadows.tooltip],
54
+ children: /*#__PURE__*/_jsx(Text, {
55
+ style: [chromeText.tooltip, {
56
+ color: chromeColors.invertedText
57
+ }],
58
+ children: children
59
+ })
60
+ })]
61
+ });
62
+ }
63
+ const styles = StyleSheet.create({
64
+ root: {
65
+ alignItems: 'center',
66
+ maxWidth: 300
67
+ },
68
+ notchClip: {
69
+ width: 16,
70
+ height: CHROME_TOOLTIP_NOTCH_SIZE,
71
+ overflow: 'hidden',
72
+ marginBottom: -1,
73
+ position: 'relative'
74
+ },
75
+ bubble: {
76
+ backgroundColor: chromeColors.primaryText,
77
+ borderRadius: chromeRadius.lg,
78
+ padding: chromeSpace[12],
79
+ maxWidth: 300
80
+ }
81
+ });
82
+ //# sourceMappingURL=ChromeTooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","Text","View","TooltipNotch","tooltipNotchDiamondSide","chromeColors","chromeRadius","chromeShadows","chromeSpace","chromeText","jsx","_jsx","jsxs","_jsxs","CHROME_TOOLTIP_NOTCH_SIZE","CHROME_TOOLTIP_DEFAULT_DURATION_MS","ChromeTooltip","children","visible","durationMs","onDismiss","testID","dismissed","setDismissed","useState","onDismissRef","useRef","current","useEffect","id","setTimeout","clearTimeout","diamond","pointerEvents","style","styles","root","notchClip","left","notchColor","primaryText","notchSize","top","bubble","tooltip","color","invertedText","create","alignItems","maxWidth","width","height","overflow","marginBottom","position","backgroundColor","borderRadius","lg","padding"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeTooltip.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAErD,SAASC,YAAY,EAAEC,uBAAuB,QAAQ,wCAAqC;AAE3F,SAASC,YAAY,EAAEC,YAAY,EAAEC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE9F,OAAO,MAAMC,yBAAyB,GAAG,CAAC;AAC1C,OAAO,MAAMC,kCAAkC,GAAG,IAAI;AAWtD;AACA;AACA;AACA;AACA,OAAO,SAASC,aAAaA,CAAC;EAC5BC,QAAQ;EACRC,OAAO,GAAG,IAAI;EACdC,UAAU,GAAGJ,kCAAkC;EAC/CK,SAAS;EACTC,MAAM,GAAG;AACS,CAAC,EAA6B;EAChD,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAGxB,KAAK,CAACyB,QAAQ,CAAC,KAAK,CAAC;EACvD,MAAMC,YAAY,GAAG1B,KAAK,CAAC2B,MAAM,CAACN,SAAS,CAAC;EAC5CK,YAAY,CAACE,OAAO,GAAGP,SAAS;EAEhCrB,KAAK,CAAC6B,SAAS,CAAC,MAAM;IACpB,IAAI,CAACV,OAAO,EAAE;MACZK,YA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GAAGnC,UAAU,CAAC+C,MAAM,CAAC;EAC/BX,IAAI,EAAE;IACJY,UAAU,EAAE,QAAQ;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDZ,SAAS,EAAE;IACTa,KAAK,EAAE,EAAE;IACTC,MAAM,EAAErC,yBAAyB;IACjCsC,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE,CAAC,CAAC;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDX,MAAM,EAAE;IACNY,eAAe,EAAElD,YAAY,CAACmC,WAAW;IACzCgB,YAAY,EAAElD,YAAY,CAACmD,EAAE;IAC7BC,OAAO,EAAElD,WAAW,CAAC,EAAE,CAAC;IACxByC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Image, StyleSheet, Text, View } from 'react-native';
5
+ import { useUserflowSafeAreaInsets } from "../../surfaces/safeArea.js";
6
+ import logomark from './icons/userflow-logomark.png';
7
+ import { chromeColors, chromeShadows, chromeSpace, chromeText } from "./tokens.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ /**
10
+ * Full-bleed authoring top bar. Height comes from safe-area + content, not
11
+ * the 120pt Figma frame (that number already includes the status bar).
12
+ *
13
+ * Measured on the Pro Max reference: 4pt below the status bar, 16pt above
14
+ * the bottom edge of the bar.
15
+ */
16
+ export function ChromeTopBar({
17
+ label,
18
+ tone = 'default',
19
+ left,
20
+ right,
21
+ onMeasureHeight,
22
+ numberOfLines = 1,
23
+ accessibilityElementsHidden,
24
+ importantForAccessibility,
25
+ testID = 'userflow-chrome-top-bar'
26
+ }) {
27
+ const insets = useUserflowSafeAreaInsets();
28
+ const onLayout = React.useCallback(event => {
29
+ onMeasureHeight?.(event.nativeEvent.layout.height);
30
+ }, [onMeasureHeight]);
31
+ return /*#__PURE__*/_jsx(View, {
32
+ accessibilityElementsHidden: accessibilityElementsHidden,
33
+ importantForAccessibility: importantForAccessibility,
34
+ testID: testID,
35
+ onLayout: onLayout,
36
+ style: [styles.bar, chromeShadows.card, {
37
+ backgroundColor: tone === 'error' ? chromeColors.danger : chromeColors.primaryText,
38
+ paddingTop: insets.top + CONTENT_TOP_GAP
39
+ }],
40
+ children: /*#__PURE__*/_jsxs(View, {
41
+ style: styles.row,
42
+ children: [/*#__PURE__*/_jsx(View, {
43
+ style: styles.slot,
44
+ children: left
45
+ }), /*#__PURE__*/_jsxs(View, {
46
+ style: styles.labelRow,
47
+ pointerEvents: "none",
48
+ children: [/*#__PURE__*/_jsx(Image, {
49
+ accessibilityIgnoresInvertColors: true,
50
+ source: logomark,
51
+ style: styles.logomark,
52
+ testID: "userflow-chrome-logomark"
53
+ }), /*#__PURE__*/_jsx(Text, {
54
+ numberOfLines: numberOfLines,
55
+ style: [chromeText.barTitle, styles.label],
56
+ children: label
57
+ })]
58
+ }), /*#__PURE__*/_jsx(View, {
59
+ style: styles.slot,
60
+ children: right
61
+ })]
62
+ })
63
+ });
64
+ }
65
+ const SLOT = 40;
66
+ /** Gap between the status-bar inset and the content row (Figma: 5pt / we use 4). */
67
+ const CONTENT_TOP_GAP = 4;
68
+ const styles = StyleSheet.create({
69
+ bar: {
70
+ paddingHorizontal: chromeSpace[24],
71
+ paddingBottom: chromeSpace[16]
72
+ },
73
+ row: {
74
+ flexDirection: 'row',
75
+ alignItems: 'center',
76
+ minHeight: SLOT
77
+ },
78
+ slot: {
79
+ width: SLOT,
80
+ height: SLOT,
81
+ alignItems: 'center',
82
+ justifyContent: 'center'
83
+ },
84
+ labelRow: {
85
+ flex: 1,
86
+ flexDirection: 'row',
87
+ alignItems: 'center',
88
+ justifyContent: 'center',
89
+ gap: chromeSpace[8],
90
+ paddingHorizontal: chromeSpace[8]
91
+ },
92
+ label: {
93
+ color: chromeColors.invertedText,
94
+ textAlign: 'center',
95
+ flexShrink: 1
96
+ },
97
+ logomark: {
98
+ // Figma `Warstwa_1` stacked-card mark. Not the Made-with-Userflow footer glyph.
99
+ width: 24,
100
+ height: 22,
101
+ tintColor: chromeColors.invertedText
102
+ }
103
+ });
104
+ //# sourceMappingURL=ChromeTopBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Image","StyleSheet","Text","View","useUserflowSafeAreaInsets","logomark","chromeColors","chromeShadows","chromeSpace","chromeText","jsx","_jsx","jsxs","_jsxs","ChromeTopBar","label","tone","left","right","onMeasureHeight","numberOfLines","accessibilityElementsHidden","importantForAccessibility","testID","insets","onLayout","useCallback","event","nativeEvent","layout","height","style","styles","bar","card","backgroundColor","danger","primaryText","paddingTop","top","CONTENT_TOP_GAP","children","row","slot","labelRow","pointerEvents","accessibilityIgnoresInvertColors","source","barTitle","SLOT","create","paddingHorizontal","paddingBottom","flexDirection","alignItems","minHeight","width","justifyContent","flex","gap","color","invertedText","textAlign","flexShrink","tintColor"],"sourceRoot":"../../../../src","sources":["authoring/chrome/ChromeTopBar.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,IAAI,QAAgC,cAAc;AAEpF,SAASC,yBAAyB,QAAQ,4BAAyB;AAEnE,OAAOC,QAAQ,MAAM,+BAA+B;AACpD,SAASC,YAAY,EAAEC,aAAa,EAAEC,WAAW,EAAEC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAmBhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAC;EAC3BC,KAAK;EACLC,IAAI,GAAG,SAAS;EAChBC,IAAI;EACJC,KAAK;EACLC,eAAe;EACfC,aAAa,GAAG,CAAC;EACjBC,2BAA2B;EAC3BC,yBAAyB;EACzBC,MAAM,GAAG;AACQ,CAAC,EAAsB;EACxC,MAAMC,MAAM,GAAGpB,yBAAyB,CAAC,CAAC;EAE1C,MAAMqB,QAAQ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