Skip to content

Capability & Conformance

A compliant StemJSON runtime MUST support the core capability set. Optional capabilities are runtime-specific and depend on platform APIs or external dependencies. Authors SHOULD check runtime capability documentation before using optional features.

All conforming runtimes MUST implement:

AreaRequired support
Component typesAll types listed in §3.2: text, image, label, progress, color, map, textfield, texteditor, toggle, picker, slider, datepicker, button, navigation, link, tab, vstack, hstack, zstack, scroll, spacer, divider, list, form, section, grid, gridrow, circle, ellipse, capsule, rectangle, roundedrectangle, star, bubble, module, template, dynamic, conditional
Context & stateDeclaring, reading, and updating state; public/private context inheritance
Expression languageAll operators, all built-in functions listed in §8.6, all value reference forms
EventsAll event types listed in §9.1
Actionsstate, condition, repo, service, listen, navigate, template
Repository kindslocal, secured
ValidationAll severity levels; error/critical blocks rendering
Package formatsSingle JSON file; zip package with assets and localization
Render surfaceContaining the module within the host-provided surface (§4.6): a root that exceeds the allocated viewport MUST be clipped to that surface and MUST NOT overdraw host chrome or intercept touches outside it

The following capabilities are optional. A runtime that does not support them MUST report a validation warning when the relevant configuration is encountered rather than crashing.

CapabilityRequiresNotes
remote repositoryNetwork accessHTTP/HTTPS operations; auth interceptor
firebase repositoryFirebase SDK dependencyRealtime database; used by listen action
photos repositoryPlatform photo library APINative picker UI; read/create/delete operations on device photo library
video componentPlatform media player APIRequires platform video playback capability (e.g. AVKit on Apple, ExoPlayer on Android)
pdf componentPlatform document rendererRequires platform PDF rendering capability (e.g. PDFKit on Apple)
media componentPlatform media player API + document rendererDispatches to image, video, or pdf based on detected kind
audio servicePlatform audio APISystem sounds and haptic feedback
push / local notification servicePlatform notification APIUNUserNotificationCenter or equivalent
map componentPlatform mapping APIInteractive map; requires platform map framework
System value: #{device}, #{device_type}, #{is_split_view}Platform device APIMay return null on unsupported platforms
Auth interceptorremote repositorysetBearerToken, setHeader, setQueryParam operations

There is no runtime capability negotiation protocol in v1.0. Authors targeting runtimes with different capability sets should conditionally structure payloads using the condition action and system values where applicable, or validate payloads offline against the target runtime’s supported feature set.