@userflow-tech/react-native 0.1.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.
- package/LICENSE +76 -0
- package/README.md +337 -0
- package/docs/anchoring.md +264 -0
- package/docs/deep-linking.md +271 -0
- package/docs/identity-verification.md +95 -0
- package/docs/theme-mapping.md +101 -0
- package/docs/troubleshooting.md +107 -0
- package/lib/commonjs/anchors/AnchorRegistry.js +72 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +315 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js +93 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js +83 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/commonjs/anchors/animationFrame.js +90 -0
- package/lib/commonjs/anchors/animationFrame.js.map +1 -0
- package/lib/commonjs/anchors/autoAnchor.js +253 -0
- package/lib/commonjs/anchors/autoAnchor.js.map +1 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js +82 -0
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +90 -0
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +180 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js +214 -0
- package/lib/commonjs/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js +176 -0
- package/lib/commonjs/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js +75 -0
- package/lib/commonjs/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js +165 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/commonjs/anchors/hintsCodec.js +120 -0
- package/lib/commonjs/anchors/hintsCodec.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +112 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js +17 -0
- package/lib/commonjs/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js +227 -0
- package/lib/commonjs/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/commonjs/anchors/scrollConfig.js +48 -0
- package/lib/commonjs/anchors/scrollConfig.js.map +1 -0
- package/lib/commonjs/anchors/targetPressMonitor.js +113 -0
- package/lib/commonjs/anchors/targetPressMonitor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js +91 -0
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js +76 -0
- package/lib/commonjs/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/commonjs/anonymousId.js +42 -0
- package/lib/commonjs/anonymousId.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +675 -0
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -0
- package/lib/commonjs/content/StepButton.js +57 -0
- package/lib/commonjs/content/StepButton.js.map +1 -0
- package/lib/commonjs/content/buttonAppearance.js +18 -0
- package/lib/commonjs/content/buttonAppearance.js.map +1 -0
- package/lib/commonjs/content/deserialize.js +129 -0
- package/lib/commonjs/content/deserialize.js.map +1 -0
- package/lib/commonjs/content/imageLayout.js +24 -0
- package/lib/commonjs/content/imageLayout.js.map +1 -0
- package/lib/commonjs/content/migrateFlowBlocks.js +39 -0
- package/lib/commonjs/content/migrateFlowBlocks.js.map +1 -0
- package/lib/commonjs/content/openSafeUrl.js +37 -0
- package/lib/commonjs/content/openSafeUrl.js.map +1 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js +95 -0
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/commonjs/content/themeColor.js +106 -0
- package/lib/commonjs/content/themeColor.js.map +1 -0
- package/lib/commonjs/content/types.js +2 -0
- package/lib/commonjs/content/types.js.map +1 -0
- package/lib/commonjs/deepLinking.js +162 -0
- package/lib/commonjs/deepLinking.js.map +1 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js +13 -0
- package/lib/commonjs/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js +44 -0
- package/lib/commonjs/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/commonjs/expo-router/index.js +20 -0
- package/lib/commonjs/expo-router/index.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +45 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/commonjs/index.js +356 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lifecycle.js +200 -0
- package/lib/commonjs/lifecycle.js.map +1 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +69 -0
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/commonjs/navigation/chainCallbacks.js +16 -0
- package/lib/commonjs/navigation/chainCallbacks.js.map +1 -0
- package/lib/commonjs/navigation/getActiveRouteName.js +18 -0
- package/lib/commonjs/navigation/getActiveRouteName.js.map +1 -0
- package/lib/commonjs/navigation/index.js +50 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js +110 -0
- package/lib/commonjs/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/commonjs/network.js +90 -0
- package/lib/commonjs/network.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +290 -0
- package/lib/commonjs/pairing/PairingController.js.map +1 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js +118 -0
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/commonjs/pairing/deepLink.js +141 -0
- package/lib/commonjs/pairing/deepLink.js.map +1 -0
- package/lib/commonjs/pairing/diagnostics.js +115 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -0
- package/lib/commonjs/pairing/index.js +58 -0
- package/lib/commonjs/pairing/index.js.map +1 -0
- package/lib/commonjs/pairing/pairingRuntime.js +85 -0
- package/lib/commonjs/pairing/pairingRuntime.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +70 -0
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -0
- package/lib/commonjs/pairing/usePairingState.js +40 -0
- package/lib/commonjs/pairing/usePairingState.js.map +1 -0
- package/lib/commonjs/runtime/FlowRenderer.js +57 -0
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js +53 -0
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/commonjs/runtime/TargetPressBridge.js +96 -0
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -0
- package/lib/commonjs/runtime/UserflowProvider.js +91 -0
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -0
- package/lib/commonjs/runtime/clientConditions.js +50 -0
- package/lib/commonjs/runtime/clientConditions.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +63 -0
- package/lib/commonjs/runtime/flowEngine.js.map +1 -0
- package/lib/commonjs/runtime/flowSessionViewState.js +48 -0
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -0
- package/lib/commonjs/runtime/useFlowSessionState.js +25 -0
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -0
- package/lib/commonjs/runtime/userflowCore.js +13 -0
- package/lib/commonjs/runtime/userflowCore.js.map +1 -0
- package/lib/commonjs/screenTracker.js +87 -0
- package/lib/commonjs/screenTracker.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +52 -0
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js +90 -0
- package/lib/commonjs/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/commonjs/surfaces/ModalSurface.js +170 -0
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -0
- package/lib/commonjs/surfaces/ProgressBar.js +116 -0
- package/lib/commonjs/surfaces/ProgressBar.js.map +1 -0
- package/lib/commonjs/surfaces/TooltipSurface.js +638 -0
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -0
- package/lib/commonjs/surfaces/absoluteFill.js +29 -0
- package/lib/commonjs/surfaces/absoluteFill.js.map +1 -0
- package/lib/commonjs/surfaces/assets/png.d.js +2 -0
- package/lib/commonjs/surfaces/assets/png.d.js.map +1 -0
- package/lib/commonjs/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js +20 -0
- package/lib/commonjs/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/commonjs/surfaces/progress.js +35 -0
- package/lib/commonjs/surfaces/progress.js.map +1 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js +24 -0
- package/lib/commonjs/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +67 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +64 -0
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/commonjs/surfaces/safeArea.js +46 -0
- package/lib/commonjs/surfaces/safeArea.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +90 -0
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +108 -0
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +103 -0
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js +64 -0
- package/lib/commonjs/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +102 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +100 -0
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js +15 -0
- package/lib/commonjs/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +51 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -0
- package/lib/commonjs/useUserflowScreen.js +24 -0
- package/lib/commonjs/useUserflowScreen.js.map +1 -0
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/anchors/AnchorRegistry.js +67 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -0
- package/lib/module/anchors/AutoAnchorRegistry.js +309 -0
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -0
- package/lib/module/anchors/ScrollContainerRegistry.js +86 -0
- package/lib/module/anchors/ScrollContainerRegistry.js.map +1 -0
- package/lib/module/anchors/anchorChangeTicker.js +79 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -0
- package/lib/module/anchors/animationFrame.js +83 -0
- package/lib/module/anchors/animationFrame.js.map +1 -0
- package/lib/module/anchors/autoAnchor.js +248 -0
- package/lib/module/anchors/autoAnchor.js.map +1 -0
- package/lib/module/anchors/elementConditionEvaluator.js +79 -0
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js +84 -0
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +164 -0
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js +210 -0
- package/lib/module/anchors/fiber/findAnchorFiber.js.map +1 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js +172 -0
- package/lib/module/anchors/fiber/findScrollAncestors.js.map +1 -0
- package/lib/module/anchors/fiber/measureHostFiber.js +70 -0
- package/lib/module/anchors/fiber/measureHostFiber.js.map +1 -0
- package/lib/module/anchors/fiber/visibleScreens.js +159 -0
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -0
- package/lib/module/anchors/hintsCodec.js +111 -0
- package/lib/module/anchors/hintsCodec.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +105 -0
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -0
- package/lib/module/anchors/resolveManualAnchorId.js +13 -0
- package/lib/module/anchors/resolveManualAnchorId.js.map +1 -0
- package/lib/module/anchors/scrollAnchorIntoView.js +222 -0
- package/lib/module/anchors/scrollAnchorIntoView.js.map +1 -0
- package/lib/module/anchors/scrollConfig.js +40 -0
- package/lib/module/anchors/scrollConfig.js.map +1 -0
- package/lib/module/anchors/targetPressMonitor.js +105 -0
- package/lib/module/anchors/targetPressMonitor.js.map +1 -0
- package/lib/module/anchors/useUserflowAnchor.js +87 -0
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -0
- package/lib/module/anchors/useUserflowScrollContainer.js +71 -0
- package/lib/module/anchors/useUserflowScrollContainer.js.map +1 -0
- package/lib/module/anonymousId.js +36 -0
- package/lib/module/anonymousId.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +670 -0
- package/lib/module/content/RichContentRenderer.js.map +1 -0
- package/lib/module/content/StepButton.js +52 -0
- package/lib/module/content/StepButton.js.map +1 -0
- package/lib/module/content/buttonAppearance.js +14 -0
- package/lib/module/content/buttonAppearance.js.map +1 -0
- package/lib/module/content/deserialize.js +116 -0
- package/lib/module/content/deserialize.js.map +1 -0
- package/lib/module/content/imageLayout.js +20 -0
- package/lib/module/content/imageLayout.js.map +1 -0
- package/lib/module/content/migrateFlowBlocks.js +35 -0
- package/lib/module/content/migrateFlowBlocks.js.map +1 -0
- package/lib/module/content/openSafeUrl.js +32 -0
- package/lib/module/content/openSafeUrl.js.map +1 -0
- package/lib/module/content/resolveStepButtonChrome.js +90 -0
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -0
- package/lib/module/content/themeColor.js +99 -0
- package/lib/module/content/themeColor.js.map +1 -0
- package/lib/module/content/types.js +2 -0
- package/lib/module/content/types.js.map +1 -0
- package/lib/module/deepLinking.js +152 -0
- package/lib/module/deepLinking.js.map +1 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js +10 -0
- package/lib/module/expo-router/UserflowExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js +39 -0
- package/lib/module/expo-router/getExpoRouterScreenTracker.js.map +1 -0
- package/lib/module/expo-router/index.js +5 -0
- package/lib/module/expo-router/index.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -0
- package/lib/module/index.js +259 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lifecycle.js +195 -0
- package/lib/module/lifecycle.js.map +1 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js +65 -0
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -0
- package/lib/module/navigation/chainCallbacks.js +12 -0
- package/lib/module/navigation/chainCallbacks.js.map +1 -0
- package/lib/module/navigation/getActiveRouteName.js +14 -0
- package/lib/module/navigation/getActiveRouteName.js.map +1 -0
- package/lib/module/navigation/index.js +5 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/openFlowNavigateUrl.js +100 -0
- package/lib/module/navigation/openFlowNavigateUrl.js.map +1 -0
- package/lib/module/network.js +85 -0
- package/lib/module/network.js.map +1 -0
- package/lib/module/pairing/PairingController.js +286 -0
- package/lib/module/pairing/PairingController.js.map +1 -0
- package/lib/module/pairing/PreviewModeBanner.js +113 -0
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -0
- package/lib/module/pairing/deepLink.js +134 -0
- package/lib/module/pairing/deepLink.js.map +1 -0
- package/lib/module/pairing/diagnostics.js +101 -0
- package/lib/module/pairing/diagnostics.js.map +1 -0
- package/lib/module/pairing/index.js +7 -0
- package/lib/module/pairing/index.js.map +1 -0
- package/lib/module/pairing/pairingRuntime.js +77 -0
- package/lib/module/pairing/pairingRuntime.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +65 -0
- package/lib/module/pairing/tokenStorage.js.map +1 -0
- package/lib/module/pairing/usePairingState.js +35 -0
- package/lib/module/pairing/usePairingState.js.map +1 -0
- package/lib/module/runtime/FlowRenderer.js +52 -0
- package/lib/module/runtime/FlowRenderer.js.map +1 -0
- package/lib/module/runtime/FlowSurfaceFade.js +48 -0
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -0
- package/lib/module/runtime/TargetPressBridge.js +91 -0
- package/lib/module/runtime/TargetPressBridge.js.map +1 -0
- package/lib/module/runtime/UserflowProvider.js +85 -0
- package/lib/module/runtime/UserflowProvider.js.map +1 -0
- package/lib/module/runtime/clientConditions.js +43 -0
- package/lib/module/runtime/clientConditions.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +54 -0
- package/lib/module/runtime/flowEngine.js.map +1 -0
- package/lib/module/runtime/flowSessionViewState.js +42 -0
- package/lib/module/runtime/flowSessionViewState.js.map +1 -0
- package/lib/module/runtime/useFlowSessionState.js +21 -0
- package/lib/module/runtime/useFlowSessionState.js.map +1 -0
- package/lib/module/runtime/userflowCore.js +10 -0
- package/lib/module/runtime/userflowCore.js.map +1 -0
- package/lib/module/screenTracker.js +79 -0
- package/lib/module/screenTracker.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +47 -0
- package/lib/module/surfaces/CloseButton.js.map +1 -0
- package/lib/module/surfaces/MadeWithUserflow.js +83 -0
- package/lib/module/surfaces/MadeWithUserflow.js.map +1 -0
- package/lib/module/surfaces/ModalSurface.js +165 -0
- package/lib/module/surfaces/ModalSurface.js.map +1 -0
- package/lib/module/surfaces/ProgressBar.js +111 -0
- package/lib/module/surfaces/ProgressBar.js.map +1 -0
- package/lib/module/surfaces/TooltipSurface.js +633 -0
- package/lib/module/surfaces/TooltipSurface.js.map +1 -0
- package/lib/module/surfaces/absoluteFill.js +25 -0
- package/lib/module/surfaces/absoluteFill.js.map +1 -0
- package/lib/module/surfaces/assets/png.d.js +2 -0
- package/lib/module/surfaces/assets/png.d.js.map +1 -0
- package/lib/module/surfaces/assets/userflow-logomark.png +0 -0
- package/lib/module/surfaces/parseBackdropOpacity.js +16 -0
- package/lib/module/surfaces/parseBackdropOpacity.js.map +1 -0
- package/lib/module/surfaces/progress.js +31 -0
- package/lib/module/surfaces/progress.js.map +1 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js +20 -0
- package/lib/module/surfaces/resolveCloseButtonColor.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +59 -0
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -0
- package/lib/module/surfaces/resolveTooltipLayout.js +57 -0
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -0
- package/lib/module/surfaces/safeArea.js +41 -0
- package/lib/module/surfaces/safeArea.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +86 -0
- package/lib/module/surfaces/themeChrome.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js +103 -0
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js +98 -0
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js +55 -0
- package/lib/module/surfaces/tooltip/TooltipNotch.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +97 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +95 -0
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js +11 -0
- package/lib/module/surfaces/tooltip/parseBackdropPadding.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +44 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -0
- package/lib/module/useUserflowScreen.js +21 -0
- package/lib/module/useUserflowScreen.js.map +1 -0
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/commonjs/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/commonjs/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/commonjs/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/commonjs/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts +5 -0
- package/lib/typescript/commonjs/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/commonjs/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/commonjs/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/commonjs/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/commonjs/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/types.d.ts +144 -0
- package/lib/typescript/commonjs/src/content/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts +54 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/commonjs/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +112 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts +96 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/commonjs/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/commonjs/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/commonjs/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/network.d.ts +42 -0
- package/lib/typescript/commonjs/src/network.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/commonjs/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/commonjs/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts +28 -0
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/commonjs/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/commonjs/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/commonjs/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/commonjs/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/commonjs/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/commonjs/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +3 -0
- package/lib/typescript/commonjs/src/version.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +32 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +113 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts +46 -0
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +30 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts +21 -0
- package/lib/typescript/module/src/anchors/animationFrame.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts +31 -0
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +21 -0
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +41 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +48 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts +33 -0
- package/lib/typescript/module/src/anchors/fiber/findAnchorFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts +47 -0
- package/lib/typescript/module/src/anchors/fiber/findScrollAncestors.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiber/measureHostFiber.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts +40 -0
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +32 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts +6 -0
- package/lib/typescript/module/src/anchors/resolveManualAnchorId.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts +59 -0
- package/lib/typescript/module/src/anchors/scrollAnchorIntoView.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts +30 -0
- package/lib/typescript/module/src/anchors/scrollConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts +64 -0
- package/lib/typescript/module/src/anchors/targetPressMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts +30 -0
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts +34 -0
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts.map +1 -0
- package/lib/typescript/module/src/anonymousId.d.ts +5 -0
- package/lib/typescript/module/src/anonymousId.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +21 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/content/StepButton.d.ts +13 -0
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts +8 -0
- package/lib/typescript/module/src/content/buttonAppearance.d.ts.map +1 -0
- package/lib/typescript/module/src/content/deserialize.d.ts +27 -0
- package/lib/typescript/module/src/content/deserialize.d.ts.map +1 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts +13 -0
- package/lib/typescript/module/src/content/imageLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts +12 -0
- package/lib/typescript/module/src/content/migrateFlowBlocks.d.ts.map +1 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts +12 -0
- package/lib/typescript/module/src/content/openSafeUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts +24 -0
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/content/themeColor.d.ts +43 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -0
- package/lib/typescript/module/src/content/types.d.ts +144 -0
- package/lib/typescript/module/src/content/types.d.ts.map +1 -0
- package/lib/typescript/module/src/deepLinking.d.ts +54 -0
- package/lib/typescript/module/src/deepLinking.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/UserflowExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts +13 -0
- package/lib/typescript/module/src/expo-router/getExpoRouterScreenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/index.d.ts +3 -0
- package/lib/typescript/module/src/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts +17 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +112 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts +96 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts +21 -0
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts +3 -0
- package/lib/typescript/module/src/navigation/chainCallbacks.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts +6 -0
- package/lib/typescript/module/src/navigation/getActiveRouteName.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/index.d.ts +5 -0
- package/lib/typescript/module/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts +33 -0
- package/lib/typescript/module/src/navigation/openFlowNavigateUrl.d.ts.map +1 -0
- package/lib/typescript/module/src/network.d.ts +42 -0
- package/lib/typescript/module/src/network.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +104 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +11 -0
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts +53 -0
- package/lib/typescript/module/src/pairing/deepLink.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +52 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/index.d.ts +10 -0
- package/lib/typescript/module/src/pairing/index.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts +24 -0
- package/lib/typescript/module/src/pairing/pairingRuntime.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +16 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts +4 -0
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +13 -0
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +16 -0
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +32 -0
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts +10 -0
- package/lib/typescript/module/src/runtime/clientConditions.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts +17 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +18 -0
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +10 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts +3 -0
- package/lib/typescript/module/src/runtime/userflowCore.d.ts.map +1 -0
- package/lib/typescript/module/src/screenTracker.d.ts +28 -0
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +28 -0
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts +19 -0
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +17 -0
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts +18 -0
- package/lib/typescript/module/src/surfaces/absoluteFill.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts +5 -0
- package/lib/typescript/module/src/surfaces/parseBackdropOpacity.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts +14 -0
- package/lib/typescript/module/src/surfaces/progress.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts +9 -0
- package/lib/typescript/module/src/surfaces/resolveCloseButtonColor.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +24 -0
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts +11 -0
- package/lib/typescript/module/src/surfaces/safeArea.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +36 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipNotch.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +43 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +34 -0
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts +3 -0
- package/lib/typescript/module/src/surfaces/tooltip/parseBackdropPadding.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +29 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts +10 -0
- package/lib/typescript/module/src/useUserflowScreen.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +3 -0
- package/lib/typescript/module/src/version.d.ts.map +1 -0
- package/package.json +144 -0
- package/src/anchors/AnchorRegistry.ts +81 -0
- package/src/anchors/AutoAnchorRegistry.ts +439 -0
- package/src/anchors/ScrollContainerRegistry.ts +108 -0
- package/src/anchors/anchorChangeTicker.ts +84 -0
- package/src/anchors/animationFrame.ts +88 -0
- package/src/anchors/autoAnchor.ts +310 -0
- package/src/anchors/elementConditionEvaluator.ts +108 -0
- package/src/anchors/fiber/FiberScanRoot.tsx +98 -0
- package/src/anchors/fiber/fiberInternals.ts +181 -0
- package/src/anchors/fiber/findAnchorFiber.ts +225 -0
- package/src/anchors/fiber/findScrollAncestors.ts +229 -0
- package/src/anchors/fiber/measureHostFiber.ts +85 -0
- package/src/anchors/fiber/visibleScreens.ts +173 -0
- package/src/anchors/hintsCodec.ts +125 -0
- package/src/anchors/resolveAnchorHost.ts +102 -0
- package/src/anchors/resolveManualAnchorId.ts +10 -0
- package/src/anchors/scrollAnchorIntoView.ts +251 -0
- package/src/anchors/scrollConfig.ts +61 -0
- package/src/anchors/targetPressMonitor.ts +127 -0
- package/src/anchors/useUserflowAnchor.ts +88 -0
- package/src/anchors/useUserflowScrollContainer.ts +86 -0
- package/src/anonymousId.ts +38 -0
- package/src/content/RichContentRenderer.tsx +721 -0
- package/src/content/StepButton.tsx +70 -0
- package/src/content/buttonAppearance.ts +11 -0
- package/src/content/deserialize.ts +147 -0
- package/src/content/imageLayout.ts +29 -0
- package/src/content/migrateFlowBlocks.ts +39 -0
- package/src/content/openSafeUrl.ts +30 -0
- package/src/content/resolveStepButtonChrome.ts +122 -0
- package/src/content/themeColor.ts +98 -0
- package/src/content/types.ts +189 -0
- package/src/deepLinking.ts +182 -0
- package/src/expo-router/UserflowExpoRouterScreenTracker.tsx +7 -0
- package/src/expo-router/getExpoRouterScreenTracker.ts +49 -0
- package/src/expo-router/index.ts +2 -0
- package/src/expo-router/useUserflowExpoRouter.ts +40 -0
- package/src/index.ts +362 -0
- package/src/lifecycle.ts +253 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +87 -0
- package/src/navigation/chainCallbacks.ts +12 -0
- package/src/navigation/getActiveRouteName.ts +18 -0
- package/src/navigation/index.ts +11 -0
- package/src/navigation/openFlowNavigateUrl.ts +113 -0
- package/src/network.ts +113 -0
- package/src/pairing/PairingController.ts +356 -0
- package/src/pairing/PreviewModeBanner.tsx +130 -0
- package/src/pairing/deepLink.ts +128 -0
- package/src/pairing/diagnostics.ts +135 -0
- package/src/pairing/index.ts +19 -0
- package/src/pairing/pairingRuntime.ts +76 -0
- package/src/pairing/tokenStorage.ts +76 -0
- package/src/pairing/usePairingState.ts +43 -0
- package/src/runtime/FlowRenderer.tsx +60 -0
- package/src/runtime/FlowSurfaceFade.tsx +55 -0
- package/src/runtime/TargetPressBridge.tsx +86 -0
- package/src/runtime/UserflowProvider.tsx +89 -0
- package/src/runtime/clientConditions.ts +42 -0
- package/src/runtime/flowEngine.ts +53 -0
- package/src/runtime/flowSessionViewState.ts +55 -0
- package/src/runtime/useFlowSessionState.ts +36 -0
- package/src/runtime/userflowCore.ts +8 -0
- package/src/screenTracker.ts +83 -0
- package/src/surfaces/CloseButton.tsx +41 -0
- package/src/surfaces/MadeWithUserflow.tsx +103 -0
- package/src/surfaces/ModalSurface.tsx +215 -0
- package/src/surfaces/ProgressBar.tsx +142 -0
- package/src/surfaces/TooltipSurface.tsx +743 -0
- package/src/surfaces/absoluteFill.ts +24 -0
- package/src/surfaces/assets/png.d.ts +4 -0
- package/src/surfaces/assets/userflow-logomark.png +0 -0
- package/src/surfaces/parseBackdropOpacity.ts +13 -0
- package/src/surfaces/progress.ts +37 -0
- package/src/surfaces/resolveCloseButtonColor.ts +23 -0
- package/src/surfaces/resolveModalLayout.ts +85 -0
- package/src/surfaces/resolveTooltipLayout.ts +73 -0
- package/src/surfaces/safeArea.ts +48 -0
- package/src/surfaces/themeChrome.ts +126 -0
- package/src/surfaces/tooltip/TooltipBubble.tsx +123 -0
- package/src/surfaces/tooltip/TooltipCutout.tsx +110 -0
- package/src/surfaces/tooltip/TooltipNotch.tsx +67 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +125 -0
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +109 -0
- package/src/surfaces/tooltip/parseBackdropPadding.ts +8 -0
- package/src/surfaces/tooltip/rect.ts +62 -0
- package/src/useUserflowScreen.ts +17 -0
- package/src/version.ts +2 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tracks Expo Router pathname changes for Userflow screen detection and
|
|
3
|
+
* registers `router.push` for path-like flow NAVIGATE actions.
|
|
4
|
+
*
|
|
5
|
+
* Mount via {@link UserflowExpoRouterScreenTracker} from
|
|
6
|
+
* `@userflow-tech/react-native/expo-router` under {@link UserflowProvider}. Do not
|
|
7
|
+
* import this hook from the package root — that would force every host app to
|
|
8
|
+
* install the `expo-router` peer.
|
|
9
|
+
*
|
|
10
|
+
* Pathnames are reported as `{ path }` and mapped to wire `screenPath`
|
|
11
|
+
* (not `screenName`).
|
|
12
|
+
*
|
|
13
|
+
* Screen tracking ≠ action routing: NAVIGATE for in-app paths uses the router
|
|
14
|
+
* handle registered here; http(s)/mailto/tel still go through Linking.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useUserflowExpoRouter(): void;
|
|
17
|
+
//# sourceMappingURL=useUserflowExpoRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUserflowExpoRouter.d.ts","sourceRoot":"","sources":["../../../../../src/expo-router/useUserflowExpoRouter.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAkB5C"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @userflow-tech/react-native — public API for the Userflow React Native SDK.
|
|
3
|
+
*
|
|
4
|
+
* Exposes the `Userflow` singleton host apps import. Auth/identity and the
|
|
5
|
+
* transport live in `@userflow-tech/core`; this binding is a thin facade that
|
|
6
|
+
* delegates to the core engine, wires React Native app lifecycle
|
|
7
|
+
* (background/foreground + idle) to the connection, hosts the flow session
|
|
8
|
+
* engine + provider overlay for Phase 3 rendering, and tracks screen changes.
|
|
9
|
+
*/
|
|
10
|
+
import type { UserflowAttributes, UserflowConfig, UserflowEventAttributes, UserflowGroupOptions, UserflowIdentifyOptions, UserflowInitOptions, UserflowTrackOptions } from '@userflow-tech/core';
|
|
11
|
+
import './anchors/autoAnchor';
|
|
12
|
+
import { type CustomScrollIntoView, type ScrollPadding } from './anchors/scrollConfig';
|
|
13
|
+
import { type FlowNavigateHandler } from './navigation/openFlowNavigateUrl';
|
|
14
|
+
export { SDK_VERSION } from './version';
|
|
15
|
+
export { UserflowProvider, useUserflow } from './runtime/UserflowProvider';
|
|
16
|
+
export type { UserflowProviderProps, UserflowContextValue } from './runtime/UserflowProvider';
|
|
17
|
+
export { useFlowSessionState } from './runtime/useFlowSessionState';
|
|
18
|
+
export type { FlowSessionState } from './runtime/useFlowSessionState';
|
|
19
|
+
export { useUserflowScreen } from './useUserflowScreen';
|
|
20
|
+
export { useUserflowAnchor } from './anchors/useUserflowAnchor';
|
|
21
|
+
export { __userflowAutoAnchor } from './anchors/autoAnchor';
|
|
22
|
+
export { useUserflowScrollContainer } from './anchors/useUserflowScrollContainer';
|
|
23
|
+
export type { UserflowScrollContainerProps } from './anchors/useUserflowScrollContainer';
|
|
24
|
+
export type { CustomScrollIntoView, ScrollIntoViewTarget, ScrollPadding, } from './anchors/scrollConfig';
|
|
25
|
+
export { INACTIVITY_TIMEOUT_MS, SESSION_STALE_AFTER_BACKGROUND_MS, SUSPEND_GRACE_MS, } from './lifecycle';
|
|
26
|
+
export { inspectPairingDeepLink, isPairingAttempt, parsePairingDeepLink, isUserflowPairingUrl, PreviewModeBanner, } from './pairing';
|
|
27
|
+
export type { PairingAttemptRejection, PairingDeepLink, PairingDeepLinkRejection, PairingDeepLinkResult, } from './pairing';
|
|
28
|
+
/** Configuration passed to {@link Userflow.init}. */
|
|
29
|
+
export type UserflowInitConfig = UserflowInitOptions & {
|
|
30
|
+
/**
|
|
31
|
+
* Optional host handler for flow NAVIGATE actions. When set, wins over
|
|
32
|
+
* React Navigation / Expo Router / Linking.
|
|
33
|
+
*/
|
|
34
|
+
onNavigate?: FlowNavigateHandler;
|
|
35
|
+
/**
|
|
36
|
+
* Override the US-pinned Builder pairing websocket host (local/staging).
|
|
37
|
+
* Defaults to `https://e.userflow.com`.
|
|
38
|
+
*/
|
|
39
|
+
pairingEndpoint?: string;
|
|
40
|
+
};
|
|
41
|
+
export type { UserflowAttributes, UserflowConfig, UserflowEventAttributes, UserflowGroupOptions, UserflowIdentifyOptions, UserflowInitOptions, UserflowTrackOptions, } from '@userflow-tech/core';
|
|
42
|
+
/**
|
|
43
|
+
* Public SDK entry point. Delegates to the platform-agnostic engine in
|
|
44
|
+
* `@userflow-tech/core` and manages the app-lifecycle subscription.
|
|
45
|
+
*/
|
|
46
|
+
export declare const Userflow: {
|
|
47
|
+
/** Validate credentials, store configuration, and wire app-lifecycle handling. */
|
|
48
|
+
init(config: UserflowInitConfig): Promise<UserflowConfig>;
|
|
49
|
+
/**
|
|
50
|
+
* Forward a Userflow pairing deep link into the SDK.
|
|
51
|
+
* Prefer automatic Linking interception from {@link Userflow.init}; use this
|
|
52
|
+
* when the host app owns URL routing.
|
|
53
|
+
*/
|
|
54
|
+
handlePairingUrl(url: string): Promise<boolean>;
|
|
55
|
+
/** Exit Builder preview mode and disconnect the pairing websocket. */
|
|
56
|
+
exitPreview(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Override or clear the host NAVIGATE handler (same as `init({ onNavigate })`).
|
|
59
|
+
* Wins over React Navigation / Expo Router / Linking when set.
|
|
60
|
+
*/
|
|
61
|
+
setOnNavigate(handler: FlowNavigateHandler | null | undefined): void;
|
|
62
|
+
/** Identify the current user and upsert their attributes. */
|
|
63
|
+
identify(userId: string, attributes?: UserflowAttributes, options?: UserflowIdentifyOptions): Promise<void>;
|
|
64
|
+
/** Identify an anonymous user with a stable auto-generated id stored on device. */
|
|
65
|
+
identifyAnonymous(attributes?: UserflowAttributes, options?: UserflowIdentifyOptions): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Handle an inbound URL. Returns `true` when it was a Userflow preview deep
|
|
68
|
+
* link (`userflow-*://?token=...`).
|
|
69
|
+
* Prefer letting {@link init} auto-listen; call this when the host app already
|
|
70
|
+
* owns Linking.
|
|
71
|
+
*/
|
|
72
|
+
didHandleURL(url: string): Promise<boolean>;
|
|
73
|
+
/** Associate the current user with a group and upsert group/membership attributes. */
|
|
74
|
+
group(groupId: string | number, attributes?: UserflowAttributes, options?: UserflowGroupOptions): Promise<void>;
|
|
75
|
+
/** Record a custom analytics event for the current user (and group, unless `userOnly`). */
|
|
76
|
+
track(name: string, attributes?: UserflowEventAttributes, options?: UserflowTrackOptions): Promise<void>;
|
|
77
|
+
/** The currently identified user id, or `null` before identify. */
|
|
78
|
+
getUserId(): string | null;
|
|
79
|
+
/** A copy of the attributes recorded for the current user. */
|
|
80
|
+
getAttributes(): UserflowAttributes;
|
|
81
|
+
/** The flow session engine (created lazily; attach runs after identify). */
|
|
82
|
+
getFlowSessionEngine(): import("@userflow-tech/core").FlowSessionEngine;
|
|
83
|
+
/** Clears the current user identity and disconnects from Userflow. */
|
|
84
|
+
reset(): Promise<void>;
|
|
85
|
+
/** Remove app-lifecycle, network, and deep-link subscriptions (call on unmount / teardown). */
|
|
86
|
+
teardown(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Signal user activity so the foreground idle timer resets and an
|
|
89
|
+
* idle-suspended socket reconnects. Prefer automatic signals from
|
|
90
|
+
* {@link updateScreen} / identify / group; call this for touch or other
|
|
91
|
+
* host-app activity the SDK does not observe.
|
|
92
|
+
*/
|
|
93
|
+
reportActivity(): void;
|
|
94
|
+
/**
|
|
95
|
+
* Report the active React Navigation (or manual) screen name. Prefer
|
|
96
|
+
* {@link useUserflowScreen} in React trees; use this for imperative updates
|
|
97
|
+
* outside hooks. When a user is identified, pushes `UpdateClientContext`
|
|
98
|
+
* with `screen` set (Expo Router pathnames use `path` via the Expo helper).
|
|
99
|
+
*/
|
|
100
|
+
updateScreen(screenName: string | undefined): void;
|
|
101
|
+
/**
|
|
102
|
+
* Sticky header/footer insets applied when scrolling tooltip targets into
|
|
103
|
+
* view (mirrors web `userflow.setScrollPadding`).
|
|
104
|
+
*/
|
|
105
|
+
setScrollPadding(padding: ScrollPadding | null | undefined): void;
|
|
106
|
+
/**
|
|
107
|
+
* Replace the SDK's scroll-into-view behavior. Pass `null` to restore the
|
|
108
|
+
* default fiber / registry path (mirrors web `userflow.setCustomScrollIntoView`).
|
|
109
|
+
*/
|
|
110
|
+
setCustomScrollIntoView(fn: CustomScrollIntoView | null | undefined): void;
|
|
111
|
+
};
|
|
112
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mobile connection lifecycle policy.
|
|
3
|
+
*
|
|
4
|
+
* - Background / inactive → arm a short grace timer, then suspend the socket.
|
|
5
|
+
* Returning to active before grace elapses avoids suspend/resume churn: resume
|
|
6
|
+
* if already idle-suspended, otherwise probe liveness (`ensureAlive`) so a
|
|
7
|
+
* silently-dead socket recovers without waiting for the next heartbeat.
|
|
8
|
+
* - Foreground after grace but < {@link SESSION_STALE_AFTER_BACKGROUND_MS}
|
|
9
|
+
* (5 min) → resume and keep the mid-flow session (short-background “resume”).
|
|
10
|
+
* - Foreground after ≥ 5 min → clear local flow session, then resume
|
|
11
|
+
* (long-background reconnect without stale mid-flow UI).
|
|
12
|
+
* - Foreground idle for 5 min → suspend (skip while any flow session is active).
|
|
13
|
+
* - Activity while foreground → reset idle timer and resume if idle-suspended.
|
|
14
|
+
*
|
|
15
|
+
* This 5-minute policy is the ticket meaning of FLOW_RENDERING_SPEC “resume”:
|
|
16
|
+
* short backgrounds continue the active flow; long backgrounds clear then reconnect.
|
|
17
|
+
*/
|
|
18
|
+
import type { AppStateStatus } from 'react-native';
|
|
19
|
+
/** Match web `INACTIVITY_TIMEOUT` — disconnect after this much idle time in foreground. */
|
|
20
|
+
export declare const INACTIVITY_TIMEOUT_MS: number;
|
|
21
|
+
/** Away this long → drop local mid-flow session before reconnecting. */
|
|
22
|
+
export declare const SESSION_STALE_AFTER_BACKGROUND_MS: number;
|
|
23
|
+
/**
|
|
24
|
+
* Delay before suspending on leave. Covers transient iOS `inactive` (Control
|
|
25
|
+
* Center, biometric prompts, app-switcher peek) and quick app-switches.
|
|
26
|
+
*/
|
|
27
|
+
export declare const SUSPEND_GRACE_MS = 3000;
|
|
28
|
+
export type TimerHandle = ReturnType<typeof setTimeout>;
|
|
29
|
+
export interface LifecycleScheduler {
|
|
30
|
+
setTimeout(handler: () => void, ms: number): TimerHandle;
|
|
31
|
+
clearTimeout(handle: TimerHandle): void;
|
|
32
|
+
}
|
|
33
|
+
export interface LifecycleControllerDeps {
|
|
34
|
+
suspend: () => void;
|
|
35
|
+
resume: () => void;
|
|
36
|
+
clearLocalSession: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Verify the socket is alive without a full suspend/resume. Called on a quick
|
|
39
|
+
* foreground (blur under grace) when the socket was never lifecycle-suspended
|
|
40
|
+
* but may have died silently. No-op if the transport is not connected.
|
|
41
|
+
* Do not call while lifecycle-suspended — use {@link resume} instead.
|
|
42
|
+
*/
|
|
43
|
+
ensureAlive: () => void;
|
|
44
|
+
/** True while any mid-flow session (live or draft/preview) is on screen. */
|
|
45
|
+
hasActiveSession: () => boolean;
|
|
46
|
+
scheduler?: LifecycleScheduler;
|
|
47
|
+
now?: () => number;
|
|
48
|
+
/** Override for tests; defaults to {@link SUSPEND_GRACE_MS}. */
|
|
49
|
+
suspendGraceMs?: number;
|
|
50
|
+
/** Override for tests; defaults to React Native `AppState.currentState`. */
|
|
51
|
+
getCurrentAppState?: () => AppStateStatus;
|
|
52
|
+
/** Override for tests; defaults to React Native `AppState`. */
|
|
53
|
+
subscribeAppState?: (handler: (status: AppStateStatus) => void) => () => void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Owns AppState subscription, background duration tracking, and the foreground
|
|
57
|
+
* idle timer. Call {@link start} from `Userflow.init` and {@link stop} from
|
|
58
|
+
* `Userflow.teardown`.
|
|
59
|
+
*/
|
|
60
|
+
export declare class LifecycleController {
|
|
61
|
+
private readonly suspend;
|
|
62
|
+
private readonly resume;
|
|
63
|
+
private readonly clearLocalSession;
|
|
64
|
+
private readonly ensureAlive;
|
|
65
|
+
private readonly hasActiveSession;
|
|
66
|
+
private readonly scheduler;
|
|
67
|
+
private readonly now;
|
|
68
|
+
private readonly suspendGraceMs;
|
|
69
|
+
private readonly getCurrentAppState;
|
|
70
|
+
private readonly subscribeAppState;
|
|
71
|
+
private unsubscribeAppState;
|
|
72
|
+
private idleTimer;
|
|
73
|
+
private graceTimer;
|
|
74
|
+
private backgroundedAt;
|
|
75
|
+
private appIsActive;
|
|
76
|
+
private started;
|
|
77
|
+
/** True once the grace timer has fired (or we suspended on long-away resume). */
|
|
78
|
+
private suspended;
|
|
79
|
+
constructor(deps: LifecycleControllerDeps);
|
|
80
|
+
start(): void;
|
|
81
|
+
stop(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Signal user/SDK activity while the app is foregrounded. Resets the idle
|
|
84
|
+
* timer and reconnects if the socket was idle-suspended.
|
|
85
|
+
*/
|
|
86
|
+
reportActivity(): void;
|
|
87
|
+
/** Visible for tests. */
|
|
88
|
+
handleAppStateChange(status: AppStateStatus): void;
|
|
89
|
+
private onBackground;
|
|
90
|
+
private onForeground;
|
|
91
|
+
private scheduleGraceTimer;
|
|
92
|
+
private clearGraceTimer;
|
|
93
|
+
private scheduleIdleTimer;
|
|
94
|
+
private clearIdleTimer;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../../src/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAA2B,MAAM,cAAc,CAAC;AAE5E,2FAA2F;AAC3F,eAAO,MAAM,qBAAqB,QAAgB,CAAC;AAEnD,wEAAwE;AACxE,eAAO,MAAM,iCAAiC,QAAgB,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,gBAAgB,OAAQ,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAAC;IACzD,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CACzC;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B;;;;;OAKG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,4EAA4E;IAC5E,gBAAgB,EAAE,MAAM,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4EAA4E;IAC5E,kBAAkB,CAAC,EAAE,MAAM,cAAc,CAAC;IAC1C,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CAC/E;AAYD;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAa;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAa;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAgB;IACjD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;IACnC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAuB;IAC1D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4D;IAE9F,OAAO,CAAC,mBAAmB,CAA6B;IACxD,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,OAAO,CAAS;IACxB,iFAAiF;IACjF,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,uBAAuB;IAazC,KAAK,IAAI,IAAI;IAYb,IAAI,IAAI,IAAI;IAWZ;;;OAGG;IACH,cAAc,IAAI,IAAI;IAOtB,yBAAyB;IACzB,oBAAoB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAalD,OAAO,CAAC,YAAY;IAkBpB,OAAO,CAAC,YAAY;IAoCpB,OAAO,CAAC,kBAAkB;IAW1B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAczB,OAAO,CAAC,cAAc;CAMvB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NavigationContainerRef, NavigationState, ParamListBase } from '@react-navigation/native';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
type NavigationContainerChildProps = {
|
|
4
|
+
ref?: React.Ref<NavigationContainerRef<ParamListBase>>;
|
|
5
|
+
onReady?: () => void;
|
|
6
|
+
onStateChange?: (state?: NavigationState) => void;
|
|
7
|
+
};
|
|
8
|
+
export interface WithUserflowReactNavigationProps {
|
|
9
|
+
children: React.ReactElement<NavigationContainerChildProps>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wraps a React Navigation `NavigationContainer` to report screen changes to
|
|
13
|
+
* Userflow after {@link Userflow.init} has completed.
|
|
14
|
+
*
|
|
15
|
+
* Also registers the container ref for in-app NAVIGATE actions (path-like URLs).
|
|
16
|
+
* Screen tracking ≠ action routing — without this wrapper, NAVIGATE falls back to
|
|
17
|
+
* Linking / host `onNavigate`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function WithUserflowReactNavigation({ children, }: WithUserflowReactNavigationProps): React.ReactElement;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=WithUserflowReactNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WithUserflowReactNavigation.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/WithUserflowReactNavigation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACd,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,KAAK,6BAA6B,GAAG;IACnC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,eAAe,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;CAC7D;AAkBD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,QAAQ,GACT,EAAE,gCAAgC,GAAG,KAAK,CAAC,YAAY,CAmCvD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Runs two optional callbacks in sequence, forwarding the same arguments. */
|
|
2
|
+
export declare function chainCallbacks<A extends unknown[]>(first: ((...args: A) => void) | undefined, second: ((...args: A) => void) | undefined): ((...args: A) => void) | undefined;
|
|
3
|
+
//# sourceMappingURL=chainCallbacks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chainCallbacks.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/chainCallbacks.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAAE,EAChD,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,EACzC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,GACzC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,CAOpC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NavigationState, PartialState } from '@react-navigation/native';
|
|
2
|
+
type RoutableState = NavigationState | PartialState<NavigationState>;
|
|
3
|
+
/** Returns the deepest active route name from a React Navigation state tree. */
|
|
4
|
+
export declare function getActiveRouteName(state: RoutableState | undefined): string | undefined;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=getActiveRouteName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActiveRouteName.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/getActiveRouteName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE9E,KAAK,aAAa,GAAG,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAErE,gFAAgF;AAChF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAYvF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { WithUserflowReactNavigation } from './WithUserflowReactNavigation';
|
|
2
|
+
export type { WithUserflowReactNavigationProps } from './WithUserflowReactNavigation';
|
|
3
|
+
export { openFlowNavigateUrl, setHostOnNavigate, setReactNavigationRef, setExpoRouterNavigator, isExternalNavigateUrl, isInAppNavigateUrl, } from './openFlowNavigateUrl';
|
|
4
|
+
export type { FlowNavigateHandler, ExpoRouterLike } from './openFlowNavigateUrl';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,YAAY,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACtF,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NavigationContainerRef, ParamListBase } from '@react-navigation/native';
|
|
2
|
+
export type FlowNavigateHandler = (url: string) => void | boolean | Promise<void | boolean>;
|
|
3
|
+
export type ExpoRouterLike = {
|
|
4
|
+
push: (href: string) => void;
|
|
5
|
+
};
|
|
6
|
+
/** Optional host escape hatch — wins over router / Linking when set. */
|
|
7
|
+
export declare function setHostOnNavigate(handler: FlowNavigateHandler | null | undefined): void;
|
|
8
|
+
/** Register the React Navigation container used by {@link WithUserflowReactNavigation}. */
|
|
9
|
+
export declare function setReactNavigationRef(ref: NavigationContainerRef<ParamListBase> | null | undefined): void;
|
|
10
|
+
/** Register Expo Router push for path-like NAVIGATE actions. */
|
|
11
|
+
export declare function setExpoRouterNavigator(router: ExpoRouterLike | null | undefined): void;
|
|
12
|
+
/** True for http(s) / mailto / tel (external). */
|
|
13
|
+
export declare function isExternalNavigateUrl(url: string): boolean;
|
|
14
|
+
/** Path-like in-app URL: leading slash, or no scheme. */
|
|
15
|
+
export declare function isInAppNavigateUrl(url: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Open a flow NAVIGATE url.
|
|
18
|
+
*
|
|
19
|
+
* Priority:
|
|
20
|
+
* 1. Host `onNavigate` (custom schemes / exotic routing)
|
|
21
|
+
* 2. External allowlisted schemes → Linking / `openSafeUrl`
|
|
22
|
+
* 3. Path-like → Expo Router `push` or React Navigation `navigate`
|
|
23
|
+
* 4. Fallback → Linking (best-effort)
|
|
24
|
+
*
|
|
25
|
+
* Note: screen tracking ≠ action routing. React Navigation hosts must wrap with
|
|
26
|
+
* `WithUserflowReactNavigation` for in-app NAVIGATE; Expo Router apps get a
|
|
27
|
+
* navigator handle when the host mounts `UserflowExpoRouterScreenTracker` from
|
|
28
|
+
* `@userflow-tech/react-native/expo-router` under `UserflowProvider`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function openFlowNavigateUrl(url: string): Promise<void>;
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare function resetFlowNavigateRegistryForTests(): void;
|
|
33
|
+
//# sourceMappingURL=openFlowNavigateUrl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openFlowNavigateUrl.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/openFlowNavigateUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAKtF,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,CAAC;AAE5F,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,CAAC;AAMF,wEAAwE;AACxE,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAEvF;AAED,2FAA2F;AAC3F,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,GAAG,SAAS,GAC5D,IAAI,CAEN;AAED,gEAAgE;AAChE,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAEtF;AAED,kDAAkD;AAClD,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,yDAAyD;AACzD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAMvD;AAcD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAiCpE;AAED,gBAAgB;AAChB,wBAAgB,iCAAiC,IAAI,IAAI,CAIxD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Network reachability → eager liveness check (optional enhancement).
|
|
3
|
+
*
|
|
4
|
+
* When connectivity returns while the app is foregrounded (and the transport is
|
|
5
|
+
* not suspended), call {@link NetworkControllerDeps.ensureAlive} so we do not
|
|
6
|
+
* wait for the adaptive heartbeat / foreground probe to notice the drop.
|
|
7
|
+
* `ensureAlive` probes a still-open (possibly half-dead) socket and reconnects
|
|
8
|
+
* eagerly when the transport is already dropped — covering both cases.
|
|
9
|
+
*
|
|
10
|
+
* This is layered on top of a complete zero-dependency recovery path (socket
|
|
11
|
+
* close → reconnect ladder, adaptive heartbeat, and the foreground liveness
|
|
12
|
+
* probe). `@react-native-community/netinfo` is therefore an *optional* peer: when
|
|
13
|
+
* present it makes offline→online recovery fast; when absent the baseline still
|
|
14
|
+
* recovers within a few seconds of the next beat / foreground return.
|
|
15
|
+
*/
|
|
16
|
+
export interface NetworkStatus {
|
|
17
|
+
isConnected: boolean | null;
|
|
18
|
+
/** `null` means unknown — treat as reachable when connected. */
|
|
19
|
+
isInternetReachable: boolean | null;
|
|
20
|
+
}
|
|
21
|
+
export interface NetworkControllerDeps {
|
|
22
|
+
ensureAlive: () => void;
|
|
23
|
+
/** Override for tests; defaults to `@react-native-community/netinfo`. */
|
|
24
|
+
subscribe?: (handler: (status: NetworkStatus) => void) => () => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Owns the NetInfo subscription. Call {@link start} from `Userflow.init` and
|
|
28
|
+
* {@link stop} from `Userflow.teardown`.
|
|
29
|
+
*/
|
|
30
|
+
export declare class NetworkController {
|
|
31
|
+
private readonly ensureAlive;
|
|
32
|
+
private readonly subscribe;
|
|
33
|
+
private unsubscribe;
|
|
34
|
+
private started;
|
|
35
|
+
private wasOnline;
|
|
36
|
+
constructor(deps: NetworkControllerDeps);
|
|
37
|
+
start(): void;
|
|
38
|
+
stop(): void;
|
|
39
|
+
/** Visible for tests. */
|
|
40
|
+
handleStatus(status: NetworkStatus): void;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../src/network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,gEAAgE;IAChE,mBAAmB,EAAE,OAAO,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,qBAAqB;IACpC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,yEAAyE;IACzE,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;CACtE;AAuCD;;;GAGG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA2D;IAErF,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,SAAS,CAAwB;gBAE7B,IAAI,EAAE,qBAAqB;IAKvC,KAAK,IAAI,IAAI;IAQb,IAAI,IAAI,IAAI;IAQZ,yBAAyB;IACzB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI;CAa1C"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { PairingEngine, type PairingEngineState, type UserflowCore } from '@userflow-tech/core';
|
|
2
|
+
import { type AppStateStatus } from 'react-native';
|
|
3
|
+
import { type PairingLogger } from './diagnostics';
|
|
4
|
+
import { type PairingTokenStore } from './tokenStorage';
|
|
5
|
+
export type PairingControllerListener = (state: PairingEngineState) => void;
|
|
6
|
+
export interface PairingControllerOptions {
|
|
7
|
+
core: UserflowCore;
|
|
8
|
+
/** Override pairing host (local/staging). Defaults to US-pinned production. */
|
|
9
|
+
pairingEndpoint?: string;
|
|
10
|
+
tokenStore?: PairingTokenStore;
|
|
11
|
+
/** Clear mid-flow session when exiting preview. */
|
|
12
|
+
clearLocalSession?: () => void;
|
|
13
|
+
LinkingModule?: {
|
|
14
|
+
getInitialURL(): Promise<string | null>;
|
|
15
|
+
addEventListener(type: 'url', handler: (event: {
|
|
16
|
+
url: string;
|
|
17
|
+
}) => void): {
|
|
18
|
+
remove(): void;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
AppStateModule?: {
|
|
22
|
+
addEventListener(type: 'change', handler: (state: AppStateStatus) => void): {
|
|
23
|
+
remove(): void;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/** Sink for pairing diagnostics. Injected in tests. */
|
|
27
|
+
logger?: PairingLogger;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Inbound deep links → pairing session → preview mode.
|
|
31
|
+
* Active in all builds (including release); security is the short-lived
|
|
32
|
+
* signed pairing JWT + Builder ability checks, not `__DEV__`.
|
|
33
|
+
*/
|
|
34
|
+
export declare class PairingController {
|
|
35
|
+
private engine;
|
|
36
|
+
private started;
|
|
37
|
+
private urlSub;
|
|
38
|
+
private appStateSub;
|
|
39
|
+
private readonly listeners;
|
|
40
|
+
private readonly tokenStore;
|
|
41
|
+
private readonly LinkingModule;
|
|
42
|
+
private readonly AppStateModule;
|
|
43
|
+
private readonly clearLocalSession;
|
|
44
|
+
private readonly core;
|
|
45
|
+
private readonly pairingEndpoint;
|
|
46
|
+
private readonly logger;
|
|
47
|
+
private initPhase;
|
|
48
|
+
private initFailureReason;
|
|
49
|
+
/** Pairing token captured before init resolved, replayed once it does. */
|
|
50
|
+
private deferredPairingToken;
|
|
51
|
+
/** Diagnostics already emitted for the current init attempt. */
|
|
52
|
+
private readonly loggedOnce;
|
|
53
|
+
constructor(options: PairingControllerOptions);
|
|
54
|
+
getEngine(): PairingEngine | null;
|
|
55
|
+
/** Whether deep-link / AppState listeners have been started. */
|
|
56
|
+
hasStarted(): boolean;
|
|
57
|
+
getState(): PairingEngineState;
|
|
58
|
+
/**
|
|
59
|
+
* State for a link we captured but cannot act on because init failed. Without
|
|
60
|
+
* this the host app shows no sign that a pairing link was ever received.
|
|
61
|
+
*/
|
|
62
|
+
private blockedState;
|
|
63
|
+
onStateChange(listener: PairingControllerListener): () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Start deep-link listeners. Safe to call multiple times, and never rejects —
|
|
66
|
+
* `Userflow.init` fires it without awaiting, so a rejection here would become
|
|
67
|
+
* an unhandled promise rejection.
|
|
68
|
+
*/
|
|
69
|
+
start(): Promise<void>;
|
|
70
|
+
private startListening;
|
|
71
|
+
stop(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Host apps that intercept deep links themselves can forward them here.
|
|
74
|
+
*/
|
|
75
|
+
handleUrl(url: string): Promise<boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* Called when `Userflow.init()` begins. Clears a previous failure so a retried
|
|
78
|
+
* init does not keep reporting the old error.
|
|
79
|
+
*/
|
|
80
|
+
notifyInitStarted(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Called when `Userflow.init()` resolves. Connects a link that arrived while
|
|
83
|
+
* init was still in flight.
|
|
84
|
+
*/
|
|
85
|
+
notifyInitialized(): Promise<void>;
|
|
86
|
+
/**
|
|
87
|
+
* Called when `Userflow.init()` rejects. Pairing cannot connect without a
|
|
88
|
+
* session, so surface why instead of failing silently.
|
|
89
|
+
*/
|
|
90
|
+
notifyInitFailed(error: unknown): void;
|
|
91
|
+
/**
|
|
92
|
+
* Log `message` at most once per init attempt. Inbound links can repeat (URL
|
|
93
|
+
* event plus host forwarding), and these messages are several lines long.
|
|
94
|
+
*/
|
|
95
|
+
private warnOnce;
|
|
96
|
+
/** Explicit entry with a raw pairing JWT (tests / advanced hosts). */
|
|
97
|
+
enterPreview(pairingToken: string): Promise<void>;
|
|
98
|
+
exitPreview(): Promise<void>;
|
|
99
|
+
/** Flush queued startFlowWithToken after identify. */
|
|
100
|
+
notifyIdentified(): void;
|
|
101
|
+
private ensureEngine;
|
|
102
|
+
private emit;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=PairingController.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PairingController.d.ts","sourceRoot":"","sources":["../../../../../src/pairing/PairingController.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,YAAY,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAY,KAAK,cAAc,EAAqB,MAAM,cAAc,CAAC;AAGhF,OAAO,EAQL,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEjF,MAAM,MAAM,yBAAyB,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;AAY5E,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,YAAY,CAAC;IACnB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,mDAAmD;IACnD,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,aAAa,CAAC,EAAE;QACd,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;QACxC,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE;YAAE,GAAG,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI,GAAG;YAAE,MAAM,IAAI,IAAI,CAAA;SAAE,CAAC;KAC9F,CAAC;IACF,cAAc,CAAC,EAAE;QACf,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,GAAG;YAAE,MAAM,IAAI,IAAI,CAAA;SAAE,CAAC;KAChG,CAAC;IACF,uDAAuD;IACvD,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAA8B;IAC5C,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAmC;IACjD,OAAO,CAAC,WAAW,CAAmC;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAoB;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAyD;IACvF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAA0D;IACzF,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA2B;IAC7D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAe;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAS;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,iBAAiB,CAAuB;IAChD,0EAA0E;IAC1E,OAAO,CAAC,oBAAoB,CAAuB;IACnD,gEAAgE;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAqB;gBAEpC,OAAO,EAAE,wBAAwB;IAU7C,SAAS,IAAI,aAAa,GAAG,IAAI;IAIjC,gEAAgE;IAChE,UAAU,IAAI,OAAO;IAIrB,QAAQ,IAAI,kBAAkB;IAiB9B;;;OAGG;IACH,OAAO,CAAC,YAAY;IAgBpB,aAAa,CAAC,QAAQ,EAAE,yBAAyB,GAAG,MAAM,IAAI;IAO9D;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAWd,cAAc;IAmC5B,IAAI,IAAI,IAAI;IASZ;;OAEG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAkC9C;;;OAGG;IACH,iBAAiB,IAAI,IAAI;IAUzB;;;OAGG;IACG,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBxC;;;OAGG;IACH,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAUtC;;;OAGG;IACH,OAAO,CAAC,QAAQ;IAMhB,sEAAsE;IAChE,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMjD,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IASlC,sDAAsD;IACtD,gBAAgB,IAAI,IAAI;IAIxB,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,IAAI;CASb"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PairingEngineState } from '@userflow-tech/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface PreviewModeBannerProps {
|
|
4
|
+
state: PairingEngineState;
|
|
5
|
+
onExit: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Overlay chrome for Builder pairing preview mode.
|
|
9
|
+
*/
|
|
10
|
+
export declare function PreviewModeBanner({ state, onExit, }: PreviewModeBannerProps): React.ReactElement | null;
|
|
11
|
+
//# sourceMappingURL=PreviewModeBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewModeBanner.d.ts","sourceRoot":"","sources":["../../../../../src/pairing/PreviewModeBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,MAAM,GACP,EAAE,sBAAsB,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAgEpD"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse Builder pairing deep links:
|
|
3
|
+
* {scheme_id}://?pairing_token=<jwt>
|
|
4
|
+
*
|
|
5
|
+
* `scheme_id` is typically `userflow-<digits>`.
|
|
6
|
+
*/
|
|
7
|
+
export interface PairingDeepLink {
|
|
8
|
+
scheme: string;
|
|
9
|
+
pairingToken: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Why a URL was not treated as a pairing link.
|
|
13
|
+
*
|
|
14
|
+
* `bad-scheme-shape` and `missing-token` are only reported for URLs that
|
|
15
|
+
* actually target pairing (root with a `pairing_token` query), so callers can
|
|
16
|
+
* tell a misconfigured pairing attempt apart from an unrelated link. See
|
|
17
|
+
* {@link isPairingAttempt}.
|
|
18
|
+
*/
|
|
19
|
+
export type PairingDeepLinkRejection = 'not-userflow' | 'foreign-scheme' | 'bad-scheme-shape' | 'unparseable' | 'not-pair-path' | 'missing-token';
|
|
20
|
+
/**
|
|
21
|
+
* Rejections where the URL was a recognisable pairing attempt that could not be
|
|
22
|
+
* used. These are worth reporting; everything else belongs to the host app.
|
|
23
|
+
*/
|
|
24
|
+
export type PairingAttemptRejection = 'foreign-scheme' | 'bad-scheme-shape' | 'missing-token';
|
|
25
|
+
export type PairingDeepLinkResult = {
|
|
26
|
+
ok: true;
|
|
27
|
+
link: PairingDeepLink;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
reason: PairingDeepLinkRejection;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* True when a rejected URL was nonetheless a recognisable pairing attempt rather
|
|
34
|
+
* than someone else's deep link.
|
|
35
|
+
*
|
|
36
|
+
* Callers use this to decide whether a rejection is worth reporting. Preview
|
|
37
|
+
* links accept any `userflow-*` scheme, so scheme shape alone cannot be the
|
|
38
|
+
* signal — reporting on it would flag valid preview links as broken pairing.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isPairingAttempt(reason: PairingDeepLinkRejection): reason is PairingAttemptRejection;
|
|
41
|
+
/**
|
|
42
|
+
* Parse `url` as a pairing deep link, reporting why it was rejected.
|
|
43
|
+
* Prefer this over {@link parsePairingDeepLink} when the reason matters.
|
|
44
|
+
*/
|
|
45
|
+
export declare function inspectPairingDeepLink(url: string | null | undefined): PairingDeepLinkResult;
|
|
46
|
+
/**
|
|
47
|
+
* Returns pairing token details when `url` is a Userflow pairing deep link.
|
|
48
|
+
* Accepts only `userflow-*` schemes.
|
|
49
|
+
*/
|
|
50
|
+
export declare function parsePairingDeepLink(url: string | null | undefined): PairingDeepLink | null;
|
|
51
|
+
/** True when the URL looks like a Userflow pairing deep link. */
|
|
52
|
+
export declare function isUserflowPairingUrl(url: string | null | undefined): boolean;
|
|
53
|
+
//# sourceMappingURL=deepLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deepLink.d.ts","sourceRoot":"","sources":["../../../../../src/pairing/deepLink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AAMD;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAChC,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,aAAa,GACb,eAAe,GACf,eAAe,CAAC;AAEpB;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAE9F,MAAM,MAAM,qBAAqB,GAC7B;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GACnC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,wBAAwB,CAAA;CAAE,CAAC;AAEpD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,wBAAwB,GAC/B,MAAM,IAAI,uBAAuB,CAEnC;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,qBAAqB,CAqD5F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAG3F;AAED,iEAAiE;AACjE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE5E"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Diagnostics for Builder pairing deep links.
|
|
3
|
+
*
|
|
4
|
+
* Pairing failures are unusually easy to miss. The URL scheme is registered in
|
|
5
|
+
* the native project at build time, so the OS launches the host app from a
|
|
6
|
+
* Builder QR code whether or not the SDK is listening. When the SDK then drops
|
|
7
|
+
* the link, the app looks like it simply "opened and did nothing".
|
|
8
|
+
*
|
|
9
|
+
* Every drop path routes through a message below so the reason is visible.
|
|
10
|
+
*/
|
|
11
|
+
import type { PairingAttemptRejection } from './deepLink';
|
|
12
|
+
/** Sink for pairing diagnostics. Injected in tests. */
|
|
13
|
+
export type PairingLogger = (message: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Default logger. Pairing links only ever arrive from a deliberate developer
|
|
16
|
+
* action (scanning or opening a Builder QR code), so these warn unconditionally
|
|
17
|
+
* rather than behind `__DEV__` — a swallowed pairing link is otherwise
|
|
18
|
+
* undiagnosable, and this cannot fire for real end users.
|
|
19
|
+
*/
|
|
20
|
+
export declare const defaultPairingLogger: PairingLogger;
|
|
21
|
+
/** A pairing link arrived while `Userflow.init()` was still in flight. */
|
|
22
|
+
export declare function pairingLinkDeferredMessage(): string;
|
|
23
|
+
/**
|
|
24
|
+
* A pairing link arrived but `Userflow.init()` rejected, so there is no session
|
|
25
|
+
* to attach the preview to.
|
|
26
|
+
*/
|
|
27
|
+
export declare function pairingLinkInitFailedMessage(reason: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Pairing was reachable but the connection itself failed (expired token, device
|
|
30
|
+
* already paired, backend unreachable). Never fatal to the host app.
|
|
31
|
+
*/
|
|
32
|
+
export declare function pairingConnectFailedMessage(reason: string): string;
|
|
33
|
+
/** A pairing link arrived without the `pairing_token` query parameter. */
|
|
34
|
+
export declare function pairingMissingTokenMessage(url: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* A pairing link arrived on a scheme Userflow does not own — almost always the
|
|
37
|
+
* host app's own scheme substituted for the environment's `scheme_id`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function pairingForeignSchemeMessage(url: string): string;
|
|
40
|
+
/** Message for a pairing attempt that could not be used. */
|
|
41
|
+
export declare function pairingAttemptRejectionMessage(reason: PairingAttemptRejection, url: string): string;
|
|
42
|
+
/** Clearing the persisted pairing token failed. Best-effort, never fatal. */
|
|
43
|
+
export declare function pairingTokenStoreClearFailedMessage(reason: string): string;
|
|
44
|
+
/** Attaching the deep-link listeners failed, which disables pairing entirely. */
|
|
45
|
+
export declare function pairingListenerSetupFailedMessage(reason: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* The URL used a `userflow-` scheme that is not a valid `scheme_id`. Pairing
|
|
48
|
+
* requires `userflow-` followed by digits, so an arbitrary `userflow-*` scheme
|
|
49
|
+
* can match preview links but not pairing ones.
|
|
50
|
+
*/
|
|
51
|
+
export declare function pairingSchemeShapeMessage(url: string): string;
|
|
52
|
+
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../../../src/pairing/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAY1D,uDAAuD;AACvD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,aAGlC,CAAC;AAEF,0EAA0E;AAC1E,wBAAgB,0BAA0B,IAAI,MAAM,CAKnD;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAMnE;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKlE;AAED,0EAA0E;AAC1E,wBAAgB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAS/D;AAED,4DAA4D;AAC5D,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,uBAAuB,EAC/B,GAAG,EAAE,MAAM,GACV,MAAM,CASR;AAED,6EAA6E;AAC7E,wBAAgB,mCAAmC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED,iFAAiF;AACjF,wBAAgB,iCAAiC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKxE;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM7D"}
|