ui/ios
lib/ui/ios.vklib/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 { kind enum, fraction f64 = ... }
Sheet presentation detent descriptor (.medium, .large, or .fraction clamped to 0.15..1.0).
SfSymbolSpec = struct { name str, weight enum = ..., rendering enum = ... }
SF Symbol icon descriptor (name, font weight, and rendering mode).
HapticSpec = struct { style enum = ... }
UIKit / SwiftUI haptic feedback style descriptor.
DynamicTypeSpec = struct { category enum = ..., min_scale f64 = ..., max_scale f64 = ... }
iOS Dynamic Type scaling constraint descriptor (min_scale >= 0.5, max_scale >= min_scale).
SafeAreaSpec = struct { ignore_edges block = ... }
Safe-area edge inset override descriptor (.top, .bottom, .leading, .trailing, .all).
VibrancySpec = struct { material enum = ... }
SwiftUI / UIVisualEffectView vibrancy material descriptor.
detent = fn [kind enum, frac f64] DetentSpec
Builds a validated DetentSpec (.medium -> 0.5, .large -> 1.0, .fraction clamped to 0.15..1.0).
with-detents = fn [nd v/Node, detents block] v/Node
Attaches ios_detents block and primary ios_detent string to nd.props.
sf-symbol = fn [name str, props map] v/Node
Builds an SF Symbol icon ui/view Node (questionmark.circle fallback when name is empty).
with-haptic = fn [nd v/Node, style enum] v/Node
Attaches ios_haptic feedback style string to nd.props.
dynamic-type = fn [category enum, min_scale f64, max_scale f64] DynamicTypeSpec
Builds a clamped DynamicTypeSpec (min_scale >= 0.5, max_scale >= min_scale).
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.
with-vibrancy = fn [nd v/Node, material enum] v/Node
Attaches ios_vibrancy material name (.ultra_thin, .thin, .regular, .thick, .chrome) to nd.props.
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.
validate-url-policy = fn [url str, allow_net bool] map
Validates a navigation URI against iOS WKWebView safety and .net capability policy.