UNPKG

one

Version:

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

323 lines (322 loc) • 5.74 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 swiftui_exports = {}; __export(swiftui_exports, { assertSwiftUIValue: () => assertSwiftUIValue, swiftUIValues: () => swiftUIValues }); module.exports = __toCommonJS(swiftui_exports); const swiftUIValues = { MenuOrder: { automatic: 16, priority: 16, fixed: 16 }, Visibility: { automatic: 15, visible: 15, hidden: 15 }, PickerStyle: { wheel: 13, inline: 14, automatic: 13, segmented: 13, tabs: 27, palette: 17, navigationLink: 16, menu: 14 }, DatePickerStyle: { wheel: 13, automatic: 13, graphical: 14, compact: 14 }, ToggleStyle: { button: 15, automatic: 13, switch: 13 }, MenuActionDismissBehavior: { automatic: 16.4, enabled: 16.4, disabled: 16.4 }, TabViewStyle: { sidebarAdaptable: 18, page: 14, tabBarOnly: 18, automatic: 14 }, ButtonRole: { destructive: 15, cancel: 15, confirm: 26, close: 26 }, TabRole: { search: 18, prominent: 27 }, TabPlacement: { automatic: 18, pinned: 18, sidebarOnly: 18 }, AdaptableTabBarPlacement: { automatic: 18, tabBar: 18, sidebar: 18 }, TabCustomizationBehavior: { automatic: 18, reorderable: 18, disabled: 18 }, TabSectionExpansion: { automatic: 27, expanded: 27, collapsed: 27 }, SpringLoadingBehavior: { automatic: 17, enabled: 17, disabled: 17 }, ControlGroupStyle: { palette: 17, automatic: 15, navigation: 15, menu: 16.4, compactMenu: 16.4 }, PrimitiveButtonStyle: { automatic: 13, glass: 26, borderless: 13, glassProminent: 26, plain: 13, bordered: 15, borderedProminent: 15 }, ProgressViewStyle: { linear: 14, circular: 14, automatic: 14 }, GaugeStyle: { accessoryCircularCapacity: 16, linearCapacity: 16, accessoryLinear: 16, accessoryLinearCapacity: 16, automatic: 16, accessoryCircular: 16 }, TextFieldStyle: { automatic: 13, roundedBorder: 13, bordered: 27, plain: 13 }, SubmitLabel: { done: 15, go: 15, send: 15, join: 15, route: 15, search: 15, return: 15, next: 15, continue: 15 }, TextInputAutocapitalization: { never: 15, words: 15, sentences: 15, characters: 15 }, Axis: { horizontal: 13, vertical: 13 }, Edge: { top: 13, leading: 13, bottom: 13, trailing: 13 }, PresentationAdaptation: { automatic: 16.4, none: 16.4, popover: 16.4, sheet: 16.4, fullScreenCover: 16.4 }, PresentationContentInteraction: { automatic: 16.4, resizes: 16.4, scrolls: 16.4 }, ColorScheme: { light: 13, dark: 13 }, DynamicTypeSize: { xSmall: 15, small: 15, medium: 15, large: 15, xLarge: 15, xxLarge: 15, xxxLarge: 15, accessibility1: 15, accessibility2: 15, accessibility3: 15, accessibility4: 15, accessibility5: 15 }, ControlSize: { mini: 15, small: 15, regular: 15, large: 15, extraLarge: 17 }, SymbolRenderingMode: { monochrome: 15, multicolor: 15, hierarchical: 15, palette: 15 }, SymbolVariants: { none: 15, circle: 15, square: 15, rectangle: 15, fill: 15, slash: 15 }, ImageScale: { small: 13, medium: 13, large: 13 }, PhotosPickerSelectionBehavior: { default: 16, ordered: 16, continuous: 17, continuousAndOrdered: 17 }, EncodingDisambiguationPolicy: { automatic: 16, current: 16, compatible: 16 }, BackForwardNavigationGesturesBehavior: { automatic: 26, enabled: 26, disabled: 26 }, MagnificationGesturesBehavior: { automatic: 26, enabled: 26, disabled: 26 }, LinkPreviewBehavior: { automatic: 26, enabled: 26, disabled: 26 }, ElementFullscreenBehavior: { automatic: 26, enabled: 26, disabled: 26 }, ListStyle: { automatic: 13, sidebar: 14, inset: 14, grouped: 13, insetGrouped: 14, plain: 13 }, ToolbarItemPlacement: { automatic: 14, principal: 14, navigation: 14, primaryAction: 14, secondaryAction: 16, status: 14, confirmationAction: 14, cancellationAction: 14, destructiveAction: 14, keyboard: 15, topBarLeading: 14, topBarTrailing: 14, topBarPinnedTrailing: 27, navigationBarLeading: 14, navigationBarTrailing: 14, title: 14, largeTitle: 26, bottomBar: 14, subtitle: 26, largeSubtitle: 26 }, SpacerSizing: { flexible: 26, fixed: 26 }, PayWithApplePayButtonStyle: { white: 16, whiteOutline: 16, black: 16, automatic: 16 }, AddPassToWalletButtonStyle: { black: 16, blackOutline: 16 }, PayWithApplePayButtonLabel: { plain: 16, buy: 16, addMoney: 16, book: 16, checkout: 16, continue: 16, contribute: 16, donate: 16, inStore: 16, order: 16, reload: 16, rent: 16, setUp: 16, subscribe: 16, support: 16, tip: 16, topUp: 16 } }; function assertSwiftUIValue(type, value, iosVersion) { const values = swiftUIValues[type]; if (!Object.hasOwn(values, value)) throw new Error("Unknown SwiftUI " + type + ": " + value); if (iosVersion < values[value]) throw new Error(type + "." + value + " requires iOS " + values[value]); }