@lodev09/react-native-true-sheet 4.0.0-beta.2 → 4.0.0-beta.20
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 +25 -4
- package/android/build.gradle +22 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +50 -16
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +302 -184
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +5 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +21 -110
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayView.kt +116 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayViewManager.kt +45 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +2 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetStateUpdater.kt +18 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +119 -50
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +360 -163
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +54 -12
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetView.kt +22 -9
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetCoordinatorLayout.kt +84 -5
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +104 -39
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDimView.kt +3 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetOverlayRootView.kt +137 -0
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetLifecycleEvents.kt +15 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/KeyboardUtils.kt +15 -2
- package/android/src/main/java/com/lodev09/truesheet/utils/ScreenUtils.kt +0 -12
- package/android/src/main/java/com/lodev09/truesheet/utils/ViewUtils.kt +19 -7
- package/android/src/main/jni/TrueSheetSpec.h +1 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +1 -9
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +110 -30
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +30 -7
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +2 -2
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +9 -8
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewComponentDescriptor.h +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +9 -3
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.h +3 -6
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.cpp +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.h +4 -6
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.cpp +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.h +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetLayoutUtils.h +43 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewComponentDescriptor.h +21 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.cpp +17 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.h +33 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewComponentDescriptor.h +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +7 -40
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.h +3 -7
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.cpp +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.h +4 -5
- package/ios/TrueSheetContainerView.h +27 -7
- package/ios/TrueSheetContainerView.mm +31 -11
- package/ios/TrueSheetContentView.h +43 -15
- package/ios/TrueSheetContentView.mm +211 -189
- package/ios/TrueSheetFooterView.h +6 -0
- package/ios/TrueSheetFooterView.mm +93 -17
- package/ios/TrueSheetModule.h +2 -7
- package/ios/TrueSheetModule.mm +7 -16
- package/ios/TrueSheetOverlayView.h +32 -0
- package/ios/TrueSheetOverlayView.mm +161 -0
- package/ios/TrueSheetView.mm +212 -55
- package/ios/TrueSheetViewController.h +31 -3
- package/ios/TrueSheetViewController.mm +393 -94
- package/ios/core/TrueSheetBlurView.h +0 -2
- package/ios/core/TrueSheetBlurView.mm +3 -36
- package/ios/core/TrueSheetDetentCalculator.h +7 -1
- package/ios/core/TrueSheetDetentCalculator.mm +27 -4
- package/ios/core/TrueSheetGrabberView.mm +13 -3
- package/ios/core/TrueSheetKeyboardObserver.mm +2 -0
- package/ios/core/TrueSheetOverlayContainerView.h +31 -0
- package/ios/core/TrueSheetOverlayContainerView.mm +35 -0
- package/ios/events/TrueSheetLifecycleEvents.h +2 -0
- package/ios/events/TrueSheetLifecycleEvents.mm +8 -0
- package/ios/tvos/TrueSheetStubs.mm +12 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.h +1 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.mm +24 -2
- package/lib/module/TrueSheet.js +173 -39
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheet.web.js +218 -243
- package/lib/module/TrueSheet.web.js.map +1 -1
- package/lib/module/TrueSheetBackground.js +15 -0
- package/lib/module/TrueSheetBackground.js.map +1 -0
- package/lib/module/TrueSheetOverlay.js +30 -0
- package/lib/module/TrueSheetOverlay.js.map +1 -0
- package/lib/module/TrueSheetOverlay.web.js +35 -0
- package/lib/module/TrueSheetOverlay.web.js.map +1 -0
- package/lib/module/TrueSheetPeek.web.js +20 -15
- package/lib/module/TrueSheetPeek.web.js.map +1 -1
- package/lib/module/detentBackgrounds.js +21 -0
- package/lib/module/detentBackgrounds.js.map +1 -0
- package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
- package/lib/module/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +14 -10
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mocks/index.js +18 -2
- package/lib/module/mocks/index.js.map +1 -1
- package/lib/module/mocks/navigationExpoRouter.js.map +1 -1
- package/lib/module/navigation/base-types.js +2 -0
- package/lib/module/navigation/base-types.js.map +1 -0
- package/lib/module/navigation/createTrueSheetRouter.js +0 -9
- package/lib/module/navigation/createTrueSheetRouter.js.map +1 -1
- package/lib/module/navigation/expo-router/base-types.js +2 -0
- package/lib/module/navigation/expo-router/base-types.js.map +1 -0
- package/lib/module/navigation/expo-router/index.js +10 -7
- package/lib/module/navigation/expo-router/index.js.map +1 -1
- package/lib/module/navigation/expo-router/types.js +4 -0
- package/lib/module/navigation/expo-router/types.js.map +1 -0
- package/lib/module/navigation/index.js.map +1 -1
- package/lib/module/navigation/screen/useSheetScreenState.js +1 -0
- package/lib/module/navigation/screen/useSheetScreenState.js.map +1 -1
- package/lib/module/web/constants.js +1 -1
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/layout.js +168 -0
- package/lib/module/web/layout.js.map +1 -0
- package/lib/module/web/vaul/constants.js +4 -0
- package/lib/module/web/vaul/constants.js.map +1 -1
- package/lib/module/web/vaul/context.js.map +1 -1
- package/lib/module/web/vaul/helpers.js +1 -0
- package/lib/module/web/vaul/helpers.js.map +1 -1
- package/lib/module/web/vaul/index.js +44 -6
- package/lib/module/web/vaul/index.js.map +1 -1
- package/lib/module/web/vaul/use-snap-points.js +6 -8
- package/lib/module/web/vaul/use-snap-points.js.map +1 -1
- package/lib/typescript/src/TrueSheet.d.ts +6 -0
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.types.d.ts +135 -34
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.web.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheetBackground.d.ts +3 -0
- package/lib/typescript/src/TrueSheetBackground.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetOverlay.d.ts +8 -0
- package/lib/typescript/src/TrueSheetOverlay.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetOverlay.web.d.ts +8 -0
- package/lib/typescript/src/TrueSheetOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetPeek.web.d.ts +8 -4
- package/lib/typescript/src/TrueSheetPeek.web.d.ts.map +1 -1
- package/lib/typescript/src/detentBackgrounds.d.ts +10 -0
- package/lib/typescript/src/detentBackgrounds.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +11 -7
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/index.d.ts +4 -0
- package/lib/typescript/src/mocks/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts +3 -3
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts.map +1 -1
- package/lib/typescript/src/navigation/base-types.d.ts +9 -0
- package/lib/typescript/src/navigation/base-types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts +2 -13
- package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts.map +1 -1
- package/lib/typescript/src/navigation/expo-router/base-types.d.ts +8 -0
- package/lib/typescript/src/navigation/expo-router/base-types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/expo-router/index.d.ts +8 -6
- package/lib/typescript/src/navigation/expo-router/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/expo-router/types.d.ts +44 -0
- package/lib/typescript/src/navigation/expo-router/types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/index.d.ts +3 -4
- package/lib/typescript/src/navigation/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +2 -1
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -1
- package/lib/typescript/src/navigation/types.d.ts +41 -5
- package/lib/typescript/src/navigation/types.d.ts.map +1 -1
- package/lib/typescript/src/web/constants.d.ts +1 -1
- package/lib/typescript/src/web/constants.d.ts.map +1 -1
- package/lib/typescript/src/web/layout.d.ts +19 -0
- package/lib/typescript/src/web/layout.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/constants.d.ts +1 -0
- package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/context.d.ts +1 -0
- package/lib/typescript/src/web/vaul/context.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/helpers.d.ts +1 -0
- package/lib/typescript/src/web/vaul/helpers.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/index.d.ts +7 -1
- package/lib/typescript/src/web/vaul/index.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/use-snap-points.d.ts.map +1 -1
- package/package.json +17 -8
- package/react-native.config.js +1 -0
- package/src/TrueSheet.tsx +206 -48
- package/src/TrueSheet.types.ts +142 -35
- package/src/TrueSheet.web.tsx +270 -290
- package/src/TrueSheetBackground.tsx +17 -0
- package/src/TrueSheetOverlay.tsx +24 -0
- package/src/TrueSheetOverlay.web.tsx +33 -0
- package/src/TrueSheetPeek.web.tsx +25 -23
- package/src/detentBackgrounds.ts +24 -0
- package/src/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
- package/src/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +14 -10
- package/src/index.ts +1 -0
- package/src/mocks/index.ts +17 -2
- package/src/mocks/navigationExpoRouter.ts +6 -5
- package/src/navigation/base-types.ts +20 -0
- package/src/navigation/createTrueSheetRouter.ts +5 -33
- package/src/navigation/expo-router/base-types.ts +18 -0
- package/src/navigation/expo-router/index.ts +28 -30
- package/src/navigation/expo-router/types.ts +116 -0
- package/src/navigation/index.ts +6 -7
- package/src/navigation/screen/useSheetScreenState.ts +2 -0
- package/src/navigation/types.ts +75 -22
- package/src/web/constants.ts +1 -1
- package/src/web/layout.ts +196 -0
- package/src/web/vaul/constants.ts +4 -0
- package/src/web/vaul/context.ts +1 -0
- package/src/web/vaul/helpers.ts +5 -0
- package/src/web/vaul/index.tsx +67 -5
- package/src/web/vaul/use-snap-points.ts +6 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ComponentType, ReactElement } from 'react';
|
|
1
|
+
import type { Component, ComponentType, ReactElement, ReactNode, RefObject } from 'react';
|
|
2
2
|
import type { ColorValue, NativeSyntheticEvent, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
3
3
|
export interface DetentInfoEventPayload {
|
|
4
4
|
/**
|
|
@@ -27,6 +27,7 @@ export type WillPresentEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
|
27
27
|
export type DidPresentEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
28
28
|
export type WillDismissEvent = NativeSyntheticEvent<null>;
|
|
29
29
|
export type DidDismissEvent = NativeSyntheticEvent<null>;
|
|
30
|
+
export type DismissAttemptEvent = NativeSyntheticEvent<null>;
|
|
30
31
|
export type DragBeginEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
31
32
|
export type DragChangeEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
32
33
|
export type DragEndEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
@@ -148,16 +149,59 @@ export interface AccessibilityOptions {
|
|
|
148
149
|
* @platform ios 26+
|
|
149
150
|
*/
|
|
150
151
|
export type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
152
|
+
/**
|
|
153
|
+
* What the sheet insets the bottom of a plugged scrollable's content for.
|
|
154
|
+
* See `ScrollableOptions.contentInsetAdjustment`.
|
|
155
|
+
*/
|
|
156
|
+
export type ContentInsetAdjustment = 'automatic' | 'safe-area' | 'footer' | 'never';
|
|
151
157
|
/**
|
|
152
158
|
* Options for scrollable behavior.
|
|
153
159
|
*/
|
|
154
160
|
export interface ScrollableOptions {
|
|
161
|
+
/**
|
|
162
|
+
* What the sheet insets the bottom of the scroll content for, so the last
|
|
163
|
+
* item clears whatever covers the scroll view's bottom edge.
|
|
164
|
+
*
|
|
165
|
+
* - `'automatic'`: The bottom safe-area inset while the content can scroll
|
|
166
|
+
* (home indicator on iOS, navigation bar on Android), plus the height of
|
|
167
|
+
* an `absolute` footer floating over the scroll view. The footer then
|
|
168
|
+
* counts toward the `auto` detent so the content ends above it.
|
|
169
|
+
* - `'safe-area'`: The safe-area inset only — content scrolls under an
|
|
170
|
+
* absolute footer.
|
|
171
|
+
* - `'footer'`: The absolute footer only — you pad for the safe area.
|
|
172
|
+
* - `'never'`: No inset — you pad the content yourself.
|
|
173
|
+
*
|
|
174
|
+
* The safe-area inset only applies while the sheet's `insetAdjustment` is
|
|
175
|
+
* `'automatic'`; a relative footer absorbs it instead. The footer inset is
|
|
176
|
+
* independent of `insetAdjustment` — it only covers the part of the footer
|
|
177
|
+
* overlapping the scroll view, and stacks with the keyboard inset while the
|
|
178
|
+
* footer rises above the keyboard.
|
|
179
|
+
*
|
|
180
|
+
* On iOS, the safe-area inset sets the scroll view's native
|
|
181
|
+
* [`contentInsetAdjustmentBehavior`](https://developer.apple.com/documentation/uikit/uiscrollview/contentinsetadjustmentbehavior)
|
|
182
|
+
* to `automatic` while it's plugged into the sheet; Android and Web apply
|
|
183
|
+
* the inset themselves.
|
|
184
|
+
*
|
|
185
|
+
* @default 'automatic'
|
|
186
|
+
*/
|
|
187
|
+
contentInsetAdjustment?: ContentInsetAdjustment;
|
|
155
188
|
/**
|
|
156
189
|
* Extra offset when scrolling to the focused input when keyboard appears.
|
|
157
190
|
*
|
|
158
191
|
* @default 0
|
|
159
192
|
*/
|
|
160
193
|
keyboardScrollOffset?: number;
|
|
194
|
+
/**
|
|
195
|
+
* Adjusts the bottom inset applied to the scrollable when the keyboard is shown.
|
|
196
|
+
* Positive values increase the inset; negative values reduce it.
|
|
197
|
+
* Pass `-insets.bottom` to cancel out safe-area padding already included in
|
|
198
|
+
* the content's `paddingBottom`.
|
|
199
|
+
* Does not affect the auto scroll of the focused input — it always targets
|
|
200
|
+
* the keyboard edge.
|
|
201
|
+
*
|
|
202
|
+
* @default 0
|
|
203
|
+
*/
|
|
204
|
+
keyboardOffset?: number;
|
|
161
205
|
/**
|
|
162
206
|
* Whether scrolling the content expands the sheet to the next detent.
|
|
163
207
|
* When `false`, only the grabber can expand the sheet.
|
|
@@ -222,27 +266,18 @@ export interface FooterOptions {
|
|
|
222
266
|
* @default 0
|
|
223
267
|
*/
|
|
224
268
|
keyboardOffset?: number;
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* Options for customizing the blur effect.
|
|
228
|
-
* Only applies when `backgroundBlur` is set.
|
|
229
|
-
*
|
|
230
|
-
* @platform ios
|
|
231
|
-
*/
|
|
232
|
-
export interface BlurOptions {
|
|
233
|
-
/**
|
|
234
|
-
* The intensity of the blur effect (0-100).
|
|
235
|
-
* Uses system default if not provided.
|
|
236
|
-
*/
|
|
237
|
-
intensity?: number;
|
|
238
269
|
/**
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
270
|
+
* Whether an `absolute` footer rises above the keyboard when it opens.
|
|
271
|
+
* Set to `false` to keep the footer pinned to the sheet's bottom edge behind the keyboard.
|
|
272
|
+
* With footer inset adjustment enabled, any uncovered portion still adds scroll padding
|
|
273
|
+
* and contributes to the expanded `auto` height.
|
|
274
|
+
* The pinned footer keeps its safe-area padding and ignores `keyboardOffset`.
|
|
275
|
+
* A `relative` footer never rises, so this has no effect.
|
|
242
276
|
*
|
|
277
|
+
* @platform ios, android
|
|
243
278
|
* @default true
|
|
244
279
|
*/
|
|
245
|
-
|
|
280
|
+
avoidKeyboard?: boolean;
|
|
246
281
|
}
|
|
247
282
|
/**
|
|
248
283
|
* Inset adjustment behavior for the sheet content.
|
|
@@ -264,6 +299,13 @@ export type InsetAdjustment =
|
|
|
264
299
|
* @platform ios
|
|
265
300
|
*/
|
|
266
301
|
export type BackgroundBlur = 'light' | 'dark' | 'default' | 'extra-light' | 'regular' | 'prominent' | 'system-ultra-thin-material' | 'system-thin-material' | 'system-material' | 'system-thick-material' | 'system-chrome-material' | 'system-ultra-thin-material-light' | 'system-thin-material-light' | 'system-material-light' | 'system-thick-material-light' | 'system-chrome-material-light' | 'system-ultra-thin-material-dark' | 'system-thin-material-dark' | 'system-material-dark' | 'system-thick-material-dark' | 'system-chrome-material-dark';
|
|
302
|
+
export type DetentBackground = string | {
|
|
303
|
+
color: ColorValue;
|
|
304
|
+
blur?: never;
|
|
305
|
+
} | {
|
|
306
|
+
blur: BackgroundBlur;
|
|
307
|
+
color?: never;
|
|
308
|
+
};
|
|
267
309
|
/**
|
|
268
310
|
* Supported Sheet detent.
|
|
269
311
|
*/
|
|
@@ -346,6 +388,20 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
346
388
|
* @default true
|
|
347
389
|
*/
|
|
348
390
|
initialDetentAnimated?: boolean;
|
|
391
|
+
/**
|
|
392
|
+
* Specify whether the sheet content should mount lazily, on first presentation.
|
|
393
|
+
* Set to `false` to mount the content before presentation without presenting the sheet.
|
|
394
|
+
* Use this when content is not ready on the first render, then call `present()`
|
|
395
|
+
* after your readiness signal so auto detents measure the settled content.
|
|
396
|
+
*
|
|
397
|
+
* Content that requires window attachment to measure, such as SwiftUI-hosted views,
|
|
398
|
+
* still only measures during presentation.
|
|
399
|
+
*
|
|
400
|
+
* @platform android
|
|
401
|
+
* @platform ios
|
|
402
|
+
* @default true
|
|
403
|
+
*/
|
|
404
|
+
lazy?: boolean;
|
|
349
405
|
/**
|
|
350
406
|
* The detent index that the sheet should start to dim the background.
|
|
351
407
|
* This is ignored if `dimmed` is set to `false`.
|
|
@@ -355,6 +411,7 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
355
411
|
dimmedDetentIndex?: number;
|
|
356
412
|
/**
|
|
357
413
|
* Prevents interactive dismissal of the Sheet.
|
|
414
|
+
* Blocked attempts fire `onDismissAttempt`, so you can confirm before dismissing programmatically.
|
|
358
415
|
*
|
|
359
416
|
* @default true
|
|
360
417
|
*/
|
|
@@ -369,8 +426,31 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
369
426
|
/**
|
|
370
427
|
* Main sheet background color.
|
|
371
428
|
* Uses system default when not provided.
|
|
429
|
+
*
|
|
430
|
+
* On supported iOS 26.1+ devices, uses a native color effect.
|
|
431
|
+
* `backgroundBlur` takes precedence on iOS.
|
|
432
|
+
* Use `backgroundStyle.backgroundColor` for an exact color or to tint glass or blur.
|
|
372
433
|
*/
|
|
373
434
|
backgroundColor?: ColorValue;
|
|
435
|
+
/**
|
|
436
|
+
* Backgrounds matched to `detents` by index. Strings are color values.
|
|
437
|
+
* Null or missing entries inherit
|
|
438
|
+
* `backgroundColor`/`backgroundBlur`. iOS 26.1+ transitions natively.
|
|
439
|
+
* Other platforms cross-fade after passing the midpoint between detents.
|
|
440
|
+
* Blur entries use the sheet background on Android and Web.
|
|
441
|
+
*/
|
|
442
|
+
detentBackgrounds?: (DetentBackground | null)[];
|
|
443
|
+
/**
|
|
444
|
+
* Custom background rendered behind the header, content, and footer.
|
|
445
|
+
* The wrapper fills the sheet and ignores touches.
|
|
446
|
+
* Size the element to fill it with `StyleSheet.absoluteFill`.
|
|
447
|
+
*/
|
|
448
|
+
background?: ReactNode;
|
|
449
|
+
/**
|
|
450
|
+
* Style for the background wrapper. Only `backgroundColor` is supported.
|
|
451
|
+
* Use an opaque color for an exact color, or a translucent color to tint glass or blur.
|
|
452
|
+
*/
|
|
453
|
+
backgroundStyle?: StyleProp<Pick<ViewStyle, 'backgroundColor'>>;
|
|
374
454
|
/**
|
|
375
455
|
* The sheet corner radius.
|
|
376
456
|
*
|
|
@@ -411,18 +491,12 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
411
491
|
presentation?: 'page' | 'form';
|
|
412
492
|
/**
|
|
413
493
|
* The blur effect style on iOS.
|
|
414
|
-
*
|
|
494
|
+
* Takes precedence over `backgroundColor`.
|
|
495
|
+
* Use `backgroundStyle.backgroundColor` to tint the blur.
|
|
415
496
|
*
|
|
416
497
|
* @platform ios
|
|
417
498
|
*/
|
|
418
499
|
backgroundBlur?: BackgroundBlur;
|
|
419
|
-
/**
|
|
420
|
-
* Options for customizing the blur effect.
|
|
421
|
-
* Only applies when `backgroundBlur` is set.
|
|
422
|
-
*
|
|
423
|
-
* @platform ios
|
|
424
|
-
*/
|
|
425
|
-
blurOptions?: BlurOptions;
|
|
426
500
|
/**
|
|
427
501
|
* Overrides `large` or `100%` height.
|
|
428
502
|
* Also sets the maximum height for 'auto' detents.
|
|
@@ -436,26 +510,30 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
436
510
|
*/
|
|
437
511
|
maxContentWidth?: number;
|
|
438
512
|
/**
|
|
439
|
-
*
|
|
513
|
+
* Horizontal placement of the sheet within the screen.
|
|
440
514
|
*
|
|
441
|
-
* - `'
|
|
442
|
-
* - `'
|
|
443
|
-
* - `'
|
|
515
|
+
* - `'automatic'`: The system decides (default). Centered on Android, Web, and iOS 26 and below.
|
|
516
|
+
* - `'center'`: Centers the sheet horizontally.
|
|
517
|
+
* - `'leading'`: Places the sheet on the leading edge (left in LTR, right in RTL).
|
|
518
|
+
* - `'trailing'`: Places the sheet on the trailing edge (right in LTR, left in RTL).
|
|
519
|
+
*
|
|
520
|
+
* `'automatic'` and `'center'` only differ on iOS 27+, where they map to
|
|
521
|
+
* `UISheetPresentationController.preferredPlacement`.
|
|
444
522
|
*
|
|
445
523
|
* Ignored on phones in portrait orientation.
|
|
446
524
|
*
|
|
447
|
-
* @default '
|
|
525
|
+
* @default 'automatic'
|
|
448
526
|
*/
|
|
449
|
-
|
|
527
|
+
placement?: 'automatic' | 'leading' | 'center' | 'trailing';
|
|
450
528
|
/**
|
|
451
529
|
* The offset from the screen edge.
|
|
452
|
-
* Only applies when `
|
|
530
|
+
* Only applies when `placement` is `'leading'` or `'trailing'`.
|
|
453
531
|
*
|
|
454
532
|
* @platform android
|
|
455
533
|
* @platform web
|
|
456
534
|
* @default 16
|
|
457
535
|
*/
|
|
458
|
-
|
|
536
|
+
placementOffset?: number;
|
|
459
537
|
/**
|
|
460
538
|
* Controls how the sheet adjusts its height for system insets (safe area).
|
|
461
539
|
*
|
|
@@ -495,8 +573,25 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
495
573
|
* Style for the footer container.
|
|
496
574
|
*/
|
|
497
575
|
footerStyle?: StyleProp<ViewStyle>;
|
|
576
|
+
/**
|
|
577
|
+
* A ref to the scrollable component (e.g. `ScrollView`, `FlatList`)
|
|
578
|
+
* rendered within the sheet content.
|
|
579
|
+
* Required for scrollable handling — nested scrolling, keyboard insets,
|
|
580
|
+
* and `auto` detent sizing are wired to this scrollable.
|
|
581
|
+
*
|
|
582
|
+
* Example:
|
|
583
|
+
* ```tsx
|
|
584
|
+
* const scrollableRef = useRef<ScrollView>(null)
|
|
585
|
+
*
|
|
586
|
+
* <TrueSheet scrollableRef={scrollableRef}>
|
|
587
|
+
* <ScrollView ref={scrollableRef} />
|
|
588
|
+
* </TrueSheet>
|
|
589
|
+
* ```
|
|
590
|
+
*/
|
|
591
|
+
scrollableRef?: RefObject<Component<unknown> | null>;
|
|
498
592
|
/**
|
|
499
593
|
* Options for scrollable behavior.
|
|
594
|
+
* Applies to the scrollable provided via `scrollableRef`.
|
|
500
595
|
*/
|
|
501
596
|
scrollableOptions?: ScrollableOptions;
|
|
502
597
|
/**
|
|
@@ -539,6 +634,12 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
539
634
|
* Called when the Sheet has been dismissed
|
|
540
635
|
*/
|
|
541
636
|
onDidDismiss?: (event: DidDismissEvent) => void;
|
|
637
|
+
/**
|
|
638
|
+
* Called when the user tries to dismiss the sheet while `dismissible` is `false`,
|
|
639
|
+
* e.g. by dragging down or pressing back/escape. Tapping the dim does not count.
|
|
640
|
+
* The sheet stays presented. Confirm with the user, then call `dismiss()` to proceed.
|
|
641
|
+
*/
|
|
642
|
+
onDismissAttempt?: (event: DismissAttemptEvent) => void;
|
|
542
643
|
/**
|
|
543
644
|
* Called when the detent of the sheet has changed.
|
|
544
645
|
* Either by dragging or programatically.
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"TrueSheet.types.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1F,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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AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzE;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;OAEG;IACH,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheet.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.web.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAaV,gBAAgB,EAChB,cAAc,EACd,sBAAsB,
|
|
1
|
+
{"version":3,"file":"TrueSheet.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.web.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAaV,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EAMvB,MAAM,mBAAmB,CAAC;AAwC3B,QAAA,MAAM,kBAAkB,6GAkrCtB,CAAC;AAqDH,eAAO,MAAM,SAAS,EAAyB,OAAO,kBAAkB,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TrueSheetProps } from './TrueSheet.types';
|
|
2
|
+
export declare const TrueSheetBackground: ({ background, backgroundStyle, }: Pick<TrueSheetProps, "background" | "backgroundStyle">) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=TrueSheetBackground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetBackground.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetBackground.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,eAAO,MAAM,mBAAmB,GAAI,kCAGjC,IAAI,CAAC,cAAc,EAAE,YAAY,GAAG,iBAAiB,CAAC,4CAUxD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Renders its children in a native layer above every presented sheet — for
|
|
4
|
+
* toasts, dialogs, and other content a sheet must not cover.
|
|
5
|
+
* Fills the window; touches that miss its children pass through to the views beneath.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TrueSheetOverlay: ({ style, ...rest }: ViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TrueSheetOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlay.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,SAAS,4CAE7D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Renders its children in a layer above every presented sheet — for
|
|
4
|
+
* toasts, dialogs, and other content a sheet must not cover.
|
|
5
|
+
* Fills the window; touches that miss its children pass through to the views beneath.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TrueSheetOverlay: ({ style, ...rest }: ViewProps) => import("react").ReactPortal | null;
|
|
8
|
+
//# sourceMappingURL=TrueSheetOverlay.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlay.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetOverlay.web.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,SAAS,uCAsB7D,CAAC"}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Registers a peek with the owning TrueSheet so it can measure the peek live.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
7
|
export interface TrueSheetPeekContextValue {
|
|
8
8
|
contentRef: RefObject<View | null>;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
attachPeek: (view: View) => void;
|
|
10
|
+
detachPeek: (view: View) => void;
|
|
11
|
+
measurePeek: (view: View) => void;
|
|
11
12
|
}
|
|
12
13
|
export declare const TrueSheetPeekContext: import("react").Context<TrueSheetPeekContextValue | null>;
|
|
13
14
|
/**
|
|
14
15
|
* Distance from the top of the content view to the bottom of the peek view,
|
|
15
16
|
* so the peek view's offset within the content (padding, views above it)
|
|
16
17
|
* counts toward the peek detent. Both rects live in the drawer's transformed
|
|
17
|
-
* subtree, so an in-flight translate cancels out of the delta.
|
|
18
|
+
* subtree, so an in-flight translate cancels out of the delta. Rounded so the
|
|
19
|
+
* sub-pixel noise of a mid-transition measurement doesn't register as a
|
|
20
|
+
* change — the content re-measures every frame while the snap animates, and
|
|
21
|
+
* a new value would restart the snap.
|
|
18
22
|
* @internal
|
|
19
23
|
*/
|
|
20
24
|
export declare const measurePeekContentHeight: (peekElement: HTMLElement, contentElement: HTMLElement) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetPeek.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"TrueSheetPeek.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAuC,MAAM,OAAO,CAAC;AAC3F,OAAO,EAA0B,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE5E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACnC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACjC,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,oBAAoB,2DAAwD,CAAC;AAE1F;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,WAAW,EACxB,gBAAgB,WAAW,KAC1B,MAGA,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,uBAAuB,SAAS,4CAyB7D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DetentBackground } from './TrueSheet.types';
|
|
2
|
+
export declare function normalizeDetentBackground(entry: DetentBackground | null | undefined): {
|
|
3
|
+
color: import("react-native").ColorValue;
|
|
4
|
+
blur?: never;
|
|
5
|
+
} | {
|
|
6
|
+
blur: import("./TrueSheet.types").BackgroundBlur;
|
|
7
|
+
color?: never;
|
|
8
|
+
} | null | undefined;
|
|
9
|
+
export declare function getDetentBackgroundIndex(height: number, detentHeights: readonly number[], displayedIndex: number): number;
|
|
10
|
+
//# sourceMappingURL=detentBackgrounds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detentBackgrounds.d.ts","sourceRoot":"","sources":["../../../src/detentBackgrounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS;;;;;;qBAEnF;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,SAAS,MAAM,EAAE,EAChC,cAAc,EAAE,MAAM,GACrB,MAAM,CAaR"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=TrueSheetOverlayViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlayViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetOverlayViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAID,wBAEG"}
|
|
@@ -18,13 +18,11 @@ type AccessibilityOptionsType = Readonly<{
|
|
|
18
18
|
collapseActionLabel?: WithDefault<string, 'Collapse'>;
|
|
19
19
|
paneTitle?: WithDefault<string, 'Bottom sheet'>;
|
|
20
20
|
}>;
|
|
21
|
-
type BlurOptionsType = Readonly<{
|
|
22
|
-
intensity?: WithDefault<Double, -1>;
|
|
23
|
-
interaction?: WithDefault<boolean, true>;
|
|
24
|
-
}>;
|
|
25
21
|
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
26
22
|
type ScrollableOptionsType = Readonly<{
|
|
23
|
+
contentInsetAdjustment?: WithDefault<'automatic' | 'safe-area' | 'footer' | 'never', 'automatic'>;
|
|
27
24
|
keyboardScrollOffset?: WithDefault<Double, 0>;
|
|
25
|
+
keyboardOffset?: WithDefault<Double, 0>;
|
|
28
26
|
scrollingExpandsSheet?: WithDefault<boolean, true>;
|
|
29
27
|
topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
30
28
|
bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
@@ -32,6 +30,7 @@ type ScrollableOptionsType = Readonly<{
|
|
|
32
30
|
type FooterOptionsType = Readonly<{
|
|
33
31
|
footerPosition?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
34
32
|
keyboardOffset?: WithDefault<Double, 0>;
|
|
33
|
+
avoidKeyboard?: WithDefault<boolean, true>;
|
|
35
34
|
}>;
|
|
36
35
|
type HeaderOptionsType = Readonly<{
|
|
37
36
|
position?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
@@ -49,6 +48,10 @@ export interface PositionChangeEventPayload {
|
|
|
49
48
|
}
|
|
50
49
|
export interface NativeProps extends ViewProps {
|
|
51
50
|
detents?: ReadonlyArray<Double>;
|
|
51
|
+
detentBackgrounds?: ReadonlyArray<Readonly<{
|
|
52
|
+
color?: ProcessedColorValue | null;
|
|
53
|
+
blur?: string;
|
|
54
|
+
}>>;
|
|
52
55
|
maxContentHeight?: WithDefault<Double, 0>;
|
|
53
56
|
maxContentWidth?: WithDefault<Double, 0>;
|
|
54
57
|
cornerRadius?: WithDefault<Double, -1>;
|
|
@@ -57,10 +60,9 @@ export interface NativeProps extends ViewProps {
|
|
|
57
60
|
initialDetentIndex?: WithDefault<Int32, -1>;
|
|
58
61
|
dimmedDetentIndex?: WithDefault<Int32, 0>;
|
|
59
62
|
backgroundBlur?: WithDefault<'none' | 'light' | 'dark' | 'default' | 'extra-light' | 'regular' | 'prominent' | 'system-ultra-thin-material' | 'system-thin-material' | 'system-material' | 'system-thick-material' | 'system-chrome-material' | 'system-ultra-thin-material-light' | 'system-thin-material-light' | 'system-material-light' | 'system-thick-material-light' | 'system-chrome-material-light' | 'system-ultra-thin-material-dark' | 'system-thin-material-dark' | 'system-material-dark' | 'system-thick-material-dark' | 'system-chrome-material-dark', 'none'>;
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
placement?: WithDefault<'automatic' | 'leading' | 'center' | 'trailing', 'automatic'>;
|
|
64
|
+
placementOffset?: WithDefault<Double, 16>;
|
|
62
65
|
insetAdjustment?: WithDefault<'automatic' | 'never', 'automatic'>;
|
|
63
|
-
blurOptions?: BlurOptionsType;
|
|
64
66
|
grabber?: WithDefault<boolean, true>;
|
|
65
67
|
grabberOptions?: GrabberOptionsType;
|
|
66
68
|
accessibilityOptions?: AccessibilityOptionsType;
|
|
@@ -68,6 +70,7 @@ export interface NativeProps extends ViewProps {
|
|
|
68
70
|
draggable?: WithDefault<boolean, true>;
|
|
69
71
|
dimmed?: WithDefault<boolean, true>;
|
|
70
72
|
initialDetentAnimated?: WithDefault<boolean, true>;
|
|
73
|
+
scrollableHandle?: WithDefault<Int32, -1>;
|
|
71
74
|
scrollableOptions?: ScrollableOptionsType;
|
|
72
75
|
headerOptions?: HeaderOptionsType;
|
|
73
76
|
footerOptions?: FooterOptionsType;
|
|
@@ -77,6 +80,7 @@ export interface NativeProps extends ViewProps {
|
|
|
77
80
|
onDidPresent?: DirectEventHandler<DetentInfoEventPayload>;
|
|
78
81
|
onWillDismiss?: DirectEventHandler<null>;
|
|
79
82
|
onDidDismiss?: DirectEventHandler<null>;
|
|
83
|
+
onDismissAttempt?: DirectEventHandler<null>;
|
|
80
84
|
onDetentChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
81
85
|
onDragBegin?: DirectEventHandler<DetentInfoEventPayload>;
|
|
82
86
|
onDragChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
@@ -1 +1 @@
|
|
|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,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,WAAW,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,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"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './TrueSheet';
|
|
2
2
|
export * from './TrueSheet.types';
|
|
3
3
|
export { TrueSheetPeek } from './TrueSheetPeek';
|
|
4
|
+
export { TrueSheetOverlay } from './TrueSheetOverlay';
|
|
4
5
|
export { TrueSheetProvider, useTrueSheet } from './TrueSheetProvider';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -29,6 +29,10 @@ export declare class TrueSheet extends React.Component<TrueSheetProps, TrueSheet
|
|
|
29
29
|
* Mock TrueSheetPeek component for testing.
|
|
30
30
|
*/
|
|
31
31
|
export declare function TrueSheetPeek({ children, ...rest }: ViewProps): React.CElement<ViewProps, View>;
|
|
32
|
+
/**
|
|
33
|
+
* Mock TrueSheetOverlay component for testing.
|
|
34
|
+
*/
|
|
35
|
+
export declare function TrueSheetOverlay({ children, ...rest }: ViewProps): React.CElement<ViewProps, View>;
|
|
32
36
|
/**
|
|
33
37
|
* Mock TrueSheetProvider for testing.
|
|
34
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAGjF,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAM;IAEjD,MAAM,CAAC,OAAO,kFAAsE;IACpF,MAAM,CAAC,YAAY,kFAAsE;IACzF,MAAM,CAAC,OAAO,+GAEZ;IACF,MAAM,CAAC,MAAM,iEAAiE;IAC9E,MAAM,CAAC,UAAU,mEAAuD;IAExE,OAAO,mEAAuD;IAC9D,YAAY,mEAAuD;IACnE,OAAO,gGAAwE;IAC/E,MAAM,kDAAkD;IAExD,iBAAiB;IAOjB,oBAAoB;IAOpB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAMpB,MAAM;CAWP;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,mCAE7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,mCAEhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,mBAE5E;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAQrD;AAED,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ParamListBase } from '
|
|
2
|
-
import type { TrueSheetNavigationProp } from '../navigation/types';
|
|
1
|
+
import type { ParamListBase } from '../navigation/expo-router/base-types';
|
|
2
|
+
import type { TrueSheetNavigationProp } from '../navigation/expo-router/types';
|
|
3
3
|
import { TrueSheetActions } from './navigation';
|
|
4
4
|
/**
|
|
5
5
|
* Mock Sheet layout for testing.
|
|
@@ -18,5 +18,5 @@ export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<P
|
|
|
18
18
|
export { TrueSheetActions };
|
|
19
19
|
export type { TrueSheetActionType } from '../navigation/actions';
|
|
20
20
|
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
21
|
-
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/types';
|
|
21
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/expo-router/types';
|
|
22
22
|
//# sourceMappingURL=navigationExpoRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigationExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigationExpoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"navigationExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigationExpoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,eAAO,MAAM,KAAK;cACmB,KAAK,CAAC,SAAS;;;;CAKnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAKlC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base navigation types for the React Navigation entry point.
|
|
3
|
+
*
|
|
4
|
+
* The Expo Router entry has its own copy sourced from `expo-router/react-navigation`
|
|
5
|
+
* (see `./expo-router/base-types`) because Expo Router apps never install
|
|
6
|
+
* `@react-navigation/*` — importing it there would silently resolve to `any`.
|
|
7
|
+
*/
|
|
8
|
+
export type { DefaultNavigatorOptions, Descriptor, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from '@react-navigation/core';
|
|
9
|
+
//# sourceMappingURL=base-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/base-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EACV,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC"}
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { TrueSheetNavigationState } from './types';
|
|
4
|
-
export type TrueSheetRouterOptions = StackRouterOptions;
|
|
5
|
-
/**
|
|
6
|
-
* The base `StackRouter` factory to wrap, typed generically over the state and
|
|
7
|
-
* action types the wrapper threads through — `StackRouter` is structural and
|
|
8
|
-
* never touches the sheet-specific fields.
|
|
9
|
-
* Injected by each entry point so the shared router never imports
|
|
10
|
-
* `@react-navigation/*` at runtime (Expo Router apps don't install it).
|
|
11
|
-
*/
|
|
12
|
-
export type StackRouterFactory = <State extends NavigationState<ParamListBase>, Action extends NavigationAction>(options: TrueSheetRouterOptions) => Router<State, Action>;
|
|
13
|
-
export declare const createTrueSheetRouter: (stackRouter: StackRouterFactory) => (routerOptions: TrueSheetRouterOptions) => Router<TrueSheetNavigationState<ParamListBase>, TrueSheetActionType>;
|
|
1
|
+
import type { TrueSheetRouter, TrueSheetRouterFactory, TrueSheetRouterOptions } from './types';
|
|
2
|
+
export declare const createTrueSheetRouter: (stackRouter: TrueSheetRouterFactory) => (routerOptions: TrueSheetRouterOptions) => TrueSheetRouter;
|
|
14
3
|
//# sourceMappingURL=createTrueSheetRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAgC/F,eAAO,MAAM,qBAAqB,GAC/B,aAAa,sBAAsB,MACnC,eAAe,sBAAsB,KAAG,eA8JxC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base navigation types for the Expo Router entry point.
|
|
3
|
+
*
|
|
4
|
+
* Sourced from Expo Router's vendored React Navigation so apps that only install
|
|
5
|
+
* `expo-router` still get real types — see `../base-types` for the React Navigation copy.
|
|
6
|
+
*/
|
|
7
|
+
export type { DefaultNavigatorOptions, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from 'expo-router/react-navigation';
|
|
8
|
+
//# sourceMappingURL=base-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/base-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
|