@react-navigation/native 8.0.0-alpha.2 → 8.0.0-alpha.21

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 (365) hide show
  1. package/android/build.gradle +96 -15
  2. package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +58 -58
  3. package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +81 -4
  4. package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +52 -7
  5. package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +14 -7
  6. package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +14 -15
  7. package/assets/fonts/MaterialSymbolsOutlined_100.ttf +0 -0
  8. package/assets/fonts/MaterialSymbolsOutlined_200.ttf +0 -0
  9. package/assets/fonts/MaterialSymbolsOutlined_300.ttf +0 -0
  10. package/{android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined.ttf → assets/fonts/MaterialSymbolsOutlined_400.ttf} +0 -0
  11. package/assets/fonts/MaterialSymbolsOutlined_500.ttf +0 -0
  12. package/assets/fonts/MaterialSymbolsOutlined_600.ttf +0 -0
  13. package/assets/fonts/MaterialSymbolsOutlined_700.ttf +0 -0
  14. package/assets/fonts/MaterialSymbolsRounded_100.ttf +0 -0
  15. package/assets/fonts/MaterialSymbolsRounded_200.ttf +0 -0
  16. package/assets/fonts/MaterialSymbolsRounded_300.ttf +0 -0
  17. package/assets/fonts/{MaterialSymbolsRounded.ttf → MaterialSymbolsRounded_400.ttf} +0 -0
  18. package/assets/fonts/MaterialSymbolsRounded_500.ttf +0 -0
  19. package/assets/fonts/MaterialSymbolsRounded_600.ttf +0 -0
  20. package/assets/fonts/MaterialSymbolsRounded_700.ttf +0 -0
  21. package/assets/fonts/MaterialSymbolsSharp_100.ttf +0 -0
  22. package/assets/fonts/MaterialSymbolsSharp_200.ttf +0 -0
  23. package/assets/fonts/MaterialSymbolsSharp_300.ttf +0 -0
  24. package/assets/fonts/{MaterialSymbolsSharp.ttf → MaterialSymbolsSharp_400.ttf} +0 -0
  25. package/assets/fonts/MaterialSymbolsSharp_500.ttf +0 -0
  26. package/assets/fonts/MaterialSymbolsSharp_600.ttf +0 -0
  27. package/assets/fonts/MaterialSymbolsSharp_700.ttf +0 -0
  28. package/ios/ReactNavigationCornerInsetView.h +14 -0
  29. package/ios/ReactNavigationCornerInsetView.mm +182 -0
  30. package/ios/ReactNavigationCornerInsetView.swift +193 -0
  31. package/ios/ReactNavigationCornerInsetViewComponentDescriptor.h +23 -0
  32. package/ios/ReactNavigationCornerInsetViewShadowNode.h +27 -0
  33. package/ios/ReactNavigationCornerInsetViewShadowNode.mm +42 -0
  34. package/ios/ReactNavigationCornerInsetViewState.h +19 -0
  35. package/ios/ReactNavigationSFSymbolView.mm +21 -0
  36. package/ios/ReactNavigationSFSymbolView.swift +257 -7
  37. package/lib/module/NavigationContainer.js +16 -11
  38. package/lib/module/NavigationContainer.js.map +1 -1
  39. package/lib/module/ServerContainer.js +5 -4
  40. package/lib/module/ServerContainer.js.map +1 -1
  41. package/lib/module/ServerContext.js.map +1 -1
  42. package/lib/module/__stubs__/createStackNavigator.js +1 -3
  43. package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
  44. package/lib/module/createStaticNavigation.js +5 -4
  45. package/lib/module/createStaticNavigation.js.map +1 -1
  46. package/lib/module/index.js +3 -1
  47. package/lib/module/index.js.map +1 -1
  48. package/lib/module/native/CornerInset.ios.js +66 -0
  49. package/lib/module/native/CornerInset.ios.js.map +1 -0
  50. package/lib/module/native/CornerInset.js +17 -0
  51. package/lib/module/native/CornerInset.js.map +1 -0
  52. package/lib/module/native/MaterialSymbol.android.js +8 -15
  53. package/lib/module/native/MaterialSymbol.android.js.map +1 -1
  54. package/lib/module/native/MaterialSymbolData.js +0 -9
  55. package/lib/module/native/MaterialSymbolData.js.map +1 -1
  56. package/lib/module/native/MaterialSymbolViewNativeComponent.ts +6 -2
  57. package/lib/module/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
  58. package/lib/module/native/SFSymbol.ios.js +24 -1
  59. package/lib/module/native/SFSymbol.ios.js.map +1 -1
  60. package/lib/module/native/SFSymbolViewNativeComponent.ts +15 -1
  61. package/lib/module/native/constants.js +14 -0
  62. package/lib/module/native/constants.js.map +1 -0
  63. package/lib/module/theming/DarkTheme.js +4 -4
  64. package/lib/module/theming/{DefaultTheme.js → LightTheme.js} +5 -5
  65. package/lib/module/theming/LightTheme.js.map +1 -0
  66. package/lib/module/theming/MaterialTheme.android.js +29 -0
  67. package/lib/module/theming/MaterialTheme.android.js.map +1 -0
  68. package/lib/module/theming/MaterialTheme.js +18 -0
  69. package/lib/module/theming/MaterialTheme.js.map +1 -0
  70. package/lib/module/useBackButton.js.map +1 -1
  71. package/lib/module/useDocumentTitle.js.map +1 -1
  72. package/lib/module/useLinkBuilder.js +4 -4
  73. package/lib/module/useLinkBuilder.js.map +1 -1
  74. package/lib/module/useLinkProps.js +5 -26
  75. package/lib/module/useLinkProps.js.map +1 -1
  76. package/lib/module/useLinkTo.js +1 -1
  77. package/lib/module/useLinkTo.js.map +1 -1
  78. package/lib/module/useLinking.js +40 -4
  79. package/lib/module/useLinking.js.map +1 -1
  80. package/lib/module/useLinking.native.js +20 -3
  81. package/lib/module/useLinking.native.js.map +1 -1
  82. package/lib/module/useLocale.js +1 -1
  83. package/lib/module/useLocale.js.map +1 -1
  84. package/lib/module/useRoutePath.js +1 -1
  85. package/lib/module/useRoutePath.js.map +1 -1
  86. package/lib/module/useScrollToTop.js +1 -1
  87. package/lib/module/useScrollToTop.js.map +1 -1
  88. package/lib/typescript/src/NavigationContainer.d.ts +12 -5
  89. package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
  90. package/lib/typescript/src/ServerContainer.d.ts +6 -3
  91. package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
  92. package/lib/typescript/src/ServerContext.d.ts +1 -1
  93. package/lib/typescript/src/ServerContext.d.ts.map +1 -1
  94. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +5 -8
  95. package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
  96. package/lib/typescript/src/createStaticNavigation.d.ts +5 -5
  97. package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
  98. package/lib/typescript/src/index.d.ts +3 -1
  99. package/lib/typescript/src/index.d.ts.map +1 -1
  100. package/lib/typescript/src/native/CornerInset.d.ts +28 -0
  101. package/lib/typescript/src/native/CornerInset.d.ts.map +1 -0
  102. package/lib/typescript/src/native/CornerInset.ios.d.ts +8 -0
  103. package/lib/typescript/src/native/CornerInset.ios.d.ts.map +1 -0
  104. package/lib/typescript/src/native/MaterialSymbol.android.d.ts +2 -2
  105. package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -1
  106. package/lib/typescript/src/native/MaterialSymbolData.d.ts +0 -5
  107. package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -1
  108. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +3 -2
  109. package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -1
  110. package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts +1 -1
  111. package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts.map +1 -1
  112. package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts +14 -0
  113. package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts.map +1 -0
  114. package/lib/typescript/src/native/SFSymbol.ios.d.ts +1 -1
  115. package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -1
  116. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +15 -1
  117. package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -1
  118. package/lib/typescript/src/native/constants.d.ts +12 -0
  119. package/lib/typescript/src/native/constants.d.ts.map +1 -0
  120. package/lib/typescript/src/native/types.d.ts +143 -7
  121. package/lib/typescript/src/native/types.d.ts.map +1 -1
  122. package/lib/typescript/src/theming/DarkTheme.d.ts +4 -4
  123. package/lib/typescript/src/theming/{DefaultTheme.d.ts → LightTheme.d.ts} +5 -5
  124. package/lib/typescript/src/theming/LightTheme.d.ts.map +1 -0
  125. package/lib/typescript/src/theming/MaterialTheme.android.d.ts +127 -0
  126. package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
  127. package/lib/typescript/src/theming/MaterialTheme.d.ts +114 -0
  128. package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
  129. package/lib/typescript/src/types.d.ts +13 -13
  130. package/lib/typescript/src/types.d.ts.map +1 -1
  131. package/lib/typescript/src/useBackButton.d.ts +1 -1
  132. package/lib/typescript/src/useBackButton.d.ts.map +1 -1
  133. package/lib/typescript/src/useDocumentTitle.d.ts +1 -1
  134. package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
  135. package/lib/typescript/src/useLinkBuilder.d.ts +56 -66
  136. package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
  137. package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
  138. package/lib/typescript/src/useLinking.d.ts +11 -13
  139. package/lib/typescript/src/useLinking.d.ts.map +1 -1
  140. package/lib/typescript/src/useLinking.native.d.ts +21 -23
  141. package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
  142. package/package.json +43 -26
  143. package/src/NavigationContainer.tsx +41 -32
  144. package/src/ServerContainer.tsx +3 -5
  145. package/src/ServerContext.tsx +6 -4
  146. package/src/__stubs__/createStackNavigator.tsx +6 -12
  147. package/src/createStaticNavigation.tsx +13 -17
  148. package/src/index.tsx +7 -1
  149. package/src/native/CornerInset.ios.tsx +85 -0
  150. package/src/native/CornerInset.tsx +40 -0
  151. package/src/native/MaterialSymbol.android.tsx +8 -19
  152. package/src/native/MaterialSymbolData.tsx +0 -6
  153. package/src/native/MaterialSymbolViewNativeComponent.ts +6 -2
  154. package/src/native/NativeMaterialSymbolModule.ts +3 -3
  155. package/src/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
  156. package/src/native/SFSymbol.ios.tsx +24 -1
  157. package/src/native/SFSymbolViewNativeComponent.ts +15 -1
  158. package/src/native/constants.tsx +11 -0
  159. package/src/native/types.tsx +182 -7
  160. package/src/theming/DarkTheme.tsx +4 -4
  161. package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +4 -4
  162. package/src/theming/MaterialTheme.android.tsx +30 -0
  163. package/src/theming/MaterialTheme.tsx +19 -0
  164. package/src/types.tsx +38 -36
  165. package/src/useBackButton.tsx +2 -2
  166. package/src/useDocumentTitle.tsx +2 -2
  167. package/src/useLinkBuilder.tsx +11 -5
  168. package/src/useLinkProps.tsx +8 -41
  169. package/src/useLinkTo.tsx +1 -1
  170. package/src/useLinking.native.tsx +41 -20
  171. package/src/useLinking.tsx +68 -9
  172. package/src/useLocale.tsx +1 -1
  173. package/src/useRoutePath.tsx +1 -1
  174. package/src/useScrollToTop.tsx +1 -1
  175. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +0 -1
  176. package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
  177. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +0 -1
  178. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.dex +0 -0
  179. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.dex +0 -0
  180. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.dex +0 -0
  181. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.dex +0 -0
  182. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.dex +0 -0
  183. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/BuildConfig.dex +0 -0
  184. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$Companion.dex +0 -0
  185. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$WhenMappings.dex +0 -0
  186. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.dex +0 -0
  187. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule.dex +0 -0
  188. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypeface.dex +0 -0
  189. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolView.dex +0 -0
  190. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager$Companion.dex +0 -0
  191. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager.dex +0 -0
  192. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/ReactNavigationPackage.dex +0 -0
  193. package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  194. package/android/build/generated/source/buildConfig/debug/org/reactnavigation/BuildConfig.java +0 -10
  195. package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +0 -38
  196. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +0 -42
  197. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +0 -21
  198. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +0 -39
  199. package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +0 -20
  200. package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
  201. package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +0 -32
  202. package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +0 -31
  203. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +0 -23
  204. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +0 -25
  205. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +0 -17
  206. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +0 -30
  207. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +0 -101
  208. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +0 -55
  209. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +0 -31
  210. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +0 -71
  211. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +0 -18
  212. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +0 -43
  213. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +0 -16
  214. package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +0 -22
  215. package/android/build/generated/source/codegen/schema.json +0 -1
  216. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
  217. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
  218. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
  219. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
  220. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsRounded.ttf +0 -0
  221. package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsSharp.ttf +0 -0
  222. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  223. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  224. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  225. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
  226. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
  227. package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
  228. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
  229. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
  230. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  231. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  232. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  233. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  234. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  235. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  236. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/reactnavigation/BuildConfig.class +0 -0
  237. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
  238. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
  239. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
  240. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
  241. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
  242. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined.ttf +0 -0
  243. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsRounded.ttf +0 -0
  244. package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsSharp.ttf +0 -0
  245. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  246. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
  247. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
  248. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
  249. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
  250. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
  251. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/BuildConfig.class +0 -0
  252. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  253. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  254. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
  255. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  256. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  257. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolView.class +0 -0
  258. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  259. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  260. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  261. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  262. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
  263. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  264. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  265. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  266. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  267. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  268. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  269. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  270. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  271. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  272. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  273. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  274. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  275. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  276. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  277. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  278. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  279. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  280. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  281. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  282. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  283. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  284. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  285. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  286. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  287. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  288. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  289. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  290. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  291. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  292. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  293. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  294. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  295. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  296. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  297. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  298. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  299. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  300. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  301. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  302. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  303. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  304. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  305. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  306. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  307. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  308. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  309. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  310. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  311. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  312. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  313. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  314. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  315. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  316. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  317. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  318. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  319. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  320. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  321. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  322. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  323. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  324. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  325. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  326. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
  327. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  328. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  329. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  330. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  331. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  332. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  333. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  334. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  335. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  336. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  337. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  338. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  339. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  340. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  341. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  342. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  343. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  344. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  345. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  346. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  347. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  348. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  349. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  350. package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
  351. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  352. package/android/build/tmp/kotlin-classes/debug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
  353. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
  354. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
  355. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
  356. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule.class +0 -0
  357. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
  358. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolView.class +0 -0
  359. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
  360. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
  361. package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/ReactNavigationPackage.class +0 -0
  362. package/android/gradle.properties +0 -5
  363. package/assets/fonts/MaterialSymbolsOutlined.ttf +0 -0
  364. package/lib/module/theming/DefaultTheme.js.map +0 -1
  365. package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
@@ -1,9 +1,8 @@
1
1
  import type { ColorValue } from 'react-native';
2
2
 
3
+ import type { FONT_WEIGHTS } from './constants';
3
4
  import type { MaterialSymbolName } from './MaterialSymbolData';
4
5
 
5
- type MaterialSymbolVariant = 'outlined' | 'rounded' | 'sharp';
6
-
7
6
  export type MaterialSymbolOptions = {
8
7
  /**
9
8
  * The name of the Material Symbol to display.
@@ -12,23 +11,151 @@ export type MaterialSymbolOptions = {
12
11
  /**
13
12
  * The variant of the symbol.
14
13
  *
14
+ * Can be customized using `react-navigation` key in `package.json`:
15
+ *
16
+ * ```json
17
+ * "react-navigation": {
18
+ * "material-symbol": {
19
+ * "fonts": [
20
+ * {
21
+ * "variant": "rounded",
22
+ * "weight": 300,
23
+ * },
24
+ * ]
25
+ * }
26
+ * }
27
+ * ```
28
+ *
29
+ * Automatically set if a single variant is available.
30
+ *
15
31
  * @default 'outlined'
16
32
  */
17
- variant?: MaterialSymbolVariant;
33
+ variant?: 'outlined' | 'rounded' | 'sharp' | undefined;
34
+ /**
35
+ * The weight of the symbol.
36
+ *
37
+ * Can be customized using `react-navigation` key in `package.json`:
38
+ *
39
+ * ```json
40
+ * "react-navigation": {
41
+ * "material-symbol": {
42
+ * "fonts": [
43
+ * {
44
+ * "variant": "rounded",
45
+ * "weight": 300,
46
+ * },
47
+ * ]
48
+ * }
49
+ * }
50
+ * ```
51
+ *
52
+ * Only numeric weights are supported in the configuration.
53
+ *
54
+ * Automatically set if a single weight is available.
55
+ *
56
+ * @default 400
57
+ */
58
+ weight?:
59
+ | 'thin'
60
+ | 'ultralight'
61
+ | 'light'
62
+ | 'regular'
63
+ | 'medium'
64
+ | 'semibold'
65
+ | 'bold'
66
+ | 100
67
+ | 200
68
+ | 300
69
+ | 400
70
+ | 500
71
+ | 600
72
+ | 700
73
+ | undefined;
18
74
  /**
19
75
  * The size of the symbol.
20
76
  *
21
77
  * @default 24
22
78
  */
23
- size?: number;
79
+ size?: number | undefined;
24
80
  /**
25
81
  * The color of the symbol.
26
82
  *
27
83
  * @default 'black'
28
84
  */
29
- color?: ColorValue;
85
+ color?: ColorValue | undefined;
30
86
  };
31
87
 
88
+ export type SFSymbolScale = 'small' | 'medium' | 'large';
89
+
90
+ export type SFSymbolMode =
91
+ | 'monochrome'
92
+ | 'hierarchical'
93
+ | 'palette'
94
+ | 'multicolor';
95
+
96
+ export type SFSymbolAnimationEffect =
97
+ | 'bounce'
98
+ | 'pulse'
99
+ | 'appear'
100
+ | 'disappear'
101
+ | 'variableColor'
102
+ | 'breathe'
103
+ | 'wiggle'
104
+ | 'rotate';
105
+
106
+ export type SFSymbolAnimationConfig = {
107
+ /**
108
+ * The animation effect to apply.
109
+ */
110
+ effect: SFSymbolAnimationEffect;
111
+ /**
112
+ * Whether the animation repeats continuously.
113
+ *
114
+ * @default false
115
+ */
116
+ repeating?: boolean | undefined;
117
+ /**
118
+ * Number of times to repeat the animation.
119
+ * Ignored if `repeating` is `true`.
120
+ */
121
+ repeatCount?: number | undefined;
122
+ /**
123
+ * Speed multiplier for the animation.
124
+ *
125
+ * @default 1
126
+ */
127
+ speed?: number | undefined;
128
+ /**
129
+ * Whether to animate the whole symbol at once or layer by layer.
130
+ *
131
+ * @default false
132
+ */
133
+ wholeSymbol?: boolean | undefined;
134
+ /**
135
+ * Direction of the animation.
136
+ * Applicable to `bounce` and `wiggle`.
137
+ */
138
+ direction?: 'up' | 'down' | undefined;
139
+ /**
140
+ * Whether the variable color effect reverses with each cycle.
141
+ * Only applicable to `variableColor`.
142
+ *
143
+ * @default false
144
+ */
145
+ reversing?: boolean | undefined;
146
+ /**
147
+ * Whether each layer remains changed until the end of the cycle.
148
+ * Only applicable to `variableColor`.
149
+ *
150
+ * @default false
151
+ */
152
+ cumulative?: boolean | undefined;
153
+ };
154
+
155
+ export type SFSymbolAnimation =
156
+ | SFSymbolAnimationEffect
157
+ | SFSymbolAnimationConfig;
158
+
32
159
  export type SFSymbolOptions = {
33
160
  /**
34
161
  * The name of the SF Symbol to display.
@@ -38,10 +165,58 @@ export type SFSymbolOptions = {
38
165
  * The size of the symbol.
39
166
  * @default 24
40
167
  */
41
- size?: number;
168
+ size?: number | undefined;
42
169
  /**
43
170
  * The color of the symbol.
171
+ * Used as the tint color in monochrome mode, and as the fallback for
172
+ * `colors.primary` in hierarchical and palette modes.
173
+ *
44
174
  * @default 'black'
45
175
  */
46
- color?: ColorValue;
176
+ color?: ColorValue | undefined;
177
+ /**
178
+ * The weight of the symbol.
179
+ *
180
+ * @default 'regular'
181
+ */
182
+ weight?:
183
+ | keyof typeof FONT_WEIGHTS
184
+ | (typeof FONT_WEIGHTS)[keyof typeof FONT_WEIGHTS]
185
+ | undefined;
186
+ /**
187
+ * The scale of the symbol relative to the font size.
188
+ *
189
+ * @default 'medium'
190
+ */
191
+ scale?: SFSymbolScale | undefined;
192
+ /**
193
+ * The rendering mode of the symbol.
194
+ * - `monochrome`: Single color tint (default).
195
+ * - `hierarchical`: Derived hierarchy from a single color.
196
+ * - `palette`: Explicit colors for each layer.
197
+ * - `multicolor`: Uses the symbol's built-in multicolor scheme.
198
+ *
199
+ * @default 'monochrome'
200
+ */
201
+ mode?: SFSymbolMode | undefined;
202
+ /**
203
+ * The colors for non-monochrome rendering modes.
204
+ * - `hierarchical`: uses `primary` as the base color.
205
+ * - `palette`: uses `primary`, `secondary`, and `tertiary` for each layer.
206
+ * - `multicolor`: ignored.
207
+ *
208
+ * Falls back to `color` for `primary` if not specified.
209
+ */
210
+ colors?:
211
+ | {
212
+ primary?: ColorValue | undefined;
213
+ secondary?: ColorValue | undefined;
214
+ tertiary?: ColorValue | undefined;
215
+ }
216
+ | undefined;
217
+ /**
218
+ * The animation effect to apply to the symbol.
219
+ * Requires iOS 17+. Ignored on earlier versions.
220
+ */
221
+ animation?: SFSymbolAnimation | undefined;
47
222
  };
@@ -6,10 +6,10 @@ export const DarkTheme = {
6
6
  dark: true,
7
7
  colors: {
8
8
  primary: 'rgb(10, 132, 255)',
9
- background: 'rgb(1, 1, 1)',
10
- card: 'rgb(18, 18, 18)',
11
- text: 'rgb(229, 229, 231)',
12
- border: 'rgb(39, 39, 41)',
9
+ background: 'rgb(0, 0, 0)',
10
+ card: 'rgb(28, 28, 30)',
11
+ text: 'rgb(255, 255, 255)',
12
+ border: 'rgb(56, 56, 58)',
13
13
  notification: 'rgb(255, 69, 58)',
14
14
  },
15
15
  fonts,
@@ -2,14 +2,14 @@ import type { Theme } from '@react-navigation/core';
2
2
 
3
3
  import { fonts } from './fonts';
4
4
 
5
- export const DefaultTheme = {
5
+ export const LightTheme = {
6
6
  dark: false,
7
7
  colors: {
8
8
  primary: 'rgb(0, 122, 255)',
9
- background: 'rgb(242, 242, 242)',
9
+ background: 'rgb(242, 242, 247)',
10
10
  card: 'rgb(255, 255, 255)',
11
- text: 'rgb(28, 28, 30)',
12
- border: 'rgb(178, 178, 178)',
11
+ text: 'rgb(0, 0, 0)',
12
+ border: 'rgb(198, 198, 200)',
13
13
  notification: 'rgb(255, 59, 48)',
14
14
  },
15
15
  fonts,
@@ -0,0 +1,30 @@
1
+ import type { Theme } from '@react-navigation/core';
2
+ import { PlatformColor } from 'react-native';
3
+
4
+ import { fonts } from './fonts';
5
+
6
+ export const MaterialLightTheme = {
7
+ dark: false,
8
+ colors: {
9
+ primary: PlatformColor('@android:color/system_primary_light'),
10
+ background: PlatformColor('@android:color/system_surface_container_light'),
11
+ card: PlatformColor('@android:color/system_background_light'),
12
+ text: PlatformColor('@android:color/system_on_surface_light'),
13
+ border: PlatformColor('@android:color/system_outline_variant_light'),
14
+ notification: PlatformColor('@android:color/system_error_light'),
15
+ },
16
+ fonts,
17
+ } as const satisfies Theme;
18
+
19
+ export const MaterialDarkTheme = {
20
+ dark: true,
21
+ colors: {
22
+ primary: PlatformColor('@android:color/system_primary_dark'),
23
+ background: PlatformColor('@android:color/system_surface_container_dark'),
24
+ card: PlatformColor('@android:color/system_background_dark'),
25
+ text: PlatformColor('@android:color/system_on_surface_dark'),
26
+ border: PlatformColor('@android:color/system_outline_variant_dark'),
27
+ notification: PlatformColor('@android:color/system_error_dark'),
28
+ },
29
+ fonts,
30
+ } as const satisfies Theme;
@@ -0,0 +1,19 @@
1
+ import type { Theme } from '@react-navigation/core';
2
+
3
+ import { fonts } from './fonts';
4
+
5
+ export const MaterialLightTheme = {
6
+ dark: false,
7
+ get colors(): Theme['colors'] {
8
+ throw new Error('MaterialLightTheme is only supported on Android');
9
+ },
10
+ fonts,
11
+ } as const satisfies Theme;
12
+
13
+ export const MaterialDarkTheme = {
14
+ dark: true,
15
+ get colors(): Theme['colors'] {
16
+ throw new Error('MaterialDarkTheme is only supported on Android');
17
+ },
18
+ fonts,
19
+ } as const satisfies Theme;
package/src/types.tsx CHANGED
@@ -68,7 +68,7 @@ export type LinkingOptions<ParamList extends {}> = {
68
68
  *
69
69
  * Defaults to `true` when a linking config is specified.
70
70
  */
71
- enabled?: boolean;
71
+ enabled?: boolean | undefined;
72
72
  /**
73
73
  * The prefixes to match to determine whether to handle a URL.
74
74
  *
@@ -96,7 +96,7 @@ export type LinkingOptions<ParamList extends {}> = {
96
96
  * }
97
97
  * ```
98
98
  */
99
- prefixes?: LinkingPrefix[];
99
+ prefixes?: LinkingPrefix[] | undefined;
100
100
  /**
101
101
  * Optional function which takes an incoming URL returns a boolean
102
102
  * indicating whether React Navigation should handle it.
@@ -114,7 +114,7 @@ export type LinkingOptions<ParamList extends {}> = {
114
114
  * }
115
115
  * ```
116
116
  */
117
- filter?: (url: string) => boolean;
117
+ filter?: ((url: string) => boolean) | undefined;
118
118
  /**
119
119
  * Config to fine-tune how to parse the path.
120
120
  *
@@ -128,23 +128,25 @@ export type LinkingOptions<ParamList extends {}> = {
128
128
  * }
129
129
  * ```
130
130
  */
131
- config?: {
132
- /**
133
- * Path string to match against for the whole navigation tree.
134
- * It's not possible to specify params here since this doesn't belong to a screen.
135
- * This is useful when the whole app is under a specific path.
136
- * e.g. all of the screens are under `/admin` in `https://example.com/admin`
137
- */
138
- path?: string;
139
- /**
140
- * Path configuration for child screens.
141
- */
142
- screens: PathConfigMap<ParamList>;
143
- /**
144
- * Name of the initial route to use for the root navigator.
145
- */
146
- initialRouteName?: keyof ParamList;
147
- };
131
+ config?:
132
+ | {
133
+ /**
134
+ * Path string to match against for the whole navigation tree.
135
+ * It's not possible to specify params here since this doesn't belong to a screen.
136
+ * This is useful when the whole app is under a specific path.
137
+ * e.g. all of the screens are under `/admin` in `https://example.com/admin`
138
+ */
139
+ path?: string | undefined;
140
+ /**
141
+ * Path configuration for child screens.
142
+ */
143
+ screens: PathConfigMap<ParamList>;
144
+ /**
145
+ * Name of the initial route to use for the root navigator.
146
+ */
147
+ initialRouteName?: Extract<keyof ParamList, string> | undefined;
148
+ }
149
+ | undefined;
148
150
  /**
149
151
  * Custom function to get the initial URL used for linking.
150
152
  * Uses `Linking.getInitialURL()` by default.
@@ -158,11 +160,9 @@ export type LinkingOptions<ParamList extends {}> = {
158
160
  * }
159
161
  * ```
160
162
  */
161
- getInitialURL?: () =>
162
- | string
163
- | null
164
- | undefined
165
- | Promise<string | null | undefined>;
163
+ getInitialURL?:
164
+ | (() => string | null | undefined | Promise<string | null | undefined>)
165
+ | undefined;
166
166
  /**
167
167
  * Custom function to get subscribe to URL updates.
168
168
  * Uses `Linking.addEventListener('url', callback)` by default.
@@ -184,30 +184,32 @@ export type LinkingOptions<ParamList extends {}> = {
184
184
  * }
185
185
  * ```
186
186
  */
187
- subscribe?: (
188
- listener: (url: string) => void
189
- ) => undefined | void | (() => void);
187
+ subscribe?:
188
+ | ((listener: (url: string) => void) => undefined | void | (() => void))
189
+ | undefined;
190
190
  /**
191
191
  * Custom function to parse the URL to a valid navigation state (advanced).
192
192
  */
193
- getStateFromPath?: typeof getStateFromPathDefault;
193
+ getStateFromPath?: typeof getStateFromPathDefault | undefined;
194
194
  /**
195
195
  * Custom function to convert the state object to a valid URL (advanced).
196
196
  * Only applicable on Web.
197
197
  */
198
- getPathFromState?: typeof getPathFromStateDefault;
198
+ getPathFromState?: typeof getPathFromStateDefault | undefined;
199
199
  /**
200
200
  * Custom function to convert the state object to a valid action (advanced).
201
201
  */
202
- getActionFromState?: typeof getActionFromStateDefault;
202
+ getActionFromState?: typeof getActionFromStateDefault | undefined;
203
203
  };
204
204
 
205
205
  export type DocumentTitleOptions = {
206
- enabled?: boolean;
207
- formatter?: (
208
- options: Record<string, any> | undefined,
209
- route: Route<string> | undefined
210
- ) => string;
206
+ enabled?: boolean | undefined;
207
+ formatter?:
208
+ | ((
209
+ options: Record<string, any> | undefined,
210
+ route: Route<string> | undefined
211
+ ) => string)
212
+ | undefined;
211
213
  };
212
214
 
213
215
  export type Persistor = {
@@ -3,8 +3,8 @@ import type {
3
3
  ParamListBase,
4
4
  } from '@react-navigation/core';
5
5
 
6
- export function useBackButton(
7
- _: React.RefObject<NavigationContainerRef<ParamListBase> | null>
6
+ export function useBackButton<ParamList extends ParamListBase>(
7
+ _: React.RefObject<NavigationContainerRef<ParamList> | null>
8
8
  ) {
9
9
  // No-op
10
10
  // BackHandler is not available on web
@@ -9,8 +9,8 @@ import type { DocumentTitleOptions } from './types';
9
9
  /**
10
10
  * Set the document title for the active screen
11
11
  */
12
- export function useDocumentTitle(
13
- ref: React.RefObject<NavigationContainerRef<ParamListBase> | null>,
12
+ export function useDocumentTitle<ParamList extends ParamListBase>(
13
+ ref: React.RefObject<NavigationContainerRef<ParamList> | null>,
14
14
  {
15
15
  enabled = true,
16
16
  formatter = (options, route) => options?.title ?? route?.name,
@@ -13,17 +13,23 @@ import { getStateFromHref } from './getStateFromHref';
13
13
  import { LinkingContext } from './LinkingContext';
14
14
 
15
15
  type MinimalState = {
16
- routes: [{ name: string; params?: object; state?: MinimalState }];
16
+ routes: [
17
+ {
18
+ name: string;
19
+ params?: object | undefined;
20
+ state?: MinimalState | undefined;
21
+ },
22
+ ];
17
23
  };
18
24
 
19
25
  /**
20
26
  * Helper to build a href for a screen based on the linking options.
21
27
  */
22
28
  export function useBuildHref() {
23
- const navigation = React.useContext(NavigationHelpersContext);
24
- const route = React.useContext(NavigationRouteContext);
29
+ const navigation = React.use(NavigationHelpersContext);
30
+ const route = React.use(NavigationRouteContext);
25
31
 
26
- const { options } = React.useContext(LinkingContext);
32
+ const { options } = React.use(LinkingContext);
27
33
 
28
34
  const focusedRouteState = useStateForPath();
29
35
 
@@ -103,7 +109,7 @@ export function useBuildHref() {
103
109
  * Helper to build a navigation action from a href based on the linking options.
104
110
  */
105
111
  export function useBuildAction() {
106
- const { options } = React.useContext(LinkingContext);
112
+ const { options } = React.use(LinkingContext);
107
113
 
108
114
  const getActionFromStateHelper =
109
115
  options?.getActionFromState ?? getActionFromState;
@@ -3,11 +3,8 @@ import {
3
3
  type NavigationAction,
4
4
  NavigationContainerRefContext,
5
5
  NavigationHelpersContext,
6
- type NavigatorScreenParams,
7
- type ParamListBase,
8
6
  type RootParamList,
9
7
  } from '@react-navigation/core';
10
- import type { NavigationState, PartialState } from '@react-navigation/routers';
11
8
  import * as React from 'react';
12
9
  import { type GestureResponderEvent, Platform } from 'react-native';
13
10
 
@@ -32,35 +29,6 @@ export type LinkProps<
32
29
  params?: undefined;
33
30
  };
34
31
 
35
- const getStateFromParams = (
36
- params: NavigatorScreenParams<ParamListBase> | undefined
37
- ): PartialState<NavigationState> | NavigationState | undefined => {
38
- if (params?.state) {
39
- return params.state;
40
- }
41
-
42
- if (params?.screen) {
43
- return {
44
- routes: [
45
- {
46
- name: params.screen,
47
- params: params.params,
48
- // @ts-expect-error this is fine 🔥
49
- state: params.screen
50
- ? getStateFromParams(
51
- params.params as
52
- | NavigatorScreenParams<ParamListBase>
53
- | undefined
54
- )
55
- : undefined,
56
- },
57
- ],
58
- };
59
- }
60
-
61
- return undefined;
62
- };
63
-
64
32
  /**
65
33
  * Hook to get props for an anchor tag so it can work with in page navigation.
66
34
  *
@@ -73,9 +41,9 @@ export function useLinkProps<
73
41
  const ParamList extends {} = RootParamList,
74
42
  const RouteName extends keyof ParamList = keyof ParamList,
75
43
  >({ screen, params, href, action }: LinkProps<ParamList, RouteName>) {
76
- const root = React.useContext(NavigationContainerRefContext);
77
- const navigation = React.useContext(NavigationHelpersContext);
78
- const { options } = React.useContext(LinkingContext);
44
+ const root = React.use(NavigationContainerRefContext);
45
+ const navigation = React.use(NavigationHelpersContext);
46
+ const { options } = React.use(LinkingContext);
79
47
 
80
48
  const onPress = (
81
49
  e?: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent
@@ -162,17 +130,16 @@ export function useLinkProps<
162
130
  return {
163
131
  href:
164
132
  href ??
165
- (Platform.OS === 'web' && screen != null
133
+ (Platform.OS === 'web' && typeof screen === 'string'
166
134
  ? getPathFromStateHelper(
167
135
  {
168
136
  routes: [
169
137
  {
170
- // @ts-expect-error this is fine 🔥
171
138
  name: screen,
172
- // @ts-expect-error this is fine 🔥
173
- params: params,
174
- // @ts-expect-error this is fine 🔥
175
- state: getStateFromParams(params),
139
+ params:
140
+ typeof params === 'object' && params != null
141
+ ? params
142
+ : undefined,
176
143
  },
177
144
  ],
178
145
  },
package/src/useLinkTo.tsx CHANGED
@@ -9,7 +9,7 @@ import { useBuildAction } from './useLinkBuilder';
9
9
  * @returns function that receives the href to navigate to.
10
10
  */
11
11
  export function useLinkTo() {
12
- const navigation = React.useContext(NavigationContainerRefContext);
12
+ const navigation = React.use(NavigationContainerRefContext);
13
13
  const buildAction = useBuildAction();
14
14
 
15
15
  const linkTo = React.useCallback(