@lodev09/react-native-true-sheet 3.0.0-beta.1 → 3.0.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/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  The true native bottom sheet experience for your React Native Apps. 💩
7
7
 
8
- <img alt="React Native True Sheet - IOS" src="docs/static/img/preview.gif" width="300" height="600" /><img alt="React Native True Sheet - Android" src="docs/static/img/preview-2.gif" width="300" height="600" />
8
+ <img alt="React Native True Sheet - IOS" src="docs/static/img/preview-ios.gif" width="300" height="600" /><img alt="React Native True Sheet - Android" src="docs/static/img/preview-android.gif" width="300" height="600" />
9
9
 
10
10
  ## Features
11
11
 
@@ -19,7 +19,7 @@ The true native bottom sheet experience for your React Native Apps. 💩
19
19
 
20
20
  > [!IMPORTANT]
21
21
  > **Version 3.0+ requires React Native's New Architecture (Fabric)**
22
- > For the old architecture, use version 2.x. See the [Migration Guide (v2 → v3)](https://sheet.lodev09.com/migration) for upgrading.
22
+ > For the old architecture, use version 2.x. See the [Migration Guide](https://sheet.lodev09.com/migration) for upgrading.
23
23
 
24
24
  ### Prerequisites
25
25
 
@@ -31,27 +31,13 @@ The true native bottom sheet experience for your React Native Apps. 💩
31
31
  ```sh
32
32
  yarn add @lodev09/react-native-true-sheet
33
33
  ```
34
- ```sh
35
- npm i @lodev09/react-native-true-sheet
36
- ```
37
-
38
- ### iOS Setup
39
-
40
- ```sh
41
- cd ios && pod install
42
- ```
43
-
44
- > **Note:** If you need old architecture support, use version 2.x:
45
- > ```sh
46
- > yarn add @lodev09/react-native-true-sheet@^2.0.0
47
- > ```
48
34
 
49
35
  ## Documentation
50
36
 
51
37
  - [Example](example)
52
38
  - [Guides](https://sheet.lodev09.com/category/guides)
53
39
  - [Reference](https://sheet.lodev09.com/category/reference)
54
- - [Migration Guide (v2 → v3)](https://sheet.lodev09.com/migration)
40
+ - [Migrating to v3](https://sheet.lodev09.com/migration)
55
41
  - [Troubleshooting](https://sheet.lodev09.com/troubleshooting)
56
42
  - [Testing with Jest](https://sheet.lodev09.com/guides/jest)
57
43
 
@@ -286,9 +286,9 @@ class TrueSheetView(private val reactContext: ThemedReactContext) :
286
286
  }
287
287
  }
288
288
 
289
- fun setDimmedIndex(index: Int) {
290
- if (viewController.dimmedIndex == index) return
291
- viewController.dimmedIndex = index
289
+ fun setDimmedDetentIndex(index: Int) {
290
+ if (viewController.dimmedDetentIndex == index) return
291
+ viewController.dimmedDetentIndex = index
292
292
  if (viewController.isPresented) {
293
293
  viewController.setupDimmedBackground(viewController.currentDetentIndex)
294
294
  }
@@ -167,7 +167,7 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
167
167
  * The detent index that the sheet should start to dim the background.
168
168
  * This is ignored if `dimmed` is set to `false`.
169
169
  */
170
- var dimmedIndex = 0
170
+ var dimmedDetentIndex = 0
171
171
 
172
172
  /**
173
173
  * The maximum window height
@@ -505,14 +505,14 @@ class TrueSheetViewController(private val reactContext: ThemedReactContext) :
505
505
 
506
506
  /**
507
507
  * Setup dimmed sheet.
508
- * `dimmedIndex` will further customize the dimming behavior.
508
+ * `dimmedDetentIndex` will further customize the dimming behavior.
509
509
  */
510
510
  fun setupDimmedBackground(detentIndex: Int) {
511
511
  val dialog = this.dialog ?: return
512
512
  dialog.window?.apply {
513
513
  val view = findViewById<View>(com.google.android.material.R.id.touch_outside)
514
514
 
515
- if (dimmed && detentIndex >= dimmedIndex) {
515
+ if (dimmed && detentIndex >= dimmedDetentIndex) {
516
516
  // Remove touch listener
517
517
  view.setOnTouchListener(null)
518
518
 
@@ -112,9 +112,9 @@ class TrueSheetViewManager :
112
112
  view.setDimmed(dimmed)
113
113
  }
114
114
 
115
- @ReactProp(name = "dimmedIndex", defaultInt = 0)
116
- override fun setDimmedIndex(view: TrueSheetView, index: Int) {
117
- view.setDimmedIndex(index)
115
+ @ReactProp(name = "dimmedDetentIndex", defaultInt = 0)
116
+ override fun setDimmedDetentIndex(view: TrueSheetView, index: Int) {
117
+ view.setDimmedDetentIndex(index)
118
118
  }
119
119
 
120
120
  @ReactProp(name = "initialDetentIndex", defaultInt = -1)
@@ -40,6 +40,11 @@ NS_ASSUME_NONNULL_BEGIN
40
40
  */
41
41
  - (void)layoutFooter;
42
42
 
43
+ /**
44
+ * setup ScrollView pinning
45
+ */
46
+ - (void)setupContentScrollViewPinning:(BOOL)pinned;
47
+
43
48
  @end
44
49
 
45
50
  NS_ASSUME_NONNULL_END
@@ -62,6 +62,13 @@ using namespace facebook::react;
62
62
  }
63
63
  }
64
64
 
65
+ - (void)setupContentScrollViewPinning:(BOOL)pinned {
66
+ if (_contentView) {
67
+ NSLog(@"setting up scrollview pinning: %i", pinned);
68
+ [_contentView setupScrollViewPinning:pinned];
69
+ }
70
+ }
71
+
65
72
  - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index {
66
73
  [super mountChildComponentView:childComponentView index:index];
67
74
 
@@ -30,6 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
30
30
 
31
31
  - (RCTScrollViewComponentView *_Nullable)findScrollView;
32
32
 
33
+ /**
34
+ * setup ScrollView pinning
35
+ */
36
+ - (void)setupScrollViewPinning:(BOOL)pinned;
37
+
33
38
  @end
34
39
 
35
40
  NS_ASSUME_NONNULL_END
@@ -53,50 +53,109 @@ using namespace facebook::react;
53
53
  }
54
54
  }
55
55
 
56
- - (void)didMoveToSuperview {
57
- [super didMoveToSuperview];
58
-
59
- // Setup scroll view pinning after Fabric mounts the view in container
60
- // Ensures proper view hierarchy for scroll detection and pinning
61
- if (self.superview) {
62
- [self setupScrollViewPinning];
56
+ //- (void)didMoveToSuperview {
57
+ // [super didMoveToSuperview];
58
+ //
59
+ // // Setup scroll view pinning after Fabric mounts the view in container
60
+ // // Ensures proper view hierarchy for scroll detection and pinning
61
+ // if (self.superview) {
62
+ // NSLog(@"content has attached");
63
+ //// [self setupScrollViewPinning];
64
+ // }
65
+ //}
66
+
67
+ - (void)unpinScrollView {
68
+ // Unpin previous scroll view if exists
69
+ if (_pinnedScrollView) {
70
+ [LayoutUtil unpinView:_pinnedScrollView];
63
71
  }
64
72
  }
65
73
 
66
- - (void)setupScrollViewPinning {
74
+ - (void)setupScrollViewPinning:(BOOL)pinned {
75
+ if (!pinned) {
76
+ [self unpinScrollView];
77
+ return;
78
+ }
79
+
67
80
  // Auto-detect and pin scroll views for proper sheet scrolling behavior
68
81
  // Pinning ensures ScrollView fills the sheet area and scrolls correctly with the sheet
69
- RCTScrollViewComponentView *scrollView = [self findScrollView];
82
+ UIView *topSibling = nil;
83
+ RCTScrollViewComponentView *scrollView = [self findScrollView:&topSibling];
70
84
 
71
85
  if (scrollView && scrollView != _pinnedScrollView) {
72
- // Unpin previous scroll view if exists
73
- if (_pinnedScrollView) {
74
- [LayoutUtil unpinView:_pinnedScrollView];
75
- }
86
+ [self unpinScrollView];
76
87
 
77
88
  // Pin to container view to enable proper scrolling within the sheet
78
89
  UIView *containerView = self.superview;
79
90
  if (containerView) {
80
- [LayoutUtil pinView:scrollView toParentView:containerView edges:UIRectEdgeAll];
91
+ if (topSibling) {
92
+ // Pin ScrollView below the top sibling
93
+ [LayoutUtil pinView:scrollView
94
+ toParentView:containerView
95
+ withTopView:topSibling
96
+ edges:UIRectEdgeLeft | UIRectEdgeRight | UIRectEdgeBottom];
97
+ } else {
98
+ // No top sibling, pin to all edges of container (original behavior)
99
+ [LayoutUtil pinView:scrollView toParentView:containerView edges:UIRectEdgeAll];
100
+ }
101
+
81
102
  _pinnedScrollView = scrollView;
82
103
  }
83
104
  }
84
105
  }
85
106
 
86
107
  - (RCTScrollViewComponentView *)findScrollView {
87
- // Get the React component's root view
108
+ return [self findScrollView:nil];
109
+ }
110
+
111
+ - (RCTScrollViewComponentView *)findScrollView:(UIView **)outTopSibling {
88
112
  if (self.subviews.count == 0) {
89
113
  return nil;
90
114
  }
91
115
 
116
+ RCTScrollViewComponentView *scrollView = nil;
117
+ UIView *topSibling = nil;
118
+
92
119
  // Check first-level children for scroll views (ScrollView or FlatList)
93
120
  for (UIView *subview in self.subviews) {
94
121
  if ([subview isKindOfClass:RCTScrollViewComponentView.class]) {
95
- return static_cast<RCTScrollViewComponentView *>(subview);
122
+ scrollView = static_cast<RCTScrollViewComponentView *>(subview);
123
+
124
+ // Find the view positioned directly above this ScrollView by frame position
125
+ if (self.subviews.count > 1) {
126
+ CGFloat scrollViewTop = CGRectGetMinY(scrollView.frame);
127
+ CGFloat closestDistance = CGFLOAT_MAX;
128
+
129
+ for (UIView *sibling in self.subviews) {
130
+ // Skip the ScrollView itself
131
+ if (sibling == scrollView) {
132
+ continue;
133
+ }
134
+
135
+ CGFloat siblingBottom = CGRectGetMaxY(sibling.frame);
136
+
137
+ // Check if this sibling is positioned above the ScrollView
138
+ if (siblingBottom <= scrollViewTop) {
139
+ CGFloat distance = scrollViewTop - siblingBottom;
140
+
141
+ // Find the closest view above (smallest distance)
142
+ if (distance < closestDistance) {
143
+ closestDistance = distance;
144
+ topSibling = sibling;
145
+ }
146
+ }
147
+ }
148
+ }
149
+
150
+ break; // Found ScrollView, no need to continue
96
151
  }
97
152
  }
98
153
 
99
- return nil;
154
+ if (outTopSibling) {
155
+ *outTopSibling = topSibling;
156
+ }
157
+
158
+ return scrollView;
100
159
  }
101
160
 
102
161
  - (void)prepareForRecycle {
@@ -48,6 +48,7 @@ using namespace facebook::react;
48
48
  TrueSheetViewController *_controller;
49
49
  RCTSurfaceTouchHandler *_touchHandler;
50
50
  NSInteger _initialDetentIndex;
51
+ BOOL _fitScrollView;
51
52
  BOOL _initialDetentAnimated;
52
53
  }
53
54
 
@@ -67,6 +68,7 @@ using namespace facebook::react;
67
68
 
68
69
  _initialDetentIndex = -1;
69
70
  _initialDetentAnimated = YES;
71
+ _fitScrollView = NO;
70
72
  }
71
73
  return self;
72
74
  }
@@ -189,9 +191,12 @@ using namespace facebook::react;
189
191
 
190
192
  _controller.detents = detents;
191
193
 
192
- // Update background color - always set it, even if 0 (which could be a valid color like black)
193
- UIColor *color = RCTUIColorFromSharedColor(SharedColor(newProps.background));
194
- _controller.backgroundColor = color;
194
+ if (newProps.background == 0) {
195
+ _controller.backgroundColor = nil;
196
+ } else {
197
+ UIColor *color = RCTUIColorFromSharedColor(SharedColor(newProps.background));
198
+ _controller.backgroundColor = color;
199
+ }
195
200
 
196
201
  // Update blur tint - always set it to clear when removed
197
202
  _controller.blurTint = !newProps.blurTint.empty() ? RCTNSStringFromString(newProps.blurTint) : nil;
@@ -217,14 +222,17 @@ using namespace facebook::react;
217
222
  // Update dimmed
218
223
  _controller.dimmed = newProps.dimmed;
219
224
 
220
- // Update dimmedIndex
221
- if (newProps.dimmedIndex >= 0) {
222
- _controller.dimmedIndex = @(newProps.dimmedIndex);
225
+ // Update dimmedDetentIndex
226
+ if (newProps.dimmedDetentIndex >= 0) {
227
+ _controller.dimmedDetentIndex = @(newProps.dimmedDetentIndex);
223
228
  }
224
229
 
225
230
  // Store initial presentation settings
226
231
  _initialDetentIndex = newProps.initialDetentIndex;
227
232
  _initialDetentAnimated = newProps.initialDetentAnimated;
233
+
234
+ // Store ScrollView fit prop
235
+ _fitScrollView = newProps.fitScrollView;
228
236
  }
229
237
 
230
238
  - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask {
@@ -232,9 +240,18 @@ using namespace facebook::react;
232
240
 
233
241
  // Apply controller updates after all props and children are updated
234
242
  if (updateMask & RNComponentViewUpdateMaskProps) {
243
+ if (!_controller)
244
+ return;
245
+
246
+ // Update ScrollView Pinning
247
+ if (_containerView) {
248
+ [_containerView setupContentScrollViewPinning:_fitScrollView];
249
+ }
250
+
235
251
  // Apply changes to presented sheet if needed
236
252
  if (_controller.isPresented) {
237
253
  [_controller.sheetPresentationController animateChanges:^{
254
+ [self->_controller setupSheetProps];
238
255
  [self->_controller setupSheetDetents];
239
256
  [self->_controller applyActiveDetent];
240
257
  }];
@@ -278,6 +295,9 @@ using namespace facebook::react;
278
295
  _controller.contentHeight = @(contentHeight);
279
296
  }
280
297
 
298
+ // Update fitScrollView setting on container
299
+ [_containerView setupContentScrollViewPinning:_fitScrollView];
300
+
281
301
  // Emit onMount event when container is mounted
282
302
  [OnMountEvent emit:_eventEmitter];
283
303
  }
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
45
45
  @property (nonatomic, strong, nullable) NSNumber *cornerRadius;
46
46
  @property (nonatomic, assign) BOOL grabber;
47
47
  @property (nonatomic, assign) BOOL dimmed;
48
- @property (nonatomic, strong, nullable) NSNumber *dimmedIndex;
48
+ @property (nonatomic, strong, nullable) NSNumber *dimmedDetentIndex;
49
49
  @property (nonatomic, copy, nullable) NSString *blurTint;
50
50
  @property (nonatomic, assign) BOOL layoutTransitioning;
51
51
  @property (nonatomic, assign) BOOL isPresented;
@@ -21,7 +21,6 @@
21
21
  @implementation TrueSheetViewController {
22
22
  CGFloat _lastPosition;
23
23
  CGFloat _lastTransitionPosition;
24
- UIVisualEffectView *_backgroundView;
25
24
  CGFloat _bottomInset;
26
25
  BOOL _isTransitioning;
27
26
  BOOL _isDragging;
@@ -36,7 +35,7 @@
36
35
  _contentHeight = @(0);
37
36
  _grabber = YES;
38
37
  _dimmed = YES;
39
- _dimmedIndex = @(0);
38
+ _dimmedDetentIndex = @(0);
40
39
  _lastPosition = 0;
41
40
  _lastTransitionPosition = 0;
42
41
  _isTransitioning = NO;
@@ -46,9 +45,6 @@
46
45
  _isPresented = NO;
47
46
  _activeDetentIndex = -1;
48
47
 
49
- _backgroundView = [[UIVisualEffectView alloc] init];
50
- _backgroundView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
51
-
52
48
  // Initialize fake transition view for tracking position during animations
53
49
  _fakeTransitionView = [[UIView alloc] init];
54
50
  _fakeTransitionView.hidden = YES;
@@ -93,8 +89,6 @@
93
89
  [super viewDidLoad];
94
90
 
95
91
  self.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
96
- _backgroundView.frame = self.view.bounds;
97
- [self.view insertSubview:self->_backgroundView atIndex:0];
98
92
  }
99
93
 
100
94
  - (void)viewWillAppear:(BOOL)animated {
@@ -426,14 +420,14 @@
426
420
  sheet.detents = detents;
427
421
 
428
422
  // Setup dimmed background
429
- if (self.dimmed && [self.dimmedIndex integerValue] == 0) {
423
+ if (self.dimmed && [self.dimmedDetentIndex integerValue] == 0) {
430
424
  sheet.largestUndimmedDetentIdentifier = nil;
431
425
  } else {
432
426
  sheet.largestUndimmedDetentIdentifier = UISheetPresentationControllerDetentIdentifierLarge;
433
427
 
434
428
  if (@available(iOS 16.0, *)) {
435
- if (self.dimmed && self.dimmedIndex) {
436
- NSInteger dimmedIdx = [self.dimmedIndex integerValue];
429
+ if (self.dimmed && self.dimmedDetentIndex) {
430
+ NSInteger dimmedIdx = [self.dimmedDetentIndex integerValue];
437
431
  if (dimmedIdx > 0 && dimmedIdx - 1 < sheet.detents.count) {
438
432
  sheet.largestUndimmedDetentIdentifier = sheet.detents[dimmedIdx - 1].identifier;
439
433
  } else if (sheet.detents.lastObject) {
@@ -462,8 +456,8 @@
462
456
  resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> context) {
463
457
  CGFloat maxDetentValue = context.maximumDetentValue;
464
458
  CGFloat maxValue =
465
- self.maxHeight ? MIN(maxDetentValue, [self.maxHeight floatValue]) : maxDetentValue;
466
- CGFloat resolvedValue = MIN(height, maxValue);
459
+ self.maxHeight ? fmin(maxDetentValue, [self.maxHeight floatValue]) : maxDetentValue;
460
+ CGFloat resolvedValue = fmin(height, maxValue);
467
461
  return resolvedValue;
468
462
  }];
469
463
  } else {
@@ -481,15 +475,24 @@
481
475
  NSString *detentId = [NSString stringWithFormat:@"custom-%f", value];
482
476
 
483
477
  if (@available(iOS 16.0, *)) {
484
- return [UISheetPresentationControllerDetent
485
- customDetentWithIdentifier:detentId
486
- resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> context) {
487
- CGFloat maxDetentValue = context.maximumDetentValue;
488
- CGFloat maxValue =
489
- self.maxHeight ? MIN(maxDetentValue, [self.maxHeight floatValue]) : maxDetentValue;
490
- CGFloat resolvedValue = MIN(value * maxDetentValue, maxValue);
491
- return resolvedValue;
492
- }];
478
+ // Use exact comparison for common values
479
+ if (value == 1.0) {
480
+ return [UISheetPresentationControllerDetent largeDetent];
481
+ } else if (value == 0.5) {
482
+ return [UISheetPresentationControllerDetent mediumDetent];
483
+ } else {
484
+ return [UISheetPresentationControllerDetent
485
+ customDetentWithIdentifier:detentId
486
+ resolver:^CGFloat(id<UISheetPresentationControllerDetentResolutionContext> context) {
487
+ CGFloat maxDetentValue = context.maximumDetentValue;
488
+ CGFloat maxValue =
489
+ self.maxHeight ? fmin(maxDetentValue, [self.maxHeight floatValue]) : maxDetentValue;
490
+ CGFloat resolvedValue = fmin(value * maxDetentValue, maxValue);
491
+ return resolvedValue;
492
+ }];
493
+ }
494
+ } else if (value >= 0.5) {
495
+ return [UISheetPresentationControllerDetent largeDetent];
493
496
  } else {
494
497
  return [UISheetPresentationControllerDetent mediumDetent];
495
498
  }
@@ -612,8 +615,12 @@
612
615
  // Only set preferredCornerRadius if explicitly provided, otherwise use system default
613
616
  if (self.cornerRadius) {
614
617
  sheet.preferredCornerRadius = [self.cornerRadius floatValue];
618
+ } else {
619
+ sheet.preferredCornerRadius = UISheetPresentationControllerAutomaticDimension;
615
620
  }
616
621
 
622
+ self.view.backgroundColor = self.backgroundColor;
623
+
617
624
  // Setup blur effect if blurTint is provided
618
625
  if (self.blurTint && self.blurTint.length > 0) {
619
626
  UIBlurEffectStyle style = UIBlurEffectStyleLight;
@@ -640,12 +647,20 @@
640
647
  style = UIBlurEffectStyleSystemUltraThinMaterial;
641
648
  }
642
649
 
643
- _backgroundView.effect = [UIBlurEffect effectWithStyle:style];
644
- _backgroundView.backgroundColor = nil;
650
+ // Create a blur effect view and set it as the background
651
+ UIVisualEffectView *blurView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:style]];
652
+ blurView.frame = self.view.bounds;
653
+ blurView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
654
+
655
+ // Insert blur view at the bottom
656
+ [self.view insertSubview:blurView atIndex:0];
645
657
  } else {
646
- // No blur effect, use solid background color
647
- _backgroundView.effect = nil;
648
- _backgroundView.backgroundColor = self.backgroundColor;
658
+ // Remove any blur views
659
+ for (UIView *subview in self.view.subviews) {
660
+ if ([subview isKindOfClass:[UIVisualEffectView class]]) {
661
+ [subview removeFromSuperview];
662
+ }
663
+ }
649
664
  }
650
665
  }
651
666
 
@@ -667,6 +682,13 @@
667
682
  // when presenting a React Navigation modal
668
683
  return NO;
669
684
  }
685
+
686
+ - (UIViewController *)newPresentingViewController {
687
+ // Return the content view controller as the presenting controller
688
+ // This allows react-native-screens to present modals on top of the sheet's content
689
+ // instead of trying to present on top of the sheet itself
690
+ return self;
691
+ }
670
692
  #endif
671
693
 
672
694
  @end
@@ -31,6 +31,15 @@ NS_ASSUME_NONNULL_BEGIN
31
31
  */
32
32
  + (void)pinView:(UIView *)view toParentView:(UIView *)parentView edges:(UIRectEdge)edges height:(CGFloat)height;
33
33
 
34
+ /**
35
+ * Pins a view to its parent view with its top edge anchored below a top sibling view
36
+ * @param view The view to pin
37
+ * @param parentView The parent view to pin to
38
+ * @param topView The view to position below (top sibling)
39
+ * @param edges The edges to pin to parent (excluding top, which is pinned to topView)
40
+ */
41
+ + (void)pinView:(UIView *)view toParentView:(UIView *)parentView withTopView:(UIView *)topView edges:(UIRectEdge)edges;
42
+
34
43
  /**
35
44
  * Unpins a view by removing its constraints and re-enabling autoresizing mask translation
36
45
  * @param view The view to unpin
@@ -38,6 +38,24 @@
38
38
  }
39
39
  }
40
40
 
41
+ + (void)pinView:(UIView *)view toParentView:(UIView *)parentView withTopView:(UIView *)topView edges:(UIRectEdge)edges {
42
+ view.translatesAutoresizingMaskIntoConstraints = NO;
43
+
44
+ // Pin top edge to bottom of top sibling
45
+ [view.topAnchor constraintEqualToAnchor:topView.bottomAnchor].active = YES;
46
+
47
+ // Pin other edges to parent based on edges parameter
48
+ if (edges & UIRectEdgeBottom) {
49
+ [view.bottomAnchor constraintEqualToAnchor:parentView.bottomAnchor].active = YES;
50
+ }
51
+ if (edges & UIRectEdgeLeft) {
52
+ [view.leadingAnchor constraintEqualToAnchor:parentView.leadingAnchor].active = YES;
53
+ }
54
+ if (edges & UIRectEdgeRight) {
55
+ [view.trailingAnchor constraintEqualToAnchor:parentView.trailingAnchor].active = YES;
56
+ }
57
+ }
58
+
41
59
  + (void)unpinView:(UIView *)view {
42
60
  if (!view)
43
61
  return;
@@ -259,18 +259,19 @@ export class TrueSheet extends PureComponent {
259
259
  render() {
260
260
  const {
261
261
  detents = [0.5, 1],
262
- backgroundColor = 'white',
262
+ backgroundColor,
263
263
  dismissible = true,
264
264
  grabber = true,
265
265
  dimmed = true,
266
266
  initialDetentIndex = -1,
267
267
  initialDetentAnimated = true,
268
268
  keyboardMode = 'resize',
269
- dimmedIndex,
269
+ dimmedDetentIndex,
270
270
  blurTint,
271
271
  cornerRadius,
272
272
  maxHeight,
273
273
  edgeToEdgeFullScreen,
274
+ fitScrollView = false,
274
275
  children,
275
276
  style,
276
277
  footer,
@@ -296,13 +297,14 @@ export class TrueSheet extends PureComponent {
296
297
  cornerRadius: cornerRadius,
297
298
  grabber: grabber,
298
299
  dimmed: dimmed,
299
- dimmedIndex: dimmedIndex,
300
+ dimmedDetentIndex: dimmedDetentIndex,
300
301
  keyboardMode: keyboardMode,
301
302
  initialDetentIndex: initialDetentIndex,
302
303
  initialDetentAnimated: initialDetentAnimated,
303
304
  dismissible: dismissible,
304
305
  maxHeight: maxHeight,
305
306
  edgeToEdgeFullScreen: edgeToEdgeFullScreen,
307
+ fitScrollView: fitScrollView,
306
308
  onMount: this.onMount,
307
309
  onWillPresent: this.onWillPresent,
308
310
  onDidPresent: this.onDidPresent,
@@ -1 +1 @@
1
- {"version":3,"names":["PureComponent","createRef","isValidElement","createElement","TrueSheetViewNativeComponent","TrueSheetContainerViewNativeComponent","TrueSheetContentViewNativeComponent","TrueSheetFooterViewNativeComponent","TrueSheetModule","Platform","processColor","StyleSheet","findNodeHandle","jsx","_jsx","jsxs","_jsxs","LINKING_ERROR","select","ios","default","Error","TrueSheet","displayName","instances","presentationResolver","constructor","props","nativeRef","validateDetents","shouldRenderImmediately","initialDetentIndex","undefined","state","shouldRenderNativeView","containerWidth","containerHeight","onMount","bind","onWillDismiss","onDidDismiss","onWillPresent","onDidPresent","onDetentChange","onDragBegin","onDragChange","onDragEnd","onPositionChange","onSizeChange","detents","length","console","warn","forEach","detent","index","detentsLength","Math","min","getInstance","name","instance","handle","nodeHandle","current","present","dismiss","resize","registerInstance","unregisterInstance","event","setState","width","height","nativeEvent","Promise","resolve","presentByRef","dismissByRef","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","render","backgroundColor","dismissible","grabber","dimmed","initialDetentAnimated","keyboardMode","dimmedIndex","blurTint","cornerRadius","maxHeight","edgeToEdgeFullScreen","children","style","footer","testID","resolvedDetents","slice","map","ref","styles","sheetView","background","collapsable","create","position","zIndex","left","right"],"sourceRoot":"../../src","sources":["TrueSheet.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,SAAS,EAGTC,cAAc,EACdC,aAAa,QACR,OAAO;AAgBd,OAAOC,4BAA4B,MAAM,uCAAuC;AAChF,OAAOC,qCAAqC,MAAM,gDAAgD;AAClG,OAAOC,mCAAmC,MAAM,8CAA8C;AAC9F,OAAOC,kCAAkC,MAAM,6CAA6C;AAE5F,OAAOC,eAAe,MAAM,kCAA+B;AAE3D,SAASC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,EAAEC,cAAc,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElF,MAAMC,aAAa,GACjB,2FAA2F,GAC3FR,QAAQ,CAACS,MAAM,CAAC;EAAEC,G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ACpCC,WAAW,EAAE,IAAI,CAACA,WAAY;MAC9BC,YAAY,EAAE,IAAI,CAACA,YAAa;MAChCC,SAAS,EAAE,IAAI,CAACA,SAAU;MAC1BC,gBAAgB,EAAE,IAAI,CAACA,gBAAiB;MACxCC,YAAY,EAAE,IAAI,CAACA,YAAa;MAAA+C,QAAA,EAE/B,IAAI,CAAC9D,KAAK,CAACC,sBAAsB,iBAChClB,KAAA,CAACX,qCAAqC;QACpC6F,MAAM,EAAEA,MAAO;QACfF,KAAK,EAAE;UACLxB,KAAK,EAAE,IAAI,CAACvC,KAAK,CAACE,cAAc;UAChCsC,MAAM,EAAE,IAAI,CAACxC,KAAK,CAACG;QACrB,CAAE;QACFsE,WAAW,EAAE,KAAM;QAAAX,QAAA,gBAEnBjF,IAAA,CAACR,mCAAmC;UAAC0F,KAAK,EAAEA,KAAM;UAACU,WAAW,EAAE,KAAM;UAAAX,QAAA,EACnEA;QAAQ,CAC0B,CAAC,EACrCE,MAAM,iBACLnF,IAAA,CAACP,kCAAkC;UAACyF,KAAK,EAAEO,MAAM,CAACN,MAAO;UAACS,WAAW,EAAE,KAAM;UAAAX,QAAA,EAC1E,aAAA7F,cAAc,CAAC+F,MAAM,CAAC,GAAGA,MAAM,gBAAG9F,aAAa,CAAC8F,MAAM;QAAC,CACtB,CACrC;MAAA,CACoC;IACxC,CAC2B,CAAC;EAEnC;AACF;AAEA,MAAMM,MAAM,GAAG5F,UAAU,CAACgG,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,QAAQ,EAAE,UAAU;IACpBpC,KAAK,EAAE,MAAM;IACbqC,MAAM,EAAE,CAAC;EACX,CAAC;EACDZ,MAAM,EAAE;IACNW,QAAQ,EAAE,UAAU;IACpBE,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PureComponent","createRef","isValidElement","createElement","TrueSheetViewNativeComponent","TrueSheetContainerViewNativeComponent","TrueSheetContentViewNativeComponent","TrueSheetFooterViewNativeComponent","TrueSheetModule","Platform","processColor","StyleSheet","findNodeHandle","jsx","_jsx","jsxs","_jsxs","LINKING_ERROR","select","ios","default","Error","TrueSheet","displayName","instances","presentationResolver","constructor","props","nativeRef","validateDetents","shouldRenderImmediately","initialDetentIndex","undefined","state","shouldRenderNativeView","containerWidth","containerHeight","onMount","bind","onWillDismiss","onDidDismiss","onWillPresent","onDidPresent","onDetentChange","onDragBegin","onDragChange","onDragEnd","onPositionChange","onSizeChange","detents","length","console","warn","forEach","detent","index","detentsLength","Math","min","getInstance","name","instance","handle","nodeHandle","current","present","dismiss","resize","registerInstance","unregisterInstance","event","setState","width","height","nativeEvent","Promise","resolve","presentByRef","dismissByRef","componentDidMount","componentDidUpdate","prevProps","componentWillUnmount","render","backgroundColor","dismissible","grabber","dimmed","initialDetentAnimated","keyboardMode","dimmedDetentIndex","blurTint","cornerRadius","maxHeight","edgeToEdgeFullScreen","fitScrollView","children","style","footer","testID","resolvedDetents","slice","map","ref","styles","sheetView","background","collapsable","create","position","zIndex","left","right"],"sourceRoot":"../../src","sources":["TrueSheet.tsx"],"mappings":";;AAAA,SACEA,aAAa,EAEbC,SAAS,EAGTC,cAAc,EACdC,aAAa,QACR,OAAO;AAgBd,OAAOC,4BAA4B,MAAM,uCAAuC;AAChF,OAAOC,qCAAqC,MAAM,gDAAgD;AAClG,OAAOC,mCAAmC,MAAM,8CAA8C;AAC9F,OAAOC,kCAAkC,MAAM,6CAA6C;AAE5F,OAAOC,eAAe,MAAM,kCAA+B;AAE3D,SAASC,QAAQ,EAAEC,YAAY,EAAEC,UAAU,EAAEC,cAAc,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElF,MAAMC,aAAa,GACjB,2FAA2F,GAC3FR,QAAQ,CAACS,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDA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IAAI,CAACA,WAAY;MAC9BC,YAAY,EAAE,IAAI,CAACA,YAAa;MAChCC,SAAS,EAAE,IAAI,CAACA,SAAU;MAC1BC,gBAAgB,EAAE,IAAI,CAACA,gBAAiB;MACxCC,YAAY,EAAE,IAAI,CAACA,YAAa;MAAAgD,QAAA,EAE/B,IAAI,CAAC/D,KAAK,CAACC,sBAAsB,iBAChClB,KAAA,CAACX,qCAAqC;QACpC8F,MAAM,EAAEA,MAAO;QACfF,KAAK,EAAE;UACLzB,KAAK,EAAE,IAAI,CAACvC,KAAK,CAACE,cAAc;UAChCsC,MAAM,EAAE,IAAI,CAACxC,KAAK,CAACG;QACrB,CAAE;QACFuE,WAAW,EAAE,KAAM;QAAAX,QAAA,gBAEnBlF,IAAA,CAACR,mCAAmC;UAAC2F,KAAK,EAAEA,KAAM;UAACU,WAAW,EAAE,KAAM;UAAAX,QAAA,EACnEA;QAAQ,CAC0B,CAAC,EACrCE,MAAM,iBACLpF,IAAA,CAACP,kCAAkC;UAAC0F,KAAK,EAAEO,MAAM,CAACN,MAAO;UAACS,WAAW,EAAE,KAAM;UAAAX,QAAA,EAC1E,aAAA9F,cAAc,CAACgG,MAAM,CAAC,GAAGA,MAAM,gBAAG/F,aAAa,CAAC+F,MAAM;QAAC,CACtB,CACrC;MAAA,CACoC;IACxC,CAC2B,CAAC;EAEnC;AACF;AAEA,MAAMM,MAAM,GAAG7F,UAAU,CAACiG,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,QAAQ,EAAE,UAAU;IACpBrC,KAAK,EAAE,MAAM;IACbsC,MAAM,EAAE,CAAC;EACX,CAAC;EACDZ,MAAM,EAAE;IACNW,QAAQ,EAAE,UAAU;IACpBE,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE;EACT;AACF,CAAC,CAAC","ignoreList":[]}
@@ -33,7 +33,7 @@ export interface NativeProps extends ViewProps {
33
33
  background?: WithDefault<Int32, 0>;
34
34
  cornerRadius?: WithDefault<Double, -1>;
35
35
  initialDetentIndex?: WithDefault<Int32, -1>;
36
- dimmedIndex?: WithDefault<Int32, 0>;
36
+ dimmedDetentIndex?: WithDefault<Int32, 0>;
37
37
 
38
38
  // String properties - use empty string as default to avoid nil insertion
39
39
  blurTint?: WithDefault<string, ''>;
@@ -45,6 +45,7 @@ export interface NativeProps extends ViewProps {
45
45
  dimmed?: WithDefault<boolean, true>;
46
46
  initialDetentAnimated?: WithDefault<boolean, true>;
47
47
  edgeToEdgeFullScreen?: WithDefault<boolean, false>;
48
+ fitScrollView?: WithDefault<boolean, false>;
48
49
 
49
50
  // Event handlers
50
51
  onMount?: DirectEventHandler<null>;
@@ -1 +1 @@
1
- {"version":3,"file":"TrueSheet.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EAGb,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EACV,cAAc,EAYf,MAAM,mBAAmB,CAAC;AAuB3B,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,qBAAa,SAAU,SAAQ,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;IAC1E,WAAW,SAAe;IAE1B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8B;IAExD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAqC;IAEtE;;OAEG;IACH,OAAO,CAAC,oBAAoB,CAA6B;gBAE7C,KAAK,EAAE,cAAc;IA8BjC,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,MAAM,CAAC,WAAW;IAU1B,OAAO,KAAK,MAAM,GAOjB;IAED;;;;;;OAMG;WACiB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAS3E;;;;;OAKG;WAC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,EAAE,cAAc,GAAG,IAAI;IASnD,oBAAoB,IAAI,IAAI;IAO5B,MAAM,IAAI,SAAS;CAqFpB"}
@@ -49,9 +49,6 @@ export type SizeChangeEvent = NativeSyntheticEvent<SizeChangeEventPayload>;
49
49
  export type BlurTint = 'light' | 'dark' | 'default' | 'extraLight' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
50
50
  /**
51
51
  * Supported Sheet detent.
52
- *
53
- * @platform android
54
- * @platform ios 15+
55
52
  */
56
53
  export type SheetDetent =
57
54
  /**
@@ -102,8 +99,6 @@ export interface TrueSheetProps extends ViewProps {
102
99
  * Specify whether the sheet background is dimmed.
103
100
  * Set to `false` to allow interaction with the background components.
104
101
  *
105
- * @platform android
106
- * @platform ios 15+
107
102
  * @default true
108
103
  */
109
104
  dimmed?: boolean;
@@ -127,7 +122,7 @@ export interface TrueSheetProps extends ViewProps {
127
122
  *
128
123
  * @default 0
129
124
  */
130
- dimmedIndex?: number;
125
+ dimmedDetentIndex?: number;
131
126
  /**
132
127
  * Prevents interactive dismissal of the Sheet.
133
128
  *
@@ -136,8 +131,7 @@ export interface TrueSheetProps extends ViewProps {
136
131
  dismissible?: boolean;
137
132
  /**
138
133
  * Main sheet background color.
139
-
140
- * @default white
134
+ * Uses system default when not provided.
141
135
  */
142
136
  backgroundColor?: ColorValue;
143
137
  /**
@@ -146,9 +140,6 @@ export interface TrueSheetProps extends ViewProps {
146
140
  * - `undefined` (not provided): Uses system default corner radius
147
141
  * - `0`: Sharp corners (no rounding)
148
142
  * - `> 0`: Custom corner radius value
149
- *
150
- * @platform android
151
- * @platform ios 15+
152
143
  */
153
144
  cornerRadius?: number;
154
145
  /**
@@ -188,6 +179,15 @@ export interface TrueSheetProps extends ViewProps {
188
179
  * A component that floats at the bottom of the Sheet.
189
180
  */
190
181
  footer?: ComponentType<unknown> | ReactElement;
182
+ /**
183
+ * Automatically pins ScrollView or FlatList to fit within the sheet's available space.
184
+ * When enabled, the ScrollView's top edge will be pinned below any top sibling views,
185
+ * and its left, right, and bottom edges will be pinned to the container.
186
+ *
187
+ * @platform ios
188
+ * @default false
189
+ */
190
+ fitScrollView?: boolean;
191
191
  /**
192
192
  * Determines how the software keyboard will impact the layout of the sheet.
193
193
  * Set to `pan` if you're working with `FlatList` with a `TextInput`.
@@ -226,34 +226,22 @@ export interface TrueSheetProps extends ViewProps {
226
226
  /**
227
227
  * Called when the sheet has began dragging.
228
228
  * Comes with the detent info.
229
- *
230
- * @platform android
231
- * @platform ios 15+
232
229
  */
233
230
  onDragBegin?: (event: DragBeginEvent) => void;
234
231
  /**
235
232
  * Called when the sheet is being dragged.
236
233
  * Comes with the detent info.
237
- *
238
- * @platform android
239
- * @platform ios 15+
240
234
  */
241
235
  onDragChange?: (event: DragChangeEvent) => void;
242
236
  /**
243
237
  * Called when the sheet dragging has ended.
244
238
  * Comes with the detent info.
245
- *
246
- * @platform android
247
- * @platform ios 15+
248
239
  */
249
240
  onDragEnd?: (event: DragEndEvent) => void;
250
241
  /**
251
242
  * Called when the sheet's position changes.
252
243
  * This fires continuously during sheet position changes.
253
244
  * Comes with the detent info.
254
- *
255
- * @platform android
256
- * @platform ios 15+
257
245
  */
258
246
  onPositionChange?: (event: PositionChangeEvent) => void;
259
247
  }
@@ -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,EAAE,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAA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C,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAElD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAEhD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAElD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAEhD;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEpD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,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;CACzD"}
@@ -19,7 +19,7 @@ export interface NativeProps extends ViewProps {
19
19
  background?: WithDefault<Int32, 0>;
20
20
  cornerRadius?: WithDefault<Double, -1>;
21
21
  initialDetentIndex?: WithDefault<Int32, -1>;
22
- dimmedIndex?: WithDefault<Int32, 0>;
22
+ dimmedDetentIndex?: WithDefault<Int32, 0>;
23
23
  blurTint?: WithDefault<string, ''>;
24
24
  keyboardMode?: WithDefault<'resize' | 'pan', 'resize'>;
25
25
  grabber?: WithDefault<boolean, true>;
@@ -27,6 +27,7 @@ export interface NativeProps extends ViewProps {
27
27
  dimmed?: WithDefault<boolean, true>;
28
28
  initialDetentAnimated?: WithDefault<boolean, true>;
29
29
  edgeToEdgeFullScreen?: WithDefault<boolean, false>;
30
+ fitScrollView?: WithDefault<boolean, false>;
30
31
  onMount?: DirectEventHandler<null>;
31
32
  onWillPresent?: DirectEventHandler<DetentInfoEventPayload>;
32
33
  onDidPresent?: DirectEventHandler<DetentInfoEventPayload>;
@@ -1 +1 @@
1
- {"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,WAAW,EACX,KAAK,EACN,MAAM,2CAA2C,CAAC;AAGnD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,SAAS;IAE5C,OAAO,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;IAG/B,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,kBAAkB,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,WAAW,CAAC,EAAE,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAGpC,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,EA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IACpC,qBAAqB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACnD,oBAAoB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACnD,aAAa,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAG5C,OAAO,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC1D,aAAa,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;IAClE,YAAY,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;CAC3D;;AAED,wBAAoE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lodev09/react-native-true-sheet",
3
- "version": "3.0.0-beta.1",
3
+ "version": "3.0.0-beta.3",
4
4
  "description": "The true native bottom sheet experience for your React Native Apps.",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/module/index.js",
@@ -41,7 +41,8 @@
41
41
  "tidy": "yarn typecheck && yarn lint && yarn format && scripts/objc-lint.sh && scripts/ktlint.sh",
42
42
  "clean": "scripts/clean.sh",
43
43
  "prepare": "bob build",
44
- "release": "yarn tidy && release-it --only-version"
44
+ "release": "yarn tidy && release-it --only-version",
45
+ "release:beta": "yarn release --preRelease=beta"
45
46
  },
46
47
  "keywords": [
47
48
  "react-native",
package/src/TrueSheet.tsx CHANGED
@@ -328,18 +328,19 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
328
328
  render(): ReactNode {
329
329
  const {
330
330
  detents = [0.5, 1],
331
- backgroundColor = 'white',
331
+ backgroundColor,
332
332
  dismissible = true,
333
333
  grabber = true,
334
334
  dimmed = true,
335
335
  initialDetentIndex = -1,
336
336
  initialDetentAnimated = true,
337
337
  keyboardMode = 'resize',
338
- dimmedIndex,
338
+ dimmedDetentIndex,
339
339
  blurTint,
340
340
  cornerRadius,
341
341
  maxHeight,
342
342
  edgeToEdgeFullScreen,
343
+ fitScrollView = false,
343
344
  children,
344
345
  style,
345
346
  footer,
@@ -367,13 +368,14 @@ export class TrueSheet extends PureComponent<TrueSheetProps, TrueSheetState> {
367
368
  cornerRadius={cornerRadius}
368
369
  grabber={grabber}
369
370
  dimmed={dimmed}
370
- dimmedIndex={dimmedIndex}
371
+ dimmedDetentIndex={dimmedDetentIndex}
371
372
  keyboardMode={keyboardMode}
372
373
  initialDetentIndex={initialDetentIndex}
373
374
  initialDetentAnimated={initialDetentAnimated}
374
375
  dismissible={dismissible}
375
376
  maxHeight={maxHeight}
376
377
  edgeToEdgeFullScreen={edgeToEdgeFullScreen}
378
+ fitScrollView={fitScrollView}
377
379
  onMount={this.onMount}
378
380
  onWillPresent={this.onWillPresent}
379
381
  onDidPresent={this.onDidPresent}
@@ -78,9 +78,6 @@ export type BlurTint =
78
78
 
79
79
  /**
80
80
  * Supported Sheet detent.
81
- *
82
- * @platform android
83
- * @platform ios 15+
84
81
  */
85
82
  export type SheetDetent =
86
83
  /**
@@ -134,8 +131,6 @@ export interface TrueSheetProps extends ViewProps {
134
131
  * Specify whether the sheet background is dimmed.
135
132
  * Set to `false` to allow interaction with the background components.
136
133
  *
137
- * @platform android
138
- * @platform ios 15+
139
134
  * @default true
140
135
  */
141
136
  dimmed?: boolean;
@@ -162,7 +157,7 @@ export interface TrueSheetProps extends ViewProps {
162
157
  *
163
158
  * @default 0
164
159
  */
165
- dimmedIndex?: number;
160
+ dimmedDetentIndex?: number;
166
161
 
167
162
  /**
168
163
  * Prevents interactive dismissal of the Sheet.
@@ -173,8 +168,7 @@ export interface TrueSheetProps extends ViewProps {
173
168
 
174
169
  /**
175
170
  * Main sheet background color.
176
-
177
- * @default white
171
+ * Uses system default when not provided.
178
172
  */
179
173
  backgroundColor?: ColorValue;
180
174
 
@@ -184,9 +178,6 @@ export interface TrueSheetProps extends ViewProps {
184
178
  * - `undefined` (not provided): Uses system default corner radius
185
179
  * - `0`: Sharp corners (no rounding)
186
180
  * - `> 0`: Custom corner radius value
187
- *
188
- * @platform android
189
- * @platform ios 15+
190
181
  */
191
182
  cornerRadius?: number;
192
183
 
@@ -233,6 +224,16 @@ export interface TrueSheetProps extends ViewProps {
233
224
  */
234
225
  footer?: ComponentType<unknown> | ReactElement;
235
226
 
227
+ /**
228
+ * Automatically pins ScrollView or FlatList to fit within the sheet's available space.
229
+ * When enabled, the ScrollView's top edge will be pinned below any top sibling views,
230
+ * and its left, right, and bottom edges will be pinned to the container.
231
+ *
232
+ * @platform ios
233
+ * @default false
234
+ */
235
+ fitScrollView?: boolean;
236
+
236
237
  /**
237
238
  * Determines how the software keyboard will impact the layout of the sheet.
238
239
  * Set to `pan` if you're working with `FlatList` with a `TextInput`.
@@ -278,27 +279,18 @@ export interface TrueSheetProps extends ViewProps {
278
279
  /**
279
280
  * Called when the sheet has began dragging.
280
281
  * Comes with the detent info.
281
- *
282
- * @platform android
283
- * @platform ios 15+
284
282
  */
285
283
  onDragBegin?: (event: DragBeginEvent) => void;
286
284
 
287
285
  /**
288
286
  * Called when the sheet is being dragged.
289
287
  * Comes with the detent info.
290
- *
291
- * @platform android
292
- * @platform ios 15+
293
288
  */
294
289
  onDragChange?: (event: DragChangeEvent) => void;
295
290
 
296
291
  /**
297
292
  * Called when the sheet dragging has ended.
298
293
  * Comes with the detent info.
299
- *
300
- * @platform android
301
- * @platform ios 15+
302
294
  */
303
295
  onDragEnd?: (event: DragEndEvent) => void;
304
296
 
@@ -306,9 +298,6 @@ export interface TrueSheetProps extends ViewProps {
306
298
  * Called when the sheet's position changes.
307
299
  * This fires continuously during sheet position changes.
308
300
  * Comes with the detent info.
309
- *
310
- * @platform android
311
- * @platform ios 15+
312
301
  */
313
302
  onPositionChange?: (event: PositionChangeEvent) => void;
314
303
  }
@@ -33,7 +33,7 @@ export interface NativeProps extends ViewProps {
33
33
  background?: WithDefault<Int32, 0>;
34
34
  cornerRadius?: WithDefault<Double, -1>;
35
35
  initialDetentIndex?: WithDefault<Int32, -1>;
36
- dimmedIndex?: WithDefault<Int32, 0>;
36
+ dimmedDetentIndex?: WithDefault<Int32, 0>;
37
37
 
38
38
  // String properties - use empty string as default to avoid nil insertion
39
39
  blurTint?: WithDefault<string, ''>;
@@ -45,6 +45,7 @@ export interface NativeProps extends ViewProps {
45
45
  dimmed?: WithDefault<boolean, true>;
46
46
  initialDetentAnimated?: WithDefault<boolean, true>;
47
47
  edgeToEdgeFullScreen?: WithDefault<boolean, false>;
48
+ fitScrollView?: WithDefault<boolean, false>;
48
49
 
49
50
  // Event handlers
50
51
  onMount?: DirectEventHandler<null>;