@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
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable import-x/no-default-export */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
codegenNativeComponent,
|
|
5
|
+
CodegenTypes,
|
|
6
|
+
type ColorValue,
|
|
7
|
+
type ViewProps,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
export interface NativeProps extends ViewProps {
|
|
11
|
+
name: string;
|
|
12
|
+
variant: string;
|
|
13
|
+
size: CodegenTypes.Float;
|
|
14
|
+
color: ColorValue;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default codegenNativeComponent<NativeProps>(
|
|
18
|
+
'ReactNavigationMaterialSymbolView'
|
|
19
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* eslint-disable import-x/no-default-export */
|
|
2
|
+
|
|
3
|
+
import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export interface Spec extends TurboModule {
|
|
6
|
+
getImageSource(
|
|
7
|
+
name: string,
|
|
8
|
+
variant: string,
|
|
9
|
+
size: number,
|
|
10
|
+
// Codegen requires using `Object` instead of `object
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
12
|
+
color: Object,
|
|
13
|
+
hash: string
|
|
14
|
+
): string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default TurboModuleRegistry.getEnforcing<Spec>(
|
|
18
|
+
'ReactNavigationMaterialSymbolModule'
|
|
19
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import SFSymbolViewNativeComponent from './SFSymbolViewNativeComponent';
|
|
4
|
+
import type { SFSymbolOptions } from './types';
|
|
5
|
+
|
|
6
|
+
export type SFSymbolProps = SFSymbolOptions & ViewProps;
|
|
7
|
+
|
|
8
|
+
export function SFSymbol({
|
|
9
|
+
name,
|
|
10
|
+
size = 24,
|
|
11
|
+
color = 'black',
|
|
12
|
+
style,
|
|
13
|
+
...rest
|
|
14
|
+
}: SFSymbolProps): React.ReactElement {
|
|
15
|
+
return (
|
|
16
|
+
<SFSymbolViewNativeComponent
|
|
17
|
+
name={name}
|
|
18
|
+
size={size}
|
|
19
|
+
color={color}
|
|
20
|
+
style={[
|
|
21
|
+
{
|
|
22
|
+
width: size,
|
|
23
|
+
height: size,
|
|
24
|
+
},
|
|
25
|
+
style,
|
|
26
|
+
]}
|
|
27
|
+
{...rest}
|
|
28
|
+
/>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { SFSymbolOptions } from './types';
|
|
4
|
+
|
|
5
|
+
export type SFSymbolProps = SFSymbolOptions & ViewProps;
|
|
6
|
+
|
|
7
|
+
export function SFSymbol(_: SFSymbolProps): React.ReactElement {
|
|
8
|
+
throw new Error('SFSymbol is only supported on iOS.');
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable import-x/no-default-export */
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
codegenNativeComponent,
|
|
5
|
+
CodegenTypes,
|
|
6
|
+
type ColorValue,
|
|
7
|
+
type ViewProps,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
|
|
10
|
+
export interface NativeProps extends ViewProps {
|
|
11
|
+
name: string;
|
|
12
|
+
size: CodegenTypes.Float;
|
|
13
|
+
color: ColorValue;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default codegenNativeComponent<NativeProps>(
|
|
17
|
+
'ReactNavigationSFSymbolView'
|
|
18
|
+
);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ColorValue } from 'react-native';
|
|
2
|
+
|
|
3
|
+
import type { MaterialSymbolName } from './MaterialSymbolData';
|
|
4
|
+
|
|
5
|
+
type MaterialSymbolVariant = 'outlined' | 'rounded' | 'sharp';
|
|
6
|
+
|
|
7
|
+
export type MaterialSymbolOptions = {
|
|
8
|
+
/**
|
|
9
|
+
* The name of the Material Symbol to display.
|
|
10
|
+
*/
|
|
11
|
+
name: MaterialSymbolName;
|
|
12
|
+
/**
|
|
13
|
+
* The variant of the symbol.
|
|
14
|
+
*
|
|
15
|
+
* @default 'outlined'
|
|
16
|
+
*/
|
|
17
|
+
variant?: MaterialSymbolVariant;
|
|
18
|
+
/**
|
|
19
|
+
* The size of the symbol.
|
|
20
|
+
*
|
|
21
|
+
* @default 24
|
|
22
|
+
*/
|
|
23
|
+
size?: number;
|
|
24
|
+
/**
|
|
25
|
+
* The color of the symbol.
|
|
26
|
+
*
|
|
27
|
+
* @default 'black'
|
|
28
|
+
*/
|
|
29
|
+
color?: ColorValue;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type SFSymbolOptions = {
|
|
33
|
+
/**
|
|
34
|
+
* The name of the SF Symbol to display.
|
|
35
|
+
*/
|
|
36
|
+
name: import('sf-symbols-typescript').SFSymbol;
|
|
37
|
+
/**
|
|
38
|
+
* The size of the symbol.
|
|
39
|
+
* @default 24
|
|
40
|
+
*/
|
|
41
|
+
size?: number;
|
|
42
|
+
/**
|
|
43
|
+
* The color of the symbol.
|
|
44
|
+
* @default 'black'
|
|
45
|
+
*/
|
|
46
|
+
color?: ColorValue;
|
|
47
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Theme } from '
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
2
|
+
|
|
2
3
|
import { fonts } from './fonts';
|
|
3
4
|
|
|
4
|
-
export const DarkTheme
|
|
5
|
+
export const DarkTheme = {
|
|
5
6
|
dark: true,
|
|
6
7
|
colors: {
|
|
7
8
|
primary: 'rgb(10, 132, 255)',
|
|
@@ -12,4 +13,4 @@ export const DarkTheme: Theme = {
|
|
|
12
13
|
notification: 'rgb(255, 69, 58)',
|
|
13
14
|
},
|
|
14
15
|
fonts,
|
|
15
|
-
};
|
|
16
|
+
} as const satisfies Theme;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import type { Theme } from '
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
2
|
+
|
|
2
3
|
import { fonts } from './fonts';
|
|
3
4
|
|
|
4
|
-
export const DefaultTheme
|
|
5
|
+
export const DefaultTheme = {
|
|
5
6
|
dark: false,
|
|
6
7
|
colors: {
|
|
7
8
|
primary: 'rgb(0, 122, 255)',
|
|
8
9
|
background: 'rgb(242, 242, 242)',
|
|
9
10
|
card: 'rgb(255, 255, 255)',
|
|
10
11
|
text: 'rgb(28, 28, 30)',
|
|
11
|
-
border: 'rgb(
|
|
12
|
+
border: 'rgb(178, 178, 178)',
|
|
12
13
|
notification: 'rgb(255, 59, 48)',
|
|
13
14
|
},
|
|
14
15
|
fonts,
|
|
15
|
-
};
|
|
16
|
+
} as const satisfies Theme;
|
package/src/theming/fonts.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { Theme } from '@react-navigation/core';
|
|
1
2
|
import { Platform } from 'react-native';
|
|
2
3
|
|
|
3
|
-
import type { Theme } from '../types';
|
|
4
|
-
|
|
5
4
|
const WEB_FONT_STACK =
|
|
6
5
|
'system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
|
7
6
|
|
package/src/types.tsx
CHANGED
|
@@ -2,16 +2,23 @@ import type {
|
|
|
2
2
|
getActionFromState as getActionFromStateDefault,
|
|
3
3
|
getPathFromState as getPathFromStateDefault,
|
|
4
4
|
getStateFromPath as getStateFromPathDefault,
|
|
5
|
+
InitialState,
|
|
6
|
+
NavigationState,
|
|
5
7
|
PathConfigMap,
|
|
6
8
|
Route,
|
|
7
9
|
} from '@react-navigation/core';
|
|
10
|
+
import type { ColorValue as ReactNativeColorValue } from 'react-native';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
}
|
|
12
|
+
type ColorValue =
|
|
13
|
+
| `#${string}`
|
|
14
|
+
| `rgb(${string})`
|
|
15
|
+
| `rgba(${string})`
|
|
16
|
+
| `hsl(${string})`
|
|
17
|
+
| `hsla(${string})`
|
|
18
|
+
| `hwb(${string})`
|
|
19
|
+
| `hwba(${string})`
|
|
20
|
+
| `var(--${string})`
|
|
21
|
+
| ReactNativeColorValue;
|
|
15
22
|
|
|
16
23
|
type FontStyle = {
|
|
17
24
|
fontFamily: string;
|
|
@@ -32,12 +39,12 @@ type FontStyle = {
|
|
|
32
39
|
interface NativeTheme {
|
|
33
40
|
dark: boolean;
|
|
34
41
|
colors: {
|
|
35
|
-
primary:
|
|
36
|
-
background:
|
|
37
|
-
card:
|
|
38
|
-
text:
|
|
39
|
-
border:
|
|
40
|
-
notification:
|
|
42
|
+
primary: ColorValue;
|
|
43
|
+
background: ColorValue;
|
|
44
|
+
card: ColorValue;
|
|
45
|
+
text: ColorValue;
|
|
46
|
+
border: ColorValue;
|
|
47
|
+
notification: ColorValue;
|
|
41
48
|
};
|
|
42
49
|
fonts: {
|
|
43
50
|
regular: FontStyle;
|
|
@@ -47,19 +54,34 @@ interface NativeTheme {
|
|
|
47
54
|
};
|
|
48
55
|
}
|
|
49
56
|
|
|
50
|
-
|
|
57
|
+
declare module '@react-navigation/core' {
|
|
58
|
+
interface Theme extends NativeTheme {}
|
|
59
|
+
}
|
|
51
60
|
|
|
52
61
|
export type LocaleDirection = 'ltr' | 'rtl';
|
|
53
62
|
|
|
63
|
+
export type LinkingPrefix = '*' | (string & {});
|
|
64
|
+
|
|
54
65
|
export type LinkingOptions<ParamList extends {}> = {
|
|
55
66
|
/**
|
|
56
67
|
* Whether deep link handling should be enabled.
|
|
57
|
-
*
|
|
68
|
+
*
|
|
69
|
+
* Defaults to `true` when a linking config is specified.
|
|
58
70
|
*/
|
|
59
71
|
enabled?: boolean;
|
|
60
72
|
/**
|
|
61
|
-
* The prefixes
|
|
62
|
-
*
|
|
73
|
+
* The prefixes to match to determine whether to handle a URL.
|
|
74
|
+
*
|
|
75
|
+
* Supported prefix formats:
|
|
76
|
+
* - `${scheme}://` - App-specific scheme, e.g. `myapp://`
|
|
77
|
+
* - `${protocol}://${host}` - Universal links or app links, e.g. `https://example.com`, `https://subdomain.example.com`
|
|
78
|
+
* - `${protocol}://*.${domain}` - Any subdomain of given domain, e.g. `https://*.example.com`
|
|
79
|
+
* - `${protocol}://${host}/${path}` - Subpath of given host, e.g. `https://example.com/app`
|
|
80
|
+
* - `*` - Any domain or subdomain with `http://` and `https://` as well as any app-specific scheme
|
|
81
|
+
*
|
|
82
|
+
* The prefix will be stripped from the URL before it's parsed.
|
|
83
|
+
*
|
|
84
|
+
* Defaults to `[*]`.
|
|
63
85
|
*
|
|
64
86
|
* This is not supported on Web.
|
|
65
87
|
*
|
|
@@ -67,14 +89,14 @@ export type LinkingOptions<ParamList extends {}> = {
|
|
|
67
89
|
* ```js
|
|
68
90
|
* {
|
|
69
91
|
* prefixes: [
|
|
70
|
-
* "myapp://",
|
|
71
|
-
* "https://example.com",
|
|
72
|
-
* "https://*.example.com"
|
|
92
|
+
* "myapp://",
|
|
93
|
+
* "https://example.com",
|
|
94
|
+
* "https://*.example.com"
|
|
73
95
|
* ]
|
|
74
96
|
* }
|
|
75
97
|
* ```
|
|
76
98
|
*/
|
|
77
|
-
prefixes
|
|
99
|
+
prefixes?: LinkingPrefix[];
|
|
78
100
|
/**
|
|
79
101
|
* Optional function which takes an incoming URL returns a boolean
|
|
80
102
|
* indicating whether React Navigation should handle it.
|
|
@@ -153,9 +175,11 @@ export type LinkingOptions<ParamList extends {}> = {
|
|
|
153
175
|
* subscribe: (listener) => {
|
|
154
176
|
* const onReceiveURL = ({ url }) => listener(url);
|
|
155
177
|
*
|
|
156
|
-
* Linking.addEventListener('url', onReceiveURL);
|
|
178
|
+
* const subscription = Linking.addEventListener('url', onReceiveURL);
|
|
157
179
|
*
|
|
158
|
-
* return () =>
|
|
180
|
+
* return () => {
|
|
181
|
+
* subscription.remove();
|
|
182
|
+
* };
|
|
159
183
|
* }
|
|
160
184
|
* }
|
|
161
185
|
* ```
|
|
@@ -186,6 +210,20 @@ export type DocumentTitleOptions = {
|
|
|
186
210
|
) => string;
|
|
187
211
|
};
|
|
188
212
|
|
|
213
|
+
export type Persistor = {
|
|
214
|
+
/**
|
|
215
|
+
* Callback to persist the navigation state.
|
|
216
|
+
*/
|
|
217
|
+
persist(state: NavigationState | undefined): void;
|
|
218
|
+
/**
|
|
219
|
+
* Callback to restore the navigation state.
|
|
220
|
+
* Should return the restored state or a Promise which resolves to the restored state.
|
|
221
|
+
*
|
|
222
|
+
* If a Promise is returned, providing a `fallback` component is recommended.
|
|
223
|
+
*/
|
|
224
|
+
restore(): PromiseLike<InitialState | undefined> | InitialState | undefined;
|
|
225
|
+
};
|
|
226
|
+
|
|
189
227
|
export type ServerContainerRef = {
|
|
190
228
|
getCurrentOptions(): Record<string, any> | undefined;
|
|
191
229
|
};
|
package/src/useLinkBuilder.tsx
CHANGED
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
findFocusedRoute,
|
|
4
4
|
getActionFromState,
|
|
5
5
|
getPathFromState,
|
|
6
|
-
getStateFromPath,
|
|
7
6
|
NavigationHelpersContext,
|
|
8
7
|
NavigationRouteContext,
|
|
9
8
|
useStateForPath,
|
|
10
9
|
} from '@react-navigation/core';
|
|
11
10
|
import * as React from 'react';
|
|
12
11
|
|
|
12
|
+
import { getStateFromHref } from './getStateFromHref';
|
|
13
13
|
import { LinkingContext } from './LinkingContext';
|
|
14
14
|
|
|
15
15
|
type MinimalState = {
|
|
@@ -102,34 +102,31 @@ export function useBuildHref() {
|
|
|
102
102
|
/**
|
|
103
103
|
* Helper to build a navigation action from a href based on the linking options.
|
|
104
104
|
*/
|
|
105
|
-
export
|
|
105
|
+
export function useBuildAction() {
|
|
106
106
|
const { options } = React.useContext(LinkingContext);
|
|
107
107
|
|
|
108
|
-
const getStateFromPathHelper = options?.getStateFromPath ?? getStateFromPath;
|
|
109
108
|
const getActionFromStateHelper =
|
|
110
109
|
options?.getActionFromState ?? getActionFromState;
|
|
111
110
|
|
|
112
111
|
const buildAction = React.useCallback(
|
|
113
112
|
(href: string) => {
|
|
114
|
-
|
|
115
|
-
throw new Error(`The href must start with '/' (${href}).`);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const state = getStateFromPathHelper(href, options?.config);
|
|
113
|
+
const state = getStateFromHref(href, options);
|
|
119
114
|
|
|
120
115
|
if (state) {
|
|
121
116
|
const action = getActionFromStateHelper(state, options?.config);
|
|
122
117
|
|
|
123
118
|
return action ?? CommonActions.reset(state);
|
|
124
119
|
} else {
|
|
125
|
-
throw new Error(
|
|
120
|
+
throw new Error(
|
|
121
|
+
`Failed to parse href '${href}' to a navigation state.`
|
|
122
|
+
);
|
|
126
123
|
}
|
|
127
124
|
},
|
|
128
|
-
[options
|
|
125
|
+
[options, getActionFromStateHelper]
|
|
129
126
|
);
|
|
130
127
|
|
|
131
128
|
return buildAction;
|
|
132
|
-
}
|
|
129
|
+
}
|
|
133
130
|
|
|
134
131
|
/**
|
|
135
132
|
* Helpers to build href or action based on the linking options.
|
package/src/useLinkProps.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
NavigationHelpersContext,
|
|
6
6
|
type NavigatorScreenParams,
|
|
7
7
|
type ParamListBase,
|
|
8
|
+
type RootParamList,
|
|
8
9
|
} from '@react-navigation/core';
|
|
9
10
|
import type { NavigationState, PartialState } from '@react-navigation/routers';
|
|
10
11
|
import * as React from 'react';
|
|
@@ -13,7 +14,7 @@ import { type GestureResponderEvent, Platform } from 'react-native';
|
|
|
13
14
|
import { LinkingContext } from './LinkingContext';
|
|
14
15
|
|
|
15
16
|
export type LinkProps<
|
|
16
|
-
ParamList extends
|
|
17
|
+
ParamList extends {} = RootParamList,
|
|
17
18
|
RouteName extends keyof ParamList = keyof ParamList,
|
|
18
19
|
> =
|
|
19
20
|
| ({
|
|
@@ -68,12 +69,10 @@ const getStateFromParams = (
|
|
|
68
69
|
* @param props.href Optional absolute path to use for the href (e.g. `/feeds/hot`).
|
|
69
70
|
* @param props.action Optional action to use for in-page navigation. By default, the path is parsed to an action based on linking config.
|
|
70
71
|
*/
|
|
71
|
-
export function useLinkProps<
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
action,
|
|
76
|
-
}: LinkProps<ParamList>) {
|
|
72
|
+
export function useLinkProps<
|
|
73
|
+
const ParamList extends {} = RootParamList,
|
|
74
|
+
const RouteName extends keyof ParamList = keyof ParamList,
|
|
75
|
+
>({ screen, params, href, action }: LinkProps<ParamList, RouteName>) {
|
|
77
76
|
const root = React.useContext(NavigationContainerRefContext);
|
|
78
77
|
const navigation = React.useContext(NavigationHelpersContext);
|
|
79
78
|
const { options } = React.useContext(LinkingContext);
|
|
@@ -130,6 +129,36 @@ export function useLinkProps<ParamList extends ReactNavigation.RootParamList>({
|
|
|
130
129
|
|
|
131
130
|
const getPathFromStateHelper = options?.getPathFromState ?? getPathFromState;
|
|
132
131
|
|
|
132
|
+
if (Platform.OS === 'web') {
|
|
133
|
+
if (screen == null && action != null && options?.config != null) {
|
|
134
|
+
switch (action.type) {
|
|
135
|
+
case 'NAVIGATE':
|
|
136
|
+
case 'PUSH':
|
|
137
|
+
case 'REPLACE':
|
|
138
|
+
case 'POP_TO':
|
|
139
|
+
case 'JUMP_TO': {
|
|
140
|
+
if (
|
|
141
|
+
action.payload != null &&
|
|
142
|
+
'name' in action.payload &&
|
|
143
|
+
typeof action.payload.name === 'string' &&
|
|
144
|
+
action.payload.name in options.config.screens
|
|
145
|
+
) {
|
|
146
|
+
screen = action.payload.name;
|
|
147
|
+
|
|
148
|
+
if (
|
|
149
|
+
'params' in action.payload &&
|
|
150
|
+
typeof action.payload.params === 'object' &&
|
|
151
|
+
action.payload.params != null
|
|
152
|
+
) {
|
|
153
|
+
// @ts-expect-error this is fine 🔥
|
|
154
|
+
params = action.payload.params;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
133
162
|
return {
|
|
134
163
|
href:
|
|
135
164
|
href ??
|
|
@@ -8,20 +8,21 @@ import {
|
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import { Linking, Platform } from 'react-native';
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { getStateFromHref } from './getStateFromHref';
|
|
12
12
|
import type { LinkingOptions } from './types';
|
|
13
|
+
import type { Thenable } from './useThenable';
|
|
13
14
|
|
|
14
15
|
type ResultState = ReturnType<typeof getStateFromPathDefault>;
|
|
15
16
|
|
|
16
17
|
type Options = LinkingOptions<ParamListBase>;
|
|
17
18
|
|
|
18
|
-
const linkingHandlers
|
|
19
|
+
const linkingHandlers = new Set<symbol>();
|
|
19
20
|
|
|
20
21
|
export function useLinking(
|
|
21
22
|
ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>,
|
|
22
23
|
{
|
|
23
24
|
enabled = true,
|
|
24
|
-
prefixes,
|
|
25
|
+
prefixes = ['*'],
|
|
25
26
|
filter,
|
|
26
27
|
config,
|
|
27
28
|
getInitialURL = () =>
|
|
@@ -36,27 +37,15 @@ export function useLinking(
|
|
|
36
37
|
subscribe = (listener) => {
|
|
37
38
|
const callback = ({ url }: { url: string }) => listener(url);
|
|
38
39
|
|
|
39
|
-
const subscription = Linking.addEventListener('url', callback)
|
|
40
|
-
| { remove(): void }
|
|
41
|
-
| undefined;
|
|
42
|
-
|
|
43
|
-
// Storing this in a local variable stops Jest from complaining about import after teardown
|
|
44
|
-
// @ts-expect-error: removeEventListener is not present in newer RN versions
|
|
45
|
-
const removeEventListener = Linking.removeEventListener?.bind(Linking);
|
|
40
|
+
const subscription = Linking.addEventListener('url', callback);
|
|
46
41
|
|
|
47
42
|
return () => {
|
|
48
|
-
|
|
49
|
-
if (subscription?.remove) {
|
|
50
|
-
subscription.remove();
|
|
51
|
-
} else {
|
|
52
|
-
removeEventListener?.('url', callback);
|
|
53
|
-
}
|
|
43
|
+
subscription.remove();
|
|
54
44
|
};
|
|
55
45
|
},
|
|
56
46
|
getStateFromPath = getStateFromPathDefault,
|
|
57
47
|
getActionFromState = getActionFromStateDefault,
|
|
58
|
-
}: Options
|
|
59
|
-
onUnhandledLinking: (lastUnhandledLining: string | undefined) => void
|
|
48
|
+
}: Options
|
|
60
49
|
) {
|
|
61
50
|
const independent = useNavigationIndependentTree();
|
|
62
51
|
|
|
@@ -69,7 +58,7 @@ export function useLinking(
|
|
|
69
58
|
return undefined;
|
|
70
59
|
}
|
|
71
60
|
|
|
72
|
-
if (enabled !== false && linkingHandlers.
|
|
61
|
+
if (enabled !== false && linkingHandlers.size) {
|
|
73
62
|
console.error(
|
|
74
63
|
[
|
|
75
64
|
'Looks like you have configured linking in multiple places. This is likely an error since deep links should only be handled in one place to avoid conflicts. Make sure that:',
|
|
@@ -87,15 +76,11 @@ export function useLinking(
|
|
|
87
76
|
const handler = Symbol();
|
|
88
77
|
|
|
89
78
|
if (enabled !== false) {
|
|
90
|
-
linkingHandlers.
|
|
79
|
+
linkingHandlers.add(handler);
|
|
91
80
|
}
|
|
92
81
|
|
|
93
82
|
return () => {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
if (index > -1) {
|
|
97
|
-
linkingHandlers.splice(index, 1);
|
|
98
|
-
}
|
|
83
|
+
linkingHandlers.delete(handler);
|
|
99
84
|
};
|
|
100
85
|
}, [enabled, independent]);
|
|
101
86
|
|
|
@@ -122,15 +107,20 @@ export function useLinking(
|
|
|
122
107
|
|
|
123
108
|
const getStateFromURL = React.useCallback(
|
|
124
109
|
(url: string | null | undefined) => {
|
|
125
|
-
if (!url
|
|
110
|
+
if (!url) {
|
|
126
111
|
return undefined;
|
|
127
112
|
}
|
|
128
113
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
114
|
+
try {
|
|
115
|
+
return getStateFromHref(url, {
|
|
116
|
+
prefixes: prefixesRef.current,
|
|
117
|
+
filter: filterRef.current,
|
|
118
|
+
config: configRef.current,
|
|
119
|
+
getStateFromPath: getStateFromPathRef.current,
|
|
120
|
+
});
|
|
121
|
+
} catch (e) {
|
|
122
|
+
return undefined;
|
|
123
|
+
}
|
|
134
124
|
},
|
|
135
125
|
[]
|
|
136
126
|
);
|
|
@@ -146,32 +136,22 @@ export function useLinking(
|
|
|
146
136
|
return url.then((url) => {
|
|
147
137
|
const state = getStateFromURL(url);
|
|
148
138
|
|
|
149
|
-
if (typeof url === 'string') {
|
|
150
|
-
// If the link were handled, it gets cleared in NavigationContainer
|
|
151
|
-
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
152
|
-
}
|
|
153
|
-
|
|
154
139
|
return state;
|
|
155
140
|
});
|
|
156
|
-
} else {
|
|
157
|
-
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
158
141
|
}
|
|
159
142
|
}
|
|
160
143
|
|
|
161
144
|
state = getStateFromURL(url);
|
|
162
145
|
}
|
|
163
146
|
|
|
164
|
-
const thenable = {
|
|
147
|
+
const thenable: Thenable<ResultState | undefined> = {
|
|
165
148
|
then(onfulfilled?: (state: ResultState | undefined) => void) {
|
|
166
149
|
return Promise.resolve(onfulfilled ? onfulfilled(state) : state);
|
|
167
150
|
},
|
|
168
|
-
catch() {
|
|
169
|
-
return thenable;
|
|
170
|
-
},
|
|
171
151
|
};
|
|
172
152
|
|
|
173
|
-
return thenable
|
|
174
|
-
}, [getStateFromURL
|
|
153
|
+
return thenable;
|
|
154
|
+
}, [getStateFromURL]);
|
|
175
155
|
|
|
176
156
|
React.useEffect(() => {
|
|
177
157
|
const listener = (url: string) => {
|
|
@@ -183,9 +163,6 @@ export function useLinking(
|
|
|
183
163
|
const state = navigation ? getStateFromURL(url) : undefined;
|
|
184
164
|
|
|
185
165
|
if (navigation && state) {
|
|
186
|
-
// If the link were handled, it gets cleared in NavigationContainer
|
|
187
|
-
onUnhandledLinking(extractPathFromURL(prefixes, url));
|
|
188
|
-
|
|
189
166
|
const action = getActionFromStateRef.current(state, configRef.current);
|
|
190
167
|
|
|
191
168
|
if (action !== undefined) {
|
|
@@ -209,7 +186,7 @@ export function useLinking(
|
|
|
209
186
|
};
|
|
210
187
|
|
|
211
188
|
return subscribe(listener);
|
|
212
|
-
}, [enabled, getStateFromURL,
|
|
189
|
+
}, [enabled, getStateFromURL, prefixes, ref, subscribe]);
|
|
213
190
|
|
|
214
191
|
return {
|
|
215
192
|
getInitialState,
|