veko doc
Self-Contained API Reference • Gradual Types • Capabilities • Wasm Sandbox

ui/ios

lib/ui/ios.vk

lib/ui/ios.vk Pure-Veko iOS / SwiftUI / UIKit declarative modifier & policy module (ui/ios). - Presentation detents (DetentSpec, detent, with-detents) - SF Symbols (SfSymbolSpec, sf-symbol), haptics (HapticSpec, with-haptic) - Dynamic Type scaling (DynamicTypeSpec, dynamic-type, with-dynamic-type) - UIVisualEffect / SwiftUI vibrancy (VibrancySpec, with-vibrancy) & safe-area edges (SafeAreaSpec, with-safe-area) - Strict offline-safe WKWebView URL policy (validate-url-policy) & platform capability descriptor (capabilities) - Zero top-level mut globals, zero ffi/net imports, and zero host capabilities required

DetentSpec struct
signature
DetentSpec = struct { kind enum, fraction f64 = ... }

Sheet presentation detent descriptor (.medium, .large, or .fraction clamped to 0.15..1.0).

signature
SfSymbolSpec = struct { name str, weight enum = ..., rendering enum = ... }

SF Symbol icon descriptor (name, font weight, and rendering mode).

HapticSpec struct
signature
HapticSpec = struct { style enum = ... }

UIKit / SwiftUI haptic feedback style descriptor.

signature
DynamicTypeSpec = struct { category enum = ..., min_scale f64 = ..., max_scale f64 = ... }

iOS Dynamic Type scaling constraint descriptor (min_scale >= 0.5, max_scale >= min_scale).

signature
SafeAreaSpec = struct { ignore_edges block = ... }

Safe-area edge inset override descriptor (.top, .bottom, .leading, .trailing, .all).

signature
VibrancySpec = struct { material enum = ... }

SwiftUI / UIVisualEffectView vibrancy material descriptor.

signature
detent = fn [kind enum, frac f64] DetentSpec

Builds a validated DetentSpec (.medium -> 0.5, .large -> 1.0, .fraction clamped to 0.15..1.0).

signature
with-detents = fn [nd v/Node, detents block] v/Node

Attaches ios_detents block and primary ios_detent string to nd.props.

signature
sf-symbol = fn [name str, props map] v/Node

Builds an SF Symbol icon ui/view Node (questionmark.circle fallback when name is empty).

signature
with-haptic = fn [nd v/Node, style enum] v/Node

Attaches ios_haptic feedback style string to nd.props.

signature
dynamic-type = fn [category enum, min_scale f64, max_scale f64] DynamicTypeSpec

Builds a clamped DynamicTypeSpec (min_scale >= 0.5, max_scale >= min_scale).

signature
with-dynamic-type = fn [nd v/Node, spec DynamicTypeSpec] v/Node

Attaches ios_dynamic_type, ios_min_scale, and ios_max_scale to nd.props.

signature
with-vibrancy = fn [nd v/Node, material enum] v/Node

Attaches ios_vibrancy material name (.ultra_thin, .thin, .regular, .thick, .chrome) to nd.props.

signature
with-safe-area = fn [nd v/Node, ignore_edges block] v/Node

Attaches ios_safe_area_edges (.top, .bottom, .leading, .trailing, .all) to nd.props.

signature
validate-url-policy = fn [url str, allow_net bool] map

Validates a navigation URI against iOS WKWebView safety and .net capability policy.

signature
capabilities = fn [] map

Returns static capability metadata for the Veko iOS target.