UNPKG

one

Version:

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

8 lines (7 loc) • 7.28 kB
{ "version": 3, "sources": ["src/platform/specs/OneNativeWebViewNativeComponent.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 { ProcessedColorValue, ViewProps } from 'react-native';\nimport type { DirectEventHandler, Int32, Double, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\ntype OneNativeStyleNative = Readonly<{\n fontSize?: WithDefault<Double, -1>;\n fontWeight?: string;\n fontDesign?: string;\n textStyle?: string;\n foregroundStyle?: ProcessedColorValue;\n tint?: ProcessedColorValue;\n background?: ProcessedColorValue;\n padding?: WithDefault<Double, -1>;\n paddingTop?: WithDefault<Double, -1>;\n paddingLeading?: WithDefault<Double, -1>;\n paddingBottom?: WithDefault<Double, -1>;\n paddingTrailing?: WithDefault<Double, -1>;\n width?: WithDefault<Double, -1>;\n height?: WithDefault<Double, -1>;\n minWidth?: WithDefault<Double, -1>;\n idealWidth?: WithDefault<Double, -1>;\n maxWidth?: WithDefault<Double, -1>;\n minHeight?: WithDefault<Double, -1>;\n idealHeight?: WithDefault<Double, -1>;\n maxHeight?: WithDefault<Double, -1>;\n cornerRadius?: WithDefault<Double, -1>;\n opacity?: WithDefault<Double, -1>;\n borderColor?: ProcessedColorValue;\n borderWidth?: WithDefault<Double, -1>;\n glassEffect?: string;\n glassEffectInteractive?: boolean;\n glassEffectTint?: ProcessedColorValue;\n glassEffectShape?: string;\n material?: string;\n sdkModifiers?: string;\n}>;\ninterface NativeProps extends ViewProps {\n url: string;\n html: string;\n script: string;\n command: string;\n commandRevision: Double;\n commandValue: string;\n limitsNavigationsToAppBoundDomains: boolean;\n inlineMedia: boolean;\n inspectable: boolean;\n bounces: boolean;\n backForwardNavigationGestures: string;\n magnificationGestures: string;\n linkPreviews: string;\n elementFullscreen: string;\n contentBackground: string;\n swiftStyle?: OneNativeStyleNative;\n onNativeSDKEvent?: DirectEventHandler<Readonly<{\n name: string;\n value: string;\n }>>;\n onNativeWebViewNavigate?: DirectEventHandler<Readonly<{\n url: string;\n eventCount: Int32;\n }>>;\n onNativeWebViewTitleChange?: DirectEventHandler<Readonly<{\n title: string;\n eventCount: Int32;\n }>>;\n onNativeWebViewLoadingChange?: DirectEventHandler<Readonly<{\n loading: boolean;\n progress: Double;\n eventCount: Int32;\n }>>;\n onNativeWebViewLoadStart?: DirectEventHandler<Readonly<{\n eventCount: Int32;\n }>>;\n onNativeWebViewLoadEnd?: DirectEventHandler<Readonly<{\n eventCount: Int32;\n }>>;\n onNativeWebViewError?: DirectEventHandler<Readonly<{\n message: string;\n eventCount: Int32;\n }>>;\n onNativeWebViewHttpError?: DirectEventHandler<Readonly<{\n statusCode: Double;\n eventCount: Int32;\n }>>;\n onNativeWebViewMessage?: DirectEventHandler<Readonly<{\n data: string;\n eventCount: Int32;\n }>>;\n onNativeWebViewHistoryChange?: DirectEventHandler<Readonly<{\n canGoBack: boolean;\n canGoForward: boolean;\n eventCount: Int32;\n }>>;\n onNativeWebViewProcessTerminate?: DirectEventHandler<Readonly<{\n eventCount: Int32;\n }>>;\n}\nconst NativeComponentRegistry = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\nconst {\n ConditionallyIgnoredEventHandlers\n} = require('react-native/Libraries/NativeComponent/ViewConfigIgnore');\nlet nativeComponentName = 'OneNativeWebView';\nexport const __INTERNAL_VIEW_CONFIG = {\n uiViewClassName: \"OneNativeWebView\",\n directEventTypes: {\n topNativeSDKEvent: {\n registrationName: \"onNativeSDKEvent\"\n },\n topNativeWebViewNavigate: {\n registrationName: \"onNativeWebViewNavigate\"\n },\n topNativeWebViewTitleChange: {\n registrationName: \"onNativeWebViewTitleChange\"\n },\n topNativeWebViewLoadingChange: {\n registrationName: \"onNativeWebViewLoadingChange\"\n },\n topNativeWebViewLoadStart: {\n registrationName: \"onNativeWebViewLoadStart\"\n },\n topNativeWebViewLoadEnd: {\n registrationName: \"onNativeWebViewLoadEnd\"\n },\n topNativeWebViewError: {\n registrationName: \"onNativeWebViewError\"\n },\n topNativeWebViewHttpError: {\n registrationName: \"onNativeWebViewHttpError\"\n },\n topNativeWebViewMessage: {\n registrationName: \"onNativeWebViewMessage\"\n },\n topNativeWebViewHistoryChange: {\n registrationName: \"onNativeWebViewHistoryChange\"\n },\n topNativeWebViewProcessTerminate: {\n registrationName: \"onNativeWebViewProcessTerminate\"\n }\n },\n validAttributes: {\n url: true,\n html: true,\n script: true,\n command: true,\n commandRevision: true,\n commandValue: true,\n limitsNavigationsToAppBoundDomains: true,\n inlineMedia: true,\n inspectable: true,\n bounces: true,\n backForwardNavigationGestures: true,\n magnificationGestures: true,\n linkPreviews: true,\n elementFullscreen: true,\n contentBackground: true,\n swiftStyle: true,\n ...ConditionallyIgnoredEventHandlers({\n onNativeSDKEvent: true,\n onNativeWebViewNavigate: true,\n onNativeWebViewTitleChange: true,\n onNativeWebViewLoadingChange: true,\n onNativeWebViewLoadStart: true,\n onNativeWebViewLoadEnd: true,\n onNativeWebViewError: true,\n onNativeWebViewHttpError: true,\n onNativeWebViewMessage: true,\n onNativeWebViewHistoryChange: true,\n onNativeWebViewProcessTerminate: true\n })\n }\n};\nexport default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);"], "mappings": "AAkGA,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,mBAAmB;AAAA,MACjB,kBAAkB;AAAA,IACpB;AAAA,IACA,0BAA0B;AAAA,MACxB,kBAAkB;AAAA,IACpB;AAAA,IACA,6BAA6B;AAAA,MAC3B,kBAAkB;AAAA,IACpB;AAAA,IACA,+BAA+B;AAAA,MAC7B,kBAAkB;AAAA,IACpB;AAAA,IACA,2BAA2B;AAAA,MACzB,kBAAkB;AAAA,IACpB;AAAA,IACA,yBAAyB;AAAA,MACvB,kBAAkB;AAAA,IACpB;AAAA,IACA,uBAAuB;AAAA,MACrB,kBAAkB;AAAA,IACpB;AAAA,IACA,2BAA2B;AAAA,MACzB,kBAAkB;AAAA,IACpB;AAAA,IACA,yBAAyB;AAAA,MACvB,kBAAkB;AAAA,IACpB;AAAA,IACA,+BAA+B;AAAA,MAC7B,kBAAkB;AAAA,IACpB;AAAA,IACA,kCAAkC;AAAA,MAChC,kBAAkB;AAAA,IACpB;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,oCAAoC;AAAA,IACpC,aAAa;AAAA,IACb,aAAa;AAAA,IACb,SAAS;AAAA,IACT,+BAA+B;AAAA,IAC/B,uBAAuB;AAAA,IACvB,cAAc;AAAA,IACd,mBAAmB;AAAA,IACnB,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,GAAGF,EAAkC;AAAA,MACnC,kBAAkB;AAAA,MAClB,yBAAyB;AAAA,MACzB,4BAA4B;AAAA,MAC5B,8BAA8B;AAAA,MAC9B,0BAA0B;AAAA,MAC1B,wBAAwB;AAAA,MACxB,sBAAsB;AAAA,MACtB,0BAA0B;AAAA,MAC1B,wBAAwB;AAAA,MACxB,8BAA8B;AAAA,MAC9B,iCAAiC;AAAA,IACnC,CAAC;AAAA,EACH;AACF;AACA,IAAOG,IAAQJ,EAAwB,IAAIE,GAAqB,MAAMC,CAAsB;", "names": ["NativeComponentRegistry", "ConditionallyIgnoredEventHandlers", "nativeComponentName", "__INTERNAL_VIEW_CONFIG", "OneNativeWebViewNativeComponent_default"] }