@userflow-tech/react-native 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -61
- package/app.plugin.js +11 -1
- package/babel-plugin/index.d.ts +8 -8
- package/babel-plugin/index.d.ts.map +1 -1
- package/babel-plugin/index.js +17 -9
- package/babel-plugin/index.js.map +1 -1
- package/babel-plugin.js +13 -0
- package/docs/anchoring.md +141 -13
- package/docs/deep-linking.md +18 -15
- package/docs/theme-mapping.md +44 -15
- package/docs/troubleshooting.md +36 -29
- package/expo-plugin/withUserflow.js +1 -1
- package/expo-plugin/withUserflow.js.map +1 -1
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +124 -2
- package/lib/commonjs/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/anchorChangeTicker.js +10 -0
- package/lib/commonjs/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/commonjs/anchors/elementConditionEvaluator.js +25 -12
- package/lib/commonjs/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js +11 -47
- package/lib/commonjs/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +50 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/commonjs/anchors/fiber/fiberInternals.js +145 -3
- package/lib/commonjs/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/commonjs/anchors/fiber/indexHostFibers.js +129 -0
- package/lib/commonjs/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js +131 -0
- package/lib/commonjs/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js +50 -0
- package/lib/commonjs/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/commonjs/anchors/resolveAnchorHost.js +15 -21
- package/lib/commonjs/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js +171 -0
- package/lib/commonjs/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/commonjs/anchors/semanticMatcher.js +285 -0
- package/lib/commonjs/anchors/semanticMatcher.js.map +1 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js +490 -0
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js +73 -0
- package/lib/commonjs/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js +64 -0
- package/lib/commonjs/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js +94 -0
- package/lib/commonjs/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js +131 -0
- package/lib/commonjs/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js +39 -0
- package/lib/commonjs/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js +88 -0
- package/lib/commonjs/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js +110 -0
- package/lib/commonjs/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js +57 -0
- package/lib/commonjs/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js +80 -0
- package/lib/commonjs/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/commonjs/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/commonjs/authoring/chrome/tokens.js +150 -0
- package/lib/commonjs/authoring/chrome/tokens.js.map +1 -0
- package/lib/commonjs/authoring/doubleTap.js +23 -0
- package/lib/commonjs/authoring/doubleTap.js.map +1 -0
- package/lib/commonjs/authoring/elementPickerController.js +102 -0
- package/lib/commonjs/authoring/elementPickerController.js.map +1 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js +195 -0
- package/lib/commonjs/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/commonjs/authoring/hitTest.js +106 -0
- package/lib/commonjs/authoring/hitTest.js.map +1 -0
- package/lib/commonjs/content/RichContentRenderer.js +12 -2
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +19 -4
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/resolveStepButtonChrome.js +8 -6
- package/lib/commonjs/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/commonjs/content/themeColor.js +11 -0
- package/lib/commonjs/content/themeColor.js.map +1 -1
- package/lib/commonjs/deviceContext.js +158 -0
- package/lib/commonjs/deviceContext.js.map +1 -0
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js +40 -4
- package/lib/commonjs/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/commonjs/hostAppVersion.js +242 -0
- package/lib/commonjs/hostAppVersion.js.map +1 -0
- package/lib/commonjs/index.js +118 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js +17 -8
- package/lib/commonjs/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/commonjs/navigation/isOverlayPresentation.js +64 -0
- package/lib/commonjs/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/commonjs/pairing/PairingController.js +29 -2
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/pairing/PreviewModeBanner.js +211 -84
- package/lib/commonjs/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/commonjs/pairing/diagnostics.js +9 -0
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/pairing/elementPickerRelay.js +91 -0
- package/lib/commonjs/pairing/elementPickerRelay.js.map +1 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js +52 -0
- package/lib/commonjs/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/commonjs/pairing/tokenStorage.js +25 -2
- package/lib/commonjs/pairing/tokenStorage.js.map +1 -1
- package/lib/commonjs/pairing/usePairingState.js +3 -1
- package/lib/commonjs/pairing/usePairingState.js.map +1 -1
- package/lib/commonjs/runtime/FlowRenderer.js +45 -21
- package/lib/commonjs/runtime/FlowRenderer.js.map +1 -1
- package/lib/commonjs/runtime/FlowSurfaceFade.js +47 -24
- package/lib/commonjs/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/commonjs/runtime/TargetPressBridge.js +13 -44
- package/lib/commonjs/runtime/TargetPressBridge.js.map +1 -1
- package/lib/commonjs/runtime/UserflowProvider.js +74 -20
- package/lib/commonjs/runtime/UserflowProvider.js.map +1 -1
- package/lib/commonjs/runtime/changedTouchPoints.js +48 -0
- package/lib/commonjs/runtime/changedTouchPoints.js.map +1 -0
- package/lib/commonjs/runtime/flowEngine.js +3 -1
- package/lib/commonjs/runtime/flowEngine.js.map +1 -1
- package/lib/commonjs/runtime/flowSessionViewState.js +32 -7
- package/lib/commonjs/runtime/flowSessionViewState.js.map +1 -1
- package/lib/commonjs/runtime/useFlowSessionState.js +2 -1
- package/lib/commonjs/runtime/useFlowSessionState.js.map +1 -1
- package/lib/commonjs/screenTracker.js +46 -4
- package/lib/commonjs/screenTracker.js.map +1 -1
- package/lib/commonjs/surfaces/CardFade.js +31 -0
- package/lib/commonjs/surfaces/CardFade.js.map +1 -0
- package/lib/commonjs/surfaces/CloseButton.js +11 -6
- package/lib/commonjs/surfaces/CloseButton.js.map +1 -1
- package/lib/commonjs/surfaces/ModalSurface.js +50 -34
- package/lib/commonjs/surfaces/ModalSurface.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +366 -87
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/cardTransition.js +70 -0
- package/lib/commonjs/surfaces/cardTransition.js.map +1 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js +109 -0
- package/lib/commonjs/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/commonjs/surfaces/resolveModalLayout.js +7 -3
- package/lib/commonjs/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/commonjs/surfaces/resolveTooltipLayout.js +0 -4
- package/lib/commonjs/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js +33 -0
- package/lib/commonjs/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js +128 -0
- package/lib/commonjs/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/commonjs/surfaces/themeChrome.js +4 -1
- package/lib/commonjs/surfaces/themeChrome.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js +142 -21
- package/lib/commonjs/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/commonjs/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +124 -0
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/commonjs/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js +88 -19
- package/lib/commonjs/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js +52 -0
- package/lib/commonjs/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/commonjs/surfaces/tooltip/rect.js +12 -0
- package/lib/commonjs/surfaces/tooltip/rect.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js +103 -0
- package/lib/commonjs/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +125 -2
- package/lib/module/anchors/AutoAnchorRegistry.js.map +1 -1
- package/lib/module/anchors/anchorChangeTicker.js +10 -0
- package/lib/module/anchors/anchorChangeTicker.js.map +1 -1
- package/lib/module/anchors/elementConditionEvaluator.js +25 -12
- package/lib/module/anchors/elementConditionEvaluator.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRoot.js +2 -43
- package/lib/module/anchors/fiber/FiberScanRoot.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +46 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -0
- package/lib/module/anchors/fiber/fiberInternals.js +139 -3
- package/lib/module/anchors/fiber/fiberInternals.js.map +1 -1
- package/lib/module/anchors/fiber/indexHostFibers.js +122 -0
- package/lib/module/anchors/fiber/indexHostFibers.js.map +1 -0
- package/lib/module/anchors/fiber/readHostContent.js +127 -0
- package/lib/module/anchors/fiber/readHostContent.js.map +1 -0
- package/lib/module/anchors/fiberAnchorCache.js +40 -0
- package/lib/module/anchors/fiberAnchorCache.js.map +1 -0
- package/lib/module/anchors/resolveAnchorHost.js +15 -21
- package/lib/module/anchors/resolveAnchorHost.js.map +1 -1
- package/lib/module/anchors/resolveAutoAnchorHost.js +167 -0
- package/lib/module/anchors/resolveAutoAnchorHost.js.map +1 -0
- package/lib/module/anchors/semanticMatcher.js +280 -0
- package/lib/module/anchors/semanticMatcher.js.map +1 -0
- package/lib/module/authoring/ElementPickerOverlay.js +485 -0
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -0
- package/lib/module/authoring/capturePickerScreenshot.js +68 -0
- package/lib/module/authoring/capturePickerScreenshot.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js +88 -0
- package/lib/module/authoring/chrome/ChromeBarTransition.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js +59 -0
- package/lib/module/authoring/chrome/ChromeBottomSheet.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeButton.js +89 -0
- package/lib/module/authoring/chrome/ChromeButton.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeDialog.js +126 -0
- package/lib/module/authoring/chrome/ChromeDialog.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeIcon.js +33 -0
- package/lib/module/authoring/chrome/ChromeIcon.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js +82 -0
- package/lib/module/authoring/chrome/ChromeTooltip.js.map +1 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js +104 -0
- package/lib/module/authoring/chrome/ChromeTopBar.js.map +1 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js +52 -0
- package/lib/module/authoring/chrome/DoubleTapBridge.js.map +1 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js +75 -0
- package/lib/module/authoring/chrome/doubleTapMonitor.js.map +1 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@2x.png +0 -0
- package/lib/module/authoring/chrome/icons/xmark@3x.png +0 -0
- package/lib/module/authoring/chrome/tokens.js +146 -0
- package/lib/module/authoring/chrome/tokens.js.map +1 -0
- package/lib/module/authoring/doubleTap.js +18 -0
- package/lib/module/authoring/doubleTap.js.map +1 -0
- package/lib/module/authoring/elementPickerController.js +97 -0
- package/lib/module/authoring/elementPickerController.js.map +1 -0
- package/lib/module/authoring/fingerprintFromInstance.js +187 -0
- package/lib/module/authoring/fingerprintFromInstance.js.map +1 -0
- package/lib/module/authoring/hitTest.js +100 -0
- package/lib/module/authoring/hitTest.js.map +1 -0
- package/lib/module/content/RichContentRenderer.js +12 -2
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +19 -4
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/resolveStepButtonChrome.js +8 -6
- package/lib/module/content/resolveStepButtonChrome.js.map +1 -1
- package/lib/module/content/themeColor.js +10 -0
- package/lib/module/content/themeColor.js.map +1 -1
- package/lib/module/deviceContext.js +142 -0
- package/lib/module/deviceContext.js.map +1 -0
- package/lib/module/expo-router/useUserflowExpoRouter.js +42 -6
- package/lib/module/expo-router/useUserflowExpoRouter.js.map +1 -1
- package/lib/module/hostAppVersion.js +225 -0
- package/lib/module/hostAppVersion.js.map +1 -0
- package/lib/module/index.js +119 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/navigation/WithUserflowReactNavigation.js +18 -9
- package/lib/module/navigation/WithUserflowReactNavigation.js.map +1 -1
- package/lib/module/navigation/isOverlayPresentation.js +58 -0
- package/lib/module/navigation/isOverlayPresentation.js.map +1 -0
- package/lib/module/pairing/PairingController.js +30 -3
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/pairing/PreviewModeBanner.js +212 -85
- package/lib/module/pairing/PreviewModeBanner.js.map +1 -1
- package/lib/module/pairing/diagnostics.js +8 -0
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/pairing/elementPickerRelay.js +87 -0
- package/lib/module/pairing/elementPickerRelay.js.map +1 -0
- package/lib/module/pairing/resolvePreviewChrome.js +48 -0
- package/lib/module/pairing/resolvePreviewChrome.js.map +1 -0
- package/lib/module/pairing/tokenStorage.js +24 -2
- package/lib/module/pairing/tokenStorage.js.map +1 -1
- package/lib/module/pairing/usePairingState.js +3 -1
- package/lib/module/pairing/usePairingState.js.map +1 -1
- package/lib/module/runtime/FlowRenderer.js +45 -21
- package/lib/module/runtime/FlowRenderer.js.map +1 -1
- package/lib/module/runtime/FlowSurfaceFade.js +49 -26
- package/lib/module/runtime/FlowSurfaceFade.js.map +1 -1
- package/lib/module/runtime/TargetPressBridge.js +12 -43
- package/lib/module/runtime/TargetPressBridge.js.map +1 -1
- package/lib/module/runtime/UserflowProvider.js +74 -20
- package/lib/module/runtime/UserflowProvider.js.map +1 -1
- package/lib/module/runtime/changedTouchPoints.js +43 -0
- package/lib/module/runtime/changedTouchPoints.js.map +1 -0
- package/lib/module/runtime/flowEngine.js +3 -1
- package/lib/module/runtime/flowEngine.js.map +1 -1
- package/lib/module/runtime/flowSessionViewState.js +32 -7
- package/lib/module/runtime/flowSessionViewState.js.map +1 -1
- package/lib/module/runtime/useFlowSessionState.js +2 -1
- package/lib/module/runtime/useFlowSessionState.js.map +1 -1
- package/lib/module/screenTracker.js +42 -4
- package/lib/module/screenTracker.js.map +1 -1
- package/lib/module/surfaces/CardFade.js +26 -0
- package/lib/module/surfaces/CardFade.js.map +1 -0
- package/lib/module/surfaces/CloseButton.js +10 -6
- package/lib/module/surfaces/CloseButton.js.map +1 -1
- package/lib/module/surfaces/ModalSurface.js +52 -36
- package/lib/module/surfaces/ModalSurface.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +368 -90
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/cardTransition.js +64 -0
- package/lib/module/surfaces/cardTransition.js.map +1 -0
- package/lib/module/surfaces/resolveHighlightChrome.js +102 -0
- package/lib/module/surfaces/resolveHighlightChrome.js.map +1 -0
- package/lib/module/surfaces/resolveModalLayout.js +7 -3
- package/lib/module/surfaces/resolveModalLayout.js.map +1 -1
- package/lib/module/surfaces/resolveTooltipLayout.js +1 -4
- package/lib/module/surfaces/resolveTooltipLayout.js.map +1 -1
- package/lib/module/surfaces/surfaceInteractionConfig.js +27 -0
- package/lib/module/surfaces/surfaceInteractionConfig.js.map +1 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js +119 -0
- package/lib/module/surfaces/surfaceLayoutInsets.js.map +1 -0
- package/lib/module/surfaces/themeChrome.js +3 -1
- package/lib/module/surfaces/themeChrome.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipBubble.js +143 -22
- package/lib/module/surfaces/tooltip/TooltipBubble.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipCutout.js +100 -47
- package/lib/module/surfaces/tooltip/TooltipCutout.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +118 -0
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -0
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js +67 -13
- package/lib/module/surfaces/tooltip/computeTooltipPosition.js.map +1 -1
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js +87 -19
- package/lib/module/surfaces/tooltip/inferTooltipPlacement.js.map +1 -1
- package/lib/module/surfaces/tooltip/placementDiagnostics.js +43 -0
- package/lib/module/surfaces/tooltip/placementDiagnostics.js.map +1 -0
- package/lib/module/surfaces/tooltip/rect.js +11 -0
- package/lib/module/surfaces/tooltip/rect.js.map +1 -1
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js +96 -0
- package/lib/module/surfaces/tooltip/resolveSideCardWidth.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/commonjs/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/commonjs/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/commonjs/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/commonjs/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/commonjs/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/commonjs/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/commonjs/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/commonjs/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/commonjs/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/commonjs/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/commonjs/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/commonjs/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/commonjs/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/commonjs/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/commonjs/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/commonjs/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deviceContext.d.ts +66 -0
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/commonjs/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +53 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +6 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/commonjs/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/commonjs/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/commonjs/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/commonjs/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/commonjs/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/commonjs/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/commonjs/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/commonjs/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/commonjs/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/commonjs/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/commonjs/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/commonjs/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/commonjs/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/screenTracker.d.ts +21 -3
- package/lib/typescript/commonjs/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/commonjs/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/commonjs/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/commonjs/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/commonjs/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/commonjs/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/commonjs/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/commonjs/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +26 -0
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts +2 -0
- package/lib/typescript/module/src/anchors/anchorChangeTicker.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts +14 -10
- package/lib/typescript/module/src/anchors/elementConditionEvaluator.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts +1 -20
- package/lib/typescript/module/src/anchors/fiber/FiberScanRoot.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +21 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts +42 -1
- package/lib/typescript/module/src/anchors/fiber/fiberInternals.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts +42 -0
- package/lib/typescript/module/src/anchors/fiber/indexHostFibers.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts +17 -0
- package/lib/typescript/module/src/anchors/fiber/readHostContent.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts +20 -0
- package/lib/typescript/module/src/anchors/fiberAnchorCache.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts +5 -5
- package/lib/typescript/module/src/anchors/resolveAnchorHost.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts +38 -0
- package/lib/typescript/module/src/anchors/resolveAutoAnchorHost.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts +48 -0
- package/lib/typescript/module/src/anchors/semanticMatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +7 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts +11 -0
- package/lib/typescript/module/src/authoring/capturePickerScreenshot.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts +32 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBarTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeBottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts +20 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeButton.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts +14 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeDialog.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts +13 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeIcon.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts +17 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTooltip.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts +25 -0
- package/lib/typescript/module/src/authoring/chrome/ChromeTopBar.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts +12 -0
- package/lib/typescript/module/src/authoring/chrome/DoubleTapBridge.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts +26 -0
- package/lib/typescript/module/src/authoring/chrome/doubleTapMonitor.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts +141 -0
- package/lib/typescript/module/src/authoring/chrome/tokens.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts +14 -0
- package/lib/typescript/module/src/authoring/doubleTap.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts +59 -0
- package/lib/typescript/module/src/authoring/elementPickerController.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts +26 -0
- package/lib/typescript/module/src/authoring/fingerprintFromInstance.d.ts.map +1 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts +31 -0
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -0
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts +6 -1
- package/lib/typescript/module/src/content/RichContentRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/content/StepButton.d.ts.map +1 -1
- package/lib/typescript/module/src/content/resolveStepButtonChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/content/themeColor.d.ts +5 -0
- package/lib/typescript/module/src/content/themeColor.d.ts.map +1 -1
- package/lib/typescript/module/src/deviceContext.d.ts +66 -0
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -0
- package/lib/typescript/module/src/expo-router/useUserflowExpoRouter.d.ts.map +1 -1
- package/lib/typescript/module/src/hostAppVersion.d.ts +69 -0
- package/lib/typescript/module/src/hostAppVersion.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +53 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +6 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/WithUserflowReactNavigation.d.ts.map +1 -1
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts +14 -0
- package/lib/typescript/module/src/navigation/isOverlayPresentation.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts +7 -0
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts +6 -1
- package/lib/typescript/module/src/pairing/PreviewModeBanner.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/diagnostics.d.ts +5 -0
- package/lib/typescript/module/src/pairing/diagnostics.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts +11 -0
- package/lib/typescript/module/src/pairing/elementPickerRelay.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts +16 -0
- package/lib/typescript/module/src/pairing/resolvePreviewChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts +2 -0
- package/lib/typescript/module/src/pairing/tokenStorage.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/usePairingState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts +6 -3
- package/lib/typescript/module/src/runtime/FlowRenderer.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts +20 -7
- package/lib/typescript/module/src/runtime/FlowSurfaceFade.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts +5 -1
- package/lib/typescript/module/src/runtime/TargetPressBridge.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts +6 -4
- package/lib/typescript/module/src/runtime/UserflowProvider.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts +10 -0
- package/lib/typescript/module/src/runtime/changedTouchPoints.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/flowEngine.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts +12 -3
- package/lib/typescript/module/src/runtime/flowSessionViewState.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts +1 -0
- package/lib/typescript/module/src/runtime/useFlowSessionState.d.ts.map +1 -1
- package/lib/typescript/module/src/screenTracker.d.ts +21 -3
- package/lib/typescript/module/src/screenTracker.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/CardFade.d.ts +12 -0
- package/lib/typescript/module/src/surfaces/CardFade.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts +8 -2
- package/lib/typescript/module/src/surfaces/CloseButton.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/MadeWithUserflow.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/ModalSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts +12 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts +31 -0
- package/lib/typescript/module/src/surfaces/cardTransition.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts +44 -0
- package/lib/typescript/module/src/surfaces/resolveHighlightChrome.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts +1 -1
- package/lib/typescript/module/src/surfaces/resolveModalLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts +0 -7
- package/lib/typescript/module/src/surfaces/resolveTooltipLayout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts +15 -0
- package/lib/typescript/module/src/surfaces/surfaceInteractionConfig.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts +38 -0
- package/lib/typescript/module/src/surfaces/surfaceLayoutInsets.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts +3 -1
- package/lib/typescript/module/src/surfaces/themeChrome.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts +21 -6
- package/lib/typescript/module/src/surfaces/tooltip/TooltipBubble.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts +18 -10
- package/lib/typescript/module/src/surfaces/tooltip/TooltipCutout.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts +25 -0
- package/lib/typescript/module/src/surfaces/tooltip/TooltipHighlight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts +23 -0
- package/lib/typescript/module/src/surfaces/tooltip/computeTooltipPosition.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts +47 -1
- package/lib/typescript/module/src/surfaces/tooltip/inferTooltipPlacement.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts +39 -0
- package/lib/typescript/module/src/surfaces/tooltip/placementDiagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts +2 -0
- package/lib/typescript/module/src/surfaces/tooltip/rect.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts +76 -0
- package/lib/typescript/module/src/surfaces/tooltip/resolveSideCardWidth.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +22 -16
- package/src/anchors/AutoAnchorRegistry.ts +139 -2
- package/src/anchors/anchorChangeTicker.ts +10 -0
- package/src/anchors/elementConditionEvaluator.ts +29 -16
- package/src/anchors/fiber/FiberScanRoot.tsx +2 -50
- package/src/anchors/fiber/FiberScanRootStore.ts +51 -0
- package/src/anchors/fiber/fiberInternals.ts +166 -3
- package/src/anchors/fiber/indexHostFibers.ts +136 -0
- package/src/anchors/fiber/readHostContent.ts +146 -0
- package/src/anchors/fiberAnchorCache.ts +45 -0
- package/src/anchors/resolveAnchorHost.ts +23 -23
- package/src/anchors/resolveAutoAnchorHost.ts +180 -0
- package/src/anchors/semanticMatcher.ts +361 -0
- package/src/authoring/ElementPickerOverlay.tsx +553 -0
- package/src/authoring/capturePickerScreenshot.ts +90 -0
- package/src/authoring/chrome/ChromeBarTransition.tsx +106 -0
- package/src/authoring/chrome/ChromeBottomSheet.tsx +69 -0
- package/src/authoring/chrome/ChromeButton.tsx +103 -0
- package/src/authoring/chrome/ChromeDialog.tsx +121 -0
- package/src/authoring/chrome/ChromeIcon.tsx +40 -0
- package/src/authoring/chrome/ChromeTooltip.tsx +89 -0
- package/src/authoring/chrome/ChromeTopBar.tsx +126 -0
- package/src/authoring/chrome/DoubleTapBridge.tsx +60 -0
- package/src/authoring/chrome/doubleTapMonitor.ts +80 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-left-from-bracket@3x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@2x.png +0 -0
- package/src/authoring/chrome/icons/arrow-rotate-left@3x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@2x.png +0 -0
- package/src/authoring/chrome/icons/userflow-logomark@3x.png +0 -0
- package/src/authoring/chrome/icons/xmark.png +0 -0
- package/src/authoring/chrome/icons/xmark@2x.png +0 -0
- package/src/authoring/chrome/icons/xmark@3x.png +0 -0
- package/src/authoring/chrome/tokens.ts +106 -0
- package/src/authoring/doubleTap.ts +27 -0
- package/src/authoring/elementPickerController.ts +135 -0
- package/src/authoring/fingerprintFromInstance.ts +152 -0
- package/src/authoring/hitTest.ts +133 -0
- package/src/content/RichContentRenderer.tsx +22 -1
- package/src/content/StepButton.tsx +17 -2
- package/src/content/resolveStepButtonChrome.ts +12 -6
- package/src/content/themeColor.ts +10 -0
- package/src/deviceContext.ts +168 -0
- package/src/expo-router/useUserflowExpoRouter.ts +47 -4
- package/src/hostAppVersion.ts +258 -0
- package/src/index.ts +148 -4
- package/src/lifecycle.ts +8 -0
- package/src/navigation/WithUserflowReactNavigation.tsx +23 -7
- package/src/navigation/isOverlayPresentation.ts +76 -0
- package/src/pairing/PairingController.ts +32 -3
- package/src/pairing/PreviewModeBanner.tsx +250 -94
- package/src/pairing/diagnostics.ts +8 -0
- package/src/pairing/elementPickerRelay.ts +100 -0
- package/src/pairing/resolvePreviewChrome.ts +57 -0
- package/src/pairing/tokenStorage.ts +31 -2
- package/src/pairing/usePairingState.ts +2 -0
- package/src/runtime/FlowRenderer.tsx +55 -27
- package/src/runtime/FlowSurfaceFade.tsx +51 -30
- package/src/runtime/TargetPressBridge.tsx +14 -32
- package/src/runtime/UserflowProvider.tsx +76 -13
- package/src/runtime/changedTouchPoints.ts +34 -0
- package/src/runtime/flowEngine.ts +2 -0
- package/src/runtime/flowSessionViewState.ts +42 -4
- package/src/runtime/useFlowSessionState.ts +2 -0
- package/src/screenTracker.ts +46 -4
- package/src/surfaces/CardFade.tsx +18 -0
- package/src/surfaces/CloseButton.tsx +17 -7
- package/src/surfaces/MadeWithUserflow.tsx +1 -1
- package/src/surfaces/ModalSurface.tsx +48 -35
- package/src/surfaces/TooltipSurface.tsx +406 -86
- package/src/surfaces/cardTransition.ts +67 -0
- package/src/surfaces/resolveHighlightChrome.ts +139 -0
- package/src/surfaces/resolveModalLayout.ts +16 -8
- package/src/surfaces/resolveTooltipLayout.ts +1 -14
- package/src/surfaces/surfaceInteractionConfig.ts +25 -0
- package/src/surfaces/surfaceLayoutInsets.tsx +135 -0
- package/src/surfaces/themeChrome.ts +5 -3
- package/src/surfaces/tooltip/TooltipBubble.tsx +154 -19
- package/src/surfaces/tooltip/TooltipCutout.tsx +106 -49
- package/src/surfaces/tooltip/TooltipHighlight.tsx +144 -0
- package/src/surfaces/tooltip/computeTooltipPosition.ts +98 -12
- package/src/surfaces/tooltip/inferTooltipPlacement.ts +107 -18
- package/src/surfaces/tooltip/placementDiagnostics.ts +70 -0
- package/src/surfaces/tooltip/rect.ts +11 -0
- package/src/surfaces/tooltip/resolveSideCardWidth.ts +121 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/attributes.d.ts +1 -2
- package/vendor/core/dist/attributes.d.ts.map +1 -1
- package/vendor/core/dist/attributes.js.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +69 -1
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/FlowSessionEngine.js +268 -7
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts +44 -1
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -1
- package/vendor/core/dist/engine/PairingEngine.js +103 -9
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +23 -4
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +64 -1
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/engine/conditionOperators.d.ts +16 -0
- package/vendor/core/dist/engine/conditionOperators.d.ts.map +1 -0
- package/vendor/core/dist/engine/conditionOperators.js +168 -0
- package/vendor/core/dist/engine/conditionOperators.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +27 -4
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -1
- package/vendor/core/dist/engine/handleActions.js +140 -13
- package/vendor/core/dist/engine/handleActions.js.map +1 -1
- package/vendor/core/dist/engine/simpleObservable.d.ts +13 -0
- package/vendor/core/dist/engine/simpleObservable.d.ts.map +1 -0
- package/vendor/core/dist/engine/simpleObservable.js +29 -0
- package/vendor/core/dist/engine/simpleObservable.js.map +1 -0
- package/vendor/core/dist/engine/trackCondition.d.ts +25 -0
- package/vendor/core/dist/engine/trackCondition.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackCondition.js +177 -0
- package/vendor/core/dist/engine/trackCondition.js.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts +21 -0
- package/vendor/core/dist/engine/trackStepTriggers.d.ts.map +1 -0
- package/vendor/core/dist/engine/trackStepTriggers.js +49 -0
- package/vendor/core/dist/engine/trackStepTriggers.js.map +1 -0
- package/vendor/core/dist/index.d.ts +4 -3
- package/vendor/core/dist/index.d.ts.map +1 -1
- package/vendor/core/dist/index.js +2 -1
- package/vendor/core/dist/index.js.map +1 -1
- package/vendor/core/dist/normalizeAttributes.d.ts +8 -0
- package/vendor/core/dist/normalizeAttributes.d.ts.map +1 -0
- package/vendor/core/dist/normalizeAttributes.js +127 -0
- package/vendor/core/dist/normalizeAttributes.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +11 -6
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +59 -5
- package/vendor/core/dist/transport/phoenix.js.map +1 -1
- package/vendor/core/dist/types.d.ts +26 -1
- package/vendor/core/dist/types.d.ts.map +1 -1
- package/vendor/core/dist/version.d.ts +1 -1
- package/vendor/core/dist/version.js +1 -1
- package/vendor/core/package.json +1 -1
- package/vendor/protocol/dist/attributes.d.ts +43 -0
- package/vendor/protocol/dist/attributes.d.ts.map +1 -0
- package/vendor/protocol/dist/attributes.js +15 -0
- package/vendor/protocol/dist/attributes.js.map +1 -0
- package/vendor/protocol/dist/autoData.d.ts +2 -2
- package/vendor/protocol/dist/autoData.js +2 -2
- package/vendor/protocol/dist/events.d.ts +8 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.d.ts +66 -4
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/dist/flows.js +50 -3
- package/vendor/protocol/dist/flows.js.map +1 -1
- package/vendor/protocol/dist/index.d.ts +1 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -1
- package/vendor/protocol/dist/index.js +1 -0
- package/vendor/protocol/dist/index.js.map +1 -1
- package/vendor/protocol/dist/messages.d.ts +25 -4
- package/vendor/protocol/dist/messages.d.ts.map +1 -1
- package/vendor/protocol/dist/messages.js +4 -0
- package/vendor/protocol/dist/messages.js.map +1 -1
- package/vendor/protocol/dist/pairing.d.ts +26 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -1
- package/vendor/protocol/dist/pairing.js.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { autoAnchorRegistry, type AutoAnchorInstance } from '../anchors/AutoAnchorRegistry';
|
|
2
|
+
import { fiberFromPublicInstance } from '../anchors/fiber/fiberInternals';
|
|
3
|
+
import { measureHostFiber } from '../anchors/fiber/measureHostFiber';
|
|
4
|
+
import { isFiberOnVisibleScreen } from '../anchors/fiber/visibleScreens';
|
|
5
|
+
import { pointInRect } from '../anchors/targetPressMonitor';
|
|
6
|
+
|
|
7
|
+
export interface HitRect {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface HitCandidate {
|
|
15
|
+
instance: AutoAnchorInstance;
|
|
16
|
+
rect: HitRect;
|
|
17
|
+
area: number;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type MeasureInstance = (inst: AutoAnchorInstance) => Promise<HitRect | null>;
|
|
21
|
+
export type InstanceFilter = (inst: AutoAnchorInstance) => boolean;
|
|
22
|
+
|
|
23
|
+
const MEASURE_TIMEOUT_MS = 400;
|
|
24
|
+
|
|
25
|
+
type MeasureInWindowCallback = (x: number, y: number, width: number, height: number) => void;
|
|
26
|
+
|
|
27
|
+
interface MeasurableNode {
|
|
28
|
+
measureInWindow: (callback: MeasureInWindowCallback) => void;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isMeasurableNode(value: unknown): value is MeasurableNode {
|
|
32
|
+
return (
|
|
33
|
+
typeof value === 'object' &&
|
|
34
|
+
value !== null &&
|
|
35
|
+
typeof (value as { measureInWindow?: unknown }).measureInWindow === 'function'
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function areaOf(rect: HitRect): number {
|
|
40
|
+
return rect.width * rect.height;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function isInstanceOnVisibleScreen(inst: AutoAnchorInstance): boolean {
|
|
44
|
+
const fiber = fiberFromPublicInstance(inst.ref.current);
|
|
45
|
+
if (!fiber) return true;
|
|
46
|
+
return isFiberOnVisibleScreen(fiber);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function measureWithTimeout(
|
|
50
|
+
run: (callback: MeasureInWindowCallback) => void,
|
|
51
|
+
): Promise<HitRect | null> {
|
|
52
|
+
return new Promise((resolve) => {
|
|
53
|
+
let settled = false;
|
|
54
|
+
const timer = setTimeout(() => {
|
|
55
|
+
if (settled) return;
|
|
56
|
+
settled = true;
|
|
57
|
+
resolve(null);
|
|
58
|
+
}, MEASURE_TIMEOUT_MS);
|
|
59
|
+
try {
|
|
60
|
+
run((x, y, width, height) => {
|
|
61
|
+
if (settled) return;
|
|
62
|
+
settled = true;
|
|
63
|
+
clearTimeout(timer);
|
|
64
|
+
if (width <= 0 || height <= 0) {
|
|
65
|
+
resolve(null);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
resolve({ x, y, width, height });
|
|
69
|
+
});
|
|
70
|
+
} catch {
|
|
71
|
+
if (settled) return;
|
|
72
|
+
settled = true;
|
|
73
|
+
clearTimeout(timer);
|
|
74
|
+
resolve(null);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Measure a live auto-anchor instance in window coordinates. Prefers the
|
|
81
|
+
* public instance's `measureInWindow`, then the fiber host path.
|
|
82
|
+
*/
|
|
83
|
+
export function measureInstanceRect(inst: AutoAnchorInstance): Promise<HitRect | null> {
|
|
84
|
+
const node = inst.ref.current;
|
|
85
|
+
if (isMeasurableNode(node)) {
|
|
86
|
+
return measureWithTimeout((callback) => {
|
|
87
|
+
node.measureInWindow(callback);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const fiber = fiberFromPublicInstance(node);
|
|
91
|
+
if (fiber) {
|
|
92
|
+
return measureWithTimeout((callback) => {
|
|
93
|
+
measureHostFiber(fiber, callback);
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
return Promise.resolve(null);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Hit-test window coordinates against visible auto-anchor instances.
|
|
101
|
+
* Returns containing candidates sorted by area ascending (smallest / deepest first).
|
|
102
|
+
*/
|
|
103
|
+
export async function hitTestAt(
|
|
104
|
+
x: number,
|
|
105
|
+
y: number,
|
|
106
|
+
opts?: {
|
|
107
|
+
instanceFilter?: InstanceFilter;
|
|
108
|
+
measure?: MeasureInstance;
|
|
109
|
+
instances?: AutoAnchorInstance[];
|
|
110
|
+
},
|
|
111
|
+
): Promise<HitCandidate[]> {
|
|
112
|
+
const filter = opts?.instanceFilter ?? isInstanceOnVisibleScreen;
|
|
113
|
+
const measure = opts?.measure ?? measureInstanceRect;
|
|
114
|
+
const pool = (opts?.instances ?? autoAnchorRegistry.allInstances()).filter(filter);
|
|
115
|
+
autoAnchorRegistry.refreshLiveContent(pool);
|
|
116
|
+
|
|
117
|
+
const measured = await Promise.all(
|
|
118
|
+
pool.map(async (instance) => {
|
|
119
|
+
const rect = await measure(instance);
|
|
120
|
+
if (!rect) return null;
|
|
121
|
+
if (!pointInRect(x, y, rect)) return null;
|
|
122
|
+
return { instance, rect, area: areaOf(rect) };
|
|
123
|
+
}),
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
return measured.filter((c): c is HitCandidate => c != null).sort((a, b) => a.area - b.area);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** Cycle to the next-larger containing candidate (wraps). */
|
|
130
|
+
export function nextContainingIndex(candidates: HitCandidate[], currentIndex: number): number {
|
|
131
|
+
if (candidates.length === 0) return -1;
|
|
132
|
+
return (currentIndex + 1) % candidates.length;
|
|
133
|
+
}
|
|
@@ -68,6 +68,10 @@ export interface RichContentRendererProps {
|
|
|
68
68
|
* Web: modal → center, tooltip/bubble → end.
|
|
69
69
|
*/
|
|
70
70
|
defaultButtonsAlign?: JustifyContent;
|
|
71
|
+
/** Override H1 weight (modal uses `normal`; tooltip keeps the default bold). */
|
|
72
|
+
heading1FontWeight?: TextStyle['fontWeight'];
|
|
73
|
+
/** Extra H1 styles (callers that need per-heading layout). */
|
|
74
|
+
heading1Style?: TextStyle;
|
|
71
75
|
}
|
|
72
76
|
|
|
73
77
|
export function RichContentRenderer({
|
|
@@ -78,6 +82,8 @@ export function RichContentRenderer({
|
|
|
78
82
|
lookupAttribute,
|
|
79
83
|
onActions,
|
|
80
84
|
defaultButtonsAlign,
|
|
85
|
+
heading1FontWeight,
|
|
86
|
+
heading1Style,
|
|
81
87
|
}: RichContentRendererProps): React.ReactElement {
|
|
82
88
|
const doc = React.useMemo(() => {
|
|
83
89
|
const raw =
|
|
@@ -95,6 +101,8 @@ export function RichContentRenderer({
|
|
|
95
101
|
lookupAttribute={lookupAttribute}
|
|
96
102
|
onActions={onActions}
|
|
97
103
|
{...(defaultButtonsAlign !== undefined ? { defaultButtonsAlign } : {})}
|
|
104
|
+
{...(heading1FontWeight !== undefined ? { heading1FontWeight } : {})}
|
|
105
|
+
{...(heading1Style !== undefined ? { heading1Style } : {})}
|
|
98
106
|
/>
|
|
99
107
|
</View>
|
|
100
108
|
);
|
|
@@ -107,6 +115,8 @@ interface RenderContext {
|
|
|
107
115
|
lookupAttribute: LookupAttribute;
|
|
108
116
|
onActions: (actions: FlowActionFragment[]) => void;
|
|
109
117
|
defaultButtonsAlign?: JustifyContent;
|
|
118
|
+
heading1FontWeight?: TextStyle['fontWeight'];
|
|
119
|
+
heading1Style?: TextStyle;
|
|
110
120
|
}
|
|
111
121
|
|
|
112
122
|
function RenderedNodeList({
|
|
@@ -155,7 +165,18 @@ function RenderedElement({
|
|
|
155
165
|
case 'paragraph':
|
|
156
166
|
return <TextBlock node={node} style={styles.paragraph} {...ctx} />;
|
|
157
167
|
case 'heading1':
|
|
158
|
-
return
|
|
168
|
+
return (
|
|
169
|
+
<TextBlock
|
|
170
|
+
node={node}
|
|
171
|
+
style={StyleSheet.flatten([
|
|
172
|
+
styles.heading1,
|
|
173
|
+
ctx.heading1Style,
|
|
174
|
+
ctx.heading1FontWeight ? { fontWeight: ctx.heading1FontWeight } : null,
|
|
175
|
+
])}
|
|
176
|
+
accessibilityRole="header"
|
|
177
|
+
{...ctx}
|
|
178
|
+
/>
|
|
179
|
+
);
|
|
159
180
|
case 'heading2':
|
|
160
181
|
return <TextBlock node={node} style={styles.heading2} accessibilityRole="header" {...ctx} />;
|
|
161
182
|
case 'quote':
|
|
@@ -47,9 +47,8 @@ export function StepButton({
|
|
|
47
47
|
color: chrome.fontColor,
|
|
48
48
|
fontFamily: theme.fontFamily || undefined,
|
|
49
49
|
fontSize: chrome.fontSize,
|
|
50
|
-
lineHeight: chrome.lineHeight,
|
|
51
50
|
fontWeight: chrome.fontWeight,
|
|
52
|
-
...(
|
|
51
|
+
...labelMetrics(chrome.lineHeight),
|
|
53
52
|
} satisfies TextStyle,
|
|
54
53
|
]}
|
|
55
54
|
>
|
|
@@ -59,6 +58,22 @@ export function StepButton({
|
|
|
59
58
|
);
|
|
60
59
|
}
|
|
61
60
|
|
|
61
|
+
/**
|
|
62
|
+
* iOS/SF can sit in the theme line box. Android/Roboto descenders (g, y, p)
|
|
63
|
+
* are taller; `includeFontPadding: false` plus that same `lineHeight` clips
|
|
64
|
+
* them. Skip lineHeight on Android and let font metrics size the label — the
|
|
65
|
+
* pressable already centers via `justifyContent`.
|
|
66
|
+
*/
|
|
67
|
+
function labelMetrics(lineHeight: number): TextStyle {
|
|
68
|
+
if (Platform.OS === 'android') {
|
|
69
|
+
return {
|
|
70
|
+
includeFontPadding: false,
|
|
71
|
+
textAlignVertical: 'center',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return { lineHeight };
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
const styles = StyleSheet.create({
|
|
63
78
|
button: {
|
|
64
79
|
alignItems: 'center',
|
|
@@ -81,15 +81,21 @@ export function resolveStepButtonChrome(
|
|
|
81
81
|
borderWidth = Math.max(0, readNumber(theme, 'primaryButtonBorderWidth', 0));
|
|
82
82
|
fontWeight = readNumber(theme, 'primaryButtonFontWeight', fontWeightBold);
|
|
83
83
|
} else {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
// Mobile secondary is a neutral outline (white + gray border + body text),
|
|
85
|
+
// not the web brand-colored ghost (`defaultButtonFontColor` = widget blue).
|
|
86
|
+
backgroundColor = firstString(
|
|
87
|
+
theme,
|
|
88
|
+
['defaultButtonBackgroundColor', 'mainBackgroundColor', 'backgroundColor'],
|
|
89
|
+
mainBackground,
|
|
90
|
+
);
|
|
91
|
+
fontColor = readString(theme, 'fontColor', '#111827');
|
|
92
|
+
borderColor = '#d1d5db';
|
|
93
|
+
borderWidth = 1;
|
|
94
|
+
fontWeight = readNumber(theme, 'defaultButtonFontWeight', 500);
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
const paddingVertical = Math.max(0, (buttonHeight - lineHeight) / 2 - borderWidth);
|
|
92
|
-
const paddingHorizontal = fontSize;
|
|
98
|
+
const paddingHorizontal = isPrimary ? fontSize : Math.max(fontSize, 20);
|
|
93
99
|
|
|
94
100
|
return {
|
|
95
101
|
backgroundColor,
|
|
@@ -88,6 +88,16 @@ export function foregroundAlpha(color: string | null | undefined, alpha: number)
|
|
|
88
88
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})`;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Web's default `backdropHighlightColor` is `#ffffff`. An opaque white stroke
|
|
93
|
+
* on a dimmed backdrop reads as a thick frame, not the mobile focus ring.
|
|
94
|
+
*/
|
|
95
|
+
export function isNearWhite(color: string | null | undefined): boolean {
|
|
96
|
+
const rgb = parseThemeRgb(color);
|
|
97
|
+
if (!rgb) return false;
|
|
98
|
+
return rgb.r >= 245 && rgb.g >= 245 && rgb.b >= 245;
|
|
99
|
+
}
|
|
100
|
+
|
|
91
101
|
/**
|
|
92
102
|
* Extra margin below quote/code so that with {@link ROOT_CONTENT_GAP} the
|
|
93
103
|
* visual spacing matches web `margin-bottom: $padding-16`.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve mobile platform metadata for Userflow user attributes.
|
|
3
|
+
*
|
|
4
|
+
* Cached once during {@link Userflow.init} and merged into identify attributes
|
|
5
|
+
* (same lifecycle as {@link hostAppVersion.ts}).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type SdkPlatform = 'react_native';
|
|
9
|
+
export type DeviceOs = 'ios' | 'android';
|
|
10
|
+
export type DeviceType = 'phone' | 'tablet';
|
|
11
|
+
|
|
12
|
+
export interface DeviceContext {
|
|
13
|
+
sdk: SdkPlatform;
|
|
14
|
+
deviceOs?: DeviceOs;
|
|
15
|
+
deviceType?: DeviceType;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Android `smallestScreenWidthDp` tablet threshold (sw600dp). */
|
|
19
|
+
export const ANDROID_TABLET_SMALLEST_WIDTH_DP = 600;
|
|
20
|
+
|
|
21
|
+
export const SDK_USER_ATTRIBUTE = 'sdk';
|
|
22
|
+
export const DEVICE_OS_USER_ATTRIBUTE = 'device_os';
|
|
23
|
+
export const DEVICE_TYPE_USER_ATTRIBUTE = 'device_type';
|
|
24
|
+
|
|
25
|
+
interface PlatformShape {
|
|
26
|
+
OS?: string;
|
|
27
|
+
isPad?: boolean;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface ScreenShape {
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Visible for tests: map `Platform.OS` to a supported device OS value. */
|
|
36
|
+
export function resolveDeviceOs(platformOs: string | undefined): DeviceOs | undefined {
|
|
37
|
+
if (platformOs === 'ios') return 'ios';
|
|
38
|
+
if (platformOs === 'android') return 'android';
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Visible for tests: smallest screen width. `Dimensions` values are already dp. */
|
|
43
|
+
export function smallestScreenWidthDp(screen: ScreenShape): number {
|
|
44
|
+
return Math.min(screen.width, screen.height);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Visible for tests: classify phone vs tablet for the current platform. */
|
|
48
|
+
export function resolveDeviceTypeFromSources(sources: {
|
|
49
|
+
platform?: PlatformShape;
|
|
50
|
+
screen?: ScreenShape;
|
|
51
|
+
}): DeviceType | undefined {
|
|
52
|
+
const os = sources.platform?.OS;
|
|
53
|
+
if (os === 'ios') {
|
|
54
|
+
return sources.platform?.isPad ? 'tablet' : 'phone';
|
|
55
|
+
}
|
|
56
|
+
if (os === 'android') {
|
|
57
|
+
const screen = sources.screen;
|
|
58
|
+
if (!screen) return undefined;
|
|
59
|
+
return smallestScreenWidthDp(screen) >= ANDROID_TABLET_SMALLEST_WIDTH_DP ? 'tablet' : 'phone';
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Visible for tests: build the cached device context from RN platform APIs. */
|
|
65
|
+
export function resolveDeviceContextFromSources(sources: {
|
|
66
|
+
platform?: PlatformShape;
|
|
67
|
+
screen?: ScreenShape;
|
|
68
|
+
}): DeviceContext {
|
|
69
|
+
const deviceOs = resolveDeviceOs(sources.platform?.OS);
|
|
70
|
+
const deviceType = resolveDeviceTypeFromSources(sources);
|
|
71
|
+
return {
|
|
72
|
+
sdk: 'react_native',
|
|
73
|
+
...(deviceOs ? { deviceOs } : {}),
|
|
74
|
+
...(deviceType ? { deviceType } : {}),
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function loadReactNativePlatformApis(): {
|
|
79
|
+
platform?: PlatformShape;
|
|
80
|
+
screen?: ScreenShape;
|
|
81
|
+
} {
|
|
82
|
+
try {
|
|
83
|
+
// Lazy require so Node unit tests can inject sources without loading RN.
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
85
|
+
const rn = require('react-native') as {
|
|
86
|
+
Platform?: PlatformShape;
|
|
87
|
+
Dimensions?: { get: (kind: 'screen' | 'window') => ScreenShape };
|
|
88
|
+
};
|
|
89
|
+
const platform = rn.Platform;
|
|
90
|
+
const screen = rn.Dimensions?.get('screen');
|
|
91
|
+
return {
|
|
92
|
+
...(platform ? { platform } : {}),
|
|
93
|
+
...(screen ? { screen } : {}),
|
|
94
|
+
};
|
|
95
|
+
} catch {
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function resolveDeviceContext(): DeviceContext {
|
|
101
|
+
return resolveDeviceContextFromSources(loadReactNativePlatformApis());
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** `undefined` until the first {@link cacheDeviceContextAtInit}; then resolved. */
|
|
105
|
+
let cachedDeviceContext: DeviceContext | undefined;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Resolve and cache device metadata during {@link Userflow.init}.
|
|
109
|
+
* Re-running init replaces the cache.
|
|
110
|
+
*/
|
|
111
|
+
export function cacheDeviceContextAtInit(): DeviceContext {
|
|
112
|
+
cachedDeviceContext = resolveDeviceContext();
|
|
113
|
+
return cachedDeviceContext;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Returns the context cached at init, or `null` before init. */
|
|
117
|
+
export function getCachedDeviceContext(): DeviceContext | null {
|
|
118
|
+
return cachedDeviceContext ?? null;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Returns cached device fields for UpsertUser, or `{}` before init. */
|
|
122
|
+
export function deviceContextUserAttributes(): Record<string, string> {
|
|
123
|
+
const cached = getCachedDeviceContext();
|
|
124
|
+
if (!cached) return {};
|
|
125
|
+
return {
|
|
126
|
+
[SDK_USER_ATTRIBUTE]: cached.sdk,
|
|
127
|
+
...(cached.deviceOs ? { [DEVICE_OS_USER_ATTRIBUTE]: cached.deviceOs } : {}),
|
|
128
|
+
...(cached.deviceType ? { [DEVICE_TYPE_USER_ATTRIBUTE]: cached.deviceType } : {}),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Optional user-attribute keys added by {@link mergeDeviceContextUserAttributes}. */
|
|
133
|
+
export type DeviceContextUserAttributeMap = Partial<{
|
|
134
|
+
[SDK_USER_ATTRIBUTE]: SdkPlatform;
|
|
135
|
+
[DEVICE_OS_USER_ATTRIBUTE]: DeviceOs;
|
|
136
|
+
[DEVICE_TYPE_USER_ATTRIBUTE]: DeviceType;
|
|
137
|
+
}>;
|
|
138
|
+
|
|
139
|
+
/** Merges cached device attrs into identify attributes; caller values win on key conflicts. */
|
|
140
|
+
export function mergeDeviceContextUserAttributes<T extends Record<string, unknown>>(
|
|
141
|
+
attributes?: T,
|
|
142
|
+
): (T & DeviceContextUserAttributeMap) | undefined {
|
|
143
|
+
const system = deviceContextUserAttributes();
|
|
144
|
+
if (Object.keys(system).length === 0) {
|
|
145
|
+
return attributes as (T & DeviceContextUserAttributeMap) | undefined;
|
|
146
|
+
}
|
|
147
|
+
return { ...system, ...(attributes ?? {}) } as T & DeviceContextUserAttributeMap;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function formatDeviceContextLog(resolved: DeviceContext | null): string {
|
|
151
|
+
if (!resolved) {
|
|
152
|
+
return '[Userflow] device context is unavailable — call Userflow.init() first.';
|
|
153
|
+
}
|
|
154
|
+
const os = resolved.deviceOs ?? 'unknown';
|
|
155
|
+
const type = resolved.deviceType ?? 'unknown';
|
|
156
|
+
return `[Userflow] device context sdk=${resolved.sdk} device_os=${os} device_type=${type}`;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** Log cached user-attribute values. Requires {@link cacheDeviceContextAtInit}. */
|
|
160
|
+
export function logDeviceContext(): void {
|
|
161
|
+
// eslint-disable-next-line no-console -- public logDeviceContext()
|
|
162
|
+
console.log(formatDeviceContextLog(getCachedDeviceContext()));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** @internal Resets init cache between tests. */
|
|
166
|
+
export function resetCachedDeviceContextForTests(): void {
|
|
167
|
+
cachedDeviceContext = undefined;
|
|
168
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { usePathname, useRouter } from 'expo-router';
|
|
2
|
-
import { useEffect } from 'react';
|
|
1
|
+
import { useNavigationContainerRef, usePathname, useRouter } from 'expo-router';
|
|
2
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
|
|
4
|
+
import {
|
|
5
|
+
isOverlayPresentation,
|
|
6
|
+
readNavigationPresentation,
|
|
7
|
+
subscribeNavigationState,
|
|
8
|
+
} from '../navigation/isOverlayPresentation';
|
|
4
9
|
import { setExpoRouterNavigator } from '../navigation/openFlowNavigateUrl';
|
|
5
10
|
import { handleScreenChange } from '../screenTracker';
|
|
6
11
|
|
|
@@ -22,10 +27,48 @@ import { handleScreenChange } from '../screenTracker';
|
|
|
22
27
|
export function useUserflowExpoRouter(): void {
|
|
23
28
|
const pathname = usePathname();
|
|
24
29
|
const router = useRouter();
|
|
30
|
+
// Root container ref — `useNavigation()` is the route prop and has no getCurrentOptions.
|
|
31
|
+
const navigationRef = useNavigationContainerRef();
|
|
32
|
+
const overlayWasFocusedRef = useRef(false);
|
|
33
|
+
const pathnameRef = useRef(pathname);
|
|
34
|
+
pathnameRef.current = pathname;
|
|
35
|
+
const subscribedToStateRef = useRef(false);
|
|
36
|
+
|
|
37
|
+
const reportPath = useCallback(() => {
|
|
38
|
+
if (isOverlayPresentation(readNavigationPresentation(navigationRef))) {
|
|
39
|
+
overlayWasFocusedRef.current = true;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
handleScreenChange(
|
|
43
|
+
pathnameRef.current ? { path: pathnameRef.current } : undefined,
|
|
44
|
+
overlayWasFocusedRef.current ? { force: true } : undefined,
|
|
45
|
+
);
|
|
46
|
+
overlayWasFocusedRef.current = false;
|
|
47
|
+
}, [navigationRef]);
|
|
48
|
+
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
// Pathname is the fallback when the container ref has no `state` listener
|
|
51
|
+
// (tests, or before the root container mounts). Once subscribed, navigation
|
|
52
|
+
// state is the source of truth so overlay options are read on the same tick
|
|
53
|
+
// as the transition — a pathname-only update can still see the previous
|
|
54
|
+
// route's options.
|
|
55
|
+
if (!subscribedToStateRef.current) {
|
|
56
|
+
reportPath();
|
|
57
|
+
}
|
|
58
|
+
}, [pathname, reportPath]);
|
|
25
59
|
|
|
26
60
|
useEffect(() => {
|
|
27
|
-
|
|
28
|
-
|
|
61
|
+
const unsubscribe = subscribeNavigationState(navigationRef, () => {
|
|
62
|
+
queueMicrotask(() => {
|
|
63
|
+
reportPath();
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
subscribedToStateRef.current = typeof unsubscribe === 'function';
|
|
67
|
+
return () => {
|
|
68
|
+
subscribedToStateRef.current = false;
|
|
69
|
+
unsubscribe?.();
|
|
70
|
+
};
|
|
71
|
+
}, [navigationRef, reportPath]);
|
|
29
72
|
|
|
30
73
|
useEffect(() => {
|
|
31
74
|
setExpoRouterNavigator({
|