@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
@@ -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 '../types';
1
+ import type { Theme } from '@react-navigation/core';
2
+
2
3
  import { fonts } from './fonts';
3
4
 
4
- export const DarkTheme: Theme = {
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 '../types';
1
+ import type { Theme } from '@react-navigation/core';
2
+
2
3
  import { fonts } from './fonts';
3
4
 
4
- export const DefaultTheme: Theme = {
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(216, 216, 216)',
12
+ border: 'rgb(178, 178, 178)',
12
13
  notification: 'rgb(255, 59, 48)',
13
14
  },
14
15
  fonts,
15
- };
16
+ } as const satisfies Theme;
@@ -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
- declare global {
10
- // eslint-disable-next-line @typescript-eslint/no-namespace
11
- namespace ReactNavigation {
12
- interface Theme extends NativeTheme {}
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: string;
36
- background: string;
37
- card: string;
38
- text: string;
39
- border: string;
40
- notification: string;
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
- export type Theme = NativeTheme;
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
- * Defaults to true.
68
+ *
69
+ * Defaults to `true` when a linking config is specified.
58
70
  */
59
71
  enabled?: boolean;
60
72
  /**
61
- * The prefixes are stripped from the URL before parsing them.
62
- * Usually they are the `scheme` + `host` (e.g. `myapp://chat?user=jane`)
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://", // App-specific scheme
71
- * "https://example.com", // Prefix for universal links
72
- * "https://*.example.com" // Prefix which matches any subdomain
92
+ * "myapp://",
93
+ * "https://example.com",
94
+ * "https://*.example.com"
73
95
  * ]
74
96
  * }
75
97
  * ```
76
98
  */
77
- prefixes: string[];
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 () => Linking.removeEventListener('url', onReceiveURL);
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
  };
@@ -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 const useBuildAction = () => {
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
- if (!href.startsWith('/')) {
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('Failed to parse the href to a navigation state.');
120
+ throw new Error(
121
+ `Failed to parse href '${href}' to a navigation state.`
122
+ );
126
123
  }
127
124
  },
128
- [options?.config, getStateFromPathHelper, getActionFromStateHelper]
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.
@@ -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 ReactNavigation.RootParamList,
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<ParamList extends ReactNavigation.RootParamList>({
72
- screen,
73
- params,
74
- href,
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 { extractPathFromURL } from './extractPathFromURL';
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: symbol[] = [];
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) as
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
- // https://github.com/facebook/react-native/commit/6d1aca806cee86ad76de771ed3a1cc62982ebcd7
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.length) {
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.push(handler);
79
+ linkingHandlers.add(handler);
91
80
  }
92
81
 
93
82
  return () => {
94
- const index = linkingHandlers.indexOf(handler);
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 || (filterRef.current && !filterRef.current(url))) {
110
+ if (!url) {
126
111
  return undefined;
127
112
  }
128
113
 
129
- const path = extractPathFromURL(prefixesRef.current, url);
130
-
131
- return path !== undefined
132
- ? getStateFromPathRef.current(path, configRef.current)
133
- : undefined;
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 as PromiseLike<ResultState | undefined>;
174
- }, [getStateFromURL, onUnhandledLinking, prefixes]);
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, onUnhandledLinking, prefixes, ref, subscribe]);
189
+ }, [enabled, getStateFromURL, prefixes, ref, subscribe]);
213
190
 
214
191
  return {
215
192
  getInitialState,