@react-navigation/native 8.0.0-alpha.3 → 8.0.0-alpha.31
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 +80 -6
- package/android/src/main/java/org/reactnavigation/MaterialSymbolModule.kt +33 -12
- package/android/src/main/java/org/reactnavigation/MaterialSymbolTypeface.kt +81 -8
- package/android/src/main/java/org/reactnavigation/MaterialSymbolView.kt +39 -6
- package/android/src/main/java/org/reactnavigation/MaterialSymbolViewManager.kt +14 -7
- package/android/src/main/java/org/reactnavigation/ReactNavigationPackage.kt +3 -1
- 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/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.codepoints +4102 -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_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.codepoints +4102 -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_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 +34 -0
- package/ios/ReactNavigationSFSymbolView.swift +543 -7
- package/lib/module/NavigationContainer.js +16 -11
- package/lib/module/NavigationContainer.js.map +1 -1
- package/lib/module/__stubs__/createStackNavigator.js +10 -4
- package/lib/module/__stubs__/createStackNavigator.js.map +1 -1
- package/lib/module/__stubs__/window.js +3 -0
- package/lib/module/__stubs__/window.js.map +1 -1
- package/lib/module/createMemoryHistory.js +15 -6
- package/lib/module/createMemoryHistory.js.map +1 -1
- package/lib/module/createStandardNavigationFactories.js +99 -0
- package/lib/module/createStandardNavigationFactories.js.map +1 -0
- package/lib/module/createStaticNavigation.js +5 -4
- package/lib/module/createStaticNavigation.js.map +1 -1
- package/lib/module/extractPathFromURL.js +2 -2
- package/lib/module/extractPathFromURL.js.map +1 -1
- package/lib/module/getStateFromHref.js +2 -2
- package/lib/module/getStateFromHref.js.map +1 -1
- package/lib/module/index.js +4 -2
- 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 +9 -20
- package/lib/module/native/MaterialSymbol.android.js.map +1 -1
- package/lib/module/native/MaterialSymbolData.js +0 -7
- package/lib/module/native/MaterialSymbolData.js.map +1 -1
- package/lib/module/native/MaterialSymbolViewNativeComponent.ts +4 -4
- package/lib/module/native/NativeMaterialSymbolModule.js.map +1 -1
- package/lib/module/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/lib/module/native/SFSymbol.ios.js +45 -1
- package/lib/module/native/SFSymbol.ios.js.map +1 -1
- package/lib/module/native/SFSymbolViewNativeComponent.ts +28 -1
- package/lib/module/native/constants.js +14 -0
- package/lib/module/native/constants.js.map +1 -0
- package/lib/module/server/ServerContext.js.map +1 -0
- package/lib/module/server/index.js +21 -0
- package/lib/module/server/index.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/MaterialFallbackTheme.js +28 -0
- package/lib/module/theming/MaterialFallbackTheme.js.map +1 -0
- package/lib/module/theming/MaterialTheme.android.js +33 -0
- package/lib/module/theming/MaterialTheme.android.js.map +1 -0
- package/lib/module/theming/MaterialTheme.js +4 -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 +8 -7
- 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 +81 -11
- package/lib/module/useLinking.js.map +1 -1
- package/lib/module/useLinking.native.js +25 -8
- 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/useMemoArray.js +25 -0
- package/lib/module/useMemoArray.js.map +1 -0
- package/lib/module/useRoutePath.js +1 -1
- package/lib/module/useRoutePath.js.map +1 -1
- package/lib/module/useScrollToTop.js +3 -2
- package/lib/module/useScrollToTop.js.map +1 -1
- package/lib/typescript/src/Link.d.ts +1 -1
- package/lib/typescript/src/Link.d.ts.map +1 -1
- package/lib/typescript/src/LinkingContext.d.ts +1 -1
- package/lib/typescript/src/LinkingContext.d.ts.map +1 -1
- package/lib/typescript/src/LocaleDirContext.d.ts +1 -1
- package/lib/typescript/src/LocaleDirContext.d.ts.map +1 -1
- package/lib/typescript/src/NavigationContainer.d.ts +13 -6
- package/lib/typescript/src/NavigationContainer.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts +6 -9
- package/lib/typescript/src/__stubs__/createStackNavigator.d.ts.map +1 -1
- package/lib/typescript/src/__stubs__/window.d.ts.map +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts +1 -1
- package/lib/typescript/src/createMemoryHistory.d.ts.map +1 -1
- package/lib/typescript/src/createStandardNavigationFactories.d.ts +31 -0
- package/lib/typescript/src/createStandardNavigationFactories.d.ts.map +1 -0
- package/lib/typescript/src/createStaticNavigation.d.ts +7 -7
- package/lib/typescript/src/createStaticNavigation.d.ts.map +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts +1 -1
- package/lib/typescript/src/extractPathFromURL.d.ts.map +1 -1
- package/lib/typescript/src/getStateFromHref.d.ts +3 -3
- package/lib/typescript/src/getStateFromHref.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +17 -15
- 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 +3 -3
- package/lib/typescript/src/native/MaterialSymbol.android.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbol.d.ts +1 -1
- package/lib/typescript/src/native/MaterialSymbol.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolData.d.ts +0 -3
- package/lib/typescript/src/native/MaterialSymbolData.d.ts.map +1 -1
- package/lib/typescript/src/native/MaterialSymbolViewNativeComponent.d.ts +3 -3
- 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.d.ts +1 -1
- package/lib/typescript/src/native/SFSymbol.d.ts.map +1 -1
- package/lib/typescript/src/native/SFSymbol.ios.d.ts +2 -2
- package/lib/typescript/src/native/SFSymbol.ios.d.ts.map +1 -1
- package/lib/typescript/src/native/SFSymbolViewNativeComponent.d.ts +28 -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 +345 -5
- package/lib/typescript/src/native/types.d.ts.map +1 -1
- package/lib/typescript/src/{ServerContext.d.ts → server/ServerContext.d.ts} +1 -4
- package/lib/typescript/src/server/ServerContext.d.ts.map +1 -0
- package/lib/typescript/src/server/index.d.ts +10 -0
- package/lib/typescript/src/server/index.d.ts.map +1 -0
- 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/MaterialFallbackTheme.d.ts +127 -0
- package/lib/typescript/src/theming/MaterialFallbackTheme.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts +251 -0
- package/lib/typescript/src/theming/MaterialTheme.android.d.ts.map +1 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts +2 -0
- package/lib/typescript/src/theming/MaterialTheme.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +13 -16
- 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 +2 -2
- package/lib/typescript/src/useDocumentTitle.d.ts.map +1 -1
- package/lib/typescript/src/useLinkBuilder.d.ts +54 -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 +17 -19
- package/lib/typescript/src/useLinking.d.ts.map +1 -1
- package/lib/typescript/src/useLinking.native.d.ts +31 -33
- package/lib/typescript/src/useLinking.native.d.ts.map +1 -1
- package/lib/typescript/src/useLocale.d.ts +1 -1
- package/lib/typescript/src/useMemoArray.d.ts +2 -0
- package/lib/typescript/src/useMemoArray.d.ts.map +1 -0
- package/lib/typescript/src/useScrollToTop.d.ts.map +1 -1
- package/package.json +41 -22
- package/src/NavigationContainer.tsx +41 -32
- package/src/__stubs__/createStackNavigator.tsx +19 -17
- package/src/__stubs__/window.tsx +5 -0
- package/src/createMemoryHistory.tsx +19 -6
- package/src/createStandardNavigationFactories.tsx +218 -0
- package/src/createStaticNavigation.tsx +13 -17
- package/src/extractPathFromURL.tsx +5 -3
- package/src/getStateFromHref.tsx +8 -3
- package/src/index.tsx +11 -2
- package/src/native/CornerInset.ios.tsx +85 -0
- package/src/native/CornerInset.tsx +40 -0
- package/src/native/MaterialSymbol.android.tsx +9 -28
- package/src/native/MaterialSymbolData.tsx +0 -4
- package/src/native/MaterialSymbolViewNativeComponent.ts +4 -4
- package/src/native/NativeMaterialSymbolModule.ts +3 -4
- package/src/native/ReactNavigationCornerInsetViewNativeComponent.ts +32 -0
- package/src/native/SFSymbol.ios.tsx +84 -2
- package/src/native/SFSymbolViewNativeComponent.ts +28 -1
- package/src/native/constants.tsx +11 -0
- package/src/native/types.tsx +433 -4
- package/src/{ServerContext.tsx → server/ServerContext.tsx} +1 -4
- package/src/server/index.tsx +19 -0
- package/src/theming/DarkTheme.tsx +4 -4
- package/src/theming/{DefaultTheme.tsx → LightTheme.tsx} +4 -4
- package/src/theming/MaterialFallbackTheme.tsx +29 -0
- package/src/theming/MaterialTheme.android.tsx +45 -0
- package/src/theming/MaterialTheme.tsx +4 -0
- package/src/types.tsx +38 -40
- package/src/useBackButton.tsx +2 -2
- package/src/useDocumentTitle.tsx +2 -2
- package/src/useLinkBuilder.tsx +15 -7
- package/src/useLinkProps.tsx +8 -41
- package/src/useLinkTo.tsx +1 -1
- package/src/useLinking.native.tsx +58 -30
- package/src/useLinking.tsx +132 -22
- package/src/useLocale.tsx +1 -1
- package/src/useMemoArray.tsx +41 -0
- package/src/useRoutePath.tsx +1 -1
- package/src/useScrollToTop.tsx +3 -2
- 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$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 -45
- package/android/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNavigationMaterialSymbolViewManagerInterface.java +0 -22
- 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 -106
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/Props.h +0 -113
- package/android/build/generated/source/codegen/jni/react/renderer/components/ReactNavigationSpec/ReactNavigationSpecJSI-generated.cpp +0 -32
- 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/MaterialSymbolsOutlined_400.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_400.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$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$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/lib/module/ServerContainer.js +0 -55
- package/lib/module/ServerContainer.js.map +0 -1
- package/lib/module/ServerContext.js.map +0 -1
- package/lib/module/theming/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/ServerContainer.d.ts +0 -14
- package/lib/typescript/src/ServerContainer.d.ts.map +0 -1
- package/lib/typescript/src/ServerContext.d.ts.map +0 -1
- package/lib/typescript/src/theming/DefaultTheme.d.ts.map +0 -1
- package/src/ServerContainer.tsx +0 -57
- /package/lib/module/{ServerContext.js → server/ServerContext.js} +0 -0
|
@@ -4,6 +4,33 @@ import UIKit
|
|
|
4
4
|
public var name: String?
|
|
5
5
|
public var size: CGFloat = 24
|
|
6
6
|
public var color: UIColor = .black
|
|
7
|
+
public var weight: Int = 0
|
|
8
|
+
public var scale: String = "medium"
|
|
9
|
+
public var renderingMode: String = "monochrome"
|
|
10
|
+
public var colorPrimary: UIColor?
|
|
11
|
+
public var colorSecondary: UIColor?
|
|
12
|
+
public var colorTertiary: UIColor?
|
|
13
|
+
public var effect: String = ""
|
|
14
|
+
public var variableValue: CGFloat = -1
|
|
15
|
+
public var variableValueMode: String = "automatic"
|
|
16
|
+
public var colorRenderingMode: String = "automatic"
|
|
17
|
+
public var effectRepeat: String = ""
|
|
18
|
+
public var effectRepeatCount: Int = 0
|
|
19
|
+
public var effectRepeatDelay: CGFloat = 0
|
|
20
|
+
public var effectSpeed: CGFloat = 1
|
|
21
|
+
public var effectScope: String = ""
|
|
22
|
+
public var effectDirection: String = ""
|
|
23
|
+
public var effectVariant: String = ""
|
|
24
|
+
public var effectAngle: CGFloat = -1
|
|
25
|
+
public var effectReversing: Bool = false
|
|
26
|
+
public var effectCumulative: Bool = false
|
|
27
|
+
public var effectInactiveLayers: String = ""
|
|
28
|
+
public var effectDrawDirection: String = ""
|
|
29
|
+
public var contentTransition: String = ""
|
|
30
|
+
public var contentTransitionSpeed: CGFloat = 1
|
|
31
|
+
public var contentTransitionVariant: String = ""
|
|
32
|
+
public var contentTransitionScope: String = ""
|
|
33
|
+
public var contentTransitionMagic: Bool = false
|
|
7
34
|
}
|
|
8
35
|
|
|
9
36
|
@objc public class ReactNavigationSFSymbolViewImpl: UIView {
|
|
@@ -33,18 +60,527 @@ import UIKit
|
|
|
33
60
|
}
|
|
34
61
|
|
|
35
62
|
@objc public func updateProps(_ props: ReactNavigationSFSymbolViewImplProps, oldProps: ReactNavigationSFSymbolViewImplProps) {
|
|
36
|
-
|
|
63
|
+
let needsImageUpdate =
|
|
64
|
+
props.name != oldProps.name ||
|
|
65
|
+
props.size != oldProps.size ||
|
|
66
|
+
props.weight != oldProps.weight ||
|
|
67
|
+
props.scale != oldProps.scale ||
|
|
68
|
+
props.variableValue != oldProps.variableValue ||
|
|
69
|
+
props.variableValueMode != oldProps.variableValueMode ||
|
|
70
|
+
props.colorRenderingMode != oldProps.colorRenderingMode ||
|
|
71
|
+
props.renderingMode != oldProps.renderingMode ||
|
|
72
|
+
props.colorPrimary != oldProps.colorPrimary ||
|
|
73
|
+
props.colorSecondary != oldProps.colorSecondary ||
|
|
74
|
+
props.colorTertiary != oldProps.colorTertiary
|
|
75
|
+
|
|
76
|
+
if needsImageUpdate {
|
|
37
77
|
if let name = props.name {
|
|
38
|
-
|
|
39
|
-
|
|
78
|
+
// Content transitions animate between symbol contents, so only run them
|
|
79
|
+
// when the symbol or its variable value changes and a previous image
|
|
80
|
+
// exists. Configuration changes and the first appearance set the image
|
|
81
|
+
// directly to match native behavior.
|
|
82
|
+
let shouldAnimate =
|
|
83
|
+
imageView.image != nil &&
|
|
84
|
+
(props.name != oldProps.name || props.variableValue != oldProps.variableValue)
|
|
85
|
+
|
|
86
|
+
let symbolWeight = Self.symbolWeight(from: props.weight)
|
|
87
|
+
let symbolScale = Self.symbolScale(from: props.scale)
|
|
88
|
+
|
|
89
|
+
var configuration = UIImage.SymbolConfiguration(pointSize: props.size, weight: symbolWeight, scale: symbolScale)
|
|
90
|
+
|
|
91
|
+
if #available(iOS 26.0, *) {
|
|
92
|
+
configuration = configuration.applying(
|
|
93
|
+
UIImage.SymbolConfiguration(
|
|
94
|
+
variableValueMode: Self.symbolVariableValueMode(from: props.variableValueMode)
|
|
95
|
+
)
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
configuration = configuration.applying(
|
|
99
|
+
UIImage.SymbolConfiguration(
|
|
100
|
+
colorRenderingMode: Self.symbolColorRenderingMode(from: props.colorRenderingMode)
|
|
101
|
+
)
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
let primaryColor = props.colorPrimary ?? props.color
|
|
106
|
+
|
|
107
|
+
switch props.renderingMode {
|
|
108
|
+
case "hierarchical":
|
|
109
|
+
configuration = configuration.applying(
|
|
110
|
+
UIImage.SymbolConfiguration(hierarchicalColor: primaryColor)
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
let image = Self.symbolImage(name: name, configuration: configuration, props: props)
|
|
114
|
+
|
|
115
|
+
imageView.tintColor = nil
|
|
116
|
+
setImage(image, props: props, animated: shouldAnimate)
|
|
117
|
+
|
|
118
|
+
case "palette":
|
|
119
|
+
var paletteColors: [UIColor] = []
|
|
120
|
+
|
|
121
|
+
paletteColors.append(primaryColor)
|
|
122
|
+
|
|
123
|
+
if let secondary = props.colorSecondary {
|
|
124
|
+
paletteColors.append(secondary)
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if let tertiary = props.colorTertiary {
|
|
128
|
+
paletteColors.append(tertiary)
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
configuration = configuration.applying(
|
|
132
|
+
UIImage.SymbolConfiguration(paletteColors: paletteColors)
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
let image = Self.symbolImage(name: name, configuration: configuration, props: props)
|
|
136
|
+
|
|
137
|
+
imageView.tintColor = nil
|
|
138
|
+
setImage(image, props: props, animated: shouldAnimate)
|
|
139
|
+
|
|
140
|
+
case "multicolor":
|
|
141
|
+
configuration = configuration.applying(
|
|
142
|
+
UIImage.SymbolConfiguration.preferringMulticolor()
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
let image = Self.symbolImage(name: name, configuration: configuration, props: props)
|
|
146
|
+
|
|
147
|
+
imageView.tintColor = nil
|
|
148
|
+
setImage(image, props: props, animated: shouldAnimate)
|
|
149
|
+
|
|
150
|
+
default:
|
|
151
|
+
// monochrome
|
|
152
|
+
let image = Self.symbolImage(name: name, configuration: configuration, props: props)
|
|
40
153
|
|
|
41
|
-
|
|
42
|
-
|
|
154
|
+
imageView.tintColor = primaryColor
|
|
155
|
+
setImage(image?.withRenderingMode(.alwaysTemplate), props: props, animated: shouldAnimate)
|
|
156
|
+
}
|
|
43
157
|
}
|
|
44
158
|
}
|
|
45
159
|
|
|
46
|
-
if props.color != oldProps.color {
|
|
47
|
-
imageView.tintColor = props.color
|
|
160
|
+
if !needsImageUpdate && props.color != oldProps.color && props.renderingMode == "monochrome" {
|
|
161
|
+
imageView.tintColor = props.colorPrimary ?? props.color
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
let effectChanged =
|
|
165
|
+
props.effect != oldProps.effect ||
|
|
166
|
+
props.effectRepeat != oldProps.effectRepeat ||
|
|
167
|
+
props.effectRepeatCount != oldProps.effectRepeatCount ||
|
|
168
|
+
props.effectRepeatDelay != oldProps.effectRepeatDelay ||
|
|
169
|
+
props.effectSpeed != oldProps.effectSpeed ||
|
|
170
|
+
props.effectScope != oldProps.effectScope ||
|
|
171
|
+
props.effectDirection != oldProps.effectDirection ||
|
|
172
|
+
props.effectVariant != oldProps.effectVariant ||
|
|
173
|
+
props.effectAngle != oldProps.effectAngle ||
|
|
174
|
+
props.effectReversing != oldProps.effectReversing ||
|
|
175
|
+
props.effectCumulative != oldProps.effectCumulative ||
|
|
176
|
+
props.effectInactiveLayers != oldProps.effectInactiveLayers ||
|
|
177
|
+
props.effectDrawDirection != oldProps.effectDrawDirection
|
|
178
|
+
|
|
179
|
+
if effectChanged {
|
|
180
|
+
updateEffect(props)
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
private func setImage(_ image: UIImage?, props: ReactNavigationSFSymbolViewImplProps, animated: Bool) {
|
|
185
|
+
guard let image else {
|
|
186
|
+
imageView.image = nil
|
|
187
|
+
return
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
guard animated, #available(iOS 17.0, *) else {
|
|
191
|
+
imageView.image = image
|
|
192
|
+
return
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
let options = Self.contentTransitionOptions(from: props)
|
|
196
|
+
|
|
197
|
+
switch props.contentTransition {
|
|
198
|
+
case "automatic":
|
|
199
|
+
imageView.setSymbolImage(
|
|
200
|
+
image,
|
|
201
|
+
contentTransition: .automatic,
|
|
202
|
+
options: options
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
case "replace":
|
|
206
|
+
var effect = ReplaceSymbolEffect.replace
|
|
207
|
+
|
|
208
|
+
switch props.contentTransitionVariant {
|
|
209
|
+
case "upUp":
|
|
210
|
+
effect = effect.upUp
|
|
211
|
+
case "offUp":
|
|
212
|
+
effect = effect.offUp
|
|
213
|
+
default:
|
|
214
|
+
effect = effect.downUp
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if props.contentTransitionScope == "wholeSymbol" {
|
|
218
|
+
effect = effect.wholeSymbol
|
|
219
|
+
} else if props.contentTransitionScope == "byLayer" {
|
|
220
|
+
effect = effect.byLayer
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if props.contentTransitionMagic, #available(iOS 18.0, *) {
|
|
224
|
+
imageView.setSymbolImage(
|
|
225
|
+
image,
|
|
226
|
+
contentTransition: effect.magic(fallback: effect),
|
|
227
|
+
options: options
|
|
228
|
+
)
|
|
229
|
+
} else {
|
|
230
|
+
imageView.setSymbolImage(
|
|
231
|
+
image,
|
|
232
|
+
contentTransition: effect,
|
|
233
|
+
options: options
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
default:
|
|
238
|
+
imageView.image = image
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
@available(iOS 17.0, *)
|
|
243
|
+
private static func contentTransitionOptions(from props: ReactNavigationSFSymbolViewImplProps) -> SymbolEffectOptions {
|
|
244
|
+
var options: SymbolEffectOptions = .default
|
|
245
|
+
|
|
246
|
+
if props.contentTransitionSpeed != 1 {
|
|
247
|
+
options = options.speed(props.contentTransitionSpeed)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return options
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
private func updateEffect(_ props: ReactNavigationSFSymbolViewImplProps) {
|
|
254
|
+
guard #available(iOS 17.0, *) else { return }
|
|
255
|
+
|
|
256
|
+
imageView.removeAllSymbolEffects()
|
|
257
|
+
|
|
258
|
+
guard !props.effect.isEmpty else { return }
|
|
259
|
+
|
|
260
|
+
let options = Self.symbolEffectOptions(from: props)
|
|
261
|
+
|
|
262
|
+
switch props.effect {
|
|
263
|
+
case "bounce":
|
|
264
|
+
var effect = BounceSymbolEffect.bounce
|
|
265
|
+
|
|
266
|
+
if props.effectScope == "wholeSymbol" {
|
|
267
|
+
effect = effect.wholeSymbol
|
|
268
|
+
} else if props.effectScope == "byLayer" {
|
|
269
|
+
effect = effect.byLayer
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if props.effectDirection == "up" {
|
|
273
|
+
effect = effect.up
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if props.effectDirection == "down" {
|
|
277
|
+
effect = effect.down
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
281
|
+
|
|
282
|
+
case "pulse":
|
|
283
|
+
var effect = PulseSymbolEffect.pulse
|
|
284
|
+
|
|
285
|
+
if props.effectScope == "wholeSymbol" {
|
|
286
|
+
effect = effect.wholeSymbol
|
|
287
|
+
} else if props.effectScope == "byLayer" {
|
|
288
|
+
effect = effect.byLayer
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
292
|
+
|
|
293
|
+
case "appear":
|
|
294
|
+
var effect = AppearSymbolEffect.appear
|
|
295
|
+
|
|
296
|
+
if props.effectScope == "wholeSymbol" {
|
|
297
|
+
effect = effect.wholeSymbol
|
|
298
|
+
} else if props.effectScope == "byLayer" {
|
|
299
|
+
effect = effect.byLayer
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
if props.effectDirection == "up" {
|
|
303
|
+
effect = effect.up
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if props.effectDirection == "down" {
|
|
307
|
+
effect = effect.down
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
311
|
+
|
|
312
|
+
case "disappear":
|
|
313
|
+
var effect = DisappearSymbolEffect.disappear
|
|
314
|
+
|
|
315
|
+
if props.effectScope == "wholeSymbol" {
|
|
316
|
+
effect = effect.wholeSymbol
|
|
317
|
+
} else if props.effectScope == "byLayer" {
|
|
318
|
+
effect = effect.byLayer
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
if props.effectDirection == "up" {
|
|
322
|
+
effect = effect.up
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if props.effectDirection == "down" {
|
|
326
|
+
effect = effect.down
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
330
|
+
|
|
331
|
+
case "variableColor":
|
|
332
|
+
var effect = VariableColorSymbolEffect.variableColor
|
|
333
|
+
|
|
334
|
+
if props.effectReversing {
|
|
335
|
+
effect = props.effectCumulative ? effect.reversing.cumulative : effect.reversing.iterative
|
|
336
|
+
} else {
|
|
337
|
+
effect = props.effectCumulative ? effect.nonReversing.cumulative : effect.nonReversing.iterative
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if props.effectInactiveLayers == "hide" {
|
|
341
|
+
effect = effect.hideInactiveLayers
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if props.effectInactiveLayers == "dim" {
|
|
345
|
+
effect = effect.dimInactiveLayers
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
349
|
+
|
|
350
|
+
case "scale":
|
|
351
|
+
var effect = ScaleSymbolEffect.scale
|
|
352
|
+
|
|
353
|
+
if props.effectScope == "wholeSymbol" {
|
|
354
|
+
effect = effect.wholeSymbol
|
|
355
|
+
} else if props.effectScope == "byLayer" {
|
|
356
|
+
effect = effect.byLayer
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if props.effectDirection == "up" {
|
|
360
|
+
effect = effect.up
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if props.effectDirection == "down" {
|
|
364
|
+
effect = effect.down
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
368
|
+
|
|
369
|
+
case "breathe":
|
|
370
|
+
if #available(iOS 18.0, *) {
|
|
371
|
+
var effect = BreatheSymbolEffect.breathe
|
|
372
|
+
|
|
373
|
+
if props.effectVariant == "plain" {
|
|
374
|
+
effect = effect.plain
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if props.effectVariant == "pulse" {
|
|
378
|
+
effect = effect.pulse
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
if props.effectScope == "wholeSymbol" {
|
|
382
|
+
effect = effect.wholeSymbol
|
|
383
|
+
} else if props.effectScope == "byLayer" {
|
|
384
|
+
effect = effect.byLayer
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
case "wiggle":
|
|
391
|
+
if #available(iOS 18.0, *) {
|
|
392
|
+
var effect = WiggleSymbolEffect.wiggle
|
|
393
|
+
|
|
394
|
+
if props.effectScope == "wholeSymbol" {
|
|
395
|
+
effect = effect.wholeSymbol
|
|
396
|
+
} else if props.effectScope == "byLayer" {
|
|
397
|
+
effect = effect.byLayer
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if props.effectAngle >= 0 {
|
|
401
|
+
effect = effect.custom(angle: Double(props.effectAngle))
|
|
402
|
+
} else if props.effectDirection == "up" {
|
|
403
|
+
effect = effect.up
|
|
404
|
+
} else if props.effectDirection == "down" {
|
|
405
|
+
effect = effect.down
|
|
406
|
+
} else if props.effectDirection == "left" {
|
|
407
|
+
effect = effect.left
|
|
408
|
+
} else if props.effectDirection == "right" {
|
|
409
|
+
effect = effect.right
|
|
410
|
+
} else if props.effectDirection == "forward" {
|
|
411
|
+
effect = effect.forward
|
|
412
|
+
} else if props.effectDirection == "backward" {
|
|
413
|
+
effect = effect.backward
|
|
414
|
+
} else if props.effectDirection == "clockwise" {
|
|
415
|
+
effect = effect.clockwise
|
|
416
|
+
} else if props.effectDirection == "counterClockwise" {
|
|
417
|
+
effect = effect.counterClockwise
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
case "rotate":
|
|
424
|
+
if #available(iOS 18.0, *) {
|
|
425
|
+
var effect = RotateSymbolEffect.rotate
|
|
426
|
+
|
|
427
|
+
if props.effectScope == "wholeSymbol" {
|
|
428
|
+
effect = effect.wholeSymbol
|
|
429
|
+
} else if props.effectScope == "byLayer" {
|
|
430
|
+
effect = effect.byLayer
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if props.effectDirection == "clockwise" {
|
|
434
|
+
effect = effect.clockwise
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if props.effectDirection == "counterClockwise" {
|
|
438
|
+
effect = effect.counterClockwise
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
case "drawOn":
|
|
445
|
+
if #available(iOS 26.0, *) {
|
|
446
|
+
var effect = DrawOnSymbolEffect.drawOn
|
|
447
|
+
|
|
448
|
+
if props.effectScope == "wholeSymbol" {
|
|
449
|
+
effect = effect.wholeSymbol
|
|
450
|
+
} else if props.effectScope == "individually" {
|
|
451
|
+
effect = effect.individually
|
|
452
|
+
} else if props.effectScope == "byLayer" {
|
|
453
|
+
effect = effect.byLayer
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
case "drawOff":
|
|
460
|
+
if #available(iOS 26.0, *) {
|
|
461
|
+
var effect = DrawOffSymbolEffect.drawOff
|
|
462
|
+
|
|
463
|
+
if props.effectDrawDirection == "reversed" {
|
|
464
|
+
effect = effect.reversed
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if props.effectDrawDirection == "nonReversed" {
|
|
468
|
+
effect = effect.nonReversed
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if props.effectScope == "wholeSymbol" {
|
|
472
|
+
effect = effect.wholeSymbol
|
|
473
|
+
} else if props.effectScope == "individually" {
|
|
474
|
+
effect = effect.individually
|
|
475
|
+
} else if props.effectScope == "byLayer" {
|
|
476
|
+
effect = effect.byLayer
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
imageView.addSymbolEffect(effect, options: options)
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
default: break
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
@available(iOS 17.0, *)
|
|
487
|
+
private static func symbolEffectOptions(from props: ReactNavigationSFSymbolViewImplProps) -> SymbolEffectOptions {
|
|
488
|
+
var options: SymbolEffectOptions = .default
|
|
489
|
+
|
|
490
|
+
switch props.effectRepeat {
|
|
491
|
+
case "continuous":
|
|
492
|
+
if #available(iOS 18.0, *) {
|
|
493
|
+
options = options.repeat(.continuous)
|
|
494
|
+
} else {
|
|
495
|
+
options = options.repeating
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
case "nonRepeating":
|
|
499
|
+
options = options.nonRepeating
|
|
500
|
+
|
|
501
|
+
case "periodic":
|
|
502
|
+
if #available(iOS 18.0, *) {
|
|
503
|
+
let count: Int? = props.effectRepeatCount > 0 ? props.effectRepeatCount : nil
|
|
504
|
+
let delay: Double? = props.effectRepeatDelay > 0 ? Double(props.effectRepeatDelay) : nil
|
|
505
|
+
|
|
506
|
+
options = options.repeat(
|
|
507
|
+
.periodic(count, delay: delay)
|
|
508
|
+
)
|
|
509
|
+
} else if props.effectRepeatCount > 0 {
|
|
510
|
+
options = options.repeat(props.effectRepeatCount)
|
|
511
|
+
} else {
|
|
512
|
+
options = options.repeating
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
default:
|
|
516
|
+
break
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
if props.effectSpeed != 1 {
|
|
520
|
+
options = options.speed(props.effectSpeed)
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
return options
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
private static func symbolImage(
|
|
527
|
+
name: String,
|
|
528
|
+
configuration: UIImage.SymbolConfiguration,
|
|
529
|
+
props: ReactNavigationSFSymbolViewImplProps
|
|
530
|
+
) -> UIImage? {
|
|
531
|
+
if props.variableValue >= 0 {
|
|
532
|
+
let variableValue = min(max(props.variableValue, 0), 1)
|
|
533
|
+
|
|
534
|
+
if #available(iOS 16.0, *) {
|
|
535
|
+
return UIImage(
|
|
536
|
+
systemName: name,
|
|
537
|
+
variableValue: Double(variableValue),
|
|
538
|
+
configuration: configuration
|
|
539
|
+
)
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
return UIImage(systemName: name, withConfiguration: configuration)
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
@available(iOS 26.0, *)
|
|
547
|
+
private static func symbolVariableValueMode(from value: String) -> UIImage.SymbolVariableValueMode {
|
|
548
|
+
switch value {
|
|
549
|
+
case "color": return .color
|
|
550
|
+
case "draw": return .draw
|
|
551
|
+
default: return .automatic
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@available(iOS 26.0, *)
|
|
556
|
+
private static func symbolColorRenderingMode(from value: String) -> UIImage.SymbolColorRenderingMode {
|
|
557
|
+
switch value {
|
|
558
|
+
case "flat": return .flat
|
|
559
|
+
case "gradient": return .gradient
|
|
560
|
+
default: return .automatic
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
private static func symbolWeight(from value: Int) -> UIImage.SymbolWeight {
|
|
565
|
+
switch value {
|
|
566
|
+
case 100: return .thin
|
|
567
|
+
case 200: return .ultraLight
|
|
568
|
+
case 300: return .light
|
|
569
|
+
case 400: return .regular
|
|
570
|
+
case 500: return .medium
|
|
571
|
+
case 600: return .semibold
|
|
572
|
+
case 700: return .bold
|
|
573
|
+
case 800: return .heavy
|
|
574
|
+
case 900: return .black
|
|
575
|
+
default: return .regular
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
private static func symbolScale(from value: String) -> UIImage.SymbolScale {
|
|
580
|
+
switch value {
|
|
581
|
+
case "small": return .small
|
|
582
|
+
case "large": return .large
|
|
583
|
+
default: return .medium
|
|
48
584
|
}
|
|
49
585
|
}
|
|
50
586
|
}
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { I18nManager, Platform } from 'react-native';
|
|
6
6
|
import { LinkingContext } from "./LinkingContext.js";
|
|
7
7
|
import { LocaleDirContext } from "./LocaleDirContext.js";
|
|
8
|
-
import {
|
|
8
|
+
import { LightTheme } from "./theming/LightTheme.js";
|
|
9
9
|
import { useBackButton } from './useBackButton';
|
|
10
10
|
import { useDocumentTitle } from './useDocumentTitle';
|
|
11
11
|
import { useLinking } from './useLinking';
|
|
@@ -13,16 +13,23 @@ import { useThenable } from "./useThenable.js";
|
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
globalThis.REACT_NAVIGATION_DEVTOOLS = new WeakMap();
|
|
15
15
|
const RESTORE_STATE_ERROR = 'Failed to restore navigation state. The state will be initialized based on the navigation tree.';
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Container component that manages the navigation state.
|
|
19
|
+
*
|
|
20
|
+
* This should be rendered at the root wrapping the whole app.
|
|
21
|
+
*/
|
|
22
|
+
export function NavigationContainer({
|
|
17
23
|
direction = I18nManager.getConstants().isRTL ? 'rtl' : 'ltr',
|
|
18
|
-
theme =
|
|
24
|
+
theme = LightTheme,
|
|
19
25
|
linking,
|
|
20
26
|
persistor,
|
|
21
27
|
fallback = null,
|
|
22
28
|
documentTitle,
|
|
23
29
|
onStateChange,
|
|
30
|
+
ref,
|
|
24
31
|
...rest
|
|
25
|
-
}
|
|
32
|
+
}) {
|
|
26
33
|
if (linking?.config) {
|
|
27
34
|
validatePathConfig(linking.config);
|
|
28
35
|
}
|
|
@@ -56,9 +63,14 @@ function NavigationContainerInner({
|
|
|
56
63
|
// This will be used by the devtools
|
|
57
64
|
React.useEffect(() => {
|
|
58
65
|
if (refContainer.current) {
|
|
66
|
+
const previous = REACT_NAVIGATION_DEVTOOLS.get(refContainer.current);
|
|
67
|
+
const listeners = previous?.listeners ?? new Set();
|
|
59
68
|
REACT_NAVIGATION_DEVTOOLS.set(refContainer.current, {
|
|
60
69
|
get linking() {
|
|
61
70
|
return linkingConfig.options;
|
|
71
|
+
},
|
|
72
|
+
get listeners() {
|
|
73
|
+
return listeners;
|
|
62
74
|
}
|
|
63
75
|
});
|
|
64
76
|
}
|
|
@@ -128,11 +140,4 @@ function NavigationContainerInner({
|
|
|
128
140
|
})
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Container component that manages the navigation state.
|
|
134
|
-
*
|
|
135
|
-
* This should be rendered at the root wrapping the whole app.
|
|
136
|
-
*/
|
|
137
|
-
export const NavigationContainer = /*#__PURE__*/React.forwardRef(NavigationContainerInner);
|
|
138
143
|
//# sourceMappingURL=NavigationContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BaseNavigationContainer","getActionFromState","getPathFromState","getStateFromPath","ThemeProvider","validatePathConfig","React","I18nManager","Platform","LinkingContext","LocaleDirContext","
|
|
1
|
+
{"version":3,"names":["BaseNavigationContainer","getActionFromState","getPathFromState","getStateFromPath","ThemeProvider","validatePathConfig","React","I18nManager","Platform","LinkingContext","LocaleDirContext","LightTheme","useBackButton","useDocumentTitle","useLinking","useThenable","jsx","_jsx","globalThis","REACT_NAVIGATION_DEVTOOLS","WeakMap","RESTORE_STATE_ERROR","NavigationContainer","direction","getConstants","isRTL","theme","linking","persistor","fallback","documentTitle","onStateChange","ref","rest","config","refContainer","useRef","linkingConfig","useMemo","options","enabled","prefixes","getInitialState","useEffect","current","previous","get","listeners","Set","set","isLinkStateResolved","initialStateFromLink","initialState","undefined","isPersistenceSupported","OS","isPersistedStateResolved","initialStateFromPersisted","restoredState","restore","e","console","error","then","state","thenable","onfulfilled","Promise","resolve","useImperativeHandle","isStateReady","Provider","value","children","persist"],"sourceRoot":"../../src","sources":["NavigationContainer.tsx"],"mappings":"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","ignoreList":[]}
|
|
@@ -8,11 +8,17 @@ const StackNavigator = props => {
|
|
|
8
8
|
descriptors,
|
|
9
9
|
NavigationContent
|
|
10
10
|
} = useNavigationBuilder(StackRouter, props);
|
|
11
|
+
const route = state.routes[state.index];
|
|
12
|
+
if (route == null) {
|
|
13
|
+
throw new Error(`Couldn't find a route at index ${state.index}.`);
|
|
14
|
+
}
|
|
15
|
+
const descriptor = descriptors[route.key];
|
|
16
|
+
if (descriptor == null) {
|
|
17
|
+
throw new Error(`Couldn't find a descriptor for route '${route.key}'.`);
|
|
18
|
+
}
|
|
11
19
|
return /*#__PURE__*/_jsx(NavigationContent, {
|
|
12
|
-
children:
|
|
20
|
+
children: descriptor.render()
|
|
13
21
|
});
|
|
14
22
|
};
|
|
15
|
-
export
|
|
16
|
-
return createNavigatorFactory(StackNavigator)();
|
|
17
|
-
}
|
|
23
|
+
export const createStackNavigator = createNavigatorFactory(StackNavigator);
|
|
18
24
|
//# sourceMappingURL=createStackNavigator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createNavigatorFactory","StackRouter","useNavigationBuilder","jsx","_jsx","StackNavigator","props","state","descriptors","NavigationContent","
|
|
1
|
+
{"version":3,"names":["createNavigatorFactory","StackRouter","useNavigationBuilder","jsx","_jsx","StackNavigator","props","state","descriptors","NavigationContent","route","routes","index","Error","descriptor","key","children","render","createStackNavigator"],"sourceRoot":"../../../src","sources":["__stubs__/createStackNavigator.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAKtBC,WAAW,EACXC,oBAAoB,QACf,wBAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEhC,MAAMC,cAAc,GAClBC,KAMC,IACE;EACH,MAAM;IAAEC,KAAK;IAAEC,WAAW;IAAEC;EAAkB,CAAC,GAAGP,oBAAoB,CACpED,WAAW,EACXK,KACF,CAAC;EAED,MAAMI,KAAK,GAAGH,KAAK,CAACI,MAAM,CAACJ,KAAK,CAACK,KAAK,CAAC;EAEvC,IAAIF,KAAK,IAAI,IAAI,EAAE;IACjB,MAAM,IAAIG,KAAK,CAAC,kCAAkCN,KAAK,CAACK,KAAK,GAAG,CAAC;EACnE;EAEA,MAAME,UAAU,GAAGN,WAAW,CAACE,KAAK,CAACK,GAAG,CAAC;EAEzC,IAAID,UAAU,IAAI,IAAI,EAAE;IACtB,MAAM,IAAID,KAAK,CAAC,yCAAyCH,KAAK,CAACK,GAAG,IAAI,CAAC;EACzE;EAEA,oBAAOX,IAAA,CAACK,iBAAiB;IAAAO,QAAA,EAAEF,UAAU,CAACG,MAAM,CAAC;EAAC,CAAoB,CAAC;AACrE,CAAC;AAOD,OAAO,MAAMC,oBAAoB,GAC/BlB,sBAAsB,CAAmBK,cAAc,CAAC","ignoreList":[]}
|