react-native-screens 3.30.1 → 3.31.0-rc.1
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/CMakeLists.txt +1 -1
- package/android/build.gradle +42 -8
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +3 -1
- package/android/src/main/jni/CMakeLists.txt +4 -2
- package/ios/RNSScreen.h +0 -1
- package/ios/RNSScreen.mm +15 -60
- package/ios/RNSScreenStack.mm +11 -12
- package/ios/RNSScreenStackHeaderConfig.mm +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +2 -0
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +5 -0
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +11 -11
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +11 -11
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +5 -1
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +8 -8
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +2 -2
- package/package.json +3 -2
- package/src/fabric/ModalScreenNativeComponent.ts +11 -11
- package/src/fabric/ScreenNativeComponent.ts +11 -11
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +8 -0
- package/src/fabric/SearchBarNativeComponent.ts +8 -8
- package/src/native-stack/types.tsx +2 -2
package/android/CMakeLists.txt
CHANGED
package/android/build.gradle
CHANGED
|
@@ -46,6 +46,38 @@ def reactNativeArchitectures() {
|
|
|
46
46
|
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
def safeAppExtGet(prop, fallback) {
|
|
50
|
+
def appProject = rootProject.allprojects.find { it.plugins.hasPlugin('com.android.application') }
|
|
51
|
+
appProject?.ext?.has(prop) ? appProject.ext.get(prop) : fallback
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
def resolveReactNativeDirectory() {
|
|
55
|
+
def reactNativeLocation = safeAppExtGet("REACT_NATIVE_NODE_MODULES_DIR", null)
|
|
56
|
+
if (reactNativeLocation != null) {
|
|
57
|
+
return file(reactNativeLocation)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
def reactNativeFromAppNodeModules = file("${projectDir}/../../react-native")
|
|
61
|
+
if (reactNativeFromAppNodeModules.exists()) {
|
|
62
|
+
return reactNativeFromAppNodeModules
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native")
|
|
66
|
+
if (reactNativeFromProjectNodeModules.exists()) {
|
|
67
|
+
return reactNativeFromProjectNodeModules
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
throw new GradleException(
|
|
71
|
+
"[RNScreens] Unable to resolve react-native location in node_modules. You should project extension property (in `app/build.gradle`) `REACT_NATIVE_NODE_MODULES_DIR` with path to react-native."
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
def reactNativeRootDir = resolveReactNativeDirectory()
|
|
76
|
+
def reactProperties = new Properties()
|
|
77
|
+
file("$reactNativeRootDir/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) }
|
|
78
|
+
def REACT_NATIVE_VERSION = reactProperties.getProperty("VERSION_NAME")
|
|
79
|
+
def REACT_NATIVE_MINOR_VERSION = REACT_NATIVE_VERSION.startsWith("0.0.0-") ? 1000 : REACT_NATIVE_VERSION.split("\\.")[1].toInteger()
|
|
80
|
+
|
|
49
81
|
android {
|
|
50
82
|
compileSdkVersion safeExtGet('compileSdkVersion', rnsDefaultCompileSdkVersion)
|
|
51
83
|
def agpVersion = Version.ANDROID_GRADLE_PLUGIN_VERSION
|
|
@@ -80,12 +112,14 @@ android {
|
|
|
80
112
|
}
|
|
81
113
|
}
|
|
82
114
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
if (REACT_NATIVE_MINOR_VERSION >= 71) {
|
|
116
|
+
buildFeatures {
|
|
117
|
+
prefab true
|
|
118
|
+
}
|
|
119
|
+
externalNativeBuild {
|
|
120
|
+
cmake {
|
|
121
|
+
path "CMakeLists.txt"
|
|
122
|
+
}
|
|
89
123
|
}
|
|
90
124
|
}
|
|
91
125
|
lintOptions {
|
|
@@ -146,11 +180,11 @@ repositories {
|
|
|
146
180
|
|
|
147
181
|
dependencies {
|
|
148
182
|
implementation 'com.facebook.react:react-native:+'
|
|
149
|
-
implementation 'androidx.appcompat:appcompat:1.
|
|
183
|
+
implementation 'androidx.appcompat:appcompat:1.4.2'
|
|
150
184
|
implementation 'androidx.fragment:fragment:1.3.6'
|
|
151
185
|
implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0'
|
|
152
186
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
153
|
-
implementation 'com.google.android.material:material:1.
|
|
187
|
+
implementation 'com.google.android.material:material:1.6.1'
|
|
154
188
|
implementation "androidx.core:core-ktx:1.8.0"
|
|
155
189
|
|
|
156
190
|
constraints {
|
|
@@ -337,7 +337,9 @@ class ScreenStack(context: Context?) : ScreenContainer(context) {
|
|
|
337
337
|
|
|
338
338
|
private fun needsDrawReordering(fragmentWrapper: ScreenFragmentWrapper): Boolean =
|
|
339
339
|
// On Android sdk 33 and above the animation is different and requires draw reordering.
|
|
340
|
-
|
|
340
|
+
// For React Native 0.70 and lower versions, `Build.VERSION_CODES.TIRAMISU` is not defined yet.
|
|
341
|
+
// Hence, we're comparing numerical version here.
|
|
342
|
+
Build.VERSION.SDK_INT >= 33 ||
|
|
341
343
|
fragmentWrapper.screen.stackAnimation === StackAnimation.SLIDE_FROM_BOTTOM ||
|
|
342
344
|
fragmentWrapper.screen.stackAnimation === StackAnimation.FADE_FROM_BOTTOM ||
|
|
343
345
|
fragmentWrapper.screen.stackAnimation === StackAnimation.IOS
|
|
@@ -12,7 +12,7 @@ set(LIB_ANDROID_GENERATED_COMPONENTS_DIR ${LIB_ANDROID_GENERATED_JNI_DIR}/react/
|
|
|
12
12
|
add_compile_options(
|
|
13
13
|
-fexceptions
|
|
14
14
|
-frtti
|
|
15
|
-
-std=c++
|
|
15
|
+
-std=c++20
|
|
16
16
|
-Wall
|
|
17
17
|
-Wpedantic
|
|
18
18
|
-Wno-gnu-zero-variadic-macro-arguments
|
|
@@ -50,6 +50,8 @@ target_link_libraries(
|
|
|
50
50
|
react_render_debug
|
|
51
51
|
react_render_graphics
|
|
52
52
|
react_render_mapbuffer
|
|
53
|
+
react_render_componentregistry
|
|
54
|
+
react_utils
|
|
53
55
|
rrc_view
|
|
54
56
|
turbomodulejsijni
|
|
55
57
|
yoga
|
|
@@ -61,7 +63,7 @@ target_compile_options(
|
|
|
61
63
|
-DLOG_TAG=\"ReactNative\"
|
|
62
64
|
-fexceptions
|
|
63
65
|
-frtti
|
|
64
|
-
-std=c++
|
|
66
|
+
-std=c++20
|
|
65
67
|
-Wall
|
|
66
68
|
)
|
|
67
69
|
|
package/ios/RNSScreen.h
CHANGED
package/ios/RNSScreen.mm
CHANGED
|
@@ -171,12 +171,10 @@ namespace react = facebook::react;
|
|
|
171
171
|
_controller.presentationController.delegate = self;
|
|
172
172
|
} else if (_stackPresentation != RNSScreenStackPresentationPush) {
|
|
173
173
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
174
|
-
// TODO: on Fabric, same controllers can be used as modals and then recycled and used a push which would result in
|
|
175
|
-
// this error. It would be good to check if it doesn't leak in such case.
|
|
176
174
|
#else
|
|
177
175
|
RCTLogError(
|
|
178
176
|
@"Screen presentation updated from modal to push, this may likely result in a screen object leakage. If you need to change presentation style create a new screen object instead");
|
|
179
|
-
#endif
|
|
177
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
180
178
|
}
|
|
181
179
|
_stackPresentation = stackPresentation;
|
|
182
180
|
}
|
|
@@ -299,7 +297,6 @@ namespace react = facebook::react;
|
|
|
299
297
|
{
|
|
300
298
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
301
299
|
// If screen is already unmounted then there will be no event emitter
|
|
302
|
-
// it will be cleaned in prepareForRecycle
|
|
303
300
|
if (_eventEmitter != nullptr) {
|
|
304
301
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
305
302
|
->onDismissed(react::RNSScreenEventEmitter::OnDismissed{.dismissCount = dismissCount});
|
|
@@ -321,7 +318,6 @@ namespace react = facebook::react;
|
|
|
321
318
|
{
|
|
322
319
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
323
320
|
// If screen is already unmounted then there will be no event emitter
|
|
324
|
-
// it will be cleaned in prepareForRecycle
|
|
325
321
|
if (_eventEmitter != nullptr) {
|
|
326
322
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
327
323
|
->onNativeDismissCancelled(
|
|
@@ -338,7 +334,6 @@ namespace react = facebook::react;
|
|
|
338
334
|
{
|
|
339
335
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
340
336
|
// If screen is already unmounted then there will be no event emitter
|
|
341
|
-
// it will be cleaned in prepareForRecycle
|
|
342
337
|
if (_eventEmitter != nullptr) {
|
|
343
338
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
344
339
|
->onWillAppear(react::RNSScreenEventEmitter::OnWillAppear{});
|
|
@@ -361,7 +356,6 @@ namespace react = facebook::react;
|
|
|
361
356
|
}
|
|
362
357
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
363
358
|
// If screen is already unmounted then there will be no event emitter
|
|
364
|
-
// it will be cleaned in prepareForRecycle
|
|
365
359
|
if (_eventEmitter != nullptr) {
|
|
366
360
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
367
361
|
->onWillDisappear(react::RNSScreenEventEmitter::OnWillDisappear{});
|
|
@@ -377,7 +371,6 @@ namespace react = facebook::react;
|
|
|
377
371
|
{
|
|
378
372
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
379
373
|
// If screen is already unmounted then there will be no event emitter
|
|
380
|
-
// it will be cleaned in prepareForRecycle
|
|
381
374
|
if (_eventEmitter != nullptr) {
|
|
382
375
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
383
376
|
->onAppear(react::RNSScreenEventEmitter::OnAppear{});
|
|
@@ -397,7 +390,6 @@ namespace react = facebook::react;
|
|
|
397
390
|
{
|
|
398
391
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
399
392
|
// If screen is already unmounted then there will be no event emitter
|
|
400
|
-
// it will be cleaned in prepareForRecycle
|
|
401
393
|
if (_eventEmitter != nullptr) {
|
|
402
394
|
std::dynamic_pointer_cast<const react::RNSScreenEventEmitter>(_eventEmitter)
|
|
403
395
|
->onDisappear(react::RNSScreenEventEmitter::OnDisappear{});
|
|
@@ -422,7 +414,7 @@ namespace react = facebook::react;
|
|
|
422
414
|
[[RNSHeaderHeightChangeEvent alloc] initWithEventName:@"onHeaderHeightChange"
|
|
423
415
|
reactTag:[NSNumber numberWithInt:self.tag]
|
|
424
416
|
headerHeight:headerHeight];
|
|
425
|
-
[[RCTBridge currentBridge].eventDispatcher
|
|
417
|
+
[[RCTBridge currentBridge].eventDispatcher notifyObserversOfEvent:event];
|
|
426
418
|
#else
|
|
427
419
|
if (self.onHeaderHeightChange) {
|
|
428
420
|
self.onHeaderHeightChange(@{
|
|
@@ -517,7 +509,7 @@ namespace react = facebook::react;
|
|
|
517
509
|
progress:progress
|
|
518
510
|
closing:closing
|
|
519
511
|
goingForward:goingForward];
|
|
520
|
-
[[RCTBridge currentBridge].eventDispatcher
|
|
512
|
+
[[RCTBridge currentBridge].eventDispatcher notifyObserversOfEvent:event];
|
|
521
513
|
#else
|
|
522
514
|
if (self.onTransitionProgress) {
|
|
523
515
|
self.onTransitionProgress(@{
|
|
@@ -677,6 +669,11 @@ namespace react = facebook::react;
|
|
|
677
669
|
return react::concreteComponentDescriptorProvider<react::RNSScreenComponentDescriptor>();
|
|
678
670
|
}
|
|
679
671
|
|
|
672
|
+
+ (BOOL)shouldBeRecycled
|
|
673
|
+
{
|
|
674
|
+
return NO;
|
|
675
|
+
}
|
|
676
|
+
|
|
680
677
|
- (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
|
|
681
678
|
{
|
|
682
679
|
if ([childComponentView isKindOfClass:[RNSScreenStackHeaderConfig class]]) {
|
|
@@ -698,27 +695,6 @@ namespace react = facebook::react;
|
|
|
698
695
|
|
|
699
696
|
#pragma mark - RCTComponentViewProtocol
|
|
700
697
|
|
|
701
|
-
- (void)prepareForRecycle
|
|
702
|
-
{
|
|
703
|
-
[super prepareForRecycle];
|
|
704
|
-
// TODO: Make sure that there is no edge case when this should be uncommented
|
|
705
|
-
// _controller=nil;
|
|
706
|
-
_dismissed = NO;
|
|
707
|
-
_state.reset();
|
|
708
|
-
_touchHandler = nil;
|
|
709
|
-
|
|
710
|
-
// We set this prop to default value here to workaround view-recycling.
|
|
711
|
-
// Let's assume the view has had _stackPresentation == <some modal stack presentation> set
|
|
712
|
-
// before below line was executed. Then, when instantiated again (with the same modal presentation)
|
|
713
|
-
// updateProps:oldProps: method would be called and setter for stack presentation would not be called.
|
|
714
|
-
// This is crucial as in that setter we register `self.controller` as a delegate
|
|
715
|
-
// (UIAdaptivePresentationControllerDelegate) to presentation controller and this leads to buggy modal behaviour as we
|
|
716
|
-
// rely on UIAdaptivePresentationControllerDelegate callbacks. Restoring the default value and then comparing against
|
|
717
|
-
// it in updateProps:oldProps: allows for setter to be called, however if there was some additional logic to execute
|
|
718
|
-
// when stackPresentation is set to "push" the setter would not be triggered.
|
|
719
|
-
_stackPresentation = RNSScreenStackPresentationPush;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
698
|
- (void)updateProps:(react::Props::Shared const &)props oldProps:(react::Props::Shared const &)oldProps
|
|
723
699
|
{
|
|
724
700
|
const auto &oldScreenProps = *std::static_pointer_cast<const react::RNSScreenProps>(_props);
|
|
@@ -782,12 +758,9 @@ namespace react = facebook::react;
|
|
|
782
758
|
}
|
|
783
759
|
#endif // !TARGET_OS_TV
|
|
784
760
|
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
[RNSConvert RNSScreenStackPresentationFromCppEquivalent:newScreenProps.stackPresentation];
|
|
789
|
-
if (newStackPresentation != _stackPresentation) {
|
|
790
|
-
[self setStackPresentation:newStackPresentation];
|
|
761
|
+
if (newScreenProps.stackPresentation != oldScreenProps.stackPresentation) {
|
|
762
|
+
[self
|
|
763
|
+
setStackPresentation:[RNSConvert RNSScreenStackPresentationFromCppEquivalent:newScreenProps.stackPresentation]];
|
|
791
764
|
}
|
|
792
765
|
|
|
793
766
|
if (newScreenProps.stackAnimation != oldScreenProps.stackAnimation) {
|
|
@@ -994,9 +967,6 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
|
|
|
994
967
|
- (void)viewDidDisappear:(BOOL)animated
|
|
995
968
|
{
|
|
996
969
|
[super viewDidDisappear:animated];
|
|
997
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
998
|
-
[self resetViewToScreen];
|
|
999
|
-
#endif
|
|
1000
970
|
if (self.parentViewController == nil && self.presentingViewController == nil) {
|
|
1001
971
|
if (self.screenView.preventNativeDismiss) {
|
|
1002
972
|
// if we want to prevent the native dismiss, we do not send dismissal event,
|
|
@@ -1412,25 +1382,10 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
|
|
|
1412
1382
|
|
|
1413
1383
|
- (void)setViewToSnapshot:(UIView *)snapshot
|
|
1414
1384
|
{
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
[self.view removeFromSuperview];
|
|
1420
|
-
self.view = snapshot;
|
|
1421
|
-
[superView addSubview:self.view];
|
|
1422
|
-
} else {
|
|
1423
|
-
[self.view removeFromSuperview];
|
|
1424
|
-
self.view = snapshot;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
|
|
1428
|
-
- (void)resetViewToScreen
|
|
1429
|
-
{
|
|
1430
|
-
if (self.view != _initialView) {
|
|
1431
|
-
[self.view removeFromSuperview];
|
|
1432
|
-
self.view = _initialView;
|
|
1433
|
-
}
|
|
1385
|
+
UIView *superView = self.view.superview;
|
|
1386
|
+
[self.view removeFromSuperview];
|
|
1387
|
+
self.view = snapshot;
|
|
1388
|
+
[superView addSubview:self.view];
|
|
1434
1389
|
}
|
|
1435
1390
|
|
|
1436
1391
|
#else
|
package/ios/RNSScreenStack.mm
CHANGED
|
@@ -583,10 +583,16 @@ namespace react = facebook::react;
|
|
|
583
583
|
((RNSScreenView *)top.view).replaceAnimation == RNSScreenReplaceAnimationPush) {
|
|
584
584
|
// setting new controllers with animation does `push` animation by default
|
|
585
585
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
// This is a workaround for the case, when in the app we're trying to do `replace` action on screens, when
|
|
587
|
+
// there's already ongoing transition to some screen. In such case, we're making the snapshot, but we're trying
|
|
588
|
+
// to add it to the wrong superview (where it should be UIViewControllerWrapperView, but it's
|
|
589
|
+
// _UIParallaxDimmingView instead). At the moment of RN 0.74 we can't queue the unmounts for such situation
|
|
590
|
+
// either, so we need to turn off animations, when the view is not yet mounted, but it will appear after the
|
|
591
|
+
// transition of previous replacement.
|
|
592
|
+
[_controller setViewControllers:controllers animated:previousTop.view.window != nil];
|
|
593
|
+
#else
|
|
589
594
|
[_controller setViewControllers:controllers animated:YES];
|
|
595
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
590
596
|
} else {
|
|
591
597
|
// last top controller is no longer on stack
|
|
592
598
|
// in this case we set the controllers stack to the new list with
|
|
@@ -602,11 +608,8 @@ namespace react = facebook::react;
|
|
|
602
608
|
// no animation and do animated push of the last item
|
|
603
609
|
NSMutableArray *newControllers = [NSMutableArray arrayWithArray:controllers];
|
|
604
610
|
[newControllers removeLastObject];
|
|
611
|
+
|
|
605
612
|
[_controller setViewControllers:newControllers animated:NO];
|
|
606
|
-
#ifdef RCT_NEW_ARCH_ENABLED
|
|
607
|
-
auto screenController = (RNSScreen *)top;
|
|
608
|
-
[screenController resetViewToScreen];
|
|
609
|
-
#endif
|
|
610
613
|
[_controller pushViewController:top animated:YES];
|
|
611
614
|
} else {
|
|
612
615
|
// don't really know what this case could be, but may need to handle it
|
|
@@ -667,14 +670,11 @@ namespace react = facebook::react;
|
|
|
667
670
|
- (void)dismissOnReload
|
|
668
671
|
{
|
|
669
672
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
670
|
-
if ([_controller.visibleViewController isKindOfClass:[RNSScreen class]]) {
|
|
671
|
-
[(RNSScreen *)_controller.visibleViewController resetViewToScreen];
|
|
672
|
-
}
|
|
673
673
|
#else
|
|
674
674
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
675
675
|
[self invalidate];
|
|
676
676
|
});
|
|
677
|
-
#endif
|
|
677
|
+
#endif // RCT_NEW_ARCH_ENABLED
|
|
678
678
|
}
|
|
679
679
|
|
|
680
680
|
#pragma mark methods connected to transitioning
|
|
@@ -1174,7 +1174,6 @@ namespace react = facebook::react;
|
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
[_presentedModals removeAllObjects];
|
|
1177
|
-
[self dismissOnReload];
|
|
1178
1177
|
[_controller willMoveToParentViewController:nil];
|
|
1179
1178
|
[_controller removeFromParentViewController];
|
|
1180
1179
|
[_controller setViewControllers:@[ [UIViewController new] ]];
|
|
@@ -750,7 +750,7 @@ static RCTResizeMode resizeModeFromCppEquiv(react::ImageResizeMode resizeMode)
|
|
|
750
750
|
*/
|
|
751
751
|
+ (RCTImageSource *)imageSourceFromImageView:(RCTImageComponentView *)view
|
|
752
752
|
{
|
|
753
|
-
auto
|
|
753
|
+
const auto &imageProps = *std::static_pointer_cast<const react::ImageProps>(view.props);
|
|
754
754
|
react::ImageSource cppImageSource = imageProps.sources.at(0);
|
|
755
755
|
auto imageSize = CGSize{cppImageSource.size.width, cppImageSource.size.height};
|
|
756
756
|
NSURLRequest *request =
|
|
@@ -6,5 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
9
11
|
var _default = exports.default = (0, _codegenNativeComponent.default)('RNSScreenStackHeaderConfig', {});
|
|
10
12
|
//# sourceMappingURL=ScreenStackHeaderConfigNativeComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../../src","sources":["fabric/ScreenStackHeaderConfigNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,
|
|
1
|
+
{"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","exports","codegenNativeComponent"],"sourceRoot":"../../../src","sources":["fabric/ScreenStackHeaderConfigNativeComponent.ts"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAU7F;AAEA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAmCe,IAAAG,+BAAsB,EACnC,4BAA4B,EAC5B,CAAC,CACH,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
6
|
+
|
|
2
7
|
export default codegenNativeComponent('RNSScreenStackHeaderConfig', {});
|
|
3
8
|
//# sourceMappingURL=ScreenStackHeaderConfigNativeComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../../src","sources":["fabric/ScreenStackHeaderConfigNativeComponent.ts"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD
|
|
1
|
+
{"version":3,"names":["codegenNativeComponent"],"sourceRoot":"../../../src","sources":["fabric/ScreenStackHeaderConfigNativeComponent.ts"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAU5F;;AAEA;;AAmCA,eAAeA,sBAAsB,CACnC,4BAA4B,EAC5B,CAAC,CACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react-native/types/modules/codegen" />
|
|
2
2
|
import type { ViewProps, ColorValue } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DirectEventHandler, WithDefault, Int32, Float, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
declare type ScreenEvent = Readonly<{}>;
|
|
5
5
|
declare type ScreenDismissedEvent = Readonly<{
|
|
6
6
|
dismissCount: Int32;
|
|
@@ -25,16 +25,16 @@ declare type SwipeDirection = 'vertical' | 'horizontal';
|
|
|
25
25
|
declare type ReplaceAnimation = 'pop' | 'push';
|
|
26
26
|
declare type SheetDetentTypes = 'large' | 'medium' | 'all';
|
|
27
27
|
export interface NativeProps extends ViewProps {
|
|
28
|
-
onAppear?:
|
|
29
|
-
onDisappear?:
|
|
30
|
-
onDismissed?:
|
|
31
|
-
onNativeDismissCancelled?:
|
|
32
|
-
onWillAppear?:
|
|
33
|
-
onWillDisappear?:
|
|
34
|
-
onHeaderHeightChange?:
|
|
35
|
-
onTransitionProgress?:
|
|
36
|
-
onGestureCancel?:
|
|
37
|
-
onHeaderBackButtonClicked?:
|
|
28
|
+
onAppear?: DirectEventHandler<ScreenEvent>;
|
|
29
|
+
onDisappear?: DirectEventHandler<ScreenEvent>;
|
|
30
|
+
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
|
|
31
|
+
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
|
|
32
|
+
onWillAppear?: DirectEventHandler<ScreenEvent>;
|
|
33
|
+
onWillDisappear?: DirectEventHandler<ScreenEvent>;
|
|
34
|
+
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
|
|
35
|
+
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
|
|
36
|
+
onGestureCancel?: DirectEventHandler<ScreenEvent>;
|
|
37
|
+
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
|
|
38
38
|
sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
|
|
39
39
|
sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
|
|
40
40
|
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalScreenNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ModalScreenNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"ModalScreenNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ModalScreenNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,KAAK,EACL,MAAM,EACP,MAAM,2CAA2C,CAAC;AAGnD,aAAK,WAAW,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEhC,aAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,YAAY,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,aAAK,uBAAuB,GAAG,QAAQ,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,YAAY,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,aAAK,uBAAuB,GAAG,QAAQ,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,aAAK,2BAA2B,GAAG,QAAQ,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,KAAK,CAAC;IACX,GAAG,EAAE,KAAK,CAAC;IACX,MAAM,EAAE,KAAK,CAAC;CACf,CAAC,CAAC;AAEH,aAAK,iBAAiB,GAClB,MAAM,GACN,OAAO,GACP,kBAAkB,GAClB,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,2BAA2B,CAAC;AAEhC,aAAK,cAAc,GACf,SAAS,GACT,MAAM,GACN,aAAa,GACb,MAAM,GACN,MAAM,GACN,kBAAkB,GAClB,iBA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AAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5C,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,2BAA2B,CAAC;IACtD,iBAAiB,CAAC,EAAE,WAAW,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACxD,kBAAkB,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACzC,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gCAAgC,CAAC,EAAE,OAAO,CAAC;CAC5C;;AAED,wBAEG"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react-native/types/modules/codegen" />
|
|
2
2
|
import type { ViewProps, ColorValue } from 'react-native';
|
|
3
|
-
import type {
|
|
3
|
+
import type { DirectEventHandler, WithDefault, Int32, Float, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
declare type ScreenEvent = Readonly<{}>;
|
|
5
5
|
declare type ScreenDismissedEvent = Readonly<{
|
|
6
6
|
dismissCount: Int32;
|
|
@@ -25,16 +25,16 @@ declare type SwipeDirection = 'vertical' | 'horizontal';
|
|
|
25
25
|
declare type ReplaceAnimation = 'pop' | 'push';
|
|
26
26
|
declare type SheetDetentTypes = 'large' | 'medium' | 'all';
|
|
27
27
|
export interface NativeProps extends ViewProps {
|
|
28
|
-
onAppear?:
|
|
29
|
-
onDisappear?:
|
|
30
|
-
onDismissed?:
|
|
31
|
-
onNativeDismissCancelled?:
|
|
32
|
-
onWillAppear?:
|
|
33
|
-
onWillDisappear?:
|
|
34
|
-
onHeaderHeightChange?:
|
|
35
|
-
onTransitionProgress?:
|
|
36
|
-
onGestureCancel?:
|
|
37
|
-
onHeaderBackButtonClicked?:
|
|
28
|
+
onAppear?: DirectEventHandler<ScreenEvent>;
|
|
29
|
+
onDisappear?: DirectEventHandler<ScreenEvent>;
|
|
30
|
+
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
|
|
31
|
+
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
|
|
32
|
+
onWillAppear?: DirectEventHandler<ScreenEvent>;
|
|
33
|
+
onWillDisappear?: DirectEventHandler<ScreenEvent>;
|
|
34
|
+
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
|
|
35
|
+
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
|
|
36
|
+
onGestureCancel?: DirectEventHandler<ScreenEvent>;
|
|
37
|
+
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
|
|
38
38
|
sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
|
|
39
39
|
sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
|
|
40
40
|
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ScreenNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"ScreenNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ScreenNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,KAAK,EACL,MAAM,EACP,MAAM,2CAA2C,CAAC;AAGnD,aAAK,WAAW,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEhC,aAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,YAAY,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,aAAK,uBAAuB,GAAG,QAAQ,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC;IACf,YAAY,EAAE,KAAK,CAAC;CACrB,CAAC,CAAC;AAEH,aAAK,uBAAuB,GAAG,QAAQ,CAAC;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC,CAAC;AAEH,aAAK,2BAA2B,GAAG,QAAQ,CAAC;IAC1C,KAAK,EAAE,KAAK,CAAC;IACb,GAAG,EAAE,KAAK,CAAC;IACX,GAAG,EAAE,KAAK,CAAC;IACX,MAAM,EAAE,KAAK,CAAC;CACf,CAAC,CAAC;AAEH,aAAK,iBAAiB,GAClB,MAAM,GACN,OAAO,GACP,kBAAkB,GAClB,iBAAiB,GACjB,WAAW,GACX,gBAAgB,GAChB,2BAA2B,CAAC;AAEhC,aAAK,cAAc,GACf,SAAS,GACT,MAAM,GACN,aAAa,GACb,MAAM,GACN,MAAM,GACN,kBAAkB,GAClB,iBAAiB,GACjB,mBAAm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sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAC5C,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,uBAAuB,CAAC,EAAE,2BAA2B,CAAC;IACtD,iBAAiB,CAAC,EAAE,WAAW,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IACxD,kBAAkB,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7C,gBAAgB,CAAC,EAAE,WAAW,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC;IACxD,cAAc,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAC3D,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACzC,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gCAAgC,CAAC,EAAE,OAAO,CAAC;CAC5C;;AAED,wBAEG"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/// <reference types="react-native/types/modules/codegen" />
|
|
2
2
|
import type { ViewProps, ColorValue } from 'react-native';
|
|
3
|
-
import type { Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
import type { Int32, WithDefault, DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
declare type DirectionType = 'rtl' | 'ltr';
|
|
5
|
+
declare type OnAttachedEvent = Readonly<{}>;
|
|
6
|
+
declare type OnDetachedEvent = Readonly<{}>;
|
|
5
7
|
export interface NativeProps extends ViewProps {
|
|
8
|
+
onAttached?: DirectEventHandler<OnAttachedEvent>;
|
|
9
|
+
onDetached?: DirectEventHandler<OnDetachedEvent>;
|
|
6
10
|
backgroundColor?: ColorValue;
|
|
7
11
|
backTitle?: string;
|
|
8
12
|
backTitleFontFamily?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScreenStackHeaderConfigNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ScreenStackHeaderConfigNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,KAAK,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"ScreenStackHeaderConfigNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/ScreenStackHeaderConfigNativeComponent.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,KAAK,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAEnD,aAAK,aAAa,GAAG,KAAK,GAAG,KAAK,CAAC;AAGnC,aAAK,eAAe,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEpC,aAAK,eAAe,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEpC,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,UAAU,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACjD,UAAU,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,CAAC;IACjD,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAC1B,gBAAgB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAChD,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,SAAS,CAAC,EAAE,WAAW,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;IAC9C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,KAAK,CAAC;IAC3B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;AAED,wBAGE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-native/types/modules/codegen" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
|
|
4
|
-
import type { WithDefault,
|
|
4
|
+
import type { WithDefault, DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
5
5
|
declare type SearchBarEvent = Readonly<{}>;
|
|
6
6
|
declare type SearchButtonPressedEvent = Readonly<{
|
|
7
7
|
text?: string;
|
|
@@ -12,11 +12,11 @@ declare type ChangeTextEvent = Readonly<{
|
|
|
12
12
|
declare type SearchBarPlacement = 'automatic' | 'inline' | 'stacked';
|
|
13
13
|
declare type AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';
|
|
14
14
|
interface NativeProps extends ViewProps {
|
|
15
|
-
onFocus?:
|
|
16
|
-
onBlur?:
|
|
17
|
-
onSearchButtonPress?:
|
|
18
|
-
onCancelButtonPress?:
|
|
19
|
-
onChangeText?:
|
|
15
|
+
onFocus?: DirectEventHandler<SearchBarEvent> | null;
|
|
16
|
+
onBlur?: DirectEventHandler<SearchBarEvent> | null;
|
|
17
|
+
onSearchButtonPress?: DirectEventHandler<SearchButtonPressedEvent> | null;
|
|
18
|
+
onCancelButtonPress?: DirectEventHandler<SearchBarEvent> | null;
|
|
19
|
+
onChangeText?: DirectEventHandler<ChangeTextEvent> | null;
|
|
20
20
|
hideWhenScrolling?: boolean;
|
|
21
21
|
autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>;
|
|
22
22
|
placeholder?: string;
|
|
@@ -29,8 +29,8 @@ interface NativeProps extends ViewProps {
|
|
|
29
29
|
textColor?: ColorValue;
|
|
30
30
|
disableBackButtonOverride?: boolean;
|
|
31
31
|
inputType?: string;
|
|
32
|
-
onClose?:
|
|
33
|
-
onOpen?:
|
|
32
|
+
onClose?: DirectEventHandler<SearchBarEvent> | null;
|
|
33
|
+
onOpen?: DirectEventHandler<SearchBarEvent> | null;
|
|
34
34
|
hintTextColor?: ColorValue;
|
|
35
35
|
headerIconColor?: ColorValue;
|
|
36
36
|
shouldShowHintSearchIcon?: WithDefault<boolean, true>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBarNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/SearchBarNativeComponent.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"SearchBarNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/fabric/SearchBarNativeComponent.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EACnB,MAAM,2CAA2C,CAAC;AAGnD,aAAK,cAAc,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAEnC,aAAK,wBAAwB,GAAG,QAAQ,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,aAAK,eAAe,GAAG,QAAQ,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAEH,aAAK,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE7D,aAAK,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,YAAY,CAAC;AAExE,UAAU,WAAY,SAAQ,SAAS;IACrC,OAAO,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACpD,MAAM,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACnD,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC;IAC1E,mBAAmB,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IAChE,YAAY,CAAC,EAAE,kBAAkB,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,WAAW,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AAK,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1E,YAAY,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CAClE;AAED,eAAO,MAAM,QAAQ,EAAE,cASrB,CAAC;;AAEH,wBAAuE"}
|
|
@@ -461,8 +461,8 @@ export interface MeasuredDimensions {
|
|
|
461
461
|
pageY: number;
|
|
462
462
|
}
|
|
463
463
|
export declare type AnimatedScreenTransition = {
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
topScreenStyle: (event: PanGestureHandlerEventPayload, screenSize: MeasuredDimensions) => Record<string, unknown>;
|
|
465
|
+
belowTopScreenStyle: (event: PanGestureHandlerEventPayload, screenSize: MeasuredDimensions) => Record<string, unknown>;
|
|
466
466
|
};
|
|
467
467
|
export declare type ScreensRefsHolder = React.MutableRefObject<Record<string, React.MutableRefObject<React.Ref<NativeStackNavigatorProps>>>>;
|
|
468
468
|
export declare type GestureProviderProps = PropsWithChildren<{
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screens",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.31.0-rc.1",
|
|
4
4
|
"description": "Native navigation primitives for your React Native app.",
|
|
5
5
|
"scripts": {
|
|
6
|
+
"submodules": "git submodule update --init --recursive && (cd react-navigation && yarn)",
|
|
6
7
|
"check-types": "tsc --noEmit",
|
|
7
8
|
"start": "react-native start",
|
|
8
9
|
"test:unit": "jest --passWithNoTests",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"react-native": "0.72.4",
|
|
104
105
|
"react-native-builder-bob": "^0.23.2",
|
|
105
106
|
"react-native-gesture-handler": "^2.13.3",
|
|
106
|
-
"react-native-reanimated": "3.
|
|
107
|
+
"react-native-reanimated": "3.9.0-nightly-20240402-12717cdb5",
|
|
107
108
|
"react-native-safe-area-context": "^4.8.1",
|
|
108
109
|
"react-native-windows": "^0.64.8",
|
|
109
110
|
"react-test-renderer": "^18.2.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
2
|
import type { ViewProps, ColorValue } from 'react-native';
|
|
3
3
|
import type {
|
|
4
|
-
|
|
4
|
+
DirectEventHandler,
|
|
5
5
|
WithDefault,
|
|
6
6
|
Int32,
|
|
7
7
|
Float,
|
|
@@ -60,16 +60,16 @@ type ReplaceAnimation = 'pop' | 'push';
|
|
|
60
60
|
type SheetDetentTypes = 'large' | 'medium' | 'all';
|
|
61
61
|
|
|
62
62
|
export interface NativeProps extends ViewProps {
|
|
63
|
-
onAppear?:
|
|
64
|
-
onDisappear?:
|
|
65
|
-
onDismissed?:
|
|
66
|
-
onNativeDismissCancelled?:
|
|
67
|
-
onWillAppear?:
|
|
68
|
-
onWillDisappear?:
|
|
69
|
-
onHeaderHeightChange?:
|
|
70
|
-
onTransitionProgress?:
|
|
71
|
-
onGestureCancel?:
|
|
72
|
-
onHeaderBackButtonClicked?:
|
|
63
|
+
onAppear?: DirectEventHandler<ScreenEvent>;
|
|
64
|
+
onDisappear?: DirectEventHandler<ScreenEvent>;
|
|
65
|
+
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
|
|
66
|
+
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
|
|
67
|
+
onWillAppear?: DirectEventHandler<ScreenEvent>;
|
|
68
|
+
onWillDisappear?: DirectEventHandler<ScreenEvent>;
|
|
69
|
+
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
|
|
70
|
+
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
|
|
71
|
+
onGestureCancel?: DirectEventHandler<ScreenEvent>;
|
|
72
|
+
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
|
|
73
73
|
sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
|
|
74
74
|
sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
|
|
75
75
|
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
2
|
import type { ViewProps, ColorValue } from 'react-native';
|
|
3
3
|
import type {
|
|
4
|
-
|
|
4
|
+
DirectEventHandler,
|
|
5
5
|
WithDefault,
|
|
6
6
|
Int32,
|
|
7
7
|
Float,
|
|
@@ -60,16 +60,16 @@ type ReplaceAnimation = 'pop' | 'push';
|
|
|
60
60
|
type SheetDetentTypes = 'large' | 'medium' | 'all';
|
|
61
61
|
|
|
62
62
|
export interface NativeProps extends ViewProps {
|
|
63
|
-
onAppear?:
|
|
64
|
-
onDisappear?:
|
|
65
|
-
onDismissed?:
|
|
66
|
-
onNativeDismissCancelled?:
|
|
67
|
-
onWillAppear?:
|
|
68
|
-
onWillDisappear?:
|
|
69
|
-
onHeaderHeightChange?:
|
|
70
|
-
onTransitionProgress?:
|
|
71
|
-
onGestureCancel?:
|
|
72
|
-
onHeaderBackButtonClicked?:
|
|
63
|
+
onAppear?: DirectEventHandler<ScreenEvent>;
|
|
64
|
+
onDisappear?: DirectEventHandler<ScreenEvent>;
|
|
65
|
+
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
|
|
66
|
+
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
|
|
67
|
+
onWillAppear?: DirectEventHandler<ScreenEvent>;
|
|
68
|
+
onWillDisappear?: DirectEventHandler<ScreenEvent>;
|
|
69
|
+
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
|
|
70
|
+
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
|
|
71
|
+
onGestureCancel?: DirectEventHandler<ScreenEvent>;
|
|
72
|
+
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
|
|
73
73
|
sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;
|
|
74
74
|
sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;
|
|
75
75
|
sheetGrabberVisible?: WithDefault<boolean, false>;
|
|
@@ -3,11 +3,19 @@ import type { ViewProps, ColorValue } from 'react-native';
|
|
|
3
3
|
import type {
|
|
4
4
|
Int32,
|
|
5
5
|
WithDefault,
|
|
6
|
+
DirectEventHandler,
|
|
6
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
8
|
|
|
8
9
|
type DirectionType = 'rtl' | 'ltr';
|
|
9
10
|
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
12
|
+
type OnAttachedEvent = Readonly<{}>;
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
14
|
+
type OnDetachedEvent = Readonly<{}>;
|
|
15
|
+
|
|
10
16
|
export interface NativeProps extends ViewProps {
|
|
17
|
+
onAttached?: DirectEventHandler<OnAttachedEvent>;
|
|
18
|
+
onDetached?: DirectEventHandler<OnDetachedEvent>;
|
|
11
19
|
backgroundColor?: ColorValue;
|
|
12
20
|
backTitle?: string;
|
|
13
21
|
backTitleFontFamily?: string;
|
|
@@ -3,7 +3,7 @@ import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNati
|
|
|
3
3
|
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
|
|
4
4
|
import type {
|
|
5
5
|
WithDefault,
|
|
6
|
-
|
|
6
|
+
DirectEventHandler,
|
|
7
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
8
|
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
|
|
9
9
|
|
|
@@ -22,11 +22,11 @@ type SearchBarPlacement = 'automatic' | 'inline' | 'stacked';
|
|
|
22
22
|
type AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';
|
|
23
23
|
|
|
24
24
|
interface NativeProps extends ViewProps {
|
|
25
|
-
onFocus?:
|
|
26
|
-
onBlur?:
|
|
27
|
-
onSearchButtonPress?:
|
|
28
|
-
onCancelButtonPress?:
|
|
29
|
-
onChangeText?:
|
|
25
|
+
onFocus?: DirectEventHandler<SearchBarEvent> | null;
|
|
26
|
+
onBlur?: DirectEventHandler<SearchBarEvent> | null;
|
|
27
|
+
onSearchButtonPress?: DirectEventHandler<SearchButtonPressedEvent> | null;
|
|
28
|
+
onCancelButtonPress?: DirectEventHandler<SearchBarEvent> | null;
|
|
29
|
+
onChangeText?: DirectEventHandler<ChangeTextEvent> | null;
|
|
30
30
|
hideWhenScrolling?: boolean;
|
|
31
31
|
autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>;
|
|
32
32
|
placeholder?: string;
|
|
@@ -43,8 +43,8 @@ interface NativeProps extends ViewProps {
|
|
|
43
43
|
disableBackButtonOverride?: boolean;
|
|
44
44
|
// TODO: consider creating enum here
|
|
45
45
|
inputType?: string;
|
|
46
|
-
onClose?:
|
|
47
|
-
onOpen?:
|
|
46
|
+
onClose?: DirectEventHandler<SearchBarEvent> | null;
|
|
47
|
+
onOpen?: DirectEventHandler<SearchBarEvent> | null;
|
|
48
48
|
hintTextColor?: ColorValue;
|
|
49
49
|
headerIconColor?: ColorValue;
|
|
50
50
|
shouldShowHintSearchIcon?: WithDefault<boolean, true>;
|
|
@@ -507,11 +507,11 @@ export interface MeasuredDimensions {
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
export type AnimatedScreenTransition = {
|
|
510
|
-
|
|
510
|
+
topScreenStyle: (
|
|
511
511
|
event: PanGestureHandlerEventPayload,
|
|
512
512
|
screenSize: MeasuredDimensions
|
|
513
513
|
) => Record<string, unknown>;
|
|
514
|
-
|
|
514
|
+
belowTopScreenStyle: (
|
|
515
515
|
event: PanGestureHandlerEventPayload,
|
|
516
516
|
screenSize: MeasuredDimensions
|
|
517
517
|
) => Record<string, unknown>;
|