@react-navigation/native 8.0.0-alpha.2 → 8.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +96 -15
- package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +58 -58
- package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +81 -4
- package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +52 -7
- package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +14 -7
- package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +14 -15
- package/assets/fonts/MaterialSymbolsOutlined_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_300.ttf +0 -0
- package/{android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsOutlined.ttf → assets/fonts/MaterialSymbolsOutlined_400.ttf} +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsOutlined_700.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_300.ttf +0 -0
- package/assets/fonts/{MaterialSymbolsRounded.ttf → MaterialSymbolsRounded_400.ttf} +0 -0
- package/assets/fonts/MaterialSymbolsRounded_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsRounded_700.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_100.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_200.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_300.ttf +0 -0
- package/assets/fonts/{MaterialSymbolsSharp.ttf → MaterialSymbolsSharp_400.ttf} +0 -0
- package/assets/fonts/MaterialSymbolsSharp_500.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_600.ttf +0 -0
- package/assets/fonts/MaterialSymbolsSharp_700.ttf +0 -0
- package/ios/ReactNavigationCornerInsetView.h +14 -0
- package/ios/ReactNavigationCornerInsetView.mm +182 -0
- package/ios/ReactNavigationCornerInsetView.swift +193 -0
- package/ios/ReactNavigationCornerInsetViewComponentDescriptor.h +23 -0
- package/ios/ReactNavigationCornerInsetViewShadowNode.h +27 -0
- package/ios/ReactNavigationCornerInsetViewShadowNode.mm +42 -0
- package/ios/ReactNavigationCornerInsetViewState.h +19 -0
- package/ios/ReactNavigationSFSymbolView.mm +21 -0
- package/ios/ReactNavigationSFSymbolView.swift +257 -7
- package/lib/module/NavigationContainer.js +16 -11
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/ServerContainer.js +5 -4
- package/lib/module/ServerContainer.js.map +1 -1
- package/lib/module/ServerContext.js.map +1 -1
- package/lib/module/__stubs__/createStackNavigator.js +1 -3
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
- package/lib/module/createStaticNavigation.js +5 -4
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/native/CornerInset.ios.js +66 -0
- package/lib/module/native/CornerInset.ios.js.map +1 -0
- package/lib/module/native/CornerInset.js +17 -0
- package/lib/module/native/CornerInset.js.map +1 -0
- package/lib/module/native/MaterialSymbol.android.js +8 -15
- package/lib/module/native/MaterialSymbol.android.js.map +1 -1
- package/lib/module/native/MaterialSymbolData.js +0 -9
- package/lib/module/native/MaterialSymbolData.js.map +1 -1
- package/lib/module/native/MaterialSymbolViewNativeComponent.ts +6 -2
- package/lib/module/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/lib/module/native/SFSymbol.ios.js +24 -1
- package/lib/module/native/SFSymbol.ios.js.map +1 -1
- package/lib/module/native/SFSymbolViewNativeComponent.ts +15 -1
- package/lib/module/native/constants.js +14 -0
- package/lib/module/native/constants.js.map +1 -0
- package/lib/module/theming/DarkTheme.js +4 -4
- package/lib/module/theming/{DefaultTheme.js → LightTheme.js} +5 -5
- package/lib/module/theming/LightTheme.js.map +1 -0
- package/lib/module/theming/MaterialTheme.android.js +29 -0
- package/lib/module/theming/MaterialTheme.android.js.map +1 -0
- package/lib/module/theming/MaterialTheme.js +18 -0
- package/lib/module/theming/MaterialTheme.js.map +1 -0
- package/lib/module/useBackButton.js.map +1 -1
- package/lib/module/useDocumentTitle.js.map +1 -1
- package/lib/module/useLinkBuilder.js +4 -4
- package/lib/module/useLinkBuilder.js.map +1 -1
- package/lib/module/useLinkProps.js +5 -26
- package/lib/module/useLinkProps.js.map +1 -1
- package/lib/module/useLinkTo.js +1 -1
- package/lib/module/useLinkTo.js.map +1 -1
- package/lib/module/useLinking.js +40 -4
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +20 -3
- package/lib/module/useLinking.native.js.map +1 -1
- package/lib/module/useLocale.js +1 -1
- package/lib/module/useLocale.js.map +1 -1
- package/lib/module/useRoutePath.js +1 -1
- package/lib/module/useRoutePath.js.map +1 -1
- package/lib/module/useScrollToTop.js +1 -1
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/typescript/src/NavigationContainer.d.ts +12 -5
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContainer.d.ts +6 -3
- package/lib/typescript/src/ServerContainer.d.ts.map +1 -1
- package/lib/typescript/src/ServerContext.d.ts +1 -1
- package/lib/typescript/src/ServerContext.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +5 -8
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/createStaticNavigation.d.ts +5 -5
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/native/CornerInset.d.ts +28 -0
- package/lib/typescript/src/native/CornerInset.d.ts.map +1 -0
- package/lib/typescript/src/native/CornerInset.ios.d.ts +8 -0
- package/lib/typescript/src/native/CornerInset.ios.d.ts.map +1 -0
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts +2 -2
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolData.d.ts +0 -5
- package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +3 -2
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts +1 -1
- package/lib/typescript/src/native/NativeMaterialSymbolModule.d.ts.map +1 -1
- package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts +14 -0
- package/lib/typescript/src/native/ReactNavigationCornerInsetViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/native/SFSymbol.ios.d.ts +1 -1
- package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -1
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +15 -1
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/native/constants.d.ts +12 -0
- package/lib/typescript/src/native/constants.d.ts.map +1 -0
- package/lib/typescript/src/native/types.d.ts +143 -7
- package/lib/typescript/src/native/types.d.ts.map +1 -1
- package/lib/typescript/src/theming/DarkTheme.d.ts +4 -4
- package/lib/typescript/src/theming/{DefaultTheme.d.ts → LightTheme.d.ts} +5 -5
- package/lib/typescript/src/theming/LightTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts +127 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts +114 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +13 -13
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useBackButton.d.ts +1 -1
- package/lib/typescript/src/useBackButton.d.ts.map +1 -1
- package/lib/typescript/src/useDocumentTitle.d.ts +1 -1
- package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +56 -66
- package/lib/typescript/src/useLinkBuilder.d.ts.map +1 -1
- package/lib/typescript/src/useLinkProps.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.d.ts +11 -13
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +21 -23
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/package.json +43 -26
- package/src/NavigationContainer.tsx +41 -32
- package/src/ServerContainer.tsx +3 -5
- package/src/ServerContext.tsx +6 -4
- package/src/__stubs__/createStackNavigator.tsx +6 -12
- package/src/createStaticNavigation.tsx +13 -17
- package/src/index.tsx +7 -1
- package/src/native/CornerInset.ios.tsx +85 -0
- package/src/native/CornerInset.tsx +40 -0
- package/src/native/MaterialSymbol.android.tsx +8 -19
- package/src/native/MaterialSymbolData.tsx +0 -6
- package/src/native/MaterialSymbolViewNativeComponent.ts +6 -2
- package/src/native/NativeMaterialSymbolModule.ts +3 -3
- package/src/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/src/native/SFSymbol.ios.tsx +24 -1
- package/src/native/SFSymbolViewNativeComponent.ts +15 -1
- package/src/native/constants.tsx +11 -0
- package/src/native/types.tsx +182 -7
- package/src/theming/DarkTheme.tsx +4 -4
- package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +4 -4
- package/src/theming/MaterialTheme.android.tsx +30 -0
- package/src/theming/MaterialTheme.tsx +19 -0
- package/src/types.tsx +38 -36
- package/src/useBackButton.tsx +2 -2
- package/src/useDocumentTitle.tsx +2 -2
- package/src/useLinkBuilder.tsx +11 -5
- package/src/useLinkProps.tsx +8 -41
- package/src/useLinkTo.tsx +1 -1
- package/src/useLinking.native.tsx +41 -20
- package/src/useLinking.tsx +68 -9
- package/src/useLocale.tsx +1 -1
- package/src/useRoutePath.tsx +1 -1
- package/src/useScrollToTop.tsx +1 -1
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/results.bin +0 -1
- package/android/build/.transforms/586a73aab4c351d3f13dc604ca6964e8/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/results.bin +0 -1
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/BuildConfig.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$Companion.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$WhenMappings.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolModule.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolTypeface.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolView.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager$Companion.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/MaterialSymbolViewManager.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/org/reactnavigation/ReactNavigationPackage.dex +0 -0
- package/android/build/.transforms/fb9c4b42fa16b6541a5819cb4bf06272/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/org/reactnavigation/BuildConfig.java +0 -10
- package/android/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.java +0 -38
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.java +0 -42
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +0 -21
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.java +0 -39
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.java +0 -20
- package/android/build/generated/source/codegen/jni/CMakeLists.txt +0 -28
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec-generated.cpp +0 -32
- package/android/build/generated/source/codegen/jni/ReactNavigationSpec.h +0 -31
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.cpp +0 -23
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ComponentDescriptors.h +0 -25
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.cpp +0 -17
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/EventEmitters.h +0 -30
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.cpp +0 -101
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +0 -55
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +0 -31
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI.h +0 -71
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.cpp +0 -18
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ShadowNodes.h +0 -43
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.cpp +0 -16
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/States.h +0 -22
- package/android/build/generated/source/codegen/schema.json +0 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +0 -7
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +0 -18
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +0 -6
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +0 -1
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsRounded.ttf +0 -0
- package/android/build/intermediates/assets/debug/mergeDebugAssets/fonts/MaterialSymbolsSharp.ttf +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +0 -1
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugAssets/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +0 -2
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +0 -2
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/reactnavigation/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +0 -2
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +0 -7
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +0 -7
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +0 -1
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +0 -1
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsOutlined.ttf +0 -0
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsRounded.ttf +0 -0
- package/android/build/intermediates/react-navigation/fonts/MaterialSymbolsSharp.ttf +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/fbreact/specs/NativeMaterialSymbolModuleSpec.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerDelegate.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/facebook/react/viewmanagers/ReactNavigationSFSymbolViewManagerInterface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolView.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/org/reactnavigation/ReactNavigationPackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +0 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +0 -2
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +0 -16
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/react-navigation_native_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule$getImageSource$future$1$1$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolTypeface.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolView.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/MaterialSymbolViewManager.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/org/reactnavigation/ReactNavigationPackage.class +0 -0
- package/android/gradle.properties +0 -5
- package/assets/fonts/MaterialSymbolsOutlined.ttf +0 -0
- package/lib/module/theming/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
type InitialState,
|
|
7
7
|
type NavigationContainerProps,
|
|
8
8
|
type NavigationContainerRef,
|
|
9
|
-
type
|
|
9
|
+
type NavigationState,
|
|
10
|
+
type PartialState,
|
|
10
11
|
type RootParamList,
|
|
11
12
|
ThemeProvider,
|
|
12
13
|
validatePathConfig,
|
|
@@ -16,7 +17,7 @@ import { I18nManager, Platform } from 'react-native';
|
|
|
16
17
|
|
|
17
18
|
import { LinkingContext } from './LinkingContext';
|
|
18
19
|
import { LocaleDirContext } from './LocaleDirContext';
|
|
19
|
-
import {
|
|
20
|
+
import { LightTheme } from './theming/LightTheme';
|
|
20
21
|
import type {
|
|
21
22
|
DocumentTitleOptions,
|
|
22
23
|
LinkingOptions,
|
|
@@ -30,8 +31,17 @@ import { type Thenable, useThenable } from './useThenable';
|
|
|
30
31
|
|
|
31
32
|
declare global {
|
|
32
33
|
var REACT_NAVIGATION_DEVTOOLS: WeakMap<
|
|
33
|
-
|
|
34
|
-
{
|
|
34
|
+
object,
|
|
35
|
+
{
|
|
36
|
+
readonly linking: LinkingOptions<any>;
|
|
37
|
+
readonly listeners: Set<
|
|
38
|
+
(data: {
|
|
39
|
+
type: 'link';
|
|
40
|
+
url: string;
|
|
41
|
+
state: PartialState<NavigationState> | undefined;
|
|
42
|
+
}) => void
|
|
43
|
+
>;
|
|
44
|
+
}
|
|
35
45
|
>;
|
|
36
46
|
}
|
|
37
47
|
|
|
@@ -95,30 +105,36 @@ type Props<ParamList extends {}> = NavigationContainerProps & {
|
|
|
95
105
|
* unless `documentTitle.enabled` is `false`.
|
|
96
106
|
*/
|
|
97
107
|
documentTitle?: DocumentTitleOptions;
|
|
108
|
+
/**
|
|
109
|
+
* Ref object which refers to the navigation object containing helper methods.
|
|
110
|
+
*/
|
|
111
|
+
ref?: React.Ref<NavigationContainerRef<ParamList>>;
|
|
98
112
|
};
|
|
99
113
|
|
|
100
114
|
const RESTORE_STATE_ERROR =
|
|
101
115
|
'Failed to restore navigation state. The state will be initialized based on the navigation tree.';
|
|
102
116
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Container component that manages the navigation state.
|
|
119
|
+
*
|
|
120
|
+
* This should be rendered at the root wrapping the whole app.
|
|
121
|
+
*/
|
|
122
|
+
export function NavigationContainer<ParamList extends {} = RootParamList>({
|
|
123
|
+
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
124
|
+
theme = LightTheme,
|
|
125
|
+
linking,
|
|
126
|
+
persistor,
|
|
127
|
+
fallback = null,
|
|
128
|
+
documentTitle,
|
|
129
|
+
onStateChange,
|
|
130
|
+
ref,
|
|
131
|
+
...rest
|
|
132
|
+
}: Props<ParamList>) {
|
|
116
133
|
if (linking?.config) {
|
|
117
134
|
validatePathConfig(linking.config);
|
|
118
135
|
}
|
|
119
136
|
|
|
120
|
-
const refContainer =
|
|
121
|
-
React.useRef<NavigationContainerRef<ParamListBase>>(null);
|
|
137
|
+
const refContainer = React.useRef<NavigationContainerRef<ParamList>>(null);
|
|
122
138
|
|
|
123
139
|
useBackButton(refContainer);
|
|
124
140
|
useDocumentTitle(refContainer, documentTitle);
|
|
@@ -150,10 +166,16 @@ function NavigationContainerInner(
|
|
|
150
166
|
// This will be used by the devtools
|
|
151
167
|
React.useEffect(() => {
|
|
152
168
|
if (refContainer.current) {
|
|
169
|
+
const previous = REACT_NAVIGATION_DEVTOOLS.get(refContainer.current);
|
|
170
|
+
const listeners = previous?.listeners ?? new Set();
|
|
171
|
+
|
|
153
172
|
REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
|
154
173
|
get linking() {
|
|
155
174
|
return linkingConfig.options;
|
|
156
175
|
},
|
|
176
|
+
get listeners() {
|
|
177
|
+
return listeners;
|
|
178
|
+
},
|
|
157
179
|
});
|
|
158
180
|
}
|
|
159
181
|
});
|
|
@@ -253,16 +275,3 @@ function NavigationContainerInner(
|
|
|
253
275
|
</LocaleDirContext.Provider>
|
|
254
276
|
);
|
|
255
277
|
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Container component that manages the navigation state.
|
|
259
|
-
*
|
|
260
|
-
* This should be rendered at the root wrapping the whole app.
|
|
261
|
-
*/
|
|
262
|
-
export const NavigationContainer = React.forwardRef(
|
|
263
|
-
NavigationContainerInner
|
|
264
|
-
) as <ParamList extends {} = RootParamList>(
|
|
265
|
-
props: Props<ParamList> & {
|
|
266
|
-
ref?: React.Ref<NavigationContainerRef<ParamList>>;
|
|
267
|
-
}
|
|
268
|
-
) => React.ReactElement;
|
package/src/ServerContainer.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import type { ServerContainerRef } from './types';
|
|
|
6
6
|
|
|
7
7
|
type Props = ServerContextType & {
|
|
8
8
|
children: React.ReactNode;
|
|
9
|
+
ref?: React.Ref<ServerContainerRef>;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
/**
|
|
@@ -15,10 +16,7 @@ type Props = ServerContextType & {
|
|
|
15
16
|
* @param props.children Child elements to render the content.
|
|
16
17
|
* @param props.ref Ref object which contains helper methods.
|
|
17
18
|
*/
|
|
18
|
-
export
|
|
19
|
-
{ children, location }: Props,
|
|
20
|
-
ref: React.Ref<ServerContainerRef>
|
|
21
|
-
) {
|
|
19
|
+
export function ServerContainer({ children, location, ref }: Props) {
|
|
22
20
|
React.useEffect(() => {
|
|
23
21
|
console.error(
|
|
24
22
|
"'ServerContainer' should only be used on the server with 'react-dom/server' for SSR."
|
|
@@ -54,4 +52,4 @@ export const ServerContainer = React.forwardRef(function ServerContainer(
|
|
|
54
52
|
</CurrentRenderContext.Provider>
|
|
55
53
|
</ServerContext.Provider>
|
|
56
54
|
);
|
|
57
|
-
}
|
|
55
|
+
}
|
package/src/ServerContext.tsx
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
export type ServerContextType = {
|
|
4
|
-
location?:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
location?:
|
|
5
|
+
| {
|
|
6
|
+
pathname: string;
|
|
7
|
+
search: string;
|
|
8
|
+
}
|
|
9
|
+
| undefined;
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export const ServerContext = React.createContext<ServerContextType | undefined>(
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createNavigatorFactory,
|
|
3
3
|
type DefaultNavigatorOptions,
|
|
4
|
-
type
|
|
4
|
+
type NavigatorTypeBagBase,
|
|
5
5
|
type ParamListBase,
|
|
6
6
|
type StackNavigationState,
|
|
7
7
|
StackRouter,
|
|
8
|
-
type TypedNavigator,
|
|
9
8
|
useNavigationBuilder,
|
|
10
9
|
} from '@react-navigation/core';
|
|
11
10
|
|
|
@@ -30,15 +29,10 @@ const StackNavigator = (
|
|
|
30
29
|
);
|
|
31
30
|
};
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
ParamList
|
|
35
|
-
>(): TypedNavigator<{
|
|
36
|
-
ParamList: ParamList;
|
|
37
|
-
State: StackNavigationState<ParamList>;
|
|
38
|
-
ScreenOptions: {};
|
|
39
|
-
EventMap: {};
|
|
40
|
-
NavigationList: NavigationListBase<ParamList>;
|
|
32
|
+
interface StubStackTypeBag extends NavigatorTypeBagBase {
|
|
33
|
+
State: StackNavigationState<this['ParamList']>;
|
|
41
34
|
Navigator: typeof StackNavigator;
|
|
42
|
-
}> {
|
|
43
|
-
return createNavigatorFactory(StackNavigator)();
|
|
44
35
|
}
|
|
36
|
+
|
|
37
|
+
export const createStackNavigator =
|
|
38
|
+
createNavigatorFactory<StubStackTypeBag>(StackNavigator);
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createComponentForStaticNavigation,
|
|
3
2
|
createPathConfigForStaticNavigation,
|
|
4
|
-
type
|
|
5
|
-
type ParamListBase,
|
|
3
|
+
type RootParamList,
|
|
6
4
|
type StaticNavigation,
|
|
7
5
|
} from '@react-navigation/core';
|
|
8
6
|
import * as React from 'react';
|
|
@@ -10,14 +8,14 @@ import * as React from 'react';
|
|
|
10
8
|
import { NavigationContainer } from './NavigationContainer';
|
|
11
9
|
import type { LinkingOptions } from './types';
|
|
12
10
|
|
|
13
|
-
type Props = Omit<
|
|
14
|
-
React.ComponentProps<typeof NavigationContainer
|
|
11
|
+
type Props<ParamList extends {}> = Omit<
|
|
12
|
+
React.ComponentProps<typeof NavigationContainer<ParamList>>,
|
|
15
13
|
'linking' | 'children'
|
|
16
14
|
> & {
|
|
17
15
|
/**
|
|
18
16
|
* Options for deep linking.
|
|
19
17
|
*/
|
|
20
|
-
linking?: Omit<LinkingOptions<
|
|
18
|
+
linking?: Omit<LinkingOptions<ParamList>, 'config' | 'enabled'> & {
|
|
21
19
|
/**
|
|
22
20
|
* Whether deep link handling should be enabled.
|
|
23
21
|
* Defaults to `auto`.
|
|
@@ -30,10 +28,7 @@ type Props = Omit<
|
|
|
30
28
|
/**
|
|
31
29
|
* Additional configuration
|
|
32
30
|
*/
|
|
33
|
-
config?: Omit<
|
|
34
|
-
NonNullable<LinkingOptions<ParamListBase>['config']>,
|
|
35
|
-
'screens'
|
|
36
|
-
>;
|
|
31
|
+
config?: Omit<NonNullable<LinkingOptions<ParamList>['config']>, 'screens'>;
|
|
37
32
|
};
|
|
38
33
|
};
|
|
39
34
|
|
|
@@ -44,13 +39,14 @@ type Props = Omit<
|
|
|
44
39
|
* @param tree Static navigation config.
|
|
45
40
|
* @returns Navigation component to use in your app.
|
|
46
41
|
*/
|
|
47
|
-
export function createStaticNavigation(tree: StaticNavigation<any
|
|
48
|
-
const Component =
|
|
42
|
+
export function createStaticNavigation(tree: StaticNavigation<any>) {
|
|
43
|
+
const Component = tree.getComponent();
|
|
49
44
|
|
|
50
|
-
function Navigation(
|
|
51
|
-
|
|
52
|
-
ref
|
|
53
|
-
|
|
45
|
+
function Navigation<ParamList extends {} = RootParamList>({
|
|
46
|
+
linking,
|
|
47
|
+
ref,
|
|
48
|
+
...rest
|
|
49
|
+
}: Props<ParamList>) {
|
|
54
50
|
const linkingConfig = React.useMemo(() => {
|
|
55
51
|
const screens = createPathConfigForStaticNavigation(
|
|
56
52
|
tree,
|
|
@@ -101,5 +97,5 @@ export function createStaticNavigation(tree: StaticNavigation<any, any, any>) {
|
|
|
101
97
|
);
|
|
102
98
|
}
|
|
103
99
|
|
|
104
|
-
return
|
|
100
|
+
return Navigation;
|
|
105
101
|
}
|
package/src/index.tsx
CHANGED
|
@@ -2,6 +2,11 @@ export { createStaticNavigation } from './createStaticNavigation';
|
|
|
2
2
|
export { Link } from './Link';
|
|
3
3
|
export { LinkingContext } from './LinkingContext';
|
|
4
4
|
export { LocaleDirContext } from './LocaleDirContext';
|
|
5
|
+
export {
|
|
6
|
+
type CornerInsetProps,
|
|
7
|
+
type CornerInsetRef,
|
|
8
|
+
CornerInset as UNSTABLE_CornerInset,
|
|
9
|
+
} from './native/CornerInset';
|
|
5
10
|
export {
|
|
6
11
|
MaterialSymbol,
|
|
7
12
|
type MaterialSymbolProps,
|
|
@@ -10,7 +15,8 @@ export { SFSymbol, type SFSymbolProps } from './native/SFSymbol';
|
|
|
10
15
|
export { NavigationContainer } from './NavigationContainer';
|
|
11
16
|
export { ServerContainer } from './ServerContainer';
|
|
12
17
|
export { DarkTheme } from './theming/DarkTheme';
|
|
13
|
-
export { DefaultTheme } from './theming/
|
|
18
|
+
export { LightTheme as DefaultTheme } from './theming/LightTheme';
|
|
19
|
+
export { MaterialDarkTheme, MaterialLightTheme } from './theming/MaterialTheme';
|
|
14
20
|
export * from './types';
|
|
15
21
|
export { useLinkBuilder } from './useLinkBuilder';
|
|
16
22
|
export { type LinkProps, useLinkProps } from './useLinkProps';
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { NavigationContainerRefContext } from '@react-navigation/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Dimensions } from 'react-native';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line import-x/extensions
|
|
6
|
+
import type { CornerInsetProps, CornerInsetRef } from './CornerInset.tsx';
|
|
7
|
+
import ReactNavigationCornerInsetViewNativeComponent, {
|
|
8
|
+
Commands,
|
|
9
|
+
} from './ReactNavigationCornerInsetViewNativeComponent';
|
|
10
|
+
|
|
11
|
+
type Props = CornerInsetProps & {
|
|
12
|
+
ref?: React.Ref<CornerInsetRef>;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function CornerInset({ ref, ...rest }: Props) {
|
|
16
|
+
const root = React.use(NavigationContainerRefContext);
|
|
17
|
+
|
|
18
|
+
const nativeRef =
|
|
19
|
+
React.useRef<
|
|
20
|
+
React.ElementRef<typeof ReactNavigationCornerInsetViewNativeComponent>
|
|
21
|
+
>(null);
|
|
22
|
+
|
|
23
|
+
const relayout = React.useCallback(() => {
|
|
24
|
+
if (nativeRef.current) {
|
|
25
|
+
Commands.relayout(nativeRef.current);
|
|
26
|
+
}
|
|
27
|
+
}, []);
|
|
28
|
+
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (root == null) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let animationFrameHandle: number | null = null;
|
|
35
|
+
|
|
36
|
+
// We freeze the corner insets after initial measurements
|
|
37
|
+
// This is to avoid the insets getting out of sync during transitions
|
|
38
|
+
// We trigger a relayout explicitly on window resize and transition end
|
|
39
|
+
const unsubscribeWindowResize = Dimensions.addEventListener(
|
|
40
|
+
'change',
|
|
41
|
+
() => {
|
|
42
|
+
relayout();
|
|
43
|
+
|
|
44
|
+
if (animationFrameHandle) {
|
|
45
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// When window is unmaximized, calling relayout immediately doesn't work
|
|
49
|
+
// So we delay it to the next frame as a workaround
|
|
50
|
+
animationFrameHandle = requestAnimationFrame(() => {
|
|
51
|
+
animationFrameHandle = requestAnimationFrame(() => {
|
|
52
|
+
relayout();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const unsubscribeTransition = root.addListener('__unsafe_event__', (e) => {
|
|
59
|
+
if (e.data.type === 'transitionEnd') {
|
|
60
|
+
relayout();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
return () => {
|
|
65
|
+
if (animationFrameHandle) {
|
|
66
|
+
cancelAnimationFrame(animationFrameHandle);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
unsubscribeWindowResize.remove();
|
|
70
|
+
unsubscribeTransition();
|
|
71
|
+
};
|
|
72
|
+
}, [root, relayout]);
|
|
73
|
+
|
|
74
|
+
React.useImperativeHandle(
|
|
75
|
+
ref,
|
|
76
|
+
() => ({
|
|
77
|
+
relayout,
|
|
78
|
+
}),
|
|
79
|
+
[relayout]
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<ReactNavigationCornerInsetViewNativeComponent {...rest} ref={nativeRef} />
|
|
84
|
+
);
|
|
85
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export type CornerInsetProps = {
|
|
5
|
+
/**
|
|
6
|
+
* The direction of the content that should be inset.
|
|
7
|
+
*/
|
|
8
|
+
direction: 'vertical' | 'horizontal';
|
|
9
|
+
/**
|
|
10
|
+
* The edge where the inset should be applied.
|
|
11
|
+
*/
|
|
12
|
+
edge: 'top' | 'right' | 'bottom' | 'left';
|
|
13
|
+
/**
|
|
14
|
+
* Whether to collapse to 0 when corner inset matches the baseline inset.
|
|
15
|
+
* e.g. it will be 0 for corners without traffic lights on iPadOS.
|
|
16
|
+
*
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
adaptive?: boolean;
|
|
20
|
+
} & React.ComponentProps<typeof View>;
|
|
21
|
+
|
|
22
|
+
export type CornerInsetRef = {
|
|
23
|
+
relayout(): void;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
type Props = CornerInsetProps & {
|
|
27
|
+
ref?: React.Ref<CornerInsetRef>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export function CornerInset({ ref, ...rest }: Props) {
|
|
31
|
+
React.useImperativeHandle(
|
|
32
|
+
ref,
|
|
33
|
+
() => ({
|
|
34
|
+
relayout() {},
|
|
35
|
+
}),
|
|
36
|
+
[]
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
return <View {...rest} />;
|
|
40
|
+
}
|
|
@@ -5,27 +5,25 @@ import {
|
|
|
5
5
|
type ViewProps,
|
|
6
6
|
} from 'react-native';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { FONT_WEIGHTS } from './constants';
|
|
9
9
|
import MaterialSymbolViewNativeComponent from './MaterialSymbolViewNativeComponent';
|
|
10
10
|
import NativeMaterialSymbolModule from './NativeMaterialSymbolModule';
|
|
11
11
|
import type { MaterialSymbolOptions } from './types';
|
|
12
12
|
|
|
13
13
|
export type MaterialSymbolProps = MaterialSymbolOptions & ViewProps;
|
|
14
14
|
|
|
15
|
-
const imageSourceCache = new Map<string, ImageSourcePropType>();
|
|
16
|
-
|
|
17
15
|
export function MaterialSymbol({
|
|
18
16
|
name,
|
|
19
|
-
|
|
17
|
+
weight,
|
|
20
18
|
size = 24,
|
|
21
|
-
color
|
|
19
|
+
color,
|
|
22
20
|
style,
|
|
23
21
|
...rest
|
|
24
22
|
}: MaterialSymbolProps): React.ReactElement {
|
|
25
23
|
return (
|
|
26
24
|
<MaterialSymbolViewNativeComponent
|
|
27
25
|
name={name}
|
|
28
|
-
|
|
26
|
+
weight={typeof weight === 'string' ? FONT_WEIGHTS[weight] : (weight ?? 0)}
|
|
29
27
|
size={size}
|
|
30
28
|
color={color}
|
|
31
29
|
style={[
|
|
@@ -42,30 +40,23 @@ export function MaterialSymbol({
|
|
|
42
40
|
|
|
43
41
|
MaterialSymbol.getImageSource = ({
|
|
44
42
|
name,
|
|
45
|
-
variant
|
|
43
|
+
variant,
|
|
44
|
+
weight,
|
|
46
45
|
size = 24,
|
|
47
46
|
color = 'black',
|
|
48
47
|
}: MaterialSymbolOptions): ImageSourcePropType => {
|
|
49
|
-
const hash = MATERIAL_SYMBOL_FONT_HASHES[variant];
|
|
50
48
|
const processedColor = processColor(color);
|
|
51
49
|
|
|
52
50
|
if (processedColor == null) {
|
|
53
51
|
throw new Error(`Invalid color value: ${String(color)}`);
|
|
54
52
|
}
|
|
55
53
|
|
|
56
|
-
const cacheKey = `${name}:${variant}:${size}:${JSON.stringify(processedColor)}:${hash}`;
|
|
57
|
-
const cached = imageSourceCache.get(cacheKey);
|
|
58
|
-
|
|
59
|
-
if (cached !== undefined) {
|
|
60
|
-
return cached;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
54
|
const uri = NativeMaterialSymbolModule.getImageSource(
|
|
64
55
|
name,
|
|
65
56
|
variant,
|
|
57
|
+
typeof weight === 'string' ? FONT_WEIGHTS[weight] : weight,
|
|
66
58
|
size,
|
|
67
|
-
{ value: processedColor }
|
|
68
|
-
hash
|
|
59
|
+
{ value: processedColor }
|
|
69
60
|
);
|
|
70
61
|
|
|
71
62
|
const source: ImageSourcePropType = {
|
|
@@ -75,7 +66,5 @@ MaterialSymbol.getImageSource = ({
|
|
|
75
66
|
height: size,
|
|
76
67
|
};
|
|
77
68
|
|
|
78
|
-
imageSourceCache.set(cacheKey, source);
|
|
79
|
-
|
|
80
69
|
return source;
|
|
81
70
|
};
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
// Auto-generated by scripts/update-material-symbols.ts
|
|
2
2
|
// Do not edit manually
|
|
3
3
|
|
|
4
|
-
export const MATERIAL_SYMBOL_FONT_HASHES = {
|
|
5
|
-
outlined: 'bc5ec91a',
|
|
6
|
-
rounded: 'eb75c001',
|
|
7
|
-
sharp: '66ecc6b8',
|
|
8
|
-
} as const;
|
|
9
|
-
|
|
10
4
|
export type MaterialSymbolName =
|
|
11
5
|
| '10k'
|
|
12
6
|
| '10mp'
|
|
@@ -9,9 +9,13 @@ import {
|
|
|
9
9
|
|
|
10
10
|
export interface NativeProps extends ViewProps {
|
|
11
11
|
name: string;
|
|
12
|
-
variant
|
|
12
|
+
variant?: string;
|
|
13
|
+
weight?: CodegenTypes.WithDefault<
|
|
14
|
+
0 | 100 | 200 | 300 | 400 | 500 | 600 | 700,
|
|
15
|
+
0
|
|
16
|
+
>;
|
|
13
17
|
size: CodegenTypes.Float;
|
|
14
|
-
color
|
|
18
|
+
color?: ColorValue;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
21
|
export default codegenNativeComponent<NativeProps>(
|
|
@@ -5,12 +5,12 @@ import { type TurboModule, TurboModuleRegistry } from 'react-native';
|
|
|
5
5
|
export interface Spec extends TurboModule {
|
|
6
6
|
getImageSource(
|
|
7
7
|
name: string,
|
|
8
|
-
variant: string,
|
|
8
|
+
variant: string | undefined,
|
|
9
|
+
weight: 100 | 200 | 300 | 400 | 500 | 600 | 700 | undefined,
|
|
9
10
|
size: number,
|
|
10
11
|
// Codegen requires using `Object` instead of `object
|
|
11
12
|
// eslint-disable-next-line @typescript-eslint/no-wrapper-object-types
|
|
12
|
-
color: Object
|
|
13
|
-
hash: string
|
|
13
|
+
color: Object
|
|
14
14
|
): string;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable import-x/no-default-export */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
codegenNativeCommands,
|
|
5
|
+
codegenNativeComponent,
|
|
6
|
+
CodegenTypes,
|
|
7
|
+
type HostComponent,
|
|
8
|
+
type ViewProps,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
|
|
11
|
+
export interface NativeProps extends ViewProps {
|
|
12
|
+
direction?: CodegenTypes.WithDefault<'vertical' | 'horizontal', 'vertical'>;
|
|
13
|
+
edge?: CodegenTypes.WithDefault<'top' | 'right' | 'bottom' | 'left', 'top'>;
|
|
14
|
+
adaptive?: CodegenTypes.WithDefault<boolean, true>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface NativeCommands {
|
|
18
|
+
// FIXME: codegen fails with ComponentRef
|
|
19
|
+
// so we currently use the deprecated ElementRef
|
|
20
|
+
relayout(viewRef: React.ElementRef<HostComponent<NativeProps>>): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const Commands = codegenNativeCommands<NativeCommands>({
|
|
24
|
+
supportedCommands: ['relayout'],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export default codegenNativeComponent<NativeProps>(
|
|
28
|
+
'ReactNavigationCornerInsetView',
|
|
29
|
+
{
|
|
30
|
+
interfaceOnly: true,
|
|
31
|
+
}
|
|
32
|
+
) as HostComponent<NativeProps>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
|
|
3
|
+
import { FONT_WEIGHTS } from './constants';
|
|
3
4
|
import SFSymbolViewNativeComponent from './SFSymbolViewNativeComponent';
|
|
4
5
|
import type { SFSymbolOptions } from './types';
|
|
5
6
|
|
|
@@ -8,15 +9,37 @@ export type SFSymbolProps = SFSymbolOptions & ViewProps;
|
|
|
8
9
|
export function SFSymbol({
|
|
9
10
|
name,
|
|
10
11
|
size = 24,
|
|
11
|
-
color
|
|
12
|
+
color,
|
|
13
|
+
weight,
|
|
14
|
+
scale = 'medium',
|
|
15
|
+
mode = 'monochrome',
|
|
16
|
+
colors,
|
|
17
|
+
animation,
|
|
12
18
|
style,
|
|
13
19
|
...rest
|
|
14
20
|
}: SFSymbolProps): React.ReactElement {
|
|
21
|
+
const animConfig =
|
|
22
|
+
typeof animation === 'string' ? { effect: animation } : animation;
|
|
23
|
+
|
|
15
24
|
return (
|
|
16
25
|
<SFSymbolViewNativeComponent
|
|
17
26
|
name={name}
|
|
18
27
|
size={size}
|
|
19
28
|
color={color}
|
|
29
|
+
weight={typeof weight === 'string' ? FONT_WEIGHTS[weight] : (weight ?? 0)}
|
|
30
|
+
scale={scale}
|
|
31
|
+
mode={mode}
|
|
32
|
+
colorPrimary={colors?.primary ?? color}
|
|
33
|
+
colorSecondary={colors?.secondary}
|
|
34
|
+
colorTertiary={colors?.tertiary}
|
|
35
|
+
animation={animConfig?.effect ?? ''}
|
|
36
|
+
animationRepeating={animConfig?.repeating ?? false}
|
|
37
|
+
animationRepeatCount={animConfig?.repeatCount ?? 0}
|
|
38
|
+
animationSpeed={animConfig?.speed ?? 1}
|
|
39
|
+
animationWholeSymbol={animConfig?.wholeSymbol ?? false}
|
|
40
|
+
animationDirection={animConfig?.direction ?? ''}
|
|
41
|
+
animationReversing={animConfig?.reversing ?? false}
|
|
42
|
+
animationCumulative={animConfig?.cumulative ?? false}
|
|
20
43
|
style={[
|
|
21
44
|
{
|
|
22
45
|
width: size,
|
|
@@ -10,7 +10,21 @@ import {
|
|
|
10
10
|
export interface NativeProps extends ViewProps {
|
|
11
11
|
name: string;
|
|
12
12
|
size: CodegenTypes.Float;
|
|
13
|
-
color
|
|
13
|
+
color?: ColorValue;
|
|
14
|
+
weight: CodegenTypes.Int32;
|
|
15
|
+
scale: string;
|
|
16
|
+
mode: string;
|
|
17
|
+
colorPrimary?: ColorValue;
|
|
18
|
+
colorSecondary?: ColorValue;
|
|
19
|
+
colorTertiary?: ColorValue;
|
|
20
|
+
animation: string;
|
|
21
|
+
animationRepeating: boolean;
|
|
22
|
+
animationRepeatCount: CodegenTypes.Int32;
|
|
23
|
+
animationSpeed: CodegenTypes.Float;
|
|
24
|
+
animationWholeSymbol: boolean;
|
|
25
|
+
animationDirection: string;
|
|
26
|
+
animationReversing: boolean;
|
|
27
|
+
animationCumulative: boolean;
|
|
14
28
|
}
|
|
15
29
|
|
|
16
30
|
export default codegenNativeComponent<NativeProps>(
|