react-native-navigation 8.7.4 → 8.7.5-snapshot.2299
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/ARCHITECTURE.md +458 -0
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt +20 -17
- package/ios/ARCHITECTURE.md +416 -0
- package/ios/BottomTabsAfterInitialTabAttacher.mm +31 -0
- package/ios/RNNNavigationOptions.h +1 -0
- package/ios/RNNNavigationOptions.mm +4 -0
- package/ios/RNNOverlayManager.mm +4 -0
- package/ios/RNNScrollEdgeAppearanceOptions.h +2 -0
- package/ios/RNNScrollEdgeAppearanceOptions.mm +2 -0
- package/ios/ScreenAnimationController.mm +29 -24
- package/ios/StackControllerDelegate.mm +21 -3
- package/ios/TopBarAppearancePresenter.mm +35 -0
- package/lib/module/ARCHITECTURE.md +301 -0
- package/lib/module/Mock/Application.js +33 -0
- package/lib/module/Mock/Application.js.map +1 -0
- package/lib/module/Mock/ComponentProps.js +4 -0
- package/lib/module/Mock/ComponentProps.js.map +1 -0
- package/lib/module/Mock/Components/BottomTabs.js +16 -0
- package/lib/module/Mock/Components/BottomTabs.js.map +1 -0
- package/lib/module/Mock/Components/ComponentScreen.js +101 -0
- package/lib/module/Mock/Components/ComponentScreen.js.map +1 -0
- package/lib/module/Mock/Components/LayoutComponent.js +50 -0
- package/lib/module/Mock/Components/LayoutComponent.js.map +1 -0
- package/lib/module/Mock/Components/Modals.js +22 -0
- package/lib/module/Mock/Components/Modals.js.map +1 -0
- package/lib/module/Mock/Components/NavigationButton.js +72 -0
- package/lib/module/Mock/Components/NavigationButton.js.map +1 -0
- package/lib/module/Mock/Components/Overlays.js +23 -0
- package/lib/module/Mock/Components/Overlays.js.map +1 -0
- package/lib/module/Mock/Components/SideMenu.js +29 -0
- package/lib/module/Mock/Components/SideMenu.js.map +1 -0
- package/lib/module/Mock/Components/Stack.js +18 -0
- package/lib/module/Mock/Components/Stack.js.map +1 -0
- package/lib/module/Mock/Components/TopBar.js +81 -0
- package/lib/module/Mock/Components/TopBar.js.map +1 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js +30 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js.map +1 -0
- package/lib/module/Mock/Layouts/ComponentNode.js +102 -0
- package/lib/module/Mock/Layouts/ComponentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js +28 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js.map +1 -0
- package/lib/module/Mock/Layouts/Node.js +14 -0
- package/lib/module/Mock/Layouts/Node.js.map +1 -0
- package/lib/module/Mock/Layouts/ParentNode.js +66 -0
- package/lib/module/Mock/Layouts/ParentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/SideMenu.js +72 -0
- package/lib/module/Mock/Layouts/SideMenu.js.map +1 -0
- package/lib/module/Mock/Layouts/StackNode.js +12 -0
- package/lib/module/Mock/Layouts/StackNode.js.map +1 -0
- package/lib/module/Mock/Stores/EventsStore.js +53 -0
- package/lib/module/Mock/Stores/EventsStore.js.map +1 -0
- package/lib/module/Mock/Stores/LayoutStore.js +176 -0
- package/lib/module/Mock/Stores/LayoutStore.js.map +1 -0
- package/lib/module/Mock/actions/layoutActions.js +19 -0
- package/lib/module/Mock/actions/layoutActions.js.map +1 -0
- package/lib/module/Mock/connect.js +8 -0
- package/lib/module/Mock/connect.js.map +1 -0
- package/lib/module/Mock/constants.js +5 -0
- package/lib/module/Mock/constants.js.map +1 -0
- package/lib/module/Mock/index.js +20 -0
- package/lib/module/Mock/index.js.map +1 -0
- package/lib/module/Mock/mocks/AppRegistryService.js +6 -0
- package/lib/module/Mock/mocks/AppRegistryService.js.map +1 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js +146 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js.map +1 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js +103 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js.map +1 -0
- package/lib/module/interfaces/Options.js.map +1 -1
- package/lib/typescript/Mock/Application.d.ts.map +1 -1
- package/lib/typescript/Mock/ComponentProps.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/BottomTabs.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Modals.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/NavigationButton.d.ts +1 -1
- package/lib/typescript/Mock/Components/NavigationButton.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Overlays.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/SideMenu.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Stack.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/TopBar.d.ts +1 -1
- package/lib/typescript/Mock/Components/TopBar.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/Node.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/Node.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts +2 -2
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/StackNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Stores/EventsStore.d.ts +3 -3
- package/lib/typescript/Mock/Stores/EventsStore.d.ts.map +1 -1
- package/lib/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -1
- package/lib/typescript/Mock/actions/layoutActions.d.ts.map +1 -1
- package/lib/typescript/Mock/connect.d.ts.map +1 -1
- package/lib/typescript/Mock/constants.d.ts.map +1 -1
- package/lib/typescript/Mock/index.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts +2 -2
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts +2 -2
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -1
- package/lib/typescript/Navigation.d.ts.map +1 -0
- package/lib/typescript/NavigationDelegate.d.ts.map +1 -0
- package/lib/typescript/adapters/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/adapters/AssetResolver.d.ts.map +1 -0
- package/lib/typescript/adapters/ColorService.d.ts.map +1 -0
- package/lib/typescript/adapters/Constants.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
- package/lib/typescript/adapters/TouchablePreview.d.ts.map +1 -0
- package/lib/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.test.d.ts.map +1 -0
- package/lib/typescript/commands/Deprecations.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
- package/lib/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/components/Store.d.ts.map +1 -0
- package/lib/typescript/components/Store.test.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.test.d.ts.map +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/interfaces/CommandName.d.ts.map +1 -0
- package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
- package/lib/typescript/interfaces/EventSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Events.d.ts.map +1 -0
- package/lib/typescript/interfaces/Layout.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
- package/lib/typescript/{src/interfaces → interfaces}/Options.d.ts +29 -0
- package/lib/typescript/interfaces/Options.d.ts.map +1 -0
- package/lib/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Processors.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessor.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/package.json +12 -6
- package/src/ARCHITECTURE.md +301 -0
- package/src/Mock/Application.tsx +30 -0
- package/src/Mock/ComponentProps.tsx +6 -0
- package/src/Mock/Components/BottomTabs.tsx +14 -0
- package/src/Mock/Components/ComponentScreen.tsx +107 -0
- package/src/Mock/Components/LayoutComponent.tsx +37 -0
- package/src/Mock/Components/Modals.tsx +22 -0
- package/src/Mock/Components/NavigationButton.tsx +86 -0
- package/src/Mock/Components/Overlays.tsx +23 -0
- package/src/Mock/Components/SideMenu.tsx +27 -0
- package/src/Mock/Components/Stack.tsx +16 -0
- package/src/Mock/Components/TopBar.tsx +96 -0
- package/src/Mock/Layouts/BottomTabsNode.ts +34 -0
- package/src/Mock/Layouts/ComponentNode.ts +124 -0
- package/src/Mock/Layouts/LayoutNodeFactory.ts +31 -0
- package/src/Mock/Layouts/Node.ts +35 -0
- package/src/Mock/Layouts/ParentNode.ts +86 -0
- package/src/Mock/Layouts/SideMenu.ts +87 -0
- package/src/Mock/Layouts/StackNode.ts +11 -0
- package/src/Mock/Stores/EventsStore.ts +68 -0
- package/src/Mock/Stores/LayoutStore.ts +200 -0
- package/src/Mock/actions/layoutActions.ts +21 -0
- package/src/Mock/connect.ts +6 -0
- package/src/Mock/constants.ts +2 -0
- package/src/Mock/index.ts +16 -0
- package/src/Mock/mocks/AppRegistryService.ts +5 -0
- package/src/Mock/mocks/NativeCommandsSender.tsx +168 -0
- package/src/Mock/mocks/NativeEventsReceiver.ts +162 -0
- package/src/interfaces/Options.ts +30 -0
- package/lib/typescript/src/Navigation.d.ts.map +0 -1
- package/lib/typescript/src/NavigationDelegate.d.ts.map +0 -1
- package/lib/typescript/src/adapters/AppRegistryService.d.ts.map +0 -1
- package/lib/typescript/src/adapters/AssetResolver.d.ts.map +0 -1
- package/lib/typescript/src/adapters/ColorService.d.ts.map +0 -1
- package/lib/typescript/src/adapters/Constants.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeCommandsSender.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeEventsReceiver.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeEventsReceiver.mock.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeRNNTurboEventEmitter.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeRNNTurboModule.d.ts.map +0 -1
- package/lib/typescript/src/adapters/TouchablePreview.d.ts.map +0 -1
- package/lib/typescript/src/adapters/UniqueIdProvider.d.ts.map +0 -1
- package/lib/typescript/src/commands/Commands.d.ts.map +0 -1
- package/lib/typescript/src/commands/Commands.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/Deprecations.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeCrawler.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeCrawler.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeParser.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeParser.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutType.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutType.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsCrawler.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsCrawler.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsProcessor.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsProcessor.test.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentRegistry.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentRegistry.test.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentWrapper.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentWrapper.test.d.ts.map +0 -1
- package/lib/typescript/src/components/Modal.d.ts.map +0 -1
- package/lib/typescript/src/components/Store.d.ts.map +0 -1
- package/lib/typescript/src/components/Store.test.d.ts.map +0 -1
- package/lib/typescript/src/events/CommandsObserver.d.ts.map +0 -1
- package/lib/typescript/src/events/CommandsObserver.test.d.ts.map +0 -1
- package/lib/typescript/src/events/ComponentEventsObserver.d.ts.map +0 -1
- package/lib/typescript/src/events/ComponentEventsObserver.test.d.ts.map +0 -1
- package/lib/typescript/src/events/EventsRegistry.d.ts.map +0 -1
- package/lib/typescript/src/events/EventsRegistry.test.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/CommandName.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/ComponentEvents.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/EventSubscription.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Events.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Layout.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponent.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponentListener.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponentProps.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationFunctionComponent.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Options.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/ProcessorSubscription.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Processors.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessor.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessor.test.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessorsStore.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessorsStore.test.d.ts.map +0 -1
- package/lib/typescript/src/processors/OptionProcessorsStore.d.ts.map +0 -1
- package/lib/typescript/src/processors/OptionProcessorsStore.test.d.ts.map +0 -1
- package/lib/typescript/src/types.d.ts.map +0 -1
- /package/lib/typescript/{src/Navigation.d.ts → Navigation.d.ts} +0 -0
- /package/lib/typescript/{src/NavigationDelegate.d.ts → NavigationDelegate.d.ts} +0 -0
- /package/lib/typescript/{src/adapters → adapters}/AppRegistryService.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/AssetResolver.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/ColorService.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/Constants.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeCommandsSender.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeEventsReceiver.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeEventsReceiver.mock.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeRNNTurboEventEmitter.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeRNNTurboModule.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/TouchablePreview.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/UniqueIdProvider.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Commands.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Commands.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Deprecations.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeCrawler.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeCrawler.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeParser.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeParser.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutType.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutType.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsCrawler.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsCrawler.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsProcessor.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsProcessor.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentRegistry.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentRegistry.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentWrapper.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentWrapper.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Modal.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Store.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Store.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/CommandsObserver.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/CommandsObserver.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/ComponentEventsObserver.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/ComponentEventsObserver.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/EventsRegistry.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/EventsRegistry.test.d.ts +0 -0
- /package/lib/typescript/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/CommandName.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/ComponentEvents.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/EventSubscription.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Events.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Layout.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponent.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponentListener.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponentProps.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationFunctionComponent.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/ProcessorSubscription.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Processors.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessor.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessor.test.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessorsStore.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessorsStore.test.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/OptionProcessorsStore.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/OptionProcessorsStore.test.d.ts +0 -0
- /package/lib/typescript/{src/types.d.ts → types.d.ts} +0 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
# iOS Native Architecture
|
|
2
|
+
|
|
3
|
+
The iOS implementation provides native navigation using UIKit view controllers, coordinated through a bridge module that receives commands from JavaScript.
|
|
4
|
+
|
|
5
|
+
## App Integration
|
|
6
|
+
|
|
7
|
+
### RNNAppDelegate
|
|
8
|
+
**Files**: `RNNAppDelegate.h/mm`
|
|
9
|
+
|
|
10
|
+
Base class that user's AppDelegate must extend. Handles React Native and navigation initialization:
|
|
11
|
+
|
|
12
|
+
```objc
|
|
13
|
+
// AppDelegate.h - User extends RNNAppDelegate
|
|
14
|
+
#import "RNNAppDelegate.h"
|
|
15
|
+
@interface AppDelegate : RNNAppDelegate
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
// AppDelegate.m - User implements sourceURLForBridge
|
|
19
|
+
@implementation AppDelegate
|
|
20
|
+
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge {
|
|
21
|
+
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
|
|
22
|
+
}
|
|
23
|
+
@end
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**What RNNAppDelegate does:**
|
|
27
|
+
- Sets up React Native feature flags (Fabric, TurboModules, Bridgeless)
|
|
28
|
+
- Creates `RCTRootViewFactory` and `ReactHost`
|
|
29
|
+
- Calls `[ReactNativeNavigation bootstrapWithHost:]` to initialize navigation
|
|
30
|
+
- Handles RN version differences (0.77, 0.78, 0.79+) via compile-time macros
|
|
31
|
+
|
|
32
|
+
### ReactNativeNavigation Bootstrap
|
|
33
|
+
**File**: `ReactNativeNavigation.h/mm`
|
|
34
|
+
|
|
35
|
+
Public API for native initialization:
|
|
36
|
+
|
|
37
|
+
```objc
|
|
38
|
+
// New architecture (0.77+)
|
|
39
|
+
[ReactNativeNavigation bootstrapWithHost:reactHost];
|
|
40
|
+
|
|
41
|
+
// Legacy bridge
|
|
42
|
+
[ReactNativeNavigation bootstrapWithBridge:bridge];
|
|
43
|
+
|
|
44
|
+
// Register native screens
|
|
45
|
+
[ReactNativeNavigation registerExternalComponent:@"NativeScreen"
|
|
46
|
+
callback:^(NSDictionary *props, RCTBridge *bridge) {
|
|
47
|
+
return [[MyNativeVC alloc] init];
|
|
48
|
+
}];
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Autolink Script (`npx rnn-link`)
|
|
52
|
+
|
|
53
|
+
The `autolink/postlink/postLinkIOS.js` script automates setup:
|
|
54
|
+
|
|
55
|
+
| Linker | What it does |
|
|
56
|
+
|--------|--------------|
|
|
57
|
+
| `AppDelegateLinker` | Changes AppDelegate to extend `RNNAppDelegate`, imports ReactNativeNavigation, removes RCTRootView setup |
|
|
58
|
+
| `PodfileLinker` | Adds required pods configuration |
|
|
59
|
+
| `PlistLinker` | Updates Info.plist if needed |
|
|
60
|
+
|
|
61
|
+
**AppDelegateLinker transformations:**
|
|
62
|
+
- Swift: `class AppDelegate: RCTAppDelegate` → `class AppDelegate: RNNAppDelegate`
|
|
63
|
+
- Obj-C header: `@interface AppDelegate : RCTAppDelegate` → `@interface AppDelegate : RNNAppDelegate`
|
|
64
|
+
- Imports `<ReactNativeNavigation/ReactNativeNavigation.h>`
|
|
65
|
+
- Removes manual RCTRootView/window setup (navigation manages the window)
|
|
66
|
+
|
|
67
|
+
## Directory Structure
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
ios/
|
|
71
|
+
├── RNNBridgeModule.h/mm # Bridge entry point (legacy architecture)
|
|
72
|
+
├── RNNBridgeManager.h/mm # Bridge initialization
|
|
73
|
+
├── RNNCommandsHandler.h/mm # Command dispatcher
|
|
74
|
+
├── RNNEventEmitter.h/mm # Event emission to JS
|
|
75
|
+
├── RNNLayoutManager.h/mm # View controller tracking
|
|
76
|
+
├── RNNLayoutNode.h/mm # Layout tree parsing
|
|
77
|
+
├── RNNNavigationOptions.h/mm # Options model
|
|
78
|
+
├── RNNComponentViewController.h/mm # React component screen
|
|
79
|
+
├── RNNStackController.h/mm # Stack navigation
|
|
80
|
+
├── RNNBottomTabsController.h/mm # Tab navigation
|
|
81
|
+
├── RNNSideMenuViewController.h/mm # Side menu
|
|
82
|
+
├── RNNTopTabsViewController.h/mm # Top tabs
|
|
83
|
+
├── RNNSplitViewController.h/mm # Split view (iPad)
|
|
84
|
+
├── RNNModalManager.h/mm # Modal presentation
|
|
85
|
+
├── RNNOverlayManager.h/mm # Overlay management
|
|
86
|
+
├── TurboModules/ # New architecture entry points
|
|
87
|
+
│ ├── RNNTurboModule.h/mm # TurboModule spec implementation
|
|
88
|
+
│ ├── RNNTurboManager.h/mm # Manager for host, window, external components
|
|
89
|
+
│ ├── RNNTurboCommandsHandler.h/mm # TurboModule command routing
|
|
90
|
+
│ └── RNNTurboEventEmitter.h/mm # Event emission for new arch
|
|
91
|
+
├── Utils/ # Utility classes
|
|
92
|
+
├── RNNSideMenu/ # MMDrawerController integration
|
|
93
|
+
└── ReactNativeNavigation.xcodeproj/
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Bridge Architecture
|
|
97
|
+
|
|
98
|
+
The library supports both the legacy bridge and new TurboModule architecture:
|
|
99
|
+
- **Legacy (Bridge)**: `RNNBridgeModule` receives commands via `RCT_EXPORT_METHOD`
|
|
100
|
+
- **New Architecture**: `RNNTurboModule` (in `TurboModules/`) receives commands directly
|
|
101
|
+
|
|
102
|
+
Both entry points delegate to `RNNCommandsHandler` for command execution.
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
┌────────────────────────────────────────────────────────────┐
|
|
106
|
+
│ JavaScript (TurboModule) │
|
|
107
|
+
└─────────────────────────┬──────────────────────────────────┘
|
|
108
|
+
│
|
|
109
|
+
┌─────────────────────────▼──────────────────────────────────┐
|
|
110
|
+
│ RNNBridgeModule (bridge) / RNNTurboModule (new arch) │
|
|
111
|
+
│ - setRoot, push, pop, showModal, dismissModal, etc. │
|
|
112
|
+
└─────────────────────────┬──────────────────────────────────┘
|
|
113
|
+
│
|
|
114
|
+
┌─────────────────────────▼──────────────────────────────────┐
|
|
115
|
+
│ RNNCommandsHandler │
|
|
116
|
+
│ - Validates commands, manages layout lifecycle │
|
|
117
|
+
│ - Coordinates with managers │
|
|
118
|
+
└──────┬──────────────┬──────────────┬──────────────┬────────┘
|
|
119
|
+
│ │ │ │
|
|
120
|
+
┌──────▼─────┐ ┌──────▼─────┐ ┌──────▼─────┐ ┌─────▼──────┐
|
|
121
|
+
│RNNLayout │ │RNNModal │ │RNNOverlay │ │RNNViewController│
|
|
122
|
+
│Manager │ │Manager │ │Manager │ │Factory │
|
|
123
|
+
└────────────┘ └────────────┘ └────────────┘ └────────────┘
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## View Controller Hierarchy
|
|
127
|
+
|
|
128
|
+
All navigation view controllers conform to `RNNLayoutProtocol`:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
UIViewController
|
|
132
|
+
├── RNNComponentViewController # React component screen
|
|
133
|
+
├── RNNExternalViewController # Native screen wrapper
|
|
134
|
+
└── RNNSplashScreenViewController # Launch screen
|
|
135
|
+
|
|
136
|
+
UINavigationController
|
|
137
|
+
└── RNNStackController # Stack navigation
|
|
138
|
+
|
|
139
|
+
UITabBarController
|
|
140
|
+
└── RNNBottomTabsController # Bottom tabs
|
|
141
|
+
|
|
142
|
+
UIViewController (custom)
|
|
143
|
+
├── RNNTopTabsViewController # Horizontal top tabs
|
|
144
|
+
└── RNNSideMenuChildViewController # Drawer child
|
|
145
|
+
|
|
146
|
+
MMDrawerController
|
|
147
|
+
└── RNNSideMenuViewController # Side menu/drawer
|
|
148
|
+
|
|
149
|
+
UISplitViewController
|
|
150
|
+
└── RNNSplitViewController # Master-detail (iPad)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Core Classes
|
|
154
|
+
|
|
155
|
+
### RNNBridgeModule
|
|
156
|
+
Entry point for JavaScript commands (legacy architecture). Exports methods via `RCT_EXPORT_METHOD`:
|
|
157
|
+
|
|
158
|
+
```objc
|
|
159
|
+
RCT_EXPORT_METHOD(setRoot:(NSString*)commandId layout:(NSDictionary*)layout
|
|
160
|
+
resolver:(RCTPromiseResolveBlock)resolve
|
|
161
|
+
rejecter:(RCTPromiseRejectBlock)reject);
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
`RNNBridgeModule` returns the main queue as its `methodQueue`; `RNNTurboModule` uses `RCTExecuteOnMainQueue` for each command to ensure UI operations run on the main thread.
|
|
165
|
+
|
|
166
|
+
### RNNBridgeManager
|
|
167
|
+
Initializes bridge infrastructure:
|
|
168
|
+
- Creates RNNLayoutManager, RNNModalManager, RNNOverlayManager
|
|
169
|
+
- Creates RNNViewControllerFactory, RNNCommandsHandler
|
|
170
|
+
- Provides extra modules to React bridge
|
|
171
|
+
- Handles JavaScript reload events
|
|
172
|
+
|
|
173
|
+
### RNNCommandsHandler
|
|
174
|
+
Central command dispatcher implementing all navigation operations:
|
|
175
|
+
- `setRoot:` - Replace root view controller
|
|
176
|
+
- `push:componentId:layout:` - Push to stack
|
|
177
|
+
- `pop:componentId:` - Pop from stack
|
|
178
|
+
- `showModal:` - Present modal
|
|
179
|
+
- `dismissModal:` - Dismiss modal
|
|
180
|
+
- `showOverlay:` - Show overlay window
|
|
181
|
+
- `dismissOverlay:` - Hide overlay
|
|
182
|
+
|
|
183
|
+
### RNNLayoutManager
|
|
184
|
+
Tracks active view controllers:
|
|
185
|
+
- `addPendingViewController:` - Register during creation
|
|
186
|
+
- `removePendingViewController:` - Cleanup after presentation
|
|
187
|
+
- `findComponentForId:` - Lookup by componentId
|
|
188
|
+
|
|
189
|
+
### RNNLayoutNode
|
|
190
|
+
Parses JSON layout from JavaScript:
|
|
191
|
+
- Determines type via predicates: `isComponent`, `isStack`, `isTabs`, etc.
|
|
192
|
+
- Holds `type`, `nodeId`, `data` (options), `children`
|
|
193
|
+
|
|
194
|
+
### RNNViewControllerFactory
|
|
195
|
+
Creates view controllers from RNNLayoutNode:
|
|
196
|
+
- `createStack:` → RNNStackController
|
|
197
|
+
- `createBottomTabs:` → RNNBottomTabsController
|
|
198
|
+
- `createComponent:` → RNNComponentViewController
|
|
199
|
+
- `createSideMenu:` → RNNSideMenuViewController
|
|
200
|
+
|
|
201
|
+
## RNNLayoutProtocol
|
|
202
|
+
|
|
203
|
+
Protocol all navigation controllers implement:
|
|
204
|
+
|
|
205
|
+
```objc
|
|
206
|
+
@protocol RNNLayoutProtocol
|
|
207
|
+
- (instancetype)initWithLayoutInfo:(RNNLayoutInfo*)layoutInfo
|
|
208
|
+
creator:(id<RNNComponentViewCreator>)creator
|
|
209
|
+
options:(RNNNavigationOptions*)options
|
|
210
|
+
defaultOptions:(RNNNavigationOptions*)defaultOptions
|
|
211
|
+
presenter:(RNNBasePresenter*)presenter
|
|
212
|
+
eventEmitter:(RNNEventEmitter*)eventEmitter
|
|
213
|
+
childViewControllers:(NSArray*)childViewControllers;
|
|
214
|
+
|
|
215
|
+
- (void)render;
|
|
216
|
+
- (UIViewController*)getCurrentChild;
|
|
217
|
+
- (void)mergeOptions:(RNNNavigationOptions*)options;
|
|
218
|
+
- (RNNNavigationOptions*)resolveOptions;
|
|
219
|
+
- (void)setDefaultOptions:(RNNNavigationOptions*)defaultOptions;
|
|
220
|
+
- (void)onChildWillAppear;
|
|
221
|
+
- (void)readyForPresentation;
|
|
222
|
+
- (CGFloat)getTopBarHeight;
|
|
223
|
+
- (CGFloat)getBottomTabsHeight;
|
|
224
|
+
@end
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Additional methods provided via `UIViewController+LayoutProtocol` category:
|
|
228
|
+
- `destroy`, `topMostViewController`, `stack`
|
|
229
|
+
- `componentWillAppear`, `componentDidAppear`, `componentDidDisappear`
|
|
230
|
+
- `screenPopped`, `prepareForTransition`
|
|
231
|
+
- `resolveOptionsWithDefault`, `mergeChildOptions:child:`
|
|
232
|
+
|
|
233
|
+
## Presenter Pattern
|
|
234
|
+
|
|
235
|
+
Each view controller type has a corresponding presenter that applies options:
|
|
236
|
+
|
|
237
|
+
| Controller | Presenter |
|
|
238
|
+
|------------|-----------|
|
|
239
|
+
| RNNComponentViewController | RNNComponentPresenter |
|
|
240
|
+
| RNNStackController | RNNStackPresenter + TopBarPresenter |
|
|
241
|
+
| RNNBottomTabsController | RNNBottomTabsPresenter + BottomTabPresenter |
|
|
242
|
+
| RNNSideMenuViewController | RNNSideMenuPresenter |
|
|
243
|
+
| RNNSplitViewController | RNNSplitViewControllerPresenter |
|
|
244
|
+
|
|
245
|
+
### RNNBasePresenter
|
|
246
|
+
Base class with lifecycle methods:
|
|
247
|
+
- `applyOptionsOnInit:` - Initial setup
|
|
248
|
+
- `applyOptions:` - Apply current options
|
|
249
|
+
- `mergeOptions:resolvedOptions:` - Runtime updates
|
|
250
|
+
- `componentWillAppear`, `componentDidAppear`, `componentDidDisappear`
|
|
251
|
+
|
|
252
|
+
## React View Integration
|
|
253
|
+
|
|
254
|
+
### RNNReactView
|
|
255
|
+
Wraps RCTRootView (legacy) or RCTSurfaceHostingView (new architecture):
|
|
256
|
+
- Implements `RNNComponentProtocol`
|
|
257
|
+
- Manages `componentId`, `componentType`, `moduleName`
|
|
258
|
+
- Lifecycle: `componentWillAppear`, `componentDidAppear`, `componentDidDisappear`
|
|
259
|
+
|
|
260
|
+
### RNNReactRootViewCreator
|
|
261
|
+
Creates RNNReactView instances:
|
|
262
|
+
- Supports component types: Component, TopBarTitle, TopBarButton, TopBarBackground
|
|
263
|
+
- Handles size flexibility for flexible layouts
|
|
264
|
+
|
|
265
|
+
### RNNReactComponentRegistry
|
|
266
|
+
Caches created React component instances:
|
|
267
|
+
- `createComponentIfNotExists:parentComponentId:componentType:reactViewReadyBlock:`
|
|
268
|
+
- `removeComponent:`, `clearComponentsForParentId:`
|
|
269
|
+
|
|
270
|
+
## Options System
|
|
271
|
+
|
|
272
|
+
### RNNNavigationOptions
|
|
273
|
+
Master options object containing all configuration:
|
|
274
|
+
|
|
275
|
+
```objc
|
|
276
|
+
@interface RNNNavigationOptions : RNNOptions
|
|
277
|
+
@property RNNTopBarOptions* topBar;
|
|
278
|
+
@property RNNBottomTabsOptions* bottomTabs;
|
|
279
|
+
@property RNNBottomTabOptions* bottomTab;
|
|
280
|
+
@property RNNTopTabsOptions* topTabs;
|
|
281
|
+
@property RNNSideMenuOptions* sideMenu;
|
|
282
|
+
@property RNNOverlayOptions* overlay;
|
|
283
|
+
@property RNNAnimationsOptions* animations;
|
|
284
|
+
@property RNNStatusBarOptions* statusBar;
|
|
285
|
+
@property RNNLayoutOptions* layout;
|
|
286
|
+
@property RNNModalOptions* modal;
|
|
287
|
+
@property RNNPreviewOptions* preview;
|
|
288
|
+
@property RNNSplitViewOptions* splitView;
|
|
289
|
+
@end
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Options Resolution
|
|
293
|
+
Options merge in hierarchy:
|
|
294
|
+
1. Component's own options
|
|
295
|
+
2. Parent controller options (loop through chain)
|
|
296
|
+
3. Default options (from `setDefaultOptions`)
|
|
297
|
+
|
|
298
|
+
## Event Emission
|
|
299
|
+
|
|
300
|
+
### RNNEventEmitter
|
|
301
|
+
Sends events to JavaScript via RCTEventEmitter:
|
|
302
|
+
|
|
303
|
+
| Event | Method |
|
|
304
|
+
|-------|--------|
|
|
305
|
+
| Component lifecycle | `sendComponentWillAppear:`, `sendComponentDidAppear:`, `sendComponentDidDisappear:` |
|
|
306
|
+
| Button press | `sendOnNavigationButtonPressed:buttonId:` |
|
|
307
|
+
| Command completion | `sendOnNavigationCommandCompletion:commandId:` |
|
|
308
|
+
| Tab events | `sendBottomTabSelected:unselected:`, `sendBottomTabLongPressed:`, `sendBottomTabPressed:` |
|
|
309
|
+
| Modal events | `sendModalsDismissedEvent:numberOfModalsDismissed:`, `sendModalAttemptedToDismissEvent:` |
|
|
310
|
+
| Screen events | `sendScreenPoppedEvent:` |
|
|
311
|
+
| Search | `sendOnSearchBarUpdated:text:isFocused:`, `sendOnSearchBarCancelPressed:` |
|
|
312
|
+
| Preview | `sendOnPreviewCompleted:previewComponentId:` |
|
|
313
|
+
|
|
314
|
+
### RNNBridgeEventEmitter
|
|
315
|
+
Concrete implementation that sends `onAppLaunched` on initialization.
|
|
316
|
+
|
|
317
|
+
## Modal & Overlay Management
|
|
318
|
+
|
|
319
|
+
### RNNModalManager
|
|
320
|
+
- Tracks presented modals array
|
|
321
|
+
- Supports custom transition animations via ScreenAnimationController
|
|
322
|
+
- Handles presentationController delegate for adaptive presentation
|
|
323
|
+
|
|
324
|
+
### RNNOverlayManager
|
|
325
|
+
- Manages UIWindow instances for overlays
|
|
326
|
+
- Each overlay gets its own RNNOverlayWindow
|
|
327
|
+
- Maintains previous window reference for restoration
|
|
328
|
+
- Controls window level and accessibility
|
|
329
|
+
|
|
330
|
+
## Animation System
|
|
331
|
+
|
|
332
|
+
### ScreenAnimationController
|
|
333
|
+
Implements `UIViewControllerAnimatedTransitioning`:
|
|
334
|
+
- Custom push/pop/modal transitions
|
|
335
|
+
- Content transitions (RNNEnterExitAnimation)
|
|
336
|
+
- Element transitions (ElementTransitionOptions)
|
|
337
|
+
- Shared element transitions (SharedElementTransitionOptions)
|
|
338
|
+
|
|
339
|
+
### Element Animators
|
|
340
|
+
- `ElementAnimator` - Individual element animations
|
|
341
|
+
- `SharedElementAnimator` - Cross-screen shared elements
|
|
342
|
+
- Transition types: Alpha, Scale, Translation, Frame, Bounds, Color, CornerRadius
|
|
343
|
+
|
|
344
|
+
### RNNSetRootAnimator
|
|
345
|
+
Animates window root replacement using CABasicAnimation.
|
|
346
|
+
|
|
347
|
+
## Navigation Types
|
|
348
|
+
|
|
349
|
+
### Stack Navigation (RNNStackController)
|
|
350
|
+
- Subclass of UINavigationController
|
|
351
|
+
- Push/pop with custom animations
|
|
352
|
+
- Back button customization
|
|
353
|
+
- Uses StackControllerDelegate for bar delegate handling
|
|
354
|
+
|
|
355
|
+
```objc
|
|
356
|
+
// Extension methods
|
|
357
|
+
@interface UINavigationController (RNNCommands)
|
|
358
|
+
- (void)push:(UIViewController*)vc onTop:(UIViewController*)onTopVC
|
|
359
|
+
animated:(BOOL)animated completion:(void(^)(void))completion rejection:(RCTPromiseRejectBlock)rejection;
|
|
360
|
+
- (void)popAnimated:(BOOL)animated completion:(void(^)(NSString*))completion rejection:(RCTPromiseRejectBlock)rejection;
|
|
361
|
+
@end
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Bottom Tabs (RNNBottomTabsController)
|
|
365
|
+
- Subclass of UITabBarController
|
|
366
|
+
- Tab attachment modes: Together, OnSwitchToTab, AfterInitialTab
|
|
367
|
+
- Long-press gesture support
|
|
368
|
+
- Badge and dot indicator support
|
|
369
|
+
|
|
370
|
+
### Side Menu (RNNSideMenuViewController)
|
|
371
|
+
- Uses MMDrawerController (third-party)
|
|
372
|
+
- Center, left, right child containers
|
|
373
|
+
- Configurable open modes and widths
|
|
374
|
+
|
|
375
|
+
### Top Tabs (RNNTopTabsViewController)
|
|
376
|
+
- Custom horizontal tab implementation
|
|
377
|
+
- Not based on UITabBarController
|
|
378
|
+
- Manual content switching
|
|
379
|
+
|
|
380
|
+
### Split View (RNNSplitViewController)
|
|
381
|
+
- UISplitViewController subclass
|
|
382
|
+
- Master-detail for iPad
|
|
383
|
+
|
|
384
|
+
## External Components
|
|
385
|
+
|
|
386
|
+
### RNNExternalComponentStore
|
|
387
|
+
Registry for native (non-React) view controllers.
|
|
388
|
+
|
|
389
|
+
### RNNExternalViewController
|
|
390
|
+
Wraps native UIViewController for integration:
|
|
391
|
+
|
|
392
|
+
```objc
|
|
393
|
+
[ReactNativeNavigation registerExternalComponent:@"NativeScreen"
|
|
394
|
+
callback:^(NSDictionary *props, RCTBridge *bridge) {
|
|
395
|
+
return [[MyNativeViewController alloc] init];
|
|
396
|
+
}];
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## Key Files Reference
|
|
400
|
+
|
|
401
|
+
| File | Purpose |
|
|
402
|
+
|------|---------|
|
|
403
|
+
| `RNNBridgeModule.h/mm` | Bridge entry point (legacy) |
|
|
404
|
+
| `TurboModules/RNNTurboModule.mm` | TurboModule entry point (new arch) |
|
|
405
|
+
| `TurboModules/RNNTurboCommandsHandler.mm` | TurboModule command routing |
|
|
406
|
+
| `RNNCommandsHandler.h/mm` | Command execution |
|
|
407
|
+
| `RNNLayoutManager.h/mm` | Controller tracking |
|
|
408
|
+
| `RNNViewControllerFactory.h/mm` | Controller creation |
|
|
409
|
+
| `RNNComponentViewController.h/mm` | React screen |
|
|
410
|
+
| `RNNStackController.h/mm` | Stack navigation |
|
|
411
|
+
| `RNNBottomTabsController.h/mm` | Tab navigation |
|
|
412
|
+
| `RNNNavigationOptions.h/mm` | Options model |
|
|
413
|
+
| `RNNBasePresenter.h/mm` | Presenter base |
|
|
414
|
+
| `TopBarPresenter.h/mm` | Top bar styling |
|
|
415
|
+
| `RNNReactView.h/mm` | React view wrapper |
|
|
416
|
+
| `ScreenAnimationController.h/mm` | Custom transitions |
|
|
@@ -8,7 +8,38 @@
|
|
|
8
8
|
[bottomTabsController readyForPresentation];
|
|
9
9
|
for (UIViewController *viewController in bottomTabsController.deselectedViewControllers) {
|
|
10
10
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
11
|
+
UIWindow *preloadWindow = [[UIWindow alloc] initWithFrame:CGRectZero];
|
|
12
|
+
preloadWindow.hidden = NO;
|
|
13
|
+
|
|
14
|
+
dispatch_group_t ready = dispatch_group_create();
|
|
15
|
+
dispatch_group_enter(ready);
|
|
16
|
+
|
|
17
|
+
viewController.waitForRender = YES;
|
|
18
|
+
|
|
19
|
+
[viewController setReactViewReadyCallback:^{
|
|
20
|
+
dispatch_group_leave(ready);
|
|
21
|
+
}];
|
|
22
|
+
|
|
11
23
|
[viewController render];
|
|
24
|
+
|
|
25
|
+
UIView *containerView = nil;
|
|
26
|
+
UIView *reactView = nil;
|
|
27
|
+
if ([viewController isKindOfClass:[UINavigationController class]]) {
|
|
28
|
+
containerView = [(UINavigationController *)viewController topViewController].view;
|
|
29
|
+
reactView = containerView.subviews.firstObject;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (reactView && !reactView.window) {
|
|
33
|
+
[preloadWindow addSubview:reactView];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
dispatch_notify(ready, dispatch_get_main_queue(), ^{
|
|
37
|
+
if (reactView) {
|
|
38
|
+
reactView.frame = containerView.bounds;
|
|
39
|
+
[containerView addSubview:reactView];
|
|
40
|
+
}
|
|
41
|
+
preloadWindow.hidden = YES;
|
|
42
|
+
});
|
|
12
43
|
});
|
|
13
44
|
}
|
|
14
45
|
}];
|
|
@@ -36,6 +36,7 @@ extern const NSInteger BLUR_TOPBAR_TAG;
|
|
|
36
36
|
@property(nonatomic, strong) WindowOptions *window;
|
|
37
37
|
|
|
38
38
|
@property(nonatomic, strong) Bool *popGesture;
|
|
39
|
+
@property(nonatomic, strong) Bool *navigationButtonEventOnSwipeBack;
|
|
39
40
|
@property(nonatomic, strong) Image *backgroundImage;
|
|
40
41
|
@property(nonatomic, strong) Image *rootBackgroundImage;
|
|
41
42
|
@property(nonatomic, strong) Text *modalPresentationStyle;
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
self.window = [[WindowOptions alloc] initWithDict:dict[@"window"]];
|
|
42
42
|
|
|
43
43
|
self.popGesture = [[Bool alloc] initWithValue:dict[@"popGesture"]];
|
|
44
|
+
self.navigationButtonEventOnSwipeBack = [[Bool alloc] initWithValue:dict[@"navigationButtonEventOnSwipeBack"]];
|
|
44
45
|
self.backgroundImage = [ImageParser parse:dict key:@"backgroundImage"];
|
|
45
46
|
self.rootBackgroundImage = [ImageParser parse:dict key:@"rootBackgroundImage"];
|
|
46
47
|
self.modalPresentationStyle = [[Text alloc] initWithValue:dict[@"modalPresentationStyle"]];
|
|
@@ -73,6 +74,8 @@
|
|
|
73
74
|
|
|
74
75
|
if (options.popGesture.hasValue)
|
|
75
76
|
result.popGesture = options.popGesture;
|
|
77
|
+
if (options.navigationButtonEventOnSwipeBack.hasValue)
|
|
78
|
+
result.navigationButtonEventOnSwipeBack = options.navigationButtonEventOnSwipeBack;
|
|
76
79
|
if (options.backgroundImage.hasValue)
|
|
77
80
|
result.backgroundImage = options.backgroundImage;
|
|
78
81
|
if (options.rootBackgroundImage.hasValue)
|
|
@@ -104,6 +107,7 @@
|
|
|
104
107
|
[newOptions.window mergeOptions:self.window];
|
|
105
108
|
|
|
106
109
|
newOptions.popGesture = self.popGesture;
|
|
110
|
+
newOptions.navigationButtonEventOnSwipeBack = self.navigationButtonEventOnSwipeBack;
|
|
107
111
|
newOptions.backgroundImage = self.backgroundImage;
|
|
108
112
|
newOptions.rootBackgroundImage = self.rootBackgroundImage;
|
|
109
113
|
newOptions.modalPresentationStyle = self.modalPresentationStyle;
|
package/ios/RNNOverlayManager.mm
CHANGED
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
overlayWindow.rootViewController.view.backgroundColor = [UIColor clearColor];
|
|
18
18
|
[overlayWindow setWindowLevel:UIWindowLevelNormal];
|
|
19
19
|
[overlayWindow setHidden:NO];
|
|
20
|
+
|
|
21
|
+
overlayWindow.previousWindow.accessibilityElementsHidden = YES;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
- (void)showOverlayWindowAsKeyWindow:(RNNOverlayWindow *)overlayWindow {
|
|
@@ -38,6 +40,8 @@
|
|
|
38
40
|
#pragma mark - private
|
|
39
41
|
|
|
40
42
|
- (void)detachOverlayWindow:(RNNOverlayWindow *)overlayWindow {
|
|
43
|
+
overlayWindow.previousWindow.accessibilityElementsHidden = NO;
|
|
44
|
+
|
|
41
45
|
[overlayWindow.previousWindow makeKeyWindow];
|
|
42
46
|
[overlayWindow setHidden:YES];
|
|
43
47
|
[overlayWindow setRootViewController:nil];
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#import "RNNComponentOptions.h"
|
|
2
2
|
#import "RNNOptions.h"
|
|
3
3
|
#import "RNNScrollEdgeAppearanceBackgroundOptions.h"
|
|
4
|
+
#import "RNNTitleOptions.h"
|
|
4
5
|
|
|
5
6
|
@interface RNNScrollEdgeAppearanceOptions : RNNOptions
|
|
6
7
|
|
|
8
|
+
@property(nonatomic, strong) RNNTitleOptions *title;
|
|
7
9
|
@property(nonatomic, strong) RNNScrollEdgeAppearanceBackgroundOptions *background;
|
|
8
10
|
@property(nonatomic, strong) Bool *active;
|
|
9
11
|
@property(nonatomic, strong) Bool *noBorder;
|
|
@@ -9,12 +9,14 @@
|
|
|
9
9
|
self.active = [BoolParser parse:dict key:@"active"];
|
|
10
10
|
self.noBorder = [BoolParser parse:dict key:@"noBorder"];
|
|
11
11
|
self.borderColor = [ColorParser parse:dict key:@"borderColor"];
|
|
12
|
+
self.title = [[RNNTitleOptions alloc] initWithDict:dict[@"title"]];
|
|
12
13
|
|
|
13
14
|
return self;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
- (void)mergeOptions:(RNNScrollEdgeAppearanceOptions *)options {
|
|
17
18
|
[self.background mergeOptions:options.background];
|
|
19
|
+
[self.title mergeOptions:options.title];
|
|
18
20
|
|
|
19
21
|
if (options.active.hasValue)
|
|
20
22
|
self.active = options.active;
|
|
@@ -75,21 +75,13 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
- (void)prepareTransitionContext:(id<UIViewControllerContextTransitioning>)transitionContext {
|
|
78
|
-
UIViewController *fromViewController =
|
|
79
|
-
[transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
|
|
80
78
|
UIViewController *toViewController =
|
|
81
79
|
[transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
|
|
82
80
|
|
|
83
81
|
UIView *fromView = [transitionContext viewForKey:UITransitionContextFromViewKey];
|
|
84
82
|
UIView *toView = [transitionContext viewForKey:UITransitionContextToViewKey];
|
|
85
83
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
if (isDismiss) {
|
|
89
|
-
if (fromView) {
|
|
90
|
-
[transitionContext.containerView addSubview:fromView];
|
|
91
|
-
}
|
|
92
|
-
} else {
|
|
84
|
+
if (toView) {
|
|
93
85
|
toViewController.view.alpha = 0;
|
|
94
86
|
if (fromView) {
|
|
95
87
|
[transitionContext.containerView addSubview:fromView];
|
|
@@ -137,26 +129,39 @@
|
|
|
137
129
|
- (void)animateTransitions:(NSArray<id<DisplayLinkAnimatorDelegate>> *)animators
|
|
138
130
|
andTransitioningContext:(id<UIViewControllerContextTransitioning>)transitionContext {
|
|
139
131
|
UIView *toView = [transitionContext viewForKey:UITransitionContextToViewKey];
|
|
132
|
+
UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
|
|
133
|
+
|
|
140
134
|
BOOL isDismiss = (toView == nil);
|
|
141
135
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
136
|
+
if (isDismiss) {
|
|
137
|
+
[UIView animateWithDuration:[self transitionDuration:transitionContext]
|
|
138
|
+
animations:^{
|
|
139
|
+
fromVC.view.alpha = 0;
|
|
140
|
+
} completion:^(BOOL finished) {
|
|
141
|
+
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
|
|
142
|
+
fromVC.view.alpha = 1;
|
|
143
|
+
}];
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
DisplayLinkAnimator *displayLinkAnimator = [[DisplayLinkAnimator alloc]
|
|
148
|
+
initWithDisplayLinkAnimators:animators
|
|
149
|
+
duration:[self transitionDuration:transitionContext]];
|
|
150
|
+
|
|
151
|
+
[displayLinkAnimator setOnStart:^{
|
|
148
152
|
if (!isDismiss) {
|
|
153
|
+
UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
|
|
149
154
|
toVC.view.alpha = 1.f;
|
|
150
155
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
156
|
+
}];
|
|
157
|
+
|
|
158
|
+
[displayLinkAnimator setCompletion:^{
|
|
159
|
+
if (![transitionContext transitionWasCancelled]) {
|
|
160
|
+
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
|
|
161
|
+
}
|
|
162
|
+
}];
|
|
163
|
+
|
|
164
|
+
[displayLinkAnimator start];
|
|
160
165
|
}
|
|
161
166
|
|
|
162
167
|
- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext {
|
|
@@ -26,9 +26,27 @@
|
|
|
26
26
|
- (void)navigationController:(UINavigationController *)navigationController
|
|
27
27
|
willShowViewController:(UIViewController *)viewController
|
|
28
28
|
animated:(BOOL)animated {
|
|
29
|
-
if (_presentedViewController
|
|
30
|
-
![navigationController.viewControllers containsObject:_presentedViewController]) {
|
|
31
|
-
|
|
29
|
+
if (_presentedViewController) {
|
|
30
|
+
if (![navigationController.viewControllers containsObject:_presentedViewController]) {
|
|
31
|
+
_isPopping = YES;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
id<UIViewControllerTransitionCoordinator> coordinator = navigationController.transitionCoordinator;
|
|
35
|
+
if (coordinator && coordinator.isInteractive) {
|
|
36
|
+
UIViewController *poppingViewController = _presentedViewController;
|
|
37
|
+
[coordinator notifyWhenInteractionChangesUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) {
|
|
38
|
+
if (!context.isCancelled) {
|
|
39
|
+
if ([poppingViewController conformsToProtocol:@protocol(RNNLayoutProtocol)]) {
|
|
40
|
+
UIViewController<RNNLayoutProtocol> *rnnVC = (UIViewController<RNNLayoutProtocol> *)poppingViewController;
|
|
41
|
+
if ([rnnVC.options.navigationButtonEventOnSwipeBack withDefault:NO]) {
|
|
42
|
+
NSString *buttonId = [rnnVC.options.topBar.backButton.identifier withDefault:@"RNN.back"];
|
|
43
|
+
[self->_eventEmitter sendOnNavigationButtonPressed:rnnVC.layoutInfo.componentId
|
|
44
|
+
buttonId:buttonId];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}];
|
|
49
|
+
}
|
|
32
50
|
}
|
|
33
51
|
}
|
|
34
52
|
|