@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.
Files changed (332) hide show
  1. package/ReactNavigation.podspec +20 -0
  2. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +1 -0
  3. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
  4. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +1 -0
  5. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.dex +0 -0
  6. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.dex +0 -0
  7. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.dex +0 -0
  8. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.dex +0 -0
  9. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.dex +0 -0
  10. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/BuildConfig.dex +0 -0
  11. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$Companion.dex +0 -0
  12. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$WhenMappings.dex +0 -0
  13. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.dex +0 -0
  14. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule.dex +0 -0
  15. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypeface.dex +0 -0
  16. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolView.dex +0 -0
  17. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager$Companion.dex +0 -0
  18. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager.dex +0 -0
  19. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/ReactNavigationPackage.dex +0 -0
  20. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  21. package/android/build/generated/source/buildConfig/debug/org/reactnavigation/BuildConfig.java +10 -0
  22. package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +38 -0
  23. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +42 -0
  24. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +21 -0
  25. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +39 -0
  26. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +20 -0
  27. package/android/build/generated/source/codegen/jni/CMakeLists.txt +28 -0
  28. package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +32 -0
  29. package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +31 -0
  30. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +23 -0
  31. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +25 -0
  32. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +17 -0
  33. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +30 -0
  34. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +101 -0
  35. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +55 -0
  36. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +31 -0
  37. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +71 -0
  38. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +18 -0
  39. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +43 -0
  40. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +16 -0
  41. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +22 -0
  42. package/android/build/generated/source/codegen/schema.json +1 -0
  43. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
  44. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  45. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  46. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  47. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined.ttf +0 -0
  48. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsRounded.ttf +0 -0
  49. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsSharp.ttf +0 -0
  50. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  51. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  52. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  53. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  54. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  55. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +2 -0
  56. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  57. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  58. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  59. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  60. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  61. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  62. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  63. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  64. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/reactnavigation/BuildConfig.class +0 -0
  65. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  66. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
  67. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
  68. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  69. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  70. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined.ttf +0 -0
  71. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsRounded.ttf +0 -0
  72. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsSharp.ttf +0 -0
  73. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  74. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  75. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  76. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  77. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  78. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  79. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/BuildConfig.class +0 -0
  80. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  81. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  82. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
  83. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  84. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  85. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolView.class +0 -0
  86. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  87. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  88. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  89. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  90. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  159. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  160. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  161. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  162. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  163. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  164. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  165. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  166. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  167. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  168. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  169. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  170. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  171. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  172. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  173. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  174. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  175. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  176. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  177. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  178. package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
  179. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  180. package/android/build/tmp/kotlin-classes/debug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  181. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  182. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  183. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
  184. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  185. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  186. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolView.class +0 -0
  187. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  188. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  189. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  190. package/android/build.gradle +66 -0
  191. package/android/gradle.properties +5 -0
  192. package/android/src/main/AndroidManifest.xml +2 -0
  193. package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +111 -0
  194. package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +26 -0
  195. package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +50 -0
  196. package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +42 -0
  197. package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +37 -0
  198. package/assets/fonts/MaterialSymbolsOutlined.codepoints +4102 -0
  199. package/assets/fonts/MaterialSymbolsOutlined.ttf +0 -0
  200. package/assets/fonts/MaterialSymbolsRounded.codepoints +4102 -0
  201. package/assets/fonts/MaterialSymbolsRounded.ttf +0 -0
  202. package/assets/fonts/MaterialSymbolsSharp.codepoints +4102 -0
  203. package/assets/fonts/MaterialSymbolsSharp.ttf +0 -0
  204. package/ios/ReactNavigationSFSymbolView.h +14 -0
  205. package/ios/ReactNavigationSFSymbolView.mm +58 -0
  206. package/ios/ReactNavigationSFSymbolView.swift +50 -0
  207. package/lib/module/Link.js.map +1 -1
  208. package/lib/module/NavigationContainer.js +73 -63
  209. package/lib/module/NavigationContainer.js.map +1 -1
  210. package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
  211. package/lib/module/createStaticNavigation.js +3 -6
  212. package/lib/module/createStaticNavigation.js.map +1 -1
  213. package/lib/module/extractPathFromURL.js +12 -7
  214. package/lib/module/extractPathFromURL.js.map +1 -1
  215. package/lib/module/getStateFromHref.js +30 -0
  216. package/lib/module/getStateFromHref.js.map +1 -0
  217. package/lib/module/index.js +2 -1
  218. package/lib/module/index.js.map +1 -1
  219. package/lib/module/native/MaterialSymbol.android.js +57 -0
  220. package/lib/module/native/MaterialSymbol.android.js.map +1 -0
  221. package/lib/module/native/MaterialSymbol.js +9 -0
  222. package/lib/module/native/MaterialSymbol.js.map +1 -0
  223. package/lib/module/native/MaterialSymbolData.js +11 -0
  224. package/lib/module/native/MaterialSymbolData.js.map +1 -0
  225. package/lib/module/native/MaterialSymbolViewNativeComponent.ts +19 -0
  226. package/lib/module/native/NativeMaterialSymbolModule.js +7 -0
  227. package/lib/module/native/NativeMaterialSymbolModule.js.map +1 -0
  228. package/lib/module/native/SFSymbol.ios.js +23 -0
  229. package/lib/module/native/SFSymbol.ios.js.map +1 -0
  230. package/lib/module/native/SFSymbol.js +6 -0
  231. package/lib/module/native/SFSymbol.js.map +1 -0
  232. package/lib/module/native/SFSymbolViewNativeComponent.ts +18 -0
  233. package/lib/module/native/types.js +4 -0
  234. package/lib/module/native/types.js.map +1 -0
  235. package/lib/module/theming/DarkTheme.js.map +1 -1
  236. package/lib/module/theming/DefaultTheme.js +1 -1
  237. package/lib/module/theming/DefaultTheme.js.map +1 -1
  238. package/lib/module/theming/fonts.js.map +1 -1
  239. package/lib/module/useLinkBuilder.js +7 -10
  240. package/lib/module/useLinkBuilder.js.map +1 -1
  241. package/lib/module/useLinkProps.js +20 -0
  242. package/lib/module/useLinkProps.js.map +1 -1
  243. package/lib/module/useLinking.js +23 -24
  244. package/lib/module/useLinking.js.map +1 -1
  245. package/lib/module/useLinking.native.js +21 -36
  246. package/lib/module/useLinking.native.js.map +1 -1
  247. package/lib/module/useScrollToTop.js +1 -0
  248. package/lib/module/useScrollToTop.js.map +1 -1
  249. package/lib/module/useThenable.js +9 -6
  250. package/lib/module/useThenable.js.map +1 -1
  251. package/lib/typescript/src/Link.d.ts +3 -2
  252. package/lib/typescript/src/Link.d.ts.map +1 -1
  253. package/lib/typescript/src/NavigationContainer.d.ts +35 -7
  254. package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
  255. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +1 -2
  256. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
  257. package/lib/typescript/src/createStaticNavigation.d.ts +3 -3
  258. package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
  259. package/lib/typescript/src/extractPathFromURL.d.ts +2 -1
  260. package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
  261. package/lib/typescript/src/getStateFromHref.d.ts +4 -0
  262. package/lib/typescript/src/getStateFromHref.d.ts.map +1 -0
  263. package/lib/typescript/src/index.d.ts +2 -1
  264. package/lib/typescript/src/index.d.ts.map +1 -1
  265. package/lib/typescript/src/native/MaterialSymbol.android.d.ts +8 -0
  266. package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -0
  267. package/lib/typescript/src/native/MaterialSymbol.d.ts +8 -0
  268. package/lib/typescript/src/native/MaterialSymbol.d.ts.map +1 -0
  269. package/lib/typescript/src/native/MaterialSymbolData.d.ts +7 -0
  270. package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -0
  271. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +10 -0
  272. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -0
  273. package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts +7 -0
  274. package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts.map +1 -0
  275. package/lib/typescript/src/native/SFSymbol.d.ts +5 -0
  276. package/lib/typescript/src/native/SFSymbol.d.ts.map +1 -0
  277. package/lib/typescript/src/native/SFSymbol.ios.d.ts +5 -0
  278. package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -0
  279. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +9 -0
  280. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -0
  281. package/lib/typescript/src/native/types.d.ts +45 -0
  282. package/lib/typescript/src/native/types.d.ts.map +1 -0
  283. package/lib/typescript/src/theming/DarkTheme.d.ts +63 -2
  284. package/lib/typescript/src/theming/DarkTheme.d.ts.map +1 -1
  285. package/lib/typescript/src/theming/DefaultTheme.d.ts +63 -2
  286. package/lib/typescript/src/theming/DefaultTheme.d.ts.map +1 -1
  287. package/lib/typescript/src/theming/fonts.d.ts.map +1 -1
  288. package/lib/typescript/src/types.d.ts +49 -23
  289. package/lib/typescript/src/types.d.ts.map +1 -1
  290. package/lib/typescript/src/useLinkBuilder.d.ts +21 -13
  291. package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
  292. package/lib/typescript/src/useLinkProps.d.ts +3 -3
  293. package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
  294. package/lib/typescript/src/useLinking.d.ts +48 -4
  295. package/lib/typescript/src/useLinking.d.ts.map +1 -1
  296. package/lib/typescript/src/useLinking.native.d.ts +69 -4
  297. package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
  298. package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
  299. package/lib/typescript/src/useThenable.d.ts +4 -1
  300. package/lib/typescript/src/useThenable.d.ts.map +1 -1
  301. package/package.json +28 -8
  302. package/src/Link.tsx +18 -15
  303. package/src/NavigationContainer.tsx +141 -84
  304. package/src/__stubs__/createStackNavigator.tsx +0 -2
  305. package/src/createStaticNavigation.tsx +8 -12
  306. package/src/extractPathFromURL.tsx +28 -18
  307. package/src/getStateFromHref.tsx +46 -0
  308. package/src/index.tsx +5 -1
  309. package/src/native/MaterialSymbol.android.tsx +81 -0
  310. package/src/native/MaterialSymbol.tsx +17 -0
  311. package/src/native/MaterialSymbolData.tsx +4112 -0
  312. package/src/native/MaterialSymbolViewNativeComponent.ts +19 -0
  313. package/src/native/NativeMaterialSymbolModule.ts +19 -0
  314. package/src/native/SFSymbol.ios.tsx +30 -0
  315. package/src/native/SFSymbol.tsx +9 -0
  316. package/src/native/SFSymbolViewNativeComponent.ts +18 -0
  317. package/src/native/types.tsx +47 -0
  318. package/src/theming/DarkTheme.tsx +4 -3
  319. package/src/theming/DefaultTheme.tsx +5 -4
  320. package/src/theming/fonts.tsx +1 -2
  321. package/src/types.tsx +60 -22
  322. package/src/useLinkBuilder.tsx +8 -11
  323. package/src/useLinkProps.tsx +36 -7
  324. package/src/useLinking.native.tsx +25 -48
  325. package/src/useLinking.tsx +32 -38
  326. package/src/useScrollToTop.tsx +3 -1
  327. package/src/useThenable.tsx +14 -6
  328. package/lib/module/UnhandledLinkingContext.js +0 -14
  329. package/lib/module/UnhandledLinkingContext.js.map +0 -1
  330. package/lib/typescript/src/UnhandledLinkingContext.d.ts +0 -6
  331. package/lib/typescript/src/UnhandledLinkingContext.d.ts.map +0 -1
  332. 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,EAKtB,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,CAAC,aAAa,EAC/C,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,CAAC,SAAS,SAAS,eAAe,CAAC,aAAa,EAAE,EAC5E,MAAM,EACN,MAAM,EACN,IAAI,EACJ,MAAM,GACP,EAAE,SAAS,CAAC,SAAS,CAAC;;;kBAMf,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG,qBAAqB;EA0E9E"}
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 { getStateFromPath as getStateFromPathDefault, type NavigationContainerRef, type ParamListBase } from '@react-navigation/core';
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 ResultState = ReturnType<typeof getStateFromPathDefault>;
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, onUnhandledLinking: (lastUnhandledLining: string | undefined) => void): {
11
- getInitialState: () => PromiseLike<ResultState | undefined>;
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,EAIL,gBAAgB,IAAI,uBAAuB,EAC3C,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;AAE9C,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AA0C9D;;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,EACV,kBAAkB,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;2BAmGhD,WAAW,CAAC,WAAW,GAAG,SAAS,CAAC;EAkQ1D"}
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, onUnhandledLinking: (lastUnhandledLining: string | undefined) => void): {
6
- getInitialState: () => PromiseLike<(Partial<Omit<Readonly<{
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<import("@react-navigation/routers").Route<string, object | undefined>>[];
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<import("@react-navigation/routers").Route<string, object | undefined>>[];
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,QAAQ,EACR,MAAM,EACN,MAAM,EACN,aAQI,EACJ,SAmBC,EACD,gBAA0C,EAC1C,kBAA8C,GAC/C,EAAE,OAAO,EACV,kBAAkB,EAAE,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;EA8JtE"}
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,QAoErE"}
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 declare function useThenable<T>(create: () => PromiseLike<T>): [boolean, T | undefined];
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,WAAW,CAAC,CAAC,CAAC,4BAuC1D"}
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": "7.1.28",
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": "^7.14.0",
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
- "use-latest-callback": "^0.2.4"
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.0.10",
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.5",
60
- "react-native-builder-bob": "^0.40.17",
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": ">= 18.2.0",
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
- "gitHead": "e2e5f1e55afe7b135811832487f596c6060def74"
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<ParamList extends ReactNavigation.RootParamList> =
13
- LinkProps<ParamList> &
14
- Omit<TextProps, 'disabled'> & {
15
- target?: string;
16
- onPress?: (
17
- e:
18
- | React.MouseEvent<HTMLAnchorElement, MouseEvent>
19
- | GestureResponderEvent
20
- ) => void;
21
- disabled?: boolean | null;
22
- children: React.ReactNode;
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<ParamList extends ReactNavigation.RootParamList>({
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, deep link or URLs won't be handled on the initial render.
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
- * Fallback element to render until initial state is resolved from deep linking.
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.ReactNode;
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 [lastUnhandledLink, setLastUnhandledLink] = React.useState<
99
- string | undefined
100
- >();
101
-
102
- const { getInitialState } = useLinking(
103
- refContainer,
104
- {
105
- enabled: isLinkingEnabled,
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
- const unhandledLinkingContext = React.useMemo(
115
- () => ({ lastUnhandledLink, setLastUnhandledLink }),
116
- [lastUnhandledLink, setLastUnhandledLink]
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 onReadyForLinkingHandling = useLatestCallback(() => {
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 [isResolved, initialState] = useThenable(getInitialState);
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 isLinkingReady =
171
- rest.initialState != null || !isLinkingEnabled || isResolved;
223
+ const isStateReady =
224
+ rest.initialState != null ||
225
+ (isLinkStateResolved && isPersistedStateResolved);
172
226
 
173
- if (!isLinkingReady) {
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
- <UnhandledLinkingContext.Provider value={unhandledLinkingContext}>
184
- <LinkingContext.Provider value={linkingContext}>
185
- <BaseNavigationContainer
186
- {...rest}
187
- theme={theme}
188
- onReady={onReadyForLinkingHandling}
189
- onStateChange={onStateChangeForLinkingHandling}
190
- initialState={
191
- rest.initialState == null ? initialState : rest.initialState
192
- }
193
- ref={refContainer}
194
- />
195
- </LinkingContext.Provider>
196
- </UnhandledLinkingContext.Provider>
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 <RootParamList extends {} = ReactNavigation.RootParamList>(
208
- props: Props<RootParamList> & {
209
- ref?: React.Ref<NavigationContainerRef<RootParamList>>;
264
+ ) as <ParamList extends {} = RootParamList>(
265
+ props: Props<ParamList> & {
266
+ ref?: React.Ref<NavigationContainerRef<ParamList>>;
210
267
  }
211
268
  ) => React.ReactElement;