@react-navigation/native 8.0.0-alpha.3 → 8.0.0-alpha.30
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/android/build.gradle +80 -6
- package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +33 -12
- package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +81 -8
- package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +39 -6
- package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +14 -7
- package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +3 -1
- package/assets/fonts/MaterialSymbolsOutlined_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_300.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_700.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded.codepoints +4102 -0
- package/assets/fonts/MaterialSymbolsRounded_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_300.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_400.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_700.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp.codepoints +4102 -0
- package/assets/fonts/MaterialSymbolsSharp_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_300.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_400.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_700.ttf +0 -0
- package/ios/ReactNavigationCornerInsetView.h +14 -0
- package/ios/ReactNavigationCornerInsetView.mm +182 -0
- package/ios/ReactNavigationCornerInsetView.swift +193 -0
- package/ios/ReactNavigationCornerInsetViewComponentDescriptor.h +23 -0
- package/ios/ReactNavigationCornerInsetViewShadowNode.h +27 -0
- package/ios/ReactNavigationCornerInsetViewShadowNode.mm +42 -0
- package/ios/ReactNavigationCornerInsetViewState.h +19 -0
- package/ios/ReactNavigationSFSymbolView.mm +34 -0
- package/ios/ReactNavigationSFSymbolView.swift +543 -7
- package/lib/module/NavigationContainer.js +16 -11
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/__stubs__/createStackNavigator.js +10 -4
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
- package/lib/module/__stubs__/window.js +3 -0
- package/lib/module/__stubs__/window.js.map +1 -1
- package/lib/module/createMemoryHistory.js +15 -6
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStandardNavigationFactories.js +99 -0
- package/lib/module/createStandardNavigationFactories.js.map +1 -0
- package/lib/module/createStaticNavigation.js +5 -4
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/extractPathFromURL.js +2 -2
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/getStateFromHref.js +2 -2
- package/lib/module/getStateFromHref.js.map +1 -1
- package/lib/module/index.js +4 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/CornerInset.ios.js +66 -0
- package/lib/module/native/CornerInset.ios.js.map +1 -0
- package/lib/module/native/CornerInset.js +17 -0
- package/lib/module/native/CornerInset.js.map +1 -0
- package/lib/module/native/MaterialSymbol.android.js +9 -20
- package/lib/module/native/MaterialSymbol.android.js.map +1 -1
- package/lib/module/native/MaterialSymbolData.js +0 -7
- package/lib/module/native/MaterialSymbolData.js.map +1 -1
- package/lib/module/native/MaterialSymbolViewNativeComponent.ts +4 -4
- package/lib/module/native/NativeMaterialSymbolModule.js.map +1 -1
- package/lib/module/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/lib/module/native/SFSymbol.ios.js +45 -1
- package/lib/module/native/SFSymbol.ios.js.map +1 -1
- package/lib/module/native/SFSymbolViewNativeComponent.ts +28 -1
- package/lib/module/native/constants.js +14 -0
- package/lib/module/native/constants.js.map +1 -0
- package/lib/module/server/ServerContext.js.map +1 -0
- package/lib/module/server/index.js +21 -0
- package/lib/module/server/index.js.map +1 -0
- package/lib/module/theming/DarkTheme.js +4 -4
- package/lib/module/theming/{DefaultTheme.js → LightTheme.js} +5 -5
- package/lib/module/theming/LightTheme.js.map +1 -0
- package/lib/module/theming/MaterialFallbackTheme.js +28 -0
- package/lib/module/theming/MaterialFallbackTheme.js.map +1 -0
- package/lib/module/theming/MaterialTheme.android.js +33 -0
- package/lib/module/theming/MaterialTheme.android.js.map +1 -0
- package/lib/module/theming/MaterialTheme.js +4 -0
- package/lib/module/theming/MaterialTheme.js.map +1 -0
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useDocumentTitle.js.map +1 -1
- package/lib/module/useLinkBuilder.js +8 -7
- package/lib/module/useLinkBuilder.js.map +1 -1
- package/lib/module/useLinkProps.js +5 -26
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinkTo.js +1 -1
- package/lib/module/useLinkTo.js.map +1 -1
- package/lib/module/useLinking.js +81 -11
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +25 -8
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useLocale.js +1 -1
- package/lib/module/useLocale.js.map +1 -1
- package/lib/module/useMemoArray.js +25 -0
- package/lib/module/useMemoArray.js.map +1 -0
- package/lib/module/useRoutePath.js +1 -1
- package/lib/module/useRoutePath.js.map +1 -1
- package/lib/module/useScrollToTop.js +3 -2
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/typescript/src/Link.d.ts +1 -1
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/LinkingContext.d.ts +1 -1
- package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
- package/lib/typescript/src/LocaleDirContext.d.ts +1 -1
- package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -1
- package/lib/typescript/src/NavigationContainer.d.ts +13 -6
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +6 -9
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/window.d.ts.map +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
- package/lib/typescript/src/createStandardNavigationFactories.d.ts +31 -0
- package/lib/typescript/src/createStandardNavigationFactories.d.ts.map +1 -0
- package/lib/typescript/src/createStaticNavigation.d.ts +7 -7
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
- package/lib/typescript/src/getStateFromHref.d.ts +3 -3
- package/lib/typescript/src/getStateFromHref.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +17 -15
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/CornerInset.d.ts +28 -0
- package/lib/typescript/src/native/CornerInset.d.ts.map +1 -0
- package/lib/typescript/src/native/CornerInset.ios.d.ts +8 -0
- package/lib/typescript/src/native/CornerInset.ios.d.ts.map +1 -0
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts +3 -3
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbol.d.ts +1 -1
- package/lib/typescript/src/native/MaterialSymbol.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolData.d.ts +0 -3
- package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +3 -3
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts +1 -1
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts.map +1 -1
- package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts +14 -0
- package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/native/SFSymbol.d.ts +1 -1
- package/lib/typescript/src/native/SFSymbol.d.ts.map +1 -1
- package/lib/typescript/src/native/SFSymbol.ios.d.ts +2 -2
- package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -1
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +28 -1
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/native/constants.d.ts +12 -0
- package/lib/typescript/src/native/constants.d.ts.map +1 -0
- package/lib/typescript/src/native/types.d.ts +345 -5
- package/lib/typescript/src/native/types.d.ts.map +1 -1
- package/lib/typescript/src/{ServerContext.d.ts → server/ServerContext.d.ts} +1 -4
- package/lib/typescript/src/server/ServerContext.d.ts.map +1 -0
- package/lib/typescript/src/server/index.d.ts +10 -0
- package/lib/typescript/src/server/index.d.ts.map +1 -0
- package/lib/typescript/src/theming/DarkTheme.d.ts +4 -4
- package/lib/typescript/src/theming/{DefaultTheme.d.ts → LightTheme.d.ts} +5 -5
- package/lib/typescript/src/theming/LightTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialFallbackTheme.d.ts +127 -0
- package/lib/typescript/src/theming/MaterialFallbackTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts +251 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts +2 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +13 -16
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +1 -1
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- package/lib/typescript/src/useDocumentTitle.d.ts +2 -2
- package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +54 -66
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.d.ts +17 -19
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +31 -33
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useLocale.d.ts +1 -1
- package/lib/typescript/src/useMemoArray.d.ts +2 -0
- package/lib/typescript/src/useMemoArray.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
- package/package.json +41 -22
- package/src/NavigationContainer.tsx +41 -32
- package/src/__stubs__/createStackNavigator.tsx +19 -17
- package/src/__stubs__/window.tsx +5 -0
- package/src/createMemoryHistory.tsx +19 -6
- package/src/createStandardNavigationFactories.tsx +218 -0
- package/src/createStaticNavigation.tsx +13 -17
- package/src/extractPathFromURL.tsx +5 -3
- package/src/getStateFromHref.tsx +8 -3
- package/src/index.tsx +11 -2
- package/src/native/CornerInset.ios.tsx +85 -0
- package/src/native/CornerInset.tsx +40 -0
- package/src/native/MaterialSymbol.android.tsx +9 -28
- package/src/native/MaterialSymbolData.tsx +0 -4
- package/src/native/MaterialSymbolViewNativeComponent.ts +4 -4
- package/src/native/NativeMaterialSymbolModule.ts +3 -4
- package/src/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/src/native/SFSymbol.ios.tsx +84 -2
- package/src/native/SFSymbolViewNativeComponent.ts +28 -1
- package/src/native/constants.tsx +11 -0
- package/src/native/types.tsx +433 -4
- package/src/{ServerContext.tsx → server/ServerContext.tsx} +1 -4
- package/src/server/index.tsx +19 -0
- package/src/theming/DarkTheme.tsx +4 -4
- package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +4 -4
- package/src/theming/MaterialFallbackTheme.tsx +29 -0
- package/src/theming/MaterialTheme.android.tsx +45 -0
- package/src/theming/MaterialTheme.tsx +4 -0
- package/src/types.tsx +38 -40
- package/src/useBackButton.tsx +2 -2
- package/src/useDocumentTitle.tsx +2 -2
- package/src/useLinkBuilder.tsx +15 -7
- package/src/useLinkProps.tsx +8 -41
- package/src/useLinkTo.tsx +1 -1
- package/src/useLinking.native.tsx +58 -30
- package/src/useLinking.tsx +132 -22
- package/src/useLocale.tsx +1 -1
- package/src/useMemoArray.tsx +41 -0
- package/src/useRoutePath.tsx +1 -1
- package/src/useScrollToTop.tsx +3 -2
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +0 -1
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +0 -1
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/BuildConfig.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$Companion.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$WhenMappings.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$getImageSource$1.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypeface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolView.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager$Companion.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/ReactNavigationPackage.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/org/reactnavigation/BuildConfig.java +0 -10
- package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +0 -38
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +0 -45
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +0 -22
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +0 -39
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +0 -20
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +0 -32
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +0 -31
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +0 -23
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +0 -25
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +0 -30
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +0 -106
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +0 -113
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +0 -32
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +0 -71
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +0 -18
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +0 -43
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +0 -22
- package/android/build/generated/source/codegen/schema.json +0 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined_400.ttf +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/reactnavigation/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined_400.ttf +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$getImageSource$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/ReactNavigationPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$getImageSource$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/ReactNavigationPackage.class +0 -0
- package/lib/module/ServerContainer.js +0 -55
- package/lib/module/ServerContainer.js.map +0 -1
- package/lib/module/ServerContext.js.map +0 -1
- package/lib/module/theming/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/ServerContainer.d.ts +0 -14
- package/lib/typescript/src/ServerContainer.d.ts.map +0 -1
- package/lib/typescript/src/ServerContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
- package/src/ServerContainer.tsx +0 -57
- /package/lib/module/{ServerContext.js → server/ServerContext.js} +0 -0
|
@@ -1,58 +1,56 @@
|
|
|
1
1
|
import { type NavigationContainerRef, type ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import type { LinkingOptions } from './types';
|
|
4
|
-
import type { Thenable } from './useThenable';
|
|
3
|
+
import type { LinkingOptions } from './types.js';
|
|
4
|
+
import type { Thenable } from './useThenable.js';
|
|
5
5
|
/**
|
|
6
6
|
* Run async function in series as it's called.
|
|
7
7
|
*/
|
|
8
8
|
export declare const series: (cb: () => Promise<void>) => () => void;
|
|
9
|
-
|
|
10
|
-
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): {
|
|
9
|
+
export declare function useLinking<ParamList extends ParamListBase>(ref: React.RefObject<NavigationContainerRef<ParamList> | null>, { enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: LinkingOptions<ParamList>): {
|
|
11
10
|
getInitialState: () => Thenable<(Partial<Omit<Readonly<{
|
|
12
11
|
key: string;
|
|
13
12
|
index: number;
|
|
14
13
|
routeNames: string[];
|
|
15
|
-
history?: unknown[];
|
|
14
|
+
history?: unknown[] | undefined;
|
|
16
15
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
17
16
|
type: string;
|
|
18
17
|
stale: false;
|
|
19
18
|
}>, "stale" | "routes">> & Readonly<{
|
|
20
|
-
stale?: true;
|
|
19
|
+
stale?: true | undefined;
|
|
21
20
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
22
21
|
key: string;
|
|
23
22
|
name: string;
|
|
24
|
-
path?: string;
|
|
23
|
+
path?: string | undefined;
|
|
25
24
|
history?: {
|
|
26
25
|
type: "params";
|
|
27
26
|
params: object;
|
|
28
|
-
}[];
|
|
29
|
-
} &
|
|
27
|
+
}[] | undefined;
|
|
28
|
+
} & {
|
|
30
29
|
params?: Readonly<object | undefined>;
|
|
31
|
-
}
|
|
30
|
+
}>>[];
|
|
32
31
|
}> & {
|
|
33
|
-
state?: Partial<Omit<Readonly<{
|
|
32
|
+
state?: (Partial<Omit<Readonly<{
|
|
34
33
|
key: string;
|
|
35
34
|
index: number;
|
|
36
35
|
routeNames: string[];
|
|
37
|
-
history?: unknown[];
|
|
36
|
+
history?: unknown[] | undefined;
|
|
38
37
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
39
38
|
type: string;
|
|
40
39
|
stale: false;
|
|
41
40
|
}>, "stale" | "routes">> & Readonly<{
|
|
42
|
-
stale?: true;
|
|
41
|
+
stale?: true | undefined;
|
|
43
42
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
44
43
|
key: string;
|
|
45
44
|
name: string;
|
|
46
|
-
path?: string;
|
|
45
|
+
path?: string | undefined;
|
|
47
46
|
history?: {
|
|
48
47
|
type: "params";
|
|
49
48
|
params: object;
|
|
50
|
-
}[];
|
|
51
|
-
} &
|
|
49
|
+
}[] | undefined;
|
|
50
|
+
} & {
|
|
52
51
|
params?: Readonly<object | undefined>;
|
|
53
|
-
}
|
|
54
|
-
}> & /*elided*/ any;
|
|
52
|
+
}>>[];
|
|
53
|
+
}> & /*elided*/ any) | undefined;
|
|
55
54
|
}) | undefined>;
|
|
56
55
|
};
|
|
57
|
-
export {};
|
|
58
56
|
//# sourceMappingURL=useLinking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,sBAAsB,EAE3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,sBAAsB,EAE3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAe,CAAC;AA+G9C;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,eAO7C,CAAC;AAIF,wBAAgB,UAAU,CAAC,SAAS,SAAS,aAAa,EACxD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,EAC9D,EACE,OAAc,EACd,MAAM,EACN,gBAA0C,EAC1C,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,cAAc,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4Y7B"}
|
|
@@ -1,98 +1,96 @@
|
|
|
1
1
|
import { type NavigationContainerRef, type ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import type { LinkingOptions } from './types';
|
|
4
|
-
import type { Thenable } from './useThenable';
|
|
5
|
-
|
|
6
|
-
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
|
|
3
|
+
import type { LinkingOptions } from './types.js';
|
|
4
|
+
import type { Thenable } from './useThenable.js';
|
|
5
|
+
export declare function useLinking<ParamList extends ParamListBase>(ref: React.RefObject<NavigationContainerRef<ParamList> | null>, { enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: LinkingOptions<ParamListBase>): {
|
|
7
6
|
getInitialState: () => Thenable<(Partial<Omit<Readonly<{
|
|
8
7
|
key: string;
|
|
9
8
|
index: number;
|
|
10
9
|
routeNames: string[];
|
|
11
|
-
history?: unknown[];
|
|
10
|
+
history?: unknown[] | undefined;
|
|
12
11
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
13
12
|
type: string;
|
|
14
13
|
stale: false;
|
|
15
14
|
}>, "stale" | "routes">> & Readonly<{
|
|
16
|
-
stale?: true;
|
|
15
|
+
stale?: true | undefined;
|
|
17
16
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
18
17
|
key: string;
|
|
19
18
|
name: string;
|
|
20
|
-
path?: string;
|
|
19
|
+
path?: string | undefined;
|
|
21
20
|
history?: {
|
|
22
21
|
type: "params";
|
|
23
22
|
params: object;
|
|
24
|
-
}[];
|
|
25
|
-
} &
|
|
23
|
+
}[] | undefined;
|
|
24
|
+
} & {
|
|
26
25
|
params?: Readonly<object | undefined>;
|
|
27
|
-
}
|
|
26
|
+
}>>[];
|
|
28
27
|
}> & {
|
|
29
|
-
state?: Partial<Omit<Readonly<{
|
|
28
|
+
state?: (Partial<Omit<Readonly<{
|
|
30
29
|
key: string;
|
|
31
30
|
index: number;
|
|
32
31
|
routeNames: string[];
|
|
33
|
-
history?: unknown[];
|
|
32
|
+
history?: unknown[] | undefined;
|
|
34
33
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
35
34
|
type: string;
|
|
36
35
|
stale: false;
|
|
37
36
|
}>, "stale" | "routes">> & Readonly<{
|
|
38
|
-
stale?: true;
|
|
37
|
+
stale?: true | undefined;
|
|
39
38
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
40
39
|
key: string;
|
|
41
40
|
name: string;
|
|
42
|
-
path?: string;
|
|
41
|
+
path?: string | undefined;
|
|
43
42
|
history?: {
|
|
44
43
|
type: "params";
|
|
45
44
|
params: object;
|
|
46
|
-
}[];
|
|
47
|
-
} &
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
} & {
|
|
48
47
|
params?: Readonly<object | undefined>;
|
|
49
|
-
}
|
|
50
|
-
}> & /*elided*/ any;
|
|
48
|
+
}>>[];
|
|
49
|
+
}> & /*elided*/ any) | undefined;
|
|
51
50
|
}) | undefined> | Promise<(Partial<Omit<Readonly<{
|
|
52
51
|
key: string;
|
|
53
52
|
index: number;
|
|
54
53
|
routeNames: string[];
|
|
55
|
-
history?: unknown[];
|
|
54
|
+
history?: unknown[] | undefined;
|
|
56
55
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
57
56
|
type: string;
|
|
58
57
|
stale: false;
|
|
59
58
|
}>, "stale" | "routes">> & Readonly<{
|
|
60
|
-
stale?: true;
|
|
59
|
+
stale?: true | undefined;
|
|
61
60
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
62
61
|
key: string;
|
|
63
62
|
name: string;
|
|
64
|
-
path?: string;
|
|
63
|
+
path?: string | undefined;
|
|
65
64
|
history?: {
|
|
66
65
|
type: "params";
|
|
67
66
|
params: object;
|
|
68
|
-
}[];
|
|
69
|
-
} &
|
|
67
|
+
}[] | undefined;
|
|
68
|
+
} & {
|
|
70
69
|
params?: Readonly<object | undefined>;
|
|
71
|
-
}
|
|
70
|
+
}>>[];
|
|
72
71
|
}> & {
|
|
73
|
-
state?: Partial<Omit<Readonly<{
|
|
72
|
+
state?: (Partial<Omit<Readonly<{
|
|
74
73
|
key: string;
|
|
75
74
|
index: number;
|
|
76
75
|
routeNames: string[];
|
|
77
|
-
history?: unknown[];
|
|
76
|
+
history?: unknown[] | undefined;
|
|
78
77
|
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
79
78
|
type: string;
|
|
80
79
|
stale: false;
|
|
81
80
|
}>, "stale" | "routes">> & Readonly<{
|
|
82
|
-
stale?: true;
|
|
81
|
+
stale?: true | undefined;
|
|
83
82
|
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
84
83
|
key: string;
|
|
85
84
|
name: string;
|
|
86
|
-
path?: string;
|
|
85
|
+
path?: string | undefined;
|
|
87
86
|
history?: {
|
|
88
87
|
type: "params";
|
|
89
88
|
params: object;
|
|
90
|
-
}[];
|
|
91
|
-
} &
|
|
89
|
+
}[] | undefined;
|
|
90
|
+
} & {
|
|
92
91
|
params?: Readonly<object | undefined>;
|
|
93
|
-
}
|
|
94
|
-
}> & /*elided*/ any;
|
|
92
|
+
}>>[];
|
|
93
|
+
}> & /*elided*/ any) | undefined;
|
|
95
94
|
}) | undefined>;
|
|
96
95
|
};
|
|
97
|
-
export {};
|
|
98
96
|
//# sourceMappingURL=useLinking.native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAE3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAe,CAAC;AAM9C,wBAAgB,UAAU,CAAC,SAAS,SAAS,aAAa,EACxD,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,EAC9D,EACE,OAAc,EACd,QAAgB,EAChB,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAQC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,cAAc,CAAC,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+KjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMemoArray.d.ts","sourceRoot":"","sources":["../../../src/useMemoArray.tsx"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,CAAC,CAAC,EAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC,EAAE,GAC7C,CAAC,EAAE,CAoCL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollToTop.d.ts","sourceRoot":"","sources":["../../../src/useScrollToTop.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpE,KAAK,cAAc,GACf;IAAE,WAAW,IAAI,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAC1C;IAAE,cAAc,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GACzE;IAAE,uBAAuB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAE9D,KAAK,iBAAiB,GAClB;IAAE,kBAAkB,IAAI,KAAK,CAAC,SAAS,GAAG,UAAU,CAAA;CAAE,GACtD;IAAE,OAAO,IAAI,cAAc,CAAA;CAAE,GAC7B,cAAc,GACd,IAAI,CAAC;AA8BT,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"useScrollToTop.d.ts","sourceRoot":"","sources":["../../../src/useScrollToTop.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,KAAK,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpE,KAAK,cAAc,GACf;IAAE,WAAW,IAAI,IAAI,CAAA;CAAE,GACvB;IAAE,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,GAC1C;IAAE,cAAc,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GACzE;IAAE,uBAAuB,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;CAAE,CAAC;AAE9D,KAAK,iBAAiB,GAClB;IAAE,kBAAkB,IAAI,KAAK,CAAC,SAAS,GAAG,UAAU,CAAA;CAAE,GACtD;IAAE,OAAO,IAAI,cAAc,CAAA;CAAE,GAC7B,cAAc,GACd,IAAI,CAAC;AA8BT,wBAAgB,cAAc,CAAC,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAuErE"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-navigation/native",
|
|
3
3
|
"description": "React Native integration for React Navigation",
|
|
4
|
-
"version": "8.0.0-alpha.
|
|
4
|
+
"version": "8.0.0-alpha.30",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
7
7
|
"react-navigation",
|
|
@@ -26,16 +26,32 @@
|
|
|
26
26
|
"types": "./lib/typescript/src/index.d.ts",
|
|
27
27
|
"default": "./lib/module/index.js"
|
|
28
28
|
},
|
|
29
|
+
"./server": {
|
|
30
|
+
"source": "./src/server/index.tsx",
|
|
31
|
+
"types": "./lib/typescript/src/server/index.d.ts",
|
|
32
|
+
"default": "./lib/module/server/index.js"
|
|
33
|
+
},
|
|
29
34
|
"./package.json": "./package.json"
|
|
30
35
|
},
|
|
31
36
|
"files": [
|
|
32
37
|
"src",
|
|
33
|
-
"assets",
|
|
34
38
|
"lib",
|
|
35
|
-
"
|
|
39
|
+
"assets",
|
|
36
40
|
"android",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
41
|
+
"ios",
|
|
42
|
+
"cpp",
|
|
43
|
+
"*.podspec",
|
|
44
|
+
"react-native.config.js",
|
|
45
|
+
"!ios/build",
|
|
46
|
+
"!android/build",
|
|
47
|
+
"!android/gradle",
|
|
48
|
+
"!android/gradlew",
|
|
49
|
+
"!android/gradlew.bat",
|
|
50
|
+
"!android/local.properties",
|
|
51
|
+
"!**/__tests__",
|
|
52
|
+
"!**/__fixtures__",
|
|
53
|
+
"!**/__mocks__",
|
|
54
|
+
"!**/.*"
|
|
39
55
|
],
|
|
40
56
|
"sideEffects": false,
|
|
41
57
|
"publishConfig": {
|
|
@@ -46,28 +62,28 @@
|
|
|
46
62
|
"clean": "del lib"
|
|
47
63
|
},
|
|
48
64
|
"dependencies": {
|
|
49
|
-
"@react-navigation/core": "^8.0.0-alpha.
|
|
50
|
-
"escape-string-regexp": "^
|
|
65
|
+
"@react-navigation/core": "^8.0.0-alpha.21",
|
|
66
|
+
"escape-string-regexp": "^5.0.0",
|
|
51
67
|
"fast-deep-equal": "^3.1.3",
|
|
52
|
-
"nanoid": "^
|
|
68
|
+
"nanoid": "^5.1.11",
|
|
53
69
|
"sf-symbols-typescript": "^2.2.0",
|
|
54
|
-
"
|
|
70
|
+
"standard-navigation": "^0.0.7",
|
|
71
|
+
"use-latest-callback": "^0.3.4"
|
|
55
72
|
},
|
|
56
73
|
"devDependencies": {
|
|
57
|
-
"@jest/globals": "^
|
|
58
|
-
"@testing-library/react-native": "^
|
|
59
|
-
"@types/react": "~19.
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"react": "19.
|
|
63
|
-
"react-
|
|
64
|
-
"react-native": "0.
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"typescript": "^5.9.2"
|
|
74
|
+
"@jest/globals": "^29.7.0",
|
|
75
|
+
"@testing-library/react-native": "^14.0.0",
|
|
76
|
+
"@types/react": "~19.2.17",
|
|
77
|
+
"del-cli": "^7.0.0",
|
|
78
|
+
"react": "19.2.0",
|
|
79
|
+
"react-dom": "19.2.0",
|
|
80
|
+
"react-native": "0.83.6",
|
|
81
|
+
"react-native-builder-bob": "^0.42.1",
|
|
82
|
+
"test-renderer": "1.2.0",
|
|
83
|
+
"typescript": "^6.0.3"
|
|
68
84
|
},
|
|
69
85
|
"peerDependencies": {
|
|
70
|
-
"react": ">= 19.
|
|
86
|
+
"react": ">= 19.2.0",
|
|
71
87
|
"react-native": "*"
|
|
72
88
|
},
|
|
73
89
|
"react-native-builder-bob": {
|
|
@@ -103,9 +119,12 @@
|
|
|
103
119
|
"components": {
|
|
104
120
|
"ReactNavigationSFSymbolView": {
|
|
105
121
|
"className": "ReactNavigationSFSymbolView"
|
|
122
|
+
},
|
|
123
|
+
"ReactNavigationCornerInsetView": {
|
|
124
|
+
"className": "ReactNavigationCornerInsetView"
|
|
106
125
|
}
|
|
107
126
|
}
|
|
108
127
|
}
|
|
109
128
|
},
|
|
110
|
-
"gitHead": "
|
|
129
|
+
"gitHead": "069e7c171fa597d1a901555e2acc8e84a46defe7"
|
|
111
130
|
}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
type InitialState,
|
|
7
7
|
type NavigationContainerProps,
|
|
8
8
|
type NavigationContainerRef,
|
|
9
|
-
type
|
|
9
|
+
type NavigationState,
|
|
10
|
+
type PartialState,
|
|
10
11
|
type RootParamList,
|
|
11
12
|
ThemeProvider,
|
|
12
13
|
validatePathConfig,
|
|
@@ -16,7 +17,7 @@ import { I18nManager, Platform } from 'react-native';
|
|
|
16
17
|
|
|
17
18
|
import { LinkingContext } from './LinkingContext';
|
|
18
19
|
import { LocaleDirContext } from './LocaleDirContext';
|
|
19
|
-
import {
|
|
20
|
+
import { LightTheme } from './theming/LightTheme';
|
|
20
21
|
import type {
|
|
21
22
|
DocumentTitleOptions,
|
|
22
23
|
LinkingOptions,
|
|
@@ -30,8 +31,17 @@ import { type Thenable, useThenable } from './useThenable';
|
|
|
30
31
|
|
|
31
32
|
declare global {
|
|
32
33
|
var REACT_NAVIGATION_DEVTOOLS: WeakMap<
|
|
33
|
-
|
|
34
|
-
{
|
|
34
|
+
object,
|
|
35
|
+
{
|
|
36
|
+
readonly linking: LinkingOptions<any>;
|
|
37
|
+
readonly listeners: Set<
|
|
38
|
+
(data: {
|
|
39
|
+
type: 'link';
|
|
40
|
+
url: string;
|
|
41
|
+
state: PartialState<NavigationState> | undefined;
|
|
42
|
+
}) => void
|
|
43
|
+
>;
|
|
44
|
+
}
|
|
35
45
|
>;
|
|
36
46
|
}
|
|
37
47
|
|
|
@@ -95,30 +105,36 @@ type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
|
95
105
|
* unless `documentTitle.enabled` is `false`.
|
|
96
106
|
*/
|
|
97
107
|
documentTitle?: DocumentTitleOptions;
|
|
108
|
+
/**
|
|
109
|
+
* Ref object which refers to the navigation object containing helper methods.
|
|
110
|
+
*/
|
|
111
|
+
ref?: React.Ref<NavigationContainerRef<ParamList>>;
|
|
98
112
|
};
|
|
99
113
|
|
|
100
114
|
const RESTORE_STATE_ERROR =
|
|
101
115
|
'Failed to restore navigation state. The state will be initialized based on the navigation tree.';
|
|
102
116
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Container component that manages the navigation state.
|
|
119
|
+
*
|
|
120
|
+
* This should be rendered at the root wrapping the whole app.
|
|
121
|
+
*/
|
|
122
|
+
export function NavigationContainer<ParamList extends {} = RootParamList>({
|
|
123
|
+
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
124
|
+
theme = LightTheme,
|
|
125
|
+
linking,
|
|
126
|
+
persistor,
|
|
127
|
+
fallback = null,
|
|
128
|
+
documentTitle,
|
|
129
|
+
onStateChange,
|
|
130
|
+
ref,
|
|
131
|
+
...rest
|
|
132
|
+
}: Props<ParamList>) {
|
|
116
133
|
if (linking?.config) {
|
|
117
134
|
validatePathConfig(linking.config);
|
|
118
135
|
}
|
|
119
136
|
|
|
120
|
-
const refContainer =
|
|
121
|
-
React.useRef<NavigationContainerRef<ParamListBase>>(null);
|
|
137
|
+
const refContainer = React.useRef<NavigationContainerRef<ParamList>>(null);
|
|
122
138
|
|
|
123
139
|
useBackButton(refContainer);
|
|
124
140
|
useDocumentTitle(refContainer, documentTitle);
|
|
@@ -150,10 +166,16 @@ function NavigationContainerInner(
|
|
|
150
166
|
// This will be used by the devtools
|
|
151
167
|
React.useEffect(() => {
|
|
152
168
|
if (refContainer.current) {
|
|
169
|
+
const previous = REACT_NAVIGATION_DEVTOOLS.get(refContainer.current);
|
|
170
|
+
const listeners = previous?.listeners ?? new Set();
|
|
171
|
+
|
|
153
172
|
REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
|
154
173
|
get linking() {
|
|
155
174
|
return linkingConfig.options;
|
|
156
175
|
},
|
|
176
|
+
get listeners() {
|
|
177
|
+
return listeners;
|
|
178
|
+
},
|
|
157
179
|
});
|
|
158
180
|
}
|
|
159
181
|
});
|
|
@@ -253,16 +275,3 @@ function NavigationContainerInner(
|
|
|
253
275
|
</LocaleDirContext.Provider>
|
|
254
276
|
);
|
|
255
277
|
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Container component that manages the navigation state.
|
|
259
|
-
*
|
|
260
|
-
* This should be rendered at the root wrapping the whole app.
|
|
261
|
-
*/
|
|
262
|
-
export const NavigationContainer = React.forwardRef(
|
|
263
|
-
NavigationContainerInner
|
|
264
|
-
) as <ParamList extends {} = RootParamList>(
|
|
265
|
-
props: Props<ParamList> & {
|
|
266
|
-
ref?: React.Ref<NavigationContainerRef<ParamList>>;
|
|
267
|
-
}
|
|
268
|
-
) => React.ReactElement;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
3
|
type DefaultNavigatorOptions,
|
|
4
|
-
type
|
|
4
|
+
type NavigatorTypeBagBase,
|
|
5
5
|
type ParamListBase,
|
|
6
6
|
type StackNavigationState,
|
|
7
7
|
StackRouter,
|
|
8
|
-
type TypedNavigator,
|
|
9
8
|
useNavigationBuilder,
|
|
10
9
|
} from '@react-navigation/core';
|
|
11
10
|
|
|
@@ -23,22 +22,25 @@ const StackNavigator = (
|
|
|
23
22
|
props
|
|
24
23
|
);
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
const route = state.routes[state.index];
|
|
26
|
+
|
|
27
|
+
if (route == null) {
|
|
28
|
+
throw new Error(`Couldn't find a route at index ${state.index}.`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const descriptor = descriptors[route.key];
|
|
32
|
+
|
|
33
|
+
if (descriptor == null) {
|
|
34
|
+
throw new Error(`Couldn't find a descriptor for route '${route.key}'.`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return <NavigationContent>{descriptor.render()}</NavigationContent>;
|
|
31
38
|
};
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
ParamList
|
|
35
|
-
>(): TypedNavigator<{
|
|
36
|
-
ParamList: ParamList;
|
|
37
|
-
State: StackNavigationState<ParamList>;
|
|
38
|
-
ScreenOptions: {};
|
|
39
|
-
EventMap: {};
|
|
40
|
-
NavigationList: NavigationListBase<ParamList>;
|
|
40
|
+
interface StubStackTypeBag extends NavigatorTypeBagBase {
|
|
41
|
+
State: StackNavigationState<this['ParamList']>;
|
|
41
42
|
Navigator: typeof StackNavigator;
|
|
42
|
-
}> {
|
|
43
|
-
return createNavigatorFactory(StackNavigator)();
|
|
44
43
|
}
|
|
44
|
+
|
|
45
|
+
export const createStackNavigator =
|
|
46
|
+
createNavigatorFactory<StubStackTypeBag>(StackNavigator);
|
package/src/__stubs__/window.tsx
CHANGED
|
@@ -35,6 +35,11 @@ const history = {
|
|
|
35
35
|
) {
|
|
36
36
|
index += n;
|
|
37
37
|
const entry = entries[index];
|
|
38
|
+
|
|
39
|
+
if (entry == null) {
|
|
40
|
+
throw new Error(`Couldn't find a history entry at index ${index}.`);
|
|
41
|
+
}
|
|
42
|
+
|
|
38
43
|
location = new URL(entry.href);
|
|
39
44
|
currentState = entry.state;
|
|
40
45
|
listeners.forEach((cb) => cb());
|
|
@@ -10,6 +10,8 @@ type HistoryRecord = {
|
|
|
10
10
|
path: string;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
const getPathWithoutHash = (path: string) => path.split('#')[0] ?? '';
|
|
14
|
+
|
|
13
15
|
export function createMemoryHistory() {
|
|
14
16
|
let index = 0;
|
|
15
17
|
let items: HistoryRecord[] = [];
|
|
@@ -48,11 +50,17 @@ export function createMemoryHistory() {
|
|
|
48
50
|
},
|
|
49
51
|
|
|
50
52
|
backIndex({ path }: { path: string }) {
|
|
53
|
+
const pathWithoutHash = getPathWithoutHash(path);
|
|
54
|
+
|
|
51
55
|
// We need to find the index from the element before current to get closest path to go back to
|
|
52
56
|
for (let i = index - 1; i >= 0; i--) {
|
|
53
57
|
const item = items[i];
|
|
54
58
|
|
|
55
|
-
if (item
|
|
59
|
+
if (item == null) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (item.path === pathWithoutHash) {
|
|
56
64
|
return i;
|
|
57
65
|
}
|
|
58
66
|
}
|
|
@@ -64,12 +72,13 @@ export function createMemoryHistory() {
|
|
|
64
72
|
interrupt();
|
|
65
73
|
|
|
66
74
|
const id = nanoid();
|
|
75
|
+
const pathWithoutHash = getPathWithoutHash(path);
|
|
67
76
|
|
|
68
77
|
// When a new entry is pushed, all the existing entries after index will be inaccessible
|
|
69
78
|
// So we remove any existing entries after the current index to clean them up
|
|
70
79
|
items = items.slice(0, index + 1);
|
|
71
80
|
|
|
72
|
-
items.push({ path, state, id });
|
|
81
|
+
items.push({ path: pathWithoutHash, state, id });
|
|
73
82
|
index = items.length - 1;
|
|
74
83
|
|
|
75
84
|
// We pass empty string for title because it's ignored in all browsers except safari
|
|
@@ -83,6 +92,7 @@ export function createMemoryHistory() {
|
|
|
83
92
|
interrupt();
|
|
84
93
|
|
|
85
94
|
const id = window.history.state?.id ?? nanoid();
|
|
95
|
+
const pathWithoutHash = getPathWithoutHash(path);
|
|
86
96
|
|
|
87
97
|
// Need to keep the hash part of the path if there was no previous history entry
|
|
88
98
|
// or the previous history entry had the same path
|
|
@@ -98,13 +108,16 @@ export function createMemoryHistory() {
|
|
|
98
108
|
// So we need to push the entry as there's nothing to replace
|
|
99
109
|
|
|
100
110
|
pathWithHash = pathWithHash + hash;
|
|
101
|
-
items = [{ path:
|
|
111
|
+
items = [{ path: pathWithoutHash, state, id }];
|
|
102
112
|
index = 0;
|
|
103
113
|
} else {
|
|
104
|
-
|
|
114
|
+
const item = items[index];
|
|
115
|
+
|
|
116
|
+
if (item?.path === pathWithoutHash) {
|
|
105
117
|
pathWithHash = pathWithHash + hash;
|
|
106
118
|
}
|
|
107
|
-
|
|
119
|
+
|
|
120
|
+
items[index] = { path: pathWithoutHash, state, id };
|
|
108
121
|
}
|
|
109
122
|
|
|
110
123
|
window.history.replaceState({ id }, '', pathWithHash);
|
|
@@ -179,7 +192,7 @@ export function createMemoryHistory() {
|
|
|
179
192
|
const foundIndex = pending.findIndex((it) => it.ref === done);
|
|
180
193
|
|
|
181
194
|
if (foundIndex > -1) {
|
|
182
|
-
pending[foundIndex]
|
|
195
|
+
pending[foundIndex]?.cb();
|
|
183
196
|
pending.splice(foundIndex, 1);
|
|
184
197
|
}
|
|
185
198
|
|