@lodev09/react-native-true-sheet 3.10.0-beta.3 → 3.10.0

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
@@ -1,4 +1,4 @@
1
- # React Native True Sheet
1
+ # React Native TrueSheet
2
2
 
3
3
  [![CI](https://github.com/lodev09/react-native-true-sheet/actions/workflows/checks.yml/badge.svg)](https://github.com/lodev09/react-native-true-sheet/actions/workflows/checks.yml)
4
4
  [![NPM Downloads](https://img.shields.io/npm/d18m/%40lodev09%2Freact-native-true-sheet)](https://www.npmjs.com/package/@lodev09/react-native-true-sheet)
@@ -98,6 +98,16 @@ export const App = () => {
98
98
  }
99
99
  ```
100
100
 
101
+ ## AI Skills
102
+
103
+ Skills are reusable AI capabilities that give your AI coding agent knowledge about TrueSheet. With the right skill loaded, your agent can pick the right patterns, avoid common mistakes, and generate correct code without you having to explain the library every time.
104
+
105
+ ```sh
106
+ npx skills add lodev09/react-native-true-sheet
107
+ ```
108
+
109
+ This will install the **TrueSheet Usage** skill into your project.
110
+
101
111
  ## That map is awesome!
102
112
 
103
113
  Yes it is! Checkout [`@lugg/maps`](https://github.com/lugg/maps), a universal maps library for React Native that I'm developing at [Lugg](https://lugg.com).
@@ -10,6 +10,7 @@
10
10
 
11
11
  #import <React/RCTViewComponentView.h>
12
12
  #import <UIKit/UIKit.h>
13
+ #import <react/renderer/components/TrueSheetSpec/Props.h>
13
14
 
14
15
  NS_ASSUME_NONNULL_BEGIN
15
16
 
@@ -17,8 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
17
18
 
18
19
  @property (nonatomic, assign) CGFloat keyboardScrollOffset;
19
20
  @property (nonatomic, assign) BOOL scrollingExpandsSheet;
20
- @property (nonatomic, assign) NSInteger topScrollEdgeEffect;
21
- @property (nonatomic, assign) NSInteger bottomScrollEdgeEffect;
21
+ @property (nonatomic, assign) facebook::react::TrueSheetViewTopScrollEdgeEffect topScrollEdgeEffect;
22
+ @property (nonatomic, assign) facebook::react::TrueSheetViewBottomScrollEdgeEffect bottomScrollEdgeEffect;
22
23
 
23
24
  @end
24
25
 
@@ -48,7 +49,7 @@ NS_ASSUME_NONNULL_BEGIN
48
49
  /**
49
50
  * Inset adjustment mode for scrollable content
50
51
  */
51
- @property (nonatomic, assign) NSInteger insetAdjustment;
52
+ @property (nonatomic, assign) facebook::react::TrueSheetViewInsetAdjustment insetAdjustment;
52
53
 
53
54
  /**
54
55
  * Options for scrollable behavior
@@ -35,8 +35,8 @@ using namespace facebook::react;
35
35
  if (self = [super init]) {
36
36
  _keyboardScrollOffset = 0;
37
37
  _scrollingExpandsSheet = YES;
38
- _topScrollEdgeEffect = (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
39
- _bottomScrollEdgeEffect = (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
38
+ _topScrollEdgeEffect = TrueSheetViewTopScrollEdgeEffect::Hidden;
39
+ _bottomScrollEdgeEffect = TrueSheetViewBottomScrollEdgeEffect::Hidden;
40
40
  }
41
41
  return self;
42
42
  }
@@ -113,7 +113,7 @@ using namespace facebook::react;
113
113
  - (void)setupScrollable {
114
114
  if (_scrollableSet && _contentView) {
115
115
  CGFloat bottomInset = 0;
116
- if (_insetAdjustment == (NSInteger)TrueSheetViewInsetAdjustment::Automatic) {
116
+ if (_insetAdjustment == TrueSheetViewInsetAdjustment::Automatic) {
117
117
  bottomInset = [WindowUtil keyWindow].safeAreaInsets.bottom;
118
118
  }
119
119
  [_contentView setupScrollable:_scrollableEnabled bottomInset:bottomInset];
@@ -129,13 +129,13 @@ using namespace facebook::react;
129
129
  return;
130
130
  }
131
131
 
132
- NSInteger topEffect =
133
- _scrollableOptions ? _scrollableOptions.topScrollEdgeEffect : (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
134
- NSInteger bottomEffect = _scrollableOptions ? _scrollableOptions.bottomScrollEdgeEffect
135
- : (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
132
+ auto topEffect =
133
+ _scrollableOptions ? _scrollableOptions.topScrollEdgeEffect : TrueSheetViewTopScrollEdgeEffect::Hidden;
134
+ auto bottomEffect =
135
+ _scrollableOptions ? _scrollableOptions.bottomScrollEdgeEffect : TrueSheetViewBottomScrollEdgeEffect::Hidden;
136
136
 
137
- BOOL topHidden = topEffect == (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
138
- BOOL bottomHidden = bottomEffect == (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
137
+ BOOL topHidden = topEffect == TrueSheetViewTopScrollEdgeEffect::Hidden;
138
+ BOOL bottomHidden = bottomEffect == TrueSheetViewBottomScrollEdgeEffect::Hidden;
139
139
 
140
140
  RCTScrollViewComponentView *scrollViewComponent = [_contentView findScrollView];
141
141
  UIScrollView *scrollView = scrollViewComponent.scrollView;
@@ -211,32 +211,32 @@ using namespace facebook::react;
211
211
 
212
212
  if (@available(iOS 26.0, *)) {
213
213
  UIScrollView *scrollView = _pinnedScrollView.scrollView;
214
- NSInteger topEffect = options ? options.topScrollEdgeEffect : (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden;
215
- NSInteger bottomEffect =
216
- options ? options.bottomScrollEdgeEffect : (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
214
+ auto topEffect = options ? options.topScrollEdgeEffect : TrueSheetViewTopScrollEdgeEffect::Hidden;
215
+ auto bottomEffect = options ? options.bottomScrollEdgeEffect : TrueSheetViewBottomScrollEdgeEffect::Hidden;
217
216
 
218
217
  [self applyEdgeEffect:topEffect toEdge:scrollView.topEdgeEffect];
219
- [self applyEdgeEffect:bottomEffect toEdge:scrollView.bottomEdgeEffect];
218
+ [self applyEdgeEffect:(TrueSheetViewTopScrollEdgeEffect)bottomEffect toEdge:scrollView.bottomEdgeEffect];
220
219
  }
221
220
  #endif
222
221
  }
223
222
 
224
223
  #if RNTS_IPHONE_OS_VERSION_AVAILABLE(26_0)
225
- - (void)applyEdgeEffect:(NSInteger)effect toEdge:(UIScrollEdgeEffect *)edgeEffect API_AVAILABLE(ios(26.0)) {
224
+ - (void)applyEdgeEffect:(TrueSheetViewTopScrollEdgeEffect)effect
225
+ toEdge:(UIScrollEdgeEffect *)edgeEffect API_AVAILABLE(ios(26.0)) {
226
226
  switch (effect) {
227
- case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Automatic:
227
+ case TrueSheetViewTopScrollEdgeEffect::Automatic:
228
228
  edgeEffect.hidden = NO;
229
229
  edgeEffect.style = UIScrollEdgeEffectStyle.automaticStyle;
230
230
  break;
231
- case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hard:
231
+ case TrueSheetViewTopScrollEdgeEffect::Hard:
232
232
  edgeEffect.hidden = NO;
233
233
  edgeEffect.style = UIScrollEdgeEffectStyle.hardStyle;
234
234
  break;
235
- case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Soft:
235
+ case TrueSheetViewTopScrollEdgeEffect::Soft:
236
236
  edgeEffect.hidden = NO;
237
237
  edgeEffect.style = UIScrollEdgeEffectStyle.softStyle;
238
238
  break;
239
- case (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden:
239
+ case TrueSheetViewTopScrollEdgeEffect::Hidden:
240
240
  edgeEffect.hidden = YES;
241
241
  break;
242
242
  }
@@ -51,7 +51,7 @@ using namespace facebook::react;
51
51
  UIView *_snapshotView;
52
52
  CGSize _lastStateSize;
53
53
  NSInteger _initialDetentIndex;
54
- NSInteger _insetAdjustment;
54
+ TrueSheetViewInsetAdjustment _insetAdjustment;
55
55
  BOOL _scrollable;
56
56
  ScrollableOptions *_scrollableOptions;
57
57
  BOOL _initialDetentAnimated;
@@ -185,7 +185,7 @@ using namespace facebook::react;
185
185
  _controller.backgroundColor = RCTUIColorFromSharedColor(newProps.backgroundColor);
186
186
 
187
187
  // Blur tint
188
- _controller.backgroundBlur = (NSInteger)newProps.backgroundBlur;
188
+ _controller.backgroundBlur = newProps.backgroundBlur;
189
189
 
190
190
  // Blur options
191
191
  const auto &blurOpts = newProps.blurOptions;
@@ -202,7 +202,7 @@ using namespace facebook::react;
202
202
  _controller.maxContentWidth = newProps.maxContentWidth != 0.0 ? @(newProps.maxContentWidth) : nil;
203
203
 
204
204
  // Anchor
205
- _controller.anchor = (NSInteger)newProps.anchor;
205
+ _controller.anchor = newProps.anchor;
206
206
 
207
207
  _controller.grabber = newProps.grabber;
208
208
 
@@ -245,11 +245,11 @@ using namespace facebook::react;
245
245
 
246
246
  const auto &scrollableOpts = newProps.scrollableOptions;
247
247
  BOOL scrollingExpandsSheet = scrollableOpts.scrollingExpandsSheet;
248
- NSInteger topEdgeEffect = (NSInteger)scrollableOpts.topScrollEdgeEffect;
249
- NSInteger bottomEdgeEffect = (NSInteger)scrollableOpts.bottomScrollEdgeEffect;
248
+ auto topEdgeEffect = scrollableOpts.topScrollEdgeEffect;
249
+ auto bottomEdgeEffect = scrollableOpts.bottomScrollEdgeEffect;
250
250
  BOOL hasScrollableOptions = scrollableOpts.keyboardScrollOffset > 0 || !scrollingExpandsSheet ||
251
- topEdgeEffect != (NSInteger)TrueSheetViewTopScrollEdgeEffect::Hidden ||
252
- bottomEdgeEffect != (NSInteger)TrueSheetViewBottomScrollEdgeEffect::Hidden;
251
+ topEdgeEffect != TrueSheetViewTopScrollEdgeEffect::Hidden ||
252
+ bottomEdgeEffect != TrueSheetViewBottomScrollEdgeEffect::Hidden;
253
253
 
254
254
  if (hasScrollableOptions) {
255
255
  ScrollableOptions *options = [[ScrollableOptions alloc] init];
@@ -264,7 +264,7 @@ using namespace facebook::react;
264
264
 
265
265
  _controller.scrollingExpandsSheet = scrollingExpandsSheet;
266
266
 
267
- _insetAdjustment = (NSInteger)newProps.insetAdjustment;
267
+ _insetAdjustment = newProps.insetAdjustment;
268
268
  _controller.insetAdjustment = _insetAdjustment;
269
269
 
270
270
  [self setupScrollable];
@@ -7,6 +7,7 @@
7
7
  //
8
8
 
9
9
  #import <UIKit/UIKit.h>
10
+ #import <react/renderer/components/TrueSheetSpec/Props.h>
10
11
  #import "core/TrueSheetDetentCalculator.h"
11
12
  #import "core/TrueSheetGrabberView.h"
12
13
 
@@ -63,12 +64,12 @@ NS_ASSUME_NONNULL_BEGIN
63
64
  @property (nonatomic, assign) BOOL draggable;
64
65
  @property (nonatomic, assign) BOOL dimmed;
65
66
  @property (nonatomic, strong, nullable) NSNumber *dimmedDetentIndex;
66
- @property (nonatomic, assign) NSInteger backgroundBlur;
67
+ @property (nonatomic, assign) facebook::react::TrueSheetViewBackgroundBlur backgroundBlur;
67
68
  @property (nonatomic, strong, nullable) NSNumber *blurIntensity;
68
69
  @property (nonatomic, assign) BOOL blurInteraction;
69
70
  @property (nonatomic, assign) BOOL pageSizing;
70
- @property (nonatomic, assign) NSInteger anchor;
71
- @property (nonatomic, assign) NSInteger insetAdjustment;
71
+ @property (nonatomic, assign) facebook::react::TrueSheetViewAnchor anchor;
72
+ @property (nonatomic, assign) facebook::react::TrueSheetViewInsetAdjustment insetAdjustment;
72
73
  @property (nonatomic, assign) BOOL scrollingExpandsSheet;
73
74
  @property (nonatomic, assign) BOOL dismissible;
74
75
  @property (nonatomic, assign) BOOL isPresented;
@@ -87,7 +87,7 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
87
87
  _isTrackingPositionFromLayout = NO;
88
88
 
89
89
  _blurInteraction = YES;
90
- _insetAdjustment = (NSInteger)TrueSheetViewInsetAdjustment::Automatic;
90
+ _insetAdjustment = TrueSheetViewInsetAdjustment::Automatic;
91
91
  _detentCalculator = [[TrueSheetDetentCalculator alloc] init];
92
92
  _detentCalculator.delegate = self;
93
93
  }
@@ -128,7 +128,7 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
128
128
  }
129
129
 
130
130
  - (CGFloat)detentBottomAdjustmentForHeight:(CGFloat)height {
131
- if (_insetAdjustment == (NSInteger)TrueSheetViewInsetAdjustment::Automatic) {
131
+ if (_insetAdjustment == TrueSheetViewInsetAdjustment::Automatic) {
132
132
  return 0;
133
133
  }
134
134
 
@@ -200,6 +200,8 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
200
200
  - (void)viewWillAppear:(BOOL)animated {
201
201
  [super viewWillAppear:animated];
202
202
 
203
+ _blurView.alpha = 1;
204
+
203
205
  if (!_isPresented) {
204
206
  UIViewController *presenter = self.presentingViewController;
205
207
  if ([presenter isKindOfClass:[TrueSheetViewController class]]) {
@@ -475,6 +477,12 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
475
477
  if (self.currentPosition >= self.screenHeight) {
476
478
  CGFloat position = fmax(_lastEmittedPositionState.position, layerPosition);
477
479
 
480
+ // Hide blur at the end of dismiss to prevent UIVisualEffectView
481
+ // from causing a flicker/flash at the bottom edge of the sheet.
482
+ if (self.screenHeight - position < 1) {
483
+ _blurView.alpha = 0;
484
+ }
485
+
478
486
  [self emitWillDismissEvents];
479
487
  [self emitChangePositionDelegateWithPosition:position realtime:YES debug:@"transition out"];
480
488
 
@@ -717,16 +725,16 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
717
725
  }
718
726
 
719
727
  - (void)setupBackground {
720
- NSInteger effectiveBackgroundBlur = self.backgroundBlur;
728
+ auto effectiveBackgroundBlur = self.backgroundBlur;
721
729
  if (@available(iOS 26.0, *)) {
722
730
  // iOS 26+ has default liquid glass effect
723
- } else if (effectiveBackgroundBlur == (NSInteger)TrueSheetViewBackgroundBlur::None && !self.backgroundColor) {
724
- effectiveBackgroundBlur = (NSInteger)TrueSheetViewBackgroundBlur::SystemMaterial;
731
+ } else if (effectiveBackgroundBlur == TrueSheetViewBackgroundBlur::None && !self.backgroundColor) {
732
+ effectiveBackgroundBlur = TrueSheetViewBackgroundBlur::SystemMaterial;
725
733
  }
726
734
 
727
- BOOL hasBlur = effectiveBackgroundBlur != (NSInteger)TrueSheetViewBackgroundBlur::None;
735
+ BOOL hasBlur = effectiveBackgroundBlur != TrueSheetViewBackgroundBlur::None;
728
736
 
729
- _blurView.backgroundBlur = hasBlur ? effectiveBackgroundBlur : (NSInteger)TrueSheetViewBackgroundBlur::None;
737
+ _blurView.backgroundBlur = hasBlur ? effectiveBackgroundBlur : TrueSheetViewBackgroundBlur::None;
730
738
  _blurView.blurIntensity = self.blurIntensity;
731
739
  _blurView.blurInteraction = self.blurInteraction;
732
740
  [_blurView applyBlurEffect];
@@ -825,7 +833,7 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
825
833
  }
826
834
 
827
835
  - (BOOL)isAnchored {
828
- return self.anchor == (NSInteger)TrueSheetViewAnchor::Left || self.anchor == (NSInteger)TrueSheetViewAnchor::Right;
836
+ return self.anchor == TrueSheetViewAnchor::Left || self.anchor == TrueSheetViewAnchor::Right;
829
837
  }
830
838
 
831
839
  - (void)setupAnchorViewInView:(UIView *)parentView {
@@ -846,7 +854,7 @@ static BOOL TrueSheetPositionStateEquals(TrueSheetPositionState a, TrueSheetPosi
846
854
  [parentView addSubview:_anchorView];
847
855
 
848
856
  NSLayoutAnchor *horizontalAnchor =
849
- self.anchor == (NSInteger)TrueSheetViewAnchor::Right ? parentView.trailingAnchor : parentView.leadingAnchor;
857
+ self.anchor == TrueSheetViewAnchor::Right ? parentView.trailingAnchor : parentView.leadingAnchor;
850
858
 
851
859
  [NSLayoutConstraint activateConstraints:@[
852
860
  [_anchorView.bottomAnchor constraintEqualToAnchor:parentView.bottomAnchor],
@@ -7,12 +7,13 @@
7
7
  //
8
8
 
9
9
  #import <UIKit/UIKit.h>
10
+ #import <react/renderer/components/TrueSheetSpec/Props.h>
10
11
 
11
12
  NS_ASSUME_NONNULL_BEGIN
12
13
 
13
14
  @interface TrueSheetBlurView : UIVisualEffectView
14
15
 
15
- @property (nonatomic, assign) NSInteger backgroundBlur;
16
+ @property (nonatomic, assign) facebook::react::TrueSheetViewBackgroundBlur backgroundBlur;
16
17
  @property (nonatomic, strong, nullable) NSNumber *blurIntensity;
17
18
  @property (nonatomic, assign) BOOL blurInteraction;
18
19
 
@@ -48,7 +48,7 @@ using namespace facebook::react;
48
48
  - (void)applyBlurEffect {
49
49
  self.userInteractionEnabled = self.blurInteraction;
50
50
 
51
- if (self.backgroundBlur == (NSInteger)TrueSheetViewBackgroundBlur::None) {
51
+ if (self.backgroundBlur == TrueSheetViewBackgroundBlur::None) {
52
52
  [self clearAnimator];
53
53
  self.effect = nil;
54
54
  return;
@@ -9,12 +9,13 @@
9
9
  #ifdef RCT_NEW_ARCH_ENABLED
10
10
 
11
11
  #import <UIKit/UIKit.h>
12
+ #import <react/renderer/components/TrueSheetSpec/Props.h>
12
13
 
13
14
  NS_ASSUME_NONNULL_BEGIN
14
15
 
15
16
  @interface BlurUtil : NSObject
16
17
 
17
- + (UIBlurEffectStyle)blurEffectStyleFromEnum:(NSInteger)blur;
18
+ + (UIBlurEffectStyle)blurEffectStyleFromEnum:(facebook::react::TrueSheetViewBackgroundBlur)blur;
18
19
 
19
20
  @end
20
21
 
@@ -16,8 +16,8 @@ using namespace facebook::react;
16
16
 
17
17
  @implementation BlurUtil
18
18
 
19
- + (UIBlurEffectStyle)blurEffectStyleFromEnum:(NSInteger)blur {
20
- switch ((TrueSheetViewBackgroundBlur)blur) {
19
+ + (UIBlurEffectStyle)blurEffectStyleFromEnum:(TrueSheetViewBackgroundBlur)blur {
20
+ switch (blur) {
21
21
  case TrueSheetViewBackgroundBlur::Dark:
22
22
  return UIBlurEffectStyleDark;
23
23
  case TrueSheetViewBackgroundBlur::ExtraLight:
@@ -8,8 +8,10 @@ const TrueSheetNavigator = ({
8
8
  id,
9
9
  initialRouteName,
10
10
  children,
11
+ layout,
11
12
  screenListeners,
12
- screenOptions
13
+ screenOptions,
14
+ screenLayout
13
15
  }) => {
14
16
  const {
15
17
  state,
@@ -20,8 +22,10 @@ const TrueSheetNavigator = ({
20
22
  id,
21
23
  initialRouteName,
22
24
  children,
25
+ layout,
23
26
  screenListeners,
24
- screenOptions
27
+ screenOptions,
28
+ screenLayout
25
29
  });
26
30
  return /*#__PURE__*/_jsx(NavigationContent, {
27
31
  children: /*#__PURE__*/_jsx(TrueSheetView, {
@@ -1 +1 @@
1
- {"version":3,"names":["createNavigatorFactory","useNavigationBuilder","TrueSheetRouter","TrueSheetView","jsx","_jsx","TrueSheetNavigator","id","initialRouteName","children","screenListeners","screenOptions","state","descriptors","navigation","NavigationContent","createTrueSheetNavigator","config"],"sourceRoot":"../../../src","sources":["navigation/createTrueSheetNavigator.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAKtBC,oBAAoB,QACf,0BAA0B;AAEjC,SAASC,eAAe,QAAqC,sBAAmB;AAChF,SAASC,aAAa,QAAQ,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUhD,MAAMC,kBAAkB,GAAGA,CAAC;EAC1BC,EAAE;EACFC,gBAAgB;EAChBC,QAAQ;EACRC,eAAe;EACfC;AACuB,CAAC,KAAK;EAC7B,MAAM;IAAEC,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GAAGd,oBAAoB,CAMhFC,eAAe,EAAE;IACjBK,EAAE;IACFC,gBAAgB;IAChBC,QAAQ;IACRC,eAAe;IACfC;EACF,CAAC,CAAC;EAEF,oBACEN,IAAA,CAACU,iBAAiB;IAAAN,QAAA,eAChBJ,IAAA,CAACF,aAAa;MAACS,KAAK,EAAEA,KAAM;MAACE,UAAU,EAAEA,UAAW;MAACD,WAAW,EAAEA;IAAY,CAAE;EAAC,CAChE,CAAC;AAExB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,wBAAwB,GAgBnCC,MAAe,IACqB;EACpC,OAAOjB,sBAAsB,CAACM,kBAAkB,CAAC,CAACW,MAAM,CAAC;AAC3D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createNavigatorFactory","useNavigationBuilder","TrueSheetRouter","TrueSheetView","jsx","_jsx","TrueSheetNavigator","id","initialRouteName","children","layout","screenListeners","screenOptions","screenLayout","state","descriptors","navigation","NavigationContent","createTrueSheetNavigator","config"],"sourceRoot":"../../../src","sources":["navigation/createTrueSheetNavigator.tsx"],"mappings":";;AAAA,SACEA,sBAAsB,EAKtBC,oBAAoB,QACf,0BAA0B;AAEjC,SAASC,eAAe,QAAqC,sBAAmB;AAChF,SAASC,aAAa,QAAQ,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUhD,MAAMC,kBAAkB,GAAGA,CAAC;EAC1BC,EAAE;EACFC,gBAAgB;EAChBC,QAAQ;EACRC,MAAM;EACNC,eAAe;EACfC,aAAa;EACbC;AACuB,CAAC,KAAK;EAC7B,MAAM;IAAEC,KAAK;IAAEC,WAAW;IAAEC,UAAU;IAAEC;EAAkB,CAAC,GAAGhB,oBAAoB,CAMhFC,eAAe,EAAE;IACjBK,EAAE;IACFC,gBAAgB;IAChBC,QAAQ;IACRC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC;EACF,CAAC,CAAC;EAEF,oBACER,IAAA,CAACY,iBAAiB;IAAAR,QAAA,eAChBJ,IAAA,CAACF,aAAa;MAACW,KAAK,EAAEA,KAAM;MAACE,UAAU,EAAEA,UAAW;MAACD,WAAW,EAAEA;IAAY,CAAE;EAAC,CAChE,CAAC;AAExB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,wBAAwB,GAgBnCC,MAAe,IACqB;EACpC,OAAOnB,sBAAsB,CAACM,kBAAkB,CAAC,CAACa,MAAM,CAAC;AAC3D,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import { type NavigatorTypeBagBase, type ParamListBase, type StaticConfig, type TypedNavigator } from '@react-navigation/native';
2
2
  import type { TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetNavigatorProps } from './types';
3
- declare const TrueSheetNavigator: ({ id, initialRouteName, children, screenListeners, screenOptions, }: TrueSheetNavigatorProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare const TrueSheetNavigator: ({ id, initialRouteName, children, layout, screenListeners, screenOptions, screenLayout, }: TrueSheetNavigatorProps) => import("react/jsx-runtime").JSX.Element;
4
4
  /**
5
5
  * Creates a TrueSheet navigator.
6
6
  *
@@ -1 +1 @@
1
- {"version":3,"file":"createTrueSheetNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAEV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,kBAAkB,GAAI,qEAMzB,uBAAuB,4CAoBzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,GACnC,KAAK,CAAC,SAAS,SAAS,aAAa,EACrC,KAAK,CAAC,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACxD,KAAK,CAAC,OAAO,SAAS,oBAAoB,GAAG;IAC3C,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,cAAc,EAAE,GACb,SAAS,IAAI,MAAM,SAAS,GAAG,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,GAC3F,CAAC;IACF,SAAS,EAAE,OAAO,kBAAkB,CAAC;CACtC,EACD,KAAK,CAAC,MAAM,SAAS,YAAY,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,EAElE,SAAS,MAAM,KACd,cAAc,CAAC,OAAO,EAAE,MAAM,CAEhC,CAAC"}
1
+ {"version":3,"file":"createTrueSheetNavigator.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetNavigator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAEV,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,SAAS,CAAC;AAEjB,QAAA,MAAM,kBAAkB,GAAI,2FAQzB,uBAAuB,4CAsBzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,GACnC,KAAK,CAAC,SAAS,SAAS,aAAa,EACrC,KAAK,CAAC,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,EACxD,KAAK,CAAC,OAAO,SAAS,oBAAoB,GAAG;IAC3C,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;IAC3C,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,cAAc,EAAE,GACb,SAAS,IAAI,MAAM,SAAS,GAAG,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,GAC3F,CAAC;IACF,SAAS,EAAE,OAAO,kBAAkB,CAAC;CACtC,EACD,KAAK,CAAC,MAAM,SAAS,YAAY,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,EAElE,SAAS,MAAM,KACd,cAAc,CAAC,OAAO,EAAE,MAAM,CAEhC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lodev09/react-native-true-sheet",
3
- "version": "3.10.0-beta.3",
3
+ "version": "3.10.0",
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",
@@ -89,14 +89,14 @@
89
89
  "@eslint/js": "^9.35.0",
90
90
  "@evilmartians/lefthook": "^2.0.4",
91
91
  "@gorhom/bottom-sheet": "^5.2.8",
92
- "@react-native/babel-preset": "^0.82.1",
93
- "@react-native/eslint-config": "^0.82.1",
92
+ "@react-native/babel-preset": "^0.83.4",
93
+ "@react-native/eslint-config": "^0.83.4",
94
94
  "@react-navigation/native": "^7.1.6",
95
95
  "@release-it/conventional-changelog": "^10.0.1",
96
96
  "@testing-library/react-native": "^13.3.3",
97
97
  "@types/babel__core": "^7",
98
98
  "@types/jest": "^29.5.14",
99
- "@types/react": "19.1.1",
99
+ "@types/react": "~19.2.10",
100
100
  "commitlint": "^19.8.1",
101
101
  "del-cli": "^6.0.0",
102
102
  "eslint": "^9.35.0",
@@ -105,20 +105,20 @@
105
105
  "jest": "^29.7.0",
106
106
  "nanoid": "^5.1.5",
107
107
  "prettier": "^3.0.3",
108
- "react": "19.1.1",
109
- "react-native": "0.82.1",
108
+ "react": "19.2.0",
109
+ "react-native": "0.83.4",
110
110
  "react-native-builder-bob": "^0.40.15",
111
- "react-native-reanimated": "^4.2.0",
112
- "react-native-worklets": "^0.7.0",
113
- "react-test-renderer": "19.1.1",
111
+ "react-native-reanimated": "4.2.1",
112
+ "react-native-worklets": "0.7.2",
113
+ "react-test-renderer": "19.2.0",
114
114
  "release-it": "^19.0.4",
115
115
  "turbo": "^2.5.6",
116
116
  "typescript": "^5.9.2"
117
117
  },
118
118
  "resolutions": {
119
- "@types/react": "19.1.1",
120
- "react-native-reanimated": "^4.2.0",
121
- "react-native-worklets": "^0.7.0"
119
+ "@types/react": "~19.2.10",
120
+ "react-native-reanimated": "4.2.1",
121
+ "react-native-worklets": "0.7.2"
122
122
  },
123
123
  "peerDependencies": {
124
124
  "@gorhom/bottom-sheet": ">=5",
@@ -22,8 +22,10 @@ const TrueSheetNavigator = ({
22
22
  id,
23
23
  initialRouteName,
24
24
  children,
25
+ layout,
25
26
  screenListeners,
26
27
  screenOptions,
28
+ screenLayout,
27
29
  }: TrueSheetNavigatorProps) => {
28
30
  const { state, descriptors, navigation, NavigationContent } = useNavigationBuilder<
29
31
  TrueSheetNavigationState<ParamListBase>,
@@ -35,8 +37,10 @@ const TrueSheetNavigator = ({
35
37
  id,
36
38
  initialRouteName,
37
39
  children,
40
+ layout,
38
41
  screenListeners,
39
42
  screenOptions,
43
+ screenLayout,
40
44
  });
41
45
 
42
46
  return (