@react-navigation/native 8.0.0-alpha.2 → 8.0.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
#import "ReactNavigationCornerInsetView.h"
|
|
2
|
+
|
|
3
|
+
#import <React/RCTConversions.h>
|
|
4
|
+
|
|
5
|
+
#if __has_include("ReactNavigation/ReactNavigation-Swift.h")
|
|
6
|
+
#import "ReactNavigation/ReactNavigation-Swift.h"
|
|
7
|
+
#else
|
|
8
|
+
#import "ReactNavigation-Swift.h"
|
|
9
|
+
#endif
|
|
10
|
+
|
|
11
|
+
#import "ReactNavigationCornerInsetViewComponentDescriptor.h"
|
|
12
|
+
#import "ReactNavigationCornerInsetViewShadowNode.h"
|
|
13
|
+
|
|
14
|
+
#import <QuartzCore/QuartzCore.h>
|
|
15
|
+
#import <react/renderer/components/ReactNavigationSpec/Props.h>
|
|
16
|
+
|
|
17
|
+
#import "RCTFabricComponentsPlugins.h"
|
|
18
|
+
|
|
19
|
+
using namespace facebook::react;
|
|
20
|
+
|
|
21
|
+
static NSTimeInterval const ReactNavigationCornerInsetAnimationDuration = 0.2;
|
|
22
|
+
static CGFloat const ReactNavigationCornerInsetAnimationTolerance = 0.01;
|
|
23
|
+
|
|
24
|
+
@interface ReactNavigationCornerInsetView () <ReactNavigationCornerInsetViewImplDelegate>
|
|
25
|
+
|
|
26
|
+
@end
|
|
27
|
+
|
|
28
|
+
@implementation ReactNavigationCornerInsetView {
|
|
29
|
+
ReactNavigationCornerInsetViewImpl * _view;
|
|
30
|
+
ReactNavigationCornerInsetViewShadowNode::ConcreteState::Shared _state;
|
|
31
|
+
CGFloat _currentCornerInset;
|
|
32
|
+
CADisplayLink * _cornerInsetAnimationDisplayLink;
|
|
33
|
+
CFTimeInterval _cornerInsetAnimationStartTime;
|
|
34
|
+
CGFloat _cornerInsetAnimationFromValue;
|
|
35
|
+
CGFloat _cornerInsetAnimationToValue;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
|
39
|
+
{
|
|
40
|
+
return concreteComponentDescriptorProvider<ReactNavigationCornerInsetViewComponentDescriptor>();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
+ (BOOL)shouldBeRecycled
|
|
44
|
+
{
|
|
45
|
+
return NO;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
- (instancetype)initWithFrame:(CGRect)frame
|
|
49
|
+
{
|
|
50
|
+
if (self = [super initWithFrame:frame]) {
|
|
51
|
+
static const auto defaultProps = std::make_shared<const ReactNavigationCornerInsetViewProps>();
|
|
52
|
+
_props = defaultProps;
|
|
53
|
+
|
|
54
|
+
_view = [[ReactNavigationCornerInsetViewImpl alloc] init];
|
|
55
|
+
_view.delegate = self;
|
|
56
|
+
|
|
57
|
+
self.contentView = _view;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return self;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static ReactNavigationCornerInsetViewImplProps *convertProps(const Props::Shared &props) {
|
|
64
|
+
const auto &viewProps = *std::static_pointer_cast<ReactNavigationCornerInsetViewProps const>(props);
|
|
65
|
+
|
|
66
|
+
ReactNavigationCornerInsetViewImplProps *swiftProps = [[ReactNavigationCornerInsetViewImplProps alloc] init];
|
|
67
|
+
|
|
68
|
+
swiftProps.direction = viewProps.direction == ReactNavigationCornerInsetViewDirection::Horizontal
|
|
69
|
+
? CornerInsetDirectionHorizontal
|
|
70
|
+
: CornerInsetDirectionVertical;
|
|
71
|
+
|
|
72
|
+
swiftProps.edge = viewProps.edge == ReactNavigationCornerInsetViewEdge::Left
|
|
73
|
+
? CornerInsetEdgeLeft
|
|
74
|
+
: viewProps.edge == ReactNavigationCornerInsetViewEdge::Right
|
|
75
|
+
? CornerInsetEdgeRight
|
|
76
|
+
: viewProps.edge == ReactNavigationCornerInsetViewEdge::Bottom
|
|
77
|
+
? CornerInsetEdgeBottom
|
|
78
|
+
: CornerInsetEdgeTop;
|
|
79
|
+
swiftProps.adaptive = viewProps.adaptive;
|
|
80
|
+
|
|
81
|
+
return swiftProps;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
|
|
85
|
+
{
|
|
86
|
+
[_view updateProps:convertProps(props) oldProps:convertProps(_props)];
|
|
87
|
+
[super updateProps:props oldProps:oldProps];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
- (void)updateState:(const State::Shared &)state oldState:(const State::Shared &)oldState
|
|
91
|
+
{
|
|
92
|
+
_state = std::static_pointer_cast<ReactNavigationCornerInsetViewShadowNode::ConcreteState const>(state);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
- (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
|
|
96
|
+
{
|
|
97
|
+
if ([commandName isEqualToString:@"relayout"]) {
|
|
98
|
+
[_view relayout];
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
[super handleCommand:commandName args:args];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
- (void)dealloc
|
|
106
|
+
{
|
|
107
|
+
[self stopCornerInsetAnimation];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
- (void)cornerInsetDidChange:(CGFloat)cornerInset animated:(BOOL)animated
|
|
111
|
+
{
|
|
112
|
+
if (animated) {
|
|
113
|
+
if (fabs(_currentCornerInset - cornerInset) <= ReactNavigationCornerInsetAnimationTolerance) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[self startCornerInsetAnimationTo:cornerInset];
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (_cornerInsetAnimationDisplayLink != nil &&
|
|
122
|
+
fabs(_cornerInsetAnimationToValue - cornerInset) <= ReactNavigationCornerInsetAnimationTolerance) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[self stopCornerInsetAnimation];
|
|
127
|
+
|
|
128
|
+
if (fabs(_currentCornerInset - cornerInset) <= ReactNavigationCornerInsetAnimationTolerance) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
[self applyCornerInset:cornerInset];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
- (void)startCornerInsetAnimationTo:(CGFloat)cornerInset
|
|
136
|
+
{
|
|
137
|
+
[self stopCornerInsetAnimation];
|
|
138
|
+
|
|
139
|
+
_cornerInsetAnimationFromValue = _currentCornerInset;
|
|
140
|
+
_cornerInsetAnimationToValue = cornerInset;
|
|
141
|
+
_cornerInsetAnimationStartTime = CACurrentMediaTime();
|
|
142
|
+
_cornerInsetAnimationDisplayLink =
|
|
143
|
+
[CADisplayLink displayLinkWithTarget:self selector:@selector(handleCornerInsetAnimationFrame:)];
|
|
144
|
+
[_cornerInsetAnimationDisplayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
- (void)stopCornerInsetAnimation
|
|
148
|
+
{
|
|
149
|
+
[_cornerInsetAnimationDisplayLink invalidate];
|
|
150
|
+
_cornerInsetAnimationDisplayLink = nil;
|
|
151
|
+
_cornerInsetAnimationStartTime = 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
- (void)handleCornerInsetAnimationFrame:(CADisplayLink *)displayLink
|
|
155
|
+
{
|
|
156
|
+
NSTimeInterval elapsed = CACurrentMediaTime() - _cornerInsetAnimationStartTime;
|
|
157
|
+
CGFloat progress = MIN(1, elapsed / ReactNavigationCornerInsetAnimationDuration);
|
|
158
|
+
CGFloat inverseProgress = 1 - progress;
|
|
159
|
+
CGFloat easedProgress = 1 - inverseProgress * inverseProgress * inverseProgress;
|
|
160
|
+
|
|
161
|
+
CGFloat cornerInset = _cornerInsetAnimationFromValue +
|
|
162
|
+
(_cornerInsetAnimationToValue - _cornerInsetAnimationFromValue) * easedProgress;
|
|
163
|
+
[self applyCornerInset:cornerInset];
|
|
164
|
+
|
|
165
|
+
if (progress >= 1) {
|
|
166
|
+
[self stopCornerInsetAnimation];
|
|
167
|
+
[self applyCornerInset:_cornerInsetAnimationToValue];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
- (void)applyCornerInset:(CGFloat)cornerInset
|
|
172
|
+
{
|
|
173
|
+
_currentCornerInset = cornerInset;
|
|
174
|
+
|
|
175
|
+
if (!_state) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
_state->updateState(ReactNavigationCornerInsetViewState(cornerInset), facebook::react::EventQueue::UpdateMode::unstable_Immediate);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@end
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import UIKit
|
|
2
|
+
|
|
3
|
+
@objc public enum CornerInsetDirection: Int {
|
|
4
|
+
case vertical
|
|
5
|
+
case horizontal
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@objc public enum CornerInsetEdge: Int {
|
|
9
|
+
case top
|
|
10
|
+
case right
|
|
11
|
+
case bottom
|
|
12
|
+
case left
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@objcMembers public class ReactNavigationCornerInsetViewImplProps: NSObject {
|
|
16
|
+
public var direction: CornerInsetDirection = .vertical
|
|
17
|
+
public var edge: CornerInsetEdge = .top
|
|
18
|
+
public var adaptive: Bool = true
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@objc public protocol ReactNavigationCornerInsetViewImplDelegate: NSObjectProtocol {
|
|
22
|
+
func cornerInsetDidChange(_ cornerInset: CGFloat, animated: Bool)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@objc public class ReactNavigationCornerInsetViewImpl: UIView {
|
|
26
|
+
@objc public weak var delegate: ReactNavigationCornerInsetViewImplDelegate?
|
|
27
|
+
|
|
28
|
+
private var props: ReactNavigationCornerInsetViewImplProps = ReactNavigationCornerInsetViewImplProps()
|
|
29
|
+
private var hasMeasuredCornerInset = false
|
|
30
|
+
private var lastMeasuredCornerInset: CGFloat = 0
|
|
31
|
+
private weak var measurementView: UIView?
|
|
32
|
+
private weak var lastMeasuredWindow: UIWindow?
|
|
33
|
+
|
|
34
|
+
@objc public func updateProps(_ props: ReactNavigationCornerInsetViewImplProps, oldProps: ReactNavigationCornerInsetViewImplProps) {
|
|
35
|
+
self.props = props
|
|
36
|
+
|
|
37
|
+
if props.direction != oldProps.direction || props.edge != oldProps.edge || props.adaptive != oldProps.adaptive {
|
|
38
|
+
setNeedsLayout()
|
|
39
|
+
updateCornerInset(forceMeasurement: true)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@objc public func relayout() {
|
|
44
|
+
updateCornerInset(animated: true, forceMeasurement: true)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public override func didMoveToWindow() {
|
|
48
|
+
super.didMoveToWindow()
|
|
49
|
+
|
|
50
|
+
if window == nil {
|
|
51
|
+
measurementView?.removeFromSuperview()
|
|
52
|
+
measurementView = nil
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
updateCornerInset()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private func updateCornerInset(animated: Bool = false, forceMeasurement: Bool = false) {
|
|
59
|
+
if shouldMeasureCornerInset(forceMeasurement: forceMeasurement) {
|
|
60
|
+
if #available(iOS 26.0, *) {
|
|
61
|
+
let sourceView: UIView
|
|
62
|
+
|
|
63
|
+
if let window {
|
|
64
|
+
sourceView = prepareMeasurementView(in: window)
|
|
65
|
+
} else {
|
|
66
|
+
sourceView = self
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
let cornerMargins = readCornerMargins(from: sourceView)
|
|
70
|
+
|
|
71
|
+
switch props.edge {
|
|
72
|
+
case .top:
|
|
73
|
+
lastMeasuredCornerInset = cornerMargins.top
|
|
74
|
+
case .right:
|
|
75
|
+
lastMeasuredCornerInset = cornerMargins.right
|
|
76
|
+
case .bottom:
|
|
77
|
+
lastMeasuredCornerInset = cornerMargins.bottom
|
|
78
|
+
case .left:
|
|
79
|
+
lastMeasuredCornerInset = cornerMargins.left
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
lastMeasuredCornerInset = 0
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
hasMeasuredCornerInset = true
|
|
86
|
+
lastMeasuredWindow = window
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
delegate?.cornerInsetDidChange(hasMeasuredCornerInset ? lastMeasuredCornerInset : 0, animated: animated)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private func shouldMeasureCornerInset(forceMeasurement: Bool) -> Bool {
|
|
93
|
+
let currentWindow = window
|
|
94
|
+
|
|
95
|
+
if forceMeasurement {
|
|
96
|
+
return currentWindow != nil || !hasMeasuredCornerInset
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
if !hasMeasuredCornerInset {
|
|
100
|
+
return true
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
guard let currentWindow else {
|
|
104
|
+
return false
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return lastMeasuredWindow !== currentWindow
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@available(iOS 26.0, *)
|
|
111
|
+
private func prepareMeasurementView(in window: UIWindow) -> UIView {
|
|
112
|
+
let measurementView = resolveMeasurementView(in: window)
|
|
113
|
+
|
|
114
|
+
measurementView.frame = resolveFrameInWindow()
|
|
115
|
+
|
|
116
|
+
window.setNeedsUpdateProperties()
|
|
117
|
+
measurementView.setNeedsUpdateProperties()
|
|
118
|
+
window.updatePropertiesIfNeeded()
|
|
119
|
+
measurementView.updatePropertiesIfNeeded()
|
|
120
|
+
|
|
121
|
+
return measurementView
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@available(iOS 26.0, *)
|
|
125
|
+
private func readCornerMargins(from sourceView: UIView) -> UIEdgeInsets {
|
|
126
|
+
let adaptedRegion = UIView.LayoutRegion.margins(
|
|
127
|
+
cornerAdaptation: props.direction == .horizontal ? .horizontal : .vertical
|
|
128
|
+
)
|
|
129
|
+
let adaptedMargins = sourceView.edgeInsets(for: adaptedRegion)
|
|
130
|
+
|
|
131
|
+
if !props.adaptive {
|
|
132
|
+
return adaptedMargins
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
let baselineRegion = UIView.LayoutRegion.margins(cornerAdaptation: .none)
|
|
136
|
+
let baselineMargins = sourceView.edgeInsets(for: baselineRegion)
|
|
137
|
+
|
|
138
|
+
return UIEdgeInsets(
|
|
139
|
+
top: adaptedMargins.top == baselineMargins.top ? 0 : adaptedMargins.top,
|
|
140
|
+
left: adaptedMargins.left == baselineMargins.left ? 0 : adaptedMargins.left,
|
|
141
|
+
bottom: adaptedMargins.bottom == baselineMargins.bottom ? 0 : adaptedMargins.bottom,
|
|
142
|
+
right: adaptedMargins.right == baselineMargins.right ? 0 : adaptedMargins.right
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@available(iOS 26.0, *)
|
|
147
|
+
private func resolveMeasurementView(in window: UIWindow) -> UIView {
|
|
148
|
+
if let measurementView, measurementView.window === window {
|
|
149
|
+
return measurementView
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
measurementView?.removeFromSuperview()
|
|
153
|
+
|
|
154
|
+
// Use a hidden view in the window so relayout can read the current corner
|
|
155
|
+
// insets even while transforms are animating.
|
|
156
|
+
let view = UIView(frame: .zero)
|
|
157
|
+
|
|
158
|
+
view.backgroundColor = .clear
|
|
159
|
+
view.isUserInteractionEnabled = false
|
|
160
|
+
view.isAccessibilityElement = false
|
|
161
|
+
view.alpha = 0
|
|
162
|
+
|
|
163
|
+
window.addSubview(view)
|
|
164
|
+
measurementView = view
|
|
165
|
+
|
|
166
|
+
return view
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private func resolveFrameInWindow() -> CGRect {
|
|
170
|
+
guard let window else {
|
|
171
|
+
return .zero
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
guard
|
|
175
|
+
let superLayer = layer.superlayer,
|
|
176
|
+
let presentationLayer = layer.presentation()
|
|
177
|
+
else {
|
|
178
|
+
return superview?.convert(frame, to: window) ?? convert(bounds, to: window)
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
let sourceLayer = superLayer.presentation() ?? superLayer
|
|
182
|
+
let destinationLayer = window.layer.presentation() ?? window.layer
|
|
183
|
+
let center = destinationLayer.convert(presentationLayer.position, from: sourceLayer)
|
|
184
|
+
let bounds = presentationLayer.bounds
|
|
185
|
+
|
|
186
|
+
return CGRect(
|
|
187
|
+
x: center.x - bounds.size.width / 2,
|
|
188
|
+
y: center.y - bounds.size.height / 2,
|
|
189
|
+
width: bounds.size.width,
|
|
190
|
+
height: bounds.size.height
|
|
191
|
+
)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include "ReactNavigationCornerInsetViewShadowNode.h"
|
|
4
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
5
|
+
|
|
6
|
+
namespace facebook {
|
|
7
|
+
namespace react {
|
|
8
|
+
|
|
9
|
+
class ReactNavigationCornerInsetViewComponentDescriptor final
|
|
10
|
+
: public ConcreteComponentDescriptor<ReactNavigationCornerInsetViewShadowNode> {
|
|
11
|
+
using ConcreteComponentDescriptor::ConcreteComponentDescriptor;
|
|
12
|
+
|
|
13
|
+
void adopt(ShadowNode &shadowNode) const override {
|
|
14
|
+
auto &concreteShadowNode =
|
|
15
|
+
static_cast<ReactNavigationCornerInsetViewShadowNode &>(shadowNode);
|
|
16
|
+
concreteShadowNode.adjustLayoutWithState();
|
|
17
|
+
|
|
18
|
+
ConcreteComponentDescriptor::adopt(shadowNode);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
} // namespace react
|
|
23
|
+
} // namespace facebook
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <jsi/jsi.h>
|
|
4
|
+
#include <react/renderer/components/ReactNavigationSpec/EventEmitters.h>
|
|
5
|
+
#include <react/renderer/components/ReactNavigationSpec/Props.h>
|
|
6
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
7
|
+
#include "ReactNavigationCornerInsetViewState.h"
|
|
8
|
+
|
|
9
|
+
namespace facebook {
|
|
10
|
+
namespace react {
|
|
11
|
+
|
|
12
|
+
JSI_EXPORT extern const char ReactNavigationCornerInsetViewComponentName[];
|
|
13
|
+
|
|
14
|
+
class JSI_EXPORT ReactNavigationCornerInsetViewShadowNode final
|
|
15
|
+
: public ConcreteViewShadowNode<
|
|
16
|
+
ReactNavigationCornerInsetViewComponentName,
|
|
17
|
+
ReactNavigationCornerInsetViewProps,
|
|
18
|
+
ViewEventEmitter,
|
|
19
|
+
ReactNavigationCornerInsetViewState> {
|
|
20
|
+
using ConcreteViewShadowNode::ConcreteViewShadowNode;
|
|
21
|
+
|
|
22
|
+
public:
|
|
23
|
+
void adjustLayoutWithState();
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} // namespace react
|
|
27
|
+
} // namespace facebook
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#include "ReactNavigationCornerInsetViewShadowNode.h"
|
|
2
|
+
|
|
3
|
+
#include <react/renderer/core/LayoutContext.h>
|
|
4
|
+
#include <yoga/Yoga.h>
|
|
5
|
+
|
|
6
|
+
namespace facebook {
|
|
7
|
+
namespace react {
|
|
8
|
+
|
|
9
|
+
using namespace yoga;
|
|
10
|
+
|
|
11
|
+
extern const char ReactNavigationCornerInsetViewComponentName[] =
|
|
12
|
+
"ReactNavigationCornerInsetView";
|
|
13
|
+
|
|
14
|
+
void ReactNavigationCornerInsetViewShadowNode::adjustLayoutWithState() {
|
|
15
|
+
ensureUnsealed();
|
|
16
|
+
|
|
17
|
+
const auto &props = getConcreteProps();
|
|
18
|
+
auto state =
|
|
19
|
+
std::static_pointer_cast<const ReactNavigationCornerInsetViewShadowNode::ConcreteState>(
|
|
20
|
+
getState());
|
|
21
|
+
auto stateData = state->getData();
|
|
22
|
+
|
|
23
|
+
Float cornerInset = stateData.cornerInset;
|
|
24
|
+
|
|
25
|
+
Dimension dimension = props.edge == ReactNavigationCornerInsetViewEdge::Left ||
|
|
26
|
+
props.edge == ReactNavigationCornerInsetViewEdge::Right
|
|
27
|
+
? Dimension::Width
|
|
28
|
+
: Dimension::Height;
|
|
29
|
+
|
|
30
|
+
auto newLength = StyleSizeLength::points(cornerInset);
|
|
31
|
+
auto currentLength = yogaNode_.style().dimension(dimension);
|
|
32
|
+
|
|
33
|
+
if (currentLength != newLength) {
|
|
34
|
+
yoga::Style style = yogaNode_.style();
|
|
35
|
+
style.setDimension(dimension, newLength);
|
|
36
|
+
yogaNode_.setStyle(style);
|
|
37
|
+
yogaNode_.setDirty(true);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
} // namespace react
|
|
42
|
+
} // namespace facebook
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#pragma once
|
|
2
|
+
|
|
3
|
+
#include <react/renderer/graphics/Float.h>
|
|
4
|
+
|
|
5
|
+
namespace facebook {
|
|
6
|
+
namespace react {
|
|
7
|
+
|
|
8
|
+
class JSI_EXPORT ReactNavigationCornerInsetViewState final {
|
|
9
|
+
public:
|
|
10
|
+
using Shared = std::shared_ptr<const ReactNavigationCornerInsetViewState>;
|
|
11
|
+
|
|
12
|
+
ReactNavigationCornerInsetViewState() = default;
|
|
13
|
+
ReactNavigationCornerInsetViewState(Float value): cornerInset(value) {}
|
|
14
|
+
|
|
15
|
+
Float cornerInset{0};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -45,6 +45,27 @@ static ReactNavigationSFSymbolViewImplProps *convertProps(const Props::Shared &p
|
|
|
45
45
|
swiftProps.name = RCTNSStringFromString(viewProps.name);
|
|
46
46
|
swiftProps.size = viewProps.size;
|
|
47
47
|
swiftProps.color = RCTUIColorFromSharedColor(viewProps.color);
|
|
48
|
+
swiftProps.weight = viewProps.weight;
|
|
49
|
+
swiftProps.scale = RCTNSStringFromString(viewProps.scale);
|
|
50
|
+
swiftProps.mode = RCTNSStringFromString(viewProps.mode);
|
|
51
|
+
swiftProps.animation = RCTNSStringFromString(viewProps.animation);
|
|
52
|
+
swiftProps.animationRepeating = viewProps.animationRepeating;
|
|
53
|
+
swiftProps.animationRepeatCount = viewProps.animationRepeatCount;
|
|
54
|
+
swiftProps.animationSpeed = viewProps.animationSpeed;
|
|
55
|
+
swiftProps.animationWholeSymbol = viewProps.animationWholeSymbol;
|
|
56
|
+
swiftProps.animationDirection = RCTNSStringFromString(viewProps.animationDirection);
|
|
57
|
+
swiftProps.animationReversing = viewProps.animationReversing;
|
|
58
|
+
swiftProps.animationCumulative = viewProps.animationCumulative;
|
|
59
|
+
|
|
60
|
+
if (viewProps.colorPrimary) {
|
|
61
|
+
swiftProps.colorPrimary = RCTUIColorFromSharedColor(viewProps.colorPrimary);
|
|
62
|
+
}
|
|
63
|
+
if (viewProps.colorSecondary) {
|
|
64
|
+
swiftProps.colorSecondary = RCTUIColorFromSharedColor(viewProps.colorSecondary);
|
|
65
|
+
}
|
|
66
|
+
if (viewProps.colorTertiary) {
|
|
67
|
+
swiftProps.colorTertiary = RCTUIColorFromSharedColor(viewProps.colorTertiary);
|
|
68
|
+
}
|
|
48
69
|
|
|
49
70
|
return swiftProps;
|
|
50
71
|
}
|