import type { Ref } from '@innet/utils'; import type { AbsoluteLayout, AccessibilityDecrementEventData, AccessibilityIncrementEventData, ActionBar, ActionItem, ActivityIndicator, Button, ContainerView, ContentView, CreateViewEventData, DatePicker, DockLayout, EditableTextBase, EventData, FlexboxLayout, FormattedString, Frame, GridLayout, HtmlView, Image, ItemEventData, Label, LayoutBase, ListPicker, ListView, NavigatedData, NavigationButton, NavigationData, NavigationEntry, Page, Placeholder, Progress, PropertyChangeData, ProxyViewContainer, RootLayout, ScrollEventData, ScrollView, SearchBar, SearchEventData, SegmentedBar, SegmentedBarItem, SelectedIndexChangedEventData, ShownModallyData, Slider, Span, SplitView, StackLayout, Switch, TabView, TabViewItem, TextBase, TextField, TextView, TimePicker, View, ViewBase, WebView, WrapLayout } from '@nativescript/core'; import type { AndroidActionBarSettings } from '@nativescript/core/ui/action-bar'; import type { AndroidFrame, iOSFrame } from '@nativescript/core/ui/frame'; import type { WatchValue } from '@watch-state/utils'; import { type AbsoluteLayoutNSProps, type ActionBarNSProps, type ActionItemNSProps, type ActivityIndicatorNSProps, type ButtonNSProps, type ContainerViewNSProps, type ContentViewNSProps, type DatePickerNSProps, type DockLayoutNSProps, type EditableTextBaseNSProps, type FlexboxLayoutNSProps, type FormattedStringNSProps, type FrameNSProps, type GridLayoutNSProps, type HtmlViewNSProps, type ImageNSProps, type LabelNSProps, type LayoutBaseNSProps, type ListPickerNSProps, type ListViewNSProps, type NavigationButtonNSProps, type PageNSProps, type PlaceholderNSProps, type ProgressNSProps, type ProxyViewContainerNSProps, type RootLayoutNSProps, type ScrollViewNSProps, type SearchBarNSProps, type SegmentedBarItemNSProps, type SegmentedBarNSProps, type SliderNSProps, type SpanNSProps, type SplitViewNSProps, type StackLayoutNSProps, type SwitchNSProps, type TabViewItemNSProps, type TabViewNSProps, type TextBaseNSProps, type TextFieldNSProps, type TextViewNSProps, type TimePickerNSProps, type ViewBaseNSProps, type ViewNSProps, type WebViewNSProps, type WrapLayoutNSProps } from './nsProps'; import type { AnimateProp, AnimateProps, GetNSProps, ObservableStyle } from './types'; export interface ChildrenProps { children?: JSX.Element; } export type ViewBaseProps = ViewBaseNSProps> = GetNSProps

& { ref?: Ref; style?: ObservableStyle; ios?: Record; android?: Record; onLoaded?: (event: EventData) => void; onUnloaded?: (event: EventData) => void; onCreated?: (event: EventData) => void; onDisposeNativeView?: (event: EventData) => void; }; export type ViewProps = ViewNSProps> = ViewBaseProps & { onAndroidBackPressed?: (event: EventData) => void; onShowingModally?: (event: EventData) => void; onShownModally?: (event: EventData) => void; onLayoutChanged?: (event: EventData) => void; onAccessibilityBlur?: (event: EventData) => void; onAccessibilityFocus?: (event: EventData) => void; onAccessibilityFocusChangedEvent?: (event: EventData) => void; onAndroidOverflowInset?: (event: EventData) => void; scale?: WatchValue; animate?: WatchValue; startingStyle?: AnimateProps; endingStyle?: AnimateProps; }; export type ButtonProps = ButtonNSProps> = TextBaseProps & { onTap?: (event: EventData) => void; }; export type PageProps = PageNSProps> = ContentViewProps & { navigation?: NavigationEntry; onNavigatingTo?: (event: NavigatedData) => void; onNavigatedTo?: (event: NavigatedData) => void; onNavigatingFrom?: (event: NavigatedData) => void; onNavigatedFrom?: (event: NavigatedData) => void; onShowingModally?: (event: ShownModallyData) => void; onShownModally?: (event: ShownModallyData) => void; }; export type FrameProps = FrameNSProps> = ContainerViewProps & { android?: AndroidFrame; ios?: iOSFrame; onOptionSelected?: (event: EventData) => void; onNavigatingTo?: (event: NavigationData) => void; onNavigatedTo?: (event: NavigationData) => void; }; export type ImageProps = ImageNSProps> = ViewProps & { onIsLoading?: (event: EventData) => void; }; export type SwitchProps = SwitchNSProps> = ViewProps & { onCheckedChange?: (event: PropertyChangeData) => void; }; export type EditableTextBaseProps = EditableTextBaseNSProps> = TextBaseProps & { onBlur?: (event: EventData) => void; onFocus?: (event: EventData) => void; }; export type TextFieldProps = TextFieldNSProps> = EditableTextBaseProps & { onTextChange?: (event: PropertyChangeData) => void; onReturnPress?: (event: EventData) => void; }; export type TextViewProps = TextViewNSProps> = EditableTextBaseProps & { onTextChange?: (event: PropertyChangeData) => void; onReturnPress?: (event: EventData) => void; }; export type TimePickerProps = TimePickerNSProps> = ViewProps & { onTimeChange?: (event: PropertyChangeData) => void; }; export type WebViewProps = WebViewNSProps> = ViewProps & { onLoadStarted?: (event: EventData) => void; onLoadFinished?: (event: EventData) => void; }; export type SliderProps = SliderNSProps> = ViewProps & { onValueChange?: (event: PropertyChangeData) => void; onAccessibilityDecrement?: (event: AccessibilityDecrementEventData) => void; onAccessibilityIncrement?: (event: AccessibilityIncrementEventData) => void; }; export type PlaceholderProps = PlaceholderNSProps> = ViewProps & { onCreatingView?: (event: CreateViewEventData) => void; }; export type DatePickerProps = DatePickerNSProps> = ViewProps & { onDateChangeEvent?: (event: PropertyChangeData) => void; }; export type ProgressProps = ProgressNSProps> = ViewProps & { onValueChange?: (event: PropertyChangeData) => void; }; export type ScrollViewProps = ScrollViewNSProps> = ContentViewProps & { onScroll?: (event: ScrollEventData) => void; }; export type SearchBarProps = SearchBarNSProps> = ViewProps & { onTextChange?: (event: PropertyChangeData) => void; onSubmit?: (event: EventData) => void; onClear?: (event: EventData) => void; }; export type ActionItemProps = ActionItemNSProps> = ViewBaseProps & ChildrenProps & { onTap?: (event: EventData) => void; }; export type ActionBarProps = ActionBarNSProps> = ViewProps & ChildrenProps & { android?: AndroidActionBarSettings; }; export type ListPickerProps = ListPickerNSProps> = ViewProps & { onSelectedIndexChange?: (event: PropertyChangeData) => void; }; export type ListViewProps = ListViewNSProps> = ViewProps & { onItemTap?: (event: ItemEventData) => void; onItemLoading?: (event: ItemEventData) => void; onLoadMoreItems?: (event: EventData) => void; onSearchChange?: (event: SearchEventData) => void; }; export type SegmentedBarProps = SegmentedBarNSProps> = ViewProps & ChildrenProps & { onSelectedIndexChanged?: (event: SelectedIndexChangedEventData) => void; }; export type TabViewProps = TabViewNSProps> = ViewProps & ChildrenProps & { onSelectedIndexChanged?: (event: SelectedIndexChangedEventData) => void; }; export type SpanProps = SpanNSProps> = ViewBaseProps & { onLinkTap?: (event: EventData) => void; }; export type TabViewItemProps = TabViewItemNSProps> = ViewBaseProps & ChildrenProps; export type ContainerViewProps = ContainerViewNSProps> = ViewProps & ChildrenProps; export type LayoutBaseProps = LayoutBaseNSProps> = ContainerViewProps; export type GridLayoutProps = GridLayoutNSProps> = LayoutBaseProps; export type RootLayoutProps = RootLayoutNSProps> = GridLayoutProps; export type FormattedStringProps = FormattedStringNSProps> = ViewBaseProps & ChildrenProps; export type TextBaseProps = TextBaseNSProps> = ViewProps & ChildrenProps; export type FlexboxLayoutProps = FlexboxLayoutNSProps> = LayoutBaseProps; export type ContentViewProps = ContentViewNSProps> = ContainerViewProps; export type StackLayoutProps = StackLayoutNSProps> = LayoutBaseProps; export type WrapLayoutProps = WrapLayoutNSProps> = LayoutBaseProps; export type DockLayoutProps = DockLayoutNSProps> = LayoutBaseProps; export type AbsoluteLayoutProps = AbsoluteLayoutNSProps> = LayoutBaseProps; export type LabelProps = LabelNSProps> = TextBaseProps; export type ProxyViewContainerProps = ProxyViewContainerNSProps> = LayoutBaseProps; export type ActivityIndicatorProps = ActivityIndicatorNSProps> = ViewProps; export type HtmlViewProps = HtmlViewNSProps> = ViewProps; export type NavigationButtonProps = NavigationButtonNSProps> = ActionItemProps; export type SegmentedBarItemProps = SegmentedBarItemNSProps> = ViewBaseProps; export type SplitViewProps = SplitViewNSProps> = LayoutBaseProps;