one
Version:
One is a React framework for web, iOS, and Android apps.
274 lines (273 loc) • 9.6 kB
text/typescript
// generated by bun run generate from the SwiftUI SDK and codegen/catalog.ts.
// edit the generator or catalog, then regenerate.
import type { SDKEventValueShape } from './swiftStyleNative'
export const viewSlotAvailability = {
accessibilityActions: 16,
accessibilityActionsWithAccessibilityActionCategory: 18,
accessibilityChildren: 15,
accessibilityRepresentation: 15,
accessibilityShowsLargeContentViewer: 15,
alert: 15,
background: 15,
backgroundPreferenceValuePreferredColorScheme: 16,
confirmationDialog: 15,
containerBackground: 17,
contentToolbar: 18.4,
contextMenu: 13,
dismissalConfirmationDialog: 27,
documentBrowserContextMenu: 18.1,
fullScreenCover: 14,
inspector: 17,
listRowBackground: 13,
mapControls: 17,
mask: 15,
navigationBarItemsWithLeading: 13,
navigationBarItemsWithTrailing: 13,
navigationDestination: 16,
overlay: 15,
overlayPreferenceValuePreferredColorScheme: 16,
popover: 13,
presentationBackground: 16.4,
safeAreaBarWithHorizontalEdge: 26,
safeAreaBarWithVerticalEdge: 26,
safeAreaInsetWithHorizontalEdge: 15,
safeAreaInsetWithVerticalEdge: 15,
sceneAccessory: 27,
searchScopesWithBindingString: 16,
searchScopesWithBindingStringAndSearchScopeActivation: 16.4,
searchSuggestions: 16,
sectionActions: 18,
sheet: 13,
subscriptionStoreControlIcon: 17,
subscriptionStorePolicyDestination: 17,
swipeActions: 15,
tabItem: 13,
tabViewBottomAccessory: 26,
tabViewBottomAccessoryWithBool: 26.1,
tabViewSidebarBottomBar: 18,
tabViewSidebarFooter: 18,
tabViewSidebarHeader: 18,
toolbar: 14,
toolbarOverflowMenu: 27,
toolbarTitleMenu: 16,
} as const
export type ViewSlotName = keyof typeof viewSlotAvailability
export const viewSlotArguments = {
accessibilityActions: [],
accessibilityActionsWithAccessibilityActionCategory: [
{ field: 'category', kind: 'enum', cases: { default: 18, edit: 18 } },
],
accessibilityChildren: [],
accessibilityRepresentation: [],
accessibilityShowsLargeContentViewer: [],
alert: [
{ field: 'title', kind: 'string' },
{ field: 'isPresented', kind: 'bindingBoolean' },
],
background: [],
backgroundPreferenceValuePreferredColorScheme: [],
confirmationDialog: [
{ field: 'title', kind: 'string' },
{ field: 'isPresented', kind: 'bindingBoolean' },
],
containerBackground: [
{
field: 'container',
kind: 'enum',
cases: {
navigation: 18,
navigationSplitView: 18,
subscriptionStore: 17,
subscriptionStoreHeader: 17,
subscriptionStoreFullHeight: 17,
widget: 17,
},
},
],
contentToolbar: [{ field: 'placement', kind: 'enum', cases: { tabViewSidebar: 18.4 } }],
contextMenu: [],
dismissalConfirmationDialog: [
{ field: 'title', kind: 'string' },
{ field: 'shouldPresent', kind: 'boolean' },
],
documentBrowserContextMenu: [],
fullScreenCover: [{ field: 'isPresented', kind: 'bindingBoolean' }],
inspector: [{ field: 'isPresented', kind: 'bindingBoolean' }],
listRowBackground: [],
mapControls: [],
mask: [],
navigationBarItemsWithLeading: [],
navigationBarItemsWithTrailing: [],
navigationDestination: [{ field: 'isPresented', kind: 'bindingBoolean' }],
overlay: [],
overlayPreferenceValuePreferredColorScheme: [],
popover: [{ field: 'isPresented', kind: 'bindingBoolean' }],
presentationBackground: [],
safeAreaBarWithHorizontalEdge: [
{ field: 'edge', kind: 'enum', cases: { leading: 15, trailing: 15 } },
],
safeAreaBarWithVerticalEdge: [
{ field: 'edge', kind: 'enum', cases: { top: 15, bottom: 15 } },
],
safeAreaInsetWithHorizontalEdge: [
{ field: 'edge', kind: 'enum', cases: { leading: 15, trailing: 15 } },
],
safeAreaInsetWithVerticalEdge: [
{ field: 'edge', kind: 'enum', cases: { top: 15, bottom: 15 } },
],
sceneAccessory: [],
searchScopesWithBindingString: [{ field: 'scope', kind: 'bindingString' }],
searchScopesWithBindingStringAndSearchScopeActivation: [
{ field: 'scope', kind: 'bindingString' },
{
field: 'activation',
kind: 'enum',
cases: { automatic: 16.4, onTextEntry: 16.4, onSearchPresentation: 16.4 },
},
],
searchSuggestions: [],
sectionActions: [],
sheet: [{ field: 'isPresented', kind: 'bindingBoolean' }],
subscriptionStoreControlIcon: [],
subscriptionStorePolicyDestination: [
{ field: 'button', kind: 'enum', cases: { termsOfService: 17, privacyPolicy: 17 } },
],
swipeActions: [],
tabItem: [],
tabViewBottomAccessory: [],
tabViewBottomAccessoryWithBool: [{ field: 'isEnabled', kind: 'boolean' }],
tabViewSidebarBottomBar: [],
tabViewSidebarFooter: [],
tabViewSidebarHeader: [],
toolbar: [],
toolbarOverflowMenu: [],
toolbarTitleMenu: [],
} as const
export const viewSlotEvents: Record<string, SDKEventValueShape> = {
backgroundPreferenceValuePreferredColorScheme: {
kind: 'optional',
value: { kind: 'enum', cases: ['light', 'dark'], open: true },
},
overlayPreferenceValuePreferredColorScheme: {
kind: 'optional',
value: { kind: 'enum', cases: ['light', 'dark'], open: true },
},
}
export type ViewSlotConfiguration =
| { name: 'accessibilityActions'; options?: never }
| {
name: 'accessibilityActionsWithAccessibilityActionCategory'
options: { category: 'default' | 'edit' }
}
| { name: 'accessibilityChildren'; options?: never }
| { name: 'accessibilityRepresentation'; options?: never }
| { name: 'accessibilityShowsLargeContentViewer'; options?: never }
| {
name: 'alert'
options: {
title: string
isPresented: { value: boolean; onChange: (value: boolean) => void }
}
}
| { name: 'background'; options?: never }
| {
name: 'backgroundPreferenceValuePreferredColorScheme'
options: { onValue: (value: 'light' | 'dark' | 'unknown' | null) => void }
}
| {
name: 'confirmationDialog'
options: {
title: string
isPresented: { value: boolean; onChange: (value: boolean) => void }
}
}
| {
name: 'containerBackground'
options: {
container:
| 'navigation'
| 'navigationSplitView'
| 'subscriptionStore'
| 'subscriptionStoreHeader'
| 'subscriptionStoreFullHeight'
| 'widget'
}
}
| { name: 'contentToolbar'; options: { placement: 'tabViewSidebar' } }
| { name: 'contextMenu'; options?: never }
| {
name: 'dismissalConfirmationDialog'
options: { title: string; shouldPresent: boolean }
}
| { name: 'documentBrowserContextMenu'; options?: never }
| {
name: 'fullScreenCover'
options: { isPresented: { value: boolean; onChange: (value: boolean) => void } }
}
| {
name: 'inspector'
options: { isPresented: { value: boolean; onChange: (value: boolean) => void } }
}
| { name: 'listRowBackground'; options?: never }
| { name: 'mapControls'; options?: never }
| { name: 'mask'; options?: never }
| { name: 'navigationBarItemsWithLeading'; options?: never }
| { name: 'navigationBarItemsWithTrailing'; options?: never }
| {
name: 'navigationDestination'
options: { isPresented: { value: boolean; onChange: (value: boolean) => void } }
}
| { name: 'overlay'; options?: never }
| {
name: 'overlayPreferenceValuePreferredColorScheme'
options: { onValue: (value: 'light' | 'dark' | 'unknown' | null) => void }
}
| {
name: 'popover'
options: { isPresented: { value: boolean; onChange: (value: boolean) => void } }
}
| { name: 'presentationBackground'; options?: never }
| { name: 'safeAreaBarWithHorizontalEdge'; options: { edge: 'leading' | 'trailing' } }
| { name: 'safeAreaBarWithVerticalEdge'; options: { edge: 'top' | 'bottom' } }
| { name: 'safeAreaInsetWithHorizontalEdge'; options: { edge: 'leading' | 'trailing' } }
| { name: 'safeAreaInsetWithVerticalEdge'; options: { edge: 'top' | 'bottom' } }
| { name: 'sceneAccessory'; options?: never }
| {
name: 'searchScopesWithBindingString'
options: { scope: { value: string; onChange: (value: string) => void } }
}
| {
name: 'searchScopesWithBindingStringAndSearchScopeActivation'
options: {
scope: { value: string; onChange: (value: string) => void }
activation: 'automatic' | 'onTextEntry' | 'onSearchPresentation'
}
}
| { name: 'searchSuggestions'; options?: never }
| { name: 'sectionActions'; options?: never }
| {
name: 'sheet'
options: { isPresented: { value: boolean; onChange: (value: boolean) => void } }
}
| { name: 'subscriptionStoreControlIcon'; options?: never }
| {
name: 'subscriptionStorePolicyDestination'
options: { button: 'termsOfService' | 'privacyPolicy' }
}
| { name: 'swipeActions'; options?: never }
| { name: 'tabItem'; options?: never }
| { name: 'tabViewBottomAccessory'; options?: never }
| { name: 'tabViewBottomAccessoryWithBool'; options: { isEnabled: boolean } }
| { name: 'tabViewSidebarBottomBar'; options?: never }
| { name: 'tabViewSidebarFooter'; options?: never }
| { name: 'tabViewSidebarHeader'; options?: never }
| { name: 'toolbar'; options?: never }
| { name: 'toolbarOverflowMenu'; options?: never }
| { name: 'toolbarTitleMenu'; options?: never }
export const tabViewSlotAvailability = {
tabViewBottomAccessory: 26,
tabViewSidebarBottomBar: 18,
tabViewSidebarFooter: 18,
tabViewSidebarHeader: 18,
} as const
export type TabViewSlotName = keyof typeof tabViewSlotAvailability