react-native-screens 4.19.0-nightly-20251026-ea2a0334f → 4.19.0-nightly-20251028-6f3697f51
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/ios/RNSScreenStack.mm +0 -49
- package/ios/bridging/Swift-Bridging.h +0 -4
- package/ios/gamma/split-view/RNSSplitViewScreenComponentView.h +1 -5
- package/ios/gamma/split-view/RNSSplitViewScreenComponentView.mm +0 -5
- package/ios/gamma/split-view/RNSSplitViewScreenController.swift +0 -12
- package/lib/typescript/components/helpers/prepareHeaderBarButtonItems.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +1 -1
- package/package.json +1 -1
- package/src/types.tsx +1 -1
- package/ios/gamma/split-view/compat/RNSFrameCorrectionProvider.h +0 -32
- package/ios/gamma/split-view/compat/RNSFrameCorrector.h +0 -24
- package/ios/gamma/split-view/compat/RNSFrameCorrector.mm +0 -24
package/ios/RNSScreenStack.mm
CHANGED
|
@@ -34,11 +34,6 @@
|
|
|
34
34
|
#import "integrations/RNSDismissibleModalProtocol.h"
|
|
35
35
|
#import "utils/UINavigationBar+RNSUtility.h"
|
|
36
36
|
|
|
37
|
-
#ifdef RNS_GAMMA_ENABLED
|
|
38
|
-
#import "RNSFrameCorrectionProvider.h"
|
|
39
|
-
#import "Swift-Bridging.h"
|
|
40
|
-
#endif // RNS_GAMMA_ENABLED
|
|
41
|
-
|
|
42
37
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
43
38
|
namespace react = facebook::react;
|
|
44
39
|
#endif // RCT_NEW_ARCH_ENABLED
|
|
@@ -166,11 +161,6 @@ namespace react = facebook::react;
|
|
|
166
161
|
static_cast<RNSTabsScreenViewController *>(self.parentViewController);
|
|
167
162
|
[previousParentTabsScreenVC clearTabsSpecialEffectsDelegateIfNeeded:self];
|
|
168
163
|
}
|
|
169
|
-
#ifdef RNS_GAMMA_ENABLED
|
|
170
|
-
if (parent == nil) {
|
|
171
|
-
[self maybeUnregisterFromSplitViewFrameCorrectionWorkaround];
|
|
172
|
-
}
|
|
173
|
-
#endif // RNS_GAMMA_ENABLED
|
|
174
164
|
}
|
|
175
165
|
|
|
176
166
|
- (void)didMoveToParentViewController:(UIViewController *)parent
|
|
@@ -180,11 +170,6 @@ namespace react = facebook::react;
|
|
|
180
170
|
RNSTabsScreenViewController *parentTabsScreenVC = static_cast<RNSTabsScreenViewController *>(parent);
|
|
181
171
|
[parentTabsScreenVC setTabsSpecialEffectsDelegate:self];
|
|
182
172
|
}
|
|
183
|
-
#ifdef RNS_GAMMA_ENABLED
|
|
184
|
-
if (parent != nil) {
|
|
185
|
-
[self maybeRegisterForSplitViewFrameCorrectionWorkaround];
|
|
186
|
-
}
|
|
187
|
-
#endif // RNS_GAMMA_ENABLED
|
|
188
173
|
}
|
|
189
174
|
|
|
190
175
|
- (bool)onRepeatedTabSelectionOfTabScreenController:(RNSTabsScreenViewController *)tabScreenController
|
|
@@ -201,40 +186,6 @@ namespace react = facebook::react;
|
|
|
201
186
|
return false;
|
|
202
187
|
}
|
|
203
188
|
|
|
204
|
-
#pragma mark - RNSFrameCorrectionProvider
|
|
205
|
-
|
|
206
|
-
#ifdef RNS_GAMMA_ENABLED
|
|
207
|
-
- (void)maybeRegisterForSplitViewFrameCorrectionWorkaround
|
|
208
|
-
{
|
|
209
|
-
if (auto frameCorrectionProvider = [self findAncestorFrameCorrectionProvider]) {
|
|
210
|
-
// We need to apply an update for the parent of the view which `RNSNavigationController` is describing
|
|
211
|
-
[frameCorrectionProvider registerForFrameCorrection:self.view.superview];
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
- (void)maybeUnregisterFromSplitViewFrameCorrectionWorkaround
|
|
216
|
-
{
|
|
217
|
-
if (auto frameCorrectionProvider = [self findAncestorFrameCorrectionProvider]) {
|
|
218
|
-
// We need to apply an update for the parent of the view which `RNSNavigationController` is describing
|
|
219
|
-
[frameCorrectionProvider unregisterFromFrameCorrection:self.view.superview];
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
- (id<RNSFrameCorrectionProvider>)findAncestorFrameCorrectionProvider
|
|
224
|
-
{
|
|
225
|
-
auto parent = [self parentViewController];
|
|
226
|
-
while (parent != nil) {
|
|
227
|
-
if ([parent respondsToSelector:@selector(registerForFrameCorrection:)] &&
|
|
228
|
-
[parent respondsToSelector:@selector(unregisterFromFrameCorrection:)]) {
|
|
229
|
-
return (id<RNSFrameCorrectionProvider>)parent;
|
|
230
|
-
}
|
|
231
|
-
parent = [parent parentViewController];
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
return nil;
|
|
235
|
-
}
|
|
236
|
-
#endif // RNS_GAMMA_ENABLED
|
|
237
|
-
|
|
238
189
|
@end
|
|
239
190
|
|
|
240
191
|
#if !TARGET_OS_TV && !TARGET_OS_VISION
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
#import "RNSEnums.h"
|
|
2
|
-
#import "RNSFrameCorrectionProvider.h"
|
|
3
2
|
#import "RNSReactBaseView.h"
|
|
4
3
|
#import "RNSSafeAreaProviding.h"
|
|
5
4
|
#import "RNSSplitViewScreenComponentEventEmitter.h"
|
|
@@ -16,11 +15,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
16
15
|
*
|
|
17
16
|
* Responsible for a lifecycle management, layout, and event emission for a single screen; used as a child
|
|
18
17
|
* of RNSSplitViewHostComponentView.
|
|
19
|
-
*
|
|
20
|
-
* Implements `RNSFrameCorrectionProvider` as a workaround for issue described in
|
|
21
|
-
* https://github.com/software-mansion/react-native-screens/pull/3097
|
|
22
18
|
*/
|
|
23
|
-
@interface RNSSplitViewScreenComponentView : RNSReactBaseView <
|
|
19
|
+
@interface RNSSplitViewScreenComponentView : RNSReactBaseView <RNSSafeAreaProviding>
|
|
24
20
|
|
|
25
21
|
@property (nonatomic, strong, readonly, nonnull) RNSSplitViewScreenController *controller;
|
|
26
22
|
@property (nonatomic, weak, readwrite, nullable) RNSSplitViewHostComponentView *splitViewHost;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
#import <React/RCTSurfaceTouchHandler.h>
|
|
4
4
|
#import <rnscreens/RNSSplitViewScreenComponentDescriptor.h>
|
|
5
5
|
#import "RNSConversions.h"
|
|
6
|
-
#import "RNSFrameCorrector.h"
|
|
7
6
|
#import "RNSSafeAreaViewNotifications.h"
|
|
8
7
|
|
|
9
8
|
#import "Swift-Bridging.h"
|
|
@@ -116,10 +115,6 @@ namespace react = facebook::react;
|
|
|
116
115
|
- (void)layoutSubviews
|
|
117
116
|
{
|
|
118
117
|
[super layoutSubviews];
|
|
119
|
-
|
|
120
|
-
for (UIView *view in _viewsForFrameCorrection) {
|
|
121
|
-
[RNSFrameCorrector applyFrameCorrectionFor:view inContextOfSplitViewColumn:self];
|
|
122
|
-
}
|
|
123
118
|
}
|
|
124
119
|
|
|
125
120
|
#pragma mark - ShadowTreeState
|
|
@@ -131,15 +131,3 @@ public class RNSSplitViewScreenController: UIViewController {
|
|
|
131
131
|
reactEventEmitter.emitOnDidDisappear()
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
extension RNSSplitViewScreenController: RNSFrameCorrectionProvider {
|
|
136
|
-
@objc
|
|
137
|
-
public func register(forFrameCorrection view: UIView) {
|
|
138
|
-
self.splitViewScreenComponentView.register(forFrameCorrection: view)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
@objc
|
|
142
|
-
public func unregister(fromFrameCorrection view: UIView) {
|
|
143
|
-
self.splitViewScreenComponentView.unregister(fromFrameCorrection: view)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareHeaderBarButtonItems.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/prepareHeaderBarButtonItems.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EAEpB,MAAM,4BAA4B,CAAC;AA4BpC,eAAO,MAAM,2BAA2B,GACtC,gBAAgB,mBAAmB,EAAE,EACrC,MAAM,MAAM,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"prepareHeaderBarButtonItems.d.ts","sourceRoot":"","sources":["../../../../src/components/helpers/prepareHeaderBarButtonItems.ts"],"names":[],"mappings":"AACA,OAAO,EACL,mBAAmB,EAEpB,MAAM,4BAA4B,CAAC;AA4BpC,eAAO,MAAM,2BAA2B,GACtC,gBAAgB,mBAAmB,EAAE,EACrC,MAAM,MAAM,GAAG,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAkD26rC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WADn8rC,CAAC"}
|
|
@@ -108,7 +108,7 @@ export interface ScreenProps extends ViewProps {
|
|
|
108
108
|
* This does not affect the behavior of transitions that don't use gestures, enabled by `fullScreenGestureEnabled` prop.
|
|
109
109
|
*
|
|
110
110
|
* @deprecated since iOS 26, full screen swipe is handled by native recognizer, and this prop is ignored. We still fallback
|
|
111
|
-
* to the legacy implementation when
|
|
111
|
+
* to the legacy implementation when handling custom animations, but we assume `true` for shadows.
|
|
112
112
|
*
|
|
113
113
|
* @platform ios
|
|
114
114
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-screens",
|
|
3
|
-
"version": "4.19.0-nightly-
|
|
3
|
+
"version": "4.19.0-nightly-20251028-6f3697f51",
|
|
4
4
|
"description": "Native navigation primitives for your React Native app.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"submodules": "git submodule update --init --recursive && (cd react-navigation && yarn && yarn build && cd ../)",
|
package/src/types.tsx
CHANGED
|
@@ -193,7 +193,7 @@ export interface ScreenProps extends ViewProps {
|
|
|
193
193
|
* This does not affect the behavior of transitions that don't use gestures, enabled by `fullScreenGestureEnabled` prop.
|
|
194
194
|
*
|
|
195
195
|
* @deprecated since iOS 26, full screen swipe is handled by native recognizer, and this prop is ignored. We still fallback
|
|
196
|
-
* to the legacy implementation when
|
|
196
|
+
* to the legacy implementation when handling custom animations, but we assume `true` for shadows.
|
|
197
197
|
*
|
|
198
198
|
* @platform ios
|
|
199
199
|
*/
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
|
|
3
|
-
#import "RNSSplitViewHostComponentView.h"
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @protocol RNSFrameCorrectionProvider
|
|
7
|
-
* @brief Temporal solution for registering view for being notified when the split view layout is changed
|
|
8
|
-
*
|
|
9
|
-
* @remarks - It's a workaround until we have synchronous updates:
|
|
10
|
-
* https://github.com/software-mansion/react-native-screens-labs/issues/374
|
|
11
|
-
*
|
|
12
|
-
* It resolves problems with jumping content in the SplitView, until we'd have synchronous updates.
|
|
13
|
-
*/
|
|
14
|
-
@protocol RNSFrameCorrectionProvider <NSObject>
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @brief Responsible for adding `view` to the SplitView set for observing views that need to adapt layout on SplitView
|
|
18
|
-
* layout update.
|
|
19
|
-
*
|
|
20
|
-
* @param view - UIView which subscribes for SplitViewScreen layout updates
|
|
21
|
-
*/
|
|
22
|
-
- (void)registerForFrameCorrection:(nonnull UIView *)view;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @brief Responsible for removing `view` from the SplitView set for observing views that need to adapt layout on
|
|
26
|
-
* SplitView layout update.
|
|
27
|
-
*
|
|
28
|
-
* @param view - UIView which unsubscribes for SplitViewScreen layout updates
|
|
29
|
-
*/
|
|
30
|
-
- (void)unregisterFromFrameCorrection:(nonnull UIView *)view;
|
|
31
|
-
|
|
32
|
-
@end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#import <Foundation/Foundation.h>
|
|
2
|
-
#import "RNSFrameCorrectionProvider.h"
|
|
3
|
-
#import "RNSSplitViewScreenComponentView.h"
|
|
4
|
-
|
|
5
|
-
@interface RNSFrameCorrector : NSObject
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @brief Responsible for correcting the layout within the context of the SplitViewScreen
|
|
9
|
-
*
|
|
10
|
-
* SplitViewScreen should be an ancestor of the view for which we're applying the correction.
|
|
11
|
-
* It works with an assumption that the target width of view for which we're
|
|
12
|
-
* applying correction should be the same as the width of the SplitView column.
|
|
13
|
-
*
|
|
14
|
-
* @remarks - It's a workaround until we have synchronous updates:
|
|
15
|
-
* https://github.com/software-mansion/react-native-screens-labs/issues/374
|
|
16
|
-
*
|
|
17
|
-
* @param view - view for which we're applying a correction (assuming that the view's width
|
|
18
|
-
* should be equal with the SplitViewScreen width)
|
|
19
|
-
* @param splitViewScreen - ancestor representing SplitView column for which we're applying layout correction
|
|
20
|
-
*/
|
|
21
|
-
+ (void)applyFrameCorrectionFor:(UIView *)view
|
|
22
|
-
inContextOfSplitViewColumn:(RNSSplitViewScreenComponentView *)splitViewScreen;
|
|
23
|
-
|
|
24
|
-
@end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#import "RNSFrameCorrector.h"
|
|
2
|
-
|
|
3
|
-
@implementation RNSFrameCorrector
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* This correction is performed synchronously to resolve the following issue:
|
|
7
|
-
* 1. On the transition begin, the animation may expect the target frame to be set immediately, e.g. in SplitView
|
|
8
|
-
* for triggering the transition animation, we need to know the final frame on animation start.
|
|
9
|
-
* 2. When a layout recalculation is dependent on Yoga - it's performed asynchronously, so the frame for the nested
|
|
10
|
-
* component might be in 'stale' state, e.g. when the transition begins.
|
|
11
|
-
* 3. Until Yoga will compute the new layout, the reference value for the frame passed to the animation will be
|
|
12
|
-
* wrong.
|
|
13
|
-
* 4. As we don't have a control, when the animation will start, we need to apply frame correction synchronously to
|
|
14
|
-
* guarantee that it takes the proper frame width as a reference.
|
|
15
|
-
*/
|
|
16
|
-
+ (void)applyFrameCorrectionFor:(UIView *)view
|
|
17
|
-
inContextOfSplitViewColumn:(RNSSplitViewScreenComponentView *)splitViewScreen
|
|
18
|
-
{
|
|
19
|
-
CGRect originalFrame = view.frame;
|
|
20
|
-
view.frame = CGRectMake(
|
|
21
|
-
originalFrame.origin.x, originalFrame.origin.y, splitViewScreen.frame.size.width, originalFrame.size.height);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@end
|