UNPKG

one

Version:

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

130 lines (129 loc) • 5.15 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var one_exports = {}; __export(one_exports, { One: () => One }); module.exports = __toCommonJS(one_exports); var import_platform = require("./platform/index.cjs"); var import_safe_area_context = require("./safe-area-context/index.cjs"); function currentPlatform() { const defined = Reflect.get(globalThis, "__ONE_PLATFORM__") ?? (typeof process !== "undefined" ? process.env.ONE_PLATFORM : void 0); return defined === "ios" || defined === "android" ? defined : "web"; } const iOS = Object.freeze({ ...import_platform.Swift, VNDocumentCameraViewController: import_platform.VNDocumentCameraViewController, DataScannerViewController: import_platform.DataScannerViewController, CNContactViewController: import_platform.CNContactViewController, CNMutableContact: import_platform.CNMutableContact, CNContactStore: import_platform.CNContactStore, MFMailComposeViewController: import_platform.MFMailComposeViewController, MFMessageComposeViewController: import_platform.MFMessageComposeViewController, WidgetUI: import_platform.WidgetUI, CameraView: import_platform.CameraView, Color: import_platform.Color.ios, MenuAction: import_platform.MenuAction, SplitView: import_platform.SplitView, ToolbarHost: import_platform.ToolbarHost, BarButtonItem: import_platform.ToolbarItem, ZoomTransitionAlignmentRectDetector: import_platform.ZoomTransitionAlignmentRectDetector, ZoomTransitionEnabler: import_platform.ZoomTransitionEnabler, ZoomTransitionSource: import_platform.ZoomTransitionSource }); const Android = Object.freeze({ ...import_platform.Compose, Color: import_platform.Color.android, Menu: import_platform.Menu, ContextMenu: import_platform.ContextMenu, CameraView: import_platform.CameraView }); const SafeArea = Object.freeze({ Provider: import_safe_area_context.SafeAreaProvider, View: import_safe_area_context.SafeAreaView, initialMetrics: import_safe_area_context.initialWindowMetrics }); const UI = Object.freeze({ ...import_platform.UI, Fonts: import_platform.Fonts, SafeArea, TextInput: import_platform.TextInput, ReservedRegions: import_platform.ReservedRegions }); const One = Object.freeze({ get platform() { return currentPlatform(); }, openURL: import_platform.Open.openURL, openShare: import_platform.Open.openShare, openSettings: import_platform.Open.openSettings, AppInfo: import_platform.AppInfo, Database: import_platform.Database, Widgets: import_platform.Widgets, LiveActivities: import_platform.LiveActivities, LocalAuthentication: import_platform.LocalAuthentication, ProtectedStore: import_platform.ProtectedStore, KeepAwake: import_platform.KeepAwake, Print: import_platform.Print, StoreReview: import_platform.StoreReview, QuickActions: import_platform.QuickActions, Location: import_platform.Location, FileSystem: import_platform.FileSystem, Audio: import_platform.Audio, Share: import_platform.Share, PhotoLibrary: import_platform.PhotoLibrary, MapServices: import_platform.MapServices, AppTracking: import_platform.AppTracking, AppIcon: import_platform.AppIcon, ScreenOrientation: import_platform.ScreenOrientation, ScreenCapture: import_platform.ScreenCapture, Purchases: import_platform.Purchases, ImageManipulator: import_platform.ImageManipulator, Device: import_platform.Device, Crypto: import_platform.Crypto, Localization: import_platform.Localization, Motion: import_platform.Motion, BackgroundTasks: import_platform.BackgroundTasks, AppIntents: import_platform.AppIntents, DeviceAttestation: import_platform.DeviceAttestation, Contacts: import_platform.Contacts, Calendar: import_platform.Calendar, iOS, Android, UI, Notifications: import_platform.Notifications, Clipboard: import_platform.Clipboard, Barometer: import_platform.Barometer, LightSensor: import_platform.LightSensor, Pedometer: import_platform.Pedometer, Battery: import_platform.Battery, Brightness: import_platform.Brightness, SpeechSynthesis: import_platform.SpeechSynthesis, Haptics: import_platform.Haptics, LaunchScreen: import_platform.LaunchScreen, Network: import_platform.Network, Auth: import_platform.Auth, Browser: import_platform.Browser, ImagePicker: import_platform.ImagePicker, DocumentPicker: import_platform.DocumentPicker, SecureStore: import_platform.SecureStore, Storage: import_platform.Storage, Speech: import_platform.Speech, Updates: import_platform.Updates });