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.
17.1 Core Capabilities
Section titled “17.1 Core Capabilities”All conforming runtimes MUST implement:
| Area | Required support |
|---|---|
| Component types | All 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 & state | Declaring, reading, and updating state; public/private context inheritance |
| Expression language | All operators, all built-in functions listed in §8.6, all value reference forms |
| Events | All event types listed in §9.1 |
| Actions | state, condition, repo, service, listen, navigate, template |
| Repository kinds | local, secured |
| Validation | All severity levels; error/critical blocks rendering |
| Package formats | Single JSON file; zip package with assets and localization |
| Render surface | Containing 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 |
17.2 Optional Capabilities
Section titled “17.2 Optional Capabilities”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.
| Capability | Requires | Notes |
|---|---|---|
| remote repository | Network access | HTTP/HTTPS operations; auth interceptor |
| firebase repository | Firebase SDK dependency | Realtime database; used by listen action |
| photos repository | Platform photo library API | Native picker UI; read/create/delete operations on device photo library |
| video component | Platform media player API | Requires platform video playback capability (e.g. AVKit on Apple, ExoPlayer on Android) |
| pdf component | Platform document renderer | Requires platform PDF rendering capability (e.g. PDFKit on Apple) |
| media component | Platform media player API + document renderer | Dispatches to image, video, or pdf based on detected kind |
| audio service | Platform audio API | System sounds and haptic feedback |
| push / local notification service | Platform notification API | UNUserNotificationCenter or equivalent |
| map component | Platform mapping API | Interactive map; requires platform map framework |
| System value: #{device}, #{device_type}, #{is_split_view} | Platform device API | May return null on unsupported platforms |
| Auth interceptor | remote repository | setBearerToken, setHeader, setQueryParam operations |
17.3 Capability Discovery
Section titled “17.3 Capability Discovery”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.