@userflow-tech/react-native 0.5.0 → 0.7.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 +65 -33
- package/docs/custom-fonts.md +36 -0
- package/docs/troubleshooting.md +45 -44
- package/expo-plugin/hostDependencyWarnings.d.ts +5 -5
- package/expo-plugin/hostDependencyWarnings.js +7 -7
- package/expo-plugin/hostDependencyWarnings.js.map +1 -1
- package/lib/commonjs/anchors/AnchorRegistry.js +5 -0
- package/lib/commonjs/anchors/AnchorRegistry.js.map +1 -1
- package/lib/commonjs/anchors/ScrollContainerRegistry.js +8 -0
- package/lib/commonjs/anchors/ScrollContainerRegistry.js.map +1 -1
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js +8 -0
- package/lib/commonjs/anchors/fiber/FiberScanRootStore.js.map +1 -1
- package/lib/commonjs/anchors/fiber/detectAppFontFamily.js +341 -0
- package/lib/commonjs/anchors/fiber/detectAppFontFamily.js.map +1 -0
- package/lib/commonjs/anchors/fiber/presentedModal.js +215 -0
- package/lib/commonjs/anchors/fiber/presentedModal.js.map +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js +1 -0
- package/lib/commonjs/anchors/fiber/touchTargetFiber.js.map +1 -1
- package/lib/commonjs/anchors/fiber/visibleRect.js +12 -3
- package/lib/commonjs/anchors/fiber/visibleRect.js.map +1 -1
- package/lib/commonjs/anchors/fiber/visibleScreens.js +6 -0
- package/lib/commonjs/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/commonjs/anchors/useUserflowScrollContainer.js.map +1 -1
- package/lib/commonjs/authoring/ElementPickerOverlay.js +197 -138
- package/lib/commonjs/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/commonjs/authoring/hitTest.js +67 -10
- package/lib/commonjs/authoring/hitTest.js.map +1 -1
- package/lib/commonjs/authoring/hostAtPoint.js +45 -21
- package/lib/commonjs/authoring/hostAtPoint.js.map +1 -1
- package/lib/commonjs/content/BannerStepButton.js +2 -1
- package/lib/commonjs/content/BannerStepButton.js.map +1 -1
- package/lib/commonjs/content/RichContentRenderer.js +27 -9
- package/lib/commonjs/content/RichContentRenderer.js.map +1 -1
- package/lib/commonjs/content/StepButton.js +2 -1
- package/lib/commonjs/content/StepButton.js.map +1 -1
- package/lib/commonjs/content/resolveContentFontFamily.js +96 -0
- package/lib/commonjs/content/resolveContentFontFamily.js.map +1 -0
- package/lib/commonjs/deepLinking.js.map +1 -1
- package/lib/commonjs/deviceContext.js +39 -19
- package/lib/commonjs/deviceContext.js.map +1 -1
- package/lib/commonjs/index.js +13 -5
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/installCheck.js +3 -3
- package/lib/commonjs/installCheck.js.map +1 -1
- package/lib/commonjs/lifecycle.js +2 -0
- package/lib/commonjs/lifecycle.js.map +1 -1
- package/lib/commonjs/pairing/PairingController.js.map +1 -1
- package/lib/commonjs/runtime/BannerHost.js +3 -3
- package/lib/commonjs/runtime/BannerHost.js.map +1 -1
- package/lib/commonjs/runtime/UserflowOverlay.js +17 -13
- package/lib/commonjs/runtime/UserflowOverlay.js.map +1 -1
- package/lib/commonjs/runtime/WindowOverlayHost.js +83 -0
- package/lib/commonjs/runtime/WindowOverlayHost.js.map +1 -0
- package/lib/commonjs/runtime/pushBannerLayoutContext.js +11 -8
- package/lib/commonjs/runtime/pushBannerLayoutContext.js.map +1 -1
- package/lib/commonjs/runtime/userflowCore.js +9 -2
- package/lib/commonjs/runtime/userflowCore.js.map +1 -1
- package/lib/commonjs/surfaces/BannerSurface.js +2 -6
- package/lib/commonjs/surfaces/BannerSurface.js.map +1 -1
- package/lib/commonjs/surfaces/ProgressBar.js +2 -1
- package/lib/commonjs/surfaces/ProgressBar.js.map +1 -1
- package/lib/commonjs/surfaces/TooltipSurface.js +114 -51
- package/lib/commonjs/surfaces/TooltipSurface.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js +6 -4
- package/lib/commonjs/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js +3 -33
- package/lib/commonjs/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js +2 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -1
- package/lib/commonjs/surfaces/bannerWebView/bannerWebViewHeight.js +33 -0
- package/lib/commonjs/surfaces/bannerWebView/bannerWebViewHeight.js.map +1 -0
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js +45 -12
- package/lib/commonjs/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js +6 -6
- package/lib/commonjs/surfaces/tooltip/TooltipHighlight.js.map +1 -1
- package/lib/commonjs/surfaces/tooltip/targetOrigin.js +74 -0
- package/lib/commonjs/surfaces/tooltip/targetOrigin.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AnchorRegistry.js +5 -0
- package/lib/module/anchors/AnchorRegistry.js.map +1 -1
- package/lib/module/anchors/ScrollContainerRegistry.js +8 -0
- package/lib/module/anchors/ScrollContainerRegistry.js.map +1 -1
- package/lib/module/anchors/fiber/FiberScanRootStore.js +8 -0
- package/lib/module/anchors/fiber/FiberScanRootStore.js.map +1 -1
- package/lib/module/anchors/fiber/detectAppFontFamily.js +330 -0
- package/lib/module/anchors/fiber/detectAppFontFamily.js.map +1 -0
- package/lib/module/anchors/fiber/presentedModal.js +206 -0
- package/lib/module/anchors/fiber/presentedModal.js.map +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js +1 -0
- package/lib/module/anchors/fiber/touchTargetFiber.js.map +1 -1
- package/lib/module/anchors/fiber/visibleRect.js +12 -3
- package/lib/module/anchors/fiber/visibleRect.js.map +1 -1
- package/lib/module/anchors/fiber/visibleScreens.js +5 -0
- package/lib/module/anchors/fiber/visibleScreens.js.map +1 -1
- package/lib/module/anchors/useUserflowAnchor.js.map +1 -1
- package/lib/module/anchors/useUserflowScrollContainer.js.map +1 -1
- package/lib/module/authoring/ElementPickerOverlay.js +199 -140
- package/lib/module/authoring/ElementPickerOverlay.js.map +1 -1
- package/lib/module/authoring/hitTest.js +67 -11
- package/lib/module/authoring/hitTest.js.map +1 -1
- package/lib/module/authoring/hostAtPoint.js +45 -21
- package/lib/module/authoring/hostAtPoint.js.map +1 -1
- package/lib/module/content/BannerStepButton.js +2 -1
- package/lib/module/content/BannerStepButton.js.map +1 -1
- package/lib/module/content/RichContentRenderer.js +27 -9
- package/lib/module/content/RichContentRenderer.js.map +1 -1
- package/lib/module/content/StepButton.js +2 -1
- package/lib/module/content/StepButton.js.map +1 -1
- package/lib/module/content/resolveContentFontFamily.js +89 -0
- package/lib/module/content/resolveContentFontFamily.js.map +1 -0
- package/lib/module/deepLinking.js.map +1 -1
- package/lib/module/deviceContext.js +38 -17
- package/lib/module/deviceContext.js.map +1 -1
- package/lib/module/index.js +13 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/installCheck.js +3 -3
- package/lib/module/installCheck.js.map +1 -1
- package/lib/module/lifecycle.js +2 -0
- package/lib/module/lifecycle.js.map +1 -1
- package/lib/module/pairing/PairingController.js.map +1 -1
- package/lib/module/runtime/BannerHost.js +3 -3
- package/lib/module/runtime/BannerHost.js.map +1 -1
- package/lib/module/runtime/UserflowOverlay.js +18 -14
- package/lib/module/runtime/UserflowOverlay.js.map +1 -1
- package/lib/module/runtime/WindowOverlayHost.js +76 -0
- package/lib/module/runtime/WindowOverlayHost.js.map +1 -0
- package/lib/module/runtime/pushBannerLayoutContext.js +11 -8
- package/lib/module/runtime/pushBannerLayoutContext.js.map +1 -1
- package/lib/module/runtime/userflowCore.js +9 -2
- package/lib/module/runtime/userflowCore.js.map +1 -1
- package/lib/module/surfaces/BannerSurface.js +2 -6
- package/lib/module/surfaces/BannerSurface.js.map +1 -1
- package/lib/module/surfaces/ProgressBar.js +2 -1
- package/lib/module/surfaces/ProgressBar.js.map +1 -1
- package/lib/module/surfaces/TooltipSurface.js +114 -51
- package/lib/module/surfaces/TooltipSurface.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js +6 -4
- package/lib/module/surfaces/bannerWebView/BannerWebViewBar.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js +3 -31
- package/lib/module/surfaces/bannerWebView/bannerNeedsWebView.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js +2 -1
- package/lib/module/surfaces/bannerWebView/bannerThemeStyles.js.map +1 -1
- package/lib/module/surfaces/bannerWebView/bannerWebViewHeight.js +29 -0
- package/lib/module/surfaces/bannerWebView/bannerWebViewHeight.js.map +1 -0
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js +45 -12
- package/lib/module/surfaces/bannerWebView/buildCustomBannerHtml.js.map +1 -1
- package/lib/module/surfaces/tooltip/TooltipHighlight.js +6 -6
- package/lib/module/surfaces/tooltip/TooltipHighlight.js.map +1 -1
- package/lib/module/surfaces/tooltip/targetOrigin.js +67 -0
- package/lib/module/surfaces/tooltip/targetOrigin.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/commonjs/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts +11 -2
- package/lib/typescript/commonjs/src/anchors/ScrollContainerRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts +5 -0
- package/lib/typescript/commonjs/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/detectAppFontFamily.d.ts +30 -0
- package/lib/typescript/commonjs/src/anchors/fiber/detectAppFontFamily.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/presentedModal.d.ts +45 -0
- package/lib/typescript/commonjs/src/anchors/fiber/presentedModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts +5 -2
- package/lib/typescript/commonjs/src/anchors/fiber/visibleRect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts +2 -0
- package/lib/typescript/commonjs/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts +2 -2
- package/lib/typescript/commonjs/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts +3 -2
- package/lib/typescript/commonjs/src/anchors/useUserflowScrollContainer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts +4 -0
- package/lib/typescript/commonjs/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts +25 -2
- package/lib/typescript/commonjs/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts +6 -1
- package/lib/typescript/commonjs/src/authoring/hostAtPoint.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/content/BannerStepButton.d.ts.map +1 -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/resolveContentFontFamily.d.ts +35 -0
- package/lib/typescript/commonjs/src/content/resolveContentFontFamily.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/deepLinking.d.ts +1 -1
- package/lib/typescript/commonjs/src/deepLinking.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/deviceContext.d.ts +14 -5
- package/lib/typescript/commonjs/src/deviceContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +11 -5
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/installCheck.d.ts +2 -2
- package/lib/typescript/commonjs/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/lifecycle.d.ts +1 -0
- package/lib/typescript/commonjs/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts +1 -1
- package/lib/typescript/commonjs/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/UserflowOverlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/WindowOverlayHost.d.ts +34 -0
- package/lib/typescript/commonjs/src/runtime/WindowOverlayHost.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/pushBannerLayoutContext.d.ts +5 -0
- package/lib/typescript/commonjs/src/runtime/pushBannerLayoutContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/runtime/userflowCore.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts +1 -4
- package/lib/typescript/commonjs/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/ProgressBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +3 -12
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts +13 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/surfaces/tooltip/targetOrigin.d.ts +26 -0
- package/lib/typescript/commonjs/src/surfaces/tooltip/targetOrigin.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts +7 -0
- package/lib/typescript/module/src/anchors/AnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts +11 -2
- package/lib/typescript/module/src/anchors/ScrollContainerRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts +5 -0
- package/lib/typescript/module/src/anchors/fiber/FiberScanRootStore.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/detectAppFontFamily.d.ts +30 -0
- package/lib/typescript/module/src/anchors/fiber/detectAppFontFamily.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/presentedModal.d.ts +45 -0
- package/lib/typescript/module/src/anchors/fiber/presentedModal.d.ts.map +1 -0
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts +5 -2
- package/lib/typescript/module/src/anchors/fiber/visibleRect.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts +2 -0
- package/lib/typescript/module/src/anchors/fiber/visibleScreens.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts +2 -2
- package/lib/typescript/module/src/anchors/useUserflowAnchor.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts +3 -2
- package/lib/typescript/module/src/anchors/useUserflowScrollContainer.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts +4 -0
- package/lib/typescript/module/src/authoring/ElementPickerOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hitTest.d.ts +25 -2
- package/lib/typescript/module/src/authoring/hitTest.d.ts.map +1 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts +6 -1
- package/lib/typescript/module/src/authoring/hostAtPoint.d.ts.map +1 -1
- package/lib/typescript/module/src/content/BannerStepButton.d.ts.map +1 -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/resolveContentFontFamily.d.ts +35 -0
- package/lib/typescript/module/src/content/resolveContentFontFamily.d.ts.map +1 -0
- package/lib/typescript/module/src/deepLinking.d.ts +1 -1
- package/lib/typescript/module/src/deepLinking.d.ts.map +1 -1
- package/lib/typescript/module/src/deviceContext.d.ts +14 -5
- package/lib/typescript/module/src/deviceContext.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +11 -5
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/installCheck.d.ts +2 -2
- package/lib/typescript/module/src/installCheck.d.ts.map +1 -1
- package/lib/typescript/module/src/lifecycle.d.ts +1 -0
- package/lib/typescript/module/src/lifecycle.d.ts.map +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts +1 -1
- package/lib/typescript/module/src/pairing/PairingController.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/UserflowOverlay.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/WindowOverlayHost.d.ts +34 -0
- package/lib/typescript/module/src/runtime/WindowOverlayHost.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/pushBannerLayoutContext.d.ts +5 -0
- package/lib/typescript/module/src/runtime/pushBannerLayoutContext.d.ts.map +1 -1
- package/lib/typescript/module/src/runtime/userflowCore.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts +1 -4
- package/lib/typescript/module/src/surfaces/BannerSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/ProgressBar.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/TooltipSurface.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/BannerWebViewBar.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts +3 -12
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerNeedsWebView.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerThemeStyles.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts +13 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/bannerWebViewHeight.d.ts.map +1 -0
- package/lib/typescript/module/src/surfaces/bannerWebView/buildCustomBannerHtml.d.ts.map +1 -1
- package/lib/typescript/module/src/surfaces/tooltip/targetOrigin.d.ts +26 -0
- package/lib/typescript/module/src/surfaces/tooltip/targetOrigin.d.ts.map +1 -0
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +5 -4
- package/src/anchors/AnchorRegistry.ts +8 -0
- package/src/anchors/ScrollContainerRegistry.ts +15 -3
- package/src/anchors/fiber/FiberScanRootStore.ts +8 -0
- package/src/anchors/fiber/detectAppFontFamily.ts +400 -0
- package/src/anchors/fiber/presentedModal.ts +203 -0
- package/src/anchors/fiber/touchTargetFiber.ts +2 -1
- package/src/anchors/fiber/visibleRect.ts +12 -3
- package/src/anchors/fiber/visibleScreens.ts +5 -0
- package/src/anchors/useUserflowAnchor.ts +4 -5
- package/src/anchors/useUserflowScrollContainer.ts +5 -4
- package/src/authoring/ElementPickerOverlay.tsx +242 -166
- package/src/authoring/hitTest.ts +88 -13
- package/src/authoring/hostAtPoint.ts +67 -21
- package/src/content/BannerStepButton.tsx +2 -1
- package/src/content/RichContentRenderer.tsx +16 -9
- package/src/content/StepButton.tsx +2 -1
- package/src/content/resolveContentFontFamily.ts +119 -0
- package/src/deepLinking.ts +2 -1
- package/src/deviceContext.ts +50 -14
- package/src/index.ts +13 -5
- package/src/installCheck.ts +3 -3
- package/src/lifecycle.ts +2 -1
- package/src/pairing/PairingController.ts +2 -1
- package/src/runtime/BannerHost.tsx +3 -3
- package/src/runtime/UserflowOverlay.tsx +29 -21
- package/src/runtime/WindowOverlayHost.tsx +95 -0
- package/src/runtime/pushBannerLayoutContext.tsx +14 -9
- package/src/runtime/userflowCore.ts +8 -2
- package/src/surfaces/BannerSurface.tsx +2 -6
- package/src/surfaces/ProgressBar.tsx +2 -1
- package/src/surfaces/TooltipSurface.tsx +118 -47
- package/src/surfaces/bannerWebView/BannerWebViewBar.tsx +6 -4
- package/src/surfaces/bannerWebView/bannerNeedsWebView.ts +4 -36
- package/src/surfaces/bannerWebView/bannerThemeStyles.ts +2 -1
- package/src/surfaces/bannerWebView/bannerWebViewHeight.ts +32 -0
- package/src/surfaces/bannerWebView/buildCustomBannerHtml.ts +48 -12
- package/src/surfaces/tooltip/TooltipHighlight.tsx +3 -5
- package/src/surfaces/tooltip/targetOrigin.ts +74 -0
- package/src/version.ts +1 -1
- package/vendor/core/dist/engine/UserflowCore.d.ts +7 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -1
- package/vendor/core/dist/engine/UserflowCore.js +3 -2
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -1
- package/vendor/core/dist/transport/phoenix.d.ts +12 -2
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -1
- package/vendor/core/dist/transport/phoenix.js +7 -6
- package/vendor/core/dist/transport/phoenix.js.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/flows.d.ts +2 -0
- package/vendor/protocol/dist/flows.d.ts.map +1 -1
- package/vendor/protocol/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_resolveHighlightChrome","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TooltipHighlight","targetRect","chrome","isHighlightVisible","rings","buildHighlightRings","length","jsx","View","pointerEvents","testID","children","map","ring","style","rect","width","height","inset","type","consumed","strokeWidth","frame","ringFrame","borderRadius","push","styles","borderWidth","borderColor","color","strokeGlow","radius","glowColor","blur","Math","max","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_resolveHighlightChrome","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","TooltipHighlight","targetRect","chrome","isHighlightVisible","rings","buildHighlightRings","length","jsx","View","pointerEvents","testID","children","map","ring","style","rect","width","height","inset","type","consumed","strokeWidth","frame","ringFrame","borderRadius","push","styles","borderWidth","borderColor","color","strokeGlow","radius","glowColor","blur","Math","max","shadowColor","shadowOffset","shadowOpacity","min","opacity","shadowRadius","Platform","OS","boxShadow","alreadyConsumed","cornerRadius","top","left","nextWidth","nextHeight","outset","StyleSheet","create","position","backgroundColor","overflow"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/TooltipHighlight.tsx"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,uBAAA,GAAAF,OAAA;AAAqF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,uBAAA,YAAAA,CAAAK,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,U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AG,CAAC,CAAC,EAAEW,YAAY,GAAGD,eAAe;IAC1D,CAAC;EACH;EAEA,MAAMM,MAAM,GAAGN,eAAe,GAAGlB,WAAW;EAC5C,OAAO;IACLoB,GAAG,EAAEA,GAAG,GAAGI,MAAM;IACjBH,IAAI,EAAEA,IAAI,GAAGG,MAAM;IACnBnC,KAAK,EAAEA,KAAK,GAAGmC,MAAM,GAAG,CAAC;IACzBlC,MAAM,EAAEA,MAAM,GAAGkC,MAAM,GAAG,CAAC;IAC3B3B,YAAY,EAAEsB,YAAY,GAAGK;EAC/B,CAAC;AACH;AAEA,MAAMzB,MAAM,GAAG0B,uBAAU,CAACC,MAAM,CAAC;EAC/BxC,IAAI,EAAE;IACJyC,QAAQ,EAAE,UAAU;IACpBC,eAAe,EAAE,aAAa;IAC9BC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.NO_MODAL_TRUST_MS = void 0;
|
|
7
|
+
exports.locateTargetOrigin = locateTargetOrigin;
|
|
8
|
+
exports.offsetRect = offsetRect;
|
|
9
|
+
exports.resetTargetOriginForTests = resetTargetOriginForTests;
|
|
10
|
+
var _FiberScanRootStore = require("../../anchors/fiber/FiberScanRootStore.js");
|
|
11
|
+
var _presentedModal = require("../../anchors/fiber/presentedModal.js");
|
|
12
|
+
var _fiberAnchorCache = require("../../anchors/fiberAnchorCache.js");
|
|
13
|
+
var _WindowOverlayHost = require("../../runtime/WindowOverlayHost.js");
|
|
14
|
+
const ZERO = {
|
|
15
|
+
x: 0,
|
|
16
|
+
y: 0
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* How long "nothing is presented" is trusted on the same screen. The lookup
|
|
21
|
+
* walks the whole fiber tree (1.4ms for 2,200 fibers in a debug build), and
|
|
22
|
+
* an anchored tooltip resolves four times a second. Expo Router and native
|
|
23
|
+
* stack modals change the screen, which skips this wait; a React Native
|
|
24
|
+
* `<Modal>` over the target is noticed within it.
|
|
25
|
+
*/
|
|
26
|
+
const NO_MODAL_TRUST_MS = exports.NO_MODAL_TRUST_MS = 1000;
|
|
27
|
+
let noModalSince = null;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Where a tooltip target's measured rects sit in the window. `done` gets the
|
|
31
|
+
* window position of `(0, 0)` in the target's measure space, or null when the
|
|
32
|
+
* tooltip cannot point at it: a natively presented modal covers the target,
|
|
33
|
+
* or the target is inside a modal that cannot be placed (see
|
|
34
|
+
* `presentedModal.ts`). Also null when the target has no fiber to place.
|
|
35
|
+
*
|
|
36
|
+
* Without the window host, flow chrome is drawn in the root view under any
|
|
37
|
+
* native modal, as before, and `done` runs synchronously with zero.
|
|
38
|
+
*/
|
|
39
|
+
function locateTargetOrigin(fiber, done) {
|
|
40
|
+
if (!(0, _WindowOverlayHost.hasWindowOverlayHost)()) {
|
|
41
|
+
done(ZERO);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const screenKey = (0, _fiberAnchorCache.getFiberAnchorScreenKey)();
|
|
45
|
+
const now = Date.now();
|
|
46
|
+
if (noModalSince && noModalSince.screenKey === screenKey && now - noModalSince.at < NO_MODAL_TRUST_MS) {
|
|
47
|
+
done(ZERO);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
(0, _presentedModal.locatePresentedModal)(_FiberScanRootStore.fiberScanRoot.getFiber()).then(modal => {
|
|
51
|
+
noModalSince = modal == null ? {
|
|
52
|
+
at: now,
|
|
53
|
+
screenKey
|
|
54
|
+
} : null;
|
|
55
|
+
done(modal == null ? ZERO : fiber ? (0, _presentedModal.measureOriginOf)(fiber, modal) : null);
|
|
56
|
+
}, () => {
|
|
57
|
+
noModalSince = null;
|
|
58
|
+
done(null);
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function offsetRect(rect, origin) {
|
|
62
|
+
if (origin.x === 0 && origin.y === 0) return rect;
|
|
63
|
+
return {
|
|
64
|
+
...rect,
|
|
65
|
+
x: rect.x + origin.x,
|
|
66
|
+
y: rect.y + origin.y
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** @internal Forgets the cached "nothing is presented" between tests. */
|
|
71
|
+
function resetTargetOriginForTests() {
|
|
72
|
+
noModalSince = null;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=targetOrigin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_FiberScanRootStore","require","_presentedModal","_fiberAnchorCache","_WindowOverlayHost","ZERO","x","y","NO_MODAL_TRUST_MS","exports","noModalSince","locateTargetOrigin","fiber","done","hasWindowOverlayHost","screenKey","getFiberAnchorScreenKey","now","Date","at","locatePresentedModal","fiberScanRoot","getFiber","then","modal","measureOriginOf","offsetRect","rect","origin","resetTargetOriginForTests"],"sourceRoot":"../../../../src","sources":["surfaces/tooltip/targetOrigin.ts"],"mappings":";;;;;;;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,MAAMI,IAAW,GAAG;EAAEC,CAAC,EAAE,CAAC;EAAEC,CAAC,EAAE;AAAE,CAAC;;AAElC;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAI;AAErC,IAAIE,YAA6D,GAAG,IAAI;;AAExE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAChCC,KAAsB,EACtBC,IAAoC,EAC9B;EACN,IAAI,CAAC,IAAAC,uCAAoB,EAAC,CAAC,EAAE;IAC3BD,IAAI,CAACR,IAAI,CAAC;IACV;EACF;EAC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SION = void 0;
|
|
7
7
|
/** Generated by scripts/write-version.mjs — do not edit. */
|
|
8
|
-
const SDK_VERSION = exports.SDK_VERSION = '0.
|
|
8
|
+
const SDK_VERSION = exports.SDK_VERSION = '0.7.0';
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
/** Host view that can be measured in window coordinates. */
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The view instance an anchor ref receives. Structural rather than `View`,
|
|
7
|
+
* which React Native 0.88 types as a function component, not an instance.
|
|
8
|
+
*/
|
|
9
|
+
|
|
5
10
|
/**
|
|
6
11
|
* Manual-anchor registry for Phase 3 (WS6). Codeless resolution is Phase 4.
|
|
7
12
|
* Multiple mounts of the same id keep a set; {@link get} returns the most
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnchorRegistry","anchors","Map","listeners","Set","register","id","host","set","get","add","emit","unregister","delete","size","last","getAll","isAmbiguous","subscribe","listener","clear","anchorRegistry"],"sourceRoot":"../../../src","sources":["anchors/AnchorRegistry.ts"],"mappings":";;AAAA;;
|
|
1
|
+
{"version":3,"names":["AnchorRegistry","anchors","Map","listeners","Set","register","id","host","set","get","add","emit","unregister","delete","size","last","getAll","isAmbiguous","subscribe","listener","clear","anchorRegistry"],"sourceRoot":"../../../src","sources":["anchors/AnchorRegistry.ts"],"mappings":";;AAAA;;AAiBA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,CAAC;EACTC,OAAO,GAAG,IAAIC,GAAG,CAA0B,CAAC;EAC5CC,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;EAEhDC,QAAQA,CAACC,EAAU,EAAEC,IAAgB,EAAQ;IAC3C,IAAI,CAACD,EAAE,EAAE;IACT,IAAIE,GAAG,GAAG,IAAI,CAACP,OAAO,CAACQ,GAAG,CAACH,EAAE,CAAC;IAC9B,IAAI,CAACE,GAAG,E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,CAAC,IAAI,CAAC;EAC9C;EAEAI,SAASA,CAACC,QAAkB,EAAc;IACxC,IAAI,CAAChB,SAAS,CAACO,GAAG,CAACS,QAAQ,CAAC;IAC5B,OAAO,MAAM;MACX,IAAI,CAAChB,SAAS,CAACU,MAAM,CAACM,QAAQ,CAAC;IACjC,CAAC;EACH;;EAEA;EACAC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACnB,OAAO,CAACmB,KAAK,CAAC,CAAC;IACpB,IAAI,CAACT,IAAI,CAAC,CAAC;EACb;EAEQA,IAAIA,CAAA,EAAS;IACnB,KAAK,MAAMQ,QAAQ,IAAI,IAAI,CAAChB,SAAS,EAAE;MACrCgB,QAAQ,CAAC,CAAC;IACZ;EACF;AACF;;AAEA;AACA,OAAO,MAAME,cAAc,GAAG,IAAIrB,cAAc,CAAC,CAAC","ignoreList":[]}
|
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
/** Padding applied when scrolling a target into the visible region of a container. */
|
|
4
4
|
const INTO_VIEW_PADDING = 24;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The ScrollView instance a scroll container ref receives. Structural rather
|
|
8
|
+
* than `ScrollView`, which React Native 0.88 types as a function component.
|
|
9
|
+
* Older React Native types leave measureInWindow off the ScrollView instance,
|
|
10
|
+
* so it is not required here.
|
|
11
|
+
*/
|
|
12
|
+
|
|
5
13
|
/**
|
|
6
14
|
* Registry of host {@link ScrollView}s used as an explicit override when
|
|
7
15
|
* scrolling tooltip anchors into view. Prefer automatic fiber discovery for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["INTO_VIEW_PADDING","ScrollContainerRegistry","containers","Set","listeners","register","host","add","emit","unregister","delete","list","scrollTargetIntoView","target","measureInWindow","x","y","width","height","offset","getContentOffset","targetContentY","nextY","Math","max","abs","scrollTo","animated","subscribe","listener","clear","scrollContainerRegistry","createScrollContainerHost","node","measurable","callback","options"],"sourceRoot":"../../../src","sources":["anchors/ScrollContainerRegistry.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["INTO_VIEW_PADDING","ScrollContainerRegistry","containers","Set","listeners","register","host","add","emit","unregister","delete","list","scrollTargetIntoView","target","measureInWindow","x","y","width","height","offset","getContentOffset","targetContentY","nextY","Math","max","abs","scrollTo","animated","subscribe","listener","clear","scrollContainerRegistry","createScrollContainerHost","node","measurable","callback","options"],"sourceRoot":"../../../src","sources":["anchors/ScrollContainerRegistry.ts"],"mappings":";;AAMA;AACA,MAAMA,iBAAiB,GAAG,EAAE;;AAU5B;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,CAAC;EAClBC,UAAU,GAAG,IAAIC,GAAG,CAAsB,CAAC;EAC3CC,SAAS,GAAG,IAAID,GAAG,CAAW,CAAC;EAEhDE,QAAQA,CAACC,IAAyB,EAAQ;IACxC,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACD,IAAI,CAAC;IACzB,IAAI,CAACE,IAAI,CAAC,CAAC;EACb;EAEAC,UAAUA,CAACH,IAAyB,EAAQ;IAC1C,IAAI,CAACJ,UAAU,CAACQ,MAAM,CAACJ,IAAI,CAAC;IAC5B,IAAI,CAACE,IAAI,CAAC,CAAC;EACb;;EAEA;EACAG,IAAIA,CAAA,EAA0B;IAC5B,OAAO,CAAC,GAAG,IAAI,CAACT,UAAU,CAAC;EAC7B;;EAEA;AACF;AACA;AACA;EACEU,oBAAoBA,CAACC,MAAY,EAAQ;IACvC,KAAK,MAAMP,IAAI,IAAI,IAAI,CAACJ,UAAU,EAAE;MAClCI,IAAI,CAACQ,eAAe,CAAC,CAACC,CAAC,EAAEC,CAAC,EAAEC,KAAK,EAAEC,MAAM,KAAK;QAC5C,IAAID,KAAK,IAAI,CAAC,IAAIC,MAAM,IAAI,CAAC,EAAE;QAE/B,MAAMC,MAAM,GAAGb,IAAI,CAACc,gBAAgB,CAAC,CAAC;QACtC,MAAMC,cAAc,GAAGF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AAI9B,uBAAuB,CAAC,CAAC;;AAEpE;AACA,OAAO,SAAS+B,yBAAyBA,CACvCC,IAAyB,EACzBb,gBAAgD,EAC3B;EACrB,MAAMc,UAAU,GAAGD,IAA4C;EAC/D,OAAO;IACLnB,eAAe,EAAGqB,QAAQ,IAAK;MAC7BD,UAAU,CAACpB,eAAe,CAACqB,QAAQ,CAAC;IACtC,CAAC;IACDf,gBAAgB;IAChBM,QAAQ,EAAGU,OAAO,IAAK;MACrBH,IAAI,CAACP,QAAQ,CAACU,OAAO,CAAC;IACxB;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -24,6 +24,14 @@ class FiberScanRootStore {
|
|
|
24
24
|
if (!fiber) return null;
|
|
25
25
|
return resolveCurrentFiber(fiber);
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Mounted scan-root instance. Font detection caches against this identity
|
|
30
|
+
* so a remount scans again and an update of the same root does not.
|
|
31
|
+
*/
|
|
32
|
+
getInstance() {
|
|
33
|
+
return this.instance;
|
|
34
|
+
}
|
|
27
35
|
subscribe(listener) {
|
|
28
36
|
this.listeners.add(listener);
|
|
29
37
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["fiberFromPublicInstance","resolveCurrentFiber","FiberScanRootStore","instance","listeners","Set","set","emit","clear","getFiber","fiber","subscribe","listener","add","delete","resetForTests","fiberScanRoot"],"sourceRoot":"../../../../src","sources":["anchors/fiber/FiberScanRootStore.ts"],"mappings":";;AAAA,SAAwBA,uBAAuB,EAAEC,mBAAmB,QAAQ,qBAAkB;AAI9F;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;EACfC,QAAQ,GAAY,IAAI;EACfC,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;EAEhDC,GAAGA,CAACH,QAAiB,EAAQ;IAC3B,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACI,IAAI,CAAC,CAAC;EACb;EAEAC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACL,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACI,IAAI,CAAC,CAAC;EACb;;EAEA;EACAE,QAAQA,CAAA,EAAoB;IAC1B,IAAI,CAAC,IAAI,CAACN,QAAQ,EAAE,OAAO,IAAI;IAC/B,MAAMO,KAAK,GAAGV,uBAAuB,CAAC,IAAI,CAACG,QAAQ,CAAC;IACpD,IAAI,CAACO,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOT,mBAAmB,CAACS,KAAK,CAAC;EACnC;
|
|
1
|
+
{"version":3,"names":["fiberFromPublicInstance","resolveCurrentFiber","FiberScanRootStore","instance","listeners","Set","set","emit","clear","getFiber","fiber","getInstance","subscribe","listener","add","delete","resetForTests","fiberScanRoot"],"sourceRoot":"../../../../src","sources":["anchors/fiber/FiberScanRootStore.ts"],"mappings":";;AAAA,SAAwBA,uBAAuB,EAAEC,mBAAmB,QAAQ,qBAAkB;AAI9F;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,CAAC;EACfC,QAAQ,GAAY,IAAI;EACfC,SAAS,GAAG,IAAIC,GAAG,CAAW,CAAC;EAEhDC,GAAGA,CAACH,QAAiB,EAAQ;IAC3B,IAAI,CAACA,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACI,IAAI,CAAC,CAAC;EACb;EAEAC,KAAKA,CAAA,EAAS;IACZ,IAAI,CAACL,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACI,IAAI,CAAC,CAAC;EACb;;EAEA;EACAE,QAAQA,CAAA,EAAoB;IAC1B,IAAI,CAAC,IAAI,CAACN,QAAQ,EAAE,OAAO,IAAI;IAC/B,MAAMO,KAAK,GAAGV,uBAAuB,CAAC,IAAI,CAACG,QAAQ,CAAC;IACpD,IAAI,CAACO,KAAK,EAAE,OAAO,IAAI;IACvB,OAAOT,mBAAmB,CAACS,KAAK,CAAC;EACnC;;EAEA;AACF;AACA;AACA;EACEC,WAAWA,CAAA,EAAY;IACrB,OAAO,IAAI,CAACR,QAAQ;EACtB;EAEAS,SAASA,CAACC,QAAkB,EAAc;IACxC,IAAI,CAACT,SAAS,CAACU,GAAG,CAACD,QAAQ,CAAC;IAC5B,OAAO,MAAM;MACX,IAAI,CAACT,SAAS,CAACW,MAAM,CAACF,QAAQ,CAAC;IACjC,CAAC;EACH;;EAEA;EACAG,aAAaA,CAAA,EAAS;IACpB,IAAI,CAACb,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,SAAS,CAACI,KAAK,CAAC,CAAC;EACxB;EAEQD,IAAIA,CAAA,EAAS;IACnB,KAAK,MAAMM,QAAQ,IAAI,IAAI,CAACT,SAAS,EAAE;MACrCS,QAAQ,CAAC,CAAC;IACZ;EACF;AACF;AAEA,OAAO,MAAMI,aAAa,GAAG,IAAIf,kBAAkB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Host-app font used when a theme is still on the default CSS stack.
|
|
5
|
+
*
|
|
6
|
+
* React Native does not inherit `fontFamily` from a parent view, so the family
|
|
7
|
+
* actually in use is the one set on `Text`. The primary font is whichever
|
|
8
|
+
* family appears on the most visible host text under the scan root (the SDK
|
|
9
|
+
* overlay is a sibling and is not walked). Embedded banners are inside that
|
|
10
|
+
* root; their hosts use a `userflow-` testID and are not votes, or the bar's
|
|
11
|
+
* own text would win. Text with no family counts as the platform font. Icon
|
|
12
|
+
* faces are not content. Nested text with no family does not vote: the
|
|
13
|
+
* ancestor text already does, and a child run must not add another vote for
|
|
14
|
+
* that family or for the platform font.
|
|
15
|
+
*
|
|
16
|
+
* A finished walk is cached until the visible screen changes, the reported
|
|
17
|
+
* screen changes, or `Userflow.reset()`. A walk that hits the node cap is not
|
|
18
|
+
* cached. Failures return null.
|
|
19
|
+
*/
|
|
20
|
+
import { getCurrentScreenLocation } from "../../screenTracker.js";
|
|
21
|
+
import { fiberScanRoot } from "./FiberScanRootStore.js";
|
|
22
|
+
import { MAX_ANCESTOR_WALK, getHostTypeName, getLiveHostProps, getReturn, getStateNode } from "./fiberInternals.js";
|
|
23
|
+
import { isFiberOnVisibleScreen, isScreenHostFiber } from "./visibleScreens.js";
|
|
24
|
+
import { walkVisibleFibers } from "./walkVisibleFibers.js";
|
|
25
|
+
const TEXT_HOST_NAMES = new Set(['Text', 'RCTText', 'RCTVirtualText']);
|
|
26
|
+
|
|
27
|
+
/** SDK hosts inside the scan root (embedded banners). Not the app's font. */
|
|
28
|
+
const SDK_HOST_TEST_ID_PREFIX = 'userflow-';
|
|
29
|
+
|
|
30
|
+
/** Cycle guard for nested-text inheritance. Real trees are only a few levels deep. */
|
|
31
|
+
const MAX_FONT_ANCESTORS = 50;
|
|
32
|
+
const CSS_GENERIC_FAMILIES = new Set(['sans-serif', 'serif', 'monospace', 'system-ui', 'ui-sans-serif', 'ui-serif', 'ui-monospace', 'ui-rounded', 'cursive', 'fantasy', 'emoji', 'math', 'fangsong', 'inherit', 'initial', 'unset']);
|
|
33
|
+
|
|
34
|
+
/** Short vector-icon families. Matched after stripping spaces and punctuation. */
|
|
35
|
+
const ICON_FONT_EXACT = new Set(['feather', 'antdesign', 'entypo', 'fontisto', 'simplelineicons', 'octicons', 'zocial', 'foundation', 'evilicons']);
|
|
36
|
+
let cache = null;
|
|
37
|
+
|
|
38
|
+
/** Drop the cached app font. Called from `Userflow.reset()`. */
|
|
39
|
+
export function resetDetectedAppFont() {
|
|
40
|
+
cache = null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Family to apply, or null when the app font is the platform face or could
|
|
45
|
+
* not be read. Never throws.
|
|
46
|
+
*/
|
|
47
|
+
export function detectAppFontFamily() {
|
|
48
|
+
try {
|
|
49
|
+
const instance = fiberScanRoot.getInstance();
|
|
50
|
+
if (!instance || typeof instance !== 'object') return null;
|
|
51
|
+
const root = fiberScanRoot.getFiber();
|
|
52
|
+
if (!root) return null;
|
|
53
|
+
if (cache?.instance === instance && cacheStillCurrent(cache, root)) return cache.family;
|
|
54
|
+
const tally = tallyHostText(root);
|
|
55
|
+
if (tally.truncated) {
|
|
56
|
+
if (!tally.voted) return null;
|
|
57
|
+
return pickMajority(tally.counts);
|
|
58
|
+
}
|
|
59
|
+
const family = tally.voted ? pickMajority(tally.counts) : null;
|
|
60
|
+
cache = {
|
|
61
|
+
instance,
|
|
62
|
+
family,
|
|
63
|
+
screens: tally.screens,
|
|
64
|
+
screenKey: reportedScreenKey()
|
|
65
|
+
};
|
|
66
|
+
return family;
|
|
67
|
+
} catch {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Faces that appear in the builder's default system stack. A comma-separated
|
|
74
|
+
* list made only of these and generic keywords is that default, not a custom
|
|
75
|
+
* font. A single concrete name is still kept, including `Roboto`.
|
|
76
|
+
*/
|
|
77
|
+
const DEFAULT_STACK_FACES = new Set(['blinkmacsystemfont', 'segoe ui', 'roboto', 'helvetica', 'arial', 'apple color emoji', 'segoe ui emoji', 'segoe ui symbol']);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* A single React Native family name. CSS stacks and generic keywords are not
|
|
81
|
+
* usable as a host `fontFamily` — RN treats the whole string as one face.
|
|
82
|
+
* Theme stacks are parsed by {@link themeConcreteFontFamily}.
|
|
83
|
+
*/
|
|
84
|
+
export function concreteFontFamily(value) {
|
|
85
|
+
if (typeof value !== 'string') return undefined;
|
|
86
|
+
const name = unwrapFontName(value);
|
|
87
|
+
if (!name || name.includes(',') || name.startsWith('-')) return undefined;
|
|
88
|
+
if (CSS_GENERIC_FAMILIES.has(name.toLowerCase())) return undefined;
|
|
89
|
+
return name;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Family a theme author chose. A single concrete name is kept. A comma-separated
|
|
94
|
+
* list keeps the first family that is not a generic or a default-stack face,
|
|
95
|
+
* so `"Source Sans Pro", sans-serif` stays Source Sans Pro and the system
|
|
96
|
+
* stack still resolves to undefined.
|
|
97
|
+
*/
|
|
98
|
+
export function themeConcreteFontFamily(value) {
|
|
99
|
+
if (typeof value !== 'string') return undefined;
|
|
100
|
+
const parts = splitCssFamilies(value);
|
|
101
|
+
if (parts.length === 0) return undefined;
|
|
102
|
+
if (parts.length === 1) return concreteFontFamily(parts[0]);
|
|
103
|
+
for (const part of parts) {
|
|
104
|
+
const name = concreteFontFamily(part);
|
|
105
|
+
if (!name || DEFAULT_STACK_FACES.has(name.toLowerCase())) continue;
|
|
106
|
+
return name;
|
|
107
|
+
}
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Split a CSS `font-family` list. A quote that opens a family is wrapping and
|
|
113
|
+
* is removed; a quote inside a name stays, so `Foo"Bar` is one family.
|
|
114
|
+
* Commas inside wrapping quotes are not separators.
|
|
115
|
+
*/
|
|
116
|
+
export function splitCssFamilies(value) {
|
|
117
|
+
const parts = [];
|
|
118
|
+
let current = '';
|
|
119
|
+
let quote = null;
|
|
120
|
+
for (const char of value) {
|
|
121
|
+
if (quote) {
|
|
122
|
+
if (char === quote) quote = null;else current += char;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
if ((char === '"' || char === "'") && current.trim() === '') {
|
|
126
|
+
quote = char;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (char === ',') {
|
|
130
|
+
const name = current.trim();
|
|
131
|
+
if (name) parts.push(name);
|
|
132
|
+
current = '';
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
current += char;
|
|
136
|
+
}
|
|
137
|
+
const name = current.trim();
|
|
138
|
+
if (name) parts.push(name);
|
|
139
|
+
return parts;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Generic keywords and vendor-prefixed faces stay unquoted in CSS. */
|
|
143
|
+
export function isBareCssFamily(name) {
|
|
144
|
+
return name.startsWith('-') || CSS_GENERIC_FAMILIES.has(name.toLowerCase());
|
|
145
|
+
}
|
|
146
|
+
export function isIconFontFamily(name) {
|
|
147
|
+
const key = name.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
148
|
+
if (ICON_FONT_EXACT.has(key)) return true;
|
|
149
|
+
return key.startsWith('fontawesome') || key.startsWith('ionicons') || key.startsWith('materialcommunityicons') || key.startsWith('materialicons') || key.startsWith('materialsymbols');
|
|
150
|
+
}
|
|
151
|
+
function tallyHostText(root) {
|
|
152
|
+
const counts = new Map();
|
|
153
|
+
const screens = [];
|
|
154
|
+
let voted = false;
|
|
155
|
+
const {
|
|
156
|
+
truncated
|
|
157
|
+
} = walkVisibleFibers(root, fiber => {
|
|
158
|
+
try {
|
|
159
|
+
if (isScreenHostFiber(fiber)) screens.push(fiber);
|
|
160
|
+
if (!isTextHost(fiber)) return;
|
|
161
|
+
const vote = voteFor(fiber, root);
|
|
162
|
+
if (vote === 'skip') return;
|
|
163
|
+
voted = true;
|
|
164
|
+
counts.set(vote, (counts.get(vote) ?? 0) + 1);
|
|
165
|
+
} catch {
|
|
166
|
+
// One unreadable node is not a vote.
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
return {
|
|
170
|
+
voted,
|
|
171
|
+
truncated,
|
|
172
|
+
screens,
|
|
173
|
+
counts
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** Usable family, null for the platform font, or skip for an icon face. */
|
|
178
|
+
function voteFor(fiber, root) {
|
|
179
|
+
if (isUnderSdkHost(fiber, root)) return 'skip';
|
|
180
|
+
const own = classifyFamily(readFontFamily(fiber));
|
|
181
|
+
if (own.kind === 'icon') return 'skip';
|
|
182
|
+
if (own.kind === 'family') return own.name;
|
|
183
|
+
if (own.kind === 'unusable') return null;
|
|
184
|
+
// No family of its own. The ancestor text node casts the vote for this run.
|
|
185
|
+
if (hasAncestorText(fiber, root)) return 'skip';
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
function hasAncestorText(fiber, root) {
|
|
189
|
+
let parent = getReturn(fiber);
|
|
190
|
+
for (let depth = 0; parent && parent !== root && depth < MAX_FONT_ANCESTORS; depth += 1) {
|
|
191
|
+
if (isTextHost(parent)) return true;
|
|
192
|
+
parent = getReturn(parent);
|
|
193
|
+
}
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
function cacheStillCurrent(cached, root) {
|
|
197
|
+
if (cached.screenKey !== reportedScreenKey()) return false;
|
|
198
|
+
if (cached.screens.length === 0) return true;
|
|
199
|
+
return cached.screens.every(screen => screenStillCurrent(screen, root));
|
|
200
|
+
}
|
|
201
|
+
function screenStillCurrent(screen, root) {
|
|
202
|
+
if (!isFiberOnVisibleScreen(screen)) return false;
|
|
203
|
+
let current = screen;
|
|
204
|
+
for (let depth = 0; current && depth < MAX_ANCESTOR_WALK; depth += 1) {
|
|
205
|
+
if (current === root) return true;
|
|
206
|
+
current = getReturn(current);
|
|
207
|
+
}
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
function reportedScreenKey() {
|
|
211
|
+
const location = getCurrentScreenLocation();
|
|
212
|
+
if (!location) return null;
|
|
213
|
+
const key = 'path' in location ? location.path : location.screen;
|
|
214
|
+
return key || null;
|
|
215
|
+
}
|
|
216
|
+
function classifyFamily(raw) {
|
|
217
|
+
if (!raw) return {
|
|
218
|
+
kind: 'absent'
|
|
219
|
+
};
|
|
220
|
+
if (isIconFontFamily(raw)) return {
|
|
221
|
+
kind: 'icon'
|
|
222
|
+
};
|
|
223
|
+
const concrete = concreteFontFamily(raw);
|
|
224
|
+
if (!concrete) return {
|
|
225
|
+
kind: 'unusable'
|
|
226
|
+
};
|
|
227
|
+
return {
|
|
228
|
+
kind: 'family',
|
|
229
|
+
name: concrete
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function pickMajority(counts) {
|
|
233
|
+
const platform = counts.get(null) ?? 0;
|
|
234
|
+
let bestName = null;
|
|
235
|
+
let bestCount = 0;
|
|
236
|
+
for (const [name, count] of counts) {
|
|
237
|
+
if (name == null) continue;
|
|
238
|
+
if (bestName == null || count > bestCount || count === bestCount && name < bestName) {
|
|
239
|
+
bestName = name;
|
|
240
|
+
bestCount = count;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
if (bestName == null || platform > bestCount) return null;
|
|
244
|
+
return bestName;
|
|
245
|
+
}
|
|
246
|
+
function isUnderSdkHost(fiber, root) {
|
|
247
|
+
let parent = getReturn(fiber);
|
|
248
|
+
for (let depth = 0; parent && parent !== root && depth < MAX_FONT_ANCESTORS; depth += 1) {
|
|
249
|
+
try {
|
|
250
|
+
const testID = getLiveHostProps(parent)?.testID;
|
|
251
|
+
if (typeof testID === 'string' && testID.startsWith(SDK_HOST_TEST_ID_PREFIX)) {
|
|
252
|
+
return true;
|
|
253
|
+
}
|
|
254
|
+
} catch {
|
|
255
|
+
// An unreadable ancestor is not an SDK host.
|
|
256
|
+
}
|
|
257
|
+
parent = getReturn(parent);
|
|
258
|
+
}
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
function isTextHost(fiber) {
|
|
262
|
+
const typeName = getHostTypeName(fiber);
|
|
263
|
+
if (typeName && TEXT_HOST_NAMES.has(typeName)) return true;
|
|
264
|
+
const elementType = fiber?.elementType;
|
|
265
|
+
if (typeof elementType === 'string' && TEXT_HOST_NAMES.has(elementType)) return true;
|
|
266
|
+
try {
|
|
267
|
+
const node = getStateNode(fiber);
|
|
268
|
+
const className = node?.viewConfig?.uiViewClassName ?? node?.__viewConfig?.uiViewClassName;
|
|
269
|
+
return typeof className === 'string' && TEXT_HOST_NAMES.has(className);
|
|
270
|
+
} catch {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
function readFontFamily(fiber) {
|
|
275
|
+
try {
|
|
276
|
+
const flat = flattenFontStyle(getLiveHostProps(fiber)?.style);
|
|
277
|
+
const family = flat?.fontFamily;
|
|
278
|
+
if (typeof family !== 'string') return undefined;
|
|
279
|
+
const trimmed = family.trim();
|
|
280
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
281
|
+
} catch {
|
|
282
|
+
return undefined;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
function flattenFontStyle(style) {
|
|
286
|
+
if (style == null || style === false) return null;
|
|
287
|
+
if (typeof style === 'number') return flattenRegisteredStyle(style);
|
|
288
|
+
if (Array.isArray(style)) {
|
|
289
|
+
let family;
|
|
290
|
+
for (const entry of style) {
|
|
291
|
+
const flat = flattenFontStyle(entry);
|
|
292
|
+
if (flat && flat.fontFamily != null) family = flat.fontFamily;
|
|
293
|
+
}
|
|
294
|
+
return {
|
|
295
|
+
fontFamily: family
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
if (typeof style === 'object') return style;
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* StyleSheet ids are numbers. Resolve them only when one shows up so tests
|
|
304
|
+
* that pass plain style objects do not load react-native.
|
|
305
|
+
*/
|
|
306
|
+
function flattenRegisteredStyle(styleId) {
|
|
307
|
+
try {
|
|
308
|
+
// Lazy require so unit tests that pass plain style objects do not load RN.
|
|
309
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
|
|
310
|
+
const {
|
|
311
|
+
StyleSheet
|
|
312
|
+
} = require('react-native');
|
|
313
|
+
const flat = StyleSheet?.flatten?.(styleId);
|
|
314
|
+
return flat ?? null;
|
|
315
|
+
} catch {
|
|
316
|
+
return null;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function unwrapFontName(value) {
|
|
320
|
+
const trimmed = value.trim();
|
|
321
|
+
if (trimmed.length >= 2) {
|
|
322
|
+
const first = trimmed[0];
|
|
323
|
+
const last = trimmed[trimmed.length - 1];
|
|
324
|
+
if (first === '"' && last === '"' || first === "'" && last === "'") {
|
|
325
|
+
return trimmed.slice(1, -1).trim();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return trimmed;
|
|
329
|
+
}
|
|
330
|
+
//# sourceMappingURL=detectAppFontFamily.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getCurrentScreenLocation","fiberScanRoot","MAX_ANCESTOR_WALK","getHostTypeName","getLiveHostProps","getReturn","getStateNode","isFiberOnVisibleScreen","isScreenHostFiber","walkVisibleFibers","TEXT_HOST_NAMES","Set","SDK_HOST_TEST_ID_PREFIX","MAX_FONT_ANCESTORS","CSS_GENERIC_FAMILIES","ICON_FONT_EXACT","cache","resetDetectedAppFont","detectAppFontFamily","instance","getInstance","root","getFiber","cacheStillCurrent","family","tally","tallyHostText","truncated","voted","pickMajority","counts","screens","screenKey","reportedScreenKey","DEFAULT_STACK_FACES","concreteFontFamily","value","undefined","name","unwrapFontName","includes","startsWith","has","toLowerCase","themeConcreteFontFamily","parts","splitCssFamilies","length","part","current","quote","char","trim","push","isBareCssFamily","isIconFontFamily","key","replace","Map","fiber","isTextHost","vote","voteFor","set","get","isUnderSdkHost","own","classifyFamily","readFontFamily","kind","hasAncestorText","parent","depth","cached","every","screen","screenStillCurrent","location","path","raw","concrete","platform","bestName","bestCount","count","testID","typeName","elementType","node","className","viewConfig","uiViewClassName","__viewConfig","flat","flattenFontStyle","style","fontFamily","trimmed","flattenRegisteredStyle","Array","isArray","entry","styleId","StyleSheet","require","flatten","first","last","slice"],"sourceRoot":"../../../../src","sources":["anchors/fiber/detectAppFontFamily.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,wBAAwB,QAAQ,wBAAqB;AAE9D,SAASC,aAAa,QAAQ,yBAAsB;AACpD,SAEEC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,SAAS,EACTC,YAAY,QACP,qBAAkB;AACzB,SAASC,sBAAsB,EAAEC,iBAAiB,Q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