Package-level declarations

Types

Link copied to clipboard
data class AudioCaptureConfig(val sampleRateHz: Int = DEFAULT_SAMPLE_RATE_HZ, val channels: Int = DEFAULT_CHANNELS, val bitDepth: Int = DEFAULT_BIT_DEPTH)

PCM audio capture parameters passed to AudioCapturePort.startCapture.

Link copied to clipboard

Dependency-inverted OS microphone capture port decoupled from platform audio frameworks.

Link copied to clipboard

Lifecycle states reported by an AudioCapturePort.

Link copied to clipboard
data class AudioLevelSample(val normalizedAmplitude: Float, val peakAmplitude: Float = normalizedAmplitude, val timestampEpochMillis: Long = 0)

Real-time microphone metering snapshot emitted by AudioCapturePort.levels.

Link copied to clipboard
interface ClipboardPort

Unified OS clipboard port reading and writing plain text across mobile, desktop, and web.

Link copied to clipboard

Reactive OS network reachability monitor port.

Link copied to clipboard

High-level network reachability classification observed from OS connectivity APIs.

Link copied to clipboard

Pure multiplatform parser normalizing custom-scheme (abeta://store-home) and HTTPS App/Universal links (https://app.abeta.dev/screens/store-home?promo=FRESH10) into SDUI screen identifiers.

Link copied to clipboard
data class DeepLinkTarget(val rawUri: String, val scheme: String, val host: String?, val screenId: String, val params: Map<String, String> = emptyMap())

Parsed destination screen and query parameters extracted from an app deep link or Universal/App Link.

Link copied to clipboard

Dependency-inverted port for desktop OS integrations (tray status, settings deep links, badges, attention).

Link copied to clipboard
data class DesktopTrayState(val tooltip: String, val status: TrayStatusKind = TrayStatusKind.IDLE, val badgeCount: Int = 0)

Immutable presentation snapshot applied to a desktop tray or menu bar indicator.

Link copied to clipboard
data class DeviceCoordinates(val latitude: Double, val longitude: Double, val accuracyMeters: Float? = null, val capturedAtEpochMillis: Long? = null)

Immutable geographic coordinate snapshot supplied by a host LocationPort.

Link copied to clipboard

Cross-platform external browser / OS URL launcher port.

Link copied to clipboard
class FakeAudioCapturePort(recordedBytes: ByteArray = ByteArray(0), failureError: AppError? = null) : AudioCapturePort

Deterministic test fake for AudioCapturePort supporting synthetic level emission and failure injection.

Link copied to clipboard
class FakeSpeechToTextPort(failureError: AppError? = null) : SpeechToTextPort

Deterministic test fake for SpeechToTextPort supporting transcript emission and failure injection.

Link copied to clipboard
interface FilePickerPort

Port abstracting native document/image selection dialogs.

Link copied to clipboard
data class FilePickerRequest(val mimeTypes: List<String> = listOf("*/*"), val allowMultiple: Boolean = false)

Criteria describing a native OS file or media picker request.

Link copied to clipboard
interface HapticEngine

Cross-platform tactile haptic trigger port decoupled from Compose or UI toolkits.

Link copied to clipboard

Tactile feedback pattern taxonomy shared across iOS, Android, macOS, watchOS, and Web.

Link copied to clipboard
class InMemoryClipboardPort(initialText: String? = null) : ClipboardPort

Deterministic in-memory ClipboardPort suitable for unit tests and headless verification.

Link copied to clipboard
interface LocationPort

Port abstracting current device location lookups (GPS, fused location, CoreLocation, browser geolocation).

Link copied to clipboard
class MutableConnectivityMonitor(initialStatus: ConnectivityStatus = ConnectivityStatus.ONLINE) : ConnectivityMonitor

Controllable ConnectivityMonitor implementation for deterministic tests and offline simulations.

Link copied to clipboard

No-op HapticEngine for headless tests or platforms without haptic hardware.

Link copied to clipboard

Standard runtime permission categories requested by SDUI actions or host flows.

Link copied to clipboard

Target system preferences / settings pane requested via DesktopSystemPort.openOsSettings.

Link copied to clipboard
interface PermissionPort

Dependency-inverted port for querying and requesting host runtime permissions.

Link copied to clipboard

Outcome status returned when checking or requesting an OsPermission.

Link copied to clipboard
data class PickedFile(val name: String, val mimeType: String? = null, val sizeBytes: Long? = null, val bytes: ByteArray? = null, val uriString: String? = null)

Selected file metadata (and optional small payload bytes) returned by FilePickerPort.

Link copied to clipboard
data class PlatformCapabilities(val platform: PlatformInfo, val osVersion: String, val localeTag: String, val timezoneId: String, val isReducedMotionPreferred: Boolean = false, val isDarkModePreferred: Boolean = false, val supportsHaptics: Boolean = false, val supportsBiometrics: Boolean = false, val supportsClipboard: Boolean = false, val supportsExternalUrl: Boolean = false, val supportsShareSheet: Boolean = false)

Snapshot describing host OS metadata, accessibility preferences, and hardware capabilities.

Link copied to clipboard
data class PlatformInfo(val kind: PlatformKind, val name: String)

Snapshot describing the current runtime platform without leaking host SDK classes.

Link copied to clipboard

Supported host platform runtime environments.

Link copied to clipboard

Port abstracting push notification token retrieval (APNs, FCM, Web Push).

Link copied to clipboard

Deterministic test double and preview recorder capturing all DesktopSystemPort calls.

Link copied to clipboard

Test double capturing external URL launch invocations.

Link copied to clipboard

Thread-safe test double capturing emitted HapticStyle events in order.

Link copied to clipboard

Test double capturing all ShareRequest calls.

Link copied to clipboard
interface SharePort

Cross-platform OS sharing port (UIActivityViewController, Android chooser, Web Share API, desktop fallback).

Link copied to clipboard
data class ShareRequest(val text: String, val title: String? = null, val url: String? = null, val chooserTitle: String? = null)

Payload describing content passed to the native OS share sheet or clipboard share fallback.

Link copied to clipboard

Lifecycle states reported by a SpeechToTextPort.

Link copied to clipboard

Dependency-inverted speech recognition port abstracting on-device or host STT engines.

Link copied to clipboard
data class SpeechTranscriptChunk(val text: String, val isFinal: Boolean = false, val confidence: Float? = null, val localeTag: String? = null)

Incremental or final recognized speech segment emitted by SpeechToTextPort.transcripts.

Link copied to clipboard

Visual status category for a desktop menu bar / system tray item.

Link copied to clipboard

Fallback AudioCapturePort when microphone capture is unavailable or not bound on the host.

Link copied to clipboard

Fallback DesktopSystemPort for mobile, wearable, browser, or headless targets.

Link copied to clipboard

Default stub FilePickerPort when no UI host picker is bound.

Link copied to clipboard

Default stub LocationPort when no host location provider is bound.

Link copied to clipboard

Default stub PushNotificationPort when push services are not configured on the host.

Link copied to clipboard

Fallback SpeechToTextPort when speech recognition is unavailable or not bound on the host.

Link copied to clipboard

Fallback PermissionPort for headless environments or desktop platforms without runtime permission prompts.

Functions

Link copied to clipboard

Creates the platform-native ClipboardPort for the current KMP target.

actual fun createPlatformClipboardPort(): ClipboardPort

Creates an iOS/iPadOS ClipboardPort backed by UIPasteboard.generalPasteboard.

Creates an AWT ClipboardPort supporting macOS, Windows, and Linux JVM desktops.

actual fun createPlatformClipboardPort(): ClipboardPort

Creates a macOS ClipboardPort backed by NSPasteboard.generalPasteboard.

actual fun createPlatformClipboardPort(): ClipboardPort

Creates a WasmJS browser ClipboardPort.

actual fun createPlatformClipboardPort(): ClipboardPort

Creates the watchOS ClipboardPort.

Link copied to clipboard
actual fun createPlatformConnectivityMonitor(): ConnectivityMonitor

Creates an Apple Network framework (NWPathMonitor) ConnectivityMonitor.

Creates the platform-native ConnectivityMonitor for the current KMP target.

actual fun createPlatformConnectivityMonitor(): ConnectivityMonitor

Creates a browser navigator.onLine ConnectivityMonitor for WasmJS targets.

Link copied to clipboard
actual fun createPlatformDesktopSystemPort(): DesktopSystemPort

Creates the Apple platform DesktopSystemPort (defaults to UnavailableDesktopSystemPort).

Creates the platform-native DesktopSystemPort for the current KMP target.

Creates a JVM desktop DesktopSystemPort supporting macOS, Windows, and Linux desktops.

actual fun createPlatformDesktopSystemPort(): DesktopSystemPort

Creates the WasmJS platform DesktopSystemPort (defaults to UnavailableDesktopSystemPort).

Link copied to clipboard

Creates the platform-native ExternalLauncherPort for the current KMP target.

actual fun createPlatformExternalLauncher(): ExternalLauncherPort

Creates an iOS/iPadOS ExternalLauncherPort via UIApplication.sharedApplication.

Creates a JVM desktop ExternalLauncherPort supporting macOS, Windows, and Linux.

actual fun createPlatformExternalLauncher(): ExternalLauncherPort

Creates a macOS native ExternalLauncherPort backed by NSWorkspace.sharedWorkspace.

actual fun createPlatformExternalLauncher(): ExternalLauncherPort

Creates a WasmJS browser ExternalLauncherPort.

actual fun createPlatformExternalLauncher(): ExternalLauncherPort

Creates the watchOS ExternalLauncherPort.

Link copied to clipboard

Creates the platform-native HapticEngine for the current KMP target.

actual fun createPlatformHapticEngine(): HapticEngine

Creates an iOS/iPadOS HapticEngine backed by UIKit feedback generators.

Creates a JVM desktop HapticEngine (graceful no-op on non-tactile hardware).

actual fun createPlatformHapticEngine(): HapticEngine

Creates a macOS trackpad/Force Touch HapticEngine via NSHapticFeedbackManager.

actual fun createPlatformHapticEngine(): HapticEngine

Creates a browser Vibration API HapticEngine for WasmJS targets.

actual fun createPlatformHapticEngine(): HapticEngine

Creates an Apple Watch Taptic Engine HapticEngine backed by WKInterfaceDevice.

Link copied to clipboard

Creates the platform-native SharePort for the current KMP target.

actual fun createPlatformSharePort(): SharePort

Creates an iOS/iPadOS SharePort presenting UIActivityViewController.

Creates a JVM desktop SharePort copying formatted share payloads to the clipboard.

actual fun createPlatformSharePort(): SharePort

Creates a macOS SharePort copying formatted share payloads to the pasteboard.

actual fun createPlatformSharePort(): SharePort

Creates a WasmJS Web Share / clipboard-fallback SharePort.

actual fun createPlatformSharePort(): SharePort

Creates the watchOS SharePort.

Link copied to clipboard
actual fun currentLocaleTag(): String

Returns the active Apple BCP-47 locale identifier normalized with hyphens.

expect fun currentLocaleTag(): String

Returns the active OS BCP-47 locale tag (e.g. "en-US", "en-IN").

actual fun currentLocaleTag(): String

Returns the active JVM BCP-47 locale tag.

actual fun currentLocaleTag(): String

Returns the browser BCP-47 locale tag on WasmJS.

Link copied to clipboard

Returns the active PlatformCapabilities inspected from the host operating system.

actual fun currentPlatformCapabilities(): PlatformCapabilities

Inspects iOS / iPadOS system version, accessibility, dark mode, and FaceID/TouchID capability.

Inspects JVM system properties, AWT desktop environment, and host locale/timezone.

actual fun currentPlatformCapabilities(): PlatformCapabilities

Inspects macOS version, accessibility reduce-motion, locale, timezone, and TouchID capability.

actual fun currentPlatformCapabilities(): PlatformCapabilities

Inspects browser locale, timezone, media-query preferences, and Web API support on WasmJS.

actual fun currentPlatformCapabilities(): PlatformCapabilities

Inspects Apple watchOS metadata, locale, timezone, and Taptic Engine capabilities.

Link copied to clipboard
actual fun currentPlatformInfo(): PlatformInfo

Returns the Apple Darwin PlatformInfo using Kotlin/Native OS family introspection.

Returns the PlatformInfo for the active Kotlin Multiplatform target.

Returns the JVM host PlatformInfo, distinguishing Android ART and Wear OS when present.

actual fun currentPlatformInfo(): PlatformInfo

Returns the WebAssembly browser PlatformInfo.

Link copied to clipboard
actual fun formatCurrencyCents(amountCents: Long, currencyCode: String): String

Formats minor currency units using NSNumberFormatter and the host Apple NSLocale.

expect fun formatCurrencyCents(amountCents: Long, currencyCode: String = "USD"): String

Formats integer minor currency units (e.g. cents) using the host OS locale & ISO-4217 currency code.

actual fun formatCurrencyCents(amountCents: Long, currencyCode: String): String

Formats minor currency units using JVM NumberFormat and the host default Locale.

actual fun formatCurrencyCents(amountCents: Long, currencyCode: String): String

Formats minor currency units via browser Intl.NumberFormat on WasmJS.

Link copied to clipboard
fun validateExternalUrl(url: String, allowedSchemes: Set<String> = DEFAULT_ALLOWED_URL_SCHEMES): AppResult<String>

Validates url against allowedSchemes (blocking unsafe schemes such as javascript: or file:, control characters, and whitespace).