@userflow-tech/react-native 0.1.1 → 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 (788) hide show
  1. package/README.md +97 -61
  2. package/app.plugin.js +11 -1
  3. package/babel-plugin/index.d.ts +8 -8
  4. package/babel-plugin/index.d.ts.map +1 -1
  5. package/babel-plugin/index.js +17 -9
  6. package/babel-plugin/index.js.map +1 -1
  7. package/babel-plugin.js +13 -0
  8. package/docs/anchoring.md +141 -13
  9. package/docs/deep-linking.md +18 -15
  10. package/docs/theme-mapping.md +44 -15
  11. package/docs/troubleshooting.md +36 -29
  12. package/expo-plugin/withUserflow.js +1 -1
  13. package/expo-plugin/withUserflow.js.map +1 -1
  14. package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
  15. package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
  16. package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
  17. package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
  18. package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
  19. package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
  20. package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
  21. package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
  22. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
  23. package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
  24. package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
  25. package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
  26. package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
  27. package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
  28. package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
  29. package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
  30. package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
  31. package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
  32. package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
  33. package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
  34. package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
  35. package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
  36. package/lib/commonjs/anchors/semanticMatcher.js +285 -0
  37. package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
  38. package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
  39. package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
  40. package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
  41. package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
  42. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
  43. package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
  44. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
  45. package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  46. package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
  47. package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
  48. package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
  49. package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
  50. package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
  51. package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
  52. package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
  53. package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
  54. package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
  55. package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
  56. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
  57. package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
  58. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
  59. package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
  60. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  61. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  62. package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  63. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  64. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  65. package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  66. package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
  67. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  68. package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  69. package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
  70. package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
  71. package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
  72. package/lib/commonjs/authoring/chrome/tokens.js +150 -0
  73. package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
  74. package/lib/commonjs/authoring/doubleTap.js +23 -0
  75. package/lib/commonjs/authoring/doubleTap.js.map +1 -0
  76. package/lib/commonjs/authoring/elementPickerController.js +102 -0
  77. package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
  78. package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
  79. package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
  80. package/lib/commonjs/authoring/hitTest.js +106 -0
  81. package/lib/commonjs/authoring/hitTest.js.map +1 -0
  82. package/lib/commonjs/content/RichContentRenderer.js +12 -2
  83. package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
  84. package/lib/commonjs/content/StepButton.js +19 -4
  85. package/lib/commonjs/content/StepButton.js.map +1 -1
  86. package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
  87. package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
  88. package/lib/commonjs/content/themeColor.js +11 -0
  89. package/lib/commonjs/content/themeColor.js.map +1 -1
  90. package/lib/commonjs/deviceContext.js +158 -0
  91. package/lib/commonjs/deviceContext.js.map +1 -0
  92. package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
  93. package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
  94. package/lib/commonjs/hostAppVersion.js +242 -0
  95. package/lib/commonjs/hostAppVersion.js.map +1 -0
  96. package/lib/commonjs/index.js +118 -5
  97. package/lib/commonjs/index.js.map +1 -1
  98. package/lib/commonjs/lifecycle.js +2 -0
  99. package/lib/commonjs/lifecycle.js.map +1 -1
  100. package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
  101. package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
  102. package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
  103. package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
  104. package/lib/commonjs/pairing/PairingController.js +29 -2
  105. package/lib/commonjs/pairing/PairingController.js.map +1 -1
  106. package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
  107. package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
  108. package/lib/commonjs/pairing/diagnostics.js +9 -0
  109. package/lib/commonjs/pairing/diagnostics.js.map +1 -1
  110. package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
  111. package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
  112. package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
  113. package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
  114. package/lib/commonjs/pairing/tokenStorage.js +25 -2
  115. package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
  116. package/lib/commonjs/pairing/usePairingState.js +3 -1
  117. package/lib/commonjs/pairing/usePairingState.js.map +1 -1
  118. package/lib/commonjs/runtime/FlowRenderer.js +45 -21
  119. package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
  120. package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
  121. package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
  122. package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
  123. package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
  124. package/lib/commonjs/runtime/UserflowProvider.js +74 -20
  125. package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
  126. package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
  127. package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
  128. package/lib/commonjs/runtime/flowEngine.js +3 -1
  129. package/lib/commonjs/runtime/flowEngine.js.map +1 -1
  130. package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
  131. package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
  132. package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
  133. package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
  134. package/lib/commonjs/screenTracker.js +46 -4
  135. package/lib/commonjs/screenTracker.js.map +1 -1
  136. package/lib/commonjs/surfaces/CardFade.js +31 -0
  137. package/lib/commonjs/surfaces/CardFade.js.map +1 -0
  138. package/lib/commonjs/surfaces/CloseButton.js +11 -6
  139. package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
  140. package/lib/commonjs/surfaces/ModalSurface.js +50 -34
  141. package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
  142. package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
  143. package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
  144. package/lib/commonjs/surfaces/cardTransition.js +70 -0
  145. package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
  146. package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
  147. package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
  148. package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
  149. package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
  150. package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
  151. package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
  152. package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
  153. package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
  154. package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
  155. package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
  156. package/lib/commonjs/surfaces/themeChrome.js +4 -1
  157. package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
  158. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
  159. package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
  160. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
  161. package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
  162. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
  163. package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  164. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
  165. package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  166. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
  167. package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  168. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
  169. package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  170. package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
  171. package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
  172. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
  173. package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  174. package/lib/commonjs/version.js +1 -1
  175. package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
  176. package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
  177. package/lib/module/anchors/anchorChangeTicker.js +10 -0
  178. package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
  179. package/lib/module/anchors/elementConditionEvaluator.js +25 -12
  180. package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
  181. package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
  182. package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
  183. package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
  184. package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
  185. package/lib/module/anchors/fiber/fiberInternals.js +139 -3
  186. package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
  187. package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
  188. package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
  189. package/lib/module/anchors/fiber/readHostContent.js +127 -0
  190. package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
  191. package/lib/module/anchors/fiberAnchorCache.js +40 -0
  192. package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
  193. package/lib/module/anchors/resolveAnchorHost.js +15 -21
  194. package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
  195. package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
  196. package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
  197. package/lib/module/anchors/semanticMatcher.js +280 -0
  198. package/lib/module/anchors/semanticMatcher.js.map +1 -0
  199. package/lib/module/authoring/ElementPickerOverlay.js +485 -0
  200. package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
  201. package/lib/module/authoring/capturePickerScreenshot.js +68 -0
  202. package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
  203. package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
  204. package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
  205. package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
  206. package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
  207. package/lib/module/authoring/chrome/ChromeButton.js +89 -0
  208. package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
  209. package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
  210. package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
  211. package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
  212. package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
  213. package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
  214. package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
  215. package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
  216. package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
  217. package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
  218. package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
  219. package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
  220. package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
  221. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  222. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  223. package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  224. package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  225. package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  226. package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  227. package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
  228. package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  229. package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  230. package/lib/module/authoring/chrome/icons/xmark.png +0 -0
  231. package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
  232. package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
  233. package/lib/module/authoring/chrome/tokens.js +146 -0
  234. package/lib/module/authoring/chrome/tokens.js.map +1 -0
  235. package/lib/module/authoring/doubleTap.js +18 -0
  236. package/lib/module/authoring/doubleTap.js.map +1 -0
  237. package/lib/module/authoring/elementPickerController.js +97 -0
  238. package/lib/module/authoring/elementPickerController.js.map +1 -0
  239. package/lib/module/authoring/fingerprintFromInstance.js +187 -0
  240. package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
  241. package/lib/module/authoring/hitTest.js +100 -0
  242. package/lib/module/authoring/hitTest.js.map +1 -0
  243. package/lib/module/content/RichContentRenderer.js +12 -2
  244. package/lib/module/content/RichContentRenderer.js.map +1 -1
  245. package/lib/module/content/StepButton.js +19 -4
  246. package/lib/module/content/StepButton.js.map +1 -1
  247. package/lib/module/content/resolveStepButtonChrome.js +8 -6
  248. package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
  249. package/lib/module/content/themeColor.js +10 -0
  250. package/lib/module/content/themeColor.js.map +1 -1
  251. package/lib/module/deviceContext.js +142 -0
  252. package/lib/module/deviceContext.js.map +1 -0
  253. package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
  254. package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
  255. package/lib/module/hostAppVersion.js +225 -0
  256. package/lib/module/hostAppVersion.js.map +1 -0
  257. package/lib/module/index.js +119 -6
  258. package/lib/module/index.js.map +1 -1
  259. package/lib/module/lifecycle.js +2 -0
  260. package/lib/module/lifecycle.js.map +1 -1
  261. package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
  262. package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
  263. package/lib/module/navigation/isOverlayPresentation.js +58 -0
  264. package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
  265. package/lib/module/pairing/PairingController.js +30 -3
  266. package/lib/module/pairing/PairingController.js.map +1 -1
  267. package/lib/module/pairing/PreviewModeBanner.js +212 -85
  268. package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
  269. package/lib/module/pairing/diagnostics.js +8 -0
  270. package/lib/module/pairing/diagnostics.js.map +1 -1
  271. package/lib/module/pairing/elementPickerRelay.js +87 -0
  272. package/lib/module/pairing/elementPickerRelay.js.map +1 -0
  273. package/lib/module/pairing/resolvePreviewChrome.js +48 -0
  274. package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
  275. package/lib/module/pairing/tokenStorage.js +24 -2
  276. package/lib/module/pairing/tokenStorage.js.map +1 -1
  277. package/lib/module/pairing/usePairingState.js +3 -1
  278. package/lib/module/pairing/usePairingState.js.map +1 -1
  279. package/lib/module/runtime/FlowRenderer.js +45 -21
  280. package/lib/module/runtime/FlowRenderer.js.map +1 -1
  281. package/lib/module/runtime/FlowSurfaceFade.js +49 -26
  282. package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
  283. package/lib/module/runtime/TargetPressBridge.js +12 -43
  284. package/lib/module/runtime/TargetPressBridge.js.map +1 -1
  285. package/lib/module/runtime/UserflowProvider.js +74 -20
  286. package/lib/module/runtime/UserflowProvider.js.map +1 -1
  287. package/lib/module/runtime/changedTouchPoints.js +43 -0
  288. package/lib/module/runtime/changedTouchPoints.js.map +1 -0
  289. package/lib/module/runtime/flowEngine.js +3 -1
  290. package/lib/module/runtime/flowEngine.js.map +1 -1
  291. package/lib/module/runtime/flowSessionViewState.js +32 -7
  292. package/lib/module/runtime/flowSessionViewState.js.map +1 -1
  293. package/lib/module/runtime/useFlowSessionState.js +2 -1
  294. package/lib/module/runtime/useFlowSessionState.js.map +1 -1
  295. package/lib/module/screenTracker.js +42 -4
  296. package/lib/module/screenTracker.js.map +1 -1
  297. package/lib/module/surfaces/CardFade.js +26 -0
  298. package/lib/module/surfaces/CardFade.js.map +1 -0
  299. package/lib/module/surfaces/CloseButton.js +10 -6
  300. package/lib/module/surfaces/CloseButton.js.map +1 -1
  301. package/lib/module/surfaces/ModalSurface.js +52 -36
  302. package/lib/module/surfaces/ModalSurface.js.map +1 -1
  303. package/lib/module/surfaces/TooltipSurface.js +368 -90
  304. package/lib/module/surfaces/TooltipSurface.js.map +1 -1
  305. package/lib/module/surfaces/cardTransition.js +64 -0
  306. package/lib/module/surfaces/cardTransition.js.map +1 -0
  307. package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
  308. package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
  309. package/lib/module/surfaces/resolveModalLayout.js +7 -3
  310. package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
  311. package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
  312. package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
  313. package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
  314. package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
  315. package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
  316. package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
  317. package/lib/module/surfaces/themeChrome.js +3 -1
  318. package/lib/module/surfaces/themeChrome.js.map +1 -1
  319. package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
  320. package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
  321. package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
  322. package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
  323. package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
  324. package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
  325. package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
  326. package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
  327. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
  328. package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
  329. package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
  330. package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
  331. package/lib/module/surfaces/tooltip/rect.js +11 -0
  332. package/lib/module/surfaces/tooltip/rect.js.map +1 -1
  333. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
  334. package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
  335. package/lib/module/version.js +1 -1
  336. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  337. package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
  339. package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  340. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
  341. package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  342. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  343. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  345. package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
  347. package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  348. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  349. package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
  351. package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  352. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
  353. package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
  355. package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  357. package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
  359. package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
  361. package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  362. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
  363. package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  365. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  367. package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
  369. package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  371. package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  373. package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  375. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  376. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  377. package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  379. package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  381. package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  382. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
  383. package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
  385. package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
  387. package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
  389. package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  390. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
  391. package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
  392. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
  393. package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
  394. package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  396. package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
  397. package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
  398. package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
  399. package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
  400. package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  401. package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
  402. package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/index.d.ts +53 -2
  404. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
  406. package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
  407. package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  408. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
  409. package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  410. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
  411. package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
  412. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
  413. package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  414. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
  415. package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
  416. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
  417. package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
  418. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
  419. package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  420. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
  421. package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
  422. package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
  423. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
  424. package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
  425. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
  426. package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  427. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
  428. package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
  430. package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
  431. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
  432. package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
  433. package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
  435. package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
  436. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
  437. package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
  439. package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
  440. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
  441. package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
  442. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
  443. package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
  444. package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
  445. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
  446. package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
  448. package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
  449. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
  450. package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  452. package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  453. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  456. package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  457. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  458. package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  459. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  460. package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  461. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
  462. package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  464. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  465. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  466. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  467. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  468. package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  469. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  470. package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  471. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  472. package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  473. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  474. package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  475. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
  476. package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
  477. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  478. package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  479. package/lib/typescript/commonjs/src/version.d.ts +1 -1
  480. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
  481. package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
  482. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
  483. package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
  484. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
  485. package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
  486. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
  487. package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
  488. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
  489. package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
  490. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
  491. package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
  492. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
  493. package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
  494. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
  495. package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
  496. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
  497. package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
  498. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
  499. package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
  500. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
  501. package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
  502. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
  503. package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
  504. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
  505. package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
  506. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
  507. package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
  508. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
  509. package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
  510. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
  511. package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
  512. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
  513. package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
  514. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
  515. package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
  516. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
  517. package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
  518. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
  519. package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
  520. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
  521. package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
  522. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
  523. package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
  524. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
  525. package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
  526. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
  527. package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
  528. package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
  529. package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
  530. package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
  531. package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
  532. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
  533. package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
  534. package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
  535. package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
  536. package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
  537. package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
  538. package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
  539. package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
  540. package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
  541. package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
  542. package/lib/typescript/module/src/deviceContext.d.ts +66 -0
  543. package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
  544. package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
  545. package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
  546. package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
  547. package/lib/typescript/module/src/index.d.ts +53 -2
  548. package/lib/typescript/module/src/index.d.ts.map +1 -1
  549. package/lib/typescript/module/src/lifecycle.d.ts +6 -0
  550. package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
  551. package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
  552. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
  553. package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
  554. package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
  555. package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
  556. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
  557. package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
  558. package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
  559. package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
  560. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
  561. package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
  562. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
  563. package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
  564. package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
  565. package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
  566. package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
  567. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
  568. package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
  569. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
  570. package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
  571. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
  572. package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
  573. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
  574. package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
  575. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
  576. package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
  577. package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
  578. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
  579. package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
  580. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
  581. package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
  582. package/lib/typescript/module/src/screenTracker.d.ts +21 -3
  583. package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
  584. package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
  585. package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
  586. package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
  587. package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
  588. package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
  589. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
  590. package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
  591. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
  592. package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
  593. package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
  594. package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
  595. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
  596. package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
  597. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
  598. package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
  599. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
  600. package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
  601. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
  602. package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
  603. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
  604. package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
  605. package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
  606. package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
  607. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
  608. package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
  609. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
  610. package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
  611. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
  612. package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
  613. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
  614. package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
  615. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
  616. package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
  617. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
  618. package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
  619. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
  620. package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
  621. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
  622. package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
  623. package/lib/typescript/module/src/version.d.ts +1 -1
  624. package/package.json +22 -16
  625. package/src/anchors/AutoAnchorRegistry.ts +139 -2
  626. package/src/anchors/anchorChangeTicker.ts +10 -0
  627. package/src/anchors/elementConditionEvaluator.ts +29 -16
  628. package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
  629. package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
  630. package/src/anchors/fiber/fiberInternals.ts +166 -3
  631. package/src/anchors/fiber/indexHostFibers.ts +136 -0
  632. package/src/anchors/fiber/readHostContent.ts +146 -0
  633. package/src/anchors/fiberAnchorCache.ts +45 -0
  634. package/src/anchors/resolveAnchorHost.ts +23 -23
  635. package/src/anchors/resolveAutoAnchorHost.ts +180 -0
  636. package/src/anchors/semanticMatcher.ts +361 -0
  637. package/src/authoring/ElementPickerOverlay.tsx +553 -0
  638. package/src/authoring/capturePickerScreenshot.ts +90 -0
  639. package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
  640. package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
  641. package/src/authoring/chrome/ChromeButton.tsx +103 -0
  642. package/src/authoring/chrome/ChromeDialog.tsx +121 -0
  643. package/src/authoring/chrome/ChromeIcon.tsx +40 -0
  644. package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
  645. package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
  646. package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
  647. package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
  648. package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
  649. package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
  650. package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
  651. package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
  652. package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
  653. package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
  654. package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
  655. package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
  656. package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
  657. package/src/authoring/chrome/icons/xmark.png +0 -0
  658. package/src/authoring/chrome/icons/xmark@2x.png +0 -0
  659. package/src/authoring/chrome/icons/xmark@3x.png +0 -0
  660. package/src/authoring/chrome/tokens.ts +106 -0
  661. package/src/authoring/doubleTap.ts +27 -0
  662. package/src/authoring/elementPickerController.ts +135 -0
  663. package/src/authoring/fingerprintFromInstance.ts +152 -0
  664. package/src/authoring/hitTest.ts +133 -0
  665. package/src/content/RichContentRenderer.tsx +22 -1
  666. package/src/content/StepButton.tsx +17 -2
  667. package/src/content/resolveStepButtonChrome.ts +12 -6
  668. package/src/content/themeColor.ts +10 -0
  669. package/src/deviceContext.ts +168 -0
  670. package/src/expo-router/useUserflowExpoRouter.ts +47 -4
  671. package/src/hostAppVersion.ts +258 -0
  672. package/src/index.ts +148 -4
  673. package/src/lifecycle.ts +8 -0
  674. package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
  675. package/src/navigation/isOverlayPresentation.ts +76 -0
  676. package/src/pairing/PairingController.ts +32 -3
  677. package/src/pairing/PreviewModeBanner.tsx +250 -94
  678. package/src/pairing/diagnostics.ts +8 -0
  679. package/src/pairing/elementPickerRelay.ts +100 -0
  680. package/src/pairing/resolvePreviewChrome.ts +57 -0
  681. package/src/pairing/tokenStorage.ts +31 -2
  682. package/src/pairing/usePairingState.ts +2 -0
  683. package/src/runtime/FlowRenderer.tsx +55 -27
  684. package/src/runtime/FlowSurfaceFade.tsx +51 -30
  685. package/src/runtime/TargetPressBridge.tsx +14 -32
  686. package/src/runtime/UserflowProvider.tsx +76 -13
  687. package/src/runtime/changedTouchPoints.ts +34 -0
  688. package/src/runtime/flowEngine.ts +2 -0
  689. package/src/runtime/flowSessionViewState.ts +42 -4
  690. package/src/runtime/useFlowSessionState.ts +2 -0
  691. package/src/screenTracker.ts +46 -4
  692. package/src/surfaces/CardFade.tsx +18 -0
  693. package/src/surfaces/CloseButton.tsx +17 -7
  694. package/src/surfaces/MadeWithUserflow.tsx +1 -1
  695. package/src/surfaces/ModalSurface.tsx +48 -35
  696. package/src/surfaces/TooltipSurface.tsx +406 -86
  697. package/src/surfaces/cardTransition.ts +67 -0
  698. package/src/surfaces/resolveHighlightChrome.ts +139 -0
  699. package/src/surfaces/resolveModalLayout.ts +16 -8
  700. package/src/surfaces/resolveTooltipLayout.ts +1 -14
  701. package/src/surfaces/surfaceInteractionConfig.ts +25 -0
  702. package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
  703. package/src/surfaces/themeChrome.ts +5 -3
  704. package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
  705. package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
  706. package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
  707. package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
  708. package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
  709. package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
  710. package/src/surfaces/tooltip/rect.ts +11 -0
  711. package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
  712. package/src/version.ts +1 -1
  713. package/vendor/core/dist/attributes.d.ts +1 -2
  714. package/vendor/core/dist/attributes.d.ts.map +1 -1
  715. package/vendor/core/dist/attributes.js.map +1 -1
  716. package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
  717. package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
  718. package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
  719. package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
  720. package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
  721. package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
  722. package/vendor/core/dist/engine/PairingEngine.js +103 -9
  723. package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
  724. package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
  725. package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
  726. package/vendor/core/dist/engine/UserflowCore.js +64 -1
  727. package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
  728. package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
  729. package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
  730. package/vendor/core/dist/engine/conditionOperators.js +168 -0
  731. package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
  732. package/vendor/core/dist/engine/handleActions.d.ts +27 -4
  733. package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
  734. package/vendor/core/dist/engine/handleActions.js +140 -13
  735. package/vendor/core/dist/engine/handleActions.js.map +1 -1
  736. package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
  737. package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
  738. package/vendor/core/dist/engine/simpleObservable.js +29 -0
  739. package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
  740. package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
  741. package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
  742. package/vendor/core/dist/engine/trackCondition.js +177 -0
  743. package/vendor/core/dist/engine/trackCondition.js.map +1 -0
  744. package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
  745. package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
  746. package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
  747. package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
  748. package/vendor/core/dist/index.d.ts +4 -3
  749. package/vendor/core/dist/index.d.ts.map +1 -1
  750. package/vendor/core/dist/index.js +2 -1
  751. package/vendor/core/dist/index.js.map +1 -1
  752. package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
  753. package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
  754. package/vendor/core/dist/normalizeAttributes.js +127 -0
  755. package/vendor/core/dist/normalizeAttributes.js.map +1 -0
  756. package/vendor/core/dist/transport/phoenix.d.ts +11 -6
  757. package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
  758. package/vendor/core/dist/transport/phoenix.js +59 -5
  759. package/vendor/core/dist/transport/phoenix.js.map +1 -1
  760. package/vendor/core/dist/types.d.ts +26 -1
  761. package/vendor/core/dist/types.d.ts.map +1 -1
  762. package/vendor/core/dist/version.d.ts +1 -1
  763. package/vendor/core/dist/version.js +1 -1
  764. package/vendor/core/package.json +1 -1
  765. package/vendor/protocol/dist/attributes.d.ts +43 -0
  766. package/vendor/protocol/dist/attributes.d.ts.map +1 -0
  767. package/vendor/protocol/dist/attributes.js +15 -0
  768. package/vendor/protocol/dist/attributes.js.map +1 -0
  769. package/vendor/protocol/dist/autoData.d.ts +2 -2
  770. package/vendor/protocol/dist/autoData.js +2 -2
  771. package/vendor/protocol/dist/events.d.ts +8 -0
  772. package/vendor/protocol/dist/events.d.ts.map +1 -1
  773. package/vendor/protocol/dist/flows.d.ts +66 -4
  774. package/vendor/protocol/dist/flows.d.ts.map +1 -1
  775. package/vendor/protocol/dist/flows.js +50 -3
  776. package/vendor/protocol/dist/flows.js.map +1 -1
  777. package/vendor/protocol/dist/index.d.ts +1 -0
  778. package/vendor/protocol/dist/index.d.ts.map +1 -1
  779. package/vendor/protocol/dist/index.js +1 -0
  780. package/vendor/protocol/dist/index.js.map +1 -1
  781. package/vendor/protocol/dist/messages.d.ts +25 -4
  782. package/vendor/protocol/dist/messages.d.ts.map +1 -1
  783. package/vendor/protocol/dist/messages.js +4 -0
  784. package/vendor/protocol/dist/messages.js.map +1 -1
  785. package/vendor/protocol/dist/pairing.d.ts +26 -0
  786. package/vendor/protocol/dist/pairing.d.ts.map +1 -1
  787. package/vendor/protocol/dist/pairing.js.map +1 -1
  788. package/vendor/protocol/package.json +1 -1
@@ -0,0 +1,177 @@
1
+ import { FlowConditionOperator, FlowConditionType } from '@userflow-tech/protocol';
2
+ import { conditionOperators } from './conditionOperators.js';
3
+ /** How often TIME ("Current time") conditions re-evaluate. Matches web userflow.js. */
4
+ const TIME_RECHECK_MS = 10 * 1000;
5
+ /**
6
+ * Client-side condition tracking for step triggers, ported from web
7
+ * `userflowjs/util/flow-condition-types.ts`.
8
+ *
9
+ * Step triggers are evaluated locally (not via TrackClientCondition). The
10
+ * builder's trigger palette for flows is ALWAYS_TRUE ("Water is wet"), TIME
11
+ * ("Current time"), ATTRIBUTE, and CLAUSE (logic group + wait). Types we cannot
12
+ * evaluate yet stay false and warn.
13
+ */
14
+ export function trackCondition(opts) {
15
+ const tracker = conditionTrackers[opts.condition.type];
16
+ if (!tracker) {
17
+ opts.warn?.(`Userflow: condition type "${opts.condition.type}" is not supported in step triggers yet`);
18
+ opts.callback(false);
19
+ return () => undefined;
20
+ }
21
+ return tracker(opts);
22
+ }
23
+ const conditionTrackers = {
24
+ [FlowConditionType.ALWAYS_TRUE]: ({ callback }) => {
25
+ callback(true);
26
+ return () => undefined;
27
+ },
28
+ [FlowConditionType.ATTRIBUTE]: ({ condition, callback, sessionData, now }) => {
29
+ const evaluate = () => {
30
+ let isTrue = false;
31
+ const data = sessionData?.value ?? [];
32
+ if (condition.operator) {
33
+ const compare = conditionOperators[condition.operator];
34
+ if (compare) {
35
+ const datum = data.find((entry) => entry.name === condition.attributeName);
36
+ isTrue = compare({
37
+ sessionData: data,
38
+ condition,
39
+ value: datum ? datum.value : null,
40
+ ...(now !== undefined ? { now } : {}),
41
+ });
42
+ }
43
+ }
44
+ callback(isTrue);
45
+ };
46
+ evaluate();
47
+ const unobserve = sessionData?.observe(evaluate);
48
+ return () => {
49
+ unobserve?.();
50
+ };
51
+ },
52
+ [FlowConditionType.TIME]: ({ condition, callback, scheduler, now = Date.now }) => {
53
+ let lastIsTrue = null;
54
+ let handle = null;
55
+ let stopped = false;
56
+ const start = parseTimeBound(condition.value);
57
+ const end = parseTimeBound(condition.value2);
58
+ const evaluate = () => {
59
+ const current = now();
60
+ let isTrue = true;
61
+ if (start !== null && current < start) {
62
+ isTrue = false;
63
+ }
64
+ else if (end !== null && current >= end) {
65
+ isTrue = false;
66
+ }
67
+ if (isTrue !== lastIsTrue) {
68
+ lastIsTrue = isTrue;
69
+ callback(isTrue);
70
+ }
71
+ };
72
+ const tick = () => {
73
+ if (stopped) {
74
+ return;
75
+ }
76
+ evaluate();
77
+ handle = scheduler.setTimeout(tick, TIME_RECHECK_MS);
78
+ };
79
+ tick();
80
+ return () => {
81
+ stopped = true;
82
+ if (handle !== null) {
83
+ scheduler.clearTimeout(handle);
84
+ handle = null;
85
+ }
86
+ };
87
+ },
88
+ [FlowConditionType.CLAUSE]: ({ condition: clause, callback, scheduler, warn, now, sessionData, }) => {
89
+ const children = clause.conditions ?? [];
90
+ if (children.length === 0) {
91
+ callback(false);
92
+ return () => undefined;
93
+ }
94
+ const isAnd = clause.operator !== FlowConditionOperator.OR;
95
+ const childIsTrue = children.map(() => null);
96
+ const childUntrack = children.map(() => undefined);
97
+ let lastIsTrue = null;
98
+ let waitHandle = null;
99
+ const clearWait = () => {
100
+ if (waitHandle !== null) {
101
+ scheduler.clearTimeout(waitHandle);
102
+ waitHandle = null;
103
+ }
104
+ };
105
+ const callbackWithWait = (isTrue) => {
106
+ if (!isTrue || clause.waitTime == null || clause.waitTime === '0') {
107
+ clearWait();
108
+ callback(isTrue);
109
+ return;
110
+ }
111
+ if (waitHandle !== null) {
112
+ return;
113
+ }
114
+ const waitMs = parseFloat(clause.waitTime) * 1000;
115
+ waitHandle = scheduler.setTimeout(() => {
116
+ waitHandle = null;
117
+ callback(true);
118
+ }, Number.isFinite(waitMs) ? Math.max(0, waitMs) : 0);
119
+ };
120
+ const evaluate = () => {
121
+ let isTrue = isAnd;
122
+ for (const child of childIsTrue) {
123
+ if (isAnd) {
124
+ if (child === false) {
125
+ isTrue = false;
126
+ break;
127
+ }
128
+ if (child === null && isTrue !== false) {
129
+ isTrue = null;
130
+ }
131
+ }
132
+ else if (child === true) {
133
+ isTrue = true;
134
+ break;
135
+ }
136
+ else if (child === null && isTrue !== true) {
137
+ isTrue = null;
138
+ }
139
+ }
140
+ if (isTrue !== null && isTrue !== lastIsTrue) {
141
+ lastIsTrue = isTrue;
142
+ callbackWithWait(isTrue);
143
+ }
144
+ };
145
+ for (let index = 0; index < children.length; index += 1) {
146
+ const child = children[index];
147
+ childIsTrue[index] = false;
148
+ childUntrack[index] = trackCondition({
149
+ condition: child,
150
+ scheduler,
151
+ ...(warn !== undefined ? { warn } : {}),
152
+ ...(now !== undefined ? { now } : {}),
153
+ ...(sessionData !== undefined ? { sessionData } : {}),
154
+ callback: (isTrue) => {
155
+ childIsTrue[index] = isTrue;
156
+ evaluate();
157
+ },
158
+ });
159
+ }
160
+ evaluate();
161
+ return () => {
162
+ clearWait();
163
+ for (const untrack of childUntrack) {
164
+ untrack?.();
165
+ }
166
+ };
167
+ },
168
+ };
169
+ function parseTimeBound(value) {
170
+ if (!value) {
171
+ return null;
172
+ }
173
+ const parsed = new Date(value);
174
+ const ms = parsed.valueOf();
175
+ return Number.isNaN(ms) ? null : ms;
176
+ }
177
+ //# sourceMappingURL=trackCondition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackCondition.js","sourceRoot":"","sources":["../../src/engine/trackCondition.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAInF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,uFAAuF;AACvF,MAAM,eAAe,GAAG,EAAE,GAAG,IAAI,CAAC;AAgBlC;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,IAAwB;IACrD,MAAM,OAAO,GAAG,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACvD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,IAAI,CAAC,IAAI,EAAE,CACT,6BAA6B,IAAI,CAAC,SAAS,CAAC,IAAI,yCAAyC,CAC1F,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,GAAG,EAAE,CAAC,SAAS,CAAC;IACzB,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC;AACvB,CAAC;AAED,MAAM,iBAAiB,GAAyD;IAC9E,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,EA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ionDataFragment } from '@userflow-tech/protocol';
2
+ import type { Scheduler } from '../transport/scheduler.js';
3
+ import { type HandleActionsDeps } from './handleActions.js';
4
+ import type { SimpleObservable } from './simpleObservable.js';
5
+ export interface TrackStepTriggersDeps extends HandleActionsDeps {
6
+ scheduler: Scheduler;
7
+ sessionData?: SimpleObservable<SessionDataFragment[]>;
8
+ getSession?: () => FlowSessionFragment | null;
9
+ /** Marks GO_TO_STEP as trigger-driven so cycle detection spans async hops. */
10
+ enterTriggerActions?: () => void;
11
+ leaveTriggerActions?: () => void;
12
+ }
13
+ /**
14
+ * Track a step's triggers for as long as that step is current.
15
+ *
16
+ * Mirrors web `Trigger` / `trackWorkflowTriggers`: when the condition becomes
17
+ * true, fire `handleActions` once. Untracking (leaving the step) resets
18
+ * `fired`, so returning to the step can fire again.
19
+ */
20
+ export declare function trackStepTriggers(triggers: FlowTriggerFragment[], session: FlowSessionFragment, deps: TrackStepTriggersDeps): () => void;
21
+ //# sourceMappingURL=trackStepTriggers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackStepTriggers.d.ts","sourceRoot":"","sources":["../../src/engine/trackStepTriggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAiB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,CAAC,CAAC;IACtD,UAAU,CAAC,EAAE,MAAM,mBAAmB,GAAG,IAAI,CAAC;IAC9C,8EAA8E;IAC9E,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,OAAO,EAAE,mBAAmB,EAC5B,IAAI,EAAE,qBAAqB,GAC1B,MAAM,IAAI,CAwCZ"}
@@ -0,0 +1,49 @@
1
+ import { handleActions } from './handleActions.js';
2
+ import { trackCondition } from './trackCondition.js';
3
+ /**
4
+ * Track a step's triggers for as long as that step is current.
5
+ *
6
+ * Mirrors web `Trigger` / `trackWorkflowTriggers`: when the condition becomes
7
+ * true, fire `handleActions` once. Untracking (leaving the step) resets
8
+ * `fired`, so returning to the step can fire again.
9
+ */
10
+ export function trackStepTriggers(triggers, session, deps) {
11
+ const { scheduler, warn = console.warn, sessionData, getSession } = deps;
12
+ const cleanups = [];
13
+ for (const trigger of triggers) {
14
+ const { condition } = trigger;
15
+ if (!condition) {
16
+ continue;
17
+ }
18
+ let fired = false;
19
+ const untrack = trackCondition({
20
+ condition,
21
+ scheduler,
22
+ warn,
23
+ ...(sessionData !== undefined ? { sessionData } : {}),
24
+ callback: (isTrue) => {
25
+ if (!isTrue || fired) {
26
+ return;
27
+ }
28
+ fired = true;
29
+ const live = getSession?.() ?? session;
30
+ deps.enterTriggerActions?.();
31
+ void handleActions(live, trigger.actions, deps)
32
+ .catch((error) => {
33
+ const detail = error instanceof Error ? error.message : String(error);
34
+ warn(`Userflow: step trigger ${trigger.id} failed: ${detail}`);
35
+ })
36
+ .finally(() => {
37
+ deps.leaveTriggerActions?.();
38
+ });
39
+ },
40
+ });
41
+ cleanups.push(untrack);
42
+ }
43
+ return () => {
44
+ for (const cleanup of cleanups) {
45
+ cleanup();
46
+ }
47
+ };
48
+ }
49
+ //# sourceMappingURL=trackStepTriggers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trackStepTriggers.js","sourceRoot":"","sources":["../../src/engine/trackStepTriggers.ts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AI,CAAC,0BAA0B,OAAO,CAAC,EAAE,YAAY,MAAM,EAAE,CAAC,CAAC;gBACjE,CAAC,CAAC;qBACD,OAAO,CAAC,GAAG,EAAE;oBACZ,IAAI,CAAC,mBAAmB,EAAE,EAAE,CAAC;gBAC/B,CAAC,CAAC,CAAC;YACP,CAAC;SACF,CAAC,CAAC;QACH,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,GAAG,EAAE;QACV,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -15,16 +15,17 @@ export { FlowSessionEngine } from './engine/FlowSessionEngine.js';
15
15
  export type { FlowSessionEngineDeps, FlowSessionEngineEvent, FlowSessionEngineListener, FlowTransport, } from './engine/FlowSessionEngine.js';
16
16
  export { ClientConditionEngine } from './engine/ClientConditionEngine.js';
17
17
  export type { ClientConditionEngineDeps, ClientConditionTransport, ConditionEvaluator, } from './engine/ClientConditionEngine.js';
18
- export { PairingEngine } from './engine/PairingEngine.js';
19
- export type { PairingEngineDeps, PairingEngineListener, PairingEngineState, PairingEngineStatus, } from './engine/PairingEngine.js';
18
+ export { PairingEngine, isPairingPushAckTimeout } from './engine/PairingEngine.js';
19
+ export type { PairingEngineDeps, PairingEngineListener, PairingEngineState, PairingEngineStatus, PairingRelayHandler, } from './engine/PairingEngine.js';
20
20
  export { UserflowCore } from './engine/UserflowCore.js';
21
21
  export type { CreateConnectionFn, UserflowConnection, UserflowCoreDeps, ValidateCredentialsFn, } from './engine/UserflowCore.js';
22
22
  export { PhoenixConnection, buildWsUrl, validateCredentials } from './transport/phoenix.js';
23
23
  export type { ConnectionState, PhoenixConnectionOptions, ServerMessageHandler, WebSocketCtor, WebSocketLike, } from './transport/phoenix.js';
24
24
  export { PairingConnection, buildPairingWsUrl } from './transport/pairing.js';
25
25
  export type { PairingConnectionEvent, PairingConnectionListener, PairingConnectionOptions, } from './transport/pairing.js';
26
- export type { UserflowConfig, UserflowCredentials, UserflowEventAttributes, UserflowGroupOptions, UserflowIdentifyOptions, UserflowInitOptions, UserflowTrackOptions, } from './types.js';
26
+ export type { PublicAttributeChange, PublicAttributes, UserflowConfig, UserflowCredentials, UserflowEventAttributes, UserflowGroupOptions, UserflowIdentifyOptions, UserflowInitOptions, UserflowTrackOptions, UserflowUpdateGroupOptions, } from './types.js';
27
27
  export { normalizeTrackEventAttributes } from './eventAttributes.js';
28
+ export { normalizeAttributes } from './normalizeAttributes.js';
28
29
  export { genSessionDataLookup, interpolateSessionData, interpolateVariables, } from './engine/interpolateSessionData.js';
29
30
  export { CORE_VERSION } from './version.js';
30
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAE1F,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,YAAY,EACV,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,aAAa,GACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,YAAY,EACV,yBAAyB,EACz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gBAAgB,EAChB,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -11,11 +11,12 @@ export { DEFAULT_PAIRING_ENDPOINT, DEFAULT_SERVER_ENDPOINT } from './constants.j
11
11
  export { UserflowAuthError, UserflowRateLimitError } from './errors.js';
12
12
  export { FlowSessionEngine } from './engine/FlowSessionEngine.js';
13
13
  export { ClientConditionEngine } from './engine/ClientConditionEngine.js';
14
- export { PairingEngine } from './engine/PairingEngine.js';
14
+ export { PairingEngine, isPairingPushAckTimeout } from './engine/PairingEngine.js';
15
15
  export { UserflowCore } from './engine/UserflowCore.js';
16
16
  export { PhoenixConnection, buildWsUrl, validateCredentials } from './transport/phoenix.js';
17
17
  export { PairingConnection, buildPairingWsUrl } from './transport/pairing.js';
18
18
  export { normalizeTrackEventAttributes } from './eventAttributes.js';
19
+ export { normalizeAttributes } from './normalizeAttributes.js';
19
20
  export { genSessionDataLookup, interpolateSessionData, interpolateVariables, } from './engine/interpolateSessionData.js';
20
21
  export { CORE_VERSION } from './version.js';
21
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,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,aAAa,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAQnF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOxD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAQ5F,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAkB9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { Attributes } from '@userflow-tech/protocol';
2
+ import type { PublicAttributes } from './types.js';
3
+ /**
4
+ * Convert public identify/updateUser attribute input to the wire `Attributes`
5
+ * bag. Ports web `UserflowClient.normalizeAttributes` (no legacy `traits`).
6
+ */
7
+ export declare function normalizeAttributes(input?: PublicAttributes | null): Attributes;
8
+ //# sourceMappingURL=normalizeAttributes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalizeAttributes.d.ts","sourceRoot":"","sources":["../src/normalizeAttributes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,UAAU,EACX,MAAM,yBAAyB,CAAC;AAIjC,OAAO,KAAK,EAAyB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE1E;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,GAAG,UAAU,CA0B/E"}
@@ -0,0 +1,127 @@
1
+ import { AttributeDataType as WireAttributeDataType } from '@userflow-tech/protocol';
2
+ import { UserflowAuthError } from './errors.js';
3
+ /**
4
+ * Convert public identify/updateUser attribute input to the wire `Attributes`
5
+ * bag. Ports web `UserflowClient.normalizeAttributes` (no legacy `traits`).
6
+ */
7
+ export function normalizeAttributes(input) {
8
+ if (input == null) {
9
+ return {};
10
+ }
11
+ if (typeof input !== 'object' || Array.isArray(input)) {
12
+ throw new UserflowAuthError(`'attributes' must be an object.`);
13
+ }
14
+ const output = {};
15
+ for (const name of Object.keys(input)) {
16
+ if (!Object.prototype.hasOwnProperty.call(input, name)) {
17
+ continue;
18
+ }
19
+ const value = input[name];
20
+ if (value === undefined) {
21
+ continue;
22
+ }
23
+ // Own-property assign: `output[name] =` would hit the `__proto__` setter.
24
+ Object.defineProperty(output, name, {
25
+ value: normalizeAttributeValue(name, value),
26
+ enumerable: true,
27
+ writable: true,
28
+ configurable: true,
29
+ });
30
+ }
31
+ return output;
32
+ }
33
+ function normalizeAttributeValue(name, value) {
34
+ if (isLiteralOrList(value)) {
35
+ return normalizeAttributeLiteralOrList(name, value);
36
+ }
37
+ if (value == null || typeof value !== 'object') {
38
+ throw new UserflowAuthError(`Invalid value for '${name}' attribute.`);
39
+ }
40
+ return normalizeAttributeChange(name, value);
41
+ }
42
+ function normalizeAttributeChange(name, change) {
43
+ if ('set' in change) {
44
+ return {
45
+ set: normalizeAttributeLiteralOrList(name, change.set),
46
+ dataType: normalizeDataType(name, change.data_type ?? change.dataType),
47
+ };
48
+ }
49
+ if ('set_once' in change || 'setOnce' in change) {
50
+ return {
51
+ setOnce: normalizeAttributeLiteralOrList(name, change.set_once ?? change.setOnce),
52
+ dataType: normalizeDataType(name, change.data_type ?? change.dataType),
53
+ };
54
+ }
55
+ if ('add' in change) {
56
+ const add = change.add;
57
+ if (typeof add !== 'string' && typeof add !== 'number') {
58
+ throw new UserflowAuthError(`Invalid 'add' value for '${name}' attribute. Must be a number or string.`);
59
+ }
60
+ return { add };
61
+ }
62
+ if ('subtract' in change) {
63
+ const subtract = change.subtract;
64
+ if (typeof subtract !== 'string' && typeof subtract !== 'number') {
65
+ throw new UserflowAuthError(`Invalid 'subtract' value for '${name}' attribute. Must be a number or string.`);
66
+ }
67
+ return { subtract };
68
+ }
69
+ if ('append' in change) {
70
+ return { append: normalizeAttributeLiteralOrList(name, change.append) };
71
+ }
72
+ if ('prepend' in change) {
73
+ return { prepend: normalizeAttributeLiteralOrList(name, change.prepend) };
74
+ }
75
+ if ('remove' in change) {
76
+ return { remove: normalizeAttributeLiteralOrList(name, change.remove) };
77
+ }
78
+ throw new UserflowAuthError(`Invalid value for '${name}' attribute.`);
79
+ }
80
+ function normalizeAttributeLiteralOrList(name, value) {
81
+ if (Array.isArray(value)) {
82
+ return value.map((item) => normalizeAttributeLiteral(name, item));
83
+ }
84
+ return normalizeAttributeLiteral(name, value);
85
+ }
86
+ function normalizeAttributeLiteral(name, value) {
87
+ if (value == null) {
88
+ return null;
89
+ }
90
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
91
+ return value;
92
+ }
93
+ throw new UserflowAuthError(`Invalid value for '${name}' attribute.`);
94
+ }
95
+ function normalizeDataType(name, dataType) {
96
+ if (!dataType) {
97
+ return null;
98
+ }
99
+ switch (dataType) {
100
+ case 'string':
101
+ case WireAttributeDataType.STRING:
102
+ return WireAttributeDataType.STRING;
103
+ case 'number':
104
+ case WireAttributeDataType.NUMBER:
105
+ return WireAttributeDataType.NUMBER;
106
+ case 'boolean':
107
+ case WireAttributeDataType.BOOLEAN:
108
+ return WireAttributeDataType.BOOLEAN;
109
+ case 'datetime':
110
+ case WireAttributeDataType.DATETIME:
111
+ return WireAttributeDataType.DATETIME;
112
+ case 'list':
113
+ case WireAttributeDataType.LIST:
114
+ return WireAttributeDataType.LIST;
115
+ default:
116
+ throw new UserflowAuthError(`Invalid data_type for '${name}' attribute.`);
117
+ }
118
+ }
119
+ function isLiteralOrList(value) {
120
+ return (value === undefined ||
121
+ value === null ||
122
+ typeof value === 'string' ||
123
+ typeof value === 'number' ||
124
+ typeof value === 'boolean' ||
125
+ Array.isArray(value));
126
+ }
127
+ //# sourceMappingURL=normalizeAttributes.js.map
@@ -0,0 +1 @@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AS,EAAE,CAAC;QACzF,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,IAAI,iBAAiB,CAAC,sBAAsB,IAAI,cAAc,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY,EAAE,QAAiB;IACxD,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC;IACD,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ,CAAC;QACd,KAAK,qBAAqB,CAAC,MAAM;YAC/B,OAAO,qBAAqB,CAAC,MAAM,CAAC;QACtC,KAAK,QAAQ,CAAC;QACd,KAAK,qBAAqB,CAAC,MAAM;YAC/B,OAAO,qBAAqB,CAAC,MAAM,CAAC;QACtC,KAAK,SAAS,CAAC;QACf,KAAK,qBAAqB,CAAC,OAAO;YAChC,OAAO,qBAAqB,CAAC,OAAO,CAAC;QACvC,KAAK,UAAU,CAAC;QAChB,KAAK,qBAAqB,CAAC,QAAQ;YACjC,OAAO,qBAAqB,CAAC,QAAQ,CAAC;QACxC,KAAK,MAAM,CAAC;QACZ,KAAK,qBAAqB,CAAC,IAAI;YAC7B,OAAO,qBAAqB,CAAC,IAAI,CAAC;QACpC;YACE,MAAM,IAAI,iBAAiB,CAAC,0BAA0B,IAAI,cAAc,CAAC,CAAC;IAC9E,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAc;IACrC,OAAO,CACL,KAAK,KAAK,SAAS;QACnB,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS;QAC1B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CACrB,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ClientContext, ClientMessage, JoinPayloadClientCondition, ServerMessage, UserflowAttributes } from '@userflow-tech/protocol';
1
+ import type { Attributes, ClientContext, ClientMessage, JoinPayloadClientCondition, ServerMessage, UserflowAttributes } from '@userflow-tech/protocol';
2
2
  import { type Scheduler } from './scheduler.js';
3
3
  /** The lifecycle state of a {@link PhoenixConnection}. */
4
4
  export type ConnectionState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting' | 'suspended';
@@ -129,6 +129,7 @@ export declare class PhoenixConnection {
129
129
  * queue. `ToggleClientCondition` skips the rate limiter (web parity: meta
130
130
  * messages must not be starved by UpsertUser / GoToStep traffic, and
131
131
  * condition churn must not fail closed until the next rejoin).
132
+ * `BeginBatch` / `EndBatch` are the same class of meta message.
132
133
  */
133
134
  send(message: ClientMessage): Promise<void>;
134
135
  /** Validates the client token by probing an anonymous end-user channel join. */
@@ -141,9 +142,11 @@ export declare class PhoenixConnection {
141
142
  group(payload: {
142
143
  groupExternalId: string;
143
144
  groupSignature: string | null;
144
- groupAttributes: UserflowAttributes;
145
- membershipAttributes: UserflowAttributes;
145
+ groupAttributes: Attributes;
146
+ membershipAttributes: Attributes;
146
147
  }): Promise<void>;
148
+ /** Push `UpsertUser` on an already-joined channel (no re-identify). */
149
+ updateUser(attributes: Attributes): Promise<void>;
147
150
  /** Intentional teardown: stop everything, reject queued/in-flight work, clear intent. */
148
151
  disconnect(): void;
149
152
  /** Background handling: close but keep intent + queued pushes so `resume()` recovers. */
@@ -207,9 +210,11 @@ export declare class PhoenixConnection {
207
210
  private sendPush;
208
211
  private removeFromQueue;
209
212
  /**
210
- * On a drop/suspend, forget the in-flight reply for each queued push (without
211
- * rejecting it) and reset it so it is re-sent after the next (re)join. This is
212
- * the at-least-once behavior; safe because the pushes are idempotent.
213
+ * On a drop/suspend, forget the in-flight reply for each queued push.
214
+ * Idempotent messages are reset and re-sent after the next (re)join
215
+ * (at-least-once). Non-idempotent attribute ops (`add` / `subtract` /
216
+ * `append` / `prepend`) are rejected instead, so a lost ack cannot apply
217
+ * the mutation twice.
213
218
  */
214
219
  private discardInFlightPushes;
215
220
  private rejectPending;
@@ -1 +1 @@
1
- {"version":3,"file":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