import type { ColorValue, ProcessedColorValue, ViewProps } from 'react-native'; import type { DirectEventHandler, Double, Int32, WithDefault, } from 'react-native/Libraries/Types/CodegenTypes'; import { codegenNativeComponent } from 'react-native'; type GrabberOptionsType = Readonly<{ width?: Double; height?: Double; topMargin?: Double; cornerRadius?: WithDefault; color?: ProcessedColorValue | null; adaptive?: WithDefault; }>; type BlurOptionsType = Readonly<{ intensity?: WithDefault; interaction?: WithDefault; }>; type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden'; type ScrollableOptionsType = Readonly<{ keyboardScrollOffset?: WithDefault; scrollingExpandsSheet?: WithDefault; topScrollEdgeEffect?: WithDefault; bottomScrollEdgeEffect?: WithDefault; }>; type FooterOptionsType = Readonly<{ keyboardOffset?: WithDefault; }>; export interface DetentInfoEventPayload { index: Int32; position: Double; detent: Double; } export interface PositionChangeEventPayload { index: Double; position: Double; detent: Double; realtime: boolean; } export interface NativeProps extends ViewProps { // Array properties detents?: ReadonlyArray; // Number properties - use 0 as default to avoid nil insertion maxContentHeight?: WithDefault; maxContentWidth?: WithDefault; cornerRadius?: WithDefault; elevation?: WithDefault; // Color properties backgroundColor?: ColorValue; initialDetentIndex?: WithDefault; dimmedDetentIndex?: WithDefault; // String properties - use empty string as default to avoid nil insertion 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' >; anchor?: WithDefault<'left' | 'center' | 'right', 'center'>; anchorOffset?: WithDefault; insetAdjustment?: WithDefault<'automatic' | 'never', 'automatic'>; // Blur options blurOptions?: BlurOptionsType; // Boolean properties - match defaults from TrueSheet.types.ts grabber?: WithDefault; grabberOptions?: GrabberOptionsType; dismissible?: WithDefault; draggable?: WithDefault; dimmed?: WithDefault; initialDetentAnimated?: WithDefault; scrollable?: WithDefault; scrollableOptions?: ScrollableOptionsType; footerOptions?: FooterOptionsType; presentation?: WithDefault<'page' | 'form', 'page'>; // Event handlers onMount?: DirectEventHandler; onWillPresent?: DirectEventHandler; onDidPresent?: DirectEventHandler; onWillDismiss?: DirectEventHandler; onDidDismiss?: DirectEventHandler; onDetentChange?: DirectEventHandler; onDragBegin?: DirectEventHandler; onDragChange?: DirectEventHandler; onDragEnd?: DirectEventHandler; onPositionChange?: DirectEventHandler; onWillFocus?: DirectEventHandler; onDidFocus?: DirectEventHandler; onWillBlur?: DirectEventHandler; onDidBlur?: DirectEventHandler; onVisibilityChange?: DirectEventHandler>; } export default codegenNativeComponent('TrueSheetView', { interfaceOnly: true, });