UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

8 lines (7 loc) • 4.76 kB
{ "version": 3, "sources": ["src/platform/specs/OneNativeSheetNativeComponent.ts"], "sourcesContent": ["// generated by bun run generate from the SwiftUI SDK and codegen/catalog.ts.\n// edit the generator or catalog, then regenerate.\nimport type { ColorValue, ViewProps } from 'react-native';\nimport type { DirectEventHandler, Int32, Double } from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\ntype NativeSheetDetent = Readonly<{\n type: string;\n value: Double;\n}>;\ninterface NativeProps extends ViewProps {\n isPresented: boolean;\n acknowledgedEvent: Int32;\n revision: Int32;\n presentationId: Int32;\n detents: ReadonlyArray<NativeSheetDetent>;\n fitToContents: boolean;\n selectedDetentType: string;\n selectedDetentValue: Double;\n acknowledgedDetentEvent: Int32;\n detentRevision: Int32;\n interactiveDismissDisabled: boolean;\n presentationDragIndicator: string;\n presentationBackground?: ColorValue;\n presentationBackgroundInteraction: string;\n presentationBackgroundInteractionDetentType: string;\n presentationBackgroundInteractionDetentValue: Double;\n presentationContentInteraction: string;\n presentationSizing: string;\n presentation: string;\n colorScheme: string;\n onNativeSheetIsPresentedChange?: DirectEventHandler<Readonly<{\n isPresented: boolean;\n eventCount: Int32;\n revision: Int32;\n }>>;\n onNativeSheetDismiss?: DirectEventHandler<Readonly<{\n revision: Int32;\n }>>;\n onNativeSheetDidDismiss?: DirectEventHandler<Readonly<{\n revision: Int32;\n presentationId: Int32;\n }>>;\n onNativeSheetDetentChange?: DirectEventHandler<Readonly<{\n type: string;\n value: Double;\n eventCount: Int32;\n revision: Int32;\n }>>;\n}\nconst NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\nconst {\n ConditionallyIgnoredEventHandlers\n} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');\nlet nativeComponentName = 'OneNativeSheet';\nexport const __INTERNAL_VIEW_CONFIG = {\n uiViewClassName: \"OneNativeSheet\",\n directEventTypes: {\n topNativeSheetIsPresentedChange: {\n registrationName: \"onNativeSheetIsPresentedChange\"\n },\n topNativeSheetDismiss: {\n registrationName: \"onNativeSheetDismiss\"\n },\n topNativeSheetDidDismiss: {\n registrationName: \"onNativeSheetDidDismiss\"\n },\n topNativeSheetDetentChange: {\n registrationName: \"onNativeSheetDetentChange\"\n }\n },\n validAttributes: {\n isPresented: true,\n acknowledgedEvent: true,\n revision: true,\n presentationId: true,\n detents: true,\n fitToContents: true,\n selectedDetentType: true,\n selectedDetentValue: true,\n acknowledgedDetentEvent: true,\n detentRevision: true,\n interactiveDismissDisabled: true,\n presentationDragIndicator: true,\n presentationBackground: require('react-native/Libraries/Components/View/ReactNativeStyleAttributes').colorAttribute,\n presentationBackgroundInteraction: true,\n presentationBackgroundInteractionDetentType: true,\n presentationBackgroundInteractionDetentValue: true,\n presentationContentInteraction: true,\n presentationSizing: true,\n presentation: true,\n colorScheme: true,\n ...ConditionallyIgnoredEventHandlers({\n onNativeSheetIsPresentedChange: true,\n onNativeSheetDismiss: true,\n onNativeSheetDidDismiss: true,\n onNativeSheetDetentChange: true\n })\n }\n};\nexport default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);"], "mappings": "AAiDA,MAAMA,IAA0B,QAAQ,gEAAgE;AACxG,MAAM;AAAA,EACJ,mCAAAC;AACF,IAAI,QAAQ,yDAAyD;AACrE,IAAIC,IAAsB;AACnB,MAAMC,IAAyB;AAAA,EACpC,iBAAiB;AAAA,EACjB,kBAAkB;AAAA,IAChB,iCAAiC;AAAA,MAC/B,kBAAkB;AAAA,IACpB;AAAA,IACA,uBAAuB;AAAA,MACrB,kBAAkB;AAAA,IACpB;AAAA,IACA,0BAA0B;AAAA,MACxB,kBAAkB;AAAA,IACpB;AAAA,IACA,4BAA4B;AAAA,MAC1B,kBAAkB;AAAA,IACpB;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,SAAS;AAAA,IACT,eAAe;AAAA,IACf,oBAAoB;AAAA,IACpB,qBAAqB;AAAA,IACrB,yBAAyB;AAAA,IACzB,gBAAgB;AAAA,IAChB,4BAA4B;AAAA,IAC5B,2BAA2B;AAAA,IAC3B,wBAAwB,QAAQ,mEAAmE,EAAE;AAAA,IACrG,mCAAmC;AAAA,IACnC,6CAA6C;AAAA,IAC7C,8CAA8C;AAAA,IAC9C,gCAAgC;AAAA,IAChC,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,aAAa;AAAA,IACb,GAAGF,EAAkC;AAAA,MACnC,gCAAgC;AAAA,MAChC,sBAAsB;AAAA,MACtB,yBAAyB;AAAA,MACzB,2BAA2B;AAAA,IAC7B,CAAC;AAAA,EACH;AACF;AACA,IAAOG,IAAQJ,EAAwB,IAAIE,GAAqB,MAAMC,CAAsB;", "names": ["NativeComponentRegistry", "ConditionallyIgnoredEventHandlers", "nativeComponentName", "__INTERNAL_VIEW_CONFIG", "OneNativeSheetNativeComponent_default"] }