@lodev09/react-native-true-sheet 3.10.0-beta.1 → 3.10.0-beta.3
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/src/main/java/com/lodev09/truesheet/core/TrueSheetGrabberView.kt +3 -1
- package/ios/TrueSheetContainerView.h +2 -0
- package/ios/TrueSheetContainerView.mm +48 -1
- package/ios/TrueSheetContentView.h +6 -0
- package/ios/TrueSheetContentView.mm +43 -0
- package/ios/TrueSheetFooterView.h +6 -0
- package/ios/TrueSheetFooterView.mm +7 -10
- package/ios/TrueSheetHeaderView.mm +4 -1
- package/ios/TrueSheetView.mm +7 -1
- package/ios/TrueSheetViewController.mm +1 -1
- package/ios/utils/UIView+ScrollEdgeInteraction.h +25 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.mm +57 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +4 -0
- package/lib/typescript/src/TrueSheet.types.d.ts +21 -0
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +3 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/TrueSheet.types.ts +24 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +4 -0
|
@@ -11,6 +11,7 @@ import android.view.View
|
|
|
11
11
|
import android.view.accessibility.AccessibilityNodeInfo
|
|
12
12
|
import android.widget.FrameLayout
|
|
13
13
|
import androidx.core.graphics.ColorUtils
|
|
14
|
+
import androidx.core.view.ViewCompat
|
|
14
15
|
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -131,12 +132,13 @@ class TrueSheetGrabberView(context: Context, private val options: GrabberOptions
|
|
|
131
132
|
}
|
|
132
133
|
|
|
133
134
|
fun updateAccessibilityValue(index: Int, detentCount: Int) {
|
|
134
|
-
|
|
135
|
+
val description: CharSequence? = when {
|
|
135
136
|
index < 0 || detentCount <= 0 -> null
|
|
136
137
|
index >= detentCount - 1 -> "Expanded"
|
|
137
138
|
index == 0 -> "Collapsed"
|
|
138
139
|
else -> "Detent ${index + 1} of $detentCount"
|
|
139
140
|
}
|
|
141
|
+
ViewCompat.setStateDescription(this, description)
|
|
140
142
|
}
|
|
141
143
|
|
|
142
144
|
private fun getAdaptiveColor(baseColor: Int? = null): Int {
|
|
@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
17
17
|
|
|
18
18
|
@property (nonatomic, assign) CGFloat keyboardScrollOffset;
|
|
19
19
|
@property (nonatomic, assign) BOOL scrollingExpandsSheet;
|
|
20
|
+
@property (nonatomic, assign) NSInteger topScrollEdgeEffect;
|
|
21
|
+
@property (nonatomic, assign) NSInteger bottomScrollEdgeEffect;
|
|
20
22
|
|
|
21
23
|
@end
|
|
22
24
|
|
|
@@ -9,11 +9,13 @@
|
|
|
9
9
|
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
10
|
|
|
11
11
|
#import "TrueSheetContainerView.h"
|
|
12
|
+
#import <React/RCTScrollViewComponentView.h>
|
|
12
13
|
#import "TrueSheetContentView.h"
|
|
13
14
|
#import "TrueSheetFooterView.h"
|
|
14
15
|
#import "TrueSheetHeaderView.h"
|
|
15
16
|
#import "TrueSheetViewController.h"
|
|
16
17
|
#import "core/TrueSheetKeyboardObserver.h"
|
|
18
|
+
#import "utils/UIView+ScrollEdgeInteraction.h"
|
|
17
19
|
#import "utils/WindowUtil.h"
|
|
18
20
|
|
|
19
21
|
#import <react/renderer/components/TrueSheetSpec/ComponentDescriptors.h>
|
|
@@ -33,13 +35,17 @@ using namespace facebook::react;
|
|
|
33
35
|
if (self = [super init]) {
|
|
34
36
|
_keyboardScrollOffset = 0;
|
|
35
37
|
_scrollingExpandsSheet = YES;
|
|
38
|
+
_topScrollEdgeEffect = (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
|
|
39
|
+
_bottomScrollEdgeEffect = (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
|
|
36
40
|
}
|
|
37
41
|
return self;
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
@end
|
|
41
45
|
|
|
42
|
-
@interface TrueSheetContainerView () <TrueSheetContentViewDelegate,
|
|
46
|
+
@interface TrueSheetContainerView () <TrueSheetContentViewDelegate,
|
|
47
|
+
TrueSheetHeaderViewDelegate,
|
|
48
|
+
TrueSheetFooterViewDelegate>
|
|
43
49
|
@end
|
|
44
50
|
|
|
45
51
|
@implementation TrueSheetContainerView {
|
|
@@ -111,6 +117,34 @@ using namespace facebook::react;
|
|
|
111
117
|
bottomInset = [WindowUtil keyWindow].safeAreaInsets.bottom;
|
|
112
118
|
}
|
|
113
119
|
[_contentView setupScrollable:_scrollableEnabled bottomInset:bottomInset];
|
|
120
|
+
[_contentView applyScrollEdgeEffects:_scrollableOptions];
|
|
121
|
+
if (@available(iOS 26.0, *)) {
|
|
122
|
+
[self setupEdgeInteractions];
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
- (void)setupEdgeInteractions API_AVAILABLE(ios(26.0)) {
|
|
128
|
+
if (!_contentView) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
NSInteger topEffect =
|
|
133
|
+
_scrollableOptions ? _scrollableOptions.topScrollEdgeEffect : (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
|
|
134
|
+
NSInteger bottomEffect = _scrollableOptions ? _scrollableOptions.bottomScrollEdgeEffect
|
|
135
|
+
: (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
|
|
136
|
+
|
|
137
|
+
BOOL topHidden = topEffect == (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
|
|
138
|
+
BOOL bottomHidden = bottomEffect == (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
|
|
139
|
+
|
|
140
|
+
RCTScrollViewComponentView *scrollViewComponent = [_contentView findScrollView];
|
|
141
|
+
UIScrollView *scrollView = scrollViewComponent.scrollView;
|
|
142
|
+
|
|
143
|
+
if (_headerView) {
|
|
144
|
+
[_headerView setupEdgeInteractionWithScrollView:topHidden ? nil : scrollView edge:UIRectEdgeTop];
|
|
145
|
+
}
|
|
146
|
+
if (_footerView) {
|
|
147
|
+
[_footerView setupEdgeInteractionWithScrollView:bottomHidden ? nil : scrollView edge:UIRectEdgeBottom];
|
|
114
148
|
}
|
|
115
149
|
}
|
|
116
150
|
|
|
@@ -144,6 +178,7 @@ using namespace facebook::react;
|
|
|
144
178
|
return;
|
|
145
179
|
}
|
|
146
180
|
_footerView = (TrueSheetFooterView *)childComponentView;
|
|
181
|
+
_footerView.delegate = self;
|
|
147
182
|
}
|
|
148
183
|
}
|
|
149
184
|
|
|
@@ -160,6 +195,7 @@ using namespace facebook::react;
|
|
|
160
195
|
}
|
|
161
196
|
|
|
162
197
|
if ([childComponentView isKindOfClass:[TrueSheetFooterView class]]) {
|
|
198
|
+
_footerView.delegate = nil;
|
|
163
199
|
_footerView = nil;
|
|
164
200
|
}
|
|
165
201
|
|
|
@@ -190,6 +226,17 @@ using namespace facebook::react;
|
|
|
190
226
|
|
|
191
227
|
- (void)headerViewDidChangeSize:(CGSize)newSize {
|
|
192
228
|
[self.delegate containerViewHeaderDidChangeSize:newSize];
|
|
229
|
+
if (@available(iOS 26.0, *)) {
|
|
230
|
+
[self setupEdgeInteractions];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
#pragma mark - TrueSheetFooterViewDelegate
|
|
235
|
+
|
|
236
|
+
- (void)footerViewDidChangeSize:(CGSize)newSize {
|
|
237
|
+
if (@available(iOS 26.0, *)) {
|
|
238
|
+
[self setupEdgeInteractions];
|
|
239
|
+
}
|
|
193
240
|
}
|
|
194
241
|
|
|
195
242
|
#pragma mark - Keyboard Observer
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
@class TrueSheetViewController;
|
|
18
18
|
@class RCTScrollViewComponentView;
|
|
19
|
+
@class ScrollableOptions;
|
|
19
20
|
|
|
20
21
|
NS_ASSUME_NONNULL_BEGIN
|
|
21
22
|
|
|
@@ -46,6 +47,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
46
47
|
*/
|
|
47
48
|
- (void)updateScrollViewHeight;
|
|
48
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Apply scroll edge effects to the pinned scroll view (iOS 26+)
|
|
52
|
+
*/
|
|
53
|
+
- (void)applyScrollEdgeEffects:(nullable ScrollableOptions *)options;
|
|
54
|
+
|
|
49
55
|
@end
|
|
50
56
|
|
|
51
57
|
NS_ASSUME_NONNULL_END
|
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
#import <react/renderer/components/TrueSheetSpec/EventEmitters.h>
|
|
15
15
|
#import <react/renderer/components/TrueSheetSpec/Props.h>
|
|
16
16
|
#import <react/renderer/components/TrueSheetSpec/RCTComponentViewHelpers.h>
|
|
17
|
+
#import "TrueSheetContainerView.h"
|
|
17
18
|
#import "TrueSheetView.h"
|
|
18
19
|
#import "TrueSheetViewController.h"
|
|
20
|
+
#import "utils/PlatformUtil.h"
|
|
19
21
|
#import "utils/UIView+FirstResponder.h"
|
|
20
22
|
|
|
21
23
|
using namespace facebook::react;
|
|
@@ -200,6 +202,47 @@ using namespace facebook::react;
|
|
|
200
202
|
return nil;
|
|
201
203
|
}
|
|
202
204
|
|
|
205
|
+
#pragma mark - Scroll Edge Effects
|
|
206
|
+
|
|
207
|
+
- (void)applyScrollEdgeEffects:(nullable ScrollableOptions *)options {
|
|
208
|
+
#if RNTS_IPHONE_OS_VERSION_AVAILABLE(26_0)
|
|
209
|
+
if (!_pinnedScrollView)
|
|
210
|
+
return;
|
|
211
|
+
|
|
212
|
+
if (@available(iOS 26.0, *)) {
|
|
213
|
+
UIScrollView *scrollView = _pinnedScrollView.scrollView;
|
|
214
|
+
NSInteger topEffect = options ? options.topScrollEdgeEffect : (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
|
|
215
|
+
NSInteger bottomEffect =
|
|
216
|
+
options ? options.bottomScrollEdgeEffect : (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
|
|
217
|
+
|
|
218
|
+
[self applyEdgeEffect:topEffect toEdge:scrollView.topEdgeEffect];
|
|
219
|
+
[self applyEdgeEffect:bottomEffect toEdge:scrollView.bottomEdgeEffect];
|
|
220
|
+
}
|
|
221
|
+
#endif
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
#if RNTS_IPHONE_OS_VERSION_AVAILABLE(26_0)
|
|
225
|
+
- (void)applyEdgeEffect:(NSInteger)effect toEdge:(UIScrollEdgeEffect *)edgeEffect API_AVAILABLE(ios(26.0)) {
|
|
226
|
+
switch (effect) {
|
|
227
|
+
case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Automatic:
|
|
228
|
+
edgeEffect.hidden = NO;
|
|
229
|
+
edgeEffect.style = UIScrollEdgeEffectStyle.automaticStyle;
|
|
230
|
+
break;
|
|
231
|
+
case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hard:
|
|
232
|
+
edgeEffect.hidden = NO;
|
|
233
|
+
edgeEffect.style = UIScrollEdgeEffectStyle.hardStyle;
|
|
234
|
+
break;
|
|
235
|
+
case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Soft:
|
|
236
|
+
edgeEffect.hidden = NO;
|
|
237
|
+
edgeEffect.style = UIScrollEdgeEffectStyle.softStyle;
|
|
238
|
+
break;
|
|
239
|
+
case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden:
|
|
240
|
+
edgeEffect.hidden = YES;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
#endif
|
|
245
|
+
|
|
203
246
|
#pragma mark - TrueSheetKeyboardObserverDelegate
|
|
204
247
|
|
|
205
248
|
- (void)keyboardWillShow:(CGFloat)height duration:(NSTimeInterval)duration curve:(UIViewAnimationOptions)curve {
|
|
@@ -17,9 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
NS_ASSUME_NONNULL_BEGIN
|
|
19
19
|
|
|
20
|
+
@protocol TrueSheetFooterViewDelegate <NSObject>
|
|
21
|
+
@optional
|
|
22
|
+
- (void)footerViewDidChangeSize:(CGSize)size;
|
|
23
|
+
@end
|
|
24
|
+
|
|
20
25
|
@interface TrueSheetFooterView : RCTViewComponentView <TrueSheetKeyboardObserverDelegate>
|
|
21
26
|
|
|
22
27
|
@property (nonatomic, weak, nullable) TrueSheetKeyboardObserver *keyboardObserver;
|
|
28
|
+
@property (nonatomic, weak, nullable) id<TrueSheetFooterViewDelegate> delegate;
|
|
23
29
|
|
|
24
30
|
- (void)setupConstraintsWithHeight:(CGFloat)height;
|
|
25
31
|
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#import <react/renderer/components/TrueSheetSpec/RCTComponentViewHelpers.h>
|
|
16
16
|
#import "TrueSheetViewController.h"
|
|
17
17
|
#import "utils/LayoutUtil.h"
|
|
18
|
+
#import "utils/UIView+ScrollEdgeInteraction.h"
|
|
18
19
|
|
|
19
20
|
using namespace facebook::react;
|
|
20
21
|
|
|
@@ -34,7 +35,6 @@ using namespace facebook::react;
|
|
|
34
35
|
static const auto defaultProps = std::make_shared<const TrueSheetFooterViewProps>();
|
|
35
36
|
_props = defaultProps;
|
|
36
37
|
|
|
37
|
-
// Set background color to clear by default
|
|
38
38
|
self.backgroundColor = [UIColor clearColor];
|
|
39
39
|
|
|
40
40
|
_lastHeight = 0;
|
|
@@ -45,28 +45,26 @@ using namespace facebook::react;
|
|
|
45
45
|
return self;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
#pragma mark - Layout
|
|
49
|
+
|
|
48
50
|
- (void)setupConstraintsWithHeight:(CGFloat)height {
|
|
49
51
|
UIView *parentView = self.superview;
|
|
50
52
|
if (!parentView) {
|
|
51
53
|
return;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
// Remove existing constraints before applying new ones
|
|
55
56
|
[LayoutUtil unpinView:self fromParentView:parentView];
|
|
56
57
|
_bottomConstraint = nil;
|
|
57
58
|
|
|
58
59
|
self.translatesAutoresizingMaskIntoConstraints = NO;
|
|
59
60
|
|
|
60
|
-
// Pin footer to sides of container
|
|
61
61
|
[self.leadingAnchor constraintEqualToAnchor:parentView.leadingAnchor].active = YES;
|
|
62
62
|
[self.trailingAnchor constraintEqualToAnchor:parentView.trailingAnchor].active = YES;
|
|
63
63
|
|
|
64
|
-
// Store bottom constraint for keyboard adjustment, preserving current keyboard offset
|
|
65
64
|
_bottomConstraint = [self.bottomAnchor constraintEqualToAnchor:parentView.bottomAnchor
|
|
66
65
|
constant:-_currentKeyboardOffset];
|
|
67
66
|
_bottomConstraint.active = YES;
|
|
68
67
|
|
|
69
|
-
// Apply height constraint
|
|
70
68
|
if (height > 0) {
|
|
71
69
|
[self.heightAnchor constraintEqualToConstant:height].active = YES;
|
|
72
70
|
}
|
|
@@ -77,7 +75,6 @@ using namespace facebook::react;
|
|
|
77
75
|
- (void)didMoveToSuperview {
|
|
78
76
|
[super didMoveToSuperview];
|
|
79
77
|
|
|
80
|
-
// Setup footer constraints when added to container
|
|
81
78
|
if (self.superview) {
|
|
82
79
|
CGFloat initialHeight = self.frame.size.height;
|
|
83
80
|
[self setupConstraintsWithHeight:initialHeight];
|
|
@@ -88,24 +85,24 @@ using namespace facebook::react;
|
|
|
88
85
|
oldLayoutMetrics:(const facebook::react::LayoutMetrics &)oldLayoutMetrics {
|
|
89
86
|
CGFloat height = layoutMetrics.frame.size.height;
|
|
90
87
|
|
|
91
|
-
// On initial layout, call super to let React Native position the view
|
|
92
|
-
// After that, we use Auto Layout constraints instead
|
|
93
88
|
if (!_didInitialLayout) {
|
|
94
89
|
[super updateLayoutMetrics:layoutMetrics oldLayoutMetrics:oldLayoutMetrics];
|
|
95
90
|
_didInitialLayout = YES;
|
|
96
91
|
}
|
|
97
92
|
|
|
98
|
-
// Update footer constraints when height changes
|
|
99
93
|
if (height != _lastHeight) {
|
|
100
94
|
[self setupConstraintsWithHeight:height];
|
|
95
|
+
[self.delegate footerViewDidChangeSize:CGSizeMake(layoutMetrics.frame.size.width, height)];
|
|
101
96
|
}
|
|
102
97
|
}
|
|
103
98
|
|
|
104
99
|
- (void)prepareForRecycle {
|
|
105
100
|
[super prepareForRecycle];
|
|
106
101
|
|
|
107
|
-
// Remove footer constraints
|
|
108
102
|
[LayoutUtil unpinView:self fromParentView:self.superview];
|
|
103
|
+
if (@available(iOS 26.0, *)) {
|
|
104
|
+
[self cleanupEdgeInteraction];
|
|
105
|
+
}
|
|
109
106
|
|
|
110
107
|
_lastHeight = 0;
|
|
111
108
|
_didInitialLayout = NO;
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
#import <react/renderer/components/TrueSheetSpec/Props.h>
|
|
15
15
|
#import <react/renderer/components/TrueSheetSpec/RCTComponentViewHelpers.h>
|
|
16
16
|
#import "utils/LayoutUtil.h"
|
|
17
|
+
#import "utils/UIView+ScrollEdgeInteraction.h"
|
|
17
18
|
|
|
18
19
|
using namespace facebook::react;
|
|
19
20
|
|
|
@@ -41,7 +42,6 @@ using namespace facebook::react;
|
|
|
41
42
|
|
|
42
43
|
CGSize newSize = CGSizeMake(layoutMetrics.frame.size.width, layoutMetrics.frame.size.height);
|
|
43
44
|
|
|
44
|
-
// Notify delegate when header size changes
|
|
45
45
|
if (!CGSizeEqualToSize(newSize, _lastSize)) {
|
|
46
46
|
_lastSize = newSize;
|
|
47
47
|
[self.delegate headerViewDidChangeSize:newSize];
|
|
@@ -51,6 +51,9 @@ using namespace facebook::react;
|
|
|
51
51
|
- (void)prepareForRecycle {
|
|
52
52
|
[super prepareForRecycle];
|
|
53
53
|
_lastSize = CGSizeZero;
|
|
54
|
+
if (@available(iOS 26.0, *)) {
|
|
55
|
+
[self cleanupEdgeInteraction];
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
@end
|
package/ios/TrueSheetView.mm
CHANGED
|
@@ -245,12 +245,18 @@ using namespace facebook::react;
|
|
|
245
245
|
|
|
246
246
|
const auto &scrollableOpts = newProps.scrollableOptions;
|
|
247
247
|
BOOL scrollingExpandsSheet = scrollableOpts.scrollingExpandsSheet;
|
|
248
|
-
|
|
248
|
+
NSInteger topEdgeEffect = (NSInteger)scrollableOpts.topScrollEdgeEffect;
|
|
249
|
+
NSInteger bottomEdgeEffect = (NSInteger)scrollableOpts.bottomScrollEdgeEffect;
|
|
250
|
+
BOOL hasScrollableOptions = scrollableOpts.keyboardScrollOffset > 0 || !scrollingExpandsSheet ||
|
|
251
|
+
topEdgeEffect != (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden ||
|
|
252
|
+
bottomEdgeEffect != (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
|
|
249
253
|
|
|
250
254
|
if (hasScrollableOptions) {
|
|
251
255
|
ScrollableOptions *options = [[ScrollableOptions alloc] init];
|
|
252
256
|
options.keyboardScrollOffset = scrollableOpts.keyboardScrollOffset;
|
|
253
257
|
options.scrollingExpandsSheet = scrollingExpandsSheet;
|
|
258
|
+
options.topScrollEdgeEffect = topEdgeEffect;
|
|
259
|
+
options.bottomScrollEdgeEffect = bottomEdgeEffect;
|
|
254
260
|
_scrollableOptions = options;
|
|
255
261
|
} else {
|
|
256
262
|
_scrollableOptions = nil;
|
|
@@ -234,7 +234,7 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
|
|
|
234
234
|
[self.delegate viewControllerDidPresentAtIndex:index position:self.currentPosition detent:detent];
|
|
235
235
|
[self.delegate viewControllerDidFocus];
|
|
236
236
|
|
|
237
|
-
[_grabberView updateAccessibilityValueWithIndex:index detentCount:_detents.count];
|
|
237
|
+
[self->_grabberView updateAccessibilityValueWithIndex:index detentCount:self->_detents.count];
|
|
238
238
|
[self emitChangePositionDelegateWithPosition:self.currentPosition realtime:NO debug:@"did present"];
|
|
239
239
|
});
|
|
240
240
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jovanni Lo (@lodev09)
|
|
3
|
+
// Copyright (c) 2024-present. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the MIT license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
|
+
|
|
11
|
+
#import <UIKit/UIKit.h>
|
|
12
|
+
|
|
13
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
14
|
+
|
|
15
|
+
@interface UIView (ScrollEdgeInteraction)
|
|
16
|
+
|
|
17
|
+
- (void)setupEdgeInteractionWithScrollView:(nullable UIScrollView *)scrollView
|
|
18
|
+
edge:(UIRectEdge)edge API_AVAILABLE(ios(26.0));
|
|
19
|
+
- (void)cleanupEdgeInteraction API_AVAILABLE(ios(26.0));
|
|
20
|
+
|
|
21
|
+
@end
|
|
22
|
+
|
|
23
|
+
NS_ASSUME_NONNULL_END
|
|
24
|
+
|
|
25
|
+
#endif
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Created by Jovanni Lo (@lodev09)
|
|
3
|
+
// Copyright (c) 2024-present. All rights reserved.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed under the MIT license found in the
|
|
6
|
+
// LICENSE file in the root directory of this source tree.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
#ifdef RCT_NEW_ARCH_ENABLED
|
|
10
|
+
|
|
11
|
+
#import <objc/runtime.h>
|
|
12
|
+
#import "UIView+ScrollEdgeInteraction.h"
|
|
13
|
+
|
|
14
|
+
static const void *kEdgeEffectHintKey = &kEdgeEffectHintKey;
|
|
15
|
+
|
|
16
|
+
@implementation UIView (ScrollEdgeInteraction)
|
|
17
|
+
|
|
18
|
+
- (void)cleanupEdgeInteraction API_AVAILABLE(ios(26.0)) {
|
|
19
|
+
for (id<UIInteraction> interaction in [self.interactions copy]) {
|
|
20
|
+
if ([interaction isKindOfClass:[UIScrollEdgeElementContainerInteraction class]]) {
|
|
21
|
+
[self removeInteraction:interaction];
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
UILabel *hint = objc_getAssociatedObject(self, kEdgeEffectHintKey);
|
|
27
|
+
[hint removeFromSuperview];
|
|
28
|
+
objc_setAssociatedObject(self, kEdgeEffectHintKey, nil, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
- (void)setupEdgeInteractionWithScrollView:(nullable UIScrollView *)scrollView
|
|
32
|
+
edge:(UIRectEdge)edge API_AVAILABLE(ios(26.0)) {
|
|
33
|
+
[self cleanupEdgeInteraction];
|
|
34
|
+
|
|
35
|
+
if (!scrollView) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// UIScrollEdgeElementContainerInteraction requires standard UIKit element
|
|
40
|
+
// descendants (UILabel, UIControl, etc.) to trigger the edge effect.
|
|
41
|
+
// RCTViewComponentView subviews are not recognized, so we add a
|
|
42
|
+
// non-visible UILabel as an element hint.
|
|
43
|
+
UILabel *hint = [[UILabel alloc] initWithFrame:self.bounds];
|
|
44
|
+
hint.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
|
45
|
+
hint.userInteractionEnabled = NO;
|
|
46
|
+
[self addSubview:hint];
|
|
47
|
+
objc_setAssociatedObject(self, kEdgeEffectHintKey, hint, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
|
48
|
+
|
|
49
|
+
UIScrollEdgeElementContainerInteraction *interaction = [[UIScrollEdgeElementContainerInteraction alloc] init];
|
|
50
|
+
interaction.scrollView = scrollView;
|
|
51
|
+
interaction.edge = edge;
|
|
52
|
+
[self addInteraction:interaction];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@end
|
|
56
|
+
|
|
57
|
+
#endif
|
|
@@ -21,9 +21,13 @@ type BlurOptionsType = Readonly<{
|
|
|
21
21
|
interaction?: WithDefault<boolean, true>;
|
|
22
22
|
}>;
|
|
23
23
|
|
|
24
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
25
|
+
|
|
24
26
|
type ScrollableOptionsType = Readonly<{
|
|
25
27
|
keyboardScrollOffset?: WithDefault<Double, 0>;
|
|
26
28
|
scrollingExpandsSheet?: WithDefault<boolean, true>;
|
|
29
|
+
topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
30
|
+
bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
27
31
|
}>;
|
|
28
32
|
|
|
29
33
|
export interface DetentInfoEventPayload {
|
|
@@ -77,6 +77,13 @@ export interface GrabberOptions {
|
|
|
77
77
|
*/
|
|
78
78
|
adaptive?: boolean;
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Scroll edge effect style for iOS 26+.
|
|
82
|
+
* Controls the blur/gradient overlay applied to scroll view edges.
|
|
83
|
+
*
|
|
84
|
+
* @platform ios 26+
|
|
85
|
+
*/
|
|
86
|
+
export type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
80
87
|
/**
|
|
81
88
|
* Options for scrollable behavior.
|
|
82
89
|
*/
|
|
@@ -94,6 +101,20 @@ export interface ScrollableOptions {
|
|
|
94
101
|
* @default true
|
|
95
102
|
*/
|
|
96
103
|
scrollingExpandsSheet?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* The scroll edge effect applied to the top edge of the scroll view.
|
|
106
|
+
*
|
|
107
|
+
* @platform ios 26+
|
|
108
|
+
* @default 'hidden'
|
|
109
|
+
*/
|
|
110
|
+
topScrollEdgeEffect?: ScrollEdgeEffect;
|
|
111
|
+
/**
|
|
112
|
+
* The scroll edge effect applied to the bottom edge of the scroll view.
|
|
113
|
+
*
|
|
114
|
+
* @platform ios 26+
|
|
115
|
+
* @default 'hidden'
|
|
116
|
+
*/
|
|
117
|
+
bottomScrollEdgeEffect?: ScrollEdgeEffect;
|
|
97
118
|
}
|
|
98
119
|
/**
|
|
99
120
|
* Options for customizing the blur effect.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheet.types.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA2B,SAAQ,sBAAsB;IACxE;;;OAGG;IACH,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,UAAU,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACpD,MAAM,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC7E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC5E,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC3E,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAC1D,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAC1E,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,sBAAsB,CA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K,IAAI,CAAC;IAE9C;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAEhD;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAE1C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAExD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAE9C;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAE5C;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAE1C;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;CACpC"}
|
|
@@ -12,9 +12,12 @@ type BlurOptionsType = Readonly<{
|
|
|
12
12
|
intensity?: WithDefault<Double, -1>;
|
|
13
13
|
interaction?: WithDefault<boolean, true>;
|
|
14
14
|
}>;
|
|
15
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
15
16
|
type ScrollableOptionsType = Readonly<{
|
|
16
17
|
keyboardScrollOffset?: WithDefault<Double, 0>;
|
|
17
18
|
scrollingExpandsSheet?: WithDefault<boolean, true>;
|
|
19
|
+
topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
20
|
+
bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
18
21
|
}>;
|
|
19
22
|
export interface DetentInfoEventPayload {
|
|
20
23
|
index: Int32;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAGnD,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;CACvC,CAAC,CAAC;AAEH,KAAK,eAAe,GAAG,QAAQ,CAAC;IAC9B,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;CAC1C,CAAC,CAAC;AAEH,KAAK,qBAAqB,GAAG,QAAQ,CAAC;IACpC,oBAAoB,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC9C,qBAAqB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,WAAW,EAC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AAC,CAAC;IACtC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;CACzE;;AAED,wBAEG"}
|
package/package.json
CHANGED
package/src/TrueSheet.types.ts
CHANGED
|
@@ -88,6 +88,14 @@ export interface GrabberOptions {
|
|
|
88
88
|
adaptive?: boolean;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Scroll edge effect style for iOS 26+.
|
|
93
|
+
* Controls the blur/gradient overlay applied to scroll view edges.
|
|
94
|
+
*
|
|
95
|
+
* @platform ios 26+
|
|
96
|
+
*/
|
|
97
|
+
export type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
98
|
+
|
|
91
99
|
/**
|
|
92
100
|
* Options for scrollable behavior.
|
|
93
101
|
*/
|
|
@@ -106,6 +114,22 @@ export interface ScrollableOptions {
|
|
|
106
114
|
* @default true
|
|
107
115
|
*/
|
|
108
116
|
scrollingExpandsSheet?: boolean;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* The scroll edge effect applied to the top edge of the scroll view.
|
|
120
|
+
*
|
|
121
|
+
* @platform ios 26+
|
|
122
|
+
* @default 'hidden'
|
|
123
|
+
*/
|
|
124
|
+
topScrollEdgeEffect?: ScrollEdgeEffect;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The scroll edge effect applied to the bottom edge of the scroll view.
|
|
128
|
+
*
|
|
129
|
+
* @platform ios 26+
|
|
130
|
+
* @default 'hidden'
|
|
131
|
+
*/
|
|
132
|
+
bottomScrollEdgeEffect?: ScrollEdgeEffect;
|
|
109
133
|
}
|
|
110
134
|
|
|
111
135
|
/**
|
|
@@ -21,9 +21,13 @@ type BlurOptionsType = Readonly<{
|
|
|
21
21
|
interaction?: WithDefault<boolean, true>;
|
|
22
22
|
}>;
|
|
23
23
|
|
|
24
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
25
|
+
|
|
24
26
|
type ScrollableOptionsType = Readonly<{
|
|
25
27
|
keyboardScrollOffset?: WithDefault<Double, 0>;
|
|
26
28
|
scrollingExpandsSheet?: WithDefault<boolean, true>;
|
|
29
|
+
topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
30
|
+
bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
27
31
|
}>;
|
|
28
32
|
|
|
29
33
|
export interface DetentInfoEventPayload {
|