chore: add mobile app

This commit is contained in:
2026-02-07 22:33:02 +01:00
parent db34640acc
commit e89384ad4e
29327 changed files with 3886944 additions and 12 deletions
@@ -0,0 +1,15 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
import { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
// Internal export, not part of stable library API.
export interface NativeProps extends ViewProps {
accessibilityContainerViewIsModal?: WithDefault<boolean, true>;
}
export default codegenNativeComponent<NativeProps>('RNSFullWindowOverlay', {
interfaceOnly: true,
});
@@ -0,0 +1,118 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps, ColorValue } from 'react-native';
import type {
DirectEventHandler,
WithDefault,
Int32,
Float,
Double,
} from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @typescript-eslint/ban-types
type ScreenEvent = Readonly<{}>;
type ScreenDismissedEvent = Readonly<{
dismissCount: Int32;
}>;
type TransitionProgressEvent = Readonly<{
progress: Double;
closing: Int32;
goingForward: Int32;
}>;
type HeaderHeightChangeEvent = Readonly<{
headerHeight: Double;
}>;
type SheetDetentChangedEvent = Readonly<{
index: Int32;
isStable: boolean;
}>;
type GestureResponseDistanceType = Readonly<{
start: Float;
end: Float;
top: Float;
bottom: Float;
}>;
type StackPresentation =
| 'push'
| 'modal'
| 'transparentModal'
| 'fullScreenModal'
| 'formSheet'
| 'pageSheet'
| 'containedModal'
| 'containedTransparentModal';
type StackAnimation =
| 'default'
| 'flip'
| 'simple_push'
| 'none'
| 'fade'
| 'slide_from_right'
| 'slide_from_left'
| 'slide_from_bottom'
| 'fade_from_bottom'
| 'ios_from_right'
| 'ios_from_left';
type SwipeDirection = 'vertical' | 'horizontal';
type ReplaceAnimation = 'pop' | 'push';
export interface NativeProps extends ViewProps {
onAppear?: DirectEventHandler<ScreenEvent>;
onDisappear?: DirectEventHandler<ScreenEvent>;
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
onWillAppear?: DirectEventHandler<ScreenEvent>;
onWillDisappear?: DirectEventHandler<ScreenEvent>;
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
onGestureCancel?: DirectEventHandler<ScreenEvent>;
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
onSheetDetentChanged?: DirectEventHandler<SheetDetentChangedEvent>;
screenId?: WithDefault<string, ''>;
sheetAllowedDetents?: number[];
sheetLargestUndimmedDetent?: WithDefault<Int32, -1>;
sheetGrabberVisible?: WithDefault<boolean, false>;
sheetCornerRadius?: WithDefault<Float, -1.0>;
sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;
sheetInitialDetent?: WithDefault<Int32, 0>;
sheetElevation?: WithDefault<Int32, 24>;
customAnimationOnSwipe?: boolean;
fullScreenSwipeEnabled?: boolean;
fullScreenSwipeShadowEnabled?: WithDefault<boolean, true>;
homeIndicatorHidden?: boolean;
preventNativeDismiss?: boolean;
gestureEnabled?: WithDefault<boolean, true>;
statusBarColor?: ColorValue;
statusBarHidden?: boolean;
screenOrientation?: string;
statusBarAnimation?: string;
statusBarStyle?: string;
statusBarTranslucent?: boolean;
gestureResponseDistance?: GestureResponseDistanceType;
stackPresentation?: WithDefault<StackPresentation, 'push'>;
stackAnimation?: WithDefault<StackAnimation, 'default'>;
transitionDuration?: WithDefault<Int32, 500>;
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
hideKeyboardOnSwipe?: boolean;
activityState?: WithDefault<Float, -1.0>;
navigationBarColor?: ColorValue;
navigationBarTranslucent?: boolean;
navigationBarHidden?: boolean;
nativeBackButtonDismissalEnabled?: boolean;
}
export default codegenNativeComponent<NativeProps>('RNSModalScreen', {
interfaceOnly: true,
});
@@ -0,0 +1,8 @@
'use client';
import type { TurboModule } from 'react-native';
import { TurboModuleRegistry } from 'react-native';
export interface Spec extends TurboModule {}
export default TurboModuleRegistry.get<Spec>('RNSModule');
@@ -0,0 +1 @@
export default {};
@@ -0,0 +1,9 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
interface NativeProps extends ViewProps {}
export default codegenNativeComponent<NativeProps>('RNSScreenContainer', {});
@@ -0,0 +1,10 @@
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
export interface NativeProps extends ViewProps {}
export default codegenNativeComponent<NativeProps>(
'RNSScreenContentWrapper',
{},
);
@@ -0,0 +1,7 @@
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
export interface NativeProps extends ViewProps {}
export default codegenNativeComponent<NativeProps>('RNSScreenFooter', {});
@@ -0,0 +1,118 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps, ColorValue } from 'react-native';
import type {
DirectEventHandler,
WithDefault,
Int32,
Float,
Double,
} from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @typescript-eslint/ban-types
type ScreenEvent = Readonly<{}>;
type ScreenDismissedEvent = Readonly<{
dismissCount: Int32;
}>;
type TransitionProgressEvent = Readonly<{
progress: Double;
closing: Int32;
goingForward: Int32;
}>;
type HeaderHeightChangeEvent = Readonly<{
headerHeight: Double;
}>;
type SheetDetentChangedEvent = Readonly<{
index: Int32;
isStable: boolean;
}>;
type GestureResponseDistanceType = Readonly<{
start: Float;
end: Float;
top: Float;
bottom: Float;
}>;
type StackPresentation =
| 'push'
| 'modal'
| 'transparentModal'
| 'fullScreenModal'
| 'formSheet'
| 'pageSheet'
| 'containedModal'
| 'containedTransparentModal';
type StackAnimation =
| 'default'
| 'flip'
| 'simple_push'
| 'none'
| 'fade'
| 'slide_from_right'
| 'slide_from_left'
| 'slide_from_bottom'
| 'fade_from_bottom'
| 'ios_from_right'
| 'ios_from_left';
type SwipeDirection = 'vertical' | 'horizontal';
type ReplaceAnimation = 'pop' | 'push';
export interface NativeProps extends ViewProps {
onAppear?: DirectEventHandler<ScreenEvent>;
onDisappear?: DirectEventHandler<ScreenEvent>;
onDismissed?: DirectEventHandler<ScreenDismissedEvent>;
onNativeDismissCancelled?: DirectEventHandler<ScreenDismissedEvent>;
onWillAppear?: DirectEventHandler<ScreenEvent>;
onWillDisappear?: DirectEventHandler<ScreenEvent>;
onHeaderHeightChange?: DirectEventHandler<HeaderHeightChangeEvent>;
onTransitionProgress?: DirectEventHandler<TransitionProgressEvent>;
onGestureCancel?: DirectEventHandler<ScreenEvent>;
onHeaderBackButtonClicked?: DirectEventHandler<ScreenEvent>;
onSheetDetentChanged?: DirectEventHandler<SheetDetentChangedEvent>;
screenId?: WithDefault<string, ''>;
sheetAllowedDetents?: number[];
sheetLargestUndimmedDetent?: WithDefault<Int32, -1>;
sheetGrabberVisible?: WithDefault<boolean, false>;
sheetCornerRadius?: WithDefault<Float, -1.0>;
sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;
sheetInitialDetent?: WithDefault<Int32, 0>;
sheetElevation?: WithDefault<Int32, 24>;
customAnimationOnSwipe?: boolean;
fullScreenSwipeEnabled?: boolean;
fullScreenSwipeShadowEnabled?: WithDefault<boolean, true>;
homeIndicatorHidden?: boolean;
preventNativeDismiss?: boolean;
gestureEnabled?: WithDefault<boolean, true>;
statusBarColor?: ColorValue;
statusBarHidden?: boolean;
screenOrientation?: string;
statusBarAnimation?: string;
statusBarStyle?: string;
statusBarTranslucent?: boolean;
gestureResponseDistance?: GestureResponseDistanceType;
stackPresentation?: WithDefault<StackPresentation, 'push'>;
stackAnimation?: WithDefault<StackAnimation, 'default'>;
transitionDuration?: WithDefault<Int32, 500>;
replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;
swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;
hideKeyboardOnSwipe?: boolean;
activityState?: WithDefault<Float, -1.0>;
navigationBarColor?: ColorValue;
navigationBarTranslucent?: boolean;
navigationBarHidden?: boolean;
nativeBackButtonDismissalEnabled?: boolean;
}
export default codegenNativeComponent<NativeProps>('RNSScreen', {
interfaceOnly: true,
});
@@ -0,0 +1,12 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
interface NativeProps extends ViewProps {}
export default codegenNativeComponent<NativeProps>(
'RNSScreenNavigationContainer',
{},
);
@@ -0,0 +1,83 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps, ColorValue } from 'react-native';
import type {
Int32,
WithDefault,
DirectEventHandler,
} from 'react-native/Libraries/Types/CodegenTypes';
type DirectionType = 'rtl' | 'ltr';
// eslint-disable-next-line @typescript-eslint/ban-types
type OnAttachedEvent = Readonly<{}>;
// eslint-disable-next-line @typescript-eslint/ban-types
type OnDetachedEvent = Readonly<{}>;
type BackButtonDisplayMode = 'minimal' | 'default' | 'generic';
type BlurEffect =
| 'none'
| 'extraLight'
| 'light'
| 'dark'
| 'regular'
| 'prominent'
| 'systemUltraThinMaterial'
| 'systemThinMaterial'
| 'systemMaterial'
| 'systemThickMaterial'
| 'systemChromeMaterial'
| 'systemUltraThinMaterialLight'
| 'systemThinMaterialLight'
| 'systemMaterialLight'
| 'systemThickMaterialLight'
| 'systemChromeMaterialLight'
| 'systemUltraThinMaterialDark'
| 'systemThinMaterialDark'
| 'systemMaterialDark'
| 'systemThickMaterialDark'
| 'systemChromeMaterialDark';
export interface NativeProps extends ViewProps {
onAttached?: DirectEventHandler<OnAttachedEvent>;
onDetached?: DirectEventHandler<OnDetachedEvent>;
backgroundColor?: ColorValue;
backTitle?: string;
backTitleFontFamily?: string;
backTitleFontSize?: Int32;
backTitleVisible?: WithDefault<boolean, 'true'>;
color?: ColorValue;
direction?: WithDefault<DirectionType, 'ltr'>;
hidden?: boolean;
hideShadow?: boolean;
largeTitle?: boolean;
largeTitleFontFamily?: string;
largeTitleFontSize?: Int32;
largeTitleFontWeight?: string;
largeTitleBackgroundColor?: ColorValue;
largeTitleHideShadow?: boolean;
largeTitleColor?: ColorValue;
translucent?: boolean;
title?: string;
titleFontFamily?: string;
titleFontSize?: Int32;
titleFontWeight?: string;
titleColor?: ColorValue;
disableBackButtonMenu?: boolean;
backButtonDisplayMode?: WithDefault<BackButtonDisplayMode, 'default'>;
hideBackButton?: boolean;
backButtonInCustomView?: boolean;
blurEffect?: WithDefault<BlurEffect, 'none'>;
// TODO: implement this props on iOS
topInsetEnabled?: boolean;
}
export default codegenNativeComponent<NativeProps>(
'RNSScreenStackHeaderConfig',
{
interfaceOnly: true,
},
);
@@ -0,0 +1,25 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
export type HeaderSubviewTypes =
| 'back'
| 'right'
| 'left'
| 'title'
| 'center'
| 'searchBar';
export interface NativeProps extends ViewProps {
type?: WithDefault<HeaderSubviewTypes, 'left'>;
}
export default codegenNativeComponent<NativeProps>(
'RNSScreenStackHeaderSubview',
{
interfaceOnly: true,
},
);
@@ -0,0 +1,15 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps } from 'react-native';
import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @typescript-eslint/ban-types
type FinishTransitioningEvent = Readonly<{}>;
export interface NativeProps extends ViewProps {
onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>;
}
export default codegenNativeComponent<NativeProps>('RNSScreenStack', {});
@@ -0,0 +1,87 @@
'use client';
/* eslint-disable */
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ViewProps, ColorValue, HostComponent } from 'react-native';
import type {
WithDefault,
DirectEventHandler,
} from 'react-native/Libraries/Types/CodegenTypes';
import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
export type SearchBarEvent = Readonly<{}>;
export type SearchButtonPressedEvent = Readonly<{
text?: string;
}>;
export type ChangeTextEvent = Readonly<{
text?: string;
}>;
type SearchBarPlacement =
| 'automatic'
| 'inline' // deprecated starting from iOS 26
| 'stacked'
| 'integrated'
| 'integratedButton'
| 'integratedCentered';
type AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';
export interface NativeProps extends ViewProps {
onSearchFocus?: DirectEventHandler<SearchBarEvent> | null;
onSearchBlur?: DirectEventHandler<SearchBarEvent> | null;
onSearchButtonPress?: DirectEventHandler<SearchButtonPressedEvent> | null;
onCancelButtonPress?: DirectEventHandler<SearchBarEvent> | null;
onChangeText?: DirectEventHandler<ChangeTextEvent> | null;
hideWhenScrolling?: WithDefault<boolean, true>;
autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>;
placeholder?: string;
placement?: WithDefault<SearchBarPlacement, 'automatic'>;
allowToolbarIntegration?: WithDefault<boolean, true>;
obscureBackground?: boolean;
hideNavigationBar?: boolean;
cancelButtonText?: string;
// TODO: implement these on iOS
barTintColor?: ColorValue;
tintColor?: ColorValue;
textColor?: ColorValue;
// Android only
disableBackButtonOverride?: boolean;
// TODO: consider creating enum here
inputType?: string;
onClose?: DirectEventHandler<SearchBarEvent> | null;
onOpen?: DirectEventHandler<SearchBarEvent> | null;
hintTextColor?: ColorValue;
headerIconColor?: ColorValue;
shouldShowHintSearchIcon?: WithDefault<boolean, true>;
}
type ComponentType = HostComponent<NativeProps>;
interface NativeCommands {
blur: (viewRef: React.ElementRef<ComponentType>) => void;
focus: (viewRef: React.ElementRef<ComponentType>) => void;
clearText: (viewRef: React.ElementRef<ComponentType>) => void;
toggleCancelButton: (
viewRef: React.ElementRef<ComponentType>,
flag: boolean,
) => void;
setText: (viewRef: React.ElementRef<ComponentType>, text: string) => void;
cancelSearch: (viewRef: React.ElementRef<ComponentType>) => void;
}
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
supportedCommands: [
'blur',
'focus',
'clearText',
'toggleCancelButton',
'setText',
'cancelSearch',
],
});
export default codegenNativeComponent<NativeProps>('RNSSearchBar', {});
@@ -0,0 +1,73 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type { ColorValue, ViewProps } from 'react-native';
import type {
DirectEventHandler,
Float,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
// TODO: Report issue on RN repo, that nesting color value inside a struct does not work.
// Generated code is ok, but the value is not passed down correctly - whatever color is set
// host component receives RGBA(0, 0, 0, 0) anyway.
// type TabBarAppearance = {
// backgroundColor?: ColorValue;
// };
type NativeFocusChangeEvent = {
tabKey: string;
};
type TabBarItemLabelVisibilityMode =
| 'auto'
| 'selected'
| 'labeled'
| 'unlabeled';
type TabBarMinimizeBehavior =
| 'automatic'
| 'never'
| 'onScrollDown'
| 'onScrollUp';
export interface NativeProps extends ViewProps {
// Events
onNativeFocusChange?: DirectEventHandler<NativeFocusChangeEvent>;
// Appearance
// tabBarAppearance?: TabBarAppearance; // Does not work due to codegen issue.
// Android-specific
tabBarBackgroundColor?: ColorValue;
tabBarItemTitleFontFamily?: string;
tabBarItemTitleFontSize?: Float;
tabBarItemTitleFontSizeActive?: Float;
tabBarItemTitleFontWeight?: string;
tabBarItemTitleFontStyle?: string;
tabBarItemTitleFontColor?: ColorValue;
tabBarItemTitleFontColorActive?: ColorValue;
tabBarItemIconColor?: ColorValue;
tabBarItemIconColorActive?: ColorValue;
tabBarItemActiveIndicatorColor?: ColorValue;
tabBarItemActiveIndicatorEnabled?: WithDefault<boolean, true>;
tabBarItemRippleColor?: ColorValue;
tabBarItemLabelVisibilityMode?: WithDefault<
TabBarItemLabelVisibilityMode,
'auto'
>;
// iOS-specific
tabBarTintColor?: ColorValue;
tabBarMinimizeBehavior?: WithDefault<TabBarMinimizeBehavior, 'automatic'>;
// Control
// Experimental support
controlNavigationStateInJS?: WithDefault<boolean, false>;
}
export default codegenNativeComponent<NativeProps>('RNSBottomTabs', {
interfaceOnly: true,
});
@@ -0,0 +1,161 @@
'use client';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type {
ColorValue,
ImageSource,
ProcessedColorValue,
ViewProps,
} from 'react-native';
import {
DirectEventHandler,
Float,
Int32,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
import { UnsafeMixed } from './codegenUtils';
// iOS-specific: SFSymbol, image as a template usage
export type IconType = 'image' | 'template' | 'sfSymbol';
// eslint-disable-next-line @typescript-eslint/ban-types
type GenericEmptyEvent = Readonly<{}>;
type LifecycleStateChangeEvent = Readonly<{
previousState: Int32;
newState: Int32;
}>;
export type ItemStateAppearance = {
tabBarItemTitleFontFamily?: string;
tabBarItemTitleFontSize?: Float;
tabBarItemTitleFontWeight?: string;
tabBarItemTitleFontStyle?: string;
tabBarItemTitleFontColor?: ProcessedColorValue | null;
tabBarItemTitlePositionAdjustment?: {
horizontal?: Float;
vertical?: Float;
};
tabBarItemIconColor?: ProcessedColorValue | null;
tabBarItemBadgeBackgroundColor?: ProcessedColorValue | null;
};
export type ItemAppearance = {
normal?: ItemStateAppearance;
selected?: ItemStateAppearance;
focused?: ItemStateAppearance;
disabled?: ItemStateAppearance;
};
export type Appearance = {
stacked?: ItemAppearance;
inline?: ItemAppearance;
compactInline?: ItemAppearance;
tabBarBackgroundColor?: ProcessedColorValue | null;
tabBarShadowColor?: ProcessedColorValue | null;
tabBarBlurEffect?: WithDefault<BlurEffect, 'systemDefault'>;
};
type BlurEffect =
| 'none'
| 'systemDefault'
| 'extraLight'
| 'light'
| 'dark'
| 'regular'
| 'prominent'
| 'systemUltraThinMaterial'
| 'systemThinMaterial'
| 'systemMaterial'
| 'systemThickMaterial'
| 'systemChromeMaterial'
| 'systemUltraThinMaterialLight'
| 'systemThinMaterialLight'
| 'systemMaterialLight'
| 'systemThickMaterialLight'
| 'systemChromeMaterialLight'
| 'systemUltraThinMaterialDark'
| 'systemThinMaterialDark'
| 'systemMaterialDark'
| 'systemThickMaterialDark'
| 'systemChromeMaterialDark';
type Orientation =
| 'inherit'
| 'all'
| 'allButUpsideDown'
| 'portrait'
| 'portraitUp'
| 'portraitDown'
| 'landscape'
| 'landscapeLeft'
| 'landscapeRight';
type SystemItem =
| 'none'
| 'bookmarks'
| 'contacts'
| 'downloads'
| 'favorites'
| 'featured'
| 'history'
| 'more'
| 'mostRecent'
| 'mostViewed'
| 'recents'
| 'search'
| 'topRated';
export interface NativeProps extends ViewProps {
// Events
onLifecycleStateChange?: DirectEventHandler<LifecycleStateChangeEvent>;
onWillAppear?: DirectEventHandler<GenericEmptyEvent>;
onDidAppear?: DirectEventHandler<GenericEmptyEvent>;
onWillDisappear?: DirectEventHandler<GenericEmptyEvent>;
onDidDisappear?: DirectEventHandler<GenericEmptyEvent>;
// Control
isFocused?: boolean;
tabKey: string;
// General
title?: string | undefined | null;
badgeValue?: string;
// Currently iOS-only
orientation?: WithDefault<Orientation, 'inherit'>;
// Android-specific image handling
iconResourceName?: string;
iconResource?: ImageSource;
tabBarItemBadgeTextColor?: ColorValue;
tabBarItemBadgeBackgroundColor?: ColorValue;
// iOS-specific
standardAppearance?: UnsafeMixed<Appearance>;
scrollEdgeAppearance?: UnsafeMixed<Appearance>;
iconType?: WithDefault<IconType, 'sfSymbol'>;
iconImageSource?: ImageSource;
iconSfSymbolName?: string;
selectedIconImageSource?: ImageSource;
selectedIconSfSymbolName?: string;
systemItem?: WithDefault<SystemItem, 'none'>;
specialEffects?: {
repeatedTabSelection?: {
popToRoot?: WithDefault<boolean, true>;
scrollToTop?: WithDefault<boolean, true>;
};
};
overrideScrollViewContentInsetAdjustmentBehavior?: WithDefault<boolean, true>;
}
export default codegenNativeComponent<NativeProps>('RNSBottomTabsScreen', {});
@@ -0,0 +1,6 @@
// copied from https://github.com/software-mansion/react-native-svg/blob/be06e84ec4809a8071f18f9824ffbe61424ee80d/src/fabric/codegenUtils.ts
// codegen will generate folly::dynamic in place of this type, but it's not exported by RN
// since codegen doesn't really follow imports, this way we can trick it into generating the correct type
// while keeping typescript happy
export type UnsafeMixed<T> = T;
@@ -0,0 +1,9 @@
'use client';
import type { ViewProps } from 'react-native';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
export interface NativeProps extends ViewProps {}
export default codegenNativeComponent<NativeProps>('RNSScreenStackHost', {});
@@ -0,0 +1,89 @@
'use client';
import type { ViewProps } from 'react-native';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
import type {
DirectEventHandler,
Float,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @typescript-eslint/ban-types
type GenericEmptyEvent = Readonly<{}>;
type DisplayModeWillChangeEvent = {
currentDisplayMode: string;
nextDisplayMode: string;
};
type SplitViewDisplayModeButtonVisibility = 'always' | 'automatic' | 'never';
type SplitViewSplitBehavior = 'automatic' | 'displace' | 'overlay' | 'tile';
type SplitViewPrimaryEdge = 'leading' | 'trailing';
type SplitViewDisplayMode =
| 'automatic'
| 'secondaryOnly'
| 'oneBesideSecondary'
| 'oneOverSecondary'
| 'twoBesideSecondary'
| 'twoOverSecondary'
| 'twoDisplaceSecondary';
type SplitViewOrientation =
| 'inherit'
| 'all'
| 'allButUpsideDown'
| 'portrait'
| 'portraitUp'
| 'portraitDown'
| 'landscape'
| 'landscapeLeft'
| 'landscapeRight';
interface ColumnMetrics {
minimumPrimaryColumnWidth?: WithDefault<Float, -1.0>;
maximumPrimaryColumnWidth?: WithDefault<Float, -1.0>;
preferredPrimaryColumnWidthOrFraction?: WithDefault<Float, -1.0>;
minimumSupplementaryColumnWidth?: WithDefault<Float, -1.0>;
maximumSupplementaryColumnWidth?: WithDefault<Float, -1.0>;
preferredSupplementaryColumnWidthOrFraction?: WithDefault<Float, -1.0>;
// iOS 26 only
minimumSecondaryColumnWidth?: WithDefault<Float, -1.0>;
preferredSecondaryColumnWidthOrFraction?: WithDefault<Float, -1.0>;
minimumInspectorColumnWidth?: WithDefault<Float, -1.0>;
maximumInspectorColumnWidth?: WithDefault<Float, -1.0>;
preferredInspectorColumnWidthOrFraction?: WithDefault<Float, -1.0>;
}
interface NativeProps extends ViewProps {
// Appearance
preferredDisplayMode?: WithDefault<SplitViewDisplayMode, 'automatic'>;
preferredSplitBehavior?: WithDefault<SplitViewSplitBehavior, 'automatic'>;
primaryEdge?: WithDefault<SplitViewPrimaryEdge, 'leading'>;
showSecondaryToggleButton?: WithDefault<boolean, false>;
displayModeButtonVisibility?: WithDefault<
SplitViewDisplayModeButtonVisibility,
'automatic'
>;
columnMetrics?: ColumnMetrics;
orientation?: WithDefault<SplitViewOrientation, 'inherit'>;
// Interactions
presentsWithGesture?: WithDefault<boolean, true>;
showInspector?: WithDefault<boolean, false>;
// Custom events
onCollapse?: DirectEventHandler<GenericEmptyEvent>;
onDisplayModeWillChange?: DirectEventHandler<DisplayModeWillChangeEvent>;
onExpand?: DirectEventHandler<GenericEmptyEvent>;
onInspectorHide?: DirectEventHandler<GenericEmptyEvent>;
}
export default codegenNativeComponent<NativeProps>('RNSSplitViewHost', {});
@@ -0,0 +1,29 @@
'use client';
import type { ViewProps } from 'react-native';
import {
DirectEventHandler,
WithDefault,
} from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
// eslint-disable-next-line @typescript-eslint/ban-types
type GenericEmptyEvent = Readonly<{}>;
type SplitViewScreenColumnType = 'column' | 'inspector';
interface NativeProps extends ViewProps {
// Config
columnType?: WithDefault<SplitViewScreenColumnType, 'column'>;
// Events
onWillAppear?: DirectEventHandler<GenericEmptyEvent>;
onDidAppear?: DirectEventHandler<GenericEmptyEvent>;
onWillDisappear?: DirectEventHandler<GenericEmptyEvent>;
onDidDisappear?: DirectEventHandler<GenericEmptyEvent>;
}
export default codegenNativeComponent<NativeProps>('RNSSplitViewScreen', {
interfaceOnly: true,
});
@@ -0,0 +1,26 @@
'use client';
import type { ViewProps } from 'react-native';
import {
DirectEventHandler,
Int32,
} from 'react-native/Libraries/Types/CodegenTypes';
// eslint-disable-next-line @react-native/no-deep-imports
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
// eslint-disable-next-line @typescript-eslint/ban-types
export type GenericEmptyEvent = Readonly<{}>;
export interface NativeProps extends ViewProps {
// Control
maxLifecycleState: Int32;
screenKey: string;
// Events
onWillAppear?: DirectEventHandler<GenericEmptyEvent>;
onDidAppear?: DirectEventHandler<GenericEmptyEvent>;
onWillDisappear?: DirectEventHandler<GenericEmptyEvent>;
onDidDisappear?: DirectEventHandler<GenericEmptyEvent>;
}
export default codegenNativeComponent<NativeProps>('RNSStackScreen', {});