@react-navigation/native 7.1.28 → 8.0.0-alpha.1
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/ReactNavigation.podspec +20 -0
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +1 -0
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +1 -0
- 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$future$1$1$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 +10 -0
- package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +38 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +42 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +21 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +39 -0
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +20 -0
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +32 -0
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +31 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +23 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +25 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +17 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +30 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +101 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +55 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +31 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +71 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +18 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +43 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +16 -0
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +22 -0
- package/android/build/generated/source/codegen/schema.json +1 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined.ttf +0 -0
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsRounded.ttf +0 -0
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsSharp.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 +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- 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 +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined.ttf +0 -0
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsRounded.ttf +0 -0
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsSharp.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$future$1$1$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 +1 -0
- 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 +2 -0
- 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 +16 -0
- 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$future$1$1$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/android/build.gradle +66 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +111 -0
- package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +26 -0
- package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +50 -0
- package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +42 -0
- package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +37 -0
- package/assets/fonts/MaterialSymbolsOutlined.codepoints +4102 -0
- package/assets/fonts/MaterialSymbolsOutlined.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded.codepoints +4102 -0
- package/assets/fonts/MaterialSymbolsRounded.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp.codepoints +4102 -0
- package/assets/fonts/MaterialSymbolsSharp.ttf +0 -0
- package/ios/ReactNavigationSFSymbolView.h +14 -0
- package/ios/ReactNavigationSFSymbolView.mm +58 -0
- package/ios/ReactNavigationSFSymbolView.swift +50 -0
- package/lib/module/Link.js.map +1 -1
- package/lib/module/NavigationContainer.js +73 -63
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
- package/lib/module/createStaticNavigation.js +3 -6
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/extractPathFromURL.js +12 -7
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/getStateFromHref.js +30 -0
- package/lib/module/getStateFromHref.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/MaterialSymbol.android.js +57 -0
- package/lib/module/native/MaterialSymbol.android.js.map +1 -0
- package/lib/module/native/MaterialSymbol.js +9 -0
- package/lib/module/native/MaterialSymbol.js.map +1 -0
- package/lib/module/native/MaterialSymbolData.js +11 -0
- package/lib/module/native/MaterialSymbolData.js.map +1 -0
- package/lib/module/native/MaterialSymbolViewNativeComponent.ts +19 -0
- package/lib/module/native/NativeMaterialSymbolModule.js +7 -0
- package/lib/module/native/NativeMaterialSymbolModule.js.map +1 -0
- package/lib/module/native/SFSymbol.ios.js +23 -0
- package/lib/module/native/SFSymbol.ios.js.map +1 -0
- package/lib/module/native/SFSymbol.js +6 -0
- package/lib/module/native/SFSymbol.js.map +1 -0
- package/lib/module/native/SFSymbolViewNativeComponent.ts +18 -0
- package/lib/module/native/types.js +4 -0
- package/lib/module/native/types.js.map +1 -0
- package/lib/module/theming/DarkTheme.js.map +1 -1
- package/lib/module/theming/DefaultTheme.js +1 -1
- package/lib/module/theming/DefaultTheme.js.map +1 -1
- package/lib/module/theming/fonts.js.map +1 -1
- package/lib/module/useLinkBuilder.js +7 -10
- package/lib/module/useLinkBuilder.js.map +1 -1
- package/lib/module/useLinkProps.js +20 -0
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinking.js +23 -24
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +21 -36
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useScrollToTop.js +1 -0
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/module/useThenable.js +9 -6
- package/lib/module/useThenable.js.map +1 -1
- package/lib/typescript/src/Link.d.ts +3 -2
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/NavigationContainer.d.ts +35 -7
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +1 -2
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/createStaticNavigation.d.ts +3 -3
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts +2 -1
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
- package/lib/typescript/src/getStateFromHref.d.ts +4 -0
- package/lib/typescript/src/getStateFromHref.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts +8 -0
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -0
- package/lib/typescript/src/native/MaterialSymbol.d.ts +8 -0
- package/lib/typescript/src/native/MaterialSymbol.d.ts.map +1 -0
- package/lib/typescript/src/native/MaterialSymbolData.d.ts +7 -0
- package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -0
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +10 -0
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts +7 -0
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts.map +1 -0
- package/lib/typescript/src/native/SFSymbol.d.ts +5 -0
- package/lib/typescript/src/native/SFSymbol.d.ts.map +1 -0
- package/lib/typescript/src/native/SFSymbol.ios.d.ts +5 -0
- package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -0
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +9 -0
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/native/types.d.ts +45 -0
- package/lib/typescript/src/native/types.d.ts.map +1 -0
- package/lib/typescript/src/theming/DarkTheme.d.ts +63 -2
- package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts +63 -2
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -1
- package/lib/typescript/src/theming/fonts.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +49 -23
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +21 -13
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
- package/lib/typescript/src/useLinkProps.d.ts +3 -3
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.d.ts +48 -4
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +69 -4
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
- package/lib/typescript/src/useThenable.d.ts +4 -1
- package/lib/typescript/src/useThenable.d.ts.map +1 -1
- package/package.json +28 -8
- package/src/Link.tsx +18 -15
- package/src/NavigationContainer.tsx +141 -84
- package/src/__stubs__/createStackNavigator.tsx +0 -2
- package/src/createStaticNavigation.tsx +8 -12
- package/src/extractPathFromURL.tsx +28 -18
- package/src/getStateFromHref.tsx +46 -0
- package/src/index.tsx +5 -1
- package/src/native/MaterialSymbol.android.tsx +81 -0
- package/src/native/MaterialSymbol.tsx +17 -0
- package/src/native/MaterialSymbolData.tsx +4112 -0
- package/src/native/MaterialSymbolViewNativeComponent.ts +19 -0
- package/src/native/NativeMaterialSymbolModule.ts +19 -0
- package/src/native/SFSymbol.ios.tsx +30 -0
- package/src/native/SFSymbol.tsx +9 -0
- package/src/native/SFSymbolViewNativeComponent.ts +18 -0
- package/src/native/types.tsx +47 -0
- package/src/theming/DarkTheme.tsx +4 -3
- package/src/theming/DefaultTheme.tsx +5 -4
- package/src/theming/fonts.tsx +1 -2
- package/src/types.tsx +60 -22
- package/src/useLinkBuilder.tsx +8 -11
- package/src/useLinkProps.tsx +36 -7
- package/src/useLinking.native.tsx +25 -48
- package/src/useLinking.tsx +32 -38
- package/src/useScrollToTop.tsx +3 -1
- package/src/useThenable.tsx +14 -6
- package/lib/module/UnhandledLinkingContext.js +0 -14
- package/lib/module/UnhandledLinkingContext.js.map +0 -1
- package/lib/typescript/src/UnhandledLinkingContext.d.ts +0 -6
- package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +0 -1
- package/src/UnhandledLinkingContext.tsx +0 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"useLinkProps.d.ts","sourceRoot":"","sources":["../../../src/useLinkProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EAKrB,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,qBAAqB,EAAY,MAAM,cAAc,CAAC;AAIpE,MAAM,MAAM,SAAS,CACnB,SAAS,SAAS,EAAE,GAAG,aAAa,EACpC,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,IAEjD,CAAC;IACC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B,GAAG,CAAC,SAAS,SAAS,OAAO,GAC1B,SAAS,SAAS,SAAS,CAAC,SAAS,CAAC,GACpC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,GACpD;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,GACrD,KAAK,CAAC,CAAC,GACX;IACE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AA+BN;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,KAAK,CAAC,SAAS,SAAS,EAAE,GAAG,aAAa,EAC1C,KAAK,CAAC,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,SAAS,EACzD,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC;;;kBAM3D,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB;EAwG9E"}
|
|
@@ -1,14 +1,58 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type NavigationContainerRef, type ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { LinkingOptions } from './types';
|
|
4
|
-
type
|
|
4
|
+
import type { Thenable } from './useThenable';
|
|
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
9
|
type Options = LinkingOptions<ParamListBase>;
|
|
10
|
-
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options
|
|
11
|
-
getInitialState: () =>
|
|
10
|
+
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, config, getStateFromPath, getPathFromState, getActionFromState, }: Options): {
|
|
11
|
+
getInitialState: () => Thenable<(Partial<Omit<Readonly<{
|
|
12
|
+
key: string;
|
|
13
|
+
index: number;
|
|
14
|
+
routeNames: string[];
|
|
15
|
+
history?: unknown[];
|
|
16
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
17
|
+
type: string;
|
|
18
|
+
stale: false;
|
|
19
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
20
|
+
stale?: true;
|
|
21
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
path?: string;
|
|
25
|
+
history?: {
|
|
26
|
+
type: "params";
|
|
27
|
+
params: object;
|
|
28
|
+
}[];
|
|
29
|
+
} & Readonly<{
|
|
30
|
+
params?: Readonly<object | undefined>;
|
|
31
|
+
}>>>[];
|
|
32
|
+
}> & {
|
|
33
|
+
state?: Partial<Omit<Readonly<{
|
|
34
|
+
key: string;
|
|
35
|
+
index: number;
|
|
36
|
+
routeNames: string[];
|
|
37
|
+
history?: unknown[];
|
|
38
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
39
|
+
type: string;
|
|
40
|
+
stale: false;
|
|
41
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
42
|
+
stale?: true;
|
|
43
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
44
|
+
key: string;
|
|
45
|
+
name: string;
|
|
46
|
+
path?: string;
|
|
47
|
+
history?: {
|
|
48
|
+
type: "params";
|
|
49
|
+
params: object;
|
|
50
|
+
}[];
|
|
51
|
+
} & Readonly<{
|
|
52
|
+
params?: Readonly<object | undefined>;
|
|
53
|
+
}>>>[];
|
|
54
|
+
}> & /*elided*/ any;
|
|
55
|
+
}) | undefined>;
|
|
12
56
|
};
|
|
13
57
|
export {};
|
|
14
58
|
//# sourceMappingURL=useLinking.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.d.ts","sourceRoot":"","sources":["../../../src/useLinking.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AA4D9C;;GAEG;AACH,eAAO,MAAM,MAAM,GAAI,IAAI,MAAM,OAAO,CAAC,IAAI,CAAC,eAO7C,CAAC;AAIF,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAE7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,EAClE,EACE,OAAc,EACd,MAAM,EACN,gBAA0C,EAC1C,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+UX"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type NavigationContainerRef, type ParamListBase } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { LinkingOptions } from './types';
|
|
4
|
+
import type { Thenable } from './useThenable';
|
|
4
5
|
type Options = LinkingOptions<ParamListBase>;
|
|
5
|
-
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options
|
|
6
|
-
getInitialState: () =>
|
|
6
|
+
export declare function useLinking(ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>, { enabled, prefixes, filter, config, getInitialURL, subscribe, getStateFromPath, getActionFromState, }: Options): {
|
|
7
|
+
getInitialState: () => Thenable<(Partial<Omit<Readonly<{
|
|
7
8
|
key: string;
|
|
8
9
|
index: number;
|
|
9
10
|
routeNames: string[];
|
|
@@ -13,7 +14,61 @@ export declare function useLinking(ref: React.RefObject<NavigationContainerRef<P
|
|
|
13
14
|
stale: false;
|
|
14
15
|
}>, "stale" | "routes">> & Readonly<{
|
|
15
16
|
stale?: true;
|
|
16
|
-
routes: import("@react-navigation/routers").PartialRoute<
|
|
17
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
18
|
+
key: string;
|
|
19
|
+
name: string;
|
|
20
|
+
path?: string;
|
|
21
|
+
history?: {
|
|
22
|
+
type: "params";
|
|
23
|
+
params: object;
|
|
24
|
+
}[];
|
|
25
|
+
} & Readonly<{
|
|
26
|
+
params?: Readonly<object | undefined>;
|
|
27
|
+
}>>>[];
|
|
28
|
+
}> & {
|
|
29
|
+
state?: Partial<Omit<Readonly<{
|
|
30
|
+
key: string;
|
|
31
|
+
index: number;
|
|
32
|
+
routeNames: string[];
|
|
33
|
+
history?: unknown[];
|
|
34
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
35
|
+
type: string;
|
|
36
|
+
stale: false;
|
|
37
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
38
|
+
stale?: true;
|
|
39
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
40
|
+
key: string;
|
|
41
|
+
name: string;
|
|
42
|
+
path?: string;
|
|
43
|
+
history?: {
|
|
44
|
+
type: "params";
|
|
45
|
+
params: object;
|
|
46
|
+
}[];
|
|
47
|
+
} & Readonly<{
|
|
48
|
+
params?: Readonly<object | undefined>;
|
|
49
|
+
}>>>[];
|
|
50
|
+
}> & /*elided*/ any;
|
|
51
|
+
}) | undefined> | Promise<(Partial<Omit<Readonly<{
|
|
52
|
+
key: string;
|
|
53
|
+
index: number;
|
|
54
|
+
routeNames: string[];
|
|
55
|
+
history?: unknown[];
|
|
56
|
+
routes: import("@react-navigation/routers").NavigationRoute<ParamListBase, string>[];
|
|
57
|
+
type: string;
|
|
58
|
+
stale: false;
|
|
59
|
+
}>, "stale" | "routes">> & Readonly<{
|
|
60
|
+
stale?: true;
|
|
61
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
62
|
+
key: string;
|
|
63
|
+
name: string;
|
|
64
|
+
path?: string;
|
|
65
|
+
history?: {
|
|
66
|
+
type: "params";
|
|
67
|
+
params: object;
|
|
68
|
+
}[];
|
|
69
|
+
} & Readonly<{
|
|
70
|
+
params?: Readonly<object | undefined>;
|
|
71
|
+
}>>>[];
|
|
17
72
|
}> & {
|
|
18
73
|
state?: Partial<Omit<Readonly<{
|
|
19
74
|
key: string;
|
|
@@ -25,7 +80,17 @@ export declare function useLinking(ref: React.RefObject<NavigationContainerRef<P
|
|
|
25
80
|
stale: false;
|
|
26
81
|
}>, "stale" | "routes">> & Readonly<{
|
|
27
82
|
stale?: true;
|
|
28
|
-
routes: import("@react-navigation/routers").PartialRoute<
|
|
83
|
+
routes: import("@react-navigation/routers").PartialRoute<Readonly<{
|
|
84
|
+
key: string;
|
|
85
|
+
name: string;
|
|
86
|
+
path?: string;
|
|
87
|
+
history?: {
|
|
88
|
+
type: "params";
|
|
89
|
+
params: object;
|
|
90
|
+
}[];
|
|
91
|
+
} & Readonly<{
|
|
92
|
+
params?: Readonly<object | undefined>;
|
|
93
|
+
}>>>[];
|
|
29
94
|
}> & /*elided*/ any;
|
|
30
95
|
}) | undefined>;
|
|
31
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,EAClE,EACE,OAAc,EACd,
|
|
1
|
+
{"version":3,"file":"useLinking.native.d.ts","sourceRoot":"","sources":["../../../src/useLinking.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAI9C,KAAK,OAAO,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;AAI7C,wBAAgB,UAAU,CACxB,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,sBAAsB,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,EAClE,EACE,OAAc,EACd,QAAgB,EAChB,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAQC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkJX"}
|
|
@@ -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,QAsErE"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Thenable<T> = {
|
|
2
|
+
then(onfulfilled?: (value: T) => unknown): PromiseLike<unknown>;
|
|
3
|
+
};
|
|
4
|
+
export declare function useThenable<T>(create: () => Thenable<T> | undefined): [boolean, T | undefined];
|
|
2
5
|
//# sourceMappingURL=useThenable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useThenable.d.ts","sourceRoot":"","sources":["../../../src/useThenable.tsx"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IACxB,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;CACjE,CAAC;AAEF,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,4BA2CnE"}
|
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": "
|
|
4
|
+
"version": "8.0.0-alpha.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-native",
|
|
7
7
|
"react-navigation",
|
|
@@ -30,7 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"src",
|
|
33
|
+
"assets",
|
|
33
34
|
"lib",
|
|
35
|
+
"ios",
|
|
36
|
+
"android",
|
|
37
|
+
"ReactNavigation.podspec",
|
|
34
38
|
"!**/__tests__"
|
|
35
39
|
],
|
|
36
40
|
"sideEffects": false,
|
|
@@ -42,27 +46,28 @@
|
|
|
42
46
|
"clean": "del lib"
|
|
43
47
|
},
|
|
44
48
|
"dependencies": {
|
|
45
|
-
"@react-navigation/core": "^
|
|
49
|
+
"@react-navigation/core": "^8.0.0-alpha.1",
|
|
46
50
|
"escape-string-regexp": "^4.0.0",
|
|
47
51
|
"fast-deep-equal": "^3.1.3",
|
|
48
52
|
"nanoid": "^3.3.11",
|
|
49
|
-
"
|
|
53
|
+
"sf-symbols-typescript": "^2.2.0",
|
|
54
|
+
"use-latest-callback": "^0.3.2"
|
|
50
55
|
},
|
|
51
56
|
"devDependencies": {
|
|
52
57
|
"@jest/globals": "^30.0.0",
|
|
53
58
|
"@testing-library/react-native": "^13.2.1",
|
|
54
|
-
"@types/react": "~19.
|
|
59
|
+
"@types/react": "~19.1.10",
|
|
55
60
|
"@types/react-dom": "~19.1.7",
|
|
56
61
|
"del-cli": "^6.0.0",
|
|
57
62
|
"react": "19.1.0",
|
|
58
63
|
"react-dom": "19.1.0",
|
|
59
|
-
"react-native": "0.81.
|
|
60
|
-
"react-native-builder-bob": "^0.40.
|
|
64
|
+
"react-native": "0.81.4",
|
|
65
|
+
"react-native-builder-bob": "^0.40.12",
|
|
61
66
|
"react-test-renderer": "19.1.0",
|
|
62
67
|
"typescript": "^5.9.2"
|
|
63
68
|
},
|
|
64
69
|
"peerDependencies": {
|
|
65
|
-
"react": ">=
|
|
70
|
+
"react": ">= 19.0.0",
|
|
66
71
|
"react-native": "*"
|
|
67
72
|
},
|
|
68
73
|
"react-native-builder-bob": {
|
|
@@ -83,5 +88,20 @@
|
|
|
83
88
|
]
|
|
84
89
|
]
|
|
85
90
|
},
|
|
86
|
-
"
|
|
91
|
+
"codegenConfig": {
|
|
92
|
+
"name": "ReactNavigationSpec",
|
|
93
|
+
"type": "all",
|
|
94
|
+
"jsSrcsDir": "src/native",
|
|
95
|
+
"android": {
|
|
96
|
+
"componentProvider": {
|
|
97
|
+
"ReactNavigationMaterialSymbolView": "ReactNavigationMaterialSymbolView"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"ios": {
|
|
101
|
+
"componentProvider": {
|
|
102
|
+
"ReactNavigationSFSymbolView": "ReactNavigationSFSymbolView"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"gitHead": "7c3631904a6c70265ec6a2639fa0c0befc79d05c"
|
|
87
107
|
}
|
package/src/Link.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useTheme } from '@react-navigation/core';
|
|
1
|
+
import { type RootParamList, useTheme } from '@react-navigation/core';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import {
|
|
4
4
|
type GestureResponderEvent,
|
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import { type LinkProps, useLinkProps } from './useLinkProps';
|
|
11
11
|
|
|
12
|
-
type Props<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
type Props<
|
|
13
|
+
ParamList extends {} = RootParamList,
|
|
14
|
+
RouteName extends keyof ParamList = keyof ParamList,
|
|
15
|
+
> = LinkProps<ParamList, RouteName> &
|
|
16
|
+
Omit<TextProps, 'disabled'> & {
|
|
17
|
+
target?: string;
|
|
18
|
+
onPress?: (
|
|
19
|
+
e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
|
|
20
|
+
) => void;
|
|
21
|
+
disabled?: boolean | null;
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
};
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Component to render link to another screen using a path.
|
|
@@ -32,14 +32,17 @@ type Props<ParamList extends ReactNavigation.RootParamList> =
|
|
|
32
32
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
33
33
|
* @param props.children Child elements to render the content.
|
|
34
34
|
*/
|
|
35
|
-
export function Link<
|
|
35
|
+
export function Link<
|
|
36
|
+
const ParamList extends {} = RootParamList,
|
|
37
|
+
const RouteName extends keyof ParamList = keyof ParamList,
|
|
38
|
+
>({
|
|
36
39
|
screen,
|
|
37
40
|
params,
|
|
38
41
|
action,
|
|
39
42
|
href,
|
|
40
43
|
style,
|
|
41
44
|
...rest
|
|
42
|
-
}: Props<ParamList>) {
|
|
45
|
+
}: Props<ParamList, RouteName>) {
|
|
43
46
|
const { colors, fonts } = useTheme();
|
|
44
47
|
// @ts-expect-error: This is already type-checked by the prop types
|
|
45
48
|
const props = useLinkProps<ParamList>({ screen, params, action, href });
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
getActionFromState,
|
|
4
4
|
getPathFromState,
|
|
5
5
|
getStateFromPath,
|
|
6
|
+
type InitialState,
|
|
6
7
|
type NavigationContainerProps,
|
|
7
8
|
type NavigationContainerRef,
|
|
8
|
-
type NavigationState,
|
|
9
9
|
type ParamListBase,
|
|
10
|
+
type RootParamList,
|
|
10
11
|
ThemeProvider,
|
|
11
12
|
validatePathConfig,
|
|
12
13
|
} from '@react-navigation/core';
|
|
13
14
|
import * as React from 'react';
|
|
14
|
-
import { I18nManager } from 'react-native';
|
|
15
|
-
import useLatestCallback from 'use-latest-callback';
|
|
15
|
+
import { I18nManager, Platform } from 'react-native';
|
|
16
16
|
|
|
17
17
|
import { LinkingContext } from './LinkingContext';
|
|
18
18
|
import { LocaleDirContext } from './LocaleDirContext';
|
|
@@ -21,12 +21,12 @@ import type {
|
|
|
21
21
|
DocumentTitleOptions,
|
|
22
22
|
LinkingOptions,
|
|
23
23
|
LocaleDirection,
|
|
24
|
+
Persistor,
|
|
24
25
|
} from './types';
|
|
25
|
-
import { UnhandledLinkingContext } from './UnhandledLinkingContext';
|
|
26
26
|
import { useBackButton } from './useBackButton';
|
|
27
27
|
import { useDocumentTitle } from './useDocumentTitle';
|
|
28
28
|
import { useLinking } from './useLinking';
|
|
29
|
-
import { useThenable } from './useThenable';
|
|
29
|
+
import { type Thenable, useThenable } from './useThenable';
|
|
30
30
|
|
|
31
31
|
declare global {
|
|
32
32
|
var REACT_NAVIGATION_DEVTOOLS: WeakMap<
|
|
@@ -41,7 +41,9 @@ type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
|
41
41
|
/**
|
|
42
42
|
* Initial state object for the navigation tree.
|
|
43
43
|
*
|
|
44
|
-
* If this is provided
|
|
44
|
+
* If this is provided:
|
|
45
|
+
* - Deep link or URLs won't be handled on the initial render.
|
|
46
|
+
* - Persisted state won't be restored.
|
|
45
47
|
*/
|
|
46
48
|
initialState?: NavigationContainerProps['initialState'];
|
|
47
49
|
/**
|
|
@@ -56,11 +58,36 @@ type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
|
56
58
|
*/
|
|
57
59
|
linking?: LinkingOptions<ParamList>;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Persistor object to persist and restore navigation state.
|
|
62
|
+
*
|
|
63
|
+
* State is not restored if a deep link is handled on the initial render
|
|
64
|
+
* Not supported on web when linking is enabled.
|
|
65
|
+
*
|
|
66
|
+
* Example:
|
|
67
|
+
*
|
|
68
|
+
* ```ts
|
|
69
|
+
* const persistor = {
|
|
70
|
+
* async persist(state) {
|
|
71
|
+
* await AsyncStorage.setItem('state-key-v1', JSON.stringify(state));
|
|
72
|
+
* },
|
|
73
|
+
* async restore() {
|
|
74
|
+
* const state = await AsyncStorage.getItem('state-key-v1');
|
|
75
|
+
*
|
|
76
|
+
* return state ? JSON.parse(state) : undefined;
|
|
77
|
+
* },
|
|
78
|
+
* };
|
|
79
|
+
*
|
|
80
|
+
* <NavigationContainer persistor={persistor}>...</NavigationContainer>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
persistor?: Persistor;
|
|
84
|
+
/**
|
|
85
|
+
* Fallback element to render until initial state is resolved.
|
|
86
|
+
* Used when deep link or persisted state is being restored asynchronously.
|
|
60
87
|
*
|
|
61
88
|
* Defaults to `null`.
|
|
62
89
|
*/
|
|
63
|
-
fallback?: React.
|
|
90
|
+
fallback?: React.ReactElement | null;
|
|
64
91
|
/**
|
|
65
92
|
* Options to configure the document title on Web.
|
|
66
93
|
*
|
|
@@ -70,21 +97,22 @@ type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
|
70
97
|
documentTitle?: DocumentTitleOptions;
|
|
71
98
|
};
|
|
72
99
|
|
|
100
|
+
const RESTORE_STATE_ERROR =
|
|
101
|
+
'Failed to restore navigation state. The state will be initialized based on the navigation tree.';
|
|
102
|
+
|
|
73
103
|
function NavigationContainerInner(
|
|
74
104
|
{
|
|
75
105
|
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
76
106
|
theme = DefaultTheme,
|
|
77
107
|
linking,
|
|
108
|
+
persistor,
|
|
78
109
|
fallback = null,
|
|
79
110
|
documentTitle,
|
|
80
|
-
onReady,
|
|
81
111
|
onStateChange,
|
|
82
112
|
...rest
|
|
83
113
|
}: Props<ParamListBase>,
|
|
84
114
|
ref?: React.Ref<NavigationContainerRef<ParamListBase> | null>
|
|
85
115
|
) {
|
|
86
|
-
const isLinkingEnabled = linking ? linking.enabled !== false : false;
|
|
87
|
-
|
|
88
116
|
if (linking?.config) {
|
|
89
117
|
validatePathConfig(linking.config);
|
|
90
118
|
}
|
|
@@ -95,82 +123,108 @@ function NavigationContainerInner(
|
|
|
95
123
|
useBackButton(refContainer);
|
|
96
124
|
useDocumentTitle(refContainer, documentTitle);
|
|
97
125
|
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
prefixes: [],
|
|
107
|
-
...linking,
|
|
108
|
-
},
|
|
109
|
-
setLastUnhandledLink
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
const linkingContext = React.useMemo(() => ({ options: linking }), [linking]);
|
|
126
|
+
const linkingConfig = React.useMemo(() => {
|
|
127
|
+
if (linking == null) {
|
|
128
|
+
return {
|
|
129
|
+
options: {
|
|
130
|
+
enabled: false,
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
}
|
|
113
134
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
135
|
+
return {
|
|
136
|
+
options: {
|
|
137
|
+
...linking,
|
|
138
|
+
enabled: linking.enabled !== false,
|
|
139
|
+
prefixes: linking.prefixes ?? ['*'],
|
|
140
|
+
getStateFromPath: linking?.getStateFromPath ?? getStateFromPath,
|
|
141
|
+
getPathFromState: linking?.getPathFromState ?? getPathFromState,
|
|
142
|
+
getActionFromState: linking?.getActionFromState ?? getActionFromState,
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
}, [linking]);
|
|
118
146
|
|
|
119
|
-
const
|
|
120
|
-
// If the screen path matches lastUnhandledLink, we do not track it
|
|
121
|
-
const path = refContainer.current?.getCurrentRoute()?.path;
|
|
122
|
-
setLastUnhandledLink((previousLastUnhandledLink) => {
|
|
123
|
-
if (previousLastUnhandledLink === path) {
|
|
124
|
-
return undefined;
|
|
125
|
-
}
|
|
126
|
-
return previousLastUnhandledLink;
|
|
127
|
-
});
|
|
128
|
-
onReady?.();
|
|
129
|
-
});
|
|
147
|
+
const { getInitialState } = useLinking(refContainer, linkingConfig.options);
|
|
130
148
|
|
|
131
|
-
const onStateChangeForLinkingHandling = useLatestCallback(
|
|
132
|
-
(state: Readonly<NavigationState> | undefined) => {
|
|
133
|
-
// If the screen path matches lastUnhandledLink, we do not track it
|
|
134
|
-
const path = refContainer.current?.getCurrentRoute()?.path;
|
|
135
|
-
setLastUnhandledLink((previousLastUnhandledLink) => {
|
|
136
|
-
if (previousLastUnhandledLink === path) {
|
|
137
|
-
return undefined;
|
|
138
|
-
}
|
|
139
|
-
return previousLastUnhandledLink;
|
|
140
|
-
});
|
|
141
|
-
onStateChange?.(state);
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
149
|
// Add additional linking related info to the ref
|
|
145
150
|
// This will be used by the devtools
|
|
146
151
|
React.useEffect(() => {
|
|
147
152
|
if (refContainer.current) {
|
|
148
153
|
REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
|
149
154
|
get linking() {
|
|
150
|
-
return
|
|
151
|
-
...linking,
|
|
152
|
-
enabled: isLinkingEnabled,
|
|
153
|
-
prefixes: linking?.prefixes ?? [],
|
|
154
|
-
getStateFromPath: linking?.getStateFromPath ?? getStateFromPath,
|
|
155
|
-
getPathFromState: linking?.getPathFromState ?? getPathFromState,
|
|
156
|
-
getActionFromState:
|
|
157
|
-
linking?.getActionFromState ?? getActionFromState,
|
|
158
|
-
};
|
|
155
|
+
return linkingConfig.options;
|
|
159
156
|
},
|
|
160
157
|
});
|
|
161
158
|
}
|
|
162
159
|
});
|
|
163
160
|
|
|
164
|
-
const [
|
|
161
|
+
const [isLinkStateResolved, initialStateFromLink] = useThenable(() => {
|
|
162
|
+
if (rest.initialState != null || !linkingConfig.options.enabled) {
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return getInitialState();
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
const isPersistenceSupported =
|
|
170
|
+
Platform.OS === 'web' ? !linkingConfig.options.enabled : true;
|
|
171
|
+
|
|
172
|
+
const [isPersistedStateResolved, initialStateFromPersisted] = useThenable(
|
|
173
|
+
() => {
|
|
174
|
+
if (
|
|
175
|
+
isPersistenceSupported === false ||
|
|
176
|
+
rest.initialState != null ||
|
|
177
|
+
persistor == null
|
|
178
|
+
) {
|
|
179
|
+
return undefined;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
let restoredState;
|
|
183
|
+
|
|
184
|
+
try {
|
|
185
|
+
restoredState = persistor.restore();
|
|
186
|
+
} catch (e) {
|
|
187
|
+
console.error(RESTORE_STATE_ERROR, e);
|
|
188
|
+
|
|
189
|
+
return undefined;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (restoredState == null) {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
if ('then' in restoredState) {
|
|
197
|
+
return restoredState.then(
|
|
198
|
+
(state) => state,
|
|
199
|
+
(error) => {
|
|
200
|
+
console.error(RESTORE_STATE_ERROR, error);
|
|
201
|
+
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const thenable: Thenable<InitialState | undefined> = {
|
|
208
|
+
then(onfulfilled) {
|
|
209
|
+
return Promise.resolve(
|
|
210
|
+
onfulfilled ? onfulfilled(restoredState) : restoredState
|
|
211
|
+
);
|
|
212
|
+
},
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
return thenable;
|
|
216
|
+
}
|
|
217
|
+
);
|
|
165
218
|
|
|
166
219
|
// FIXME
|
|
167
220
|
// @ts-expect-error not sure why this is not working
|
|
168
221
|
React.useImperativeHandle(ref, () => refContainer.current);
|
|
169
222
|
|
|
170
|
-
const
|
|
171
|
-
rest.initialState != null ||
|
|
223
|
+
const isStateReady =
|
|
224
|
+
rest.initialState != null ||
|
|
225
|
+
(isLinkStateResolved && isPersistedStateResolved);
|
|
172
226
|
|
|
173
|
-
if (!
|
|
227
|
+
if (!isStateReady) {
|
|
174
228
|
return (
|
|
175
229
|
<LocaleDirContext.Provider value={direction}>
|
|
176
230
|
<ThemeProvider value={theme}>{fallback}</ThemeProvider>
|
|
@@ -180,32 +234,35 @@ function NavigationContainerInner(
|
|
|
180
234
|
|
|
181
235
|
return (
|
|
182
236
|
<LocaleDirContext.Provider value={direction}>
|
|
183
|
-
<
|
|
184
|
-
<
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
237
|
+
<LinkingContext.Provider value={linkingConfig}>
|
|
238
|
+
<BaseNavigationContainer
|
|
239
|
+
{...rest}
|
|
240
|
+
theme={theme}
|
|
241
|
+
initialState={
|
|
242
|
+
rest.initialState ??
|
|
243
|
+
initialStateFromLink ??
|
|
244
|
+
initialStateFromPersisted
|
|
245
|
+
}
|
|
246
|
+
onStateChange={(state) => {
|
|
247
|
+
onStateChange?.(state);
|
|
248
|
+
persistor?.persist(state);
|
|
249
|
+
}}
|
|
250
|
+
ref={refContainer}
|
|
251
|
+
/>
|
|
252
|
+
</LinkingContext.Provider>
|
|
197
253
|
</LocaleDirContext.Provider>
|
|
198
254
|
);
|
|
199
255
|
}
|
|
200
256
|
|
|
201
257
|
/**
|
|
202
258
|
* Container component that manages the navigation state.
|
|
259
|
+
*
|
|
203
260
|
* This should be rendered at the root wrapping the whole app.
|
|
204
261
|
*/
|
|
205
262
|
export const NavigationContainer = React.forwardRef(
|
|
206
263
|
NavigationContainerInner
|
|
207
|
-
) as <
|
|
208
|
-
props: Props<
|
|
209
|
-
ref?: React.Ref<NavigationContainerRef<
|
|
264
|
+
) as <ParamList extends {} = RootParamList>(
|
|
265
|
+
props: Props<ParamList> & {
|
|
266
|
+
ref?: React.Ref<NavigationContainerRef<ParamList>>;
|
|
210
267
|
}
|
|
211
268
|
) => React.ReactElement;
|